diff --git a/app/javascript/vue/components/radials/annotator/components/depictions/DepictionListRow.vue b/app/javascript/vue/components/radials/annotator/components/depictions/DepictionListRow.vue
index b055b3a3cc..c421806a4f 100644
--- a/app/javascript/vue/components/radials/annotator/components/depictions/DepictionListRow.vue
+++ b/app/javascript/vue/components/radials/annotator/components/depictions/DepictionListRow.vue
@@ -14,6 +14,9 @@
@end="emit('update:caption', caption)"
/>
+
+
+
From c1870ce267de0fc5d4afa3b507e4a592552dfc11 Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Wed, 10 May 2023 09:58:22 -0300
Subject: [PATCH 04/88] Change task title
---
.../vue/tasks/images/new_image/app.vue | 25 ++++++++++---------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/app/javascript/vue/tasks/images/new_image/app.vue b/app/javascript/vue/tasks/images/new_image/app.vue
index a63351bf2e..d1d73b2323 100644
--- a/app/javascript/vue/tasks/images/new_image/app.vue
+++ b/app/javascript/vue/tasks/images/new_image/app.vue
@@ -3,16 +3,16 @@
-
Task: New images
+ New image
Reset
+ >Reset
@@ -43,7 +45,6 @@
\ No newline at end of file
+}
+
From ccad96f12fedeb4e12afe2954ed8cd7dd12cffd3 Mon Sep 17 00:00:00 2001
From: mjy
Date: Wed, 10 May 2023 09:44:52 -0500
Subject: [PATCH 05/88] Scaffold OtuRelationship. #257
---
.../otu_relationships_controller.rb | 94 +++++++++++++++
app/helpers/otu_relationships_helper.rb | 23 ++++
app/models/otu.rb | 39 ++++---
app/models/otu_relationship.rb | 39 +++++++
app/models/otu_relationship/disjoint.rb | 7 ++
app/models/otu_relationship/equal.rb | 7 ++
.../otu_relationship/partially_overlapping.rb | 7 ++
app/models/otu_relationship/proper_part.rb | 7 ++
.../otu_relationship/proper_part_inverse.rb | 7 ++
app/models/project.rb | 29 ++---
.../otu_relationships/_attributes.html.erb | 20 ++++
.../_attributes.json.jbuilder | 3 +
app/views/otu_relationships/_form.html.erb | 32 ++++++
app/views/otu_relationships/edit.html.erb | 6 +
.../otu_relationships/index.json.jbuilder | 1 +
app/views/otu_relationships/list.html.erb | 25 ++++
app/views/otu_relationships/new.html.erb | 5 +
app/views/otu_relationships/show.html.erb | 1 +
.../otu_relationships/show.json.jbuilder | 1 +
app/views/otus/_attributes.json.jbuilder | 2 +-
config/interface/hub/data.yml | 64 ++++++-----
config/routes.rb | 2 +-
config/routes/data.rb | 9 +-
...20230509185624_create_otu_relationships.rb | 23 ++++
db/schema.rb | 107 +++++++++++++++---
spec/controllers/otus_controller_spec.rb | 1 -
spec/factories/otu_relationships.rb | 7 ++
spec/models/otu_relationship_spec.rb | 14 +++
spec/rails_helper.rb | 1 +
.../routing/otu_relationships_routing_spec.rb | 38 +++++++
30 files changed, 541 insertions(+), 80 deletions(-)
create mode 100644 app/controllers/otu_relationships_controller.rb
create mode 100644 app/helpers/otu_relationships_helper.rb
create mode 100644 app/models/otu_relationship.rb
create mode 100644 app/models/otu_relationship/disjoint.rb
create mode 100644 app/models/otu_relationship/equal.rb
create mode 100644 app/models/otu_relationship/partially_overlapping.rb
create mode 100644 app/models/otu_relationship/proper_part.rb
create mode 100644 app/models/otu_relationship/proper_part_inverse.rb
create mode 100644 app/views/otu_relationships/_attributes.html.erb
create mode 100644 app/views/otu_relationships/_attributes.json.jbuilder
create mode 100644 app/views/otu_relationships/_form.html.erb
create mode 100644 app/views/otu_relationships/edit.html.erb
create mode 100644 app/views/otu_relationships/index.json.jbuilder
create mode 100644 app/views/otu_relationships/list.html.erb
create mode 100644 app/views/otu_relationships/new.html.erb
create mode 100644 app/views/otu_relationships/show.html.erb
create mode 100644 app/views/otu_relationships/show.json.jbuilder
create mode 100644 db/migrate/20230509185624_create_otu_relationships.rb
create mode 100644 spec/factories/otu_relationships.rb
create mode 100644 spec/models/otu_relationship_spec.rb
create mode 100644 spec/routing/otu_relationships_routing_spec.rb
diff --git a/app/controllers/otu_relationships_controller.rb b/app/controllers/otu_relationships_controller.rb
new file mode 100644
index 0000000000..e7464eb34c
--- /dev/null
+++ b/app/controllers/otu_relationships_controller.rb
@@ -0,0 +1,94 @@
+class OtuRelationshipsController < ApplicationController
+ include DataControllerConfiguration::ProjectDataControllerConfiguration
+
+ before_action :set_otu_relationship, only: %i[ show edit update destroy ]
+
+ after_action -> { set_pagination_headers(:otu_relationships) }, only: [:index], if: :json_request?
+
+ # GET /otu_relationships or /otu_relationships.json
+ def index
+ respond_to do |format|
+ format.html do
+ @recent_objects = OtuRelationship.where(project_id: sessions_current_project_id)
+ .order(updated_at: :desc)
+ .limit(10)
+ render '/shared/data/all/index'
+ end
+ format.json {
+ @otu_relationships = OtuRelationship.where(project_id: sessions_current_project_id)
+ .page(params[:page])
+ .per(params[:per])
+ }
+ end
+ end
+
+ # GET /otu_relationships/1 or /otu_relationships/1.json
+ def show
+ end
+
+ def list
+ @otu_relationships = OtuRelationship.where(project_id: sessions_current_project_id)
+ .page(params[:page])
+ .per(params[:per])
+ end
+
+ # GET /otu_relationships/new
+ def new
+ @otu_relationship = OtuRelationship.new
+ end
+
+ # GET /otu_relationships/1/edit
+ def edit
+ end
+
+ # POST /otu_relationships or /otu_relationships.json
+ def create
+ @otu_relationship = OtuRelationship.new(otu_relationship_params)
+
+ respond_to do |format|
+ if @otu_relationship.save
+ format.html { redirect_to otu_relationship_url(@otu_relationship), notice: 'Otu relationship was successfully created.' }
+ format.json { render :show, status: :created, location: @otu_relationship }
+ else
+ format.html { render :new, status: :unprocessable_entity }
+ format.json { render json: @otu_relationship.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PATCH/PUT /otu_relationships/1 or /otu_relationships/1.json
+ def update
+ respond_to do |format|
+ if @otu_relationship.update(otu_relationship_params)
+ format.html { redirect_to otu_relationship_url(@otu_relationship), notice: 'Otu relationship was successfully updated.' }
+ format.json { render :show, status: :ok, location: @otu_relationship.metamorphosize }
+ else
+ format.html { render :edit, status: :unprocessable_entity }
+ format.json { render json: @otu_relationship.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /otu_relationships/1 or /otu_relationships/1.json
+ def destroy
+ @otu_relationship.destroy
+
+ respond_to do |format|
+ format.html { redirect_to otu_relationships_url, notice: 'Otu relationship was successfully destroyed.' }
+ format.json { head :no_content }
+ end
+ end
+
+ private
+ def set_otu_relationship
+ @otu_relationship = OtuRelationship.where(project_id: sessions_current_project_id).find(params[:id])
+ end
+
+ def otu_relationship_params
+ params.require(:otu_relationship).permit(
+ :subject_otu_id,
+ :type,
+ :object_otu_id
+ )
+ end
+end
diff --git a/app/helpers/otu_relationships_helper.rb b/app/helpers/otu_relationships_helper.rb
new file mode 100644
index 0000000000..1e113cd9e9
--- /dev/null
+++ b/app/helpers/otu_relationships_helper.rb
@@ -0,0 +1,23 @@
+module OtuRelationshipsHelper
+
+ def otu_relationship_tag(otu_relationship)
+ return nil if otu_relationship.nil?
+ [otu_tag(otu_relationship.subject_otu), otu_relationship_type_label(otu_relationship), otu_tag(otu_relationship.object_otu) ].compact.join(' ')
+ end
+
+ def otu_relationship_label(otu_relationship)
+ return nil if otu_relationship.nil?
+ [label_for_otu(otu_relationship.subject_otu), otu_relationship.type_name, label_for_otu(otu_relationship.object_otu) ].compact.join(' ')
+ end
+
+ def otu_relationship_link(otu_relationship)
+ return nil if otu_relationship.nil?
+ link_to(otu_relationship, otu_relationship_label(otu_relationship))
+ end
+
+ def otu_relationship_type_label(otu_relationship)
+ return nil if otu_relationship.nil?
+ otu_relationship.type_name
+ end
+
+end
diff --git a/app/models/otu.rb b/app/models/otu.rb
index 7f98494079..57833ed1a1 100644
--- a/app/models/otu.rb
+++ b/app/models/otu.rb
@@ -51,7 +51,7 @@ class Otu < ApplicationRecord
GRAPH_ENTRY_POINTS = [:asserted_distributions, :biological_associations, :common_names, :contents, :data_attributes]
belongs_to :taxon_name, inverse_of: :otus
-
+
# Why? Could be combination too.
belongs_to :protonym, -> { where(type: 'Protonym') }, foreign_key: :taxon_name_id
@@ -78,8 +78,11 @@ class Otu < ApplicationRecord
has_many :content_topics, through: :contents, source: :topic
- scope :with_taxon_name_id, -> (taxon_name_id) { where(taxon_name_id: taxon_name_id) }
- scope :with_name, -> (name) { where(name: name) }
+ has_many :otu_relationships, foreign_key: :subject_otu_id
+ has_many :related_otu_relationships, foreign_key: :object_otu_id
+
+ scope :with_taxon_name_id, -> (taxon_name_id) { where(taxon_name_id:) }
+ scope :with_name, -> (name) { where(name:) }
validate :check_required_fields
@@ -146,7 +149,7 @@ def self.coordinate_otus(otu_id)
# @param taxon_name_id [The id of a valid TaxonName]
def self.descendant_of_taxon_name(taxon_name_id = [])
ids = [taxon_name_id].flatten.compact.uniq
-
+
o = Otu.arel_table
t = TaxonName.arel_table
h = TaxonNameHierarchy.arel_table
@@ -221,7 +224,7 @@ def self.used_recently(user_id, project_id, used_on = '')
when 'BiologicalAssociation'
t.project(t['biological_association_object_id'], t['updated_at']).from(t)
.where(
- t['updated_at'].gt(1.weeks.ago).and(
+ t['updated_at'].gt(1.week.ago).and(
t['biological_association_object_type'].eq('Otu')
)
)
@@ -230,7 +233,7 @@ def self.used_recently(user_id, project_id, used_on = '')
.order(t['updated_at'].desc)
else
t.project(t['otu_id'], t['updated_at']).from(t)
- .where(t['updated_at'].gt( 1.weeks.ago ))
+ .where(t['updated_at'].gt( 1.week.ago ))
.where(t['updated_by_id'].eq(user_id))
.where(t['project_id'].eq(project_id))
.order(t['updated_at'].desc)
@@ -256,23 +259,23 @@ def self.select_optimized(user_id, project_id, target = nil)
r = used_recently(user_id, project_id, target)
h = {
quick: [],
- pinboard: Otu.pinned_by(user_id).where(pinboard_items: {project_id: project_id}).to_a,
+ pinboard: Otu.pinned_by(user_id).where(pinboard_items: {project_id:}).to_a,
recent: []
}
if target && !r.empty?
h[:recent] = (
Otu.where('"otus"."id" IN (?)', r.first(10) ).to_a +
- Otu.where(project_id: project_id, created_by_id: user_id, created_at: 3.hours.ago..Time.now)
+ Otu.where(project_id:, created_by_id: user_id, created_at: 3.hours.ago..Time.now)
.order('updated_at DESC')
.limit(3).to_a
).uniq.sort{|a,b| a.otu_name <=> b.otu_name}
h[:quick] = (
- Otu.pinned_by(user_id).where(pinboard_items: {project_id: project_id}).to_a +
+ Otu.pinned_by(user_id).where(pinboard_items: {project_id:}).to_a +
Otu.where('"otus"."id" IN (?)', r.first(4) ).to_a).uniq.sort{|a,b| a.otu_name <=> b.otu_name}
else
- h[:recent] = Otu.where(project_id: project_id).order('updated_at DESC').limit(10).to_a.sort{|a,b| a.otu_name <=> b.otu_name}
- h[:quick] = Otu.pinned_by(user_id).where(pinboard_items: {project_id: project_id}).to_a.sort{|a,b| a.otu_name <=> b.otu_name}
+ h[:recent] = Otu.where(project_id:).order('updated_at DESC').limit(10).to_a.sort{|a,b| a.otu_name <=> b.otu_name}
+ h[:quick] = Otu.pinned_by(user_id).where(pinboard_items: {project_id:}).to_a.sort{|a,b| a.otu_name <=> b.otu_name}
end
h
@@ -285,12 +288,12 @@ def current_collection_objects
# @return [Boolean]
# whether or not this otu is coordinate (see coordinate_otus) with this otu
def coordinate_with?(otu_id)
- Otu.coordinate_otus(otu_id).where(otus: {id: id}).any?
+ Otu.coordinate_otus(otu_id).where(otus: {id:}).any?
end
# TODO: Deprecate for helper method, HTML does not belong here
def otu_name
- if !name.blank?
+ if name.present?
name
elsif !taxon_name_id.nil?
taxon_name.cached_html_name_and_author_year
@@ -392,10 +395,10 @@ def taxa_by_geographic_area
file_name1 = '/tmp/' + area + '_geographic_area_' + Time.now.to_i.to_s + '.csv'
file_name2 = '/tmp/' + area + '_collection_object_' + Time.now.to_i.to_s + '.csv'
c1 = GeographicArea.where(name: area).pluck(:id)
- c2 = GeographicArea.where("parent_id in (?)", c1).pluck(:id)
- c3 = GeographicArea.where("parent_id in (?)", c2).pluck(:id)
+ c2 = GeographicArea.where('parent_id in (?)', c1).pluck(:id)
+ c3 = GeographicArea.where('parent_id in (?)', c2).pluck(:id)
c = c1 + c2 + c3
- ad = AssertedDistribution.where("geographic_area_id in (?)", c)
+ ad = AssertedDistribution.where('geographic_area_id in (?)', c)
CSV.open(file_name1, 'w') do |csv|
csv << ['genus', 'species', 'geographic_area']
@@ -420,7 +423,7 @@ def taxa_by_geographic_area
end
end
- co = CollectionObject.joins(:collecting_event).where("collecting_events.geographic_area_id in (?)", c)
+ co = CollectionObject.joins(:collecting_event).where('collecting_events.geographic_area_id in (?)', c)
CSV.open(file_name2, 'w') do |csv|
csv << ['genus', 'species', 'geographic_area', 'lat', 'long']
@@ -468,7 +471,7 @@ def sv_taxon_name
def sv_duplicate_otu
unless Otu.with_taxon_name_id(taxon_name_id).with_name(name).not_self(self).with_project_id(project_id).empty?
- m = "Another OTU with an identical nomenclature (taxon name) and name exists in this project"
+ m = 'Another OTU with an identical nomenclature (taxon name) and name exists in this project'
soft_validations.add(:base, m )
end
end
diff --git a/app/models/otu_relationship.rb b/app/models/otu_relationship.rb
new file mode 100644
index 0000000000..802980378e
--- /dev/null
+++ b/app/models/otu_relationship.rb
@@ -0,0 +1,39 @@
+# TODO: controller spec refactor
+#
+#
+# An OtuRelationhip links two OTUs in a euler/rcc5 relatinship.
+#
+# # @!attribute subject_otu_id
+# @return [integer]
+# the OTU on the left side of the relationhip
+#
+# @!attribute object_otu_id
+# @return [integer]
+# the OTU on the right side of the relationhip
+#
+# @!attribute type
+# @return [String]
+# The rails STI name for the relationship type, e.g. OtuRelationship::Disjoint
+# See also http://api.checklistbank.org/vocab/taxonconceptreltype, https://github.com/tdwg/tcs2/blob/9eebd904001baab61476852bda53851317161186/master/tcs.yaml#L207
+#
+class OtuRelationship < ApplicationRecord
+ include Housekeeping
+ # include SoftValidation
+ include Shared::Citations
+ # include Shared::Identifiers
+ include Shared::Notes
+ include Shared::Tags
+ # include Shared::Depictions
+ include Shared::Confidences
+ # include Shared::OriginRelationship
+ # TODO: the conscensus names for our new things
+ # include Shared::Taxonomy
+ include Shared::IsData
+
+ belongs_to :subject_otu , class_name: 'Otu', inverse_of: :otu_relationships
+ belongs_to :object_otu , class_name: 'Otu', inverse_of: :related_otu_relationships
+
+ validates_presence_of :subject_otu
+ validates_presence_of :object_otu
+
+end
diff --git a/app/models/otu_relationship/disjoint.rb b/app/models/otu_relationship/disjoint.rb
new file mode 100644
index 0000000000..9ee09c59fb
--- /dev/null
+++ b/app/models/otu_relationship/disjoint.rb
@@ -0,0 +1,7 @@
+class OtuRelationship::Disjoint < OtuRelationship
+
+ def type_name
+ 'excludes'
+ end
+
+end
diff --git a/app/models/otu_relationship/equal.rb b/app/models/otu_relationship/equal.rb
new file mode 100644
index 0000000000..c045ece549
--- /dev/null
+++ b/app/models/otu_relationship/equal.rb
@@ -0,0 +1,7 @@
+class OtuRelationship::Equal < OtuRelationship
+
+ def type_name
+ 'equals'
+ end
+
+end
diff --git a/app/models/otu_relationship/partially_overlapping.rb b/app/models/otu_relationship/partially_overlapping.rb
new file mode 100644
index 0000000000..9607a7e5e2
--- /dev/null
+++ b/app/models/otu_relationship/partially_overlapping.rb
@@ -0,0 +1,7 @@
+class OtuRelationship::PartiallyOverlapping < OtuRelationship
+
+ def type_name
+ 'overlaps'
+ end
+
+end
diff --git a/app/models/otu_relationship/proper_part.rb b/app/models/otu_relationship/proper_part.rb
new file mode 100644
index 0000000000..0cfedef8c9
--- /dev/null
+++ b/app/models/otu_relationship/proper_part.rb
@@ -0,0 +1,7 @@
+class OtuRelationship::ProperPart < OtuRelationship
+
+ def type_name
+ 'included in'
+ end
+
+end
diff --git a/app/models/otu_relationship/proper_part_inverse.rb b/app/models/otu_relationship/proper_part_inverse.rb
new file mode 100644
index 0000000000..38e91227b8
--- /dev/null
+++ b/app/models/otu_relationship/proper_part_inverse.rb
@@ -0,0 +1,7 @@
+class OtuRelationship::ProperPartInverse < OtuRelationship
+
+ def type_name
+ 'includes'
+ end
+
+end
diff --git a/app/models/project.rb b/app/models/project.rb
index 10c2903735..f9eefadb1f 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -12,7 +12,7 @@
#
# @!attribute api_access_token
# @return [String, nil]
-# The token is not intended to be private. Generating one is akin to indicating that your project's data are public, and they will be exposed in the general API to all. The token is primarily for tracking "anonymous" use.
+# The token is not intended to be private. Generating one is akin to indicating that your project's data are public, and they will be exposed in the general API to all. The token is primarily for tracking "anonymous" use.
#
class Project < ApplicationRecord
include Housekeeping::Users
@@ -23,19 +23,19 @@ class Project < ApplicationRecord
attr_accessor :without_root_taxon_name
attr_accessor :clear_api_access_token
attr_accessor :set_new_api_access_token
-
+
# ORDER MATTERS
- # Used in `nuke` order (not available in production UI), but
+ # Used in `nuke` order (not available in production UI), but
# ultimately also for dumping records.
#
# The intent is to use `delete_all` for speed. This means
# that callbacks are *not* fired (associated destroys).
MANIFEST = %w{
- Observation
+ Observation
CitationTopic
Citation
- Note
- CharacterState
+ Note
+ CharacterState
Protocol
AlternateValue
DataAttribute
@@ -88,13 +88,14 @@ class Project < ApplicationRecord
SequenceRelationship
Extract
GeneAttribute
- ObservationMatrixColumn
+ ObservationMatrixColumn
ObservationMatrixColumnItem
ObservationMatrixRow
ObservationMatrixRowItem
ObservationMatrix
CollectionObject
Otu
+ OtuRelationship
TaxonName
Descriptor
ProjectMember
@@ -102,8 +103,8 @@ class Project < ApplicationRecord
DatasetRecordField
DatasetRecord
ImportDataset
- }
-
+ }.freeze
+
has_many :project_members, dependent: :restrict_with_error
has_many :users, through: :project_members
@@ -144,7 +145,7 @@ def annotators
begin
MANIFEST.each do |o|
klass = o.safe_constantize
-
+
end
@@ -155,7 +156,7 @@ def annotators
end
end
-
+
# !! This is not production ready.
# @return [Boolean]
@@ -184,14 +185,14 @@ def nuke
end
end
-
+
# TODO: boot load checks
def root_taxon_name
# Calling TaxonName is a hack to load the required has_many into Project,
# "has_many :taxon_names" is invoked through TaxonName within Housekeeping::Project
- # Within TaxonName closure_tree (appears to?) require a database connection.
+ # Within TaxonName closure_tree (appears to?) require a database connection.
# Since we shouldn't (can't?) initiate a connection prior to a require_dependency
# we simply load TaxonName for the first time here.
@@ -218,7 +219,7 @@ def generate_api_access_token
end
def destroy_api_access_token
- self.api_access_token = nil
+ self.api_access_token = nil
end
end
diff --git a/app/views/otu_relationships/_attributes.html.erb b/app/views/otu_relationships/_attributes.html.erb
new file mode 100644
index 0000000000..b9b180b14b
--- /dev/null
+++ b/app/views/otu_relationships/_attributes.html.erb
@@ -0,0 +1,20 @@
+
+ Subject otu:
+ <%= otu_link(@otu_relationship.subject_otu) %>
+
+
+
+ Type:
+ <%= @otu_relationship.type_name %>
+
+
+
+ Object otu:
+ <%= otu_link(@otu_relationship.object_otu) %>
+
+
+
+ Project:
+ <%= @otu_relationship.project_id %>
+
+
diff --git a/app/views/otu_relationships/_attributes.json.jbuilder b/app/views/otu_relationships/_attributes.json.jbuilder
new file mode 100644
index 0000000000..52f9b1c786
--- /dev/null
+++ b/app/views/otu_relationships/_attributes.json.jbuilder
@@ -0,0 +1,3 @@
+json.extract! otu_relationship, :id, :subject_otu_id, :type, :object_otu_id, :project_id, :created_at, :updated_at
+
+json.partial! '/shared/data/all/metadata', object: otu_relationship
diff --git a/app/views/otu_relationships/_form.html.erb b/app/views/otu_relationships/_form.html.erb
new file mode 100644
index 0000000000..3b7a456584
--- /dev/null
+++ b/app/views/otu_relationships/_form.html.erb
@@ -0,0 +1,32 @@
+<%= form_with(model: otu_relationship.metamorphosize) do |form| %>
+ <% if otu_relationship.errors.any? %>
+
+
<%= pluralize(otu_relationship.errors.count, "error") %> prohibited this otu_relationship from being saved:
+
+
+ <% otu_relationship.errors.each do |error| %>
+ <%= error.full_message %>
+ <% end %>
+
+
+ <% end %>
+
+
+ <%= form.label :subject_otu_id %>
+ <%= render '/otus/otu_picker', otu: @otu_relationship.subject_otu, field_name: 'Subject OTU', object_method: :subject_otu_id, f: form -%>
+
+
+
+ <%= form.label :type %>
+ <%= form.select :type, options: %w{OtuRelationship::Disjoint OtuRelationship::Equal OtuRelationship::ProperPartInverse OtuRelationship::ProperPart OtuRelationship::PartiallyOverlapping } %>
+
+
+
+ <%= form.label :object_otu_id %>
+ <%= render '/otus/otu_picker', otu: @otu_relationship.object_otu, field_name: 'Object OTU', object_method: :object_otu_id, f: form -%>
+
+
+
+ <%= form.submit %>
+
+<% end %>
diff --git a/app/views/otu_relationships/edit.html.erb b/app/views/otu_relationships/edit.html.erb
new file mode 100644
index 0000000000..9f41eec129
--- /dev/null
+++ b/app/views/otu_relationships/edit.html.erb
@@ -0,0 +1,6 @@
+Editing Otu Relationship
+
+<%= render 'form', otu_relationship: @otu_relationship %>
+
+<%= link_to 'Show', @otu_relationship %> |
+<%= link_to 'Back', otu_relationships_path %>
diff --git a/app/views/otu_relationships/index.json.jbuilder b/app/views/otu_relationships/index.json.jbuilder
new file mode 100644
index 0000000000..2e0f05d76f
--- /dev/null
+++ b/app/views/otu_relationships/index.json.jbuilder
@@ -0,0 +1 @@
+json.array! @otu_relationships, partial: "otu_relationships/attributes", as: :otu_relationship
diff --git a/app/views/otu_relationships/list.html.erb b/app/views/otu_relationships/list.html.erb
new file mode 100644
index 0000000000..cf6ef16417
--- /dev/null
+++ b/app/views/otu_relationships/list.html.erb
@@ -0,0 +1,25 @@
+<%= render("/shared/data/all/list/list_header", objects: @otu_relationships) -%>
+
+
+
+
+ <%= fancy_th_tag(name: 'Subject OTU') -%>
+ <%= fancy_th_tag(name: 'Type') -%>
+ <%= fancy_th_tag(name: 'Object OTU') -%>
+ <%= fancy_th_tag(name: 'Updated by', group: 'housekeeping') -%>
+ <%= fancy_th_tag(name: 'Last updated', group: 'housekeeping') -%>
+
+
+
+
+ <% @otu_relationships.each do |otu_relationship| %>
+ <%= content_tag(:tr, class: :contextMenuCells) do -%>
+ <%= otu_tag( otu_relationship.subject_otu ) %>
+ <%= otu_relationship.type_name %>
+ <%= otu_tag( otu_relationship.object_otu ) %>
+ <%= fancy_metadata_cells_tag(otu_relationship) -%>
+ <% end %>
+ <% end %>
+
+
+
diff --git a/app/views/otu_relationships/new.html.erb b/app/views/otu_relationships/new.html.erb
new file mode 100644
index 0000000000..aa82553486
--- /dev/null
+++ b/app/views/otu_relationships/new.html.erb
@@ -0,0 +1,5 @@
+New Otu Relationship
+
+<%= render 'form', otu_relationship: @otu_relationship %>
+
+<%= link_to 'Back', otu_relationships_path %>
diff --git a/app/views/otu_relationships/show.html.erb b/app/views/otu_relationships/show.html.erb
new file mode 100644
index 0000000000..496aaa00df
--- /dev/null
+++ b/app/views/otu_relationships/show.html.erb
@@ -0,0 +1 @@
+<%= render(partial: 'shared/data/project/show', locals: {object: @otu_relationship}) -%>
diff --git a/app/views/otu_relationships/show.json.jbuilder b/app/views/otu_relationships/show.json.jbuilder
new file mode 100644
index 0000000000..bf002129c1
--- /dev/null
+++ b/app/views/otu_relationships/show.json.jbuilder
@@ -0,0 +1 @@
+json.partial! "otu_relationships/attributes", otu_relationship: @otu_relationship
diff --git a/app/views/otus/_attributes.json.jbuilder b/app/views/otus/_attributes.json.jbuilder
index 33798ddb63..d6c793f1bf 100644
--- a/app/views/otus/_attributes.json.jbuilder
+++ b/app/views/otus/_attributes.json.jbuilder
@@ -5,4 +5,4 @@ if extend_response_with('taxonomy')
json.taxonomy do
json.merge! otu.taxonomy
end
-end
\ No newline at end of file
+end
diff --git a/config/interface/hub/data.yml b/config/interface/hub/data.yml
index fb558ff406..db40115fb2 100644
--- a/config/interface/hub/data.yml
+++ b/config/interface/hub/data.yml
@@ -5,7 +5,7 @@
# status - one of [complete, stable, prototype, unknown (default) ] (see user_tasks.yml)
# categories - an array of one or more of [CollectingEvent, CollectionObject, Source, TaxonName]
# hide - default false
-# description -
+# description -
# related_models - an array of similar models
#
# See lib/hub/data.rb for integration (or CONFIG_DATA)
@@ -28,11 +28,11 @@ Core: # a Section
- TaxonNameRelationship
CollectingEvent:
status: :prototype
- categories:
+ categories:
- collecting_event
related_models:
- Georeference
- CollectionObject:
+ CollectionObject:
status: :stable
categories:
- collection_object
@@ -42,14 +42,14 @@ Core: # a Section
- TaxonDetermination
- Repository
Descriptor:
- categories:
+ categories:
- matrix
- dna
- related_models:
+ related_models:
- ObservationMatrix
status: :prototype
Observation:
- categories:
+ categories:
- matrix
- collection_object
related_models:
@@ -64,7 +64,7 @@ Core: # a Section
status: :stable
shared: true
categories:
- - source
+ - source
related_models:
- Serial
- People
@@ -72,14 +72,14 @@ Core: # a Section
status: :stable
related_models:
- Source
- - Person
+ - Person
categories:
- source
BiologicalAssociation:
status: :prototype
related_models:
- BiologicalRelationship
- categories:
+ categories:
- biology
Sequence:
status: :prototype
@@ -91,12 +91,12 @@ Supporting:
AssertedDistribution:
status: :prototype
categories:
- - source
+ - source
BiologicalAssociationsGraph:
status: :prototype
related_models:
- Source
- categories:
+ categories:
- biology
BiologicalRelationship:
status: :prototype
@@ -110,7 +110,7 @@ Supporting:
- matrix
CollectionProfile:
status: :prototype
- categories:
+ categories:
- collection_object
CollectionObjectObservation:
status: :prototype
@@ -147,7 +147,7 @@ Supporting:
Documentation:
status: :prototype
related_models:
- - Document
+ - Document
ImportDataset:
status: :stable
Depiction:
@@ -163,7 +163,7 @@ Supporting:
status: :prototype
related_models:
- BiologicalRelationship
- categories:
+ categories:
- biology
- dna
GeneAttribute:
@@ -177,7 +177,7 @@ Supporting:
Georeference:
status: :prototype
categories:
- - collecting_event
+ - collecting_event
GeographicArea:
status: :stable
shared: true
@@ -224,18 +224,18 @@ Supporting:
- Loan
- CollectionObject
- Otu
- ObservationMatrixColumn:
- categories:
+ ObservationMatrixColumn:
+ categories:
- matrix
- related_models:
+ related_models:
- ObservationMatrix
- Descriptor
status: :prototype
hide: true
- ObservationMatrixColumnItem:
- categories:
+ ObservationMatrixColumnItem:
+ categories:
- matrix
- related_models:
+ related_models:
- ObservationMatrix
- Descriptor
status: :prototype
@@ -251,7 +251,7 @@ Supporting:
categories:
- matrix
related_models:
- - ObservationMatrix
+ - ObservationMatrix
OriginRelationship:
catgories:
- collection_object
@@ -264,6 +264,12 @@ Supporting:
status: :prototype
related_models:
- ControlledVocabularyTerm
+ OtuRelationship:
+ status: :prototype
+ categories:
+ - biology
+ related_models:
+ - Otu
Organization:
status: :stable
shared: true
@@ -301,9 +307,9 @@ Supporting:
- CollectingObject
Serial:
status: :prototype
- shared: true
+ shared: true
categories:
- - source
+ - source
related_models:
- Source
- Person
@@ -318,26 +324,26 @@ Supporting:
categories:
- collection_object
related_models:
- - Otu
+ - Otu
- CollectionObject
TaxonNameClassification:
status: :stable
categories:
- - nomenclature
+ - nomenclature
related_models:
- TaxonName
- TaxonNameRelationship
TaxonNameRelationship:
status: :stable
categories:
- - nomenclature
+ - nomenclature
related_model:
- TaxonName
- TaxonNameClassification
TypeMaterial:
status: :prototype
categories:
- - nomenclature
+ - nomenclature
- collection_object
Annotations:
Attribution:
@@ -347,7 +353,7 @@ Annotations:
Citation:
status: :stable
categories:
- - source
+ - source
Confidence:
status: prototype
DataAttribute:
diff --git a/config/routes.rb b/config/routes.rb
index 48dce6577e..6186fd9ec2 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -3,7 +3,7 @@
# See initializer config/initializers/routing_draw.rb
-# Routes are moved to config/routes.
+# Routes are moved to config/routes.
TaxonWorks::Application.routes.draw do
draw :base
draw :data
diff --git a/config/routes/data.rb b/config/routes/data.rb
index 1e2013d78b..40de8991fe 100644
--- a/config/routes/data.rb
+++ b/config/routes/data.rb
@@ -502,7 +502,7 @@
end
resources :otus do
- concerns [:data_routes ]
+ concerns [:data_routes]
resources :biological_associations, shallow: true, only: [:index], defaults: {format: :json}
resources :asserted_distributions, shallow: true, only: [:index], defaults: {format: :json}
resources :common_names, shallow: true, only: [:index], defaults: {format: :json}
@@ -550,6 +550,13 @@
end
end
+resources :otu_relationships do
+ collection do
+ get :list
+ end
+ concerns [:data_routes]
+end
+
resources :organizations do
collection do
get :autocomplete, defaults: {format: :json}
diff --git a/db/migrate/20230509185624_create_otu_relationships.rb b/db/migrate/20230509185624_create_otu_relationships.rb
new file mode 100644
index 0000000000..3d7a2ebd24
--- /dev/null
+++ b/db/migrate/20230509185624_create_otu_relationships.rb
@@ -0,0 +1,23 @@
+class CreateOtuRelationships < ActiveRecord::Migration[6.1]
+ def change
+ create_table :otu_relationships do |t|
+ t.integer :subject_otu_id, null: false, index: true
+ t.string :type, null: false
+ t.integer :object_otu_id, null: false, index: true
+ t.references :project, foreign_key: true
+
+ t.integer :created_by_id, null: false, index: true
+ t.integer :updated_by_id, null: false, index: true
+
+ t.timestamps
+ end
+
+ add_foreign_key :otu_relationships, :otus, column: :subject_otu_id, primary_key: :id
+ add_foreign_key :otu_relationships, :otus, column: :object_otu_id, primary_key: :id
+
+ add_foreign_key :otu_relationships, :users, column: :created_by_id, primary_key: :id
+ add_foreign_key :otu_relationships, :users, column: :updated_by_id, primary_key: :id
+
+
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 823ab918b1..267b96f1bd 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,13 +10,14 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 2023_03_07_041322) do
+ActiveRecord::Schema.define(version: 2023_05_09_185624) do
# These are extensions that must be enabled in order to support this database
enable_extension "fuzzystrmatch"
enable_extension "hstore"
enable_extension "plpgsql"
enable_extension "postgis"
+ enable_extension "postgis_raster"
enable_extension "tablefunc"
create_table "alternate_values", id: :serial, force: :cascade do |t|
@@ -171,6 +172,58 @@
t.index ["updated_by_id"], name: "bio_rel_updated_by"
end
+ create_table "cached_map_item_translations", force: :cascade do |t|
+ t.bigint "geographic_item_id"
+ t.bigint "translated_geographic_item_id"
+ t.string "cached_map_type"
+ t.datetime "created_at", precision: 6, null: false
+ t.datetime "updated_at", precision: 6, null: false
+ t.index ["cached_map_type"], name: "cmgit_cmt"
+ t.index ["geographic_item_id", "translated_geographic_item_id", "cached_map_type"], name: "cmgit_translation", unique: true
+ t.index ["geographic_item_id"], name: "cmgit_gi"
+ t.index ["translated_geographic_item_id"], name: "cmgit_tgi"
+ end
+
+ create_table "cached_map_items", force: :cascade do |t|
+ t.bigint "otu_id", null: false
+ t.bigint "geographic_item_id", null: false
+ t.string "type"
+ t.integer "reference_count"
+ t.boolean "is_absent"
+ t.string "level0_geographic_name"
+ t.string "level1_geographic_name"
+ t.string "level2_geographic_name"
+ t.bigint "project_id"
+ t.datetime "created_at", precision: 6, null: false
+ t.datetime "updated_at", precision: 6, null: false
+ t.boolean "untranslated"
+ t.index ["geographic_item_id"], name: "index_cached_map_items_on_geographic_item_id"
+ t.index ["otu_id", "geographic_item_id"], name: "index_cached_map_items_on_otu_id_and_geographic_item_id"
+ t.index ["otu_id"], name: "index_cached_map_items_on_otu_id"
+ t.index ["project_id"], name: "index_cached_map_items_on_project_id"
+ end
+
+ create_table "cached_map_registers", force: :cascade do |t|
+ t.string "cached_map_register_object_type"
+ t.bigint "cached_map_register_object_id"
+ t.bigint "project_id"
+ t.datetime "created_at", precision: 6, null: false
+ t.datetime "updated_at", precision: 6, null: false
+ t.index ["cached_map_register_object_type", "cached_map_register_object_id"], name: "index_cached_map_registers_on_cached_map_register_object"
+ t.index ["project_id"], name: "index_cached_map_registers_on_project_id"
+ end
+
+ create_table "cached_maps", force: :cascade do |t|
+ t.bigint "otu_id", null: false
+ t.geography "geometry", limit: {:srid=>4326, :type=>"geometry", :geographic=>true}
+ t.integer "reference_count"
+ t.bigint "project_id", null: false
+ t.datetime "created_at", precision: 6, null: false
+ t.datetime "updated_at", precision: 6, null: false
+ t.index ["otu_id"], name: "index_cached_maps_on_otu_id"
+ t.index ["project_id"], name: "index_cached_maps_on_project_id"
+ end
+
create_table "character_states", id: :serial, force: :cascade do |t|
t.string "name", null: false
t.string "label", null: false
@@ -380,8 +433,8 @@
end
create_table "confidences", id: :serial, force: :cascade do |t|
- t.string "confidence_object_type", null: false
t.integer "confidence_object_id", null: false
+ t.string "confidence_object_type", null: false
t.integer "position", null: false
t.integer "created_by_id", null: false
t.integer "updated_by_id", null: false
@@ -613,8 +666,8 @@
end
create_table "documentation", id: :serial, force: :cascade do |t|
- t.string "documentation_object_type", null: false
t.integer "documentation_object_id", null: false
+ t.string "documentation_object_type", null: false
t.integer "document_id", null: false
t.integer "project_id", null: false
t.integer "created_by_id", null: false
@@ -632,7 +685,7 @@
create_table "documents", id: :serial, force: :cascade do |t|
t.string "document_file_file_name", null: false
t.string "document_file_content_type", null: false
- t.bigint "document_file_file_size", null: false
+ t.integer "document_file_file_size", null: false
t.datetime "document_file_updated_at", null: false
t.integer "project_id", null: false
t.integer "created_by_id", null: false
@@ -841,8 +894,8 @@
t.string "vernacularName"
t.string "waterBody"
t.string "year"
- t.string "dwc_occurrence_object_type"
t.integer "dwc_occurrence_object_id"
+ t.string "dwc_occurrence_object_type"
t.integer "created_by_id", null: false
t.integer "updated_by_id", null: false
t.integer "project_id"
@@ -1041,7 +1094,7 @@
t.datetime "updated_at", null: false
t.string "image_file_file_name"
t.string "image_file_content_type"
- t.bigint "image_file_file_size"
+ t.integer "image_file_file_size"
t.datetime "image_file_updated_at"
t.integer "updated_by_id", null: false
t.text "image_file_meta"
@@ -1122,8 +1175,8 @@
t.integer "project_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
- t.string "loan_item_object_type"
t.integer "loan_item_object_id"
+ t.string "loan_item_object_type"
t.integer "total"
t.string "disposition"
t.index ["created_by_id"], name: "index_loan_items_on_created_by_id"
@@ -1152,7 +1205,7 @@
t.datetime "updated_at", null: false
t.string "recipient_honorific"
t.string "recipient_country"
- t.text "lender_address", null: false
+ t.text "lender_address", default: "Lender's address not provided.", null: false
t.boolean "is_gift"
t.index ["created_by_id"], name: "index_loans_on_created_by_id"
t.index ["project_id"], name: "index_loans_on_project_id"
@@ -1348,10 +1401,10 @@
end
create_table "origin_relationships", id: :serial, force: :cascade do |t|
- t.string "old_object_type", null: false
t.integer "old_object_id", null: false
- t.string "new_object_type", null: false
+ t.string "old_object_type", null: false
t.integer "new_object_id", null: false
+ t.string "new_object_type", null: false
t.integer "position"
t.integer "created_by_id", null: false
t.integer "updated_by_id", null: false
@@ -1397,6 +1450,22 @@
t.index ["updated_by_id"], name: "index_otu_page_layouts_on_updated_by_id"
end
+ create_table "otu_relationships", force: :cascade do |t|
+ t.integer "subject_otu_id", null: false
+ t.string "type", null: false
+ t.integer "object_otu_id", null: false
+ t.bigint "project_id"
+ t.integer "created_by_id", null: false
+ t.integer "updated_by_id", null: false
+ t.datetime "created_at", precision: 6, null: false
+ t.datetime "updated_at", precision: 6, null: false
+ t.index ["created_by_id"], name: "index_otu_relationships_on_created_by_id"
+ t.index ["object_otu_id"], name: "index_otu_relationships_on_object_otu_id"
+ t.index ["project_id"], name: "index_otu_relationships_on_project_id"
+ t.index ["subject_otu_id"], name: "index_otu_relationships_on_subject_otu_id"
+ t.index ["updated_by_id"], name: "index_otu_relationships_on_updated_by_id"
+ end
+
create_table "otus", id: :serial, force: :cascade do |t|
t.string "name"
t.datetime "created_at", null: false
@@ -1435,8 +1504,8 @@
end
create_table "pinboard_items", id: :serial, force: :cascade do |t|
- t.string "pinned_object_type", null: false
t.integer "pinned_object_id", null: false
+ t.string "pinned_object_type", null: false
t.integer "user_id", null: false
t.integer "project_id", null: false
t.integer "position", null: false
@@ -1500,7 +1569,7 @@
t.datetime "updated_at", null: false
t.integer "created_by_id", null: false
t.integer "updated_by_id", null: false
- t.jsonb "preferences", default: "{}", null: false
+ t.jsonb "preferences", default: {}, null: false
t.string "api_access_token"
t.index ["created_by_id"], name: "index_projects_on_created_by_id"
t.index ["updated_by_id"], name: "index_projects_on_updated_by_id"
@@ -1508,8 +1577,8 @@
create_table "protocol_relationships", id: :serial, force: :cascade do |t|
t.integer "protocol_id", null: false
- t.string "protocol_relationship_object_type", null: false
t.integer "protocol_relationship_object_id", null: false
+ t.string "protocol_relationship_object_type", null: false
t.integer "position", null: false
t.integer "created_by_id", null: false
t.integer "updated_by_id", null: false
@@ -1767,8 +1836,8 @@
t.string "boundary_finder", null: false
t.boolean "has_border", null: false
t.string "layout", null: false
- t.jsonb "metadata_map", default: "{}", null: false
- t.jsonb "specimen_coordinates", default: "{}", null: false
+ t.jsonb "metadata_map", default: {}, null: false
+ t.jsonb "specimen_coordinates", default: {}, null: false
t.integer "project_id", null: false
t.integer "created_by_id", null: false
t.integer "updated_by_id", null: false
@@ -2053,6 +2122,9 @@
add_foreign_key "biological_relationships", "projects", name: "biological_relationships_project_id_fkey"
add_foreign_key "biological_relationships", "users", column: "created_by_id", name: "biological_relationships_created_by_id_fkey"
add_foreign_key "biological_relationships", "users", column: "updated_by_id", name: "biological_relationships_updated_by_id_fkey"
+ add_foreign_key "cached_map_item_translations", "geographic_items"
+ add_foreign_key "cached_map_item_translations", "geographic_items", column: "translated_geographic_item_id"
+ add_foreign_key "cached_map_registers", "projects"
add_foreign_key "character_states", "descriptors"
add_foreign_key "character_states", "projects"
add_foreign_key "character_states", "users", column: "created_by_id"
@@ -2230,6 +2302,11 @@
add_foreign_key "otu_page_layouts", "projects", name: "otu_page_layouts_project_id_fkey"
add_foreign_key "otu_page_layouts", "users", column: "created_by_id", name: "otu_page_layouts_created_by_id_fkey"
add_foreign_key "otu_page_layouts", "users", column: "updated_by_id", name: "otu_page_layouts_updated_by_id_fkey"
+ add_foreign_key "otu_relationships", "otus", column: "object_otu_id"
+ add_foreign_key "otu_relationships", "otus", column: "subject_otu_id"
+ add_foreign_key "otu_relationships", "projects"
+ add_foreign_key "otu_relationships", "users", column: "created_by_id"
+ add_foreign_key "otu_relationships", "users", column: "updated_by_id"
add_foreign_key "otus", "projects", name: "otus_project_id_fkey"
add_foreign_key "otus", "taxon_names", name: "otus_taxon_name_id_fkey"
add_foreign_key "otus", "users", column: "created_by_id", name: "otus_created_by_id_fkey"
diff --git a/spec/controllers/otus_controller_spec.rb b/spec/controllers/otus_controller_spec.rb
index b67d204b90..8ca29ed070 100644
--- a/spec/controllers/otus_controller_spec.rb
+++ b/spec/controllers/otus_controller_spec.rb
@@ -28,7 +28,6 @@
# adjust the attributes here as well.
let(:valid_attributes) { strip_housekeeping_attributes(FactoryBot.build(:valid_otu).attributes) }
-
# This should return the minimal set of values that should be in the session
# in order to pass any filters (e.g. authentication) defined in
# OtusController. Be sure to keep this updated too.
diff --git a/spec/factories/otu_relationships.rb b/spec/factories/otu_relationships.rb
new file mode 100644
index 0000000000..842b0af0ee
--- /dev/null
+++ b/spec/factories/otu_relationships.rb
@@ -0,0 +1,7 @@
+FactoryBot.define do
+ factory :valid_otu_relationship, class: 'OtuRelationship' do
+ association :subject_otu, factory: :valid_otu
+ type { 'OtuRelationship::Disjoint' }
+ association :object_otu, factory: :valid_otu
+ end
+end
diff --git a/spec/models/otu_relationship_spec.rb b/spec/models/otu_relationship_spec.rb
new file mode 100644
index 0000000000..a2938576db
--- /dev/null
+++ b/spec/models/otu_relationship_spec.rb
@@ -0,0 +1,14 @@
+require 'rails_helper'
+
+describe OtuRelationship, type: :model, group: :otu do
+
+ let(:otu_relationship) { OtuRelationship.new }
+
+ specify 'subject_otu is requred' do
+ otu_relationship.valid?
+ expect(otu_relationship.errors.messages.include?(:subject_otu)).to be_truthy
+ end
+
+end
+
+
diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb
index 8713b647c7..e206858a6e 100644
--- a/spec/rails_helper.rb
+++ b/spec/rails_helper.rb
@@ -26,3 +26,4 @@
ApplicationRecord.connection.tables.each { |t| ApplicationRecord.connection.reset_pk_sequence!(t) }
FactoryBot.use_parent_strategy = false
+
diff --git a/spec/routing/otu_relationships_routing_spec.rb b/spec/routing/otu_relationships_routing_spec.rb
new file mode 100644
index 0000000000..962b15df0c
--- /dev/null
+++ b/spec/routing/otu_relationships_routing_spec.rb
@@ -0,0 +1,38 @@
+require "rails_helper"
+
+RSpec.describe OtuRelationshipsController, type: :routing do
+ describe "routing" do
+ it "routes to #index" do
+ expect(get: "/otu_relationships").to route_to("otu_relationships#index")
+ end
+
+ it "routes to #new" do
+ expect(get: "/otu_relationships/new").to route_to("otu_relationships#new")
+ end
+
+ it "routes to #show" do
+ expect(get: "/otu_relationships/1").to route_to("otu_relationships#show", id: "1")
+ end
+
+ it "routes to #edit" do
+ expect(get: "/otu_relationships/1/edit").to route_to("otu_relationships#edit", id: "1")
+ end
+
+
+ it "routes to #create" do
+ expect(post: "/otu_relationships").to route_to("otu_relationships#create")
+ end
+
+ it "routes to #update via PUT" do
+ expect(put: "/otu_relationships/1").to route_to("otu_relationships#update", id: "1")
+ end
+
+ it "routes to #update via PATCH" do
+ expect(patch: "/otu_relationships/1").to route_to("otu_relationships#update", id: "1")
+ end
+
+ it "routes to #destroy" do
+ expect(delete: "/otu_relationships/1").to route_to("otu_relationships#destroy", id: "1")
+ end
+ end
+end
From 845f7153097f4eb5be9d3e67f9d61e2f4c0cf2f5 Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Wed, 10 May 2023 14:44:38 -0300
Subject: [PATCH 06/88] Fix includes facet in filter images
---
CHANGELOG.md | 1 +
.../vue/components/Filter/Facets/Otu/components/Includes.vue | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6acafa77e7..d23e67d3cc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,7 @@ This project does not yet adheres to [Semantic Versioning](https://semv
### Fixed
- BibTeX typo [#3408]
+- Includes `type material` and `type material observations` don't work in Filter images
[#3408]: https://github.com/SpeciesFileGroup/taxonworks/issues/3408
diff --git a/app/javascript/vue/components/Filter/Facets/Otu/components/Includes.vue b/app/javascript/vue/components/Filter/Facets/Otu/components/Includes.vue
index c0cc2d9e51..7e749be98d 100644
--- a/app/javascript/vue/components/Filter/Facets/Otu/components/Includes.vue
+++ b/app/javascript/vue/components/Filter/Facets/Otu/components/Includes.vue
@@ -36,8 +36,8 @@ const includes = [
'collection_objects',
'collection_object_observations',
'otu_observations',
- 'type_materials',
- 'type_material_observation'
+ 'type_material',
+ 'type_material_observations'
]
const params = computed({
From 777117fa58ca11dc2c5dca9fd2e714426f8fb371 Mon Sep 17 00:00:00 2001
From: Dmitry Dmitriev
Date: Wed, 10 May 2023 15:22:17 -0500
Subject: [PATCH 07/88] recent languages
---
CHANGELOG.md | 3 +++
app/models/language.rb | 39 ++++++++++++++----------------
app/models/predicate.rb | 17 +++++++------
lib/queries/person/autocomplete.rb | 5 ++--
4 files changed, 33 insertions(+), 31 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d23e67d3cc..e48c6b5412 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -717,6 +717,9 @@ This project does not yet adheres to [Semantic Versioning](https://semv
### Changed
+- Recent predicate list
+- Recent languages list
+- People autocomplete
- Remove search box in observation matrix hub [#3032]
- Type material form allows multiple type species in comprehensive task. [#2584]
- Updated Ruby gems.
diff --git a/app/models/language.rb b/app/models/language.rb
index d4861887b3..a87b5808c6 100644
--- a/app/models/language.rb
+++ b/app/models/language.rb
@@ -29,10 +29,11 @@ class Language < ApplicationRecord
has_many :alternate_value_translations, class_name: 'AlternateValue::Translation'
scope :used_recently_on_sources, -> { joins(sources: [:project_sources]).includes(sources: [:project_sources]).where(sources: { updated_at: 10.weeks.ago..Time.now } ).order('"sources"."updated_at" DESC') }
-
-
- # TODO: dry
+
+
+ # TODO: dry
scope :used_recently_on_serials, -> { joins(:serials).includes(:serials).where(serials: { updated_at: 10.weeks.ago..Time.now } ).order('"serials"."updated_at" DESC') }
+ scope :used_recently_on_common_names, -> { joins(:common_names).includes(:common_names).where(common_names: { updated_at: 10.weeks.ago..Time.now } ).order('"serials"."updated_at" DESC') }
scope :used_recently_on_alternate_values, -> { joins(:alternate_value_translations).includes(:alternate_value_translations).where(alternate_values: { updated_at: 10.weeks.ago..Time.now } ).order('"alternate_values"."updated_at" DESC') }
scope :with_english_name_containing, ->(name) {where('english_name ILIKE ?', "%#{name}%")} # non-case sensitive comparison
@@ -57,26 +58,22 @@ def self.find_for_autocomplete(params)
# @param klass ['Source' || 'Serial']
def self.select_optimized(user_id, project_id, klass = 'Source')
- recent = if klass == 'Source'
- Language.used_recently_on_sources.where('project_sources.project_id = ? AND sources.updated_by_id = ?', project_id, user_id).distinct.limit(10)
- elsif klass == 'Serial'
- Language.used_recently_on_serials.where('serials.updated_by_id = ?', user_id).distinct.limit(10).to_a
- end
+ language_ids = case klass
+ when 'Source'
+ Language.used_recently_on_sources.where('project_sources.project_id = ? AND sources.updated_by_id = ?', project_id, user_id).pluck(:id).uniq
+ when 'Serial'
+ Language.used_recently_on_serials.where('serials.updated_by_id = ?', user_id).pluck(:id).uniq
+ when 'AlternateValue'
+ Language.used_recently_on_alternate_values.where('alternate_values.updated_by_id = ?', user_id).pluck(:id).uniq
+ when 'CommonNames'
+ Language.used_recently_on_alternate_values.where('alternate_values.updated_by_id = ?', user_id).pluck(:id).uniq
+ end
+
h = {
- recent: recent,
- pinboard: Language.pinned_by(user_id).pinned_in_project(project_id).to_a
+ recent: Language.where(id: language_ids.first(10)).order(:english_name).to_a,
+ pinboard: Language.pinned_by(user_id).pinned_in_project(project_id).to_a,
+ quick: (Language.pinned_by(user_id).pinboard_inserted.pinned_in_project(project_id).to_a + Language.where(id: language_ids.first(4)).order(:english_name).to_a).uniq
}
-
- quick = if klass == 'Source'
- Language.used_recently_on_sources.where('project_sources.project_id = ? AND sources.updated_by_id = ?', project_id, user_id).distinct.limit(4)
- elsif klass == 'Serial'
- Language.used_recently_on_serials.where('serials.updated_by_id = ?', user_id).distinct.limit(4).to_a
- elsif klass == 'AlternateValue'
- Language.used_recently_on_alternate_values.where('alternate_values.updated_by_id = ?', user_id).distinct.limit(4).to_a
- end
-
- h[:quick] = (Language.pinned_by(user_id).pinboard_inserted.pinned_in_project(project_id).to_a + quick).uniq
h
end
-
end
diff --git a/app/models/predicate.rb b/app/models/predicate.rb
index 721a261767..8ce997a428 100644
--- a/app/models/predicate.rb
+++ b/app/models/predicate.rb
@@ -7,22 +7,23 @@ class Predicate < ControlledVocabularyTerm
# @return [Scope]
# the max 10 most recently used predicates
def self.used_recently(user_id, project_id, klass)
- i = InternalAttribute.arel_table
+ t = InternalAttribute.arel_table
p = Predicate.arel_table
# i is a select manager
- i = i.project(i['controlled_vocabulary_term_id'], i['updated_at']).from(i)
- .where(i['updated_at'].gt( 10.weeks.ago ))
- .where(i['updated_by_id'].eq(user_id))
- .where(i['project_id'].eq(project_id))
- .order(i['updated_at'].desc)
+ i = t.project(t['controlled_vocabulary_term_id'], t['updated_at']).from(t)
+ .where(t['updated_at'].gt( 10.weeks.ago ))
+ .where(t['updated_by_id'].eq(user_id))
+ .where(t['attribute_subject_type'].eq(klass))
+ .where(t['project_id'].eq(project_id))
+ .order(t['updated_at'].desc)
# z is a table alias
z = i.as('recent_t')
- Predicate.used_on_klass(klass).joins(
+ Predicate.joins(
Arel::Nodes::InnerJoin.new(z, Arel::Nodes::On.new(z['controlled_vocabulary_term_id'].eq(p['id'])))
- ).select('distinct controlled_vocabulary_terms.id').pluck(:id)
+ ).pluck(:id).uniq
end
def self.select_optimized(user_id, project_id, klass)
diff --git a/lib/queries/person/autocomplete.rb b/lib/queries/person/autocomplete.rb
index 3fd704b0c3..2f422f8afd 100644
--- a/lib/queries/person/autocomplete.rb
+++ b/lib/queries/person/autocomplete.rb
@@ -134,10 +134,11 @@ def autocomplete
a = a.left_outer_joins(:roles)
.joins("LEFT OUTER JOIN sources ON roles.role_object_id = sources.id AND roles.role_object_type = 'Source'")
.joins('LEFT OUTER JOIN project_sources ON sources.id = project_sources.source_id')
- .select("people.*, COUNT(roles.id) AS use_count, CASE WHEN MAX(roles.project_id) IN (#{pr_id}) THEN MAX(roles.project_id) ELSE MAX(project_sources.project_id) END AS in_project")
- .where("roles.project_id IN (#{pr_id}) OR project_sources.project_id IN (#{pr_id}) OR (roles.project_id NOT IN (#{pr_id}) AND project_sources.project_id NOT IN (#{pr_id})) OR (roles.project_id IS NULL AND project_sources.project_id IS NULL)")
+ .select("people.*, COUNT(roles.id) AS use_count, CASE WHEN MAX(roles.project_id) IN (#{pr_id}) THEN MAX(roles.project_id) WHEN MAX(project_sources.project_id) IN (#{pr_id}) THEN MAX(project_sources.project_id) ELSE NULL END AS in_project")
+ .where("roles.project_id IN (#{pr_id}) OR project_sources.project_id IN (#{pr_id}) OR (roles.project_id NOT IN (#{pr_id}) AND (project_sources.project_id NOT IN (#{pr_id}) or project_sources.project_id IS NULL)) OR ((roles.project_id NOT IN (#{pr_id}) OR roles.project_id IS NULL) AND project_sources.project_id NOT IN (#{pr_id})) OR (roles.project_id IS NULL AND project_sources.project_id IS NULL)")
.group('people.id')
.order('in_project, use_count DESC')
+ # .where("roles.project_id IN (#{pr_id}) OR project_sources.project_id IN (#{pr_id}) OR (roles.project_id NOT IN (#{pr_id}) AND project_sources.project_id NOT IN (#{pr_id})) OR (roles.project_id IS NULL AND project_sources.project_id IS NULL)")
end
end
From 5ce20eaf53806ef55307762dd7012398c03c843b Mon Sep 17 00:00:00 2001
From: Dmitry Dmitriev
Date: Wed, 10 May 2023 15:58:40 -0500
Subject: [PATCH 08/88] recent languages
---
CHANGELOG.md | 2 +-
lib/queries/person/autocomplete.rb | 13 +++++++++----
lib/queries/repository/autocomplete.rb | 1 -
lib/queries/serial/autocomplete.rb | 1 -
lib/queries/source/autocomplete.rb | 1 -
5 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e48c6b5412..e106b964f4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -722,7 +722,7 @@ This project does not yet adheres to [Semantic Versioning](https://semv
- People autocomplete
- Remove search box in observation matrix hub [#3032]
- Type material form allows multiple type species in comprehensive task. [#2584]
-- Updated Ruby gems.
+- Updated Ruby gems.Yes
- wikidata-client dependency is now fetching from RubyGems rather than custom fork.
- serrano has been changed to a new custom branch which is identical to official gem except `thor` dependency has been downgraded for TW compatibility.
- DwC occurrences importer mappings are not sorted by `institutionCode`:`collectionCode`
diff --git a/lib/queries/person/autocomplete.rb b/lib/queries/person/autocomplete.rb
index 2f422f8afd..e8b45d49c6 100644
--- a/lib/queries/person/autocomplete.rb
+++ b/lib/queries/person/autocomplete.rb
@@ -134,11 +134,16 @@ def autocomplete
a = a.left_outer_joins(:roles)
.joins("LEFT OUTER JOIN sources ON roles.role_object_id = sources.id AND roles.role_object_type = 'Source'")
.joins('LEFT OUTER JOIN project_sources ON sources.id = project_sources.source_id')
- .select("people.*, COUNT(roles.id) AS use_count, CASE WHEN MAX(roles.project_id) IN (#{pr_id}) THEN MAX(roles.project_id) WHEN MAX(project_sources.project_id) IN (#{pr_id}) THEN MAX(project_sources.project_id) ELSE NULL END AS in_project")
- .where("roles.project_id IN (#{pr_id}) OR project_sources.project_id IN (#{pr_id}) OR (roles.project_id NOT IN (#{pr_id}) AND (project_sources.project_id NOT IN (#{pr_id}) or project_sources.project_id IS NULL)) OR ((roles.project_id NOT IN (#{pr_id}) OR roles.project_id IS NULL) AND project_sources.project_id NOT IN (#{pr_id})) OR (roles.project_id IS NULL AND project_sources.project_id IS NULL)")
- .group('people.id')
+ .select("people.*, COUNT(roles.id) AS use_count, CASE WHEN roles.project_id IN (#{pr_id}) THEN roles.project_id WHEN project_sources.project_id IN (#{pr_id}) THEN project_sources.project_id ELSE NULL END AS in_project")
+ .group('people.id, roles.project_id, project_sources.project_id')
.order('in_project, use_count DESC')
- # .where("roles.project_id IN (#{pr_id}) OR project_sources.project_id IN (#{pr_id}) OR (roles.project_id NOT IN (#{pr_id}) AND project_sources.project_id NOT IN (#{pr_id})) OR (roles.project_id IS NULL AND project_sources.project_id IS NULL)")
+ #a = a.left_outer_joins(:roles)
+ # .joins("LEFT OUTER JOIN sources ON roles.role_object_id = sources.id AND roles.role_object_type = 'Source'")
+ # .joins('LEFT OUTER JOIN project_sources ON sources.id = project_sources.source_id')
+ # .select("people.*, COUNT(roles.id) AS use_count, CASE WHEN MAX(roles.project_id) IN (#{pr_id}) THEN MAX(roles.project_id) WHEN MAX(project_sources.project_id) IN (#{pr_id}) THEN MAX(project_sources.project_id) ELSE NULL END AS in_project")
+ # .where("roles.project_id IN (#{pr_id}) OR project_sources.project_id IN (#{pr_id}) OR ( (roles.project_id NOT IN (#{pr_id}) OR roles.project_id IS NULL) AND (project_sources.project_id NOT IN (#{pr_id}) OR project_sources.project_id IS NULL))")
+ # .group('people.id')
+ # .order('in_project, use_count DESC')
end
end
diff --git a/lib/queries/repository/autocomplete.rb b/lib/queries/repository/autocomplete.rb
index d5ad483394..071100f1ba 100644
--- a/lib/queries/repository/autocomplete.rb
+++ b/lib/queries/repository/autocomplete.rb
@@ -58,7 +58,6 @@ def autocomplete
if project_id && scope
a = a.select("repositories.*, COUNT(collection_objects.id) AS use_count, CASE WHEN collection_objects.project_id IN (#{pr_id}) THEN collection_objects.project_id ELSE NULL END AS in_project")
.joins('LEFT OUTER JOIN collection_objects ON (repositories.id = collection_objects.repository_id OR repositories.id = collection_objects.current_repository_id)')
- .where("collection_objects.project_id IN (#{pr_id}) OR collection_objects.project_id NOT IN (#{pr_id}) OR collection_objects.project_id IS NULL")
.group('repositories.id, collection_objects.project_id')
.order('in_project, use_count DESC')
end
diff --git a/lib/queries/serial/autocomplete.rb b/lib/queries/serial/autocomplete.rb
index f3187958d7..ebdc136f7f 100644
--- a/lib/queries/serial/autocomplete.rb
+++ b/lib/queries/serial/autocomplete.rb
@@ -41,7 +41,6 @@ def autocomplete
a = a.select("serials.*, COUNT(project_sources.source_id) AS use_count, CASE WHEN project_sources.project_id IN (#{pr_id}) THEN project_sources.project_id ELSE NULL END AS in_project")
.left_outer_joins(:sources)
.joins('LEFT OUTER JOIN project_sources ON sources.id = project_sources.source_id')
- .where("project_sources.project_id IN (#{pr_id}) OR project_sources.project_id NOT IN (#{pr_id}) OR project_sources.project_id IS NULL")
.group('serials.id, project_sources.project_id')
.order('in_project, use_count DESC')
end
diff --git a/lib/queries/source/autocomplete.rb b/lib/queries/source/autocomplete.rb
index 83fa4e4615..3f2cc82364 100644
--- a/lib/queries/source/autocomplete.rb
+++ b/lib/queries/source/autocomplete.rb
@@ -237,7 +237,6 @@ def autocomplete
.left_outer_joins(:project_sources)
.select("sources.*, COUNT(citations.id) AS use_count, CASE WHEN project_sources.project_id IN (#{pr_id}) THEN project_sources.project_id ELSE NULL END AS in_project")
.where('citations.project_id IN (?) OR citations.project_id NOT IN (?) OR citations.project_id IS NULL', pr_id, pr_id)
- .where("project_sources.project_id IN (#{pr_id}) OR project_sources.project_id NOT IN (#{pr_id}) OR project_sources.project_id IS NULL")
.group('sources.id, citations.project_id, project_sources.project_id')
.order('in_project, use_count DESC')
end
From fc67cc8e9388bc4366532bb3e121e54f79e5961a Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Wed, 10 May 2023 18:03:39 -0300
Subject: [PATCH 09/88] Add smart selector initializer
---
.../workbench/smart_selector_helper.rb | 15 +++
app/javascript/packs/application.js | 3 +-
.../vue/initializers/smart_selector/App.vue | 106 ++++++++++++++++++
.../vue/initializers/smart_selector/main.js | 63 +++++++++++
app/views/otu_relationships/_form.html.erb | 10 +-
app/views/otu_relationships/edit.html.erb | 2 +-
6 files changed, 189 insertions(+), 10 deletions(-)
create mode 100644 app/helpers/workbench/smart_selector_helper.rb
create mode 100644 app/javascript/vue/initializers/smart_selector/App.vue
create mode 100644 app/javascript/vue/initializers/smart_selector/main.js
diff --git a/app/helpers/workbench/smart_selector_helper.rb b/app/helpers/workbench/smart_selector_helper.rb
new file mode 100644
index 0000000000..942ff087a1
--- /dev/null
+++ b/app/helpers/workbench/smart_selector_helper.rb
@@ -0,0 +1,15 @@
+module Workbench::SmartSelectorHelper
+ def smart_selector(params)
+ content_tag(:div, '', data: {
+ 'smart-selector' => true,
+ 'smart-selector-model' => params[:model],
+ 'smart-selector-target' => params[:target],
+ 'smart-selector-klass' => params[:klass],
+ 'smart-selector-field-object' => params[:field_object],
+ 'smart-selector-field-property' => params[:field_property],
+ 'smart-selector-title' => params[:title],
+ 'smart-selector-current-object-id' => params[:current]&.id,
+ 'smart-selector-current-object-label' => label_for(params[:current])
+ })
+ end
+end
diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js
index 5c3e08d714..ca19bb456d 100644
--- a/app/javascript/packs/application.js
+++ b/app/javascript/packs/application.js
@@ -29,6 +29,7 @@ require('../vue/initializers/tagButton/main.js')
require('../vue/initializers/quick_citation_init/main.js')
require('../vue/initializers/browse_nomenclature/main.js')
require('../vue/initializers/pinboard_navigator/main.js')
+require('../vue/initializers/smart_selector/main.js')
require('../vue/initializers/soft_validations/main.js')
require('../vue/initializers/simple_map/main')
require('../vue/tasks/type_specimens/main.js')
@@ -88,4 +89,4 @@ require('../vue/tasks/descriptors/filter/main.js')
require('../vue/tasks/loans/filter/main.js')
require('../vue/tasks/observations/filter/main.js')
require('../vue/tasks/contents/filter/main.js')
-require('../vue/tasks/biological_associations/biological_associations_graph/main.js')
\ No newline at end of file
+require('../vue/tasks/biological_associations/biological_associations_graph/main.js')
diff --git a/app/javascript/vue/initializers/smart_selector/App.vue b/app/javascript/vue/initializers/smart_selector/App.vue
new file mode 100644
index 0000000000..6867a03e60
--- /dev/null
+++ b/app/javascript/vue/initializers/smart_selector/App.vue
@@ -0,0 +1,106 @@
+
+
+ {{ title || model }}
+ (selectedItem = item)"
+ />
+
+
+
+
+
+
+
+
+
diff --git a/app/javascript/vue/initializers/smart_selector/main.js b/app/javascript/vue/initializers/smart_selector/main.js
new file mode 100644
index 0000000000..643083884c
--- /dev/null
+++ b/app/javascript/vue/initializers/smart_selector/main.js
@@ -0,0 +1,63 @@
+import { createApp } from 'vue'
+import App from './App.vue'
+
+function removeEmptyProps(props) {
+ const obj = { ...props }
+
+ for (const key in obj) {
+ if (obj[key] === null) {
+ delete obj[key]
+ }
+ }
+
+ return obj
+}
+
+function makeCurrentObject(id, label, objectLabel) {
+ return id && label
+ ? {
+ id: Number(id),
+ [objectLabel]: label
+ }
+ : null
+}
+
+function init(element) {
+ const model = element.getAttribute('data-smart-selector-model')
+ const target = element.getAttribute('data-smart-selector-target')
+ const klass = element.getAttribute('data-smart-selector-klass')
+ const fieldObject = element.getAttribute('data-smart-selector-field-object')
+ const objectLabelProperty = element.getAttribute('data-smart-selector-object-label')
+ const fieldProperty = element.getAttribute('data-smart-selector-field-property')
+ const objectProperty = element.getAttribute('data-smart-selector-object-property')
+ const title = element.getAttribute('data-smart-selector-title')
+ const currentObjectId = element.getAttribute('data-smart-selector-current-object-id')
+ const currentObjectLabel = element.getAttribute('data-smart-selector-current-object-label')
+
+ const props = removeEmptyProps({
+ model,
+ target,
+ klass,
+ fieldObject,
+ objectProperty,
+ fieldProperty,
+ title,
+ currentObject: makeCurrentObject(
+ currentObjectId,
+ currentObjectLabel,
+ objectLabelProperty || 'object_tag'
+ )
+ })
+
+ const app = createApp(App, props)
+
+ app.mount(element)
+}
+
+document.addEventListener('turbolinks:load', () => {
+ if (document.querySelector('[data-smart-selector]')) {
+ document.querySelectorAll('[data-smart-selector]').forEach((element) => {
+ init(element)
+ })
+ }
+})
diff --git a/app/views/otu_relationships/_form.html.erb b/app/views/otu_relationships/_form.html.erb
index 3b7a456584..a7791cdf8b 100644
--- a/app/views/otu_relationships/_form.html.erb
+++ b/app/views/otu_relationships/_form.html.erb
@@ -11,20 +11,14 @@
<% end %>
-
- <%= form.label :subject_otu_id %>
- <%= render '/otus/otu_picker', otu: @otu_relationship.subject_otu, field_name: 'Subject OTU', object_method: :subject_otu_id, f: form -%>
-
+ <%= smart_selector model: :otus, target: :OtuRelationship, field_property: :subject_otu_id, field_object: :otu_relationship, title: 'OTU subject', current: @otu_relationship.subject_otu %>
<%= form.label :type %>
<%= form.select :type, options: %w{OtuRelationship::Disjoint OtuRelationship::Equal OtuRelationship::ProperPartInverse OtuRelationship::ProperPart OtuRelationship::PartiallyOverlapping } %>
-
- <%= form.label :object_otu_id %>
- <%= render '/otus/otu_picker', otu: @otu_relationship.object_otu, field_name: 'Object OTU', object_method: :object_otu_id, f: form -%>
-
+ <%= smart_selector model: :otus, target: :OtuRelationship, field_property: :object_otu_id, field_object: :otu_relationship, title: 'OTU object', current: @otu_relationship.object_otu %>
<%= form.submit %>
diff --git a/app/views/otu_relationships/edit.html.erb b/app/views/otu_relationships/edit.html.erb
index 9f41eec129..90cbc08ccc 100644
--- a/app/views/otu_relationships/edit.html.erb
+++ b/app/views/otu_relationships/edit.html.erb
@@ -2,5 +2,5 @@
<%= render 'form', otu_relationship: @otu_relationship %>
-<%= link_to 'Show', @otu_relationship %> |
+<%= link_to 'Show', @otu_relationship.metamorphosize %> |
<%= link_to 'Back', otu_relationships_path %>
From b9694b98bc9eed05d24114836fc37942c1f7b1ee Mon Sep 17 00:00:00 2001
From: Dmitry Dmitriev
Date: Thu, 11 May 2023 09:31:33 -0500
Subject: [PATCH 10/88] geographic area
---
CHANGELOG.md | 1 +
lib/queries/geographic_area/autocomplete.rb | 1 +
lib/queries/query/autocomplete.rb | 4 ++--
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e106b964f4..25d1d4c560 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -720,6 +720,7 @@ This project does not yet adheres to [Semantic Versioning](https://semv
- Recent predicate list
- Recent languages list
- People autocomplete
+- GeographicArea autocomplete (exact match on alternate value)
- Remove search box in observation matrix hub [#3032]
- Type material form allows multiple type species in comprehensive task. [#2584]
- Updated Ruby gems.Yes
diff --git a/lib/queries/geographic_area/autocomplete.rb b/lib/queries/geographic_area/autocomplete.rb
index d006ce2724..ecdfc137cb 100644
--- a/lib/queries/geographic_area/autocomplete.rb
+++ b/lib/queries/geographic_area/autocomplete.rb
@@ -27,6 +27,7 @@ def autocomplete
queries = [
::GeographicArea.where(id: query_string).all,
::GeographicArea.where(name: query_string).all,
+ ::GeographicArea.joins(:alternate_values).where('alternate_values.value ILIKE ?', query_string).all,
::GeographicArea.joins(parent_child_join).where(Arel.sql(parent_child_where.to_sql)).limit(5).all,
::GeographicArea.where(Arel.sql(where_sql)).includes(:geographic_area_type, :geographic_items).order(Arel.sql('LENGTH(name)')).limit(dynamic_limit).all,
autocomplete_exact_id,
diff --git a/lib/queries/query/autocomplete.rb b/lib/queries/query/autocomplete.rb
index 787bd83c80..319739cfff 100644
--- a/lib/queries/query/autocomplete.rb
+++ b/lib/queries/query/autocomplete.rb
@@ -113,12 +113,12 @@ def parent_child_join
table.join(parent).on(table[:parent_id].eq(parent[:id])).join_sources
end
- # Match at two levels, for example, 'wa te" will match "Washington Co., Texas"
+ # Match at two levels, for example, 'te wa" will match "Texas, Washington Co."
# @return [Arel::Nodes::Grouping]
def parent_child_where
a,b = query_string.split(/\s+/, 2)
return table[:id].eq(-1) if a.nil? || b.nil?
- table[:name].matches("#{a}%").and(parent[:name].matches("#{b}%"))
+ parent[:name].matches("#{a}%").and(table[:name].matches("#{b}%"))
end
# @return [Arel::Nodes, nil]
From 82c75b25b8120ed4b52c9f7b6d1d9b6ca48f65c0 Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Thu, 11 May 2023 13:27:08 -0300
Subject: [PATCH 11/88] Refactor data attribute slice
---
.../components/data_attribute_annotator.vue | 211 ++++++++----------
.../annotator/components/shared/tableList.vue | 206 ++++++++---------
2 files changed, 196 insertions(+), 221 deletions(-)
diff --git a/app/javascript/vue/components/radials/annotator/components/data_attribute_annotator.vue b/app/javascript/vue/components/radials/annotator/components/data_attribute_annotator.vue
index 64f4fea5d7..b24f3b33b3 100644
--- a/app/javascript/vue/components/radials/annotator/components/data_attribute_annotator.vue
+++ b/app/javascript/vue/components/radials/annotator/components/data_attribute_annotator.vue
@@ -1,164 +1,137 @@
-
-
-
-
-
- {{ item }}
-
-
-
-
-
-
-
-
-
- {{ predicate.name }}
-
-
-
-
+
{
+ predicate = $event
+ }
+ "
+ v-model="predicate"
+ />
+
+ (predicate = undefined)"
+ />
-
-
- Create
-
-
- Update
-
+ New
+ @click="saveDataAttribute()"
+ >
+ {{ selectedDataAttribute.id ? 'Update' : 'Create' }}
+
+
+ New
+
-
+ @edit="setDataAttribute"
+ @delete="removeItem"
+ />
\ No newline at end of file
+.list-complete-item {
+ justify-content: space-between;
+ transition: all 0.5s, opacity 0.2s;
+}
+
+.list-complete-enter-active,
+.list-complete-leave-active {
+ opacity: 0;
+ font-size: 0px;
+ border: none;
+}
+
From b9ab2d97a4ccf7407bc2175771c22d4f204a4b55 Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Thu, 11 May 2023 15:00:08 -0300
Subject: [PATCH 12/88] Add none layout
---
.../components/sqed/layouts/none.vue | 20 ++++
.../images/new_image/components/sqed/sqed.vue | 109 +++++++++++-------
2 files changed, 88 insertions(+), 41 deletions(-)
create mode 100644 app/javascript/vue/tasks/images/new_image/components/sqed/layouts/none.vue
diff --git a/app/javascript/vue/tasks/images/new_image/components/sqed/layouts/none.vue b/app/javascript/vue/tasks/images/new_image/components/sqed/layouts/none.vue
new file mode 100644
index 0000000000..37a72ba709
--- /dev/null
+++ b/app/javascript/vue/tasks/images/new_image/components/sqed/layouts/none.vue
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
diff --git a/app/javascript/vue/tasks/images/new_image/components/sqed/sqed.vue b/app/javascript/vue/tasks/images/new_image/components/sqed/sqed.vue
index b4fbaa2809..52268ba519 100644
--- a/app/javascript/vue/tasks/images/new_image/components/sqed/sqed.vue
+++ b/app/javascript/vue/tasks/images/new_image/components/sqed/sqed.vue
@@ -1,9 +1,10 @@
-
+ v-if="disabledSection"
+ />
Staged image
@@ -21,7 +22,7 @@
+ />
Has border
@@ -32,28 +33,34 @@
:is="layoutName"
:layout-types="metadata.layout_section_types"
v-model="sqed_depiction_attributes.metadata_map"
- :style="{ 'background-color': sqed_depiction_attributes.boundary_color }"
+ :style="{
+ 'background-color': sqed_depiction_attributes.boundary_color
+ }"
:class="{ hasBorder: sqed_depiction_attributes.has_border }"
/>
+ class="panel horizontal-center-content middle pattern-box"
+ >
Choose a pattern
-
-
+
+ @click="resetSqed"
+ >
Reset
@@ -62,7 +69,6 @@
From c4f9be4f8879b6d4fa6070e1888485140502aa7b Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Thu, 11 May 2023 16:09:09 -0300
Subject: [PATCH 13/88] fix layout object
---
.../vue/tasks/images/new_image/components/sqed/sqed.vue | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/javascript/vue/tasks/images/new_image/components/sqed/sqed.vue b/app/javascript/vue/tasks/images/new_image/components/sqed/sqed.vue
index 52268ba519..e69711f02a 100644
--- a/app/javascript/vue/tasks/images/new_image/components/sqed/sqed.vue
+++ b/app/javascript/vue/tasks/images/new_image/components/sqed/sqed.vue
@@ -183,6 +183,7 @@ export default {
Object.assign(metadata.extraction_patterns, {
none: {
layout: 'none',
+ boundary_finder: {},
metadata_map: {
0: 'stage'
}
From 06be0dbce3113be8d8d5e491e3570f41be8d7891 Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Fri, 12 May 2023 11:08:38 -0300
Subject: [PATCH 14/88] Fix #3413
---
CHANGELOG.md | 2 ++
.../vue/tasks/loans/new/components/LoanItemList.vue | 12 ++++++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 25d1d4c560..93bcef1719 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,8 +15,10 @@ This project does not yet adheres to [Semantic Versioning](https://semv
- BibTeX typo [#3408]
- Includes `type material` and `type material observations` don't work in Filter images
+- Changing the number of items per page or the page shows loan items that are not from the current loan in New/edit loan task [#3413]
[#3408]: https://github.com/SpeciesFileGroup/taxonworks/issues/3408
+[#3413]: https://github.com/SpeciesFileGroup/taxonworks/issues/3413
## [0.32.3] - 2023-05-05
diff --git a/app/javascript/vue/tasks/loans/new/components/LoanItemList.vue b/app/javascript/vue/tasks/loans/new/components/LoanItemList.vue
index a105647bed..b3a15ba1d9 100644
--- a/app/javascript/vue/tasks/loans/new/components/LoanItemList.vue
+++ b/app/javascript/vue/tasks/loans/new/components/LoanItemList.vue
@@ -11,7 +11,11 @@
store.getters[GetterNames.GetLoanItems])
const pagination = computed(() => store.getters[GetterNames.GetPagination])
+const loan = computed(() => store.getters[GetterNames.GetLoan])
const editLoanItems = computed(
() => store.getters[GetterNames.GetEditLoanItems]
)
@@ -96,6 +101,9 @@ function deleteItem(item) {
}
watch(per, (newVal) =>
- store.dispatch(ActionNames.LoadLoanItems, { per: newVal })
+ store.dispatch(ActionNames.LoadLoanItems, {
+ loanId: loan.value.id,
+ per: newVal
+ })
)
From c5290682a06090ebecdf5c739c1ae240dbab87ed Mon Sep 17 00:00:00 2001
From: mjy
Date: Fri, 12 May 2023 14:43:25 -0500
Subject: [PATCH 15/88] Intersecting model.
---
app/models/otu_relationship/intersecting.rb | 7 +++++++
app/views/otu_relationships/_form.html.erb | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
create mode 100644 app/models/otu_relationship/intersecting.rb
diff --git a/app/models/otu_relationship/intersecting.rb b/app/models/otu_relationship/intersecting.rb
new file mode 100644
index 0000000000..8bea16326c
--- /dev/null
+++ b/app/models/otu_relationship/intersecting.rb
@@ -0,0 +1,7 @@
+class OtuRelationship::Intersecting < OtuRelationship
+
+ def type_name
+ 'intersecting'
+ end
+
+end
diff --git a/app/views/otu_relationships/_form.html.erb b/app/views/otu_relationships/_form.html.erb
index a7791cdf8b..a9415ef2cc 100644
--- a/app/views/otu_relationships/_form.html.erb
+++ b/app/views/otu_relationships/_form.html.erb
@@ -15,7 +15,7 @@
<%= form.label :type %>
- <%= form.select :type, options: %w{OtuRelationship::Disjoint OtuRelationship::Equal OtuRelationship::ProperPartInverse OtuRelationship::ProperPart OtuRelationship::PartiallyOverlapping } %>
+ <%= form.select :type, options: %w{OtuRelationship;:Intersecting OtuRelationship::Disjoint OtuRelationship::Equal OtuRelationship::ProperPartInverse OtuRelationship::ProperPart OtuRelationship::PartiallyOverlapping } %>
<%= smart_selector model: :otus, target: :OtuRelationship, field_property: :object_otu_id, field_object: :otu_relationship, title: 'OTU object', current: @otu_relationship.object_otu %>
From 1c544c904d2019a2ea3cc575380b1e0ccc2da9f9 Mon Sep 17 00:00:00 2001
From: mjy
Date: Fri, 12 May 2023 15:36:21 -0500
Subject: [PATCH 16/88] Fix collection object classification summary. Fix.
#3412
---
CHANGELOG.md | 3 ++-
.../classification_summary_controller.rb | 4 ++--
app/helpers/collection_objects_helper.rb | 24 ++++++++++---------
lib/queries/collection_object/filter.rb | 4 ++--
4 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 93bcef1719..1d9a486b8f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,11 +12,12 @@ This project does not yet adheres to [Semantic Versioning](https://semv
- `Add` button to add biological associations from `Related` modal in new biological associations task
### Fixed
-
+- Collection object classification summary [#3412]
- BibTeX typo [#3408]
- Includes `type material` and `type material observations` don't work in Filter images
- Changing the number of items per page or the page shows loan items that are not from the current loan in New/edit loan task [#3413]
+[#3412]: https://github.com/SpeciesFileGroup/taxonworks/issues/3412
[#3408]: https://github.com/SpeciesFileGroup/taxonworks/issues/3408
[#3413]: https://github.com/SpeciesFileGroup/taxonworks/issues/3413
diff --git a/app/controllers/tasks/collection_objects/classification_summary_controller.rb b/app/controllers/tasks/collection_objects/classification_summary_controller.rb
index b8bb022e98..f0b2ec0bed 100644
--- a/app/controllers/tasks/collection_objects/classification_summary_controller.rb
+++ b/app/controllers/tasks/collection_objects/classification_summary_controller.rb
@@ -9,10 +9,10 @@ def report
@ancestor = TaxonName.where(project_id: sessions_current_project_id).where(id: params[:ancestor_id]).first
@ancestor ||= sessions_current_project.root_taxon_name
@data = ::Queries::TaxonName::Filter.new(
- project_id: sessions_current_project_id,
taxon_name_id: @ancestor.id,
descendants: true,
- rank: params[:rank]).all.order(:cached)
+ rank: params[:rank])
+ .all.order(:cached)
@rank = params[:rank]
end
diff --git a/app/helpers/collection_objects_helper.rb b/app/helpers/collection_objects_helper.rb
index 32d177afb8..4450cd9bd2 100644
--- a/app/helpers/collection_objects_helper.rb
+++ b/app/helpers/collection_objects_helper.rb
@@ -2,20 +2,20 @@ module CollectionObjectsHelper
def table_example(collection_objects)
cols = %i{
- class
+ class
b
c
}
- tag.table do
- tag.tr { cols.collect{|h| tag.td(h.to_s) }.join.html_safe } +
+ tag.table do
+ tag.tr { cols.collect{|h| tag.td(h.to_s) }.join.html_safe } +
collection_objects.collect{|co|
tag.tr +
tag.td( co.dwc_class) +
tag.td( co.dwc_order) +
tag.td( co.dwc_family) +
- tag.td( co.dwc_sex)
+ tag.td( co.dwc_sex)
}.join.html_safe
end.html_safe
@@ -227,7 +227,7 @@ def collection_object_metadata_badge(collection_object)
a = Waxy::Meta.new
a.size = s
a.stroke = 'grey'
- a.link_title = "#{o.id.to_s} created #{time_ago_in_words(o.created_at)} ago by #{user_tag(o.creator)}"
+ a.link_title = "#{o.id} created #{time_ago_in_words(o.created_at)} ago by #{user_tag(o.creator)}"
c = Waxy::Render::Svg::Canvas.new(28, 28)
c.body << Waxy::Render::Svg.rectangle(layout, [a], 0)
@@ -261,6 +261,7 @@ def collection_object_to_geo_json_feature(collection_object, base = true)
# Perhaps a /lib/catalog method
# @return Hash
def collection_object_count_by_classification(scope = nil)
+
return [] if scope.nil?
specimen_data = {}
lot_data = {}
@@ -268,8 +269,8 @@ def collection_object_count_by_classification(scope = nil)
total_index = {}
scope.each do |n|
- a = ::Queries::CollectionObject::Filter.new(project_id: sessions_current_project_id, ancestor_id: n.id, collection_object_type: 'Specimen').all
- b = ::Queries::CollectionObject::Filter.new(project_id: sessions_current_project_id, ancestor_id: n.id, collection_object_type: 'Lot').all
+ a = ::Queries::CollectionObject::Filter.new(project_id: sessions_current_project_id, taxon_name_id: n.id, descendants: true, collection_object_type: 'Specimen').all
+ b = ::Queries::CollectionObject::Filter.new(project_id: sessions_current_project_id, taxon_name_id: n.id, descendants: true, collection_object_type: 'Lot').all
ts = CollectionObject.where(id: a).calculate(:sum, :total)
tl = CollectionObject.where(id: b).calculate(:sum, :total)
@@ -286,7 +287,7 @@ def collection_object_count_by_classification(scope = nil)
specimen_data = specimen_data.sort{|a,b| total_index[b[0]] <=> total_index[a[0]] }.to_h
return {
- total_index: total_index,
+ total_index:,
data: [
{ name: 'Specimen', data: specimen_data},
{ name: 'Lot', data: lot_data}
@@ -310,7 +311,8 @@ def collection_object_preparation_by_classification(scope = nil)
a = ::Queries::CollectionObject::Filter.new(
project_id: sessions_current_project_id,
- ancestor_id: n.id
+ taxon_name_id: n.id,
+ descendants: true
)
# Yes a custom query could do this much faster
@@ -340,8 +342,8 @@ def collection_object_preparation_by_classification(scope = nil)
return {
labels: preparations.collect{|p| p.name} + ['Missing'],
- data: data,
- no_data: no_data
+ data:,
+ no_data:
}
end
diff --git a/lib/queries/collection_object/filter.rb b/lib/queries/collection_object/filter.rb
index 40d44a5a4e..59273b9282 100644
--- a/lib/queries/collection_object/filter.rb
+++ b/lib/queries/collection_object/filter.rb
@@ -326,10 +326,10 @@ def initialize(query_params)
@collectors = boolean_param(params, :collectors)
@collecting_event_id = params[:collecting_event_id]
@collection_object_id = params[:collection_object_id]
- @collection_object_type = (params[:collection_object_type].presence)
+ @collection_object_type = params[:collection_object_type].presence
@current_determinations = boolean_param(params, :current_determinations)
@current_repository = boolean_param(params, :current_repository)
- @current_repository_id = (params[:current_repository_id].presence)
+ @current_repository_id = params[:current_repository_id].presence
@dates = boolean_param(params, :dates)
@descendants = boolean_param(params, :descendants)
@deaccessioned = boolean_param(params, :deaccessioned)
From 168e5868c2c96d923fbbb780c018608d5ed00e42 Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Fri, 12 May 2023 17:37:40 -0300
Subject: [PATCH 17/88] Change none layout
---
.../new_image/components/sqed/color.vue | 19 ++++++++++++++-----
.../components/sqed/layouts/none.vue | 11 +----------
.../images/new_image/components/sqed/sqed.vue | 17 ++++++++++++++++-
3 files changed, 31 insertions(+), 16 deletions(-)
diff --git a/app/javascript/vue/tasks/images/new_image/components/sqed/color.vue b/app/javascript/vue/tasks/images/new_image/components/sqed/color.vue
index 28b7dfb14e..d6d1d8b5c9 100644
--- a/app/javascript/vue/tasks/images/new_image/components/sqed/color.vue
+++ b/app/javascript/vue/tasks/images/new_image/components/sqed/color.vue
@@ -4,13 +4,16 @@
+ :key="color"
+ >
+ v-model="selected"
+ />
{{ color }}
@@ -22,7 +25,13 @@
export default {
props: {
modelValue: {
- type: String
+ type: String,
+ default: undefined
+ },
+
+ disabled: {
+ type: Boolean,
+ default: false
},
colors: {
@@ -35,10 +44,10 @@ export default {
computed: {
selected: {
- get () {
+ get() {
return this.modelValue
},
- set (value) {
+ set(value) {
this.$emit('update:modelValue', value)
}
}
diff --git a/app/javascript/vue/tasks/images/new_image/components/sqed/layouts/none.vue b/app/javascript/vue/tasks/images/new_image/components/sqed/layouts/none.vue
index 37a72ba709..5998ca9c97 100644
--- a/app/javascript/vue/tasks/images/new_image/components/sqed/layouts/none.vue
+++ b/app/javascript/vue/tasks/images/new_image/components/sqed/layouts/none.vue
@@ -1,18 +1,9 @@
-
-
-
+
From 9559c409dc5abcc2d29663bcd3839235d2d94a2d Mon Sep 17 00:00:00 2001
From: Dmitry Dmitriev
Date: Mon, 15 May 2023 12:53:28 -0500
Subject: [PATCH 23/88] closes #3416
---
CHANGELOG.md | 1 +
lib/tools/interactive_key.rb | 25 ++++++++++++++-----------
2 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1d9a486b8f..426f032f9b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -733,6 +733,7 @@ This project does not yet adheres to [Semantic Versioning](https://semv
### Fixed
+- Bug with interactive keys [#3416]
- Object global id param in identifiers API/filter
- Bad logic check on adding new user to project
- Dependency loop problem in DwC checklist importer
diff --git a/lib/tools/interactive_key.rb b/lib/tools/interactive_key.rb
index f73f23fb1b..64a935fcab 100644
--- a/lib/tools/interactive_key.rb
+++ b/lib/tools/interactive_key.rb
@@ -193,12 +193,7 @@ def initialize(
@remaining = remaining_taxa
@eliminated = eliminated_taxa
@list_of_descriptors = useful_descriptors
-
### delete temporary data
-
- # @proceps this is very confusing to initialize a variable, but really not initialize it. If you are
- # using these to initialize some other initialization then write separate code to initialize only what is needed?
-
@row_hash = nil #
@descriptors_hash = nil
@rows_with_filter = nil
@@ -300,6 +295,14 @@ def descriptors_hash_initiate
h[d.id][:count] = 0
h[d.id][:min] = 999999 if d.type == 'Descriptor::Continuous' || d.type == 'Descriptor::Sample' # min value used as continuous or sample
h[d.id][:max] = -999999 if d.type == 'Descriptor::Continuous' || d.type == 'Descriptor::Sample' # max value used as continuous or sample
+ if d.type == 'Descriptor::PresenceAbsence'
+ h[d.id][:state_ids]['true'] = {}
+ h[d.id][:state_ids]['true'][:rows] = {}
+ h[d.id][:state_ids]['true'][:status] = 'useless'
+ h[d.id][:state_ids]['false'] = {}
+ h[d.id][:state_ids]['false'][:rows] = {}
+ h[d.id][:state_ids]['true'][:status] = 'useless'
+ end
h[d.id][:observations] = {} # all observation for a particular
h[d.id][:observation_hash] = {} ### state_ids, true/false for a particular descriptor/otu_id/catalog_id combination (for PresenceAbsence or Qualitative or Continuous)
h[d.id][:status] = 'useless' ### 'used', 'useful', 'useless'
@@ -462,8 +465,8 @@ def useful_descriptors
end
end
unless o.presence.nil?
- d_value[:state_ids][o.presence.to_s] = {} if d_value[:state_ids][o.presence.to_s].nil?
- d_value[:state_ids][o.presence.to_s][:rows] = {} if d_value[:state_ids][o.presence.to_s][:rows].nil? ## rows which this state identifies
+ #d_value[:state_ids][o.presence.to_s] = {} if d_value[:state_ids][o.presence.to_s].nil?
+ #d_value[:state_ids][o.presence.to_s][:rows] = {} if d_value[:state_ids][o.presence.to_s][:rows].nil? ## rows which this state identifies
d_value[:state_ids][o.presence.to_s][:rows][ @row_hash[otu_collection_object][:object_at_rank] ] = true if @row_hash[otu_collection_object][:status] != 'eliminated'
if selected_descriptors_hash[d_key] && selected_descriptors_hash[d_key].include?(o.presence.to_s)
d_value[:state_ids][o.presence.to_s][:status] = 'used' ## 'used', 'useful', 'useless'
@@ -546,7 +549,7 @@ def useful_descriptors
descriptor[:min] = d_value[:min]
descriptor[:max] = d_value[:max]
number_of_measurements = d_value[:count]
- s = (d_value[:min] - (d_value[:min] / 10)) / (d_value[:max] - d_value[:min])
+ s = (d_value[:min] - (d_value[:min] / 10)) / (d_value[:max] + 0.0000001 - d_value[:min])
descriptor[:usefulness] = number_of_taxa * s * (2 - (number_of_measurements / number_of_taxa)) if number_of_taxa > 0
if descriptor[:status] != 'used' && descriptor[:min] != descriptor[:max]
d_value[:status] = 'useful'
@@ -564,9 +567,9 @@ def useful_descriptors
if d_value[:max] != d_value[:min] && number_of_measurements > 0
d_value[:state_ids].each do |s_key, s_value|
if s_value[:o_min] == s_value[:o_max] || s_value[:o_max].blank?
- s += (s_value[:o_min] - (s_value[:o_min] / 10)) / number_of_measurements / (d_value[:max] - d_value[:min])
+ s += (s_value[:o_min] - (s_value[:o_min] / 10)) / number_of_measurements / (d_value[:max] + 0.0000001 - d_value[:min])
else
- s += (s_value[:o_max] - s_value[:o_min]) / number_of_measurements / (d_value[:max] - d_value[:min])
+ s += (s_value[:o_max] - s_value[:o_min]) / number_of_measurements / (d_value[:max] + 0.0000001 - d_value[:min])
end
if descriptor[:status] != 'used' && (s_value[:o_min] != d_value[:min] || (!s_value[:o_max].blank? && s_value[:o_max] != d_value[:max]))
d_value[:status] = 'useful'
@@ -593,7 +596,7 @@ def useful_descriptors
d_value[:status] = 'useful'
descriptor[:status] = 'useful'
end
- s = (number_of_taxa / number_of_states - s_value[:rows].count) ** 2
+ s += (number_of_taxa / number_of_states - s_value[:rows].count) ** 2
descriptor[:states] += [state]
end
descriptor[:usefulness] = number_of_taxa / number_of_states + Math.sqrt(s) if number_of_states > 0
From 1678f7cec3ba5ecc047bc2fc8e20ea10cb6d3aea Mon Sep 17 00:00:00 2001
From: Dmitry Dmitriev
Date: Mon, 15 May 2023 13:04:00 -0500
Subject: [PATCH 24/88] closes #3416
---
CHANGELOG.md | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 426f032f9b..8a8f29c622 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,7 +11,15 @@ This project does not yet adheres to [Semantic Versioning](https://semv
- `Add` button to add biological associations from `Related` modal in new biological associations task
+### Changed
+
+- Recent predicate list
+- Recent languages list
+- People autocomplete
+- GeographicArea autocomplete (exact match on alternate value)
+
### Fixed
+- Bug with interactive keys [#3416]
- Collection object classification summary [#3412]
- BibTeX typo [#3408]
- Includes `type material` and `type material observations` don't work in Filter images
@@ -718,12 +726,6 @@ This project does not yet adheres to [Semantic Versioning](https://semv
- Added 'electronic only' field for the source to flag sources published in electronic only format
- Default `collectionCode` namespace mappings as falback when `institutionCode`:`collectionCode` mappings do not contain a match in DwC occurrences importer.
-### Changed
-
-- Recent predicate list
-- Recent languages list
-- People autocomplete
-- GeographicArea autocomplete (exact match on alternate value)
- Remove search box in observation matrix hub [#3032]
- Type material form allows multiple type species in comprehensive task. [#2584]
- Updated Ruby gems.Yes
@@ -733,7 +735,6 @@ This project does not yet adheres to [Semantic Versioning](https://semv
### Fixed
-- Bug with interactive keys [#3416]
- Object global id param in identifiers API/filter
- Bad logic check on adding new user to project
- Dependency loop problem in DwC checklist importer
From e864fb448c39d67529070ce1cf1915a6135ec5cb Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Tue, 16 May 2023 14:08:26 -0300
Subject: [PATCH 25/88] Fix #3419
---
CHANGELOG.md | 5 +-
.../CollectionObject/FacetImportDataset.vue | 86 +++++++++++++++++++
.../vue/routes/endpoints/ImportDataset.js | 12 +++
app/javascript/vue/routes/endpoints/index.js | 1 +
.../filter/components/filter.vue | 8 +-
5 files changed, 108 insertions(+), 4 deletions(-)
create mode 100644 app/javascript/vue/components/Filter/Facets/CollectionObject/FacetImportDataset.vue
create mode 100644 app/javascript/vue/routes/endpoints/ImportDataset.js
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8a8f29c622..0e5fd349e0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@ This project does not yet adheres to [Semantic Versioning](https://semv
### Added
- `Add` button to add biological associations from `Related` modal in new biological associations task
+- ImportDataset facet in Filter collection objects [#3419]
### Changed
@@ -19,15 +20,17 @@ This project does not yet adheres to [Semantic Versioning](https://semv
- GeographicArea autocomplete (exact match on alternate value)
### Fixed
+
- Bug with interactive keys [#3416]
- Collection object classification summary [#3412]
- BibTeX typo [#3408]
- Includes `type material` and `type material observations` don't work in Filter images
- Changing the number of items per page or the page shows loan items that are not from the current loan in New/edit loan task [#3413]
-[#3412]: https://github.com/SpeciesFileGroup/taxonworks/issues/3412
[#3408]: https://github.com/SpeciesFileGroup/taxonworks/issues/3408
+[#3412]: https://github.com/SpeciesFileGroup/taxonworks/issues/3412
[#3413]: https://github.com/SpeciesFileGroup/taxonworks/issues/3413
+[#3419]: https://github.com/SpeciesFileGroup/taxonworks/issues/3419
## [0.32.3] - 2023-05-05
diff --git a/app/javascript/vue/components/Filter/Facets/CollectionObject/FacetImportDataset.vue b/app/javascript/vue/components/Filter/Facets/CollectionObject/FacetImportDataset.vue
new file mode 100644
index 0000000000..1313c1dfd0
--- /dev/null
+++ b/app/javascript/vue/components/Filter/Facets/CollectionObject/FacetImportDataset.vue
@@ -0,0 +1,86 @@
+
+
+ Import dataset
+
+ removeFromArray(datasets, item)"
+ />
+
+
+
+
diff --git a/app/javascript/vue/routes/endpoints/ImportDataset.js b/app/javascript/vue/routes/endpoints/ImportDataset.js
new file mode 100644
index 0000000000..866fefdd02
--- /dev/null
+++ b/app/javascript/vue/routes/endpoints/ImportDataset.js
@@ -0,0 +1,12 @@
+import baseCRUD, { annotations } from './base'
+import AjaxCall from 'helpers/ajaxCall'
+
+const controller = 'import_datasets'
+const permitParams = {}
+
+export const ImportDataset = {
+ ...baseCRUD(controller, permitParams),
+ ...annotations(controller),
+
+ all: () => AjaxCall('get', '/tasks/dwca_import/index.json')
+}
diff --git a/app/javascript/vue/routes/endpoints/index.js b/app/javascript/vue/routes/endpoints/index.js
index 1aa97bdca3..9b3156fd10 100644
--- a/app/javascript/vue/routes/endpoints/index.js
+++ b/app/javascript/vue/routes/endpoints/index.js
@@ -68,3 +68,4 @@ export { TypeMaterial } from './TypeMaterial'
export { User } from './User'
export { Role } from './Role'
export { Protocol } from './Protocol'
+export { ImportDataset } from './ImportDataset'
diff --git a/app/javascript/vue/tasks/collection_objects/filter/components/filter.vue b/app/javascript/vue/tasks/collection_objects/filter/components/filter.vue
index a13cae126e..63521ec133 100644
--- a/app/javascript/vue/tasks/collection_objects/filter/components/filter.vue
+++ b/app/javascript/vue/tasks/collection_objects/filter/components/filter.vue
@@ -25,12 +25,13 @@
+
+ v-model="params"
+ target="CollectionObject"
+ />
@@ -69,6 +70,7 @@ import FacetDataAttribute from 'components/Filter/Facets/shared/FacetDataAttribu
import FacetWKT from 'components/Filter/Facets/Otu/FacetWKT.vue'
import FacetMatchIdentifiers from 'components/Filter/Facets/shared/FacetMatchIdentifiers.vue'
import FacetProtocol from 'components/Filter/Facets/Extract/FacetProtocol.vue'
+import FacetImportDataset from 'components/Filter/Facets/CollectionObject/FacetImportDataset.vue'
const WITH_PARAMS = [
'biological_associations',
From 03d8551e41104cfb0d58bfeaa1ce5ddae388c51d Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Tue, 16 May 2023 14:25:09 -0300
Subject: [PATCH 26/88] Add whitespace
---
.../digitize/components/shared/depictions.vue | 109 ++++++++------
.../image/components/CellDepiction.vue | 28 ++--
.../image/components/CellObservation.vue | 135 ++++++++++--------
.../MediaDescriptor/MediaDescriptor.vue | 47 +++---
.../MediaDescriptor/MediaDescriptor.vue | 88 +++++++-----
5 files changed, 230 insertions(+), 177 deletions(-)
diff --git a/app/javascript/vue/tasks/digitize/components/shared/depictions.vue b/app/javascript/vue/tasks/digitize/components/shared/depictions.vue
index 023ac923c5..bbc421f28d 100644
--- a/app/javascript/vue/tasks/digitize/components/shared/depictions.vue
+++ b/app/javascript/vue/tasks/digitize/components/shared/depictions.vue
@@ -10,10 +10,12 @@
:id="`depiction-${dropzoneId}`"
url="/depictions"
:use-custom-dropzone-options="true"
- :dropzone-options="dropzone"/>
+ :dropzone-options="dropzone"
+ />
+ v-if="figuresList.length"
+ >
-
+
-
+
@@ -38,7 +40,6 @@
\ No newline at end of file
+.depiction-container {
+ width: 100%;
+ max-width: 100%;
+}
+
diff --git a/app/javascript/vue/tasks/observation_matrices/image/components/CellDepiction.vue b/app/javascript/vue/tasks/observation_matrices/image/components/CellDepiction.vue
index 5c68d0348e..132b322302 100644
--- a/app/javascript/vue/tasks/observation_matrices/image/components/CellDepiction.vue
+++ b/app/javascript/vue/tasks/observation_matrices/image/components/CellDepiction.vue
@@ -15,7 +15,9 @@
:depiction="element"
>
-
+
diff --git a/app/javascript/vue/tasks/observation_matrices/image/components/CellObservation.vue b/app/javascript/vue/tasks/observation_matrices/image/components/CellObservation.vue
index 37ab69afee..2459359db0 100644
--- a/app/javascript/vue/tasks/observation_matrices/image/components/CellObservation.vue
+++ b/app/javascript/vue/tasks/observation_matrices/image/components/CellObservation.vue
@@ -1,7 +1,7 @@
-
+
diff --git a/app/javascript/vue/tasks/observation_matrices/matrix_column_coder/MatrixColumnCoder/MediaDescriptor/MediaDescriptor.vue b/app/javascript/vue/tasks/observation_matrices/matrix_column_coder/MatrixColumnCoder/MediaDescriptor/MediaDescriptor.vue
index fb4e69da85..9d4b0287ac 100644
--- a/app/javascript/vue/tasks/observation_matrices/matrix_column_coder/MatrixColumnCoder/MediaDescriptor/MediaDescriptor.vue
+++ b/app/javascript/vue/tasks/observation_matrices/matrix_column_coder/MatrixColumnCoder/MediaDescriptor/MediaDescriptor.vue
@@ -37,15 +37,13 @@
:width="image.alternatives.thumb.width"
:height="image.alternatives.thumb.height"
:src="image.alternatives.thumb.image_file_url"
- >
+ />
-
- Created
-
+ Created
-
+
{
+ }).then((response) => {
this.addObservation(response.body)
})
},
- addObservation (observation) {
+ addObservation(observation) {
const args = {
id: observation.id,
type: ObservationTypes.Media,
@@ -197,7 +204,7 @@ export default {
this.$store.commit(MutationNames.AddObservation, makeObservation(args))
},
- removeObservation (observation) {
+ removeObservation(observation) {
this.$store.dispatch(ActionNames.RemoveObservation, {
rowObjectId: this.rowObject.id,
rowObjectType: this.rowObject.type,
@@ -205,7 +212,7 @@ export default {
})
},
- loadList (params) {
+ loadList(params) {
Image.filter(params).then(({ body }) => {
this.filterList = body
})
diff --git a/app/javascript/vue/tasks/observation_matrices/matrix_row_coder/MatrixRowCoder/MediaDescriptor/MediaDescriptor.vue b/app/javascript/vue/tasks/observation_matrices/matrix_row_coder/MatrixRowCoder/MediaDescriptor/MediaDescriptor.vue
index c2e278c1a0..c19cdad24d 100644
--- a/app/javascript/vue/tasks/observation_matrices/matrix_row_coder/MatrixRowCoder/MediaDescriptor/MediaDescriptor.vue
+++ b/app/javascript/vue/tasks/observation_matrices/matrix_row_coder/MatrixRowCoder/MediaDescriptor/MediaDescriptor.vue
@@ -38,15 +38,13 @@
:width="image.alternatives.thumb.width"
:height="image.alternatives.thumb.height"
:src="image.alternatives.thumb.image_file_url"
- >
+ />
-
- Created
-
+
Created
-
+
o.descriptorId === this.descriptor.id)
+ observations() {
+ return this.$store.getters[GetterNames.GetObservations].filter(
+ (o) => o.descriptorId === this.descriptor.id
+ )
}
},
- created () {
+ created() {
const descriptorId = this.descriptor.id
const otuId = this.matrixRow.observation_object.global_id
- this.$store.dispatch(ActionNames.RequestObservations, { descriptorId, otuId })
- .then(_ => this.$store.getters[GetterNames.GetObservationsFor](descriptorId))
+ this.$store
+ .dispatch(ActionNames.RequestObservations, { descriptorId, otuId })
+ .then((_) =>
+ this.$store.getters[GetterNames.GetObservationsFor](descriptorId)
+ )
},
methods: {
- success (file, response) {
+ success(file, response) {
this.addObservation(response)
this.$refs.depictionObs.removeFile(file)
},
- sending (file, xhr, formData) {
+ sending(file, xhr, formData) {
formData.append('observation[descriptor_id]', this.descriptor.id)
formData.append('observation[type]', 'Observation::Media')
- formData.append('observation[observation_object_type]', this.matrixRow.observation_object.base_class)
- formData.append('observation[observation_object_id]', this.matrixRow.observation_object.id)
+ formData.append(
+ 'observation[observation_object_type]',
+ this.matrixRow.observation_object.base_class
+ )
+ formData.append(
+ 'observation[observation_object_id]',
+ this.matrixRow.observation_object.id
+ )
formData.append('extend[]', 'depictions')
},
- createObservation (image) {
- this.$store.state.request.createObservation({
- observation: {
- descriptor_id: this.descriptor.id,
- depictions_attributes: [{
- image_id: image.id
- }],
- type: ObservationTypes.Media,
- observation_object_id: this.matrixRow.observation_object.id,
- observation_object_type: this.matrixRow.observation_object.base_class
- },
- extend: ['depictions']
- }).then(response => {
- this.addObservation(response)
- })
+ createObservation(image) {
+ this.$store.state.request
+ .createObservation({
+ observation: {
+ descriptor_id: this.descriptor.id,
+ depictions_attributes: [
+ {
+ image_id: image.id
+ }
+ ],
+ type: ObservationTypes.Media,
+ observation_object_id: this.matrixRow.observation_object.id,
+ observation_object_type:
+ this.matrixRow.observation_object.base_class
+ },
+ extend: ['depictions']
+ })
+ .then((response) => {
+ this.addObservation(response)
+ })
},
- addObservation (observation) {
+ addObservation(observation) {
const args = {
id: observation.id,
type: ObservationTypes.Media,
@@ -200,14 +218,14 @@ export default {
this.$store.commit(MutationNames.AddObservation, makeObservation(args))
},
- removeObservation (observation) {
+ removeObservation(observation) {
this.$store.dispatch(ActionNames.RemoveObservation, {
descriptorId: this.descriptor.id,
obsId: observation.id
})
},
- loadList (params) {
+ loadList(params) {
Image.filter(params).then(({ body }) => {
this.filterList = body
})
From 6c0bdc0da1fb60b780f77dce9c9b4e802a6815b7 Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Tue, 16 May 2023 15:18:56 -0300
Subject: [PATCH 27/88] Fix sort name in filter nomenclature
---
.../vue/tasks/nomenclature/filter/utils/listParser.js | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/app/javascript/vue/tasks/nomenclature/filter/utils/listParser.js b/app/javascript/vue/tasks/nomenclature/filter/utils/listParser.js
index 048e027827..9a8437bde0 100644
--- a/app/javascript/vue/tasks/nomenclature/filter/utils/listParser.js
+++ b/app/javascript/vue/tasks/nomenclature/filter/utils/listParser.js
@@ -2,15 +2,13 @@ export function listParser(list) {
return list.map((item) => ({
id: item.id,
global_id: item.global_id,
- cached_html: `
- ${item.cached_html}
- `,
+ cached_html: `${item.cached_html} `,
cached_author_year: item.cached_author_year,
original_combination: item.original_combination,
cached_is_valid: item.cached_is_valid ? 'Yes' : 'No',
rank: item.rank,
parent: item?.parent
- ? `${item.parent.object_label} `
+ ? `${item.parent.object_label} `
: ''
}))
}
From 774a8c9ca7be59c3f8c2f3a3f43826ebdd48aec5 Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Tue, 16 May 2023 15:19:56 -0300
Subject: [PATCH 28/88] Update CHANGELOG.md [skip ci]
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0e5fd349e0..923ee31d44 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -26,6 +26,7 @@ This project does not yet adheres to [Semantic Versioning](https://semv
- BibTeX typo [#3408]
- Includes `type material` and `type material observations` don't work in Filter images
- Changing the number of items per page or the page shows loan items that are not from the current loan in New/edit loan task [#3413]
+- Sort by name gives an wrong order in filter nomenclature task
[#3408]: https://github.com/SpeciesFileGroup/taxonworks/issues/3408
[#3412]: https://github.com/SpeciesFileGroup/taxonworks/issues/3412
From ca3059fd3f3168c91a1aa10bce0217fd0732c477 Mon Sep 17 00:00:00 2001
From: mjy
Date: Tue, 16 May 2023 13:41:31 -0500
Subject: [PATCH 29/88] Bump sqed to 0.8.0. Stage/left-t backend. #3400. #3367
Better Sqed error handling?!
---
CHANGELOG.md | 7 +
Gemfile | 2 +-
Gemfile.lock | 4 +-
app/controllers/images_controller.rb | 4 +-
app/models/image.rb | 211 ++++++++++++++-------------
app/models/sqed_depiction.rb | 34 +++--
lib/utilities/geo.rb | 150 ++++++++++++++-----
lib/vendor/sqed_to_taxonworks.rb | 28 ++--
8 files changed, 265 insertions(+), 175 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8a8f29c622..6f24974d65 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,8 @@ This project does not yet adheres to [Semantic Versioning](https://semv
### Added
+- New stage-only staged image type [#3400]
+- New left-t stage layout [#3367]
- `Add` button to add biological associations from `Related` modal in new biological associations task
### Changed
@@ -19,12 +21,17 @@ This project does not yet adheres to [Semantic Versioning](https://semv
- GeographicArea autocomplete (exact match on alternate value)
### Fixed
+
+- Staged image processing when boundaries fail to be calculated
- Bug with interactive keys [#3416]
- Collection object classification summary [#3412]
- BibTeX typo [#3408]
- Includes `type material` and `type material observations` don't work in Filter images
- Changing the number of items per page or the page shows loan items that are not from the current loan in New/edit loan task [#3413]
+[#3367]: https://github.com/SpeciesFileGroup/taxonworks/issues/3367
+[#3400]: https://github.com/SpeciesFileGroup/taxonworks/issues/3400
+[#3416]: https://github.com/SpeciesFileGroup/taxonworks/issues/3416
[#3412]: https://github.com/SpeciesFileGroup/taxonworks/issues/3412
[#3408]: https://github.com/SpeciesFileGroup/taxonworks/issues/3408
[#3413]: https://github.com/SpeciesFileGroup/taxonworks/issues/3413
diff --git a/Gemfile b/Gemfile
index 5bba0d4277..5a62b9b56b 100644
--- a/Gemfile
+++ b/Gemfile
@@ -108,7 +108,7 @@ gem 'ruby-graphviz', '~> 1.2.5', require: false
# "Bio" and SFG gems
gem 'taxonifi', '~> 0.6.0'
-gem 'sqed', '~>0.7.0'
+gem 'sqed', '~>0.8.0'
gem 'dwc_agent', '~> 3.0'
gem 'dwc-archive', github: 'LocoDelAssembly/dwc-archive', branch: 'overhaul' # '~> 1.1', '>= 1.1.2'
gem 'biodiversity', github: 'GlobalNamesArchitecture/biodiversity', branch: 'pipe_approach' # '~> 5.1', '>= 5.1.1'
diff --git a/Gemfile.lock b/Gemfile.lock
index c722b24e22..5ccc501b28 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -590,7 +590,7 @@ GEM
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
- sqed (0.7.1)
+ sqed (0.8.0)
rake (~> 13.0)
rmagick (~> 4.2)
rtesseract (~> 3.1)
@@ -777,7 +777,7 @@ DEPENDENCIES
sprockets (~> 3.7.2)
sprockets-es6 (~> 0.9.2)
sprockets-rails (~> 3.2.0)
- sqed (~> 0.7.0)
+ sqed (~> 0.8.0)
taxonifi (~> 0.6.0)
term-ansicolor (~> 1.6)
thor (~> 1.2)
diff --git a/app/controllers/images_controller.rb b/app/controllers/images_controller.rb
index 08980285a9..56964e6ad4 100644
--- a/app/controllers/images_controller.rb
+++ b/app/controllers/images_controller.rb
@@ -23,7 +23,7 @@ def index
# GET /api/v1/otus/:id/inventory/images
# - routed here to take advantage of Pagination
def api_image_inventory
- @images = ::Queries::Image::Filter.new(
+ @images = ::Queries::Imag::Filter.new(
params.permit(
:otu_id, otu_scope: [])
).all.page(params[:page]).per(params[:per])
@@ -48,7 +48,7 @@ def api_show
@image = Image.where(project_id: sessions_current_project_id).find_by(id: params[:id])
@image ||= Image.where(project_id: sessions_current_project_id).find_by(image_file_fingerprint: params[:id])
- render plain: 'Not found. You may need to add a &project_token= param to the URL currently in your address bar to access these data. See https://api.taxonworks.org/ for more.', status: 404 and return if @image.nil?
+ render plain: 'Not found. You may need to add a &project_token= param to the URL currently in your address bar to access these data. See https://api.taxonworks.org/ for more.', status: :not_found and return if @image.nil?
render '/images/api/v1/show'
end
diff --git a/app/models/image.rb b/app/models/image.rb
index 881833d6a6..03d9acc7d3 100644
--- a/app/models/image.rb
+++ b/app/models/image.rb
@@ -81,14 +81,13 @@ class Image < ApplicationRecord
# also using https://github.com/teeparham/paperclip-meta
has_attached_file :image_file,
styles: {
- thumb: [ "#{DEFAULT_SIZES[:thumb][:width]}x#{DEFAULT_SIZES[:thumb][:height]}>", :png ] ,
- medium: [ "#{DEFAULT_SIZES[:medium][:width]}x#{DEFAULT_SIZES[:medium][:height]}>", :jpg ]
- },
- default_url: MISSING_IMAGE_PATH,
- filename_cleaner: Utilities::CleanseFilename,
- processors: [:rotator]
-
- #:restricted_characters => /[^A-Za-z0-9\.]/,
+ thumb: [ "#{DEFAULT_SIZES[:thumb][:width]}x#{DEFAULT_SIZES[:thumb][:height]}>", :png ] ,
+ medium: [ "#{DEFAULT_SIZES[:medium][:width]}x#{DEFAULT_SIZES[:medium][:height]}>", :jpg ] },
+ default_url: MISSING_IMAGE_PATH,
+ filename_cleaner: Utilities::CleanseFilename,
+ processors: [:rotator]
+
+ #:restricted_characters => /[^A-Za-z0-9\.]/,
validates_attachment_content_type :image_file, content_type: /\Aimage\/.*\Z/
validates_attachment_presence :image_file
validate :image_dimensions_too_short
@@ -97,19 +96,19 @@ class Image < ApplicationRecord
accepts_nested_attributes_for :sled_image, allow_destroy: true
- # @return [Boolean]
+ # @return [Boolean]
def has_duplicate?
Image.where(image_file_fingerprint: self.image_file_fingerprint).count > 1
end
- # @return [Array]
+ # @return [Array]
def duplicate_images
Image.where(image_file_fingerprint: self.image_file_fingerprint).not_self(self).to_a
end
- # @return [Hash]
- # returns a hash of EXIF data if present, empty hash if not.do
- # EXIF data tags/specifications - http://web.archive.org/web/20131018091152/http://exif.org/Exif2-2.PDF
+ # @return [Hash]
+ # returns a hash of EXIF data if present, empty hash if not.do
+ # EXIF data tags/specifications - http://web.archive.org/web/20131018091152/http://exif.org/Exif2-2.PDF
def exif
ret_val = {} # return value
@@ -128,6 +127,7 @@ def exif
ret_val # return
end
+ # TODO: move to /lib
# @return [Nil]
# currently handling this client side
def gps_data
@@ -151,17 +151,17 @@ def gps_data
# - maybe 2 versions? - one returns string, other decimal?
end
- # Returns the true, unscaled height/width ratio
- # @return [Float]
+ # Returns the true, unscaled height/width ratio
+ # @return [Float]
def hw_ratio
raise if height.nil? || width.nil? # if they are something has gone badly wrong
return (height.to_f / width.to_f)
end
- # rubocop:disable Style/StringHashKeys
- # used in ImageHelper#image_thumb_tag
- # asthetic scaling of very narrow images in thumbnails
- # @return [Hash]
+ # rubocop:disable Style/StringHashKeys
+ # used in ImageHelper#image_thumb_tag
+ # asthetic scaling of very narrow images in thumbnails
+ # @return [Hash]
def thumb_scaler
a = self.hw_ratio
if a < 0.6
@@ -170,23 +170,23 @@ def thumb_scaler
{}
end
end
- # rubocop:enable Style/StringHashKeys
+ # rubocop:enable Style/StringHashKeys
- # the scale factor is typically the same except in a few cases where we skew small thumbs
- # @param [Symbol] size
- # @return [Float]
+ # the scale factor is typically the same except in a few cases where we skew small thumbs
+ # @param [Symbol] size
+ # @return [Float]
def width_scale_for_size(size = :medium)
(width_for_size(size).to_f / width.to_f)
end
- # @param [Symbol] size
- # @return [Float]
+ # @param [Symbol] size
+ # @return [Float]
def height_scale_for_size(size = :medium)
height_for_size(size).to_f / height.to_f
end
- # @param [Symbol] size
- # @return [Float]
+ # @param [Symbol] size
+ # @return [Float]
def width_for_size(size = :medium)
a = self.hw_ratio
case size
@@ -203,8 +203,8 @@ def width_for_size(size = :medium)
end
end
- # @param [Symbol] size
- # @return [Float]
+ # @param [Symbol] size
+ # @return [Float]
def height_for_size(size = :medium)
a = self.hw_ratio
case size
@@ -221,23 +221,23 @@ def height_for_size(size = :medium)
end
end
- # def filename(layout_section_type)
- # 'tmp/' + tempfile(layout_section_type).path.split('/').last
- # end
+ # def filename(layout_section_type)
+ # 'tmp/' + tempfile(layout_section_type).path.split('/').last
+ # end
- # def tempfile(layout_section_type)
- # tempfile = Tempfile.new([layout_section_type.to_s, '.jpg'], "#{Rails.root.to_s}/public/images/tmp", encoding: 'ASCII-8BIT' )
- # tempfile.write(zoomed_image(layout_section_type).to_blob)
- # tempfile
- # end
+ # def tempfile(layout_section_type)
+ # tempfile = Tempfile.new([layout_section_type.to_s, '.jpg'], "#{Rails.root.to_s}/public/images/tmp", encoding: 'ASCII-8BIT' )
+ # tempfile.write(zoomed_image(layout_section_type).to_blob)
+ # tempfile
+ # end
- # @param [ActionController::Parameters] params
- # @return [Magick::Image]
+ # @param [ActionController::Parameters] params
+ # @return [Magick::Image]
def self.cropped(params)
image = Image.find(params[:id])
img = Magick::Image.read(image.image_file.path(:original)).first
begin
- # img.crop(x, y, width, height, true)
+ # img.crop(x, y, width, height, true)
cropped = img.crop( params[:x].to_i, params[:y].to_i, params[:width].to_i, params[:height].to_i, true)
rescue RuntimeError
cropped = img.crop(0,0, 1, 1) # return a single pixel on error ! TODO: make/return an error image
@@ -247,8 +247,8 @@ def self.cropped(params)
cropped
end
- # @param [ActionController::Parameters] params
- # @return [Magick::Image]
+ # @param [ActionController::Parameters] params
+ # @return [Magick::Image]
def self.resized(params)
c = cropped(params)
resized = c.resize(params[:new_width].to_i, params[:new_height].to_i) #.sharpen(0x1)
@@ -256,72 +256,75 @@ def self.resized(params)
resized
end
- # @param [ActionController::Parameters] params
- # @return [Magick::Image]
+ # @param [ActionController::Parameters] params
+ # @return [Magick::Image, nil]
def self.scaled_to_box(params)
- c = cropped(params)
- ratio = c.columns.to_f / c.rows.to_f
- box_ratio = params[:box_width].to_f / params[:box_height].to_f
- # TODO: special considerations for 1:1?
-
- if box_ratio > 1
- if ratio > 1 # wide into wide
- scaled = c.resize(
- params[:box_width].to_i,
- (params[:box_height].to_f / ratio * box_ratio).to_i
- ) #.sharpen(0x1)
- else # tall into wide
- scaled = c.resize(
- (params[:box_width ].to_f * ratio / box_ratio).to_i,
- params[:box_height].to_i
- ) #.sharpen(0x1)
- end
- else # <
- if ratio > 1 # wide into tall
- scaled = c.resize(
- params[:box_width].to_i,
- (params[:box_height].to_f / ratio * box_ratio).to_i
- ) #.sharpen(0x1)
- else # tall into tall # TODO: or 1:1?!
- scaled = c.resize(
- (params[:box_width ].to_f * ratio / box_ratio ).to_i,
- (params[:box_height].to_f ).to_i
- ) #.sharpen(0x1)
+ begin
+ c = cropped(params)
+ ratio = c.columns.to_f / c.rows.to_f
+ box_ratio = params[:box_width].to_f / params[:box_height].to_f
+ # TODO: special considerations for 1:1?
+
+ if box_ratio > 1
+ if ratio > 1 # wide into wide
+ scaled = c.resize(
+ params[:box_width].to_i,
+ (params[:box_height].to_f / ratio * box_ratio).to_i
+ ) #.sharpen(0x1)
+ else # tall into wide
+ scaled = c.resize(
+ (params[:box_width ].to_f * ratio / box_ratio).to_i,
+ params[:box_height].to_i
+ ) #.sharpen(0x1)
+ end
+ else # <
+ if ratio > 1 # wide into tall
+ scaled = c.resize(
+ params[:box_width].to_i,
+ (params[:box_height].to_f / ratio * box_ratio).to_i
+ ) #.sharpen(0x1)
+ else # tall into tall # TODO: or 1:1?!
+ scaled = c.resize(
+ (params[:box_width ].to_f * ratio / box_ratio ).to_i,
+ (params[:box_height].to_f ).to_i
+ ) #.sharpen(0x1)
+ end
end
+ c.destroy!
+ rescue Magick::ImageMagickError
+ nil
end
- c.destroy!
-
scaled
end
- # @param [ActionController::Parameters] params
- # @return [String]
+ # @param [ActionController::Parameters] params
+ # @return [String]
def self.scaled_to_box_blob(params)
self.to_blob!(scaled_to_box(params))
end
- # @param [ActionController::Parameters] params
- # @return [String]
+ # @param [ActionController::Parameters] params
+ # @return [String]
def self.resized_blob(params)
self.to_blob!(resized(params))
end
- # @param [ActionController::Parameters] params
- # @return [String]
+ # @param [ActionController::Parameters] params
+ # @return [String]
def self.cropped_blob(params)
self.to_blob!(cropped(params))
end
- # @param used_on [String] required, a depictable base class name like `Otu`, `Content`, or `CollectionObject`
- # @return [Scope]
- # the max 10 most recently used images, as `used_on`
+ # @param used_on [String] required, a depictable base class name like `Otu`, `Content`, or `CollectionObject`
+ # @return [Scope]
+ # the max 10 most recently used images, as `used_on`
def self.used_recently(user_id, project_id, used_on = '')
i = arel_table
d = Depiction.arel_table
# i is a select manager
j = d.project(d['image_id'], d['updated_at'], d['depiction_object_type']).from(d)
- .where(d['updated_at'].gt( 1.weeks.ago ))
+ .where(d['updated_at'].gt( 1.week.ago ))
.where(d['updated_by_id'].eq(user_id))
.where(d['project_id'].eq(project_id))
.order(d['updated_at'].desc)
@@ -335,39 +338,39 @@ def self.used_recently(user_id, project_id, used_on = '')
joins(k).distinct.pluck(:id)
end
- # @params target [String] required, one of nil, `AssertedDistribution`, `Content`, `BiologicalAssociation`, 'TaxonDetermination'
- # @return [Hash] images optimized for user selection
+ # @params target [String] required, one of nil, `AssertedDistribution`, `Content`, `BiologicalAssociation`, 'TaxonDetermination'
+ # @return [Hash] images optimized for user selection
def self.select_optimized(user_id, project_id, target = nil)
r = used_recently(user_id, project_id, target)
h = {
quick: [],
- pinboard: Image.pinned_by(user_id).where(project_id: project_id).to_a,
+ pinboard: Image.pinned_by(user_id).where(project_id:).to_a,
recent: []
}
if target && !r.empty?
h[:recent] = (
Image.where('"images"."id" IN (?)', r.first(5) ).to_a +
- Image.where(project_id: project_id, created_by_id: user_id, created_at: 3.hours.ago..Time.now)
+ Image.where(project_id:, created_by_id: user_id, created_at: 3.hours.ago..Time.now)
.order('updated_at DESC')
.limit(3).to_a
).uniq.sort{|a,b| a.updated_at <=> b.updated_at}
h[:quick] = (
- Image.pinned_by(user_id).pinboard_inserted.where(project_id: project_id).to_a +
+ Image.pinned_by(user_id).pinboard_inserted.where(project_id:).to_a +
Image.where('"images"."id" IN (?)', r.first(4) ).to_a)
.uniq.sort{|a,b| a.updated_at <=> b.updated_at}
else
- h[:recent] = Image.where(project_id: project_id).order('updated_at DESC').limit(10).to_a
- h[:quick] = Image.pinned_by(user_id).pinboard_inserted.where(pinboard_items: {project_id: project_id}).order('updated_at DESC')
+ h[:recent] = Image.where(project_id:).order('updated_at DESC').limit(10).to_a
+ h[:quick] = Image.pinned_by(user_id).pinboard_inserted.where(pinboard_items: {project_id:}).order('updated_at DESC')
end
h
end
- protected
+ protected
- # @return [Integer, Nil]
+ # @return [Integer, Nil]
def extract_tw_attributes
# NOTE: assumes content type is an image.
tempfile = image_file.queued_for_write[:original]
@@ -383,8 +386,8 @@ def extract_tw_attributes
end
end
- # Check md5 fingerprint against existing fingerprints
- # @return [Object]
+ # Check md5 fingerprint against existing fingerprints
+ # @return [Object]
def sv_duplicate_image?
if has_duplicate?
soft_validations.add(
@@ -393,13 +396,15 @@ def sv_duplicate_image?
end
end
- private
+ private
- # Converts image to blob and releases memory of img (image cannot be used afterwards)
- # @param [Magick::Image] img
- # @return [String] a JPG representation of the image
- # !! Always converts to .jpg, this may need abstraction later
+ # Converts image to blob and releases memory of img (image cannot be used afterwards)
+ # @param [Magick::Image] img
+ # @return [String] a JPG representation of the image
+ # !! Always converts to .jpg, this may need abstraction later
+ # Returns an empty string if no image
def self.to_blob!(img)
+ return '' if img.nil?
img.format = 'jpg'
blob = img.to_blob
img.destroy!
@@ -411,10 +416,10 @@ def image_dimensions_too_short
dimensions = Paperclip::Geometry.from_file(original)
- errors.add(:image_file, "width must be at least 16 pixels") if dimensions.width < 16
- errors.add(:image_file, "height must be at least 16 pixels") if dimensions.height < 16
+ errors.add(:image_file, 'width must be at least 16 pixels') if dimensions.width < 16
+ errors.add(:image_file, 'height must be at least 16 pixels') if dimensions.height < 16
rescue
- errors.add(:image_file, "unable to extract image dimensions")
+ errors.add(:image_file, 'unable to extract image dimensions')
end
end
diff --git a/app/models/sqed_depiction.rb b/app/models/sqed_depiction.rb
index 1c0bcbe4b6..aec79ed2e5 100644
--- a/app/models/sqed_depiction.rb
+++ b/app/models/sqed_depiction.rb
@@ -43,7 +43,7 @@ class SqedDepiction < ApplicationRecord
belongs_to :depiction
has_one :image, through: :depiction
- has_one :collection_object, through: :depiction, source_type: 'CollectionObject', source: :depiction_object
+ has_one :collection_object, through: :depiction, source_type: 'CollectionObject', source: :depiction_object
validates_presence_of :depiction
validates_presence_of :metadata_map, :boundary_color
@@ -54,6 +54,12 @@ class SqedDepiction < ApplicationRecord
accepts_nested_attributes_for :depiction
+ before_validation :set_invisible_boundary, if: -> { layout.presence == 'stage' }
+
+ def set_invisible_boundary
+ self.boundary_color = 'invisible'
+ end
+
after_save :recalculate, if: -> { rebuild }
def self.is_containable?
@@ -72,18 +78,16 @@ def extraction_metadata
{
boundary_color: boundary_color.to_sym,
boundary_finder: boundary_finder&.constantize,
- has_border: has_border,
+ has_border:,
layout: layout.to_sym,
metadata_map: sqed_metadata_map
}
end
- def depiction_object
- depiction.depiction_object
- end
+ delegate :depiction_object, to: :depiction
def self.annotates?
- false
+ false
end
def self.with_collection_object_data
@@ -108,12 +112,12 @@ def self.without_collection_object_data
# the next record in which the collection object has no buffered data
def next_without_data(progress = false)
if progress
- SqedDepiction.clear_stale_progress(self)
+ SqedDepiction.clear_stale_progress(self)
object = SqedDepiction.without_collection_object_data.with_project_id(project_id).where('collection_objects.id <> ?', depiction_object.id).where('sqed_depictions.id > ?', id).order(:id).first
- object.nil? ? SqedDepiction.where(in_progress: false, project_id: project_id).order(:id).first : object
+ object.nil? ? SqedDepiction.where(in_progress: false, project_id:).order(:id).first : object
else
object = SqedDepiction.without_collection_object_data.with_project_id(project_id).where('collection_objects.id <> ?', depiction_object.id).where('sqed_depictions.id > ?', id).order(:id).first
- object.nil? ? SqedDepiction.where(project_id: project_id).order(:id).first : object
+ object.nil? ? SqedDepiction.where(project_id:).order(:id).first : object
end
end
@@ -134,13 +138,13 @@ def self.clear_stale_progress(sqed_depiction = nil)
def self.last_without_data(project_id)
object = SqedDepiction.without_collection_object_data.with_project_id(project_id).order(:id).first
- object.nil? ? SqedDepiction.where(project_id: project_id).order(id: :asc).first : object
+ object.nil? ? SqedDepiction.where(project_id:).order(id: :asc).first : object
end
# @return [CollectionObject, nil]
# the next collection object, by :id, created from the addition of a SqedDepiction
def next_collection_object
- object = CollectionObject.joins(:sqed_depictions).where(project_id: project_id).where('sqed_depictions.id > ?', id).where('collection_objects.id <> ?', depiction_object.id).order(:id).first
+ object = CollectionObject.joins(:sqed_depictions).where(project_id:).where('sqed_depictions.id > ?', id).where('collection_objects.id <> ?', depiction_object.id).order(:id).first
object = CollectionObject.joins(:sqed_depictions).order(:id).first if object.nil?
object
end
@@ -153,7 +157,7 @@ def collecting_event_sections
end
def nearby_sqed_depictions(before = 5, after = 5, progress = false)
- q = SqedDepiction.where(project_id: project_id)
+ q = SqedDepiction.where(project_id:)
if progress == true
SqedDepiction.clear_stale_progress(self)
@@ -167,15 +171,15 @@ def nearby_sqed_depictions(before = 5, after = 5, progress = false)
end
def next_sqed_depiction
- sd = SqedDepiction.where(project_id: project_id).where('id > ?', id).order(:id).limit(1)
- sd.any? ? sd.first : SqedDepiction.where(project_id: project_id).first
+ sd = SqedDepiction.where(project_id:).where('id > ?', id).order(:id).limit(1)
+ sd.any? ? sd.first : SqedDepiction.where(project_id:).first
end
def preprocess(force = true)
return true if !File.exist?(depiction.image.image_file.path(:original))
# don't rebuild if not forced and one or both cache is empty
if !force
- if !result_ocr.blank? || !result_boundary_coordinates.blank?
+ if result_ocr.present? || result_boundary_coordinates.present?
return true
end
end
diff --git a/lib/utilities/geo.rb b/lib/utilities/geo.rb
index 6e16a0f567..e361f69da4 100644
--- a/lib/utilities/geo.rb
+++ b/lib/utilities/geo.rb
@@ -10,7 +10,32 @@ module Geo
# and are arbitrary decisions made by TaxonWorks collaborators.
DICTIONARY = {
'United States of America' => 'United States',
- }
+ }.freeze
+
+ # TODO: move to /lib
+ # @return [Nil]
+ # currently handling this client side
+ def gps_data
+ # if there is EXIF data, pulls out geographic coordinates & returns hash of lat/long in decimal degrees
+ # (5 digits after decimal point if available)
+ # EXIF gps information is in http://web.archive.org/web/20131018091152/http://exif.org/Exif2-2.PDF section 4.6.6
+ # note that cameras follow specifications, but EXIF data can be edited manually and may not follow specifications.
+
+ # check if gps data is in d m s (could be edited manually)
+ # => format dd/1,mm/1,ss/1 or dd/1,mmmm/100,0/1 or 40/1, 5/1, 314437/10000
+ # N = +
+ # S = -
+ # E = +
+ # W = -
+ # Altitude should be based on reference of sea level
+ # GPSAltitudeRef is 0 for above sea level, and 1 for below sea level
+
+ # From discussion with Jim -
+ # create a utility library called "GeoConvert" and define single method
+ # that will convert from degrees min sec to decimal degree
+ # - maybe 2 versions? - one returns string, other decimal?
+ end
+
=begin
To add a new (discovered) symbol:
@@ -105,10 +130,10 @@ def self.distance_in_meters(dist_in)
/(?f[oe]*[t]*\.*)|(?[^k]m(eters)*[\.]*)|(?kilometer(s)*|k[m]*[\.]*)|(?mi(le(s)*)*)/ =~ pieces[piece]
# scale = $&
- scale = 1 unless m.blank? # previously 1.0
- scale = 0.3048 unless ft.blank?
- scale = 1000 unless km.blank? # previously 1000.0
- scale = 1_609.344 unless mi.blank?
+ scale = 1 if m.present? # previously 1.0
+ scale = 0.3048 if ft.present?
+ scale = 1000 if km.present? # previously 1000.0
+ scale = 1_609.344 if mi.present?
value_sig = significant_digits(value.to_s)
if value_sig[0].include?('.')
@@ -151,35 +176,55 @@ def self.distance_in_meters(dist_in)
# Added Unicode right single (u2019) and double (u201D) quote as minutes seconds
REGEXP_COORD = {
# tt1: /\D?(?\d+\.\d+\s*(?[NS])*)\s(?\d+\.\d+\s*(?[EW])*)/i,
- dd1a: {reg: /(?\d+\.\d+\s*[NS])\s*(?\d+\.\d+\s*[EW])/i,
- hlp: 'decimal degrees, trailing ordinal, e.g. 23.23N 44.44W'},
-
- dd1b: {reg: /(?[NS]\s*\d+\.\d+)\s*(?[EW]\s*\d+\.\d+)/i,
- hlp: 'decimal degrees, leading ordinal, e.g. N23.23 W44.44'},
-
- dd2: {reg: /(?\d+[\. ]\d+\u0027?\s*[NS]),?\s*(?\d+[\. ]\d+\u0027?\s*[EW])/i,
- hlp: "decimal degrees, trailing ordinal, e.g. 43.836' N, 89.258' W"},
-
- dm1: {reg: /(?\d+\s*[\*°o\u02DA ](\d+[\.,]\d+|\d+)\s*[ ´\u0027\u02B9\u02BC\u02CA\u2019]?\s*[NS])[\.,;]?\s*(?\d+\s*[\*°ºo\u02DA ](\d+[\.,]\d+|\d+)\s*[ ´\u0027\u02B9\u02BC\u02CA\u2019]?\s*[WE])/i,
- hlp: "degrees, decimal minutes, trailing ordinal, e.g. 45 54.2'N, 78 43.5'E"},
-
- dms2: {reg: /(?[NS]\.?\s*\d+\s*[\*°ºo\u02DA ]\s*\d+\s*[ ´\u0027\u02B9\u02BC\u02CA\u2019]\s*(\d+[\.,]\d+|\d+)\s*[ "´\u02BA\u02EE\u0027\u02B9\u02BC\u02CA\u201D][´\u0027\u02B9\u02BC\u02CA]?)[\.,;]?\s*(?[WE]\.?\s*\d+\s*[\*°ºo\u02DA ]\s*\d+\s*[ \u0027´\u02B9\u02BC\u02CA\u2019]\s*(\d+[\.,]\d+|\d+)\s*[ "´\u02BA\u02EE\u0027\u02B9\u02BC\u02CA\u201D]?[´\u0027\u02B9\u02BC\u02CA]?)/i,
- hlp: "degrees, minutes, decimal seconds, leading ordinal, e.g. S42°5'18.1\" W88º11'43.3\""},
-
- dm3: {reg: /(?[NS]\.?\s*\d+\s*[\*°ºo\u02DA ]\s*(\d+[\.,]\d+|\d+)\s*([ ´\u0027\u02B9\u02BC\u02CA\u2019]))[\.,;]?\s*(?[WE]\.?\s*\d+\s*[\*°ºo\u02DA ]\s*(\d+[\.,]\d+|\d+)\s*[ ´\u0027\u02B9\u02BC\u02CA\u2019]?)/i,
- hlp: "degrees, decimal minutes, leading ordinal, e.g. S42º5.18' W88°11.43'"},
-
- dms4: {reg: /(?\d+\s*[\*°ºo\u02DA ]\s*(\d+[\.,]\d+|\d+)\s*[ ´\u0027\u02B9\u02BC\u02CA\u2019]?\s*(\d+[\.,]\d+|\d+)["\u201D]?\s*[NS])\s*(?\d+\s*[\*°ºo\u02DA ]\s*(\d+[\.,]\d+|\d+)\s*[ ´\u0027\u02B9\u02BC\u02CA\u2019]?\s*(\d+[\.,]\d+|\d+)+["\u201D]?\s*[EW])/i,
- hlp: "degrees, minutes, decimal seconds, trailing ordinal, e.g. 24º7'2.0\"S65º24'13.1\"W"},
-
- dd5: {reg: /(?[NS]\.?\s*(\d+[\.,]\d+|\d+)\s*[\*°ºo\u02DA ])[\.,;]?\s*(?([WE])\.?\s*(\d+[\.,]\d+|\d+)\s*[\*°ºo\u02DA ]?)/i,
- hlp: 'decimal degrees, leading ordinal, e.g. S42.18° W88.34°'},
-
- dd6: {reg: /(?(\d+[\.,]\d+|\d+)\s*[\*°ºo\u02DA ]\s*[NS])[\.,;]?\s*(?(\d+[\.|,]\d+|\d+)\s*[\*°ºo\u02DA ]\s*[WE])/i,
- hlp: 'decimal degrees, trailing ordinal, e.g. 42.18°S 88.43°W'},
-
- dd7: {reg: /\[(?-?\d+[\.,]\d+|\-?d+),.*?(?-?\d+[\.,]\d+|\-?d+)\]/i,
- hlp: 'decimal degrees, no ordinal, specific format, e.g. [12.263, -49.398]'}
+ dd1a: {
+ reg: /(?\d+\.\d+\s*[NS])\s*(?\d+\.\d+\s*[EW])/i,
+ hlp: 'decimal degrees, trailing ordinal, e.g. 23.23N 44.44W'
+ },
+
+ dd1b: {
+ reg: /(?[NS]\s*\d+\.\d+)\s*(?[EW]\s*\d+\.\d+)/i,
+ hlp: 'decimal degrees, leading ordinal, e.g. N23.23 W44.44'
+ },
+
+ dd2: {
+ reg: /(?\d+[\. ]\d+\u0027?\s*[NS]),?\s*(?\d+[\. ]\d+\u0027?\s*[EW])/i,
+ hlp: "decimal degrees, trailing ordinal, e.g. 43.836' N, 89.258' W"
+ },
+
+ dm1: {
+ reg: /(?\d+\s*[\*°o\u02DA ](\d+[\.,]\d+|\d+)\s*[ ´\u0027\u02B9\u02BC\u02CA\u2019]?\s*[NS])[\.,;]?\s*(?\d+\s*[\*°ºo\u02DA ](\d+[\.,]\d+|\d+)\s*[ ´\u0027\u02B9\u02BC\u02CA\u2019]?\s*[WE])/i,
+ hlp: "degrees, decimal minutes, trailing ordinal, e.g. 45 54.2'N, 78 43.5'E"
+ },
+
+ dms2: {
+ reg: /(?[NS]\.?\s*\d+\s*[\*°ºo\u02DA ]\s*\d+\s*[ ´\u0027\u02B9\u02BC\u02CA\u2019]\s*(\d+[\.,]\d+|\d+)\s*[ "´\u02BA\u02EE\u0027\u02B9\u02BC\u02CA\u201D][´\u0027\u02B9\u02BC\u02CA]?)[\.,;]?\s*(?[WE]\.?\s*\d+\s*[\*°ºo\u02DA ]\s*\d+\s*[ \u0027´\u02B9\u02BC\u02CA\u2019]\s*(\d+[\.,]\d+|\d+)\s*[ "´\u02BA\u02EE\u0027\u02B9\u02BC\u02CA\u201D]?[´\u0027\u02B9\u02BC\u02CA]?)/i,
+ hlp: "degrees, minutes, decimal seconds, leading ordinal, e.g. S42°5'18.1\" W88º11'43.3\""
+ },
+
+ dm3: {
+ reg: /(?[NS]\.?\s*\d+\s*[\*°ºo\u02DA ]\s*(\d+[\.,]\d+|\d+)\s*([ ´\u0027\u02B9\u02BC\u02CA\u2019]))[\.,;]?\s*(?[WE]\.?\s*\d+\s*[\*°ºo\u02DA ]\s*(\d+[\.,]\d+|\d+)\s*[ ´\u0027\u02B9\u02BC\u02CA\u2019]?)/i,
+ hlp: "degrees, decimal minutes, leading ordinal, e.g. S42º5.18' W88°11.43'"
+ },
+
+ dms4: {
+ reg: /(?\d+\s*[\*°ºo\u02DA ]\s*(\d+[\.,]\d+|\d+)\s*[ ´\u0027\u02B9\u02BC\u02CA\u2019]?\s*(\d+[\.,]\d+|\d+)["\u201D]?\s*[NS])\s*(?\d+\s*[\*°ºo\u02DA ]\s*(\d+[\.,]\d+|\d+)\s*[ ´\u0027\u02B9\u02BC\u02CA\u2019]?\s*(\d+[\.,]\d+|\d+)+["\u201D]?\s*[EW])/i,
+ hlp: "degrees, minutes, decimal seconds, trailing ordinal, e.g. 24º7'2.0\"S65º24'13.1\"W"
+ },
+
+ dd5: {
+ reg: /(?[NS]\.?\s*(\d+[\.,]\d+|\d+)\s*[\*°ºo\u02DA ])[\.,;]?\s*(?([WE])\.?\s*(\d+[\.,]\d+|\d+)\s*[\*°ºo\u02DA ]?)/i,
+ hlp: 'decimal degrees, leading ordinal, e.g. S42.18° W88.34°'
+ },
+
+ dd6: {
+ reg: /(?(\d+[\.,]\d+|\d+)\s*[\*°ºo\u02DA ]\s*[NS])[\.,;]?\s*(?(\d+[\.|,]\d+|\d+)\s*[\*°ºo\u02DA ]\s*[WE])/i,
+ hlp: 'decimal degrees, trailing ordinal, e.g. 42.18°S 88.43°W'
+ },
+
+ dd7: {
+ reg: /\[(?-?\d+[\.,]\d+|\-?d+),.*?(?-?\d+[\.,]\d+|\-?d+)\]/i,
+ hlp: 'decimal degrees, no ordinal, specific format, e.g. [12.263, -49.398]'
+ }
}.freeze
# @param [String] label
# @param [String] filters
@@ -465,7 +510,7 @@ def self.significant_digits(number_string)
if num.nil?
raise
end
- dp = num.index(".")
+ dp = num.index('.')
if dp.nil?
intg = num
intgl = intg.sub(/^[0]+/,'') # strip lead zeros
@@ -480,7 +525,7 @@ def self.significant_digits(number_string)
else
# make sure truly numeric
decimal_point = '.'
- digits = num.split(".")
+ digits = num.split('.')
if digits.length > 2
raise # or just ignore extra decimal point and beyond?
else
@@ -577,10 +622,10 @@ def self.conform_significant(number, sig_digits)
def self.coordinates_regex_from_verbatim_label(text)
return nil if text.blank?
text = text.gsub("''", '"')
- .gsub("´´", '"')
- .gsub("ʹʹ", '"')
- .gsub("ʼʼ", '"')
- .gsub("ˊˊ", '"')
+ .gsub('´´', '"')
+ .gsub('ʹʹ', '"')
+ .gsub('ʼʼ', '"')
+ .gsub('ˊˊ', '"')
.squish
text = ' ' + text + ' '
@@ -700,4 +745,29 @@ def self.coordinates_regex_from_verbatim_label(text)
end
end
+
+ # @return [Nil]
+ # currently handling this client side
+ def gps_data
+ # if there is EXIF data, pulls out geographic coordinates & returns hash of lat/long in decimal degrees
+ # (5 digits after decimal point if available)
+ # EXIF gps information is in http://web.archive.org/web/20131018091152/http://exif.org/Exif2-2.PDF section 4.6.6
+ # note that cameras follow specifications, but EXIF data can be edited manually and may not follow specifications.
+
+ # check if gps data is in d m s (could be edited manually)
+ # => format dd/1,mm/1,ss/1 or dd/1,mmmm/100,0/1 or 40/1, 5/1, 314437/10000
+ # N = +
+ # S = -
+ # E = +
+ # W = -
+ # Altitude should be based on reference of sea level
+ # GPSAltitudeRef is 0 for above sea level, and 1 for below sea level
+
+ # From discussion with Jim -
+ # create a utility library called "GeoConvert" and define single method
+ # that will convert from degrees min sec to decimal degree
+ # - maybe 2 versions? - one returns string, other decimal?
+ end
+
+
end
diff --git a/lib/vendor/sqed_to_taxonworks.rb b/lib/vendor/sqed_to_taxonworks.rb
index 11fb740174..1fb0625c15 100644
--- a/lib/vendor/sqed_to_taxonworks.rb
+++ b/lib/vendor/sqed_to_taxonworks.rb
@@ -53,7 +53,7 @@ def depiction
@depiction.depiction_object.notes.build()
@depiction.depiction_object.tags.build()
@depiction.depiction_object.identifiers.build(
- type: "Identifier::Local::CatalogNumber",
+ type: 'Identifier::Local::CatalogNumber',
namespace: (namespace_locked? ? Namespace.find(namespace_id) : nil),
)
rescue ActiveRecord::RecordNotFound
@@ -77,23 +77,31 @@ def sqed
def sqed_result
begin
@sqed_result ||= sqed.result
- rescue NoMethodError # TODO - better handling in Sqed
+
+ rescue Sqed::Error
@sqed_result = false
+
+ # rescue NoMethodError # TODO - better handling in Sqed
+ # @sqed_result = false
+
+ # TODO: likely remove TypeError
rescue TypeError
@sqed_result = false
+
rescue Magick::ImageMagickError => e
- if e.message.include?("unable to open image")
+ if e.message.include?('unable to open image')
@sqed_result = false
else
raise
end
rescue RuntimeError => e
- if e.message.include?("ImageMagick library function failed to return a result.")
+ if e.message.include?('ImageMagick library function failed to return a result.')
@sqed_result = false
else
raise
end
end
+
@sqed_result
end
@@ -101,7 +109,7 @@ def original_image
begin
@original_image ||= Magick::Image.read(depiction.image.image_file.path(:original)).first
rescue Magick::ImageMagickError => e
- if e.message.include?("unable to open image")
+ if e.message.include?('unable to open image')
@original_image = nil
else
raise
@@ -124,12 +132,8 @@ def ocr_cached?
def cache_boundaries
begin
sqed_depiction.update_column(:result_boundary_coordinates, sqed.boundaries.coordinates)
- rescue RuntimeError => e
- if e.message.include?("No image provided")
- sqed_depiction.update_column(:result_boundary_coordinates, nil)
- else
- raise
- end
+ rescue Sqed::Error
+ sqed_depiction.update_column(:result_boundary_coordinates, nil)
end
end
@@ -146,7 +150,7 @@ def cache_all
def ocr_for(layout_section_type)
index = sqed_depiction.extraction_metadata[:metadata_map].key(layout_section_type)
if ocr_cached?
- sqed_depiction.result_ocr[layout_section_type.to_s] && sqed_depiction.result_ocr[layout_section_type.to_s]["text"]
+ sqed_depiction.result_ocr[layout_section_type.to_s] && sqed_depiction.result_ocr[layout_section_type.to_s]['text']
else
sqed_result
cache_all
From bb87b83a8f1caad802b45c7af2718eb14c38207f Mon Sep 17 00:00:00 2001
From: mjy
Date: Tue, 16 May 2023 13:55:58 -0500
Subject: [PATCH 30/88] Bump sqed to fix layout issue
---
Gemfile | 2 +-
Gemfile.lock | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Gemfile b/Gemfile
index 5a62b9b56b..7ccb8dd3ae 100644
--- a/Gemfile
+++ b/Gemfile
@@ -108,7 +108,7 @@ gem 'ruby-graphviz', '~> 1.2.5', require: false
# "Bio" and SFG gems
gem 'taxonifi', '~> 0.6.0'
-gem 'sqed', '~>0.8.0'
+gem 'sqed', '~>0.8.1'
gem 'dwc_agent', '~> 3.0'
gem 'dwc-archive', github: 'LocoDelAssembly/dwc-archive', branch: 'overhaul' # '~> 1.1', '>= 1.1.2'
gem 'biodiversity', github: 'GlobalNamesArchitecture/biodiversity', branch: 'pipe_approach' # '~> 5.1', '>= 5.1.1'
diff --git a/Gemfile.lock b/Gemfile.lock
index 5ccc501b28..91251323fc 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -590,7 +590,7 @@ GEM
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
- sqed (0.8.0)
+ sqed (0.8.1)
rake (~> 13.0)
rmagick (~> 4.2)
rtesseract (~> 3.1)
@@ -777,7 +777,7 @@ DEPENDENCIES
sprockets (~> 3.7.2)
sprockets-es6 (~> 0.9.2)
sprockets-rails (~> 3.2.0)
- sqed (~> 0.8.0)
+ sqed (~> 0.8.1)
taxonifi (~> 0.6.0)
term-ansicolor (~> 1.6)
thor (~> 1.2)
From 7255b67b8fa27a79e9820a638f821f4d5a7f2bf1 Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Tue, 16 May 2023 16:00:58 -0300
Subject: [PATCH 31/88] Add left t layout
---
.../components/sqed/layouts/left_t.vue | 59 +++++++++++++++++++
.../images/new_image/components/sqed/sqed.vue | 2 +
2 files changed, 61 insertions(+)
create mode 100644 app/javascript/vue/tasks/images/new_image/components/sqed/layouts/left_t.vue
diff --git a/app/javascript/vue/tasks/images/new_image/components/sqed/layouts/left_t.vue b/app/javascript/vue/tasks/images/new_image/components/sqed/layouts/left_t.vue
new file mode 100644
index 0000000000..83027c9093
--- /dev/null
+++ b/app/javascript/vue/tasks/images/new_image/components/sqed/layouts/left_t.vue
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
diff --git a/app/javascript/vue/tasks/images/new_image/components/sqed/sqed.vue b/app/javascript/vue/tasks/images/new_image/components/sqed/sqed.vue
index ad6933fdcf..5a98a7dfe1 100644
--- a/app/javascript/vue/tasks/images/new_image/components/sqed/sqed.vue
+++ b/app/javascript/vue/tasks/images/new_image/components/sqed/sqed.vue
@@ -78,6 +78,7 @@ import NewObject from './newObject'
import EqualCrossLayout from './layouts/equal_cross'
import CrossLayout from './layouts/cross'
import RightTLayout from './layouts/right_t'
+import LeftTLayout from './layouts/left_t'
import HorizontalSplitLayout from './layouts/horizontal_split'
import HorizontalOffsetCrossLayout from './layouts/horizontal_offset_cross'
import VerticalOffsetCrossLayout from './layouts/vertical_offset_cross'
@@ -115,6 +116,7 @@ export default {
TagsComponent,
DataAttributes,
LepStage2Layout,
+ LeftTLayout,
TLayout,
InvertedTLayout,
NoneLayout
From e5f93469f8fc77c9a83c6bdc15c6cbd9a64c42f2 Mon Sep 17 00:00:00 2001
From: mjy
Date: Tue, 16 May 2023 14:03:22 -0500
Subject: [PATCH 32/88] Fix infinite division check
---
lib/vendor/sqed_to_taxonworks.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/vendor/sqed_to_taxonworks.rb b/lib/vendor/sqed_to_taxonworks.rb
index 1fb0625c15..9fe0a340ee 100644
--- a/lib/vendor/sqed_to_taxonworks.rb
+++ b/lib/vendor/sqed_to_taxonworks.rb
@@ -236,8 +236,8 @@ def large_height_for(layout_section_type)
def large_dimensions_for(layout_section_type)
c = coords_for(layout_section_type)
- return nil if c == [] || (c[2] == 0 and c[3] == 0)
- "0, 0, 400, #{(c[3].to_f / (c[2].to_f / 400)).to_i}"
+ return nil if c.blank? || c[2] == 0 || c[3] == 0
+ "0, 0, 400, #{( c[3].to_f / (c[2].to_f / 400)).to_i}"
end
def image_unavailable?
From b591680c65605213bee4c5d9c5baae77d46cd9ab Mon Sep 17 00:00:00 2001
From: mjy
Date: Tue, 16 May 2023 14:11:08 -0500
Subject: [PATCH 33/88] Fix loans dashboard when no loans present
---
CHANGELOG.md | 6 +++---
app/helpers/loans_helper.rb | 4 +++-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index dd22b1fb7e..abcb71a083 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,9 +22,9 @@ This project does not yet adheres to [Semantic Versioning](https://semv
- GeographicArea autocomplete (exact match on alternate value)
### Fixed
-
-- Staged image processing when boundaries fail to be calculated
-- Bug with interactive keys [#3416]
+- Loans dashboard fails to render when no loans are present
+- Staged image processing when boundaries fail to be calculated and calculate incorrectly
+- Bug with engine in interactive keys [#3416]
- Collection object classification summary [#3412]
- BibTeX typo [#3408]
- Includes `type material` and `type material observations` don't work in Filter images
diff --git a/app/helpers/loans_helper.rb b/app/helpers/loans_helper.rb
index 883170e358..0678426c58 100644
--- a/app/helpers/loans_helper.rb
+++ b/app/helpers/loans_helper.rb
@@ -188,6 +188,7 @@ def loan_fulfillment_latency(loans)
end
def arrayed_loan_year_hash(start_year, end_year)
+ return {} if start_year.blank? || end_year.blank?
years = {}
(start_year..end_year).to_a.each do |y|
years[y] = []
@@ -197,6 +198,7 @@ def arrayed_loan_year_hash(start_year, end_year)
end
def zeroed_loan_year_hash(start_year, end_year)
+ return {} if start_year.blank? || end_year.blank?
years = {}
(start_year..end_year).to_a.each do |y|
years[y] = 0
@@ -256,7 +258,7 @@ def loans_summary(loans)
tag.tr( tag.td('Year start (date sent)')+ tag.td(start_year) ),
tag.tr( tag.td('Year end (date sent)')+ tag.td(end_year) ),
- tag.tr( tag.td('Year span')+ tag.td(end_year - start_year) ),
+ tag.tr( tag.td('Year span')+ tag.td( [end_year, start_year].compact.size == 1 ? (end_year - start_year) : 0) ),
tag.tr( tag.td('Overdue') + tag.td( loans.overdue.count ) ),
tag.tr( tag.td('Not overdue') + tag.td( loans.not_overdue.count) ),
From be403507c3f0d9c94b96d3a8bf21975c9b3cec12 Mon Sep 17 00:00:00 2001
From: mjy
Date: Tue, 16 May 2023 14:47:16 -0500
Subject: [PATCH 34/88] Fix allows PubliContent to be reported on in activite
---
CHANGELOG.md | 1 +
app/models/public_content.rb | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index abcb71a083..a01688cad1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,7 @@ This project does not yet adheres to [Semantic Versioning](https://semv
- GeographicArea autocomplete (exact match on alternate value)
### Fixed
+- PublicContent missing is_community? method preventing reporting.
- Loans dashboard fails to render when no loans are present
- Staged image processing when boundaries fail to be calculated and calculate incorrectly
- Bug with engine in interactive keys [#3416]
diff --git a/app/models/public_content.rb b/app/models/public_content.rb
index a2a35259dd..ed5311f35a 100644
--- a/app/models/public_content.rb
+++ b/app/models/public_content.rb
@@ -37,4 +37,8 @@ def is_current?
content.text == text
end
+ def self.is_community?
+ false
+ end
+
end
From 015af1a7aeb25f8825341029f445794199d72101 Mon Sep 17 00:00:00 2001
From: Dmitry Dmitriev
Date: Wed, 17 May 2023 10:38:55 -0500
Subject: [PATCH 35/88] author and year for family group names
---
CHANGELOG.md | 1 +
app/models/taxon_name.rb | 7 ++++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a01688cad1..365d4d239a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,7 @@ This project does not yet adheres to [Semantic Versioning](https://semv
### Changed
+- Updated author and year string for family-group names
- Recent predicate list
- Recent languages list
- People autocomplete
diff --git a/app/models/taxon_name.rb b/app/models/taxon_name.rb
index 8118df0eef..982689e6af 100644
--- a/app/models/taxon_name.rb
+++ b/app/models/taxon_name.rb
@@ -633,7 +633,7 @@ def year_integer
# @return String, nil
# virtual attribute, to ultimately be fixed in db
def get_author
- cached_author_year&.gsub(/,\s\d+/, '')&.gsub(/[\(\)]/, '')
+ cached_author_year&.gsub(/,\s\(?\d+\)?\s\[\d+\]|,\s\(?\d+\)?/, '')
end
# !! Overrides Shared::Citations#nomenclature_date
@@ -1270,7 +1270,6 @@ def name_is_misapplied?
# return [String]
# the author and year of the name, adds parenthesis where asserted
def get_author_and_year
- # TODO: Isolate to Combination
if self.type == 'Combination'
c = protonyms_by_rank
return nil if c.empty?
@@ -1289,7 +1288,7 @@ def get_author_and_year
when :icn
ay = icn_author_and_year(taxon)
else
- ay = ([author_string] + [year_integer]).compact.join(' ') # TODO: !! cached_nomenclature_date is set here already, don't recalculate !!
+ ay = ([author_string] + [cached_nomenclature_date.year]).compact.join(' ')
end
(ay.presence)
end
@@ -1368,6 +1367,8 @@ def iczn_author_and_year(taxon)
ay = '(' + ay + ')' if !ay.empty? && og.normalized_genus.id != cg.normalized_genus.id
end
end
+ elsif FAMILY_RANK_NAMES_ICZN.include?(taxon.rank_string) && !y.empty? && cached_nomenclature_date.year != y.first
+ ay = ay + ' [' + cached_nomenclature_date.year.to_s + ']'
end
unless misapplication.empty? || obj.author_string.blank?
From 89329d2092ceac9fb0946638e44978e488fab7b7 Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Wed, 17 May 2023 13:13:19 -0300
Subject: [PATCH 36/88] Update packages
---
package-lock.json | 518 ++++++++++++++++++++++------------------------
package.json | 20 +-
2 files changed, 262 insertions(+), 276 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index f099fb1d6d..0937c6727b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,28 +9,28 @@
"version": "0.1.0",
"dependencies": {
"@geoman-io/leaflet-geoman-free": "^2.14.2",
- "@ibm/plex": "^6.2.0",
+ "@ibm/plex": "^6.3.0",
"@sfgrp/gbifference": "^0.0.5",
"@sfgrp/sled": "^1.0.3",
"@sfgrp/svg-radial-menu": "^1.0.7",
"axios": "^1.4.0",
"chart.js": "^4.3.0",
"d3": "^7.8.4",
- "dompurify": "^3.0.2",
+ "dompurify": "^3.0.3",
"easymde": "^2.18.0",
"exif-js": "^2.3.0",
"json2csv": "^5.0.7",
"leaflet": "^1.9.3",
"leaflet.pattern": "^0.1.0",
- "marked": "^5.0.0",
+ "marked": "^5.0.2",
"parse-dms": "0.0.5",
- "pdfjs-dist": "3.5.141",
- "pinia": "^2.0.35",
- "qs": "^6.11.1",
+ "pdfjs-dist": "3.6.172",
+ "pinia": "^2.1.1",
+ "qs": "^6.11.2",
"shakapacker": "6.6.0",
"v-hotkey": "^0.9.0",
- "v-network-graph": "^0.9.1",
- "vue": "^3.2.47",
+ "v-network-graph": "^0.9.3",
+ "vue": "^3.3.2",
"vue-handy-scroll": "^3.0.2",
"vue-tippy": "^6.1.2",
"vue-turbolinks": "^2.2.2",
@@ -43,7 +43,7 @@
"@babel/plugin-transform-runtime": "^7.21.4",
"@babel/preset-env": "^7.21.5",
"@babel/runtime": "^7.21.5",
- "@vue/compiler-sfc": "^3.2.47",
+ "@vue/compiler-sfc": "^3.3.2",
"babel-loader": "^9.1.2",
"compression-webpack-plugin": "^10.0.0",
"css-loader": "^6.7.3",
@@ -72,7 +72,7 @@
"stylus-loader": "^7.1.0",
"terser-webpack-plugin": "^5.3.7",
"url": "^0.11.0",
- "vue-loader": "^17.1.0",
+ "vue-loader": "^17.1.1",
"webpack": "^5.82.0",
"webpack-assets-manifest": "^5.1.0",
"webpack-cli": "^5.0.2",
@@ -2344,9 +2344,9 @@
"dev": true
},
"node_modules/@ibm/plex": {
- "version": "6.2.0",
- "resolved": "https://registry.npmjs.org/@ibm/plex/-/plex-6.2.0.tgz",
- "integrity": "sha512-0ddHQTHN2/LqGC9jahnb7+kR7Cq+EmI1Z+SUVmpehilMu0QZ6hNBU/lOM0O2as5pwZt8xMejKZw4qCMRW9vDLg=="
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/@ibm/plex/-/plex-6.3.0.tgz",
+ "integrity": "sha512-kb1ATGXrFu/gF2NZY40OlRUAEWCcrq9mIEYkuWqXUPaC6Zrb7iA9wQYTkJdAPP+V6ySfp7NLAyzAnK9c5k90Sg=="
},
"node_modules/@jest/schemas": {
"version": "29.4.3",
@@ -2542,9 +2542,9 @@
}
},
"node_modules/@mapbox/node-pre-gyp/node_modules/semver": {
- "version": "7.3.8",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
- "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
+ "version": "7.5.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz",
+ "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==",
"optional": true,
"dependencies": {
"lru-cache": "^6.0.0"
@@ -3072,49 +3072,49 @@
"dev": true
},
"node_modules/@vue/compiler-core": {
- "version": "3.2.47",
- "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.47.tgz",
- "integrity": "sha512-p4D7FDnQb7+YJmO2iPEv0SQNeNzcbHdGByJDsT4lynf63AFkOTFN07HsiRSvjGo0QrxR/o3d0hUyNCUnBU2Tig==",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.2.tgz",
+ "integrity": "sha512-CKZWo1dzsQYTNTft7whzjL0HsrEpMfiK7pjZ2WFE3bC1NA7caUjWioHSK+49y/LK7Bsm4poJZzAMnvZMQ7OTeg==",
"dependencies": {
- "@babel/parser": "^7.16.4",
- "@vue/shared": "3.2.47",
+ "@babel/parser": "^7.21.3",
+ "@vue/shared": "3.3.2",
"estree-walker": "^2.0.2",
- "source-map": "^0.6.1"
+ "source-map-js": "^1.0.2"
}
},
"node_modules/@vue/compiler-dom": {
- "version": "3.2.47",
- "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.47.tgz",
- "integrity": "sha512-dBBnEHEPoftUiS03a4ggEig74J2YBZ2UIeyfpcRM2tavgMWo4bsEfgCGsu+uJIL/vax9S+JztH8NmQerUo7shQ==",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.2.tgz",
+ "integrity": "sha512-6gS3auANuKXLw0XH6QxkWqyPYPunziS2xb6VRenM3JY7gVfZcJvkCBHkb5RuNY1FCbBO3lkIi0CdXUCW1c7SXw==",
"dependencies": {
- "@vue/compiler-core": "3.2.47",
- "@vue/shared": "3.2.47"
+ "@vue/compiler-core": "3.3.2",
+ "@vue/shared": "3.3.2"
}
},
"node_modules/@vue/compiler-sfc": {
- "version": "3.2.47",
- "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.47.tgz",
- "integrity": "sha512-rog05W+2IFfxjMcFw10tM9+f7i/+FFpZJJ5XHX72NP9eC2uRD+42M3pYcQqDXVYoj74kHMSEdQ/WmCjt8JFksQ==",
- "dependencies": {
- "@babel/parser": "^7.16.4",
- "@vue/compiler-core": "3.2.47",
- "@vue/compiler-dom": "3.2.47",
- "@vue/compiler-ssr": "3.2.47",
- "@vue/reactivity-transform": "3.2.47",
- "@vue/shared": "3.2.47",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.2.tgz",
+ "integrity": "sha512-jG4jQy28H4BqzEKsQqqW65BZgmo3vzdLHTBjF+35RwtDdlFE+Fk1VWJYUnDMMqkFBo6Ye1ltSKVOMPgkzYj7SQ==",
+ "dependencies": {
+ "@babel/parser": "^7.20.15",
+ "@vue/compiler-core": "3.3.2",
+ "@vue/compiler-dom": "3.3.2",
+ "@vue/compiler-ssr": "3.3.2",
+ "@vue/reactivity-transform": "3.3.2",
+ "@vue/shared": "3.3.2",
"estree-walker": "^2.0.2",
- "magic-string": "^0.25.7",
+ "magic-string": "^0.30.0",
"postcss": "^8.1.10",
- "source-map": "^0.6.1"
+ "source-map-js": "^1.0.2"
}
},
"node_modules/@vue/compiler-ssr": {
- "version": "3.2.47",
- "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.47.tgz",
- "integrity": "sha512-wVXC+gszhulcMD8wpxMsqSOpvDZ6xKXSVWkf50Guf/S+28hTAXPDYRTbLQ3EDkOP5Xz/+SY37YiwDquKbJOgZw==",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.2.tgz",
+ "integrity": "sha512-K8OfY5FQtZaSOJHHe8xhEfIfLrefL/Y9frv4k4NsyQL3+0lRKxr9QuJhfdBDjkl7Fhz8CzKh63mULvmOfx3l2w==",
"dependencies": {
- "@vue/compiler-dom": "3.2.47",
- "@vue/shared": "3.2.47"
+ "@vue/compiler-dom": "3.3.2",
+ "@vue/shared": "3.3.2"
}
},
"node_modules/@vue/devtools-api": {
@@ -3123,60 +3123,60 @@
"integrity": "sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q=="
},
"node_modules/@vue/reactivity": {
- "version": "3.2.47",
- "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.47.tgz",
- "integrity": "sha512-7khqQ/75oyyg+N/e+iwV6lpy1f5wq759NdlS1fpAhFXa8VeAIKGgk2E/C4VF59lx5b+Ezs5fpp/5WsRYXQiKxQ==",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.2.tgz",
+ "integrity": "sha512-yX8C4uTgg2Tdj+512EEMnMKbLveoITl7YdQX35AYgx8vBvQGszKiiCN46g4RY6/deeo/5DLbeUUGxCq1qWMf5g==",
"dependencies": {
- "@vue/shared": "3.2.47"
+ "@vue/shared": "3.3.2"
}
},
"node_modules/@vue/reactivity-transform": {
- "version": "3.2.47",
- "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.47.tgz",
- "integrity": "sha512-m8lGXw8rdnPVVIdIFhf0LeQ/ixyHkH5plYuS83yop5n7ggVJU+z5v0zecwEnX7fa7HNLBhh2qngJJkxpwEEmYA==",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.2.tgz",
+ "integrity": "sha512-iu2WaQvlJHdnONrsyv4ibIEnSsuKF+aHFngGj/y1lwpHQtalpVhKg9wsKMoiKXS9zPNjG9mNKzJS9vudvjzvyg==",
"dependencies": {
- "@babel/parser": "^7.16.4",
- "@vue/compiler-core": "3.2.47",
- "@vue/shared": "3.2.47",
+ "@babel/parser": "^7.20.15",
+ "@vue/compiler-core": "3.3.2",
+ "@vue/shared": "3.3.2",
"estree-walker": "^2.0.2",
- "magic-string": "^0.25.7"
+ "magic-string": "^0.30.0"
}
},
"node_modules/@vue/runtime-core": {
- "version": "3.2.47",
- "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.47.tgz",
- "integrity": "sha512-RZxbLQIRB/K0ev0K9FXhNbBzT32H9iRtYbaXb0ZIz2usLms/D55dJR2t6cIEUn6vyhS3ALNvNthI+Q95C+NOpA==",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.3.2.tgz",
+ "integrity": "sha512-qSl95qj0BvKfcsO+hICqFEoLhJn6++HtsPxmTkkadFbuhe3uQfJ8HmQwvEr7xbxBd2rcJB6XOJg7nWAn/ymC5A==",
"dependencies": {
- "@vue/reactivity": "3.2.47",
- "@vue/shared": "3.2.47"
+ "@vue/reactivity": "3.3.2",
+ "@vue/shared": "3.3.2"
}
},
"node_modules/@vue/runtime-dom": {
- "version": "3.2.47",
- "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.47.tgz",
- "integrity": "sha512-ArXrFTjS6TsDei4qwNvgrdmHtD930KgSKGhS5M+j8QxXrDJYLqYw4RRcDy1bz1m1wMmb6j+zGLifdVHtkXA7gA==",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.3.2.tgz",
+ "integrity": "sha512-+drStsJT+0mtgHdarT7cXZReCcTFfm6ptxMrz0kAW5hms6UNBd8Q1pi4JKlncAhu+Ld/TevsSp7pqAZxBBoGng==",
"dependencies": {
- "@vue/runtime-core": "3.2.47",
- "@vue/shared": "3.2.47",
- "csstype": "^2.6.8"
+ "@vue/runtime-core": "3.3.2",
+ "@vue/shared": "3.3.2",
+ "csstype": "^3.1.1"
}
},
"node_modules/@vue/server-renderer": {
- "version": "3.2.47",
- "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.47.tgz",
- "integrity": "sha512-dN9gc1i8EvmP9RCzvneONXsKfBRgqFeFZLurmHOveL7oH6HiFXJw5OGu294n1nHc/HMgTy6LulU/tv5/A7f/LA==",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.3.2.tgz",
+ "integrity": "sha512-QCwh6OGwJg6GDLE0fbQhRTR6tnU+XDJ1iCsTYHXBiezCXAhqMygFRij7BiLF4ytvvHcg5kX9joX5R5vP85++wg==",
"dependencies": {
- "@vue/compiler-ssr": "3.2.47",
- "@vue/shared": "3.2.47"
+ "@vue/compiler-ssr": "3.3.2",
+ "@vue/shared": "3.3.2"
},
"peerDependencies": {
- "vue": "3.2.47"
+ "vue": "3.3.2"
}
},
"node_modules/@vue/shared": {
- "version": "3.2.47",
- "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.47.tgz",
- "integrity": "sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ=="
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.2.tgz",
+ "integrity": "sha512-0rFu3h8JbclbnvvKrs7Fe5FNGV9/5X2rPD7KmOzhLSUAiQH5//Hq437Gv0fR5Mev3u/nbtvmLl8XgwCU20/ZfQ=="
},
"node_modules/@vue/test-utils": {
"version": "2.2.5",
@@ -3987,9 +3987,9 @@
]
},
"node_modules/canvas": {
- "version": "2.11.0",
- "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.11.0.tgz",
- "integrity": "sha512-bdTjFexjKJEwtIo0oRx8eD4G2yWoUOXP9lj279jmQ2zMnTQhT8C3512OKz3s+ZOaQlLbE7TuVvRDYDB3Llyy5g==",
+ "version": "2.11.2",
+ "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.11.2.tgz",
+ "integrity": "sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==",
"hasInstallScript": true,
"optional": true,
"dependencies": {
@@ -4737,9 +4737,9 @@
"dev": true
},
"node_modules/csstype": {
- "version": "2.6.21",
- "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.21.tgz",
- "integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w=="
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz",
+ "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ=="
},
"node_modules/d3": {
"version": "7.8.4",
@@ -5316,9 +5316,9 @@
}
},
"node_modules/dompurify": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.0.2.tgz",
- "integrity": "sha512-B8c6JdiEpxAKnd8Dm++QQxJL4lfuc757scZtcapj6qjTjrQzyq5iAyznLKVvK+77eYNiFblHBlt7MM0fOeqoKw=="
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.0.3.tgz",
+ "integrity": "sha512-axQ9zieHLnAnHh0sfAamKYiqXMJAVwu+LM/alQ7WDagoWessyWvMSFyW65CqF3owufNu8HBcE4cM2Vflu7YWcQ=="
},
"node_modules/domutils": {
"version": "3.0.1",
@@ -7874,11 +7874,14 @@
}
},
"node_modules/magic-string": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz",
- "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==",
+ "version": "0.30.0",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.0.tgz",
+ "integrity": "sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==",
"dependencies": {
- "sourcemap-codec": "^1.4.8"
+ "@jridgewell/sourcemap-codec": "^1.4.13"
+ },
+ "engines": {
+ "node": ">=12"
}
},
"node_modules/make-dir": {
@@ -7896,9 +7899,9 @@
}
},
"node_modules/marked": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/marked/-/marked-5.0.0.tgz",
- "integrity": "sha512-YQ6+L9l/NSBDjFgCQQebmTCc62EUdZ5RpIZ7A/FmC8IYMB5s7Cz8sT7imuMAkbIL4CvXpQLdW45fpK5UwiU7DA==",
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/marked/-/marked-5.0.2.tgz",
+ "integrity": "sha512-TXksm9GwqXCRNbFUZmMtqNLvy3K2cQHuWmyBDLOrY1e6i9UvZpOTJXoz7fBjYkJkaUFzV9hBFxMuZSyQt8R6KQ==",
"bin": {
"marked": "bin/marked.js"
},
@@ -8062,13 +8065,10 @@
"dev": true
},
"node_modules/minipass": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz",
- "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz",
+ "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==",
"optional": true,
- "dependencies": {
- "yallist": "^4.0.0"
- },
"engines": {
"node": ">=8"
}
@@ -8175,9 +8175,9 @@
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw=="
},
"node_modules/node-fetch": {
- "version": "2.6.7",
- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
- "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
+ "version": "2.6.11",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz",
+ "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==",
"optional": true,
"dependencies": {
"whatwg-url": "^5.0.0"
@@ -8564,9 +8564,9 @@
}
},
"node_modules/pdfjs-dist": {
- "version": "3.5.141",
- "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-3.5.141.tgz",
- "integrity": "sha512-lYIvyi5grtYOIatsfCifIKwxHeAJ8eHyP22DTdvY4pm0yWVSFQnMafpgCPSw8gaNRDDdcHnBVOkqMsyK8SRxZg==",
+ "version": "3.6.172",
+ "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-3.6.172.tgz",
+ "integrity": "sha512-bfOhCg+S9DXh/ImWhWYTOiq3aVMFSCvzGiBzsIJtdMC71kVWDBw7UXr32xh0y56qc5wMVylIeqV3hBaRsu+e+w==",
"dependencies": {
"path2d-polyfill": "^2.0.1",
"web-streams-polyfill": "^3.2.1"
@@ -8575,7 +8575,7 @@
"node": ">=16"
},
"optionalDependencies": {
- "canvas": "^2.11.0"
+ "canvas": "^2.11.2"
}
},
"node_modules/picocolors": {
@@ -8604,12 +8604,12 @@
}
},
"node_modules/pinia": {
- "version": "2.0.35",
- "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.0.35.tgz",
- "integrity": "sha512-P1IKKQWhxGXiiZ3atOaNI75bYlFUbRxtJdhPLX059Z7+b9Z04rnTZdSY8Aph1LA+/4QEMAYHsTQ638Wfe+6K5g==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.1.1.tgz",
+ "integrity": "sha512-Y2CgpcUtD8Ogdvo5LW5g20ykSZgnVDMgTSZFr40EvO6HB8axQk+0lHa1UrRah9wworFaxjovwRlY/wRICWj/KQ==",
"dependencies": {
"@vue/devtools-api": "^6.5.0",
- "vue-demi": "*"
+ "vue-demi": ">=0.14.2"
},
"funding": {
"url": "https://github.com/sponsors/posva"
@@ -8617,7 +8617,7 @@
"peerDependencies": {
"@vue/composition-api": "^1.4.0",
"typescript": ">=4.4.4",
- "vue": "^2.6.14 || ^3.2.0"
+ "vue": "^2.6.14 || ^3.3.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
@@ -8629,9 +8629,9 @@
}
},
"node_modules/pinia/node_modules/vue-demi": {
- "version": "0.13.11",
- "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz",
- "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==",
+ "version": "0.14.4",
+ "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.4.tgz",
+ "integrity": "sha512-YR9bCmtIYgsqNVRG3MLLWlhbZ9tTNMuWHPd7yx0pHS3NDX17MeVNHgKTOClYE8pBjsfNe4CMaReP7zQtHDIbiA==",
"hasInstallScript": true,
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
@@ -9884,9 +9884,9 @@
}
},
"node_modules/qs": {
- "version": "6.11.1",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz",
- "integrity": "sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==",
+ "version": "6.11.2",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz",
+ "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==",
"dependencies": {
"side-channel": "^1.0.4"
},
@@ -10765,12 +10765,6 @@
"source-map": "^0.6.0"
}
},
- "node_modules/sourcemap-codec": {
- "version": "1.4.8",
- "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz",
- "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==",
- "deprecated": "Please use @jridgewell/sourcemap-codec instead"
- },
"node_modules/spdy": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz",
@@ -11043,14 +11037,14 @@
}
},
"node_modules/tar": {
- "version": "6.1.13",
- "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz",
- "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==",
+ "version": "6.1.15",
+ "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.15.tgz",
+ "integrity": "sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A==",
"optional": true,
"dependencies": {
"chownr": "^2.0.0",
"fs-minipass": "^2.0.0",
- "minipass": "^4.0.0",
+ "minipass": "^5.0.0",
"minizlib": "^2.1.1",
"mkdirp": "^1.0.3",
"yallist": "^4.0.0"
@@ -11424,9 +11418,9 @@
"hasInstallScript": true
},
"node_modules/v-network-graph": {
- "version": "0.9.1",
- "resolved": "https://registry.npmjs.org/v-network-graph/-/v-network-graph-0.9.1.tgz",
- "integrity": "sha512-3oB2+wBqaDSNSeg7iFZa4ekSqw/3Ec+qQ9mHvMKT/BKU6Jt2LePh6pMPXCiNo5k4S+NJ6LCTlRYz4cGT2W+4Iw==",
+ "version": "0.9.3",
+ "resolved": "https://registry.npmjs.org/v-network-graph/-/v-network-graph-0.9.3.tgz",
+ "integrity": "sha512-po6IyJ7VBNSsXa6EV+oyjuktZnQM+pCSLR/DAcMkZjJ9c2oNLi0G6Et9RjK/mCO/4r3mnk8u1Z/XmjkRPLbT5w==",
"dependencies": {
"@dash14/svg-pan-zoom": "^3.6.9",
"lodash-es": "^4.17.21",
@@ -11451,15 +11445,15 @@
}
},
"node_modules/vue": {
- "version": "3.2.47",
- "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.47.tgz",
- "integrity": "sha512-60188y/9Dc9WVrAZeUVSDxRQOZ+z+y5nO2ts9jWXSTkMvayiWxCWOWtBQoYjLeccfXkiiPZWAHcV+WTPhkqJHQ==",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/vue/-/vue-3.3.2.tgz",
+ "integrity": "sha512-98hJcAhyDwZoOo2flAQBSPVYG/o0HA9ivIy2ktHshjE+6/q8IMQ+kvDKQzOZTFPxvnNMcGM+zS2A00xeZMA7tA==",
"dependencies": {
- "@vue/compiler-dom": "3.2.47",
- "@vue/compiler-sfc": "3.2.47",
- "@vue/runtime-dom": "3.2.47",
- "@vue/server-renderer": "3.2.47",
- "@vue/shared": "3.2.47"
+ "@vue/compiler-dom": "3.3.2",
+ "@vue/compiler-sfc": "3.3.2",
+ "@vue/runtime-dom": "3.3.2",
+ "@vue/server-renderer": "3.3.2",
+ "@vue/shared": "3.3.2"
}
},
"node_modules/vue-eslint-parser": {
@@ -11510,9 +11504,9 @@
}
},
"node_modules/vue-loader": {
- "version": "17.1.0",
- "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-17.1.0.tgz",
- "integrity": "sha512-zAjrT+TNWTpgRODxqDfzbDyvuTf5kCP9xmMk8aspQKuYNnTY2r0XK/bHu1DKLpSpk0I6fkQph5OLKB7HcRIPZw==",
+ "version": "17.1.1",
+ "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-17.1.1.tgz",
+ "integrity": "sha512-qpqEVkKdrAsgyIBMHaiXurDeCuBWqRyKqg2GI4aG3NbggEls+BLqTZdqahbJJh7fm83sz+iz3gg6eDWdbNlG7Q==",
"dev": true,
"dependencies": {
"chalk": "^4.1.0",
@@ -13671,9 +13665,9 @@
"dev": true
},
"@ibm/plex": {
- "version": "6.2.0",
- "resolved": "https://registry.npmjs.org/@ibm/plex/-/plex-6.2.0.tgz",
- "integrity": "sha512-0ddHQTHN2/LqGC9jahnb7+kR7Cq+EmI1Z+SUVmpehilMu0QZ6hNBU/lOM0O2as5pwZt8xMejKZw4qCMRW9vDLg=="
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/@ibm/plex/-/plex-6.3.0.tgz",
+ "integrity": "sha512-kb1ATGXrFu/gF2NZY40OlRUAEWCcrq9mIEYkuWqXUPaC6Zrb7iA9wQYTkJdAPP+V6ySfp7NLAyzAnK9c5k90Sg=="
},
"@jest/schemas": {
"version": "29.4.3",
@@ -13831,9 +13825,9 @@
},
"dependencies": {
"semver": {
- "version": "7.3.8",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
- "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
+ "version": "7.5.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz",
+ "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==",
"optional": true,
"requires": {
"lru-cache": "^6.0.0"
@@ -14290,49 +14284,49 @@
"dev": true
},
"@vue/compiler-core": {
- "version": "3.2.47",
- "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.47.tgz",
- "integrity": "sha512-p4D7FDnQb7+YJmO2iPEv0SQNeNzcbHdGByJDsT4lynf63AFkOTFN07HsiRSvjGo0QrxR/o3d0hUyNCUnBU2Tig==",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.2.tgz",
+ "integrity": "sha512-CKZWo1dzsQYTNTft7whzjL0HsrEpMfiK7pjZ2WFE3bC1NA7caUjWioHSK+49y/LK7Bsm4poJZzAMnvZMQ7OTeg==",
"requires": {
- "@babel/parser": "^7.16.4",
- "@vue/shared": "3.2.47",
+ "@babel/parser": "^7.21.3",
+ "@vue/shared": "3.3.2",
"estree-walker": "^2.0.2",
- "source-map": "^0.6.1"
+ "source-map-js": "^1.0.2"
}
},
"@vue/compiler-dom": {
- "version": "3.2.47",
- "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.47.tgz",
- "integrity": "sha512-dBBnEHEPoftUiS03a4ggEig74J2YBZ2UIeyfpcRM2tavgMWo4bsEfgCGsu+uJIL/vax9S+JztH8NmQerUo7shQ==",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.2.tgz",
+ "integrity": "sha512-6gS3auANuKXLw0XH6QxkWqyPYPunziS2xb6VRenM3JY7gVfZcJvkCBHkb5RuNY1FCbBO3lkIi0CdXUCW1c7SXw==",
"requires": {
- "@vue/compiler-core": "3.2.47",
- "@vue/shared": "3.2.47"
+ "@vue/compiler-core": "3.3.2",
+ "@vue/shared": "3.3.2"
}
},
"@vue/compiler-sfc": {
- "version": "3.2.47",
- "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.47.tgz",
- "integrity": "sha512-rog05W+2IFfxjMcFw10tM9+f7i/+FFpZJJ5XHX72NP9eC2uRD+42M3pYcQqDXVYoj74kHMSEdQ/WmCjt8JFksQ==",
- "requires": {
- "@babel/parser": "^7.16.4",
- "@vue/compiler-core": "3.2.47",
- "@vue/compiler-dom": "3.2.47",
- "@vue/compiler-ssr": "3.2.47",
- "@vue/reactivity-transform": "3.2.47",
- "@vue/shared": "3.2.47",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.2.tgz",
+ "integrity": "sha512-jG4jQy28H4BqzEKsQqqW65BZgmo3vzdLHTBjF+35RwtDdlFE+Fk1VWJYUnDMMqkFBo6Ye1ltSKVOMPgkzYj7SQ==",
+ "requires": {
+ "@babel/parser": "^7.20.15",
+ "@vue/compiler-core": "3.3.2",
+ "@vue/compiler-dom": "3.3.2",
+ "@vue/compiler-ssr": "3.3.2",
+ "@vue/reactivity-transform": "3.3.2",
+ "@vue/shared": "3.3.2",
"estree-walker": "^2.0.2",
- "magic-string": "^0.25.7",
+ "magic-string": "^0.30.0",
"postcss": "^8.1.10",
- "source-map": "^0.6.1"
+ "source-map-js": "^1.0.2"
}
},
"@vue/compiler-ssr": {
- "version": "3.2.47",
- "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.47.tgz",
- "integrity": "sha512-wVXC+gszhulcMD8wpxMsqSOpvDZ6xKXSVWkf50Guf/S+28hTAXPDYRTbLQ3EDkOP5Xz/+SY37YiwDquKbJOgZw==",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.2.tgz",
+ "integrity": "sha512-K8OfY5FQtZaSOJHHe8xhEfIfLrefL/Y9frv4k4NsyQL3+0lRKxr9QuJhfdBDjkl7Fhz8CzKh63mULvmOfx3l2w==",
"requires": {
- "@vue/compiler-dom": "3.2.47",
- "@vue/shared": "3.2.47"
+ "@vue/compiler-dom": "3.3.2",
+ "@vue/shared": "3.3.2"
}
},
"@vue/devtools-api": {
@@ -14341,57 +14335,57 @@
"integrity": "sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q=="
},
"@vue/reactivity": {
- "version": "3.2.47",
- "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.47.tgz",
- "integrity": "sha512-7khqQ/75oyyg+N/e+iwV6lpy1f5wq759NdlS1fpAhFXa8VeAIKGgk2E/C4VF59lx5b+Ezs5fpp/5WsRYXQiKxQ==",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.2.tgz",
+ "integrity": "sha512-yX8C4uTgg2Tdj+512EEMnMKbLveoITl7YdQX35AYgx8vBvQGszKiiCN46g4RY6/deeo/5DLbeUUGxCq1qWMf5g==",
"requires": {
- "@vue/shared": "3.2.47"
+ "@vue/shared": "3.3.2"
}
},
"@vue/reactivity-transform": {
- "version": "3.2.47",
- "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.47.tgz",
- "integrity": "sha512-m8lGXw8rdnPVVIdIFhf0LeQ/ixyHkH5plYuS83yop5n7ggVJU+z5v0zecwEnX7fa7HNLBhh2qngJJkxpwEEmYA==",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.2.tgz",
+ "integrity": "sha512-iu2WaQvlJHdnONrsyv4ibIEnSsuKF+aHFngGj/y1lwpHQtalpVhKg9wsKMoiKXS9zPNjG9mNKzJS9vudvjzvyg==",
"requires": {
- "@babel/parser": "^7.16.4",
- "@vue/compiler-core": "3.2.47",
- "@vue/shared": "3.2.47",
+ "@babel/parser": "^7.20.15",
+ "@vue/compiler-core": "3.3.2",
+ "@vue/shared": "3.3.2",
"estree-walker": "^2.0.2",
- "magic-string": "^0.25.7"
+ "magic-string": "^0.30.0"
}
},
"@vue/runtime-core": {
- "version": "3.2.47",
- "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.47.tgz",
- "integrity": "sha512-RZxbLQIRB/K0ev0K9FXhNbBzT32H9iRtYbaXb0ZIz2usLms/D55dJR2t6cIEUn6vyhS3ALNvNthI+Q95C+NOpA==",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.3.2.tgz",
+ "integrity": "sha512-qSl95qj0BvKfcsO+hICqFEoLhJn6++HtsPxmTkkadFbuhe3uQfJ8HmQwvEr7xbxBd2rcJB6XOJg7nWAn/ymC5A==",
"requires": {
- "@vue/reactivity": "3.2.47",
- "@vue/shared": "3.2.47"
+ "@vue/reactivity": "3.3.2",
+ "@vue/shared": "3.3.2"
}
},
"@vue/runtime-dom": {
- "version": "3.2.47",
- "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.47.tgz",
- "integrity": "sha512-ArXrFTjS6TsDei4qwNvgrdmHtD930KgSKGhS5M+j8QxXrDJYLqYw4RRcDy1bz1m1wMmb6j+zGLifdVHtkXA7gA==",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.3.2.tgz",
+ "integrity": "sha512-+drStsJT+0mtgHdarT7cXZReCcTFfm6ptxMrz0kAW5hms6UNBd8Q1pi4JKlncAhu+Ld/TevsSp7pqAZxBBoGng==",
"requires": {
- "@vue/runtime-core": "3.2.47",
- "@vue/shared": "3.2.47",
- "csstype": "^2.6.8"
+ "@vue/runtime-core": "3.3.2",
+ "@vue/shared": "3.3.2",
+ "csstype": "^3.1.1"
}
},
"@vue/server-renderer": {
- "version": "3.2.47",
- "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.47.tgz",
- "integrity": "sha512-dN9gc1i8EvmP9RCzvneONXsKfBRgqFeFZLurmHOveL7oH6HiFXJw5OGu294n1nHc/HMgTy6LulU/tv5/A7f/LA==",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.3.2.tgz",
+ "integrity": "sha512-QCwh6OGwJg6GDLE0fbQhRTR6tnU+XDJ1iCsTYHXBiezCXAhqMygFRij7BiLF4ytvvHcg5kX9joX5R5vP85++wg==",
"requires": {
- "@vue/compiler-ssr": "3.2.47",
- "@vue/shared": "3.2.47"
+ "@vue/compiler-ssr": "3.3.2",
+ "@vue/shared": "3.3.2"
}
},
"@vue/shared": {
- "version": "3.2.47",
- "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.47.tgz",
- "integrity": "sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ=="
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.2.tgz",
+ "integrity": "sha512-0rFu3h8JbclbnvvKrs7Fe5FNGV9/5X2rPD7KmOzhLSUAiQH5//Hq437Gv0fR5Mev3u/nbtvmLl8XgwCU20/ZfQ=="
},
"@vue/test-utils": {
"version": "2.2.5",
@@ -14999,9 +14993,9 @@
"integrity": "sha512-ewDad7+D2vlyy+E4UJuVfiBsU69IL+8oVmTuZnH5Q6CIUbxNfI50uVpRHbUPDD6SUaN2o0Lh4DhTrvLG/Tn1yg=="
},
"canvas": {
- "version": "2.11.0",
- "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.11.0.tgz",
- "integrity": "sha512-bdTjFexjKJEwtIo0oRx8eD4G2yWoUOXP9lj279jmQ2zMnTQhT8C3512OKz3s+ZOaQlLbE7TuVvRDYDB3Llyy5g==",
+ "version": "2.11.2",
+ "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.11.2.tgz",
+ "integrity": "sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==",
"optional": true,
"requires": {
"@mapbox/node-pre-gyp": "^1.0.0",
@@ -15507,9 +15501,9 @@
}
},
"csstype": {
- "version": "2.6.21",
- "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.21.tgz",
- "integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w=="
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz",
+ "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ=="
},
"d3": {
"version": "7.8.4",
@@ -15919,9 +15913,9 @@
}
},
"dompurify": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.0.2.tgz",
- "integrity": "sha512-B8c6JdiEpxAKnd8Dm++QQxJL4lfuc757scZtcapj6qjTjrQzyq5iAyznLKVvK+77eYNiFblHBlt7MM0fOeqoKw=="
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.0.3.tgz",
+ "integrity": "sha512-axQ9zieHLnAnHh0sfAamKYiqXMJAVwu+LM/alQ7WDagoWessyWvMSFyW65CqF3owufNu8HBcE4cM2Vflu7YWcQ=="
},
"domutils": {
"version": "3.0.1",
@@ -17776,11 +17770,11 @@
}
},
"magic-string": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz",
- "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==",
+ "version": "0.30.0",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.0.tgz",
+ "integrity": "sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==",
"requires": {
- "sourcemap-codec": "^1.4.8"
+ "@jridgewell/sourcemap-codec": "^1.4.13"
}
},
"make-dir": {
@@ -17792,9 +17786,9 @@
}
},
"marked": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/marked/-/marked-5.0.0.tgz",
- "integrity": "sha512-YQ6+L9l/NSBDjFgCQQebmTCc62EUdZ5RpIZ7A/FmC8IYMB5s7Cz8sT7imuMAkbIL4CvXpQLdW45fpK5UwiU7DA=="
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/marked/-/marked-5.0.2.tgz",
+ "integrity": "sha512-TXksm9GwqXCRNbFUZmMtqNLvy3K2cQHuWmyBDLOrY1e6i9UvZpOTJXoz7fBjYkJkaUFzV9hBFxMuZSyQt8R6KQ=="
},
"mdn-data": {
"version": "2.0.30",
@@ -17903,13 +17897,10 @@
"dev": true
},
"minipass": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz",
- "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==",
- "optional": true,
- "requires": {
- "yallist": "^4.0.0"
- }
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz",
+ "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==",
+ "optional": true
},
"minizlib": {
"version": "2.1.2",
@@ -17985,9 +17976,9 @@
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw=="
},
"node-fetch": {
- "version": "2.6.7",
- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
- "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
+ "version": "2.6.11",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz",
+ "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==",
"optional": true,
"requires": {
"whatwg-url": "^5.0.0"
@@ -18255,11 +18246,11 @@
"integrity": "sha512-ad/3bsalbbWhmBo0D6FZ4RNMwsLsPpL6gnvhuSaU5Vm7b06Kr5ubSltQQ0T7YKsiJQO+g22zJ4dJKNTXIyOXtA=="
},
"pdfjs-dist": {
- "version": "3.5.141",
- "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-3.5.141.tgz",
- "integrity": "sha512-lYIvyi5grtYOIatsfCifIKwxHeAJ8eHyP22DTdvY4pm0yWVSFQnMafpgCPSw8gaNRDDdcHnBVOkqMsyK8SRxZg==",
+ "version": "3.6.172",
+ "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-3.6.172.tgz",
+ "integrity": "sha512-bfOhCg+S9DXh/ImWhWYTOiq3aVMFSCvzGiBzsIJtdMC71kVWDBw7UXr32xh0y56qc5wMVylIeqV3hBaRsu+e+w==",
"requires": {
- "canvas": "^2.11.0",
+ "canvas": "^2.11.2",
"path2d-polyfill": "^2.0.1",
"web-streams-polyfill": "^3.2.1"
}
@@ -18281,18 +18272,18 @@
"dev": true
},
"pinia": {
- "version": "2.0.35",
- "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.0.35.tgz",
- "integrity": "sha512-P1IKKQWhxGXiiZ3atOaNI75bYlFUbRxtJdhPLX059Z7+b9Z04rnTZdSY8Aph1LA+/4QEMAYHsTQ638Wfe+6K5g==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.1.1.tgz",
+ "integrity": "sha512-Y2CgpcUtD8Ogdvo5LW5g20ykSZgnVDMgTSZFr40EvO6HB8axQk+0lHa1UrRah9wworFaxjovwRlY/wRICWj/KQ==",
"requires": {
"@vue/devtools-api": "^6.5.0",
- "vue-demi": "*"
+ "vue-demi": ">=0.14.2"
},
"dependencies": {
"vue-demi": {
- "version": "0.13.11",
- "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz",
- "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==",
+ "version": "0.14.4",
+ "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.4.tgz",
+ "integrity": "sha512-YR9bCmtIYgsqNVRG3MLLWlhbZ9tTNMuWHPd7yx0pHS3NDX17MeVNHgKTOClYE8pBjsfNe4CMaReP7zQtHDIbiA==",
"requires": {}
}
}
@@ -19038,9 +19029,9 @@
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
},
"qs": {
- "version": "6.11.1",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz",
- "integrity": "sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==",
+ "version": "6.11.2",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz",
+ "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==",
"requires": {
"side-channel": "^1.0.4"
}
@@ -19673,11 +19664,6 @@
"source-map": "^0.6.0"
}
},
- "sourcemap-codec": {
- "version": "1.4.8",
- "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz",
- "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA=="
- },
"spdy": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz",
@@ -19862,14 +19848,14 @@
"integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ=="
},
"tar": {
- "version": "6.1.13",
- "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz",
- "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==",
+ "version": "6.1.15",
+ "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.15.tgz",
+ "integrity": "sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A==",
"optional": true,
"requires": {
"chownr": "^2.0.0",
"fs-minipass": "^2.0.0",
- "minipass": "^4.0.0",
+ "minipass": "^5.0.0",
"minizlib": "^2.1.1",
"mkdirp": "^1.0.3",
"yallist": "^4.0.0"
@@ -20137,9 +20123,9 @@
}
},
"v-network-graph": {
- "version": "0.9.1",
- "resolved": "https://registry.npmjs.org/v-network-graph/-/v-network-graph-0.9.1.tgz",
- "integrity": "sha512-3oB2+wBqaDSNSeg7iFZa4ekSqw/3Ec+qQ9mHvMKT/BKU6Jt2LePh6pMPXCiNo5k4S+NJ6LCTlRYz4cGT2W+4Iw==",
+ "version": "0.9.3",
+ "resolved": "https://registry.npmjs.org/v-network-graph/-/v-network-graph-0.9.3.tgz",
+ "integrity": "sha512-po6IyJ7VBNSsXa6EV+oyjuktZnQM+pCSLR/DAcMkZjJ9c2oNLi0G6Et9RjK/mCO/4r3mnk8u1Z/XmjkRPLbT5w==",
"requires": {
"@dash14/svg-pan-zoom": "^3.6.9",
"lodash-es": "^4.17.21",
@@ -20152,15 +20138,15 @@
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="
},
"vue": {
- "version": "3.2.47",
- "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.47.tgz",
- "integrity": "sha512-60188y/9Dc9WVrAZeUVSDxRQOZ+z+y5nO2ts9jWXSTkMvayiWxCWOWtBQoYjLeccfXkiiPZWAHcV+WTPhkqJHQ==",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/vue/-/vue-3.3.2.tgz",
+ "integrity": "sha512-98hJcAhyDwZoOo2flAQBSPVYG/o0HA9ivIy2ktHshjE+6/q8IMQ+kvDKQzOZTFPxvnNMcGM+zS2A00xeZMA7tA==",
"requires": {
- "@vue/compiler-dom": "3.2.47",
- "@vue/compiler-sfc": "3.2.47",
- "@vue/runtime-dom": "3.2.47",
- "@vue/server-renderer": "3.2.47",
- "@vue/shared": "3.2.47"
+ "@vue/compiler-dom": "3.3.2",
+ "@vue/compiler-sfc": "3.3.2",
+ "@vue/runtime-dom": "3.3.2",
+ "@vue/server-renderer": "3.3.2",
+ "@vue/shared": "3.3.2"
}
},
"vue-eslint-parser": {
@@ -20196,9 +20182,9 @@
"requires": {}
},
"vue-loader": {
- "version": "17.1.0",
- "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-17.1.0.tgz",
- "integrity": "sha512-zAjrT+TNWTpgRODxqDfzbDyvuTf5kCP9xmMk8aspQKuYNnTY2r0XK/bHu1DKLpSpk0I6fkQph5OLKB7HcRIPZw==",
+ "version": "17.1.1",
+ "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-17.1.1.tgz",
+ "integrity": "sha512-qpqEVkKdrAsgyIBMHaiXurDeCuBWqRyKqg2GI4aG3NbggEls+BLqTZdqahbJJh7fm83sz+iz3gg6eDWdbNlG7Q==",
"dev": true,
"requires": {
"chalk": "^4.1.0",
diff --git a/package.json b/package.json
index 9df03f62d3..4410307276 100644
--- a/package.json
+++ b/package.json
@@ -3,28 +3,28 @@
"private": true,
"dependencies": {
"@geoman-io/leaflet-geoman-free": "^2.14.2",
- "@ibm/plex": "^6.2.0",
+ "@ibm/plex": "^6.3.0",
"@sfgrp/gbifference": "^0.0.5",
"@sfgrp/sled": "^1.0.3",
"@sfgrp/svg-radial-menu": "^1.0.7",
"axios": "^1.4.0",
"chart.js": "^4.3.0",
"d3": "^7.8.4",
- "dompurify": "^3.0.2",
+ "dompurify": "^3.0.3",
"easymde": "^2.18.0",
"exif-js": "^2.3.0",
"json2csv": "^5.0.7",
"leaflet": "^1.9.3",
"leaflet.pattern": "^0.1.0",
- "marked": "^5.0.0",
+ "marked": "^5.0.2",
"parse-dms": "0.0.5",
- "pdfjs-dist": "3.5.141",
- "pinia": "^2.0.35",
- "qs": "^6.11.1",
+ "pdfjs-dist": "3.6.172",
+ "pinia": "^2.1.1",
+ "qs": "^6.11.2",
"shakapacker": "6.6.0",
"v-hotkey": "^0.9.0",
- "v-network-graph": "^0.9.1",
- "vue": "^3.2.47",
+ "v-network-graph": "^0.9.3",
+ "vue": "^3.3.2",
"vue-handy-scroll": "^3.0.2",
"vue-tippy": "^6.1.2",
"vue-turbolinks": "^2.2.2",
@@ -46,7 +46,7 @@
"@babel/plugin-transform-runtime": "^7.21.4",
"@babel/preset-env": "^7.21.5",
"@babel/runtime": "^7.21.5",
- "@vue/compiler-sfc": "^3.2.47",
+ "@vue/compiler-sfc": "^3.3.2",
"babel-loader": "^9.1.2",
"compression-webpack-plugin": "^10.0.0",
"css-loader": "^6.7.3",
@@ -75,7 +75,7 @@
"stylus-loader": "^7.1.0",
"terser-webpack-plugin": "^5.3.7",
"url": "^0.11.0",
- "vue-loader": "^17.1.0",
+ "vue-loader": "^17.1.1",
"webpack": "^5.82.0",
"webpack-assets-manifest": "^5.1.0",
"webpack-cli": "^5.0.2",
From 208e4b7bbe4098b86bdeccf8ead81acdbb42a1c6 Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Wed, 17 May 2023 13:55:45 -0300
Subject: [PATCH 37/88] add useSession option for FormCitation
---
.../vue/components/Form/FormCitation.vue | 30 ++-
.../asserted_distributions_annotator.vue | 1 +
.../biological_relationships_annotator.vue | 184 ++++++++++--------
3 files changed, 130 insertions(+), 85 deletions(-)
diff --git a/app/javascript/vue/components/Form/FormCitation.vue b/app/javascript/vue/components/Form/FormCitation.vue
index ecd2eb0351..6c0c68c191 100644
--- a/app/javascript/vue/components/Form/FormCitation.vue
+++ b/app/javascript/vue/components/Form/FormCitation.vue
@@ -117,6 +117,11 @@ const props = defineProps({
default: false
},
+ useSession: {
+ type: Boolean,
+ default: false
+ },
+
absentField: {
type: Boolean,
default: false
@@ -178,17 +183,23 @@ watch(sourceId, async (newId, oldId) => {
})
watch(isAbsent, (newVal) => {
- sessionStorage.setItem(STORAGE.isAbsent, newVal)
+ if (props.useSession) {
+ sessionStorage.setItem(STORAGE.isAbsent, newVal)
+ }
})
watch(isLocked, (newVal) => {
- sessionStorage.setItem(STORAGE.lock, newVal)
+ if (props.useSession) {
+ sessionStorage.setItem(STORAGE.lock, newVal)
+ }
emit('lock', newVal)
})
function setSource(value) {
source.value = value
- sessionStorage.setItem(STORAGE.sourceId, value.id)
+ if (props.useSession) {
+ sessionStorage.setItem(STORAGE.sourceId, value.id)
+ }
citation.value.source_id = value.id
citation.value._label = value.cached
@@ -196,11 +207,15 @@ function setSource(value) {
}
function setPage(e) {
- sessionStorage.setItem(STORAGE.pages, e.target.value)
+ if (props.useSession) {
+ sessionStorage.setItem(STORAGE.pages, e.target.value)
+ }
}
function setIsOriginal(e) {
- sessionStorage.setItem(STORAGE.isOriginal, e.target.value)
+ if (props.useSession) {
+ sessionStorage.setItem(STORAGE.isOriginal, e.target.value)
+ }
}
function setLastCitation() {
@@ -220,13 +235,14 @@ function setLastCitation() {
}
function init() {
- const lockStoreValue = convertType(sessionStorage.getItem(STORAGE.lock))
+ const lockStoreValue =
+ props.useSession && convertType(sessionStorage.getItem(STORAGE.lock))
if (lockStoreValue) {
isLocked.value = lockStoreValue
}
- if (props.lockButton && lockStoreValue) {
+ if (props.lockButton && lockStoreValue && props.useSession) {
citation.value.source_id = convertType(
sessionStorage.getItem(STORAGE.sourceId)
)
diff --git a/app/javascript/vue/components/radials/object/components/asserted_distributions/asserted_distributions_annotator.vue b/app/javascript/vue/components/radials/object/components/asserted_distributions/asserted_distributions_annotator.vue
index 8ac5809336..6b46c5ecf8 100644
--- a/app/javascript/vue/components/radials/object/components/asserted_distributions/asserted_distributions_annotator.vue
+++ b/app/javascript/vue/components/radials/object/components/asserted_distributions/asserted_distributions_annotator.vue
@@ -21,6 +21,7 @@
:target="ASSERTED_DISTRIBUTION"
absent-field
lock-button
+ use-session
@lock="lock.source = $event"
/>
+ @click="reset"
+ >
Cancel
-
+
-
+ class="relation-title middle"
+ >
+
+ class="subtle relation-title"
+ >
Choose related OTU/collection object
-
+
- {{
- createdBiologicalAssociation
- ? 'Update'
- : 'Create'
- }}
+ {{ createdBiologicalAssociation ? 'Update' : 'Create' }}
@@ -126,7 +128,6 @@
From afc47d422049be4f6ef90a602e8bd62259db5d6b Mon Sep 17 00:00:00 2001
From: Dmitry Dmitriev
Date: Wed, 17 May 2023 12:15:31 -0500
Subject: [PATCH 38/88] author and year for family group names
---
app/models/taxon_name.rb | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/app/models/taxon_name.rb b/app/models/taxon_name.rb
index 982689e6af..226fc14466 100644
--- a/app/models/taxon_name.rb
+++ b/app/models/taxon_name.rb
@@ -1288,7 +1288,7 @@ def get_author_and_year
when :icn
ay = icn_author_and_year(taxon)
else
- ay = ([author_string] + [cached_nomenclature_date.year]).compact.join(' ')
+ ay = ([author_string] + [cached_nomenclature_date&.year]).compact.join(' ')
end
(ay.presence)
end
@@ -1367,8 +1367,8 @@ def iczn_author_and_year(taxon)
ay = '(' + ay + ')' if !ay.empty? && og.normalized_genus.id != cg.normalized_genus.id
end
end
- elsif FAMILY_RANK_NAMES_ICZN.include?(taxon.rank_string) && !y.empty? && cached_nomenclature_date.year != y.first
- ay = ay + ' [' + cached_nomenclature_date.year.to_s + ']'
+ elsif FAMILY_RANK_NAMES_ICZN.include?(taxon.rank_string) && !y.empty? && cached_nomenclature_date&.year != y.first
+ ay = ay + ' [' + cached_nomenclature_date&.year.to_s + ']'
end
unless misapplication.empty? || obj.author_string.blank?
@@ -1396,7 +1396,7 @@ def get_cached_classified_as
# @return [Boolean]
def parent_is_set?
- !parent_id.nil? || (parent && parent.persisted?)
+ !parent_id.nil? || (parent&.persisted?)
end
# TODO: this should be paginated, not all IDs!
From d1b23c583460cbdaa13db9e246548457b78a9020 Mon Sep 17 00:00:00 2001
From: Dmitry Dmitriev
Date: Wed, 17 May 2023 15:25:25 -0500
Subject: [PATCH 39/88] geographic_area_autocomplete
---
.../geographic_areas_controller.rb | 7 +---
app/helpers/geographic_areas_helper.rb | 6 +--
.../autocomplete.json.jbuilder | 4 +-
lib/queries/geographic_area/autocomplete.rb | 41 ++++++++++++++-----
lib/queries/person/autocomplete.rb | 4 +-
lib/queries/query/autocomplete.rb | 4 +-
lib/queries/source/filter.rb | 6 +--
7 files changed, 44 insertions(+), 28 deletions(-)
diff --git a/app/controllers/geographic_areas_controller.rb b/app/controllers/geographic_areas_controller.rb
index 157065667b..85ac53eaf4 100644
--- a/app/controllers/geographic_areas_controller.rb
+++ b/app/controllers/geographic_areas_controller.rb
@@ -46,11 +46,8 @@ def search
end
def autocomplete
- c = Queries::GeographicArea::Autocomplete.new(params[:term]).autocomplete
- @geographic_areas = c.sort_by{|geographic_area|
- -(geographic_area.collecting_events.where(project_id: sessions_current_project_id).count +
- geographic_area.asserted_distributions.where(project_id: sessions_current_project_id).count + (geographic_area.has_shape? && 1||0))
- }
+ c = Queries::GeographicArea::Autocomplete.new(params[:term], project_id: [sessions_current_project_id]).autocomplete
+ @geographic_areas = c #.sort_by{|geographic_area| -(geographic_area.has_shape? && 1||0) }
end
# GET /geographic_areas/download
diff --git a/app/helpers/geographic_areas_helper.rb b/app/helpers/geographic_areas_helper.rb
index faa8e83738..9fed5e5ad6 100644
--- a/app/helpers/geographic_areas_helper.rb
+++ b/app/helpers/geographic_areas_helper.rb
@@ -23,11 +23,9 @@ def geographic_area_autocomplete_tag(geographic_area, term)
# s += " (#{geographic_area.parent.name}) " unless geographic_area.parent.nil?
s += content_tag(:span, geographic_area.geographic_area_type.name, class: [:feedback, 'feedback-info', 'feedback-thin']) unless geographic_area.geographic_area_type.nil?
s += ' ' + (geographic_area.has_shape? ? content_tag(:span, 'has shape', class: [:feedback, 'feedback-success', 'feedback-thin']) : content_tag(:span, 'without shape', class: [:feedback, 'feedback-danger', 'feedback-thin']) )
-
- c = geographic_area.collecting_events.where(project_id: sessions_current_project_id).count + geographic_area.asserted_distributions.where(project_id: sessions_current_project_id).count
-
+ c = geographic_area.collecting_events.where(project_id: sessions_current_project_id).count + geographic_area.asserted_distributions.where(project_id: sessions_current_project_id).count
s += ' ' + ( c > 0 ? content_tag(:span, "#{c.to_s} #{'use'.pluralize(c)}".html_safe, class: [:feedback, 'feedback-secondary', 'feedback-thin']) : '' )
-
+
s.html_safe
end
diff --git a/app/views/geographic_areas/autocomplete.json.jbuilder b/app/views/geographic_areas/autocomplete.json.jbuilder
index bafa4ea362..e4665c84bf 100644
--- a/app/views/geographic_areas/autocomplete.json.jbuilder
+++ b/app/views/geographic_areas/autocomplete.json.jbuilder
@@ -4,9 +4,9 @@ json.array! @geographic_areas do |g|
json.label_html geographic_area_autocomplete_tag(g, params[:term])
json.gid g.to_global_id.to_s
- json.response_values do
+ json.response_values do
if params[:method]
json.set! params[:method], g.id
end
- end
+ end
end
diff --git a/lib/queries/geographic_area/autocomplete.rb b/lib/queries/geographic_area/autocomplete.rb
index ecdfc137cb..c0b78ae049 100644
--- a/lib/queries/geographic_area/autocomplete.rb
+++ b/lib/queries/geographic_area/autocomplete.rb
@@ -25,21 +25,42 @@ def autocomplete_alternate_values_name
def autocomplete
return [] if query_string.blank?
queries = [
- ::GeographicArea.where(id: query_string).all,
- ::GeographicArea.where(name: query_string).all,
- ::GeographicArea.joins(:alternate_values).where('alternate_values.value ILIKE ?', query_string).all,
- ::GeographicArea.joins(parent_child_join).where(Arel.sql(parent_child_where.to_sql)).limit(5).all,
- ::GeographicArea.where(Arel.sql(where_sql)).includes(:geographic_area_type, :geographic_items).order(Arel.sql('LENGTH(name)')).limit(dynamic_limit).all,
- autocomplete_exact_id,
- autocomplete_identifier_cached_exact,
- autocomplete_identifier_identifier_exact,
- autocomplete_alternate_values_name.limit(20)
+ [ ::GeographicArea.where(id: query_string).all, false ],
+ [ ::GeographicArea.where(name: query_string).all, true ],
+ [ ::GeographicArea.joins(:alternate_values).where('alternate_values.value ILIKE ?', query_string).all, true ],
+ [ ::GeographicArea.joins(parent_child_join).where(Arel.sql(parent_child_where.to_sql)).limit(5).all, true ],
+ [ ::GeographicArea.where(Arel.sql(where_sql)).limit(dynamic_limit).all, true ],
+ [ autocomplete_exact_id, false ],
+ [ autocomplete_identifier_cached_exact, false ],
+ [ autocomplete_identifier_identifier_exact, false ],
+ [ autocomplete_alternate_values_name.limit(20), true ]
]
queries.compact!
+ updated_queries = []
+ pr_id = project_id.join(',') if project_id
+
+ queries.each_with_index do |q, i|
+ a = q[0]
+
+ if q[1] # do not use extended query for identifiers
+ if project_id.present?
+
+ if !a.nil?
+ a = a.left_outer_joins(:asserted_distributions)
+ .left_outer_joins(:collecting_events)
+ .select("geographic_areas.*, (COUNT(collecting_events.id) + COUNT(asserted_distributions.id)) AS use_count, CASE WHEN asserted_distributions.project_id IN (#{pr_id}) THEN asserted_distributions.project_id WHEN collecting_events.project_id IN (#{pr_id}) THEN collecting_events.project_id ELSE NULL END AS in_project")
+ .group('geographic_areas.id, collecting_events.project_id, asserted_distributions.project_id')
+ .order('in_project, use_count DESC')
+ end
+ end
+ end
+ updated_queries[i] = a
+ end
result = []
- queries.each do |q|
+ updated_queries.compact!
+ updated_queries.each do |q|
result += q.includes(:geographic_areas_geographic_items).to_a
result.uniq!
break if result.count > 19
diff --git a/lib/queries/person/autocomplete.rb b/lib/queries/person/autocomplete.rb
index e8b45d49c6..318578b0a7 100644
--- a/lib/queries/person/autocomplete.rb
+++ b/lib/queries/person/autocomplete.rb
@@ -146,11 +146,11 @@ def autocomplete
# .order('in_project, use_count DESC')
end
end
-
- updated_queries[i] = a
end
+ updated_queries[i] = a
end
result = []
+ updated_queries.compact!
updated_queries.each do |q|
result += q.to_a
result.uniq!
diff --git a/lib/queries/query/autocomplete.rb b/lib/queries/query/autocomplete.rb
index 319739cfff..787bd83c80 100644
--- a/lib/queries/query/autocomplete.rb
+++ b/lib/queries/query/autocomplete.rb
@@ -113,12 +113,12 @@ def parent_child_join
table.join(parent).on(table[:parent_id].eq(parent[:id])).join_sources
end
- # Match at two levels, for example, 'te wa" will match "Texas, Washington Co."
+ # Match at two levels, for example, 'wa te" will match "Washington Co., Texas"
# @return [Arel::Nodes::Grouping]
def parent_child_where
a,b = query_string.split(/\s+/, 2)
return table[:id].eq(-1) if a.nil? || b.nil?
- parent[:name].matches("#{a}%").and(table[:name].matches("#{b}%"))
+ table[:name].matches("#{a}%").and(parent[:name].matches("#{b}%"))
end
# @return [Arel::Nodes, nil]
diff --git a/lib/queries/source/filter.rb b/lib/queries/source/filter.rb
index 2df2aa15e0..7def7f36c7 100644
--- a/lib/queries/source/filter.rb
+++ b/lib/queries/source/filter.rb
@@ -297,7 +297,7 @@ def author_id_facet
def topic_id_facet
return nil if topic_id.empty?
- ::Source.joins(:citation_topics).where(citation_topics: { topic_id: }).distinct
+ ::Source.joins(:citation_topics).where(citation_topics: { topic_id: topic_id}).distinct
end
def in_project_facet
@@ -305,7 +305,7 @@ def in_project_facet
if in_project
::Source.joins(:project_sources)
- .where(project_sources: {project_id:})
+ .where(project_sources: {project_id: project_id})
else
::Source.left_outer_joins(:project_sources)
.where('project_sources.project_id != ? OR project_sources.id IS NULL', project_id) # TODO: probably project_id
@@ -379,7 +379,7 @@ def serial_facet
def citation_object_type_facet
return nil if citation_object_type.empty?
::Source.joins(:citations)
- .where(citations: {citation_object_type:}).distinct
+ .where(citations: {citation_object_type: citation_object_type}).distinct
end
def nomenclature_facet
From 7640aa30551b5fdaf4f101ab2fd9bca44a20dc5c Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Thu, 18 May 2023 09:59:09 -0300
Subject: [PATCH 40/88] Fix constant typo
---
app/controllers/images_controller.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/controllers/images_controller.rb b/app/controllers/images_controller.rb
index 56964e6ad4..66e52cdde6 100644
--- a/app/controllers/images_controller.rb
+++ b/app/controllers/images_controller.rb
@@ -23,7 +23,7 @@ def index
# GET /api/v1/otus/:id/inventory/images
# - routed here to take advantage of Pagination
def api_image_inventory
- @images = ::Queries::Imag::Filter.new(
+ @images = ::Queries::Image::Filter.new(
params.permit(
:otu_id, otu_scope: [])
).all.page(params[:page]).per(params[:per])
From ab592466925bc4a29b0add3cb719a6f13005b255 Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Thu, 18 May 2023 11:13:27 -0300
Subject: [PATCH 41/88] Update packages
---
package-lock.json | 280 +++++++++++++++++++++++-----------------------
package.json | 8 +-
2 files changed, 144 insertions(+), 144 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 0937c6727b..8553cf85ba 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -20,17 +20,17 @@
"easymde": "^2.18.0",
"exif-js": "^2.3.0",
"json2csv": "^5.0.7",
- "leaflet": "^1.9.3",
+ "leaflet": "^1.9.4",
"leaflet.pattern": "^0.1.0",
"marked": "^5.0.2",
"parse-dms": "0.0.5",
"pdfjs-dist": "3.6.172",
- "pinia": "^2.1.1",
+ "pinia": "^2.1.2",
"qs": "^6.11.2",
"shakapacker": "6.6.0",
"v-hotkey": "^0.9.0",
"v-network-graph": "^0.9.3",
- "vue": "^3.3.2",
+ "vue": "^3.3.4",
"vue-handy-scroll": "^3.0.2",
"vue-tippy": "^6.1.2",
"vue-turbolinks": "^2.2.2",
@@ -43,7 +43,7 @@
"@babel/plugin-transform-runtime": "^7.21.4",
"@babel/preset-env": "^7.21.5",
"@babel/runtime": "^7.21.5",
- "@vue/compiler-sfc": "^3.3.2",
+ "@vue/compiler-sfc": "^3.3.4",
"babel-loader": "^9.1.2",
"compression-webpack-plugin": "^10.0.0",
"css-loader": "^6.7.3",
@@ -3072,36 +3072,36 @@
"dev": true
},
"node_modules/@vue/compiler-core": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.2.tgz",
- "integrity": "sha512-CKZWo1dzsQYTNTft7whzjL0HsrEpMfiK7pjZ2WFE3bC1NA7caUjWioHSK+49y/LK7Bsm4poJZzAMnvZMQ7OTeg==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.4.tgz",
+ "integrity": "sha512-cquyDNvZ6jTbf/+x+AgM2Arrp6G4Dzbb0R64jiG804HRMfRiFXWI6kqUVqZ6ZR0bQhIoQjB4+2bhNtVwndW15g==",
"dependencies": {
"@babel/parser": "^7.21.3",
- "@vue/shared": "3.3.2",
+ "@vue/shared": "3.3.4",
"estree-walker": "^2.0.2",
"source-map-js": "^1.0.2"
}
},
"node_modules/@vue/compiler-dom": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.2.tgz",
- "integrity": "sha512-6gS3auANuKXLw0XH6QxkWqyPYPunziS2xb6VRenM3JY7gVfZcJvkCBHkb5RuNY1FCbBO3lkIi0CdXUCW1c7SXw==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.4.tgz",
+ "integrity": "sha512-wyM+OjOVpuUukIq6p5+nwHYtj9cFroz9cwkfmP9O1nzH68BenTTv0u7/ndggT8cIQlnBeOo6sUT/gvHcIkLA5w==",
"dependencies": {
- "@vue/compiler-core": "3.3.2",
- "@vue/shared": "3.3.2"
+ "@vue/compiler-core": "3.3.4",
+ "@vue/shared": "3.3.4"
}
},
"node_modules/@vue/compiler-sfc": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.2.tgz",
- "integrity": "sha512-jG4jQy28H4BqzEKsQqqW65BZgmo3vzdLHTBjF+35RwtDdlFE+Fk1VWJYUnDMMqkFBo6Ye1ltSKVOMPgkzYj7SQ==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.4.tgz",
+ "integrity": "sha512-6y/d8uw+5TkCuzBkgLS0v3lSM3hJDntFEiUORM11pQ/hKvkhSKZrXW6i69UyXlJQisJxuUEJKAWEqWbWsLeNKQ==",
"dependencies": {
"@babel/parser": "^7.20.15",
- "@vue/compiler-core": "3.3.2",
- "@vue/compiler-dom": "3.3.2",
- "@vue/compiler-ssr": "3.3.2",
- "@vue/reactivity-transform": "3.3.2",
- "@vue/shared": "3.3.2",
+ "@vue/compiler-core": "3.3.4",
+ "@vue/compiler-dom": "3.3.4",
+ "@vue/compiler-ssr": "3.3.4",
+ "@vue/reactivity-transform": "3.3.4",
+ "@vue/shared": "3.3.4",
"estree-walker": "^2.0.2",
"magic-string": "^0.30.0",
"postcss": "^8.1.10",
@@ -3109,12 +3109,12 @@
}
},
"node_modules/@vue/compiler-ssr": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.2.tgz",
- "integrity": "sha512-K8OfY5FQtZaSOJHHe8xhEfIfLrefL/Y9frv4k4NsyQL3+0lRKxr9QuJhfdBDjkl7Fhz8CzKh63mULvmOfx3l2w==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.4.tgz",
+ "integrity": "sha512-m0v6oKpup2nMSehwA6Uuu+j+wEwcy7QmwMkVNVfrV9P2qE5KshC6RwOCq8fjGS/Eak/uNb8AaWekfiXxbBB6gQ==",
"dependencies": {
- "@vue/compiler-dom": "3.3.2",
- "@vue/shared": "3.3.2"
+ "@vue/compiler-dom": "3.3.4",
+ "@vue/shared": "3.3.4"
}
},
"node_modules/@vue/devtools-api": {
@@ -3123,60 +3123,60 @@
"integrity": "sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q=="
},
"node_modules/@vue/reactivity": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.2.tgz",
- "integrity": "sha512-yX8C4uTgg2Tdj+512EEMnMKbLveoITl7YdQX35AYgx8vBvQGszKiiCN46g4RY6/deeo/5DLbeUUGxCq1qWMf5g==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.4.tgz",
+ "integrity": "sha512-kLTDLwd0B1jG08NBF3R5rqULtv/f8x3rOFByTDz4J53ttIQEDmALqKqXY0J+XQeN0aV2FBxY8nJDf88yvOPAqQ==",
"dependencies": {
- "@vue/shared": "3.3.2"
+ "@vue/shared": "3.3.4"
}
},
"node_modules/@vue/reactivity-transform": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.2.tgz",
- "integrity": "sha512-iu2WaQvlJHdnONrsyv4ibIEnSsuKF+aHFngGj/y1lwpHQtalpVhKg9wsKMoiKXS9zPNjG9mNKzJS9vudvjzvyg==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.4.tgz",
+ "integrity": "sha512-MXgwjako4nu5WFLAjpBnCj/ieqcjE2aJBINUNQzkZQfzIZA4xn+0fV1tIYBJvvva3N3OvKGofRLvQIwEQPpaXw==",
"dependencies": {
"@babel/parser": "^7.20.15",
- "@vue/compiler-core": "3.3.2",
- "@vue/shared": "3.3.2",
+ "@vue/compiler-core": "3.3.4",
+ "@vue/shared": "3.3.4",
"estree-walker": "^2.0.2",
"magic-string": "^0.30.0"
}
},
"node_modules/@vue/runtime-core": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.3.2.tgz",
- "integrity": "sha512-qSl95qj0BvKfcsO+hICqFEoLhJn6++HtsPxmTkkadFbuhe3uQfJ8HmQwvEr7xbxBd2rcJB6XOJg7nWAn/ymC5A==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.3.4.tgz",
+ "integrity": "sha512-R+bqxMN6pWO7zGI4OMlmvePOdP2c93GsHFM/siJI7O2nxFRzj55pLwkpCedEY+bTMgp5miZ8CxfIZo3S+gFqvA==",
"dependencies": {
- "@vue/reactivity": "3.3.2",
- "@vue/shared": "3.3.2"
+ "@vue/reactivity": "3.3.4",
+ "@vue/shared": "3.3.4"
}
},
"node_modules/@vue/runtime-dom": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.3.2.tgz",
- "integrity": "sha512-+drStsJT+0mtgHdarT7cXZReCcTFfm6ptxMrz0kAW5hms6UNBd8Q1pi4JKlncAhu+Ld/TevsSp7pqAZxBBoGng==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.3.4.tgz",
+ "integrity": "sha512-Aj5bTJ3u5sFsUckRghsNjVTtxZQ1OyMWCr5dZRAPijF/0Vy4xEoRCwLyHXcj4D0UFbJ4lbx3gPTgg06K/GnPnQ==",
"dependencies": {
- "@vue/runtime-core": "3.3.2",
- "@vue/shared": "3.3.2",
+ "@vue/runtime-core": "3.3.4",
+ "@vue/shared": "3.3.4",
"csstype": "^3.1.1"
}
},
"node_modules/@vue/server-renderer": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.3.2.tgz",
- "integrity": "sha512-QCwh6OGwJg6GDLE0fbQhRTR6tnU+XDJ1iCsTYHXBiezCXAhqMygFRij7BiLF4ytvvHcg5kX9joX5R5vP85++wg==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.3.4.tgz",
+ "integrity": "sha512-Q6jDDzR23ViIb67v+vM1Dqntu+HUexQcsWKhhQa4ARVzxOY2HbC7QRW/ggkDBd5BU+uM1sV6XOAP0b216o34JQ==",
"dependencies": {
- "@vue/compiler-ssr": "3.3.2",
- "@vue/shared": "3.3.2"
+ "@vue/compiler-ssr": "3.3.4",
+ "@vue/shared": "3.3.4"
},
"peerDependencies": {
- "vue": "3.3.2"
+ "vue": "3.3.4"
}
},
"node_modules/@vue/shared": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.2.tgz",
- "integrity": "sha512-0rFu3h8JbclbnvvKrs7Fe5FNGV9/5X2rPD7KmOzhLSUAiQH5//Hq437Gv0fR5Mev3u/nbtvmLl8XgwCU20/ZfQ=="
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.4.tgz",
+ "integrity": "sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ=="
},
"node_modules/@vue/test-utils": {
"version": "2.2.5",
@@ -7728,9 +7728,9 @@
}
},
"node_modules/leaflet": {
- "version": "1.9.3",
- "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.3.tgz",
- "integrity": "sha512-iB2cR9vAkDOu5l3HAay2obcUHZ7xwUBBjph8+PGtmW/2lYhbLizWtG7nTeYht36WfOslixQF9D/uSIzhZgGMfQ=="
+ "version": "1.9.4",
+ "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz",
+ "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA=="
},
"node_modules/leaflet.pattern": {
"version": "0.1.0",
@@ -8604,12 +8604,12 @@
}
},
"node_modules/pinia": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.1.1.tgz",
- "integrity": "sha512-Y2CgpcUtD8Ogdvo5LW5g20ykSZgnVDMgTSZFr40EvO6HB8axQk+0lHa1UrRah9wworFaxjovwRlY/wRICWj/KQ==",
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.1.2.tgz",
+ "integrity": "sha512-GNnd8V2NnSn5zZLb1xokH3nEMm8Tl/rvJduj/IMwWkUGsYPhnVyN92WIIxD59ZvnM+7EV28lXt5+NnYn1d81cg==",
"dependencies": {
"@vue/devtools-api": "^6.5.0",
- "vue-demi": ">=0.14.2"
+ "vue-demi": ">=0.14.5"
},
"funding": {
"url": "https://github.com/sponsors/posva"
@@ -8629,9 +8629,9 @@
}
},
"node_modules/pinia/node_modules/vue-demi": {
- "version": "0.14.4",
- "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.4.tgz",
- "integrity": "sha512-YR9bCmtIYgsqNVRG3MLLWlhbZ9tTNMuWHPd7yx0pHS3NDX17MeVNHgKTOClYE8pBjsfNe4CMaReP7zQtHDIbiA==",
+ "version": "0.14.5",
+ "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.5.tgz",
+ "integrity": "sha512-o9NUVpl/YlsGJ7t+xuqJKx8EBGf1quRhCiT6D/J0pfwmk9zUwYkC7yrF4SZCe6fETvSM3UNL2edcbYrSyc4QHA==",
"hasInstallScript": true,
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
@@ -11445,15 +11445,15 @@
}
},
"node_modules/vue": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/vue/-/vue-3.3.2.tgz",
- "integrity": "sha512-98hJcAhyDwZoOo2flAQBSPVYG/o0HA9ivIy2ktHshjE+6/q8IMQ+kvDKQzOZTFPxvnNMcGM+zS2A00xeZMA7tA==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/vue/-/vue-3.3.4.tgz",
+ "integrity": "sha512-VTyEYn3yvIeY1Py0WaYGZsXnz3y5UnGi62GjVEqvEGPl6nxbOrCXbVOTQWBEJUqAyTUk2uJ5JLVnYJ6ZzGbrSw==",
"dependencies": {
- "@vue/compiler-dom": "3.3.2",
- "@vue/compiler-sfc": "3.3.2",
- "@vue/runtime-dom": "3.3.2",
- "@vue/server-renderer": "3.3.2",
- "@vue/shared": "3.3.2"
+ "@vue/compiler-dom": "3.3.4",
+ "@vue/compiler-sfc": "3.3.4",
+ "@vue/runtime-dom": "3.3.4",
+ "@vue/server-renderer": "3.3.4",
+ "@vue/shared": "3.3.4"
}
},
"node_modules/vue-eslint-parser": {
@@ -14284,36 +14284,36 @@
"dev": true
},
"@vue/compiler-core": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.2.tgz",
- "integrity": "sha512-CKZWo1dzsQYTNTft7whzjL0HsrEpMfiK7pjZ2WFE3bC1NA7caUjWioHSK+49y/LK7Bsm4poJZzAMnvZMQ7OTeg==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.4.tgz",
+ "integrity": "sha512-cquyDNvZ6jTbf/+x+AgM2Arrp6G4Dzbb0R64jiG804HRMfRiFXWI6kqUVqZ6ZR0bQhIoQjB4+2bhNtVwndW15g==",
"requires": {
"@babel/parser": "^7.21.3",
- "@vue/shared": "3.3.2",
+ "@vue/shared": "3.3.4",
"estree-walker": "^2.0.2",
"source-map-js": "^1.0.2"
}
},
"@vue/compiler-dom": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.2.tgz",
- "integrity": "sha512-6gS3auANuKXLw0XH6QxkWqyPYPunziS2xb6VRenM3JY7gVfZcJvkCBHkb5RuNY1FCbBO3lkIi0CdXUCW1c7SXw==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.4.tgz",
+ "integrity": "sha512-wyM+OjOVpuUukIq6p5+nwHYtj9cFroz9cwkfmP9O1nzH68BenTTv0u7/ndggT8cIQlnBeOo6sUT/gvHcIkLA5w==",
"requires": {
- "@vue/compiler-core": "3.3.2",
- "@vue/shared": "3.3.2"
+ "@vue/compiler-core": "3.3.4",
+ "@vue/shared": "3.3.4"
}
},
"@vue/compiler-sfc": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.2.tgz",
- "integrity": "sha512-jG4jQy28H4BqzEKsQqqW65BZgmo3vzdLHTBjF+35RwtDdlFE+Fk1VWJYUnDMMqkFBo6Ye1ltSKVOMPgkzYj7SQ==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.4.tgz",
+ "integrity": "sha512-6y/d8uw+5TkCuzBkgLS0v3lSM3hJDntFEiUORM11pQ/hKvkhSKZrXW6i69UyXlJQisJxuUEJKAWEqWbWsLeNKQ==",
"requires": {
"@babel/parser": "^7.20.15",
- "@vue/compiler-core": "3.3.2",
- "@vue/compiler-dom": "3.3.2",
- "@vue/compiler-ssr": "3.3.2",
- "@vue/reactivity-transform": "3.3.2",
- "@vue/shared": "3.3.2",
+ "@vue/compiler-core": "3.3.4",
+ "@vue/compiler-dom": "3.3.4",
+ "@vue/compiler-ssr": "3.3.4",
+ "@vue/reactivity-transform": "3.3.4",
+ "@vue/shared": "3.3.4",
"estree-walker": "^2.0.2",
"magic-string": "^0.30.0",
"postcss": "^8.1.10",
@@ -14321,12 +14321,12 @@
}
},
"@vue/compiler-ssr": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.2.tgz",
- "integrity": "sha512-K8OfY5FQtZaSOJHHe8xhEfIfLrefL/Y9frv4k4NsyQL3+0lRKxr9QuJhfdBDjkl7Fhz8CzKh63mULvmOfx3l2w==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.4.tgz",
+ "integrity": "sha512-m0v6oKpup2nMSehwA6Uuu+j+wEwcy7QmwMkVNVfrV9P2qE5KshC6RwOCq8fjGS/Eak/uNb8AaWekfiXxbBB6gQ==",
"requires": {
- "@vue/compiler-dom": "3.3.2",
- "@vue/shared": "3.3.2"
+ "@vue/compiler-dom": "3.3.4",
+ "@vue/shared": "3.3.4"
}
},
"@vue/devtools-api": {
@@ -14335,57 +14335,57 @@
"integrity": "sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q=="
},
"@vue/reactivity": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.2.tgz",
- "integrity": "sha512-yX8C4uTgg2Tdj+512EEMnMKbLveoITl7YdQX35AYgx8vBvQGszKiiCN46g4RY6/deeo/5DLbeUUGxCq1qWMf5g==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.4.tgz",
+ "integrity": "sha512-kLTDLwd0B1jG08NBF3R5rqULtv/f8x3rOFByTDz4J53ttIQEDmALqKqXY0J+XQeN0aV2FBxY8nJDf88yvOPAqQ==",
"requires": {
- "@vue/shared": "3.3.2"
+ "@vue/shared": "3.3.4"
}
},
"@vue/reactivity-transform": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.2.tgz",
- "integrity": "sha512-iu2WaQvlJHdnONrsyv4ibIEnSsuKF+aHFngGj/y1lwpHQtalpVhKg9wsKMoiKXS9zPNjG9mNKzJS9vudvjzvyg==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.4.tgz",
+ "integrity": "sha512-MXgwjako4nu5WFLAjpBnCj/ieqcjE2aJBINUNQzkZQfzIZA4xn+0fV1tIYBJvvva3N3OvKGofRLvQIwEQPpaXw==",
"requires": {
"@babel/parser": "^7.20.15",
- "@vue/compiler-core": "3.3.2",
- "@vue/shared": "3.3.2",
+ "@vue/compiler-core": "3.3.4",
+ "@vue/shared": "3.3.4",
"estree-walker": "^2.0.2",
"magic-string": "^0.30.0"
}
},
"@vue/runtime-core": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.3.2.tgz",
- "integrity": "sha512-qSl95qj0BvKfcsO+hICqFEoLhJn6++HtsPxmTkkadFbuhe3uQfJ8HmQwvEr7xbxBd2rcJB6XOJg7nWAn/ymC5A==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.3.4.tgz",
+ "integrity": "sha512-R+bqxMN6pWO7zGI4OMlmvePOdP2c93GsHFM/siJI7O2nxFRzj55pLwkpCedEY+bTMgp5miZ8CxfIZo3S+gFqvA==",
"requires": {
- "@vue/reactivity": "3.3.2",
- "@vue/shared": "3.3.2"
+ "@vue/reactivity": "3.3.4",
+ "@vue/shared": "3.3.4"
}
},
"@vue/runtime-dom": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.3.2.tgz",
- "integrity": "sha512-+drStsJT+0mtgHdarT7cXZReCcTFfm6ptxMrz0kAW5hms6UNBd8Q1pi4JKlncAhu+Ld/TevsSp7pqAZxBBoGng==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.3.4.tgz",
+ "integrity": "sha512-Aj5bTJ3u5sFsUckRghsNjVTtxZQ1OyMWCr5dZRAPijF/0Vy4xEoRCwLyHXcj4D0UFbJ4lbx3gPTgg06K/GnPnQ==",
"requires": {
- "@vue/runtime-core": "3.3.2",
- "@vue/shared": "3.3.2",
+ "@vue/runtime-core": "3.3.4",
+ "@vue/shared": "3.3.4",
"csstype": "^3.1.1"
}
},
"@vue/server-renderer": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.3.2.tgz",
- "integrity": "sha512-QCwh6OGwJg6GDLE0fbQhRTR6tnU+XDJ1iCsTYHXBiezCXAhqMygFRij7BiLF4ytvvHcg5kX9joX5R5vP85++wg==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.3.4.tgz",
+ "integrity": "sha512-Q6jDDzR23ViIb67v+vM1Dqntu+HUexQcsWKhhQa4ARVzxOY2HbC7QRW/ggkDBd5BU+uM1sV6XOAP0b216o34JQ==",
"requires": {
- "@vue/compiler-ssr": "3.3.2",
- "@vue/shared": "3.3.2"
+ "@vue/compiler-ssr": "3.3.4",
+ "@vue/shared": "3.3.4"
}
},
"@vue/shared": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.2.tgz",
- "integrity": "sha512-0rFu3h8JbclbnvvKrs7Fe5FNGV9/5X2rPD7KmOzhLSUAiQH5//Hq437Gv0fR5Mev3u/nbtvmLl8XgwCU20/ZfQ=="
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.4.tgz",
+ "integrity": "sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ=="
},
"@vue/test-utils": {
"version": "2.2.5",
@@ -17643,9 +17643,9 @@
}
},
"leaflet": {
- "version": "1.9.3",
- "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.3.tgz",
- "integrity": "sha512-iB2cR9vAkDOu5l3HAay2obcUHZ7xwUBBjph8+PGtmW/2lYhbLizWtG7nTeYht36WfOslixQF9D/uSIzhZgGMfQ=="
+ "version": "1.9.4",
+ "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz",
+ "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA=="
},
"leaflet.pattern": {
"version": "0.1.0",
@@ -18272,18 +18272,18 @@
"dev": true
},
"pinia": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.1.1.tgz",
- "integrity": "sha512-Y2CgpcUtD8Ogdvo5LW5g20ykSZgnVDMgTSZFr40EvO6HB8axQk+0lHa1UrRah9wworFaxjovwRlY/wRICWj/KQ==",
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.1.2.tgz",
+ "integrity": "sha512-GNnd8V2NnSn5zZLb1xokH3nEMm8Tl/rvJduj/IMwWkUGsYPhnVyN92WIIxD59ZvnM+7EV28lXt5+NnYn1d81cg==",
"requires": {
"@vue/devtools-api": "^6.5.0",
- "vue-demi": ">=0.14.2"
+ "vue-demi": ">=0.14.5"
},
"dependencies": {
"vue-demi": {
- "version": "0.14.4",
- "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.4.tgz",
- "integrity": "sha512-YR9bCmtIYgsqNVRG3MLLWlhbZ9tTNMuWHPd7yx0pHS3NDX17MeVNHgKTOClYE8pBjsfNe4CMaReP7zQtHDIbiA==",
+ "version": "0.14.5",
+ "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.5.tgz",
+ "integrity": "sha512-o9NUVpl/YlsGJ7t+xuqJKx8EBGf1quRhCiT6D/J0pfwmk9zUwYkC7yrF4SZCe6fETvSM3UNL2edcbYrSyc4QHA==",
"requires": {}
}
}
@@ -20138,15 +20138,15 @@
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="
},
"vue": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/vue/-/vue-3.3.2.tgz",
- "integrity": "sha512-98hJcAhyDwZoOo2flAQBSPVYG/o0HA9ivIy2ktHshjE+6/q8IMQ+kvDKQzOZTFPxvnNMcGM+zS2A00xeZMA7tA==",
- "requires": {
- "@vue/compiler-dom": "3.3.2",
- "@vue/compiler-sfc": "3.3.2",
- "@vue/runtime-dom": "3.3.2",
- "@vue/server-renderer": "3.3.2",
- "@vue/shared": "3.3.2"
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/vue/-/vue-3.3.4.tgz",
+ "integrity": "sha512-VTyEYn3yvIeY1Py0WaYGZsXnz3y5UnGi62GjVEqvEGPl6nxbOrCXbVOTQWBEJUqAyTUk2uJ5JLVnYJ6ZzGbrSw==",
+ "requires": {
+ "@vue/compiler-dom": "3.3.4",
+ "@vue/compiler-sfc": "3.3.4",
+ "@vue/runtime-dom": "3.3.4",
+ "@vue/server-renderer": "3.3.4",
+ "@vue/shared": "3.3.4"
}
},
"vue-eslint-parser": {
diff --git a/package.json b/package.json
index 4410307276..2a32a37828 100644
--- a/package.json
+++ b/package.json
@@ -14,17 +14,17 @@
"easymde": "^2.18.0",
"exif-js": "^2.3.0",
"json2csv": "^5.0.7",
- "leaflet": "^1.9.3",
+ "leaflet": "^1.9.4",
"leaflet.pattern": "^0.1.0",
"marked": "^5.0.2",
"parse-dms": "0.0.5",
"pdfjs-dist": "3.6.172",
- "pinia": "^2.1.1",
+ "pinia": "^2.1.2",
"qs": "^6.11.2",
"shakapacker": "6.6.0",
"v-hotkey": "^0.9.0",
"v-network-graph": "^0.9.3",
- "vue": "^3.3.2",
+ "vue": "^3.3.4",
"vue-handy-scroll": "^3.0.2",
"vue-tippy": "^6.1.2",
"vue-turbolinks": "^2.2.2",
@@ -46,7 +46,7 @@
"@babel/plugin-transform-runtime": "^7.21.4",
"@babel/preset-env": "^7.21.5",
"@babel/runtime": "^7.21.5",
- "@vue/compiler-sfc": "^3.3.2",
+ "@vue/compiler-sfc": "^3.3.4",
"babel-loader": "^9.1.2",
"compression-webpack-plugin": "^10.0.0",
"css-loader": "^6.7.3",
From d06d2238e6ff0972c20dfe261a1fca309ee0cc43 Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 09:27:57 -0500
Subject: [PATCH 42/88] Add data depiction param to depictions filters
---
lib/queries/concerns/depictions.rb | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/lib/queries/concerns/depictions.rb b/lib/queries/concerns/depictions.rb
index d66c1677ab..c9aed910cf 100644
--- a/lib/queries/concerns/depictions.rb
+++ b/lib/queries/concerns/depictions.rb
@@ -8,6 +8,7 @@ def self.params
:image_id,
:images,
:depictions,
+ :data_depictions,
image_id: []
]
end
@@ -28,6 +29,12 @@ def self.params
# false - doesn't have images
attr_accessor :depictions
+ # @return [Boolean, nil]
+ # Alias/identical to images
+ # true - has depicitions that are data depictions
+ # false - doesn't have depictions that are data depictions
+ attr_accessor :data_depictions
+
def image_id
[@image_id].flatten.compact.uniq
end
@@ -38,6 +45,7 @@ def set_depiction_params(params)
@images = boolean_param(params, :images)
@depictions = boolean_param(params, :depictions)
+ @data_depictions = boolean_param(params, :data_depictions)
end
def image_id_facet
@@ -55,6 +63,18 @@ def depictions_facet
end
end
+ def data_depiction_facet
+ return nil if depictions.blank?
+ if data_depictions
+ referenced_klass.joins(:depictions).where(data_depictions: true).distinct
+ else
+ a = referenced_klass.where.missing(:depictions)
+ b = referenced_klass.joins(:depictions).where.not(depictions: {data_depiction: true})
+
+ referenced_klass_union([a,b]).distinct
+ end
+ end
+
def images_facet
return nil if images.nil?
if images
@@ -78,9 +98,10 @@ def image_query_facet
def self.merge_clauses
[
+ :data_depiction_facet,
:depictions_facet,
- :image_query_facet,
:image_id_facet,
+ :image_query_facet,
:images_facet
]
end
From 7c74abf46760350121c6c22a52fdc077e93340a5 Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 09:35:31 -0500
Subject: [PATCH 43/88] Add annotation with/out facets to
BiologicalAssociations
---
CHANGELOG.md | 3 ++-
.../filter/components/FilterView.vue | 9 ++++++++-
lib/queries/biological_association/filter.rb | 4 +++-
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 365d4d239a..c5292cc6ca 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,7 +8,8 @@ This project does not yet adheres to [Semantic Versioning](https://semv
## [unreleased]
### Added
-
+- Data depiction facets
+- Biological associations filter annotation-based facets
- New stage-only staged image type [#3400]
- New left-t stage layout [#3367]
- `Add` button to add biological associations from `Related` modal in new biological associations task
diff --git a/app/javascript/vue/tasks/biological_associations/filter/components/FilterView.vue b/app/javascript/vue/tasks/biological_associations/filter/components/FilterView.vue
index 57a11f0c90..98fbde1773 100644
--- a/app/javascript/vue/tasks/biological_associations/filter/components/FilterView.vue
+++ b/app/javascript/vue/tasks/biological_associations/filter/components/FilterView.vue
@@ -60,7 +60,14 @@ import FacetWith from 'components/Filter/Facets/shared/FacetWith.vue'
import { OTU, COLLECTION_OBJECT } from 'constants/index.js'
import { computed } from 'vue'
-const WITH_PARAMS = ['citations', 'origin_citation']
+const WITH_PARAMS = [
+'citations',
+'origin_citation',
+'depictions',
+'data_depictions',
+'notes',
+'tags'
+]
const props = defineProps({
modelValue: {
diff --git a/lib/queries/biological_association/filter.rb b/lib/queries/biological_association/filter.rb
index 4407f56830..2b1eda91d4 100644
--- a/lib/queries/biological_association/filter.rb
+++ b/lib/queries/biological_association/filter.rb
@@ -5,6 +5,7 @@ class Filter < Query::Filter
include Queries::Concerns::Notes
include Queries::Concerns::Tags
include Queries::Concerns::Citations
+ include Queries::Concerns::Depictions
PARAMS = [
:biological_association_id,
@@ -176,9 +177,10 @@ def initialize(query_params)
@taxon_name_id_mode = boolean_param(params, :taxon_name_id_mode)
@wkt = params[:wkt]
- set_citations_params(params)
set_notes_params(params)
set_tags_params(params)
+ set_citations_params(params)
+ set_depiction_params(params)
end
def biological_association_id
From 0578ce74deac68488d1fadb82e17b4ad26d0c5f4 Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 09:37:14 -0500
Subject: [PATCH 44/88] Add ImportDataset facet to collection object facet.
Note that this is not supported in import process yet.
---
lib/queries/collection_object/filter.rb | 43 ++++++++++++++++++-------
1 file changed, 31 insertions(+), 12 deletions(-)
diff --git a/lib/queries/collection_object/filter.rb b/lib/queries/collection_object/filter.rb
index 59273b9282..ea334e875e 100644
--- a/lib/queries/collection_object/filter.rb
+++ b/lib/queries/collection_object/filter.rb
@@ -39,6 +39,7 @@ class Filter < Query::Filter
:exact_buffered_other_labels,
:extract_id,
:georeferences,
+ :import_dataset_id,
:loaned,
:never_loaned,
:on_loan,
@@ -65,6 +66,7 @@ class Filter < Query::Filter
determiner_id: [],
extract_id: [],
geographic_area_id: [],
+ import_dataset_id: [],
is_type: [],
loan_id: [],
otu_id: [],
@@ -72,6 +74,11 @@ class Filter < Query::Filter
taxon_name_id: [],
].inject([{}]) { |ary, k| k.is_a?(Hash) ? ary.last.merge!(k) : ary.unshift(k); ary }.freeze
+
+ # @return [Array]
+ # of ImportDataset ids
+ attr_accessor :import_dataset_id
+
# @return [True, False, nil]
# true - has collecting event that has geographic_area
# false - does not have collecting event that has geographic area
@@ -344,6 +351,7 @@ def initialize(query_params)
@extract_id = params[:extract_id]
@geographic_area = boolean_param(params, :geographic_area)
@georeferences = boolean_param(params, :georeferences)
+ @import_dataset_id = params[:import_dataset_id]
@is_type = params[:is_type] || []
@loan_id = params[:loan_id]
@loaned = boolean_param(params, :loaned)
@@ -398,18 +406,6 @@ def biological_association_id
[@biological_association_id].flatten.compact.uniq
end
- def extract_id
- [@extract_id].flatten.compact.uniq
- end
-
- def taxon_name_id
- [@taxon_name_id].flatten.compact.uniq
- end
-
- def otu_id
- [@otu_id].flatten.compact.uniq
- end
-
def biocuration_class_id
[@biocuration_class_id].flatten.compact.uniq
end
@@ -430,10 +426,26 @@ def determiner_id
[@determiner_id].flatten.compact.uniq
end
+ def extract_id
+ [@extract_id].flatten.compact.uniq
+ end
+
+ def import_dataset_id
+ [@import_dataset_id].flatten.compact
+ end
+
+ def otu_id
+ [@otu_id].flatten.compact.uniq
+ end
+
def preparation_type_id
[@preparation_type_id].flatten.compact.uniq
end
+ def taxon_name_id
+ [@taxon_name_id].flatten.compact.uniq
+ end
+
def collection_object_id_facet
return nil if collection_object_id.empty?
table[:id].eq_any(collection_object_id)
@@ -443,6 +455,12 @@ def loan_id
[@loan_id].flatten.compact
end
+ def import_dataset_id_facet
+ return nil if import_dataset_id.blank?
+ ::CollectionObject.joins(:related_origin_relationships)
+ .where(origin_relationships: {old_object_id: import_dataset_id, old_object_type: 'ImportDataset'})
+ end
+
def extract_id_facet
return nil if extract_id.empty?
::CollectionObject
@@ -947,6 +965,7 @@ def and_clauses
def merge_clauses
[
+ import_dataset_id_facet,
observation_query_facet,
biological_association_id_facet,
base_collecting_event_query_facet,
From 5917dd1a18127ebed30277aa14ff4df7f3d6f87a Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 09:37:42 -0500
Subject: [PATCH 45/88] Add singular collecting_event_id param to CE filter.
---
lib/queries/collecting_event/filter.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/queries/collecting_event/filter.rb b/lib/queries/collecting_event/filter.rb
index 9456af6514..23cf792093 100644
--- a/lib/queries/collecting_event/filter.rb
+++ b/lib/queries/collecting_event/filter.rb
@@ -3,7 +3,7 @@ module CollectingEvent
class Filter < Query::Filter
# Params exists for all CollectingEvent attributes except these.
- # collecting_event_id is excluded because we handle it specially in conjunction with `geographic_area_mode``
+ # geographic_area_id is excluded because we handle it specially in conjunction with `geographic_area_mode``
# Definition must preceed include.
ATTRIBUTES = (::CollectingEvent.core_attributes - %w{geographic_area_id}).map(&:to_sym).freeze
@@ -35,6 +35,7 @@ class Filter < Query::Filter
:collection_objects,
:collector_id,
:collector_id_or,
+ :collecting_event_id,
:determiner_name_regex,
:geo_json,
:geographic_area,
From c1199a9a7c35cde5878c1956fbbdefcc66fb68b2 Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 09:38:13 -0500
Subject: [PATCH 46/88] Widen a loans dashboard graph
---
app/views/tasks/loans/dashboard/index.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/tasks/loans/dashboard/index.html.erb b/app/views/tasks/loans/dashboard/index.html.erb
index bcad2c60d7..bb69ad7653 100644
--- a/app/views/tasks/loans/dashboard/index.html.erb
+++ b/app/views/tasks/loans/dashboard/index.html.erb
@@ -70,7 +70,7 @@
- <%= column_chart loan_items_totals_per_year(@loans), height: '400px', stacked: true, download: true, descrete: true, ytitle: 'Total', xtitle: 'Year', title: 'Individuals by year (date sent)' %>
+ <%= column_chart loan_items_totals_per_year(@loans), height: '400px', width: '800px', stacked: true, download: true, descrete: true, ytitle: 'Total', xtitle: 'Year', title: 'Individuals by year (date sent)' %>
From d7db8024c7379c16f89b2ffa4479a5c6bec90272 Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 09:39:11 -0500
Subject: [PATCH 47/88] Biological associations can be depicted.
---
CHANGELOG.md | 1 +
app/models/biological_association.rb | 1 +
2 files changed, 2 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c5292cc6ca..0390442598 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@ This project does not yet adheres to [Semantic Versioning](https://semv
## [unreleased]
### Added
+- Biological associations can now be depicted
- Data depiction facets
- Biological associations filter annotation-based facets
- New stage-only staged image type [#3400]
diff --git a/app/models/biological_association.rb b/app/models/biological_association.rb
index 290ba93031..e143dfd58a 100644
--- a/app/models/biological_association.rb
+++ b/app/models/biological_association.rb
@@ -36,6 +36,7 @@ class BiologicalAssociation < ApplicationRecord
include Shared::Confidences
include Shared::Notes
include Shared::Confidences
+ include Shared::Depictions
include Shared::IsData
belongs_to :biological_relationship, inverse_of: :biological_associations
From 4389b0beaffbeda4f40a814c7c63ee82ada7aced Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 09:40:05 -0500
Subject: [PATCH 48/88] presence not unless
---
app/helpers/observation_matrix_rows_helper.rb | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/app/helpers/observation_matrix_rows_helper.rb b/app/helpers/observation_matrix_rows_helper.rb
index 4b47f71240..47ad88dd1b 100644
--- a/app/helpers/observation_matrix_rows_helper.rb
+++ b/app/helpers/observation_matrix_rows_helper.rb
@@ -14,12 +14,12 @@ def observation_matrix_row_link(observation_matrix_row)
# @return [String]
# The label used in for general purpose internal use
def label_for_observation_matrix_row(observation_matrix_row)
- return observation_matrix_row.name unless observation_matrix_row.name.blank?
+ return observation_matrix_row.name if observation_matrix_row.name.present?
label_for(observation_matrix_row.observation_object)
end
def observation_matrix_row_label_tnt(observation_matrix_row)
- return observation_matrix_row.name unless observation_matrix_row.name.blank?
+ return observation_matrix_row.name if observation_matrix_row.name.present?
o = observation_matrix_row.observation_object
s = label_for(o).to_s
s.gsub!(/[^\w]/, '_')
@@ -29,7 +29,7 @@ def observation_matrix_row_label_tnt(observation_matrix_row)
end
def observation_matrix_row_label_nexus(observation_matrix_row)
- return observation_matrix_row.name unless observation_matrix_row.name.blank?
+ return observation_matrix_row.name if observation_matrix_row.name.present?
o = observation_matrix_row.observation_object
s = label_for(o)
s.gsub!(/[^\w]/, '_').to_s
@@ -38,7 +38,7 @@ def observation_matrix_row_label_nexus(observation_matrix_row)
end
def observation_matrix_row_label_nexml(observation_matrix_row)
- return observation_matrix_row.name unless observation_matrix_row.name.blank?
+ return observation_matrix_row.name if observation_matrix_row.name.present?
o = observation_matrix_row.observation_object
label_for(o)
end
@@ -46,7 +46,7 @@ def observation_matrix_row_label_nexml(observation_matrix_row)
# @return [String, nil]
# the object_label with any commas replaced by pipes
def observation_matrix_row_label_csv(observation_matrix_row)
- return observation_matrix_row.name unless observation_matrix_row.name.blank?
+ return observation_matrix_row.name if observation_matrix_row.name.present?
o = observation_matrix_row.observation_object
('"' + label_for(o).gsub('"', "'") + '"').html_safe
end
@@ -55,7 +55,7 @@ def observation_matrix_row_label_csv(observation_matrix_row)
# @return [ObservationMatrixRow#id, nil]
# if destroyable (represented by only a single OMRI of type Single) then return the ID
def observation_matrix_row_destroyable?(observation_matrix_row)
- if !observation_matrix_row.cached_observation_matrix_row_item_id.blank? && observation_matrix_row.reference_count == 1
+ if observation_matrix_row.cached_observation_matrix_row_item_id.present? && observation_matrix_row.reference_count == 1
return observation_matrix_row.cached_observation_matrix_row_item_id
end
end
From 1636c0b6fb971610d0e4f678d6f46088c76fe14d Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 09:40:27 -0500
Subject: [PATCH 49/88] Freeze, quotes
---
app/helpers/observation_matrices_helper.rb | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/app/helpers/observation_matrices_helper.rb b/app/helpers/observation_matrices_helper.rb
index 2027c3a72f..d41a7efd07 100644
--- a/app/helpers/observation_matrices_helper.rb
+++ b/app/helpers/observation_matrices_helper.rb
@@ -25,7 +25,7 @@ module ObservationMatricesHelper
'32' => 'X',
'33' => 'Y',
'34' => 'Z',
- }
+ }.freeze
def observation_matrix_tag(observation_matrix)
return nil if observation_matrix.nil?
@@ -76,7 +76,7 @@ def observations_cell_label(observations_hash, descriptor, hash_index, style = :
case observations_hash[descriptor.id][hash_index].size
when 0
- "?"
+ '?'
when 1
o = observations_hash[descriptor.id][hash_index][0]
s = observation_export_value(o)
@@ -122,9 +122,9 @@ def observation_export_value(observation)
observation.converted_value.to_s
when 'Observation::Sample'
if observation.sample_max && observation.sample_max && observation.sample_max.to_f != observation.sample_min.to_f
- ("%g" % observation.sample_min).to_s + '-' + ("%g" % observation.sample_max).to_s
+ ('%g' % observation.sample_min).to_s + '-' + ('%g' % observation.sample_max).to_s
elsif observation.sample_min
- ("%g" % observation.sample_min).to_s
+ ('%g' % observation.sample_min).to_s
else
'?'
end
From 835616eee3023c40f6f02a0952208244d86bddda Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 11:34:45 -0500
Subject: [PATCH 50/88] Batch populate observation matrices. #3415.
---
.../observation_matrices_controller.rb | 40 ++++++++---
app/models/observation_matrix.rb | 64 +++++++++++++++++
config/routes/data.rb | 3 +
spec/models/observation_matrix_spec.rb | 68 +++++++++++++++++--
4 files changed, 160 insertions(+), 15 deletions(-)
diff --git a/app/controllers/observation_matrices_controller.rb b/app/controllers/observation_matrices_controller.rb
index 636a7809ea..75fdf6c054 100644
--- a/app/controllers/observation_matrices_controller.rb
+++ b/app/controllers/observation_matrices_controller.rb
@@ -72,6 +72,34 @@ def update
end
end
+ # DELETE /observation_matrices/1
+ # DELETE /observation_matrices/1.json
+ def destroy
+ @observation_matrix.destroy
+ respond_to do |format|
+ format.html { redirect_to observation_matrices_url, notice: 'Matrix was successfully destroyed.' }
+ format.json { head :no_content }
+ end
+ end
+
+ # .json
+ def batch_create
+ if o = ObservationMatrix.batch_create(params.merge(project_id: sessions_current_project_id))
+ render json: o
+ else
+ render json: {success: false}
+ end
+ end
+
+ # .json
+ def batch_add
+ if o = ObservationMatrix.batch_add(params.merge(project_id: sessions_current_project_id))
+ render json: o
+ else
+ render json: {success: false}
+ end
+ end
+
def reorder_rows
if @observation_matrix.reorder_rows(params.require(:by))
render json: :success
@@ -84,16 +112,6 @@ def reorder_columns
@observation_matrix.reorder_columns(params.require(:by))
end
- # DELETE /observation_matrices/1
- # DELETE /observation_matrices/1.json
- def destroy
- @observation_matrix.destroy
- respond_to do |format|
- format.html { redirect_to observation_matrices_url, notice: 'Matrix was successfully destroyed.' }
- format.json { head :no_content }
- end
- end
-
def autocomplete
@observation_matrices = ObservationMatrix.where(project_id: sessions_current_project_id).where('name ilike ?', "%#{params[:term]}%")
end
@@ -203,7 +221,7 @@ def download_contents
def otus_used_in_matrices
# ObservationMatrix.with_otu_ids_array([13597, 25680])
- if !params[:otu_ids].blank?
+ if params[:otu_ids].present?
p = ObservationMatrix.with_otu_id_array(params[:otu_ids].split('|')).pluck(:id)
if p.nil?
render json: {otus_used_in_matrices: ''}.to_json
diff --git a/app/models/observation_matrix.rb b/app/models/observation_matrix.rb
index 30ea5ecdf0..6c869e7d3f 100644
--- a/app/models/observation_matrix.rb
+++ b/app/models/observation_matrix.rb
@@ -267,4 +267,68 @@ def observations_hash
h
end
+ def batch_populate(params)
+ queries = params.keys.select{|a| a =~ /_query/ }
+ return false if queries.size != 1
+
+ result = {
+ rows: 0,
+ columns: 0,
+ observation_matrix_id: id,
+ observation_matrix_name: name
+ }
+
+ otus = []
+ descriptors = []
+ collection_objects = []
+ extracts = []
+
+ case queries[0]
+
+ when 'otu_query'
+ otus = ::Queries::Otu::Filter.new(params[:otu_query]).all
+ when 'descriptor_query'
+ descriptors = ::Queries::Descriptor::Filter.new(params[:descriptor_query]).all
+ when 'observation_query'
+ otus = ::Queries::Otu::Filter.new(observation_query: params[:observation_query]).all
+ descriptors = ::Queries::Descriptor::Filter.new(descriptor_query: params[:descriptor_query]).all
+ collection_objects = ::Queries::CollectionObject::Filter.new(collection_object_query: params[:collection_object_query]).all
+ extracts = ::Queries::Extract::Filter.new(extract_query: params[:extract_object_query]).all
+ when 'collection_object_query'
+ collection_objects = ::Queries::CollectionObject::Filter.new(collection_object_query: params[:collection_object_query]).all
+ when 'extract_query'
+ extracts = ::Queries::Extract::Filter.new(extract_query: params[:extract_object_query]).all
+ end
+
+ [otus, collection_objects, extracts].each do |t|
+ t.each do |i|
+ # Fail silently
+ j = ObservationMatrixRowItem::Single.create(observation_matrix: self, observation_object: i)
+ result[:rows] += 1 if j.persisted?
+ end
+ end
+
+ descriptors.each do |d|
+ j = ObservationMatrixColumnItem::Single::Descriptor.create(observation_matrix: self, descriptor: d)
+ result[:columns] += 1 if j.persisted?
+ end
+
+ result
+ end
+
+ def self.batch_add(params)
+ return false if params[:observation_matrix_id].blank?
+ o = ObservationMatrix.find_by(project_id: params[:project_id], id: params[:observation_matrix_id])
+ o.batch_populate(params)
+ end
+
+ def self.batch_create(params)
+ begin
+ o = ObservationMatrix.create!(params.require(:observation_matrix).permit(:name))
+ rescue ActiveRecord::RecordInvalid => e
+ return e.errors
+ end
+ o.batch_populate(params)
+ end
+
end
diff --git a/config/routes/data.rb b/config/routes/data.rb
index 1e2013d78b..d22925624f 100644
--- a/config/routes/data.rb
+++ b/config/routes/data.rb
@@ -452,6 +452,9 @@
collection do
get :otus_used_in_matrices, {format: :json}
+
+ post :batch_create, {format: :json}
+ post :batch_add, {format: :json}
end
end
diff --git a/spec/models/observation_matrix_spec.rb b/spec/models/observation_matrix_spec.rb
index 404b2c83f5..11ec9f6bc5 100644
--- a/spec/models/observation_matrix_spec.rb
+++ b/spec/models/observation_matrix_spec.rb
@@ -6,7 +6,67 @@
let(:descriptor) { Descriptor::Working.create!(name: 'working') }
let(:collection_object) { Specimen.create! }
- context 'associations' do
+ specify '#batch_create otu_query' do
+ %w{a ab ac}.collect{|name| Otu.create!(name:)}
+ p = ActionController::Parameters.new(
+ {observation_matrix: {name: 'Q'},
+ otu_query: {name: 'a'}}
+ )
+
+ r = ObservationMatrix.batch_create(p)
+ expect(r[:observation_matrix_name]).to eq('Q')
+ expect(r[:rows]).to eq(3)
+ end
+
+ specify '#batch_add otu_query' do
+ %w{a ab ac}.collect{|name| Otu.create!(name:)}
+ p = ActionController::Parameters.new(
+ { project_id:,
+ observation_matrix_id: FactoryBot.create(:valid_observation_matrix).id,
+ otu_query: {name: 'a'}
+ })
+
+ r = ObservationMatrix.batch_add(p)
+ expect(r[:rows]).to eq(3)
+ end
+
+ specify '#batch_add descriptor' do
+ o = %w{1 2 3}.collect{|t| FactoryBot.create(:valid_descriptor)}
+ p = ActionController::Parameters.new(
+ { project_id:,
+ observation_matrix_id: FactoryBot.create(:valid_observation_matrix).id,
+ descriptor_query: {descriptor_id: o.map(&:id) }
+ })
+
+ r = ObservationMatrix.batch_add(p)
+ expect(r[:columns]).to eq(3)
+ end
+
+ specify '#batch_add extract' do
+ o = %w{1 2 3}.collect{|t| FactoryBot.create(:valid_extract)}
+ p = ActionController::Parameters.new(
+ { project_id:,
+ observation_matrix_id: FactoryBot.create(:valid_observation_matrix).id,
+ extract_query: {extract_id: o.map(&:id) }
+ })
+
+ r = ObservationMatrix.batch_add(p)
+ expect(r[:rows]).to eq(3)
+ end
+
+ specify '#batch_add collection_object' do
+ o = %w{1 2 3}.collect{|t| FactoryBot.create(:valid_specimen, total: t)}
+ p = ActionController::Parameters.new(
+ { project_id:,
+ observation_matrix_id: FactoryBot.create(:valid_observation_matrix).id,
+ collection_object_query: {collection_object_id: o.map(&:id) }
+ })
+
+ r = ObservationMatrix.batch_add(p)
+ expect(r[:rows]).to eq(3)
+ end
+
+ context 'associations' do
context 'has_many' do
specify '#observation_matrix_column_items' do
expect(observation_matrix.observation_matrix_column_items << ObservationMatrixColumnItem.new).to be_truthy
@@ -32,12 +92,12 @@
end
specify 'cascade creates rows from items 1' do
- observation_matrix.observation_matrix_row_items << ObservationMatrixRowItem::Single.new(observation_object: otu)
+ observation_matrix.observation_matrix_row_items << ObservationMatrixRowItem::Single.new(observation_object: otu)
expect(observation_matrix.observation_matrix_rows.count).to eq(1)
end
specify 'cascade creates columns from items 1' do
- observation_matrix.observation_matrix_column_items << ObservationMatrixColumnItem::Single::Descriptor.new(descriptor: descriptor)
+ observation_matrix.observation_matrix_column_items << ObservationMatrixColumnItem::Single::Descriptor.new(descriptor:)
expect(observation_matrix.observation_matrix_columns.count).to eq(1)
end
@@ -48,7 +108,7 @@
r1 = ObservationMatrixRowItem::Single.create!(observation_object: otu, observation_matrix: om)
r2 = ObservationMatrixRowItem::Single.create!(observation_object: collection_object, observation_matrix: om)
- c3 = ObservationMatrixColumnItem::Single::Descriptor.create!(descriptor: descriptor, observation_matrix: om)
+ c3 = ObservationMatrixColumnItem::Single::Descriptor.create!(descriptor:, observation_matrix: om)
o1 = Observation::Continuous.create!(observation_object: otu, descriptor: descriptor1, continuous_value: 6)
o2 = Observation::Continuous.create!(observation_object: collection_object, descriptor: descriptor1, continuous_value: 5)
om.reload
From 0f89fe9a3ecb6a2d1b7be01fb85ad4ebb1af4bff Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 12:23:51 -0500
Subject: [PATCH 51/88] Rename castor->Nomen and align batch modules and specs
---
app/controllers/taxon_names_controller.rb | 14 ++--
app/views/taxon_names/batch_load.html.erb | 2 +-
.../{castor => nomen}/_batch_load.html.erb | 10 +--
.../{castor => nomen}/_form.html.erb | 0
.../{castor => nomen}/create.html.erb | 0
.../{castor => nomen}/preview.html.erb | 8 +--
config/routes/data.rb | 4 +-
...or_interpreter.rb => nomen_interpreter.rb} | 30 ++++-----
.../taxon_names/nomen_interpreter_spec.rb | 66 +++++++++++++++++++
9 files changed, 99 insertions(+), 35 deletions(-)
rename app/views/taxon_names/batch_load/{castor => nomen}/_batch_load.html.erb (86%)
rename app/views/taxon_names/batch_load/{castor => nomen}/_form.html.erb (100%)
rename app/views/taxon_names/batch_load/{castor => nomen}/create.html.erb (100%)
rename app/views/taxon_names/batch_load/{castor => nomen}/preview.html.erb (81%)
rename lib/batch_load/import/taxon_names/{castor_interpreter.rb => nomen_interpreter.rb} (92%)
create mode 100644 spec/lib/batch_load/import/taxon_names/nomen_interpreter_spec.rb
diff --git a/app/controllers/taxon_names_controller.rb b/app/controllers/taxon_names_controller.rb
index 98857e844b..2aa2342c14 100644
--- a/app/controllers/taxon_names_controller.rb
+++ b/app/controllers/taxon_names_controller.rb
@@ -185,23 +185,23 @@ def create_simple_batch_load
render :batch_load
end
- def preview_castor_batch_load
+ def preview_nomen_batch_load
if params[:file]
- @result = BatchLoad::Import::TaxonNames::CastorInterpreter.new(**batch_params)
+ @result = BatchLoad::Import::TaxonNames::NomenInterpreter.new(**batch_params)
digest_cookie(params[:file].tempfile, :nomen_taxon_names_md5)
- render 'taxon_names/batch_load/castor/preview'
+ render 'taxon_names/batch_load/nomen/preview'
else
flash[:notice] = 'No file provided!'
redirect_to action: :batch_load
end
end
- def create_castor_batch_load
+ def create_nomen_batch_load
if params[:file] && digested_cookie_exists?(params[:file].tempfile, :nomen_taxon_names_md5)
- @result = BatchLoad::Import::TaxonNames::CastorInterpreter.new(**batch_params)
+ @result = BatchLoad::Import::TaxonNames::NomenInterpreter.new(**batch_params)
if @result.create
flash[:notice] = "Successfully proccessed file, #{@result.total_records_created} items were created."
- render 'taxon_names/batch_load/castor/create' and return
+ render 'taxon_names/batch_load/nomen/create' and return
else
flash[:alert] = 'Batch import failed.'
end
@@ -307,4 +307,4 @@ def batch_params
end
-require_dependency Rails.root.to_s + '/lib/batch_load/import/taxon_names/castor_interpreter.rb'
+require_dependency Rails.root.to_s + '/lib/batch_load/import/taxon_names/nomen_interpreter.rb'
diff --git a/app/views/taxon_names/batch_load.html.erb b/app/views/taxon_names/batch_load.html.erb
index c632efbb99..9607ca3591 100644
--- a/app/views/taxon_names/batch_load.html.erb
+++ b/app/views/taxon_names/batch_load.html.erb
@@ -1,3 +1,3 @@
Batch load taxon names
<%= render 'taxon_names/batch_load/simple/batch_load' %>
-<%= render 'taxon_names/batch_load/castor/batch_load' -%>
+<%= render 'taxon_names/batch_load/nomen/batch_load' -%>
diff --git a/app/views/taxon_names/batch_load/castor/_batch_load.html.erb b/app/views/taxon_names/batch_load/nomen/_batch_load.html.erb
similarity index 86%
rename from app/views/taxon_names/batch_load/castor/_batch_load.html.erb
rename to app/views/taxon_names/batch_load/nomen/_batch_load.html.erb
index 8676f12bdf..40193b1872 100644
--- a/app/views/taxon_names/batch_load/castor/_batch_load.html.erb
+++ b/app/views/taxon_names/batch_load/nomen/_batch_load.html.erb
@@ -1,5 +1,5 @@
-
Castor batch load
+
NOMEN batch load
@@ -8,14 +8,14 @@
Creates hierarchy of taxon names and otus.
A tab-delimited, UTF-8 compatible text file is required.
- Column headers are (see <%= link_to('sample template', asset_path('batch_load_templates/taxon_names/taxon_names_castor_batch_load.tab'), target: '_blank') -%>).
+ Column headers are (see <%= link_to('sample template', asset_path('batch_load_templates/taxon_names/taxon_names_nomen_batch_load.tab'), target: '_blank') -%>).
Taxon name names with no parent id will be attached to the root taxon name.
Parent taxon names must be before child taxon names.
- An OTU with name of "taxon_concept_name" column is created if the "guid" column is not blank.
+ An OTU with name of "taxon_concept_name" column is created if the "guid" column is not blank.
An Identifier Global::Uri will be attached with the value of the "guid" column if not blank to the OTU. If the identifier is not legal it will not be created, no warning is given (e.g. duplicate URIs).
Creates a taxon name relationship (values are <%= link_to('NOMEN class names in TaxonWorks', 'https://github.com/SpeciesFileGroup/taxonworks/tree/development/app/models/taxon_name_relationship', target: :blank) -%>, e.g. "TaxonNameRelationship::Iczn::Invalidating::Synonym") with class type specified in the "related_name_nomen_class" column between the taxon name at that row and the taxon name with the id in "related_name_id".
Creates taxon name classification (values are <%= link_to('NOMEN class names in TaxonWorks', 'https://github.com/SpeciesFileGroup/taxonworks/tree/development/app/models/taxon_name_classification', target: :blank,) %>, e.g. "TaxonNameClassification::Iczn::Available::Valid") with class type specfied in the "name_nomen_clasification" column for the taxon name at that row.
- `rank` is a lowercase like "species", "genus", "family" etc.
+ `rank` is a lowercase like "species", "genus", "family" etc.
There is currently no size limit to the file being loaded, but we recommend capping at 1-2 thousand names.
Multiple uploads of the same data will not be created.
@@ -30,7 +30,7 @@
Go!
- <%= render partial: '/taxon_names/batch_load/castor/form', locals: {url: preview_castor_batch_load_taxon_names_path, submit: :preview} -%>
+ <%= render partial: '/taxon_names/batch_load/nomen/form', locals: {url: preview_nomen_batch_load_taxon_names_path, submit: :preview} -%>
diff --git a/app/views/taxon_names/batch_load/castor/_form.html.erb b/app/views/taxon_names/batch_load/nomen/_form.html.erb
similarity index 100%
rename from app/views/taxon_names/batch_load/castor/_form.html.erb
rename to app/views/taxon_names/batch_load/nomen/_form.html.erb
diff --git a/app/views/taxon_names/batch_load/castor/create.html.erb b/app/views/taxon_names/batch_load/nomen/create.html.erb
similarity index 100%
rename from app/views/taxon_names/batch_load/castor/create.html.erb
rename to app/views/taxon_names/batch_load/nomen/create.html.erb
diff --git a/app/views/taxon_names/batch_load/castor/preview.html.erb b/app/views/taxon_names/batch_load/nomen/preview.html.erb
similarity index 81%
rename from app/views/taxon_names/batch_load/castor/preview.html.erb
rename to app/views/taxon_names/batch_load/nomen/preview.html.erb
index c0917d4628..b1f89e7ca7 100644
--- a/app/views/taxon_names/batch_load/castor/preview.html.erb
+++ b/app/views/taxon_names/batch_load/nomen/preview.html.erb
@@ -3,12 +3,12 @@
<% end %>
<%= content_for :batch_form do -%>
- <%= render partial: '/taxon_names/batch_load/castor/form', locals: {url: create_castor_batch_load_taxon_names_path, submit: :create} -%>
+ <%= render partial: '/taxon_names/batch_load/nomen/form', locals: {url: create_nomen_batch_load_taxon_names_path, submit: :create} -%>
<% end %>
<%= content_for :line_breakdown do -%>
<%= content_tag :div, 'Parent related error messages can be (largely) ignored. The parent is dynamically set on create.', class: [:feedback, 'feedback-warning'] %>
-
+
Line
Data count
@@ -19,7 +19,7 @@
<% @result.sorted_processed_rows.each do |i, rp| -%>
- <%= batch_line_link_td(i) -%>
+ <%= batch_line_link_td(i) -%>
<%= batch_all_objects_count_td(rp) -%>
<%= rp.objects[:taxon_name].each_with_index.collect{|n, i| "#{i + 1}: " + n.get_full_name.to_s }.join(' ').html_safe -%>
@@ -27,7 +27,7 @@
<%= batch_data_errors_td(rp) -%>
<%= batch_parse_errors_td(rp) -%>
- <% end -%>
+ <% end -%>
<% end %>
diff --git a/config/routes/data.rb b/config/routes/data.rb
index 1e2013d78b..21a2969350 100644
--- a/config/routes/data.rb
+++ b/config/routes/data.rb
@@ -728,8 +728,8 @@
post :create_simple_batch_load
get :ranks, {format: :json}
- post :preview_castor_batch_load
- post :create_castor_batch_load
+ post :preview_nomen_batch_load
+ post :create_nomen_batch_load
get :parse, defaults: {format: :json}
get :random
diff --git a/lib/batch_load/import/taxon_names/castor_interpreter.rb b/lib/batch_load/import/taxon_names/nomen_interpreter.rb
similarity index 92%
rename from lib/batch_load/import/taxon_names/castor_interpreter.rb
rename to lib/batch_load/import/taxon_names/nomen_interpreter.rb
index 7c467e6433..0cfc6d6ab1 100644
--- a/lib/batch_load/import/taxon_names/castor_interpreter.rb
+++ b/lib/batch_load/import/taxon_names/nomen_interpreter.rb
@@ -1,5 +1,5 @@
module BatchLoad
- class Import::TaxonNames::CastorInterpreter < BatchLoad::Import
+ class Import::TaxonNames::NomenInterpreter < BatchLoad::Import
# The parent for the top level names
attr_accessor :parent_taxon_name
@@ -42,9 +42,7 @@ def parent_taxon_name
end
# @return [Integer]
- def parent_taxon_name_id
- parent_taxon_name.id
- end
+ delegate :id, to: :parent_taxon_name, prefix: true
# rubocop:disable Metrics/MethodLength
# @return [Integer]
@@ -72,7 +70,7 @@ def build_taxon_names
year_of_publication: year_of_publication(row['author_year']),
rank_class: Ranks.lookup(@nomenclature_code.to_sym, row['rank']),
by: user,
- project: project,
+ project:,
verbatim_author: verbatim_author(row['author_year']),
taxon_name_authors_attributes: taxon_name_authors_attributes(verbatim_author(row['author_year']))
}
@@ -85,7 +83,7 @@ def build_taxon_names
rank_class: Ranks.lookup(@nomenclature_code.to_sym, row['original_rank']),
parent: parent_taxon_name,
by: user,
- project: project,
+ project:,
verbatim_author: verbatim_author(row['author_year']),
taxon_name_authors_attributes: taxon_name_authors_attributes(verbatim_author(row['author_year']))
}
@@ -118,15 +116,15 @@ def build_taxon_names
# TaxonNameRelationship
related_name_id = row['related_name_id']
-
- if !taxon_names[related_name_id].blank?
+
+ if taxon_names[related_name_id].present?
related_name_nomen_class = nil
begin
related_name_nomen_class = row['related_name_nomen_class'].safe_constantize
if related_name_nomen_class.ancestors.include?(TaxonNameRelationship)
-
+
taxon_name_relationship = related_name_nomen_class.new(
subject_taxon_name: p, object_taxon_name: taxon_names[related_name_id]
)
@@ -147,22 +145,22 @@ def build_taxon_names
end
# There is an OTU linked to the taxon name
- if !row['taxon_concept_name'].blank? || !row['guid'].blank?
- taxon_concept_identifier_castor = {}
+ if row['taxon_concept_name'].present? || row['guid'].present?
+ taxon_concept_identifier_nomen = {}
- if !row['guid'].blank?
- taxon_concept_identifier_castor = {
+ if row['guid'].present?
+ taxon_concept_identifier_nomen = {
type: 'Identifier::Global::Uri',
identifier: row['guid'] }
end
- otu = Otu.new(name: row['taxon_concept_name'], taxon_name: p, identifiers_attributes: [taxon_concept_identifier_castor] )
+ otu = Otu.new(name: row['taxon_concept_name'], taxon_name: p, identifiers_attributes: [taxon_concept_identifier_nomen] )
parse_result.objects[:otu].push(otu)
else
# Note we are not technically using the param like TaxonName.new(), so we can't just set the attribute
# So we hack in the OTUs 'manually". This also lets us see them in the result
- if also_create_otu
+ if also_create_otu
parse_result.objects[:otu].push( Otu.new(taxon_name: p) )
end
end
@@ -234,7 +232,7 @@ def author_info(author_string)
first_name = split_author_info[1]
end
- { last_name: last_name, first_name: first_name, suffix: 'suffix' }
+ { last_name:, first_name:, suffix: 'suffix' }
end
end
end
diff --git a/spec/lib/batch_load/import/taxon_names/nomen_interpreter_spec.rb b/spec/lib/batch_load/import/taxon_names/nomen_interpreter_spec.rb
new file mode 100644
index 0000000000..24ef2c96a2
--- /dev/null
+++ b/spec/lib/batch_load/import/taxon_names/nomen_interpreter_spec.rb
@@ -0,0 +1,66 @@
+require 'rails_helper'
+
+describe BatchLoad::Import::TaxonNames::NomenInterpreter, type: :model do
+
+ let(:file_name) { 'spec/files/batch/otu/OtuTest.tsv' }
+ let(:upload_file) { Rack::Test::UploadedFile.new(file_name) }
+
+ let(:setup) {
+ csv1 = CSV.read(file_name,
+ headers: true,
+ header_converters: :downcase,
+ col_sep: "\t",
+ encoding: 'UTF-8')
+
+ # csv1.each do |row|
+ # ident = row[0]
+ # case ident
+ # when 'americana' # create an otu to find later
+ # Otu.create(name: ident)
+ # else
+ # end
+ # end
+ }
+
+ let(:import) { BatchLoad::Import::TaxonNames::NomenInterpreter.new(
+ project_id:,
+ user_id:,
+ file: upload_file)
+ }
+
+ before { setup }
+
+
+ specify '.new succeeds' do
+ expect(import).to be_truthy
+ end
+
+ specify '#processed_rows' do
+ expect(import.processed_rows.count).to eq(7) # now skips empties
+ end
+
+ specify '#processed_rows' do
+ expect(import.create_attempted).to eq(false)
+ end
+
+ context 'after .create' do
+ before { import.create }
+
+ specify '#create_attempted' do
+ expect(import.create_attempted).to eq(true)
+ end
+
+ specify '#valid_objects' do
+ expect(import.valid_objects.count).to eq(7)
+ end
+
+ specify '#successful_rows' do
+ expect(import.successful_rows).to be_truthy
+ end
+
+ specify '#total_records_created' do
+ expect(import.total_records_created).to eq(7)
+ end
+ end
+
+end
From de9d352f493ae106e972fed20c26e4c9b8cbad90 Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 12:27:56 -0500
Subject: [PATCH 52/88] Return error messages
---
app/models/observation_matrix.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/models/observation_matrix.rb b/app/models/observation_matrix.rb
index 6c869e7d3f..d545011143 100644
--- a/app/models/observation_matrix.rb
+++ b/app/models/observation_matrix.rb
@@ -326,7 +326,7 @@ def self.batch_create(params)
begin
o = ObservationMatrix.create!(params.require(:observation_matrix).permit(:name))
rescue ActiveRecord::RecordInvalid => e
- return e.errors
+ return o.errors.full_messages
end
o.batch_populate(params)
end
From 8622935d01dc5dfdcf9fdc472531b2cea0482d60 Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Thu, 18 May 2023 15:11:35 -0300
Subject: [PATCH 53/88] Fix #3415
---
.../radials/matrix/components/AddNewSlice.vue | 72 +++++++++
.../radials/matrix/components/AddSlice.vue | 77 +++++++++
.../vue/components/radials/matrix/radial.vue | 153 ++++++++++++++++++
.../vue/components/ui/VIcon/Paths/matrix.js | 13 ++
.../vue/components/ui/VIcon/icons.js | 1 +
.../vue/routes/endpoints/ObservationMatrix.js | 7 +-
app/javascript/vue/routes/routes.js | 1 +
.../tasks/collection_objects/filter/app.vue | 9 ++
.../vue/tasks/descriptors/filter/App.vue | 13 ++
.../vue/tasks/extracts/filter/App.vue | 13 ++
.../vue/tasks/observations/filter/App.vue | 13 ++
app/javascript/vue/tasks/otu/filter/App.vue | 15 ++
12 files changed, 386 insertions(+), 1 deletion(-)
create mode 100644 app/javascript/vue/components/radials/matrix/components/AddNewSlice.vue
create mode 100644 app/javascript/vue/components/radials/matrix/components/AddSlice.vue
create mode 100644 app/javascript/vue/components/radials/matrix/radial.vue
create mode 100644 app/javascript/vue/components/ui/VIcon/Paths/matrix.js
diff --git a/app/javascript/vue/components/radials/matrix/components/AddNewSlice.vue b/app/javascript/vue/components/radials/matrix/components/AddNewSlice.vue
new file mode 100644
index 0000000000..a9f2b7076a
--- /dev/null
+++ b/app/javascript/vue/components/radials/matrix/components/AddNewSlice.vue
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+ Create
+
+
+
+
+
+
+
diff --git a/app/javascript/vue/components/radials/matrix/components/AddSlice.vue b/app/javascript/vue/components/radials/matrix/components/AddSlice.vue
new file mode 100644
index 0000000000..e05fbb1f42
--- /dev/null
+++ b/app/javascript/vue/components/radials/matrix/components/AddSlice.vue
@@ -0,0 +1,77 @@
+
+
+
(matrix = item)"
+ />
+
+
+
+ Add
+
+
+
+
+
+
+
diff --git a/app/javascript/vue/components/radials/matrix/radial.vue b/app/javascript/vue/components/radials/matrix/radial.vue
new file mode 100644
index 0000000000..c564ca83de
--- /dev/null
+++ b/app/javascript/vue/components/radials/matrix/radial.vue
@@ -0,0 +1,153 @@
+
+
+
+
+
+ Radial matrix
+
+
+
+
+
+
+ {{ currentSlice }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/javascript/vue/components/ui/VIcon/Paths/matrix.js b/app/javascript/vue/components/ui/VIcon/Paths/matrix.js
new file mode 100644
index 0000000000..b2c22dcb51
--- /dev/null
+++ b/app/javascript/vue/components/ui/VIcon/Paths/matrix.js
@@ -0,0 +1,13 @@
+export const matrix = {
+ paths: [
+ {
+ d: `M25.351,0H2.698C1.446,0,0.434,1.004,0.434,2.232v23.59c0,1.23,1.012,2.229,2.264,2.229h22.653
+ c1.248,0,2.266-0.998,2.266-2.229V2.232C27.617,1.004,26.599,0,25.351,0z M8.662,26.373H4.053c-1.101,0-1.994-0.877-1.994-1.963
+ v-4.586h6.603C8.662,19.824,8.662,26.373,8.662,26.373z M8.662,17.527H2.059v-6.625h6.603C8.662,10.902,8.662,17.527,8.662,17.527z
+ M8.662,8.605H2.059v-4.96c0-1.082,0.894-1.963,1.994-1.963h4.608v6.923H8.662z M17.582,26.373h-6.624v-6.549h6.624V26.373z
+ M17.582,17.527h-6.624v-6.625h6.624V17.527z M17.582,8.605h-6.624V1.682h6.624V8.605z M25.989,24.41
+ c0,1.086-0.895,1.963-1.992,1.963H19.88v-6.549h6.109V24.41z M25.989,17.527H19.88v-6.625h6.109V17.527z M25.989,8.605H19.88V1.682
+ h4.117c1.098,0,1.992,0.881,1.992,1.963V8.605z`
+ }
+ ]
+}
diff --git a/app/javascript/vue/components/ui/VIcon/icons.js b/app/javascript/vue/components/ui/VIcon/icons.js
index d9ea644b6d..edcae56bf2 100644
--- a/app/javascript/vue/components/ui/VIcon/icons.js
+++ b/app/javascript/vue/components/ui/VIcon/icons.js
@@ -29,3 +29,4 @@ export * from './Paths/radialMassAnnotator.js'
export * from './Paths/eye.js'
export * from './Paths/swap.js'
export * from './Paths/picking.js'
+export * from './Paths/matrix.js'
diff --git a/app/javascript/vue/routes/endpoints/ObservationMatrix.js b/app/javascript/vue/routes/endpoints/ObservationMatrix.js
index 8bcb144f8e..fd26370666 100644
--- a/app/javascript/vue/routes/endpoints/ObservationMatrix.js
+++ b/app/javascript/vue/routes/endpoints/ObservationMatrix.js
@@ -31,5 +31,10 @@ export const ObservationMatrix = {
}),
otusUseInMatrix: (params) =>
- AjaxCall('get', `/${controller}/otus_used_in_matrices.json`, { params })
+ AjaxCall('get', `/${controller}/otus_used_in_matrices.json`, { params }),
+
+ addBatch: (params) => AjaxCall('post', `/${controller}/batch_add`, params),
+
+ createBatch: (params) =>
+ AjaxCall('post', `/${controller}/batch_create`, params)
}
diff --git a/app/javascript/vue/routes/routes.js b/app/javascript/vue/routes/routes.js
index 4bee9563e3..20ff183d87 100644
--- a/app/javascript/vue/routes/routes.js
+++ b/app/javascript/vue/routes/routes.js
@@ -33,6 +33,7 @@ const RouteNames = {
ManageControlledVocabularyTask: '/tasks/controlled_vocabularies/manage',
MatchCollectionObject: '/tasks/collection_objects/match',
MatrixRowCoder: '/tasks/observation_matrices/row_coder/index',
+ NewObservationMatrix: '/tasks/observation_matrices/new_matrix',
NewBiologicalAssociationGraph:
'/tasks/biological_associations/biological_associations_graph',
NewCollectingEvent: '/tasks/collecting_events/new_collecting_event',
diff --git a/app/javascript/vue/tasks/collection_objects/filter/app.vue b/app/javascript/vue/tasks/collection_objects/filter/app.vue
index 918ec80b17..a656f8a344 100644
--- a/app/javascript/vue/tasks/collection_objects/filter/app.vue
+++ b/app/javascript/vue/tasks/collection_objects/filter/app.vue
@@ -18,10 +18,18 @@
>
+
+
+
+
+
+
+
+
@@ -39,6 +51,7 @@
import FilterLayout from 'components/layout/Filter/FilterLayout.vue'
import FilterView from './components/FilterView.vue'
import FilterList from 'components/layout/Filter/FilterList.vue'
+import RadialMatrix from 'components/radials/matrix/radial.vue'
import VSpinner from 'components/spinner.vue'
import useFilter from 'shared/Filter/composition/useFilter.js'
import { listParser } from './utils/listParser'
diff --git a/app/javascript/vue/tasks/extracts/filter/App.vue b/app/javascript/vue/tasks/extracts/filter/App.vue
index b25772bfec..9c76f2d3de 100644
--- a/app/javascript/vue/tasks/extracts/filter/App.vue
+++ b/app/javascript/vue/tasks/extracts/filter/App.vue
@@ -15,6 +15,18 @@
@nextpage="loadPage"
@reset="resetFilter"
>
+
+
+
+
+
+
@@ -40,6 +52,7 @@
import FilterLayout from 'components/layout/Filter/FilterLayout.vue'
import FilterComponent from './components/Filter.vue'
import FilterList from 'components/layout/Filter/FilterList.vue'
+import RadialMatrix from 'components/radials/matrix/radial.vue'
import VSpinner from 'components/spinner.vue'
import useFilter from 'shared/Filter/composition/useFilter.js'
import extend from 'tasks/extracts/new_extract/const/extendRequest'
diff --git a/app/javascript/vue/tasks/observations/filter/App.vue b/app/javascript/vue/tasks/observations/filter/App.vue
index e8c1a1df9b..70897643ad 100644
--- a/app/javascript/vue/tasks/observations/filter/App.vue
+++ b/app/javascript/vue/tasks/observations/filter/App.vue
@@ -15,6 +15,18 @@
@nextpage="loadPage"
@reset="resetFilter"
>
+
+
+
+
+
+
@@ -40,6 +52,7 @@
import FilterLayout from 'components/layout/Filter/FilterLayout.vue'
import FilterView from './components/FilterView.vue'
import FilterList from 'components/layout/Filter/FilterList.vue'
+import RadialMatrix from 'components/radials/matrix/radial.vue'
import VSpinner from 'components/spinner.vue'
import useFilter from 'shared/Filter/composition/useFilter.js'
import { listParser } from './utils/listParser'
diff --git a/app/javascript/vue/tasks/otu/filter/App.vue b/app/javascript/vue/tasks/otu/filter/App.vue
index 210c71ffc9..70cebac839 100644
--- a/app/javascript/vue/tasks/otu/filter/App.vue
+++ b/app/javascript/vue/tasks/otu/filter/App.vue
@@ -15,6 +15,20 @@
@nextpage="loadPage"
@reset="resetFilter"
>
+
+
+
+
+
+
+
+
@@ -42,6 +56,7 @@ import FilterLayout from 'components/layout/Filter/FilterLayout.vue'
import FilterView from './components/FilterView.vue'
import FilterList from 'components/layout/Filter/FilterList.vue'
import useFilter from 'shared/Filter/composition/useFilter.js'
+import RadialMatrix from 'components/radials/matrix/radial.vue'
import VSpinner from 'components/spinner.vue'
import { ATTRIBUTES } from './constants/attributes'
import { listParser } from './utils/listParser'
From 452abd4dd35c3c1f166986c8da0329c219868689 Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Thu, 18 May 2023 16:32:55 -0300
Subject: [PATCH 54/88] Remove import dataset facet from filter co
---
.../vue/tasks/collection_objects/filter/components/filter.vue | 1 -
1 file changed, 1 deletion(-)
diff --git a/app/javascript/vue/tasks/collection_objects/filter/components/filter.vue b/app/javascript/vue/tasks/collection_objects/filter/components/filter.vue
index 63521ec133..153da2ebf5 100644
--- a/app/javascript/vue/tasks/collection_objects/filter/components/filter.vue
+++ b/app/javascript/vue/tasks/collection_objects/filter/components/filter.vue
@@ -25,7 +25,6 @@
-
Date: Thu, 18 May 2023 14:55:57 -0500
Subject: [PATCH 55/88] Specs and fixes for NOMEN batch (was castor). Fix #3411
---
CHANGELOG.md | 4 +
app/models/taxon_name_relationship.rb | 3 +
.../import/taxon_names/nomen_interpreter.rb | 13 +--
...d.tab => taxon_names_nomen_batch_load.tab} | 0
spec/files/batch/taxon_name/NomenTest.tab | 11 ++
.../taxon_names/nomen_interpreter_spec.rb | 100 ++++++++++++------
6 files changed, 90 insertions(+), 41 deletions(-)
rename public/batch_load_templates/taxon_names/{taxon_names_castor_batch_load.tab => taxon_names_nomen_batch_load.tab} (100%)
create mode 100644 spec/files/batch/taxon_name/NomenTest.tab
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0390442598..2a0ff73a40 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@ This project does not yet adheres to [Semantic Versioning](https://semv
## [unreleased]
### Added
+
- Biological associations can now be depicted
- Data depiction facets
- Biological associations filter annotation-based facets
@@ -25,6 +26,8 @@ This project does not yet adheres to [Semantic Versioning](https://semv
- GeographicArea autocomplete (exact match on alternate value)
### Fixed
+
+- Year import in NOMEN (was "castor") import [#3411]
- PublicContent missing is_community? method preventing reporting.
- Loans dashboard fails to render when no loans are present
- Staged image processing when boundaries fail to be calculated and calculate incorrectly
@@ -35,6 +38,7 @@ This project does not yet adheres to [Semantic Versioning](https://semv
- Changing the number of items per page or the page shows loan items that are not from the current loan in New/edit loan task [#3413]
- Sort by name gives an wrong order in filter nomenclature task
+[#3411]: https://github.com/SpeciesFileGroup/taxonworks/issues/3411
[#3367]: https://github.com/SpeciesFileGroup/taxonworks/issues/3367
[#3400]: https://github.com/SpeciesFileGroup/taxonworks/issues/3400
[#3416]: https://github.com/SpeciesFileGroup/taxonworks/issues/3416
diff --git a/app/models/taxon_name_relationship.rb b/app/models/taxon_name_relationship.rb
index efca381a52..f0983ee86e 100644
--- a/app/models/taxon_name_relationship.rb
+++ b/app/models/taxon_name_relationship.rb
@@ -64,6 +64,9 @@ class TaxonNameRelationship < ApplicationRecord
validates_presence_of :subject_taxon_name, message: 'Missing taxon name on the left side'
validates_presence_of :object_taxon_name, message: 'Missing taxon name on the right side'
+ validates_associated :subject_taxon_name
+ validates_associated :object_taxon_name
+
validates_uniqueness_of :object_taxon_name_id, scope: [:type, :project_id], if: :is_combination?
validates_uniqueness_of :object_taxon_name_id, scope: [:type, :subject_taxon_name_id, :project_id], unless: :is_combination?
diff --git a/lib/batch_load/import/taxon_names/nomen_interpreter.rb b/lib/batch_load/import/taxon_names/nomen_interpreter.rb
index 0cfc6d6ab1..30d308ac66 100644
--- a/lib/batch_load/import/taxon_names/nomen_interpreter.rb
+++ b/lib/batch_load/import/taxon_names/nomen_interpreter.rb
@@ -10,7 +10,7 @@ class Import::TaxonNames::NomenInterpreter < BatchLoad::Import
# The default parent if otherwise not provided
attr_accessor :base_taxon_name_id
- # The code (Rank Class) that new names will use
+ # The code (Rank Class) that new names will use. Required.
attr_accessor :nomenclature_code
# @return Boolean
@@ -128,6 +128,7 @@ def build_taxon_names
taxon_name_relationship = related_name_nomen_class.new(
subject_taxon_name: p, object_taxon_name: taxon_names[related_name_id]
)
+
parse_result.objects[:taxon_name_relationship].push taxon_name_relationship
end
rescue NameError
@@ -144,7 +145,7 @@ def build_taxon_names
end
end
- # There is an OTU linked to the taxon name
+ # There is an OTU linked to the taxon name.
if row['taxon_concept_name'].present? || row['guid'].present?
taxon_concept_identifier_nomen = {}
@@ -158,10 +159,11 @@ def build_taxon_names
parse_result.objects[:otu].push(otu)
else
+
# Note we are not technically using the param like TaxonName.new(), so we can't just set the attribute
# So we hack in the OTUs 'manually". This also lets us see them in the result
if also_create_otu
- parse_result.objects[:otu].push( Otu.new(taxon_name: p) )
+ parse_result.objects[:otu].push Otu.new(taxon_name: p)
end
end
@@ -188,11 +190,10 @@ def build
# @return [String, nil]
def year_of_publication(author_year)
return nil if author_year.blank?
- split_author_year = author_year.split(' ')
- year = split_author_year[split_author_year.length - 1]
- year =~ /\A\d+\z/ ? year : ''
+ author_year&.match(/\d\d\d\d/)&.to_s
end
+ # TODO: unify parsing to somewhere else
# @param [String] author_year
# @return [String, nil] just the author name, wiht parens left on
def verbatim_author(author_year)
diff --git a/public/batch_load_templates/taxon_names/taxon_names_castor_batch_load.tab b/public/batch_load_templates/taxon_names/taxon_names_nomen_batch_load.tab
similarity index 100%
rename from public/batch_load_templates/taxon_names/taxon_names_castor_batch_load.tab
rename to public/batch_load_templates/taxon_names/taxon_names_nomen_batch_load.tab
diff --git a/spec/files/batch/taxon_name/NomenTest.tab b/spec/files/batch/taxon_name/NomenTest.tab
new file mode 100644
index 0000000000..43cd76047d
--- /dev/null
+++ b/spec/files/batch/taxon_name/NomenTest.tab
@@ -0,0 +1,11 @@
+id taxon_name parent_id rank related_name_id related_name_nomen_class name_nomen_classification author_year guid taxon_concept_name
+1 Aidae family
+2 Bidae family
+3 Cus 1 genus Jones
+4 Dus 2 genus TaxonNameClassification::Iczn::Unavailable
+5 eus123 3 species TaxonNameClassification::Iczn::Unavailable::NotLatin
+6 fus 4 species
+7 gus 3 species 5 TaxonNameRelationship::Iczn::Invalidating::Synonym (Smith, 1920) https://my.uri/123 Cus nr. gus 22x
+8 hus 4 species 6 TaxonNameRelationship::Iczn::Invalidating::Synonym (Jones)
+9 ius 3 species 5 TaxonNameRelationship::Iczn::Invalidating::Synonym
+10 jus 3 species 6 TaxonNameRelationship::Iczn::Invalidating::Synonym my_otu_name_22
diff --git a/spec/lib/batch_load/import/taxon_names/nomen_interpreter_spec.rb b/spec/lib/batch_load/import/taxon_names/nomen_interpreter_spec.rb
index 24ef2c96a2..d121b274f5 100644
--- a/spec/lib/batch_load/import/taxon_names/nomen_interpreter_spec.rb
+++ b/spec/lib/batch_load/import/taxon_names/nomen_interpreter_spec.rb
@@ -2,64 +2,94 @@
describe BatchLoad::Import::TaxonNames::NomenInterpreter, type: :model do
- let(:file_name) { 'spec/files/batch/otu/OtuTest.tsv' }
+ let(:file_name) { 'spec/files/batch/taxon_name/NomenTest.tab' }
let(:upload_file) { Rack::Test::UploadedFile.new(file_name) }
+ let(:root_taxon_name) { FactoryBot.create(:root_taxon_name) }
+
let(:setup) {
- csv1 = CSV.read(file_name,
- headers: true,
+ csv1 = CSV.read(
+ file_name,
+ headers: true,
header_converters: :downcase,
- col_sep: "\t",
- encoding: 'UTF-8')
-
- # csv1.each do |row|
- # ident = row[0]
- # case ident
- # when 'americana' # create an otu to find later
- # Otu.create(name: ident)
- # else
- # end
- # end
+ col_sep: "\t",
+ encoding: 'UTF-8')
}
let(:import) { BatchLoad::Import::TaxonNames::NomenInterpreter.new(
+ parent_taxon_name_id: root_taxon_name.id,
+ nomenclature_code: 'iczn',
project_id:,
user_id:,
file: upload_file)
}
- before { setup }
-
-
- specify '.new succeeds' do
- expect(import).to be_truthy
+ specify '.also_create_otu' do
+ expect(import.also_create_otu).to be_falsey
end
- specify '#processed_rows' do
- expect(import.processed_rows.count).to eq(7) # now skips empties
+ specify '#year_of_publication 1' do
+ expect(import.send(:year_of_publication, 'Smith, 1999')).to eq('1999')
end
- specify '#processed_rows' do
- expect(import.create_attempted).to eq(false)
+ specify '#year_of_publication 2' do
+ expect(import.send(:year_of_publication, '(Smith, 1999)')).to eq('1999')
end
- context 'after .create' do
- before { import.create }
-
- specify '#create_attempted' do
- expect(import.create_attempted).to eq(true)
+ context 'with setup' do
+ before { setup }
+
+ specify '.new succeeds' do
+ expect(import).to be_truthy
end
-
- specify '#valid_objects' do
- expect(import.valid_objects.count).to eq(7)
+
+ specify '#processed_rows' do
+ expect(import.processed_rows.count).to eq(10) # now skips empties
end
- specify '#successful_rows' do
- expect(import.successful_rows).to be_truthy
+ specify '#processed_rows' do
+ expect(import.create_attempted).to eq(false)
end
- specify '#total_records_created' do
- expect(import.total_records_created).to eq(7)
+ context 'after .create' do
+ before { import.create }
+
+ specify '#create_attempted' do
+ expect(import.create_attempted).to eq(true)
+ end
+
+ specify '#valid_objects (after save)' do
+ expect(import.valid_objects.count).to eq(16)
+ end
+
+ specify '#successful_rows' do
+ expect(import.successful_rows).to be_truthy
+ end
+
+ specify '#total_records_created' do
+ expect(import.total_records_created).to eq(16)
+ end
+
+ specify 'creates taxon names' do
+ expect(TaxonName.all.count).to eq(11) # batch + 1 root
+ end
+
+ specify 'creates relationships' do
+ expect(TaxonNameRelationship.all.count).to eq(4)
+ end
+
+ specify 'creates classifications' do
+ expect(TaxonNameClassification.all.count).to eq(2) # not added to total, nested
+ end
+
+ specify 'creates otus' do
+ expect(Otu.all.count).to eq(2)
+ end
+
+ specify 'creates identifiers' do
+ expect(Identifier.all.count).to eq(1) # not added to total
+ end
+
end
end
From 6dc792494c325b86882c7fc93e68ca80672c429b Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Thu, 18 May 2023 17:34:45 -0300
Subject: [PATCH 56/88] Clear input after create
---
.../vue/components/radials/matrix/components/AddNewSlice.vue | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/javascript/vue/components/radials/matrix/components/AddNewSlice.vue b/app/javascript/vue/components/radials/matrix/components/AddNewSlice.vue
index a9f2b7076a..f96c2cc9b5 100644
--- a/app/javascript/vue/components/radials/matrix/components/AddNewSlice.vue
+++ b/app/javascript/vue/components/radials/matrix/components/AddNewSlice.vue
@@ -66,6 +66,7 @@ function addToMatrix() {
`${body.rows} rows and ${body.columns} columns were successfully created.`,
'notice'
)
+ matrixName.value = ''
created.value = body
})
}
From 1b7a6ee1ccd75afefbc4c2c15bc02f36435eb26a Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 15:36:56 -0500
Subject: [PATCH 57/88] Fix populate method. Add observation->extract filter
links.
---
.../radials/filter/links/Observation.js | 2 ++
app/models/observation_matrix.rb | 19 ++++++++++---------
lib/queries/extract/filter.rb | 13 +++++++++++++
lib/queries/query/filter.rb | 2 +-
4 files changed, 26 insertions(+), 10 deletions(-)
diff --git a/app/javascript/vue/components/radials/filter/links/Observation.js b/app/javascript/vue/components/radials/filter/links/Observation.js
index 7a728ec166..cacc35ae64 100644
--- a/app/javascript/vue/components/radials/filter/links/Observation.js
+++ b/app/javascript/vue/components/radials/filter/links/Observation.js
@@ -1,6 +1,7 @@
import {
FILTER_COLLECTION_OBJECT,
FILTER_DESCRIPTOR,
+ FILTER_EXTRACT,
FILTER_IMAGE,
FILTER_OTU,
FILTER_SOURCE,
@@ -9,6 +10,7 @@ import {
export const Observation = [
FILTER_COLLECTION_OBJECT,
FILTER_DESCRIPTOR,
+ FILTER_EXTRACT,
FILTER_IMAGE,
FILTER_OTU,
FILTER_SOURCE,
diff --git a/app/models/observation_matrix.rb b/app/models/observation_matrix.rb
index d545011143..596baa6f8e 100644
--- a/app/models/observation_matrix.rb
+++ b/app/models/observation_matrix.rb
@@ -290,14 +290,15 @@ def batch_populate(params)
when 'descriptor_query'
descriptors = ::Queries::Descriptor::Filter.new(params[:descriptor_query]).all
when 'observation_query'
+
otus = ::Queries::Otu::Filter.new(observation_query: params[:observation_query]).all
- descriptors = ::Queries::Descriptor::Filter.new(descriptor_query: params[:descriptor_query]).all
- collection_objects = ::Queries::CollectionObject::Filter.new(collection_object_query: params[:collection_object_query]).all
- extracts = ::Queries::Extract::Filter.new(extract_query: params[:extract_object_query]).all
+ descriptors = ::Queries::Descriptor::Filter.new(observation_query: params[:observation_query]).all
+ collection_objects = ::Queries::CollectionObject::Filter.new(observation_query: params[:observation_query]).all
+ extracts = ::Queries::Extract::Filter.new(observation_query: params[:observation_query]).all
when 'collection_object_query'
collection_objects = ::Queries::CollectionObject::Filter.new(collection_object_query: params[:collection_object_query]).all
when 'extract_query'
- extracts = ::Queries::Extract::Filter.new(extract_query: params[:extract_object_query]).all
+ extracts = ::Queries::Extract::Filter.new(params[:extract_query]).all
end
[otus, collection_objects, extracts].each do |t|
@@ -323,12 +324,12 @@ def self.batch_add(params)
end
def self.batch_create(params)
- begin
- o = ObservationMatrix.create!(params.require(:observation_matrix).permit(:name))
- rescue ActiveRecord::RecordInvalid => e
- return o.errors.full_messages
+ o = ObservationMatrix.create(params.require(:observation_matrix).permit(:name))
+ if o.persisted?
+ o.batch_populate(params)
+ else
+ o.errors.full_messages
end
- o.batch_populate(params)
end
end
diff --git a/lib/queries/extract/filter.rb b/lib/queries/extract/filter.rb
index 9e8af02889..2d40196d75 100644
--- a/lib/queries/extract/filter.rb
+++ b/lib/queries/extract/filter.rb
@@ -247,6 +247,18 @@ def collection_object_query_facet
::Extract.from('(' + s + ') as extracts')
end
+
+ def observation_query_facet
+ return nil if observation_query.nil?
+ s = 'WITH query_obs_extracts AS (' + observation_query.all.to_sql + ') ' +
+ ::Extract
+ .joins(:observations)
+ .joins('JOIN query_obs_extracts as query_obs_extracts1 on observations.id = query_obs_extracts1.id')
+ .to_sql
+
+ ::Extract.from('(' + s + ') as extracts').distinct
+ end
+
# @return [Array]
def and_clauses
[
@@ -259,6 +271,7 @@ def and_clauses
def merge_clauses
[
+ observation_query_facet,
collection_object_query_facet,
otu_query_facet,
diff --git a/lib/queries/query/filter.rb b/lib/queries/query/filter.rb
index 030c20e888..b86a6aa75c 100644
--- a/lib/queries/query/filter.rb
+++ b/lib/queries/query/filter.rb
@@ -40,7 +40,7 @@ class Query::Filter < Queries::Query
collection_object: [:source, :loan, :otu, :taxon_name, :collecting_event, :biological_association, :extract, :image, :observation],
content: [:source, :otu, :taxon_name, :image],
descriptor: [:source, :observation, :otu],
- extract: [:source, :otu, :collection_object],
+ extract: [:source, :otu, :collection_object, :observation],
image: [:content, :collection_object, :collecting_event, :otu, :observation, :source, :taxon_name ],
loan: [:collection_object, :otu],
observation: [:collection_object, :descriptor, :image, :otu, :source, :taxon_name],
From efff980af0885c6271a70aa9fd38bb473ccc0b97 Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 15:44:05 -0500
Subject: [PATCH 58/88] Tweak respons message.
---
app/controllers/observation_matrices_controller.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/controllers/observation_matrices_controller.rb b/app/controllers/observation_matrices_controller.rb
index 75fdf6c054..2172c4c4c9 100644
--- a/app/controllers/observation_matrices_controller.rb
+++ b/app/controllers/observation_matrices_controller.rb
@@ -87,7 +87,7 @@ def batch_create
if o = ObservationMatrix.batch_create(params.merge(project_id: sessions_current_project_id))
render json: o
else
- render json: {success: false}
+ render json: o, status: :unprocessable_content
end
end
@@ -96,7 +96,7 @@ def batch_add
if o = ObservationMatrix.batch_add(params.merge(project_id: sessions_current_project_id))
render json: o
else
- render json: {success: false}
+ render json: o, status: :unprocessable_content
end
end
From cea5fe5a52e4799e45938216f4463960a4f798a2 Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Thu, 18 May 2023 17:45:51 -0300
Subject: [PATCH 59/88] Fix autocomplete, add spinner
---
.../radials/matrix/components/AddNewSlice.vue | 27 ++++++++++++-------
.../radials/matrix/components/AddSlice.vue | 26 ++++++++++++------
2 files changed, 36 insertions(+), 17 deletions(-)
diff --git a/app/javascript/vue/components/radials/matrix/components/AddNewSlice.vue b/app/javascript/vue/components/radials/matrix/components/AddNewSlice.vue
index f96c2cc9b5..edc78a9594 100644
--- a/app/javascript/vue/components/radials/matrix/components/AddNewSlice.vue
+++ b/app/javascript/vue/components/radials/matrix/components/AddNewSlice.vue
@@ -1,5 +1,6 @@
+
import VBtn from 'components/ui/VBtn/index.vue'
+import VSpinner from 'components/spinner.vue'
import { RouteNames } from 'routes/routes'
import { ObservationMatrix } from 'routes/endpoints'
import { ref } from 'vue'
@@ -51,6 +53,7 @@ const props = defineProps({
const matrixName = ref('')
const created = ref(undefined)
+const isSaving = ref(false)
function addToMatrix() {
const payload = {
@@ -60,14 +63,20 @@ function addToMatrix() {
}
}
- ObservationMatrix.createBatch(payload).then(({ body }) => {
- created.value = body
- TW.workbench.alert.create(
- `${body.rows} rows and ${body.columns} columns were successfully created.`,
- 'notice'
- )
- matrixName.value = ''
- created.value = body
- })
+ isSaving.value = true
+
+ ObservationMatrix.createBatch(payload)
+ .then(({ body }) => {
+ created.value = body
+ TW.workbench.alert.create(
+ `${body.rows} rows and ${body.columns} columns were successfully created.`,
+ 'notice'
+ )
+ matrixName.value = ''
+ created.value = body
+ })
+ .finally(() => {
+ isSaving.value = false
+ })
}
diff --git a/app/javascript/vue/components/radials/matrix/components/AddSlice.vue b/app/javascript/vue/components/radials/matrix/components/AddSlice.vue
index e05fbb1f42..0a2dd5b7c6 100644
--- a/app/javascript/vue/components/radials/matrix/components/AddSlice.vue
+++ b/app/javascript/vue/components/radials/matrix/components/AddSlice.vue
@@ -1,9 +1,11 @@
+
(matrix = item)"
/>
@@ -43,6 +45,7 @@
From c44c74b5de423842736870e81823b72f233e4115 Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 15:53:57 -0500
Subject: [PATCH 60/88] Fix status check
---
app/controllers/observation_matrices_controller.rb | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/app/controllers/observation_matrices_controller.rb b/app/controllers/observation_matrices_controller.rb
index 2172c4c4c9..fd39be1a92 100644
--- a/app/controllers/observation_matrices_controller.rb
+++ b/app/controllers/observation_matrices_controller.rb
@@ -84,19 +84,21 @@ def destroy
# .json
def batch_create
- if o = ObservationMatrix.batch_create(params.merge(project_id: sessions_current_project_id))
+ o = ObservationMatrix.batch_create(params.merge(project_id: sessions_current_project_id))
+ if o.kind_of?(Hash)
render json: o
else
- render json: o, status: :unprocessable_content
+ render json: o, status: :unprocessable_entity
end
end
# .json
def batch_add
- if o = ObservationMatrix.batch_add(params.merge(project_id: sessions_current_project_id))
+ o = ObservationMatrix.batch_add(params.merge(project_id: sessions_current_project_id))
+ if o.kind_of?(Hash)
render json: o
else
- render json: o, status: :unprocessable_content
+ render json: o, status: :unprocessable_entity
end
end
From 8262b9352d737d39bab41bf8462b84e0ab5e6414 Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 16:22:00 -0500
Subject: [PATCH 61/88] Fix collection object query -> matrix batch.
---
app/models/observation_matrix.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/models/observation_matrix.rb b/app/models/observation_matrix.rb
index 596baa6f8e..99b28cad9f 100644
--- a/app/models/observation_matrix.rb
+++ b/app/models/observation_matrix.rb
@@ -296,7 +296,7 @@ def batch_populate(params)
collection_objects = ::Queries::CollectionObject::Filter.new(observation_query: params[:observation_query]).all
extracts = ::Queries::Extract::Filter.new(observation_query: params[:observation_query]).all
when 'collection_object_query'
- collection_objects = ::Queries::CollectionObject::Filter.new(collection_object_query: params[:collection_object_query]).all
+ collection_objects = ::Queries::CollectionObject::Filter.new(params[:collection_object_query]).all
when 'extract_query'
extracts = ::Queries::Extract::Filter.new(params[:extract_query]).all
end
From 809a49f5bda7762e425e55cf12012465a6ce1838 Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 09:27:57 -0500
Subject: [PATCH 62/88] Add data depiction param to depictions filters
---
lib/queries/concerns/depictions.rb | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/lib/queries/concerns/depictions.rb b/lib/queries/concerns/depictions.rb
index d66c1677ab..c9aed910cf 100644
--- a/lib/queries/concerns/depictions.rb
+++ b/lib/queries/concerns/depictions.rb
@@ -8,6 +8,7 @@ def self.params
:image_id,
:images,
:depictions,
+ :data_depictions,
image_id: []
]
end
@@ -28,6 +29,12 @@ def self.params
# false - doesn't have images
attr_accessor :depictions
+ # @return [Boolean, nil]
+ # Alias/identical to images
+ # true - has depicitions that are data depictions
+ # false - doesn't have depictions that are data depictions
+ attr_accessor :data_depictions
+
def image_id
[@image_id].flatten.compact.uniq
end
@@ -38,6 +45,7 @@ def set_depiction_params(params)
@images = boolean_param(params, :images)
@depictions = boolean_param(params, :depictions)
+ @data_depictions = boolean_param(params, :data_depictions)
end
def image_id_facet
@@ -55,6 +63,18 @@ def depictions_facet
end
end
+ def data_depiction_facet
+ return nil if depictions.blank?
+ if data_depictions
+ referenced_klass.joins(:depictions).where(data_depictions: true).distinct
+ else
+ a = referenced_klass.where.missing(:depictions)
+ b = referenced_klass.joins(:depictions).where.not(depictions: {data_depiction: true})
+
+ referenced_klass_union([a,b]).distinct
+ end
+ end
+
def images_facet
return nil if images.nil?
if images
@@ -78,9 +98,10 @@ def image_query_facet
def self.merge_clauses
[
+ :data_depiction_facet,
:depictions_facet,
- :image_query_facet,
:image_id_facet,
+ :image_query_facet,
:images_facet
]
end
From 72a461e32f9a56cebc7997d80f73b1f3500ee93f Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 09:35:31 -0500
Subject: [PATCH 63/88] Add annotation with/out facets to
BiologicalAssociations
---
CHANGELOG.md | 3 ++-
.../filter/components/FilterView.vue | 9 ++++++++-
lib/queries/biological_association/filter.rb | 4 +++-
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 365d4d239a..c5292cc6ca 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,7 +8,8 @@ This project does not yet adheres to [Semantic Versioning](https://semv
## [unreleased]
### Added
-
+- Data depiction facets
+- Biological associations filter annotation-based facets
- New stage-only staged image type [#3400]
- New left-t stage layout [#3367]
- `Add` button to add biological associations from `Related` modal in new biological associations task
diff --git a/app/javascript/vue/tasks/biological_associations/filter/components/FilterView.vue b/app/javascript/vue/tasks/biological_associations/filter/components/FilterView.vue
index 57a11f0c90..98fbde1773 100644
--- a/app/javascript/vue/tasks/biological_associations/filter/components/FilterView.vue
+++ b/app/javascript/vue/tasks/biological_associations/filter/components/FilterView.vue
@@ -60,7 +60,14 @@ import FacetWith from 'components/Filter/Facets/shared/FacetWith.vue'
import { OTU, COLLECTION_OBJECT } from 'constants/index.js'
import { computed } from 'vue'
-const WITH_PARAMS = ['citations', 'origin_citation']
+const WITH_PARAMS = [
+'citations',
+'origin_citation',
+'depictions',
+'data_depictions',
+'notes',
+'tags'
+]
const props = defineProps({
modelValue: {
diff --git a/lib/queries/biological_association/filter.rb b/lib/queries/biological_association/filter.rb
index 4407f56830..2b1eda91d4 100644
--- a/lib/queries/biological_association/filter.rb
+++ b/lib/queries/biological_association/filter.rb
@@ -5,6 +5,7 @@ class Filter < Query::Filter
include Queries::Concerns::Notes
include Queries::Concerns::Tags
include Queries::Concerns::Citations
+ include Queries::Concerns::Depictions
PARAMS = [
:biological_association_id,
@@ -176,9 +177,10 @@ def initialize(query_params)
@taxon_name_id_mode = boolean_param(params, :taxon_name_id_mode)
@wkt = params[:wkt]
- set_citations_params(params)
set_notes_params(params)
set_tags_params(params)
+ set_citations_params(params)
+ set_depiction_params(params)
end
def biological_association_id
From 992c318919a24410a2136fd2d6d84aff366a7dcc Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 09:37:14 -0500
Subject: [PATCH 64/88] Add ImportDataset facet to collection object facet.
Note that this is not supported in import process yet.
---
lib/queries/collection_object/filter.rb | 43 ++++++++++++++++++-------
1 file changed, 31 insertions(+), 12 deletions(-)
diff --git a/lib/queries/collection_object/filter.rb b/lib/queries/collection_object/filter.rb
index 59273b9282..ea334e875e 100644
--- a/lib/queries/collection_object/filter.rb
+++ b/lib/queries/collection_object/filter.rb
@@ -39,6 +39,7 @@ class Filter < Query::Filter
:exact_buffered_other_labels,
:extract_id,
:georeferences,
+ :import_dataset_id,
:loaned,
:never_loaned,
:on_loan,
@@ -65,6 +66,7 @@ class Filter < Query::Filter
determiner_id: [],
extract_id: [],
geographic_area_id: [],
+ import_dataset_id: [],
is_type: [],
loan_id: [],
otu_id: [],
@@ -72,6 +74,11 @@ class Filter < Query::Filter
taxon_name_id: [],
].inject([{}]) { |ary, k| k.is_a?(Hash) ? ary.last.merge!(k) : ary.unshift(k); ary }.freeze
+
+ # @return [Array]
+ # of ImportDataset ids
+ attr_accessor :import_dataset_id
+
# @return [True, False, nil]
# true - has collecting event that has geographic_area
# false - does not have collecting event that has geographic area
@@ -344,6 +351,7 @@ def initialize(query_params)
@extract_id = params[:extract_id]
@geographic_area = boolean_param(params, :geographic_area)
@georeferences = boolean_param(params, :georeferences)
+ @import_dataset_id = params[:import_dataset_id]
@is_type = params[:is_type] || []
@loan_id = params[:loan_id]
@loaned = boolean_param(params, :loaned)
@@ -398,18 +406,6 @@ def biological_association_id
[@biological_association_id].flatten.compact.uniq
end
- def extract_id
- [@extract_id].flatten.compact.uniq
- end
-
- def taxon_name_id
- [@taxon_name_id].flatten.compact.uniq
- end
-
- def otu_id
- [@otu_id].flatten.compact.uniq
- end
-
def biocuration_class_id
[@biocuration_class_id].flatten.compact.uniq
end
@@ -430,10 +426,26 @@ def determiner_id
[@determiner_id].flatten.compact.uniq
end
+ def extract_id
+ [@extract_id].flatten.compact.uniq
+ end
+
+ def import_dataset_id
+ [@import_dataset_id].flatten.compact
+ end
+
+ def otu_id
+ [@otu_id].flatten.compact.uniq
+ end
+
def preparation_type_id
[@preparation_type_id].flatten.compact.uniq
end
+ def taxon_name_id
+ [@taxon_name_id].flatten.compact.uniq
+ end
+
def collection_object_id_facet
return nil if collection_object_id.empty?
table[:id].eq_any(collection_object_id)
@@ -443,6 +455,12 @@ def loan_id
[@loan_id].flatten.compact
end
+ def import_dataset_id_facet
+ return nil if import_dataset_id.blank?
+ ::CollectionObject.joins(:related_origin_relationships)
+ .where(origin_relationships: {old_object_id: import_dataset_id, old_object_type: 'ImportDataset'})
+ end
+
def extract_id_facet
return nil if extract_id.empty?
::CollectionObject
@@ -947,6 +965,7 @@ def and_clauses
def merge_clauses
[
+ import_dataset_id_facet,
observation_query_facet,
biological_association_id_facet,
base_collecting_event_query_facet,
From 8758469c48980210c0bc5d4554ff5f6eeefe1c8e Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 09:37:42 -0500
Subject: [PATCH 65/88] Add singular collecting_event_id param to CE filter.
---
lib/queries/collecting_event/filter.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/queries/collecting_event/filter.rb b/lib/queries/collecting_event/filter.rb
index 9456af6514..23cf792093 100644
--- a/lib/queries/collecting_event/filter.rb
+++ b/lib/queries/collecting_event/filter.rb
@@ -3,7 +3,7 @@ module CollectingEvent
class Filter < Query::Filter
# Params exists for all CollectingEvent attributes except these.
- # collecting_event_id is excluded because we handle it specially in conjunction with `geographic_area_mode``
+ # geographic_area_id is excluded because we handle it specially in conjunction with `geographic_area_mode``
# Definition must preceed include.
ATTRIBUTES = (::CollectingEvent.core_attributes - %w{geographic_area_id}).map(&:to_sym).freeze
@@ -35,6 +35,7 @@ class Filter < Query::Filter
:collection_objects,
:collector_id,
:collector_id_or,
+ :collecting_event_id,
:determiner_name_regex,
:geo_json,
:geographic_area,
From c3ef89e0fb30295edd175cd372e79c81f0c7a31e Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 09:38:13 -0500
Subject: [PATCH 66/88] Widen a loans dashboard graph
---
app/views/tasks/loans/dashboard/index.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/tasks/loans/dashboard/index.html.erb b/app/views/tasks/loans/dashboard/index.html.erb
index bcad2c60d7..bb69ad7653 100644
--- a/app/views/tasks/loans/dashboard/index.html.erb
+++ b/app/views/tasks/loans/dashboard/index.html.erb
@@ -70,7 +70,7 @@
- <%= column_chart loan_items_totals_per_year(@loans), height: '400px', stacked: true, download: true, descrete: true, ytitle: 'Total', xtitle: 'Year', title: 'Individuals by year (date sent)' %>
+ <%= column_chart loan_items_totals_per_year(@loans), height: '400px', width: '800px', stacked: true, download: true, descrete: true, ytitle: 'Total', xtitle: 'Year', title: 'Individuals by year (date sent)' %>
From 1479c1e901eebf456cc152d60ee8db260544c108 Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 09:39:11 -0500
Subject: [PATCH 67/88] Biological associations can be depicted.
---
CHANGELOG.md | 1 +
app/models/biological_association.rb | 1 +
2 files changed, 2 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c5292cc6ca..0390442598 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@ This project does not yet adheres to [Semantic Versioning](https://semv
## [unreleased]
### Added
+- Biological associations can now be depicted
- Data depiction facets
- Biological associations filter annotation-based facets
- New stage-only staged image type [#3400]
diff --git a/app/models/biological_association.rb b/app/models/biological_association.rb
index 290ba93031..e143dfd58a 100644
--- a/app/models/biological_association.rb
+++ b/app/models/biological_association.rb
@@ -36,6 +36,7 @@ class BiologicalAssociation < ApplicationRecord
include Shared::Confidences
include Shared::Notes
include Shared::Confidences
+ include Shared::Depictions
include Shared::IsData
belongs_to :biological_relationship, inverse_of: :biological_associations
From 700bb70c63ae5bd907b02ae9c5997e58310b5cc4 Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 09:40:05 -0500
Subject: [PATCH 68/88] presence not unless
---
app/helpers/observation_matrix_rows_helper.rb | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/app/helpers/observation_matrix_rows_helper.rb b/app/helpers/observation_matrix_rows_helper.rb
index 4b47f71240..47ad88dd1b 100644
--- a/app/helpers/observation_matrix_rows_helper.rb
+++ b/app/helpers/observation_matrix_rows_helper.rb
@@ -14,12 +14,12 @@ def observation_matrix_row_link(observation_matrix_row)
# @return [String]
# The label used in for general purpose internal use
def label_for_observation_matrix_row(observation_matrix_row)
- return observation_matrix_row.name unless observation_matrix_row.name.blank?
+ return observation_matrix_row.name if observation_matrix_row.name.present?
label_for(observation_matrix_row.observation_object)
end
def observation_matrix_row_label_tnt(observation_matrix_row)
- return observation_matrix_row.name unless observation_matrix_row.name.blank?
+ return observation_matrix_row.name if observation_matrix_row.name.present?
o = observation_matrix_row.observation_object
s = label_for(o).to_s
s.gsub!(/[^\w]/, '_')
@@ -29,7 +29,7 @@ def observation_matrix_row_label_tnt(observation_matrix_row)
end
def observation_matrix_row_label_nexus(observation_matrix_row)
- return observation_matrix_row.name unless observation_matrix_row.name.blank?
+ return observation_matrix_row.name if observation_matrix_row.name.present?
o = observation_matrix_row.observation_object
s = label_for(o)
s.gsub!(/[^\w]/, '_').to_s
@@ -38,7 +38,7 @@ def observation_matrix_row_label_nexus(observation_matrix_row)
end
def observation_matrix_row_label_nexml(observation_matrix_row)
- return observation_matrix_row.name unless observation_matrix_row.name.blank?
+ return observation_matrix_row.name if observation_matrix_row.name.present?
o = observation_matrix_row.observation_object
label_for(o)
end
@@ -46,7 +46,7 @@ def observation_matrix_row_label_nexml(observation_matrix_row)
# @return [String, nil]
# the object_label with any commas replaced by pipes
def observation_matrix_row_label_csv(observation_matrix_row)
- return observation_matrix_row.name unless observation_matrix_row.name.blank?
+ return observation_matrix_row.name if observation_matrix_row.name.present?
o = observation_matrix_row.observation_object
('"' + label_for(o).gsub('"', "'") + '"').html_safe
end
@@ -55,7 +55,7 @@ def observation_matrix_row_label_csv(observation_matrix_row)
# @return [ObservationMatrixRow#id, nil]
# if destroyable (represented by only a single OMRI of type Single) then return the ID
def observation_matrix_row_destroyable?(observation_matrix_row)
- if !observation_matrix_row.cached_observation_matrix_row_item_id.blank? && observation_matrix_row.reference_count == 1
+ if observation_matrix_row.cached_observation_matrix_row_item_id.present? && observation_matrix_row.reference_count == 1
return observation_matrix_row.cached_observation_matrix_row_item_id
end
end
From 4e929e120fcbb9a04bc4ce4ba6a5e3c5622ad9ef Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 09:40:27 -0500
Subject: [PATCH 69/88] Freeze, quotes
---
app/helpers/observation_matrices_helper.rb | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/app/helpers/observation_matrices_helper.rb b/app/helpers/observation_matrices_helper.rb
index 2027c3a72f..d41a7efd07 100644
--- a/app/helpers/observation_matrices_helper.rb
+++ b/app/helpers/observation_matrices_helper.rb
@@ -25,7 +25,7 @@ module ObservationMatricesHelper
'32' => 'X',
'33' => 'Y',
'34' => 'Z',
- }
+ }.freeze
def observation_matrix_tag(observation_matrix)
return nil if observation_matrix.nil?
@@ -76,7 +76,7 @@ def observations_cell_label(observations_hash, descriptor, hash_index, style = :
case observations_hash[descriptor.id][hash_index].size
when 0
- "?"
+ '?'
when 1
o = observations_hash[descriptor.id][hash_index][0]
s = observation_export_value(o)
@@ -122,9 +122,9 @@ def observation_export_value(observation)
observation.converted_value.to_s
when 'Observation::Sample'
if observation.sample_max && observation.sample_max && observation.sample_max.to_f != observation.sample_min.to_f
- ("%g" % observation.sample_min).to_s + '-' + ("%g" % observation.sample_max).to_s
+ ('%g' % observation.sample_min).to_s + '-' + ('%g' % observation.sample_max).to_s
elsif observation.sample_min
- ("%g" % observation.sample_min).to_s
+ ('%g' % observation.sample_min).to_s
else
'?'
end
From 59cf76c2ff737dc987591b34fd5f7c2fab354b57 Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Thu, 18 May 2023 11:13:27 -0300
Subject: [PATCH 70/88] Update packages
---
package-lock.json | 280 +++++++++++++++++++++++-----------------------
package.json | 8 +-
2 files changed, 144 insertions(+), 144 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 0937c6727b..8553cf85ba 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -20,17 +20,17 @@
"easymde": "^2.18.0",
"exif-js": "^2.3.0",
"json2csv": "^5.0.7",
- "leaflet": "^1.9.3",
+ "leaflet": "^1.9.4",
"leaflet.pattern": "^0.1.0",
"marked": "^5.0.2",
"parse-dms": "0.0.5",
"pdfjs-dist": "3.6.172",
- "pinia": "^2.1.1",
+ "pinia": "^2.1.2",
"qs": "^6.11.2",
"shakapacker": "6.6.0",
"v-hotkey": "^0.9.0",
"v-network-graph": "^0.9.3",
- "vue": "^3.3.2",
+ "vue": "^3.3.4",
"vue-handy-scroll": "^3.0.2",
"vue-tippy": "^6.1.2",
"vue-turbolinks": "^2.2.2",
@@ -43,7 +43,7 @@
"@babel/plugin-transform-runtime": "^7.21.4",
"@babel/preset-env": "^7.21.5",
"@babel/runtime": "^7.21.5",
- "@vue/compiler-sfc": "^3.3.2",
+ "@vue/compiler-sfc": "^3.3.4",
"babel-loader": "^9.1.2",
"compression-webpack-plugin": "^10.0.0",
"css-loader": "^6.7.3",
@@ -3072,36 +3072,36 @@
"dev": true
},
"node_modules/@vue/compiler-core": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.2.tgz",
- "integrity": "sha512-CKZWo1dzsQYTNTft7whzjL0HsrEpMfiK7pjZ2WFE3bC1NA7caUjWioHSK+49y/LK7Bsm4poJZzAMnvZMQ7OTeg==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.4.tgz",
+ "integrity": "sha512-cquyDNvZ6jTbf/+x+AgM2Arrp6G4Dzbb0R64jiG804HRMfRiFXWI6kqUVqZ6ZR0bQhIoQjB4+2bhNtVwndW15g==",
"dependencies": {
"@babel/parser": "^7.21.3",
- "@vue/shared": "3.3.2",
+ "@vue/shared": "3.3.4",
"estree-walker": "^2.0.2",
"source-map-js": "^1.0.2"
}
},
"node_modules/@vue/compiler-dom": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.2.tgz",
- "integrity": "sha512-6gS3auANuKXLw0XH6QxkWqyPYPunziS2xb6VRenM3JY7gVfZcJvkCBHkb5RuNY1FCbBO3lkIi0CdXUCW1c7SXw==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.4.tgz",
+ "integrity": "sha512-wyM+OjOVpuUukIq6p5+nwHYtj9cFroz9cwkfmP9O1nzH68BenTTv0u7/ndggT8cIQlnBeOo6sUT/gvHcIkLA5w==",
"dependencies": {
- "@vue/compiler-core": "3.3.2",
- "@vue/shared": "3.3.2"
+ "@vue/compiler-core": "3.3.4",
+ "@vue/shared": "3.3.4"
}
},
"node_modules/@vue/compiler-sfc": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.2.tgz",
- "integrity": "sha512-jG4jQy28H4BqzEKsQqqW65BZgmo3vzdLHTBjF+35RwtDdlFE+Fk1VWJYUnDMMqkFBo6Ye1ltSKVOMPgkzYj7SQ==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.4.tgz",
+ "integrity": "sha512-6y/d8uw+5TkCuzBkgLS0v3lSM3hJDntFEiUORM11pQ/hKvkhSKZrXW6i69UyXlJQisJxuUEJKAWEqWbWsLeNKQ==",
"dependencies": {
"@babel/parser": "^7.20.15",
- "@vue/compiler-core": "3.3.2",
- "@vue/compiler-dom": "3.3.2",
- "@vue/compiler-ssr": "3.3.2",
- "@vue/reactivity-transform": "3.3.2",
- "@vue/shared": "3.3.2",
+ "@vue/compiler-core": "3.3.4",
+ "@vue/compiler-dom": "3.3.4",
+ "@vue/compiler-ssr": "3.3.4",
+ "@vue/reactivity-transform": "3.3.4",
+ "@vue/shared": "3.3.4",
"estree-walker": "^2.0.2",
"magic-string": "^0.30.0",
"postcss": "^8.1.10",
@@ -3109,12 +3109,12 @@
}
},
"node_modules/@vue/compiler-ssr": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.2.tgz",
- "integrity": "sha512-K8OfY5FQtZaSOJHHe8xhEfIfLrefL/Y9frv4k4NsyQL3+0lRKxr9QuJhfdBDjkl7Fhz8CzKh63mULvmOfx3l2w==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.4.tgz",
+ "integrity": "sha512-m0v6oKpup2nMSehwA6Uuu+j+wEwcy7QmwMkVNVfrV9P2qE5KshC6RwOCq8fjGS/Eak/uNb8AaWekfiXxbBB6gQ==",
"dependencies": {
- "@vue/compiler-dom": "3.3.2",
- "@vue/shared": "3.3.2"
+ "@vue/compiler-dom": "3.3.4",
+ "@vue/shared": "3.3.4"
}
},
"node_modules/@vue/devtools-api": {
@@ -3123,60 +3123,60 @@
"integrity": "sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q=="
},
"node_modules/@vue/reactivity": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.2.tgz",
- "integrity": "sha512-yX8C4uTgg2Tdj+512EEMnMKbLveoITl7YdQX35AYgx8vBvQGszKiiCN46g4RY6/deeo/5DLbeUUGxCq1qWMf5g==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.4.tgz",
+ "integrity": "sha512-kLTDLwd0B1jG08NBF3R5rqULtv/f8x3rOFByTDz4J53ttIQEDmALqKqXY0J+XQeN0aV2FBxY8nJDf88yvOPAqQ==",
"dependencies": {
- "@vue/shared": "3.3.2"
+ "@vue/shared": "3.3.4"
}
},
"node_modules/@vue/reactivity-transform": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.2.tgz",
- "integrity": "sha512-iu2WaQvlJHdnONrsyv4ibIEnSsuKF+aHFngGj/y1lwpHQtalpVhKg9wsKMoiKXS9zPNjG9mNKzJS9vudvjzvyg==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.4.tgz",
+ "integrity": "sha512-MXgwjako4nu5WFLAjpBnCj/ieqcjE2aJBINUNQzkZQfzIZA4xn+0fV1tIYBJvvva3N3OvKGofRLvQIwEQPpaXw==",
"dependencies": {
"@babel/parser": "^7.20.15",
- "@vue/compiler-core": "3.3.2",
- "@vue/shared": "3.3.2",
+ "@vue/compiler-core": "3.3.4",
+ "@vue/shared": "3.3.4",
"estree-walker": "^2.0.2",
"magic-string": "^0.30.0"
}
},
"node_modules/@vue/runtime-core": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.3.2.tgz",
- "integrity": "sha512-qSl95qj0BvKfcsO+hICqFEoLhJn6++HtsPxmTkkadFbuhe3uQfJ8HmQwvEr7xbxBd2rcJB6XOJg7nWAn/ymC5A==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.3.4.tgz",
+ "integrity": "sha512-R+bqxMN6pWO7zGI4OMlmvePOdP2c93GsHFM/siJI7O2nxFRzj55pLwkpCedEY+bTMgp5miZ8CxfIZo3S+gFqvA==",
"dependencies": {
- "@vue/reactivity": "3.3.2",
- "@vue/shared": "3.3.2"
+ "@vue/reactivity": "3.3.4",
+ "@vue/shared": "3.3.4"
}
},
"node_modules/@vue/runtime-dom": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.3.2.tgz",
- "integrity": "sha512-+drStsJT+0mtgHdarT7cXZReCcTFfm6ptxMrz0kAW5hms6UNBd8Q1pi4JKlncAhu+Ld/TevsSp7pqAZxBBoGng==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.3.4.tgz",
+ "integrity": "sha512-Aj5bTJ3u5sFsUckRghsNjVTtxZQ1OyMWCr5dZRAPijF/0Vy4xEoRCwLyHXcj4D0UFbJ4lbx3gPTgg06K/GnPnQ==",
"dependencies": {
- "@vue/runtime-core": "3.3.2",
- "@vue/shared": "3.3.2",
+ "@vue/runtime-core": "3.3.4",
+ "@vue/shared": "3.3.4",
"csstype": "^3.1.1"
}
},
"node_modules/@vue/server-renderer": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.3.2.tgz",
- "integrity": "sha512-QCwh6OGwJg6GDLE0fbQhRTR6tnU+XDJ1iCsTYHXBiezCXAhqMygFRij7BiLF4ytvvHcg5kX9joX5R5vP85++wg==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.3.4.tgz",
+ "integrity": "sha512-Q6jDDzR23ViIb67v+vM1Dqntu+HUexQcsWKhhQa4ARVzxOY2HbC7QRW/ggkDBd5BU+uM1sV6XOAP0b216o34JQ==",
"dependencies": {
- "@vue/compiler-ssr": "3.3.2",
- "@vue/shared": "3.3.2"
+ "@vue/compiler-ssr": "3.3.4",
+ "@vue/shared": "3.3.4"
},
"peerDependencies": {
- "vue": "3.3.2"
+ "vue": "3.3.4"
}
},
"node_modules/@vue/shared": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.2.tgz",
- "integrity": "sha512-0rFu3h8JbclbnvvKrs7Fe5FNGV9/5X2rPD7KmOzhLSUAiQH5//Hq437Gv0fR5Mev3u/nbtvmLl8XgwCU20/ZfQ=="
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.4.tgz",
+ "integrity": "sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ=="
},
"node_modules/@vue/test-utils": {
"version": "2.2.5",
@@ -7728,9 +7728,9 @@
}
},
"node_modules/leaflet": {
- "version": "1.9.3",
- "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.3.tgz",
- "integrity": "sha512-iB2cR9vAkDOu5l3HAay2obcUHZ7xwUBBjph8+PGtmW/2lYhbLizWtG7nTeYht36WfOslixQF9D/uSIzhZgGMfQ=="
+ "version": "1.9.4",
+ "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz",
+ "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA=="
},
"node_modules/leaflet.pattern": {
"version": "0.1.0",
@@ -8604,12 +8604,12 @@
}
},
"node_modules/pinia": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.1.1.tgz",
- "integrity": "sha512-Y2CgpcUtD8Ogdvo5LW5g20ykSZgnVDMgTSZFr40EvO6HB8axQk+0lHa1UrRah9wworFaxjovwRlY/wRICWj/KQ==",
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.1.2.tgz",
+ "integrity": "sha512-GNnd8V2NnSn5zZLb1xokH3nEMm8Tl/rvJduj/IMwWkUGsYPhnVyN92WIIxD59ZvnM+7EV28lXt5+NnYn1d81cg==",
"dependencies": {
"@vue/devtools-api": "^6.5.0",
- "vue-demi": ">=0.14.2"
+ "vue-demi": ">=0.14.5"
},
"funding": {
"url": "https://github.com/sponsors/posva"
@@ -8629,9 +8629,9 @@
}
},
"node_modules/pinia/node_modules/vue-demi": {
- "version": "0.14.4",
- "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.4.tgz",
- "integrity": "sha512-YR9bCmtIYgsqNVRG3MLLWlhbZ9tTNMuWHPd7yx0pHS3NDX17MeVNHgKTOClYE8pBjsfNe4CMaReP7zQtHDIbiA==",
+ "version": "0.14.5",
+ "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.5.tgz",
+ "integrity": "sha512-o9NUVpl/YlsGJ7t+xuqJKx8EBGf1quRhCiT6D/J0pfwmk9zUwYkC7yrF4SZCe6fETvSM3UNL2edcbYrSyc4QHA==",
"hasInstallScript": true,
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
@@ -11445,15 +11445,15 @@
}
},
"node_modules/vue": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/vue/-/vue-3.3.2.tgz",
- "integrity": "sha512-98hJcAhyDwZoOo2flAQBSPVYG/o0HA9ivIy2ktHshjE+6/q8IMQ+kvDKQzOZTFPxvnNMcGM+zS2A00xeZMA7tA==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/vue/-/vue-3.3.4.tgz",
+ "integrity": "sha512-VTyEYn3yvIeY1Py0WaYGZsXnz3y5UnGi62GjVEqvEGPl6nxbOrCXbVOTQWBEJUqAyTUk2uJ5JLVnYJ6ZzGbrSw==",
"dependencies": {
- "@vue/compiler-dom": "3.3.2",
- "@vue/compiler-sfc": "3.3.2",
- "@vue/runtime-dom": "3.3.2",
- "@vue/server-renderer": "3.3.2",
- "@vue/shared": "3.3.2"
+ "@vue/compiler-dom": "3.3.4",
+ "@vue/compiler-sfc": "3.3.4",
+ "@vue/runtime-dom": "3.3.4",
+ "@vue/server-renderer": "3.3.4",
+ "@vue/shared": "3.3.4"
}
},
"node_modules/vue-eslint-parser": {
@@ -14284,36 +14284,36 @@
"dev": true
},
"@vue/compiler-core": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.2.tgz",
- "integrity": "sha512-CKZWo1dzsQYTNTft7whzjL0HsrEpMfiK7pjZ2WFE3bC1NA7caUjWioHSK+49y/LK7Bsm4poJZzAMnvZMQ7OTeg==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.4.tgz",
+ "integrity": "sha512-cquyDNvZ6jTbf/+x+AgM2Arrp6G4Dzbb0R64jiG804HRMfRiFXWI6kqUVqZ6ZR0bQhIoQjB4+2bhNtVwndW15g==",
"requires": {
"@babel/parser": "^7.21.3",
- "@vue/shared": "3.3.2",
+ "@vue/shared": "3.3.4",
"estree-walker": "^2.0.2",
"source-map-js": "^1.0.2"
}
},
"@vue/compiler-dom": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.2.tgz",
- "integrity": "sha512-6gS3auANuKXLw0XH6QxkWqyPYPunziS2xb6VRenM3JY7gVfZcJvkCBHkb5RuNY1FCbBO3lkIi0CdXUCW1c7SXw==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.4.tgz",
+ "integrity": "sha512-wyM+OjOVpuUukIq6p5+nwHYtj9cFroz9cwkfmP9O1nzH68BenTTv0u7/ndggT8cIQlnBeOo6sUT/gvHcIkLA5w==",
"requires": {
- "@vue/compiler-core": "3.3.2",
- "@vue/shared": "3.3.2"
+ "@vue/compiler-core": "3.3.4",
+ "@vue/shared": "3.3.4"
}
},
"@vue/compiler-sfc": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.2.tgz",
- "integrity": "sha512-jG4jQy28H4BqzEKsQqqW65BZgmo3vzdLHTBjF+35RwtDdlFE+Fk1VWJYUnDMMqkFBo6Ye1ltSKVOMPgkzYj7SQ==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.4.tgz",
+ "integrity": "sha512-6y/d8uw+5TkCuzBkgLS0v3lSM3hJDntFEiUORM11pQ/hKvkhSKZrXW6i69UyXlJQisJxuUEJKAWEqWbWsLeNKQ==",
"requires": {
"@babel/parser": "^7.20.15",
- "@vue/compiler-core": "3.3.2",
- "@vue/compiler-dom": "3.3.2",
- "@vue/compiler-ssr": "3.3.2",
- "@vue/reactivity-transform": "3.3.2",
- "@vue/shared": "3.3.2",
+ "@vue/compiler-core": "3.3.4",
+ "@vue/compiler-dom": "3.3.4",
+ "@vue/compiler-ssr": "3.3.4",
+ "@vue/reactivity-transform": "3.3.4",
+ "@vue/shared": "3.3.4",
"estree-walker": "^2.0.2",
"magic-string": "^0.30.0",
"postcss": "^8.1.10",
@@ -14321,12 +14321,12 @@
}
},
"@vue/compiler-ssr": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.2.tgz",
- "integrity": "sha512-K8OfY5FQtZaSOJHHe8xhEfIfLrefL/Y9frv4k4NsyQL3+0lRKxr9QuJhfdBDjkl7Fhz8CzKh63mULvmOfx3l2w==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.4.tgz",
+ "integrity": "sha512-m0v6oKpup2nMSehwA6Uuu+j+wEwcy7QmwMkVNVfrV9P2qE5KshC6RwOCq8fjGS/Eak/uNb8AaWekfiXxbBB6gQ==",
"requires": {
- "@vue/compiler-dom": "3.3.2",
- "@vue/shared": "3.3.2"
+ "@vue/compiler-dom": "3.3.4",
+ "@vue/shared": "3.3.4"
}
},
"@vue/devtools-api": {
@@ -14335,57 +14335,57 @@
"integrity": "sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q=="
},
"@vue/reactivity": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.2.tgz",
- "integrity": "sha512-yX8C4uTgg2Tdj+512EEMnMKbLveoITl7YdQX35AYgx8vBvQGszKiiCN46g4RY6/deeo/5DLbeUUGxCq1qWMf5g==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.4.tgz",
+ "integrity": "sha512-kLTDLwd0B1jG08NBF3R5rqULtv/f8x3rOFByTDz4J53ttIQEDmALqKqXY0J+XQeN0aV2FBxY8nJDf88yvOPAqQ==",
"requires": {
- "@vue/shared": "3.3.2"
+ "@vue/shared": "3.3.4"
}
},
"@vue/reactivity-transform": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.2.tgz",
- "integrity": "sha512-iu2WaQvlJHdnONrsyv4ibIEnSsuKF+aHFngGj/y1lwpHQtalpVhKg9wsKMoiKXS9zPNjG9mNKzJS9vudvjzvyg==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.4.tgz",
+ "integrity": "sha512-MXgwjako4nu5WFLAjpBnCj/ieqcjE2aJBINUNQzkZQfzIZA4xn+0fV1tIYBJvvva3N3OvKGofRLvQIwEQPpaXw==",
"requires": {
"@babel/parser": "^7.20.15",
- "@vue/compiler-core": "3.3.2",
- "@vue/shared": "3.3.2",
+ "@vue/compiler-core": "3.3.4",
+ "@vue/shared": "3.3.4",
"estree-walker": "^2.0.2",
"magic-string": "^0.30.0"
}
},
"@vue/runtime-core": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.3.2.tgz",
- "integrity": "sha512-qSl95qj0BvKfcsO+hICqFEoLhJn6++HtsPxmTkkadFbuhe3uQfJ8HmQwvEr7xbxBd2rcJB6XOJg7nWAn/ymC5A==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.3.4.tgz",
+ "integrity": "sha512-R+bqxMN6pWO7zGI4OMlmvePOdP2c93GsHFM/siJI7O2nxFRzj55pLwkpCedEY+bTMgp5miZ8CxfIZo3S+gFqvA==",
"requires": {
- "@vue/reactivity": "3.3.2",
- "@vue/shared": "3.3.2"
+ "@vue/reactivity": "3.3.4",
+ "@vue/shared": "3.3.4"
}
},
"@vue/runtime-dom": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.3.2.tgz",
- "integrity": "sha512-+drStsJT+0mtgHdarT7cXZReCcTFfm6ptxMrz0kAW5hms6UNBd8Q1pi4JKlncAhu+Ld/TevsSp7pqAZxBBoGng==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.3.4.tgz",
+ "integrity": "sha512-Aj5bTJ3u5sFsUckRghsNjVTtxZQ1OyMWCr5dZRAPijF/0Vy4xEoRCwLyHXcj4D0UFbJ4lbx3gPTgg06K/GnPnQ==",
"requires": {
- "@vue/runtime-core": "3.3.2",
- "@vue/shared": "3.3.2",
+ "@vue/runtime-core": "3.3.4",
+ "@vue/shared": "3.3.4",
"csstype": "^3.1.1"
}
},
"@vue/server-renderer": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.3.2.tgz",
- "integrity": "sha512-QCwh6OGwJg6GDLE0fbQhRTR6tnU+XDJ1iCsTYHXBiezCXAhqMygFRij7BiLF4ytvvHcg5kX9joX5R5vP85++wg==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.3.4.tgz",
+ "integrity": "sha512-Q6jDDzR23ViIb67v+vM1Dqntu+HUexQcsWKhhQa4ARVzxOY2HbC7QRW/ggkDBd5BU+uM1sV6XOAP0b216o34JQ==",
"requires": {
- "@vue/compiler-ssr": "3.3.2",
- "@vue/shared": "3.3.2"
+ "@vue/compiler-ssr": "3.3.4",
+ "@vue/shared": "3.3.4"
}
},
"@vue/shared": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.2.tgz",
- "integrity": "sha512-0rFu3h8JbclbnvvKrs7Fe5FNGV9/5X2rPD7KmOzhLSUAiQH5//Hq437Gv0fR5Mev3u/nbtvmLl8XgwCU20/ZfQ=="
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.4.tgz",
+ "integrity": "sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ=="
},
"@vue/test-utils": {
"version": "2.2.5",
@@ -17643,9 +17643,9 @@
}
},
"leaflet": {
- "version": "1.9.3",
- "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.3.tgz",
- "integrity": "sha512-iB2cR9vAkDOu5l3HAay2obcUHZ7xwUBBjph8+PGtmW/2lYhbLizWtG7nTeYht36WfOslixQF9D/uSIzhZgGMfQ=="
+ "version": "1.9.4",
+ "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz",
+ "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA=="
},
"leaflet.pattern": {
"version": "0.1.0",
@@ -18272,18 +18272,18 @@
"dev": true
},
"pinia": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.1.1.tgz",
- "integrity": "sha512-Y2CgpcUtD8Ogdvo5LW5g20ykSZgnVDMgTSZFr40EvO6HB8axQk+0lHa1UrRah9wworFaxjovwRlY/wRICWj/KQ==",
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.1.2.tgz",
+ "integrity": "sha512-GNnd8V2NnSn5zZLb1xokH3nEMm8Tl/rvJduj/IMwWkUGsYPhnVyN92WIIxD59ZvnM+7EV28lXt5+NnYn1d81cg==",
"requires": {
"@vue/devtools-api": "^6.5.0",
- "vue-demi": ">=0.14.2"
+ "vue-demi": ">=0.14.5"
},
"dependencies": {
"vue-demi": {
- "version": "0.14.4",
- "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.4.tgz",
- "integrity": "sha512-YR9bCmtIYgsqNVRG3MLLWlhbZ9tTNMuWHPd7yx0pHS3NDX17MeVNHgKTOClYE8pBjsfNe4CMaReP7zQtHDIbiA==",
+ "version": "0.14.5",
+ "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.5.tgz",
+ "integrity": "sha512-o9NUVpl/YlsGJ7t+xuqJKx8EBGf1quRhCiT6D/J0pfwmk9zUwYkC7yrF4SZCe6fETvSM3UNL2edcbYrSyc4QHA==",
"requires": {}
}
}
@@ -20138,15 +20138,15 @@
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="
},
"vue": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/vue/-/vue-3.3.2.tgz",
- "integrity": "sha512-98hJcAhyDwZoOo2flAQBSPVYG/o0HA9ivIy2ktHshjE+6/q8IMQ+kvDKQzOZTFPxvnNMcGM+zS2A00xeZMA7tA==",
- "requires": {
- "@vue/compiler-dom": "3.3.2",
- "@vue/compiler-sfc": "3.3.2",
- "@vue/runtime-dom": "3.3.2",
- "@vue/server-renderer": "3.3.2",
- "@vue/shared": "3.3.2"
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/vue/-/vue-3.3.4.tgz",
+ "integrity": "sha512-VTyEYn3yvIeY1Py0WaYGZsXnz3y5UnGi62GjVEqvEGPl6nxbOrCXbVOTQWBEJUqAyTUk2uJ5JLVnYJ6ZzGbrSw==",
+ "requires": {
+ "@vue/compiler-dom": "3.3.4",
+ "@vue/compiler-sfc": "3.3.4",
+ "@vue/runtime-dom": "3.3.4",
+ "@vue/server-renderer": "3.3.4",
+ "@vue/shared": "3.3.4"
}
},
"vue-eslint-parser": {
diff --git a/package.json b/package.json
index 4410307276..2a32a37828 100644
--- a/package.json
+++ b/package.json
@@ -14,17 +14,17 @@
"easymde": "^2.18.0",
"exif-js": "^2.3.0",
"json2csv": "^5.0.7",
- "leaflet": "^1.9.3",
+ "leaflet": "^1.9.4",
"leaflet.pattern": "^0.1.0",
"marked": "^5.0.2",
"parse-dms": "0.0.5",
"pdfjs-dist": "3.6.172",
- "pinia": "^2.1.1",
+ "pinia": "^2.1.2",
"qs": "^6.11.2",
"shakapacker": "6.6.0",
"v-hotkey": "^0.9.0",
"v-network-graph": "^0.9.3",
- "vue": "^3.3.2",
+ "vue": "^3.3.4",
"vue-handy-scroll": "^3.0.2",
"vue-tippy": "^6.1.2",
"vue-turbolinks": "^2.2.2",
@@ -46,7 +46,7 @@
"@babel/plugin-transform-runtime": "^7.21.4",
"@babel/preset-env": "^7.21.5",
"@babel/runtime": "^7.21.5",
- "@vue/compiler-sfc": "^3.3.2",
+ "@vue/compiler-sfc": "^3.3.4",
"babel-loader": "^9.1.2",
"compression-webpack-plugin": "^10.0.0",
"css-loader": "^6.7.3",
From b2fbfd70e8ddaa248280d382bcdcdc7fe290b0c1 Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Thu, 18 May 2023 16:32:55 -0300
Subject: [PATCH 71/88] Remove import dataset facet from filter co
---
.../vue/tasks/collection_objects/filter/components/filter.vue | 1 -
1 file changed, 1 deletion(-)
diff --git a/app/javascript/vue/tasks/collection_objects/filter/components/filter.vue b/app/javascript/vue/tasks/collection_objects/filter/components/filter.vue
index 63521ec133..153da2ebf5 100644
--- a/app/javascript/vue/tasks/collection_objects/filter/components/filter.vue
+++ b/app/javascript/vue/tasks/collection_objects/filter/components/filter.vue
@@ -25,7 +25,6 @@
-
Date: Thu, 18 May 2023 12:23:51 -0500
Subject: [PATCH 72/88] Rename castor->Nomen and align batch modules and specs
---
app/controllers/taxon_names_controller.rb | 14 ++--
app/views/taxon_names/batch_load.html.erb | 2 +-
.../{castor => nomen}/_batch_load.html.erb | 10 +--
.../{castor => nomen}/_form.html.erb | 0
.../{castor => nomen}/create.html.erb | 0
.../{castor => nomen}/preview.html.erb | 8 +--
config/routes/data.rb | 4 +-
...or_interpreter.rb => nomen_interpreter.rb} | 30 ++++-----
.../taxon_names/nomen_interpreter_spec.rb | 66 +++++++++++++++++++
9 files changed, 99 insertions(+), 35 deletions(-)
rename app/views/taxon_names/batch_load/{castor => nomen}/_batch_load.html.erb (86%)
rename app/views/taxon_names/batch_load/{castor => nomen}/_form.html.erb (100%)
rename app/views/taxon_names/batch_load/{castor => nomen}/create.html.erb (100%)
rename app/views/taxon_names/batch_load/{castor => nomen}/preview.html.erb (81%)
rename lib/batch_load/import/taxon_names/{castor_interpreter.rb => nomen_interpreter.rb} (92%)
create mode 100644 spec/lib/batch_load/import/taxon_names/nomen_interpreter_spec.rb
diff --git a/app/controllers/taxon_names_controller.rb b/app/controllers/taxon_names_controller.rb
index 98857e844b..2aa2342c14 100644
--- a/app/controllers/taxon_names_controller.rb
+++ b/app/controllers/taxon_names_controller.rb
@@ -185,23 +185,23 @@ def create_simple_batch_load
render :batch_load
end
- def preview_castor_batch_load
+ def preview_nomen_batch_load
if params[:file]
- @result = BatchLoad::Import::TaxonNames::CastorInterpreter.new(**batch_params)
+ @result = BatchLoad::Import::TaxonNames::NomenInterpreter.new(**batch_params)
digest_cookie(params[:file].tempfile, :nomen_taxon_names_md5)
- render 'taxon_names/batch_load/castor/preview'
+ render 'taxon_names/batch_load/nomen/preview'
else
flash[:notice] = 'No file provided!'
redirect_to action: :batch_load
end
end
- def create_castor_batch_load
+ def create_nomen_batch_load
if params[:file] && digested_cookie_exists?(params[:file].tempfile, :nomen_taxon_names_md5)
- @result = BatchLoad::Import::TaxonNames::CastorInterpreter.new(**batch_params)
+ @result = BatchLoad::Import::TaxonNames::NomenInterpreter.new(**batch_params)
if @result.create
flash[:notice] = "Successfully proccessed file, #{@result.total_records_created} items were created."
- render 'taxon_names/batch_load/castor/create' and return
+ render 'taxon_names/batch_load/nomen/create' and return
else
flash[:alert] = 'Batch import failed.'
end
@@ -307,4 +307,4 @@ def batch_params
end
-require_dependency Rails.root.to_s + '/lib/batch_load/import/taxon_names/castor_interpreter.rb'
+require_dependency Rails.root.to_s + '/lib/batch_load/import/taxon_names/nomen_interpreter.rb'
diff --git a/app/views/taxon_names/batch_load.html.erb b/app/views/taxon_names/batch_load.html.erb
index c632efbb99..9607ca3591 100644
--- a/app/views/taxon_names/batch_load.html.erb
+++ b/app/views/taxon_names/batch_load.html.erb
@@ -1,3 +1,3 @@
Batch load taxon names
<%= render 'taxon_names/batch_load/simple/batch_load' %>
-<%= render 'taxon_names/batch_load/castor/batch_load' -%>
+<%= render 'taxon_names/batch_load/nomen/batch_load' -%>
diff --git a/app/views/taxon_names/batch_load/castor/_batch_load.html.erb b/app/views/taxon_names/batch_load/nomen/_batch_load.html.erb
similarity index 86%
rename from app/views/taxon_names/batch_load/castor/_batch_load.html.erb
rename to app/views/taxon_names/batch_load/nomen/_batch_load.html.erb
index 8676f12bdf..40193b1872 100644
--- a/app/views/taxon_names/batch_load/castor/_batch_load.html.erb
+++ b/app/views/taxon_names/batch_load/nomen/_batch_load.html.erb
@@ -1,5 +1,5 @@
-
Castor batch load
+
NOMEN batch load
@@ -8,14 +8,14 @@
Creates hierarchy of taxon names and otus.
A tab-delimited, UTF-8 compatible text file is required.
- Column headers are (see <%= link_to('sample template', asset_path('batch_load_templates/taxon_names/taxon_names_castor_batch_load.tab'), target: '_blank') -%>).
+ Column headers are (see <%= link_to('sample template', asset_path('batch_load_templates/taxon_names/taxon_names_nomen_batch_load.tab'), target: '_blank') -%>).
Taxon name names with no parent id will be attached to the root taxon name.
Parent taxon names must be before child taxon names.
- An OTU with name of "taxon_concept_name" column is created if the "guid" column is not blank.
+ An OTU with name of "taxon_concept_name" column is created if the "guid" column is not blank.
An Identifier Global::Uri will be attached with the value of the "guid" column if not blank to the OTU. If the identifier is not legal it will not be created, no warning is given (e.g. duplicate URIs).
Creates a taxon name relationship (values are <%= link_to('NOMEN class names in TaxonWorks', 'https://github.com/SpeciesFileGroup/taxonworks/tree/development/app/models/taxon_name_relationship', target: :blank) -%>, e.g. "TaxonNameRelationship::Iczn::Invalidating::Synonym") with class type specified in the "related_name_nomen_class" column between the taxon name at that row and the taxon name with the id in "related_name_id".
Creates taxon name classification (values are <%= link_to('NOMEN class names in TaxonWorks', 'https://github.com/SpeciesFileGroup/taxonworks/tree/development/app/models/taxon_name_classification', target: :blank,) %>, e.g. "TaxonNameClassification::Iczn::Available::Valid") with class type specfied in the "name_nomen_clasification" column for the taxon name at that row.
- `rank` is a lowercase like "species", "genus", "family" etc.
+ `rank` is a lowercase like "species", "genus", "family" etc.
There is currently no size limit to the file being loaded, but we recommend capping at 1-2 thousand names.
Multiple uploads of the same data will not be created.
@@ -30,7 +30,7 @@
Go!
- <%= render partial: '/taxon_names/batch_load/castor/form', locals: {url: preview_castor_batch_load_taxon_names_path, submit: :preview} -%>
+ <%= render partial: '/taxon_names/batch_load/nomen/form', locals: {url: preview_nomen_batch_load_taxon_names_path, submit: :preview} -%>
diff --git a/app/views/taxon_names/batch_load/castor/_form.html.erb b/app/views/taxon_names/batch_load/nomen/_form.html.erb
similarity index 100%
rename from app/views/taxon_names/batch_load/castor/_form.html.erb
rename to app/views/taxon_names/batch_load/nomen/_form.html.erb
diff --git a/app/views/taxon_names/batch_load/castor/create.html.erb b/app/views/taxon_names/batch_load/nomen/create.html.erb
similarity index 100%
rename from app/views/taxon_names/batch_load/castor/create.html.erb
rename to app/views/taxon_names/batch_load/nomen/create.html.erb
diff --git a/app/views/taxon_names/batch_load/castor/preview.html.erb b/app/views/taxon_names/batch_load/nomen/preview.html.erb
similarity index 81%
rename from app/views/taxon_names/batch_load/castor/preview.html.erb
rename to app/views/taxon_names/batch_load/nomen/preview.html.erb
index c0917d4628..b1f89e7ca7 100644
--- a/app/views/taxon_names/batch_load/castor/preview.html.erb
+++ b/app/views/taxon_names/batch_load/nomen/preview.html.erb
@@ -3,12 +3,12 @@
<% end %>
<%= content_for :batch_form do -%>
- <%= render partial: '/taxon_names/batch_load/castor/form', locals: {url: create_castor_batch_load_taxon_names_path, submit: :create} -%>
+ <%= render partial: '/taxon_names/batch_load/nomen/form', locals: {url: create_nomen_batch_load_taxon_names_path, submit: :create} -%>
<% end %>
<%= content_for :line_breakdown do -%>
<%= content_tag :div, 'Parent related error messages can be (largely) ignored. The parent is dynamically set on create.', class: [:feedback, 'feedback-warning'] %>
-
+
Line
Data count
@@ -19,7 +19,7 @@
<% @result.sorted_processed_rows.each do |i, rp| -%>
- <%= batch_line_link_td(i) -%>
+ <%= batch_line_link_td(i) -%>
<%= batch_all_objects_count_td(rp) -%>
<%= rp.objects[:taxon_name].each_with_index.collect{|n, i| "#{i + 1}: " + n.get_full_name.to_s }.join(' ').html_safe -%>
@@ -27,7 +27,7 @@
<%= batch_data_errors_td(rp) -%>
<%= batch_parse_errors_td(rp) -%>
- <% end -%>
+ <% end -%>
<% end %>
diff --git a/config/routes/data.rb b/config/routes/data.rb
index d22925624f..0089cdfd14 100644
--- a/config/routes/data.rb
+++ b/config/routes/data.rb
@@ -731,8 +731,8 @@
post :create_simple_batch_load
get :ranks, {format: :json}
- post :preview_castor_batch_load
- post :create_castor_batch_load
+ post :preview_nomen_batch_load
+ post :create_nomen_batch_load
get :parse, defaults: {format: :json}
get :random
diff --git a/lib/batch_load/import/taxon_names/castor_interpreter.rb b/lib/batch_load/import/taxon_names/nomen_interpreter.rb
similarity index 92%
rename from lib/batch_load/import/taxon_names/castor_interpreter.rb
rename to lib/batch_load/import/taxon_names/nomen_interpreter.rb
index 7c467e6433..0cfc6d6ab1 100644
--- a/lib/batch_load/import/taxon_names/castor_interpreter.rb
+++ b/lib/batch_load/import/taxon_names/nomen_interpreter.rb
@@ -1,5 +1,5 @@
module BatchLoad
- class Import::TaxonNames::CastorInterpreter < BatchLoad::Import
+ class Import::TaxonNames::NomenInterpreter < BatchLoad::Import
# The parent for the top level names
attr_accessor :parent_taxon_name
@@ -42,9 +42,7 @@ def parent_taxon_name
end
# @return [Integer]
- def parent_taxon_name_id
- parent_taxon_name.id
- end
+ delegate :id, to: :parent_taxon_name, prefix: true
# rubocop:disable Metrics/MethodLength
# @return [Integer]
@@ -72,7 +70,7 @@ def build_taxon_names
year_of_publication: year_of_publication(row['author_year']),
rank_class: Ranks.lookup(@nomenclature_code.to_sym, row['rank']),
by: user,
- project: project,
+ project:,
verbatim_author: verbatim_author(row['author_year']),
taxon_name_authors_attributes: taxon_name_authors_attributes(verbatim_author(row['author_year']))
}
@@ -85,7 +83,7 @@ def build_taxon_names
rank_class: Ranks.lookup(@nomenclature_code.to_sym, row['original_rank']),
parent: parent_taxon_name,
by: user,
- project: project,
+ project:,
verbatim_author: verbatim_author(row['author_year']),
taxon_name_authors_attributes: taxon_name_authors_attributes(verbatim_author(row['author_year']))
}
@@ -118,15 +116,15 @@ def build_taxon_names
# TaxonNameRelationship
related_name_id = row['related_name_id']
-
- if !taxon_names[related_name_id].blank?
+
+ if taxon_names[related_name_id].present?
related_name_nomen_class = nil
begin
related_name_nomen_class = row['related_name_nomen_class'].safe_constantize
if related_name_nomen_class.ancestors.include?(TaxonNameRelationship)
-
+
taxon_name_relationship = related_name_nomen_class.new(
subject_taxon_name: p, object_taxon_name: taxon_names[related_name_id]
)
@@ -147,22 +145,22 @@ def build_taxon_names
end
# There is an OTU linked to the taxon name
- if !row['taxon_concept_name'].blank? || !row['guid'].blank?
- taxon_concept_identifier_castor = {}
+ if row['taxon_concept_name'].present? || row['guid'].present?
+ taxon_concept_identifier_nomen = {}
- if !row['guid'].blank?
- taxon_concept_identifier_castor = {
+ if row['guid'].present?
+ taxon_concept_identifier_nomen = {
type: 'Identifier::Global::Uri',
identifier: row['guid'] }
end
- otu = Otu.new(name: row['taxon_concept_name'], taxon_name: p, identifiers_attributes: [taxon_concept_identifier_castor] )
+ otu = Otu.new(name: row['taxon_concept_name'], taxon_name: p, identifiers_attributes: [taxon_concept_identifier_nomen] )
parse_result.objects[:otu].push(otu)
else
# Note we are not technically using the param like TaxonName.new(), so we can't just set the attribute
# So we hack in the OTUs 'manually". This also lets us see them in the result
- if also_create_otu
+ if also_create_otu
parse_result.objects[:otu].push( Otu.new(taxon_name: p) )
end
end
@@ -234,7 +232,7 @@ def author_info(author_string)
first_name = split_author_info[1]
end
- { last_name: last_name, first_name: first_name, suffix: 'suffix' }
+ { last_name:, first_name:, suffix: 'suffix' }
end
end
end
diff --git a/spec/lib/batch_load/import/taxon_names/nomen_interpreter_spec.rb b/spec/lib/batch_load/import/taxon_names/nomen_interpreter_spec.rb
new file mode 100644
index 0000000000..24ef2c96a2
--- /dev/null
+++ b/spec/lib/batch_load/import/taxon_names/nomen_interpreter_spec.rb
@@ -0,0 +1,66 @@
+require 'rails_helper'
+
+describe BatchLoad::Import::TaxonNames::NomenInterpreter, type: :model do
+
+ let(:file_name) { 'spec/files/batch/otu/OtuTest.tsv' }
+ let(:upload_file) { Rack::Test::UploadedFile.new(file_name) }
+
+ let(:setup) {
+ csv1 = CSV.read(file_name,
+ headers: true,
+ header_converters: :downcase,
+ col_sep: "\t",
+ encoding: 'UTF-8')
+
+ # csv1.each do |row|
+ # ident = row[0]
+ # case ident
+ # when 'americana' # create an otu to find later
+ # Otu.create(name: ident)
+ # else
+ # end
+ # end
+ }
+
+ let(:import) { BatchLoad::Import::TaxonNames::NomenInterpreter.new(
+ project_id:,
+ user_id:,
+ file: upload_file)
+ }
+
+ before { setup }
+
+
+ specify '.new succeeds' do
+ expect(import).to be_truthy
+ end
+
+ specify '#processed_rows' do
+ expect(import.processed_rows.count).to eq(7) # now skips empties
+ end
+
+ specify '#processed_rows' do
+ expect(import.create_attempted).to eq(false)
+ end
+
+ context 'after .create' do
+ before { import.create }
+
+ specify '#create_attempted' do
+ expect(import.create_attempted).to eq(true)
+ end
+
+ specify '#valid_objects' do
+ expect(import.valid_objects.count).to eq(7)
+ end
+
+ specify '#successful_rows' do
+ expect(import.successful_rows).to be_truthy
+ end
+
+ specify '#total_records_created' do
+ expect(import.total_records_created).to eq(7)
+ end
+ end
+
+end
From aebc08a907eb594a236aa04ce8e7cc66af6ca9ca Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 14:55:57 -0500
Subject: [PATCH 73/88] Specs and fixes for NOMEN batch (was castor). Fix #3411
---
CHANGELOG.md | 4 +
app/models/taxon_name_relationship.rb | 3 +
.../import/taxon_names/nomen_interpreter.rb | 13 +--
...d.tab => taxon_names_nomen_batch_load.tab} | 0
spec/files/batch/taxon_name/NomenTest.tab | 11 ++
.../taxon_names/nomen_interpreter_spec.rb | 100 ++++++++++++------
6 files changed, 90 insertions(+), 41 deletions(-)
rename public/batch_load_templates/taxon_names/{taxon_names_castor_batch_load.tab => taxon_names_nomen_batch_load.tab} (100%)
create mode 100644 spec/files/batch/taxon_name/NomenTest.tab
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0390442598..2a0ff73a40 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@ This project does not yet adheres to [Semantic Versioning](https://semv
## [unreleased]
### Added
+
- Biological associations can now be depicted
- Data depiction facets
- Biological associations filter annotation-based facets
@@ -25,6 +26,8 @@ This project does not yet adheres to [Semantic Versioning](https://semv
- GeographicArea autocomplete (exact match on alternate value)
### Fixed
+
+- Year import in NOMEN (was "castor") import [#3411]
- PublicContent missing is_community? method preventing reporting.
- Loans dashboard fails to render when no loans are present
- Staged image processing when boundaries fail to be calculated and calculate incorrectly
@@ -35,6 +38,7 @@ This project does not yet adheres to [Semantic Versioning](https://semv
- Changing the number of items per page or the page shows loan items that are not from the current loan in New/edit loan task [#3413]
- Sort by name gives an wrong order in filter nomenclature task
+[#3411]: https://github.com/SpeciesFileGroup/taxonworks/issues/3411
[#3367]: https://github.com/SpeciesFileGroup/taxonworks/issues/3367
[#3400]: https://github.com/SpeciesFileGroup/taxonworks/issues/3400
[#3416]: https://github.com/SpeciesFileGroup/taxonworks/issues/3416
diff --git a/app/models/taxon_name_relationship.rb b/app/models/taxon_name_relationship.rb
index efca381a52..f0983ee86e 100644
--- a/app/models/taxon_name_relationship.rb
+++ b/app/models/taxon_name_relationship.rb
@@ -64,6 +64,9 @@ class TaxonNameRelationship < ApplicationRecord
validates_presence_of :subject_taxon_name, message: 'Missing taxon name on the left side'
validates_presence_of :object_taxon_name, message: 'Missing taxon name on the right side'
+ validates_associated :subject_taxon_name
+ validates_associated :object_taxon_name
+
validates_uniqueness_of :object_taxon_name_id, scope: [:type, :project_id], if: :is_combination?
validates_uniqueness_of :object_taxon_name_id, scope: [:type, :subject_taxon_name_id, :project_id], unless: :is_combination?
diff --git a/lib/batch_load/import/taxon_names/nomen_interpreter.rb b/lib/batch_load/import/taxon_names/nomen_interpreter.rb
index 0cfc6d6ab1..30d308ac66 100644
--- a/lib/batch_load/import/taxon_names/nomen_interpreter.rb
+++ b/lib/batch_load/import/taxon_names/nomen_interpreter.rb
@@ -10,7 +10,7 @@ class Import::TaxonNames::NomenInterpreter < BatchLoad::Import
# The default parent if otherwise not provided
attr_accessor :base_taxon_name_id
- # The code (Rank Class) that new names will use
+ # The code (Rank Class) that new names will use. Required.
attr_accessor :nomenclature_code
# @return Boolean
@@ -128,6 +128,7 @@ def build_taxon_names
taxon_name_relationship = related_name_nomen_class.new(
subject_taxon_name: p, object_taxon_name: taxon_names[related_name_id]
)
+
parse_result.objects[:taxon_name_relationship].push taxon_name_relationship
end
rescue NameError
@@ -144,7 +145,7 @@ def build_taxon_names
end
end
- # There is an OTU linked to the taxon name
+ # There is an OTU linked to the taxon name.
if row['taxon_concept_name'].present? || row['guid'].present?
taxon_concept_identifier_nomen = {}
@@ -158,10 +159,11 @@ def build_taxon_names
parse_result.objects[:otu].push(otu)
else
+
# Note we are not technically using the param like TaxonName.new(), so we can't just set the attribute
# So we hack in the OTUs 'manually". This also lets us see them in the result
if also_create_otu
- parse_result.objects[:otu].push( Otu.new(taxon_name: p) )
+ parse_result.objects[:otu].push Otu.new(taxon_name: p)
end
end
@@ -188,11 +190,10 @@ def build
# @return [String, nil]
def year_of_publication(author_year)
return nil if author_year.blank?
- split_author_year = author_year.split(' ')
- year = split_author_year[split_author_year.length - 1]
- year =~ /\A\d+\z/ ? year : ''
+ author_year&.match(/\d\d\d\d/)&.to_s
end
+ # TODO: unify parsing to somewhere else
# @param [String] author_year
# @return [String, nil] just the author name, wiht parens left on
def verbatim_author(author_year)
diff --git a/public/batch_load_templates/taxon_names/taxon_names_castor_batch_load.tab b/public/batch_load_templates/taxon_names/taxon_names_nomen_batch_load.tab
similarity index 100%
rename from public/batch_load_templates/taxon_names/taxon_names_castor_batch_load.tab
rename to public/batch_load_templates/taxon_names/taxon_names_nomen_batch_load.tab
diff --git a/spec/files/batch/taxon_name/NomenTest.tab b/spec/files/batch/taxon_name/NomenTest.tab
new file mode 100644
index 0000000000..43cd76047d
--- /dev/null
+++ b/spec/files/batch/taxon_name/NomenTest.tab
@@ -0,0 +1,11 @@
+id taxon_name parent_id rank related_name_id related_name_nomen_class name_nomen_classification author_year guid taxon_concept_name
+1 Aidae family
+2 Bidae family
+3 Cus 1 genus Jones
+4 Dus 2 genus TaxonNameClassification::Iczn::Unavailable
+5 eus123 3 species TaxonNameClassification::Iczn::Unavailable::NotLatin
+6 fus 4 species
+7 gus 3 species 5 TaxonNameRelationship::Iczn::Invalidating::Synonym (Smith, 1920) https://my.uri/123 Cus nr. gus 22x
+8 hus 4 species 6 TaxonNameRelationship::Iczn::Invalidating::Synonym (Jones)
+9 ius 3 species 5 TaxonNameRelationship::Iczn::Invalidating::Synonym
+10 jus 3 species 6 TaxonNameRelationship::Iczn::Invalidating::Synonym my_otu_name_22
diff --git a/spec/lib/batch_load/import/taxon_names/nomen_interpreter_spec.rb b/spec/lib/batch_load/import/taxon_names/nomen_interpreter_spec.rb
index 24ef2c96a2..d121b274f5 100644
--- a/spec/lib/batch_load/import/taxon_names/nomen_interpreter_spec.rb
+++ b/spec/lib/batch_load/import/taxon_names/nomen_interpreter_spec.rb
@@ -2,64 +2,94 @@
describe BatchLoad::Import::TaxonNames::NomenInterpreter, type: :model do
- let(:file_name) { 'spec/files/batch/otu/OtuTest.tsv' }
+ let(:file_name) { 'spec/files/batch/taxon_name/NomenTest.tab' }
let(:upload_file) { Rack::Test::UploadedFile.new(file_name) }
+ let(:root_taxon_name) { FactoryBot.create(:root_taxon_name) }
+
let(:setup) {
- csv1 = CSV.read(file_name,
- headers: true,
+ csv1 = CSV.read(
+ file_name,
+ headers: true,
header_converters: :downcase,
- col_sep: "\t",
- encoding: 'UTF-8')
-
- # csv1.each do |row|
- # ident = row[0]
- # case ident
- # when 'americana' # create an otu to find later
- # Otu.create(name: ident)
- # else
- # end
- # end
+ col_sep: "\t",
+ encoding: 'UTF-8')
}
let(:import) { BatchLoad::Import::TaxonNames::NomenInterpreter.new(
+ parent_taxon_name_id: root_taxon_name.id,
+ nomenclature_code: 'iczn',
project_id:,
user_id:,
file: upload_file)
}
- before { setup }
-
-
- specify '.new succeeds' do
- expect(import).to be_truthy
+ specify '.also_create_otu' do
+ expect(import.also_create_otu).to be_falsey
end
- specify '#processed_rows' do
- expect(import.processed_rows.count).to eq(7) # now skips empties
+ specify '#year_of_publication 1' do
+ expect(import.send(:year_of_publication, 'Smith, 1999')).to eq('1999')
end
- specify '#processed_rows' do
- expect(import.create_attempted).to eq(false)
+ specify '#year_of_publication 2' do
+ expect(import.send(:year_of_publication, '(Smith, 1999)')).to eq('1999')
end
- context 'after .create' do
- before { import.create }
-
- specify '#create_attempted' do
- expect(import.create_attempted).to eq(true)
+ context 'with setup' do
+ before { setup }
+
+ specify '.new succeeds' do
+ expect(import).to be_truthy
end
-
- specify '#valid_objects' do
- expect(import.valid_objects.count).to eq(7)
+
+ specify '#processed_rows' do
+ expect(import.processed_rows.count).to eq(10) # now skips empties
end
- specify '#successful_rows' do
- expect(import.successful_rows).to be_truthy
+ specify '#processed_rows' do
+ expect(import.create_attempted).to eq(false)
end
- specify '#total_records_created' do
- expect(import.total_records_created).to eq(7)
+ context 'after .create' do
+ before { import.create }
+
+ specify '#create_attempted' do
+ expect(import.create_attempted).to eq(true)
+ end
+
+ specify '#valid_objects (after save)' do
+ expect(import.valid_objects.count).to eq(16)
+ end
+
+ specify '#successful_rows' do
+ expect(import.successful_rows).to be_truthy
+ end
+
+ specify '#total_records_created' do
+ expect(import.total_records_created).to eq(16)
+ end
+
+ specify 'creates taxon names' do
+ expect(TaxonName.all.count).to eq(11) # batch + 1 root
+ end
+
+ specify 'creates relationships' do
+ expect(TaxonNameRelationship.all.count).to eq(4)
+ end
+
+ specify 'creates classifications' do
+ expect(TaxonNameClassification.all.count).to eq(2) # not added to total, nested
+ end
+
+ specify 'creates otus' do
+ expect(Otu.all.count).to eq(2)
+ end
+
+ specify 'creates identifiers' do
+ expect(Identifier.all.count).to eq(1) # not added to total
+ end
+
end
end
From bbf238d1ef1e1e4c90d7f3fea9f6e47a8412440c Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 16:24:09 -0500
Subject: [PATCH 74/88] CHANGELOG.md [skip ci]
---
CHANGELOG.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2a0ff73a40..dc46182316 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,7 +8,7 @@ This project does not yet adheres to [Semantic Versioning](https://semv
## [unreleased]
### Added
-
+- Unified filter to observation matrix integration [#3415]
- Biological associations can now be depicted
- Data depiction facets
- Biological associations filter annotation-based facets
@@ -38,6 +38,8 @@ This project does not yet adheres to [Semantic Versioning](https://semv
- Changing the number of items per page or the page shows loan items that are not from the current loan in New/edit loan task [#3413]
- Sort by name gives an wrong order in filter nomenclature task
+
+[#3415]: https://github.com/SpeciesFileGroup/taxonworks/issues/3415
[#3411]: https://github.com/SpeciesFileGroup/taxonworks/issues/3411
[#3367]: https://github.com/SpeciesFileGroup/taxonworks/issues/3367
[#3400]: https://github.com/SpeciesFileGroup/taxonworks/issues/3400
From 80cac88bd92855eb338fbfde39dba4f9d5b5c61b Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 16:40:43 -0500
Subject: [PATCH 75/88] Apply date range in filter CO. Fix #3418.
---
CHANGELOG.md | 3 +++
lib/queries/collection_object/filter.rb | 7 ++++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 46933fcb1c..abf61b2eca 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -28,6 +28,7 @@ This project does not yet adheres to [Semantic Versioning](https://semv
### Fixed
+- Date range in filter Collection Object not being applied [#3418]
- Year import in NOMEN (was "castor") import [#3411]
- PublicContent missing is_community? method preventing reporting.
- Loans dashboard fails to render when no loans are present
@@ -39,6 +40,8 @@ This project does not yet adheres to [Semantic Versioning](https://semv
- Changing the number of items per page or the page shows loan items that are not from the current loan in New/edit loan task [#3413]
- Sort by name gives an wrong order in filter nomenclature task
+
+[#3418]: https://github.com/SpeciesFileGroup/taxonworks/issues/3418
[#3415]: https://github.com/SpeciesFileGroup/taxonworks/issues/3415
[#3411]: https://github.com/SpeciesFileGroup/taxonworks/issues/3411
[#3367]: https://github.com/SpeciesFileGroup/taxonworks/issues/3367
diff --git a/lib/queries/collection_object/filter.rb b/lib/queries/collection_object/filter.rb
index ea334e875e..0b500bcf53 100644
--- a/lib/queries/collection_object/filter.rb
+++ b/lib/queries/collection_object/filter.rb
@@ -14,6 +14,8 @@ class Filter < Query::Filter
PARAMS = [
*::Queries::CollectingEvent::Filter::BASE_PARAMS,
+ *Queries::Concerns::DateRanges.params, # Fead to CE query. Revisit possibly.
+
:biological_association_id,
:biological_associations,
:biological_relationship_id,
@@ -311,15 +313,14 @@ class Filter < Query::Filter
attr_accessor :dates
# rubocop:disable Metric/MethodLength
- # @param [Hash] args are permitted params
def initialize(query_params)
super
# Only CollectingEvent fields are permitted, for advanced nesting (e.g. tags on CEs), use collecting_event_query
- collecting_event_params = ::Queries::CollectingEvent::Filter.base_params
+ collecting_event_params = ::Queries::CollectingEvent::Filter.base_params + Queries::Concerns::DateRanges.params
@base_collecting_event_query = ::Queries::CollectingEvent::Filter.new(
- params.select { |a, b| collecting_event_params.include?(a) } # maintain this to avoid sub query initialization for now
+ params.select{ |a, b| collecting_event_params.include?(a) } # maintain this to avoid sub query initialization for now
)
@biological_association_id = params[:biological_association_id]
From 98e6ffaeb4ceb37071e4ddda6c6bdf8be7d4391d Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 18:17:59 -0500
Subject: [PATCH 76/88] Fix API source and people authenticiation. Fix #3407.
---
CHANGELOG.md | 3 ++-
app/controllers/api/v1/cite_controller.rb | 7 +++----
app/controllers/api_controller.rb | 2 --
app/controllers/combinations_controller.rb | 3 +--
.../shared_data_controller_configuration.rb | 4 +++-
app/controllers/loans_controller.rb | 1 -
.../serial_chronologies_controller.rb | 1 -
app/controllers/serials_controller.rb | 1 -
app/helpers/workbench/sessions_helper.rb | 16 ++++++++--------
config/routes/api_v1.rb | 16 +++++++++-------
10 files changed, 26 insertions(+), 28 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index abf61b2eca..8012696045 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -28,6 +28,7 @@ This project does not yet adheres to [Semantic Versioning](https://semv
### Fixed
+- Source and People API endpoints don't try to authenticate [#3407]
- Date range in filter Collection Object not being applied [#3418]
- Year import in NOMEN (was "castor") import [#3411]
- PublicContent missing is_community? method preventing reporting.
@@ -40,7 +41,7 @@ This project does not yet adheres to [Semantic Versioning](https://semv
- Changing the number of items per page or the page shows loan items that are not from the current loan in New/edit loan task [#3413]
- Sort by name gives an wrong order in filter nomenclature task
-
+[#3407]: https://github.com/SpeciesFileGroup/taxonworks/issues/3407
[#3418]: https://github.com/SpeciesFileGroup/taxonworks/issues/3418
[#3415]: https://github.com/SpeciesFileGroup/taxonworks/issues/3415
[#3411]: https://github.com/SpeciesFileGroup/taxonworks/issues/3411
diff --git a/app/controllers/api/v1/cite_controller.rb b/app/controllers/api/v1/cite_controller.rb
index 098d24b912..49de662af9 100644
--- a/app/controllers/api/v1/cite_controller.rb
+++ b/app/controllers/api/v1/cite_controller.rb
@@ -1,12 +1,11 @@
require 'taxon_names_helper.rb'
-class Api::V1::CiteController < ApiController
-
+class Api::V1::CiteController < ApiController
def count_valid_species
@base = Queries::TaxonName::Filter.new(
name: params.require(:taxon_name),
- exact: 'true',
- validity: 'true'
+ exact: true,
+ validify: true
).all
end
diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb
index 8a58c86062..b57b71e613 100644
--- a/app/controllers/api_controller.rb
+++ b/app/controllers/api_controller.rb
@@ -10,6 +10,4 @@ class ApiController < ActionController::API
include RequestType
include PaginationHeaders
- protected
-
end
diff --git a/app/controllers/combinations_controller.rb b/app/controllers/combinations_controller.rb
index ed6754887d..99ed497285 100644
--- a/app/controllers/combinations_controller.rb
+++ b/app/controllers/combinations_controller.rb
@@ -1,7 +1,6 @@
class CombinationsController < ApplicationController
include DataControllerConfiguration::ProjectDataControllerConfiguration
- before_action :require_sign_in_and_project_selection
before_action :set_combination, only: [:update, :edit, :update, :destroy, :show]
# GET /combinations.json
@@ -68,7 +67,7 @@ def destroy
private
def set_combination
@combination = Combination.with_project_id(sessions_current_project_id).find(params.require(:id))
- @recent_object = @combination
+ @recent_object = @combination
end
def combination_params
diff --git a/app/controllers/concerns/data_controller_configuration/shared_data_controller_configuration.rb b/app/controllers/concerns/data_controller_configuration/shared_data_controller_configuration.rb
index dfe03a08c1..af4f3e9cee 100644
--- a/app/controllers/concerns/data_controller_configuration/shared_data_controller_configuration.rb
+++ b/app/controllers/concerns/data_controller_configuration/shared_data_controller_configuration.rb
@@ -3,8 +3,10 @@ module DataControllerConfiguration::SharedDataControllerConfiguration
included do
include DataControllerConfiguration
- before_action :require_sign_in
+
+ before_action :require_sign_in, unless: -> { @api_request }
before_action :set_is_shared_data_model
+
end
protected
diff --git a/app/controllers/loans_controller.rb b/app/controllers/loans_controller.rb
index c86f2b3200..b113368a3f 100644
--- a/app/controllers/loans_controller.rb
+++ b/app/controllers/loans_controller.rb
@@ -1,7 +1,6 @@
class LoansController < ApplicationController
include DataControllerConfiguration::ProjectDataControllerConfiguration
- before_action :require_sign_in_and_project_selection
before_action :set_loan, only: [:show, :edit, :update, :destroy, :recipient_form]
after_action -> { set_pagination_headers(:loans) }, only: [:index], if: :json_request?
diff --git a/app/controllers/serial_chronologies_controller.rb b/app/controllers/serial_chronologies_controller.rb
index b5a412f003..62ab494097 100644
--- a/app/controllers/serial_chronologies_controller.rb
+++ b/app/controllers/serial_chronologies_controller.rb
@@ -1,7 +1,6 @@
class SerialChronologiesController < ApplicationController
include DataControllerConfiguration::SharedDataControllerConfiguration
- before_action :require_sign_in
before_action :set_serial_chronology, only: [:update, :destroy]
# POST /serial_chronologies
diff --git a/app/controllers/serials_controller.rb b/app/controllers/serials_controller.rb
index 856dae007d..ed20d6c069 100644
--- a/app/controllers/serials_controller.rb
+++ b/app/controllers/serials_controller.rb
@@ -1,7 +1,6 @@
class SerialsController < ApplicationController
include DataControllerConfiguration::SharedDataControllerConfiguration
- before_action :require_sign_in
before_action :set_serial, only: [:show, :edit, :update, :destroy]
# GET /serials
diff --git a/app/helpers/workbench/sessions_helper.rb b/app/helpers/workbench/sessions_helper.rb
index 42db2addbd..6cc26d1ca8 100644
--- a/app/helpers/workbench/sessions_helper.rb
+++ b/app/helpers/workbench/sessions_helper.rb
@@ -52,10 +52,10 @@ def sessions_sign_out
# Project methods
def set_project_from_params
- # Ensure project_token and project_id are the same if provided.
+ # Ensure project_token and project_id are the same if provided.
# TODO: Community data considerations
if sessions_current_project_id
- respond_to do |format|
+ respond_to do |format|
format.html { redirect_to root_url, notice: 'Project token and project are not the same.' }
format.json { render(json: {success: false}, status: :bad_request) && return } # was unauthorized
end
@@ -132,11 +132,11 @@ def is_project_member?(user, project)
end
def is_project_member_by_id(user_id, project_id)
- ProjectMember.where(user_id: user_id, project_id: project_id).any?
+ ProjectMember.where(user_id:, project_id:).any?
end
def authorize_project_selection(user, project)
- project.project_members.where(user: user, project: project)
+ project.project_members.where(user:, project:)
end
def require_sign_in
@@ -148,7 +148,7 @@ def require_project_selection
end
def require_sign_in_and_project_selection
- # TODO: account for permitted token based projects
+ # TODO: account for permitted token based projects
unless (sessions_signed_in? or @api_request) && sessions_project_selected?
respond_to do |format|
format.html { redirect_to root_url, notice: 'Whoa there, sign in and select a project first.' }
@@ -179,7 +179,7 @@ def session_header_links
[
project_settings_link,
administration_link,
- link_to('Account', sessions_current_user, data: {
+ link_to('Account', sessions_current_user, data: {
current_user_id: sessions_current_user.id.to_s,
current_user_is_administrator: sessions_current_user.is_administrator,
}),
@@ -192,9 +192,9 @@ def session_header_links
# @param [String]
def favorite_page_link(kind, name)
if favorites?(kind, name)
- link_to('Unfavorite page', unfavorite_page_path(kind: kind, name: name), method: :post, remote: true, id: "unfavorite_link_#{kind}-#{name}", class: :unfavorite_link, title: 'Remove to favorite')
+ link_to('Unfavorite page', unfavorite_page_path(kind:, name:), method: :post, remote: true, id: "unfavorite_link_#{kind}-#{name}", class: :unfavorite_link, title: 'Remove to favorite')
else
- link_to('Favorite page', favorite_page_path(kind: kind, name: name), method: :post, remote: true, id: "favorite_link_#{kind}-#{name}", class: :favourite_link, title: 'Add to favorite.')
+ link_to('Favorite page', favorite_page_path(kind:, name:), method: :post, remote: true, id: "favorite_link_#{kind}-#{name}", class: :favourite_link, title: 'Add to favorite.')
end
end
diff --git a/config/routes/api_v1.rb b/config/routes/api_v1.rb
index 900744b22d..9b2f479c4f 100644
--- a/config/routes/api_v1.rb
+++ b/config/routes/api_v1.rb
@@ -13,13 +13,15 @@
get :pingz, controller: 'ping'
# not authenticated
- get '/sources', to: '/sources#api_index'
- get '/sources/autocomplete', to: '/sources#autocomplete'
- get '/sources/:id', to: '/sources#api_show'
-
- get '/people', to: '/people#api_index'
- get '/people/autocomplete', to: '/people#autocomplete'
- get '/people/:id', to: '/people#api_show'
+ defaults authenticate_project: false, authenticate_user: false do
+ get '/sources', to: '/sources#api_index'
+ get '/sources/autocomplete', to: '/sources#autocomplete'
+ get '/sources/:id', to: '/sources#api_show'
+
+ get '/people', to: '/people#api_index'
+ get '/people/autocomplete', to: '/people#autocomplete'
+ get '/people/:id', to: '/people#api_show'
+ end
# authenticated by user_token
defaults authenticate_user: true do
From 10743d8f73e1ca6e1d0ce789e14b63cb9f280cff Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 21:06:11 -0500
Subject: [PATCH 77/88] Fix nomen batch load parent assigment. Fix #3409
---
CHANGELOG.md | 2 +
.../batch_load/nomen/_form.html.erb | 2 +-
.../import/taxon_names/nomen_interpreter.rb | 83 ++++++++++---------
.../taxon_names/nomen_interpreter_spec.rb | 34 ++++++--
4 files changed, 76 insertions(+), 45 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8012696045..d0d0816f7d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -28,6 +28,7 @@ This project does not yet adheres to [Semantic Versioning](https://semv
### Fixed
+- Nomen (was "castor") batch load was not assigning parent correctly [#3409]
- Source and People API endpoints don't try to authenticate [#3407]
- Date range in filter Collection Object not being applied [#3418]
- Year import in NOMEN (was "castor") import [#3411]
@@ -41,6 +42,7 @@ This project does not yet adheres to [Semantic Versioning](https://semv
- Changing the number of items per page or the page shows loan items that are not from the current loan in New/edit loan task [#3413]
- Sort by name gives an wrong order in filter nomenclature task
+[#3409]: https://github.com/SpeciesFileGroup/taxonworks/issues/3409
[#3407]: https://github.com/SpeciesFileGroup/taxonworks/issues/3407
[#3418]: https://github.com/SpeciesFileGroup/taxonworks/issues/3418
[#3415]: https://github.com/SpeciesFileGroup/taxonworks/issues/3415
diff --git a/app/views/taxon_names/batch_load/nomen/_form.html.erb b/app/views/taxon_names/batch_load/nomen/_form.html.erb
index e5771509ef..b75b7f099f 100644
--- a/app/views/taxon_names/batch_load/nomen/_form.html.erb
+++ b/app/views/taxon_names/batch_load/nomen/_form.html.erb
@@ -6,7 +6,7 @@
<% if @result -%>
- <%= label_tag "Attaching to:" %> <%= tag.strong taxon_name_tag(@result.parent_taxon_name) %>
+ <%= label_tag "Attaching to:" %> <%= tag.strong taxon_name_tag(TaxonName.find(@result.parent_taxon_name_id)) %>
<%= hidden_field_tag :parent_taxon_name_id, @result.parent_taxon_name_id -%>
diff --git a/lib/batch_load/import/taxon_names/nomen_interpreter.rb b/lib/batch_load/import/taxon_names/nomen_interpreter.rb
index 30d308ac66..6d11ffc6fa 100644
--- a/lib/batch_load/import/taxon_names/nomen_interpreter.rb
+++ b/lib/batch_load/import/taxon_names/nomen_interpreter.rb
@@ -1,9 +1,6 @@
module BatchLoad
class Import::TaxonNames::NomenInterpreter < BatchLoad::Import
- # The parent for the top level names
- attr_accessor :parent_taxon_name
-
# The id of the parent taxon name, computed automatically as Root if not provided
attr_accessor :parent_taxon_name_id
@@ -31,18 +28,23 @@ def initialize(nomenclature_code: nil, parent_taxon_name_id: nil, also_create_ot
super(**args)
end
+ def parent_taxon_name_id
+ @parent_taxon_name_id || root_taxon_name.id
+ end
+
def also_create_otu
return true if [1, '1', true].include?(@also_create_otu)
false
end
# @return [String]
- def parent_taxon_name
+ def root_taxon_name
Project.find(@project_id).root_taxon_name
end
+
# @return [Integer]
- delegate :id, to: :parent_taxon_name, prefix: true
+ # delegate :id, to: :parent_taxon_name, prefix: true
# rubocop:disable Metrics/MethodLength
# @return [Integer]
@@ -75,43 +77,48 @@ def build_taxon_names
taxon_name_authors_attributes: taxon_name_authors_attributes(verbatim_author(row['author_year']))
}
- if row['original_name']
- original_protonym_attributes = {
- verbatim_name: row['original_name'],
- name: row['original_name'].split(' ')[-1],
- year_of_publication: year_of_publication(row['author_year']),
- rank_class: Ranks.lookup(@nomenclature_code.to_sym, row['original_rank']),
- parent: parent_taxon_name,
- by: user,
- project:,
- verbatim_author: verbatim_author(row['author_year']),
- taxon_name_authors_attributes: taxon_name_authors_attributes(verbatim_author(row['author_year']))
- }
-
- original_protonym = Protonym.new(original_protonym_attributes)
-
- if row['original_rank'] == 'genus'
- protonym_attributes[:original_genus] = original_protonym
- elsif row['original_rank'] == 'subgenus'
- protonym_attributes[:original_subgenus] = original_protonym
- elsif row['original_rank'] == 'species'
- protonym_attributes[:original_species] = original_protonym
- elsif row['original_rank'] == 'subspecies'
- protonym_attributes[:original_subspecies] = original_protonym
- end
-
- parse_result.objects[:original_taxon_name].push original_protonym
- end
+ # Not implemented
+
+ # if row['original_name']
+ # original_protonym_attributes = {
+ # verbatim_name: row['original_name'],
+ # name: row['original_name'].split(' ')[-1],
+ # year_of_publication: year_of_publication(row['author_year']),
+ # rank_class: Ranks.lookup(@nomenclature_code.to_sym, row['original_rank']),
+ # parent: parent_taxon_name,
+ # by: user,
+ # project:,
+ # verbatim_author: verbatim_author(row['author_year']),
+ # taxon_name_authors_attributes: taxon_name_authors_attributes(verbatim_author(row['author_year']))
+ # }
+
+ # original_protonym = Protonym.new(original_protonym_attributes)
+
+ # if row['original_rank'] == 'genus'
+ # protonym_attributes[:original_genus] = original_protonym
+ # elsif row['original_rank'] == 'subgenus'
+ # protonym_attributes[:original_subgenus] = original_protonym
+ # elsif row['original_rank'] == 'species'
+ # protonym_attributes[:original_species] = original_protonym
+ # elsif row['original_rank'] == 'subspecies'
+ # protonym_attributes[:original_subspecies] = original_protonym
+ # end
+
+ # parse_result.objects[:original_taxon_name].push original_protonym
+ # end
p = Protonym.new(protonym_attributes)
+
+ # row data
taxon_name_id = row['id']
- parent_taxon_name_id = row['parent_id']
+ parent_id = row['parent_id']
+
taxon_names[taxon_name_id] = p
- if taxon_names[parent_taxon_name_id].nil?
- p.parent = parent_taxon_name
+ if taxon_names[parent_id].nil?
+ p.parent_id = parent_taxon_name_id
else
- p.parent = taxon_names[parent_taxon_name_id]
+ p.parent = taxon_names[parent_id]
end
# TaxonNameRelationship
@@ -128,7 +135,7 @@ def build_taxon_names
taxon_name_relationship = related_name_nomen_class.new(
subject_taxon_name: p, object_taxon_name: taxon_names[related_name_id]
)
-
+
parse_result.objects[:taxon_name_relationship].push taxon_name_relationship
end
rescue NameError
@@ -159,7 +166,7 @@ def build_taxon_names
parse_result.objects[:otu].push(otu)
else
-
+
# Note we are not technically using the param like TaxonName.new(), so we can't just set the attribute
# So we hack in the OTUs 'manually". This also lets us see them in the result
if also_create_otu
diff --git a/spec/lib/batch_load/import/taxon_names/nomen_interpreter_spec.rb b/spec/lib/batch_load/import/taxon_names/nomen_interpreter_spec.rb
index d121b274f5..07ff6617ad 100644
--- a/spec/lib/batch_load/import/taxon_names/nomen_interpreter_spec.rb
+++ b/spec/lib/batch_load/import/taxon_names/nomen_interpreter_spec.rb
@@ -16,14 +16,36 @@
encoding: 'UTF-8')
}
- let(:import) { BatchLoad::Import::TaxonNames::NomenInterpreter.new(
- parent_taxon_name_id: root_taxon_name.id,
- nomenclature_code: 'iczn',
- project_id:,
- user_id:,
- file: upload_file)
+ let(:import_params) {
+ {
+ parent_taxon_name_id: root_taxon_name.id,
+ nomenclature_code: 'iczn',
+ project_id:,
+ user_id:,
+ file: upload_file }
}
+ let(:import) { BatchLoad::Import::TaxonNames::NomenInterpreter.new( **import_params ) }
+
+
+ specify 'parent_taxon_name_id (provided)' do
+ g = Protonym.create!(parent: root_taxon_name, name: 'Orderum', rank_class: Ranks.lookup(:iczn, :order))
+ i = BatchLoad::Import::TaxonNames::NomenInterpreter.new( **import_params.merge(parent_taxon_name_id: g.id) )
+ i.create
+ expect(TaxonName.find_by(name: 'Aidae').parent_id).to eq(g.id)
+ expect(TaxonName.find_by(name: 'Bidae').parent_id).to eq(g.id)
+ end
+
+ specify 'parent_taxon_name_id (provided)' do
+ g = Protonym.create!(parent: root_taxon_name, name: 'Aus', rank_class: Ranks.lookup(:iczn, :genus))
+ i = BatchLoad::Import::TaxonNames::NomenInterpreter.new( **import_params.merge(parent_taxon_name_id: g.id) )
+ expect(i.parent_taxon_name_id).to eq(g.id)
+ end
+
+ specify 'parent_taxon_name_id (root)' do
+ expect(import.parent_taxon_name_id).to eq(root_taxon_name.id)
+ end
+
specify '.also_create_otu' do
expect(import.also_create_otu).to be_falsey
end
From f54ec7ed1f56bde87cee3e538bc963e16d616fa0 Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 21:48:23 -0500
Subject: [PATCH 78/88] Cleanup type name
---
.../otu_relationships_controller.rb | 2 +-
app/helpers/otu_relationships_helper.rb | 23 ++++++++++++++++---
app/models/otu_relationship.rb | 1 +
app/models/otu_relationship/disjoint.rb | 4 ----
.../otu_relationships/_attributes.html.erb | 7 +-----
app/views/otu_relationships/_form.html.erb | 8 ++++++-
app/views/otu_relationships/list.html.erb | 2 +-
7 files changed, 31 insertions(+), 16 deletions(-)
diff --git a/app/controllers/otu_relationships_controller.rb b/app/controllers/otu_relationships_controller.rb
index e7464eb34c..ac51a8d9f0 100644
--- a/app/controllers/otu_relationships_controller.rb
+++ b/app/controllers/otu_relationships_controller.rb
@@ -48,7 +48,7 @@ def create
respond_to do |format|
if @otu_relationship.save
format.html { redirect_to otu_relationship_url(@otu_relationship), notice: 'Otu relationship was successfully created.' }
- format.json { render :show, status: :created, location: @otu_relationship }
+ format.json { render :show, status: :created, location: @otu_relationship.metamorphosize }
else
format.html { render :new, status: :unprocessable_entity }
format.json { render json: @otu_relationship.errors, status: :unprocessable_entity }
diff --git a/app/helpers/otu_relationships_helper.rb b/app/helpers/otu_relationships_helper.rb
index 1e113cd9e9..d8fc568aba 100644
--- a/app/helpers/otu_relationships_helper.rb
+++ b/app/helpers/otu_relationships_helper.rb
@@ -7,17 +7,34 @@ def otu_relationship_tag(otu_relationship)
def otu_relationship_label(otu_relationship)
return nil if otu_relationship.nil?
- [label_for_otu(otu_relationship.subject_otu), otu_relationship.type_name, label_for_otu(otu_relationship.object_otu) ].compact.join(' ')
+ [
+ label_for_otu(otu_relationship.subject_otu),
+ tag.span(otu_relationship_type_label(otu_relationship), class: [:feedback, 'feedback-thin', 'feedback-info']),
+ label_for_otu(otu_relationship.object_otu) ].compact.join(' ').html_safe
end
def otu_relationship_link(otu_relationship)
return nil if otu_relationship.nil?
- link_to(otu_relationship, otu_relationship_label(otu_relationship))
+ link_to(otu_relationship_label(otu_relationship), otu_relationship.metamorphosize)
end
def otu_relationship_type_label(otu_relationship)
return nil if otu_relationship.nil?
- otu_relationship.type_name
+ case otu_relationship.type
+ when 'OtuRelationship::Disjoint'
+ 'disjoint'
+ when 'OtuRelationship::Equal'
+ 'equals'
+ when 'OtuRelationship::Intersecting'
+ 'intersecting'
+ when 'OtuRelationship::PartiallyOverlapping'
+ 'overlaps'
+ when 'OtuRelationship::ProperPartInverse'
+ 'includes'
+ when 'OtuRelationship::ProperPart'
+ 'included in'
+ end
+
end
end
diff --git a/app/models/otu_relationship.rb b/app/models/otu_relationship.rb
index 802980378e..549d83cb27 100644
--- a/app/models/otu_relationship.rb
+++ b/app/models/otu_relationship.rb
@@ -36,4 +36,5 @@ class OtuRelationship < ApplicationRecord
validates_presence_of :subject_otu
validates_presence_of :object_otu
+
end
diff --git a/app/models/otu_relationship/disjoint.rb b/app/models/otu_relationship/disjoint.rb
index 9ee09c59fb..6a8aea2030 100644
--- a/app/models/otu_relationship/disjoint.rb
+++ b/app/models/otu_relationship/disjoint.rb
@@ -1,7 +1,3 @@
class OtuRelationship::Disjoint < OtuRelationship
- def type_name
- 'excludes'
- end
-
end
diff --git a/app/views/otu_relationships/_attributes.html.erb b/app/views/otu_relationships/_attributes.html.erb
index b9b180b14b..b8a9f314d9 100644
--- a/app/views/otu_relationships/_attributes.html.erb
+++ b/app/views/otu_relationships/_attributes.html.erb
@@ -5,7 +5,7 @@
Type:
- <%= @otu_relationship.type_name %>
+ <%= otu_relationship_type_label( @otu_relationship) %>
@@ -13,8 +13,3 @@
<%= otu_link(@otu_relationship.object_otu) %>
-
- Project:
- <%= @otu_relationship.project_id %>
-
-
diff --git a/app/views/otu_relationships/_form.html.erb b/app/views/otu_relationships/_form.html.erb
index a9415ef2cc..1a0c2d420b 100644
--- a/app/views/otu_relationships/_form.html.erb
+++ b/app/views/otu_relationships/_form.html.erb
@@ -13,12 +13,18 @@
<%= smart_selector model: :otus, target: :OtuRelationship, field_property: :subject_otu_id, field_object: :otu_relationship, title: 'OTU subject', current: @otu_relationship.subject_otu %>
+
+
- <%= form.label :type %>
+ <%= form.label :type %>
<%= form.select :type, options: %w{OtuRelationship;:Intersecting OtuRelationship::Disjoint OtuRelationship::Equal OtuRelationship::ProperPartInverse OtuRelationship::ProperPart OtuRelationship::PartiallyOverlapping } %>
+
+
+
<%= smart_selector model: :otus, target: :OtuRelationship, field_property: :object_otu_id, field_object: :otu_relationship, title: 'OTU object', current: @otu_relationship.object_otu %>
+
<%= form.submit %>
diff --git a/app/views/otu_relationships/list.html.erb b/app/views/otu_relationships/list.html.erb
index cf6ef16417..4ef02143eb 100644
--- a/app/views/otu_relationships/list.html.erb
+++ b/app/views/otu_relationships/list.html.erb
@@ -15,7 +15,7 @@
<% @otu_relationships.each do |otu_relationship| %>
<%= content_tag(:tr, class: :contextMenuCells) do -%>
<%= otu_tag( otu_relationship.subject_otu ) %>
-
<%= otu_relationship.type_name %>
+
<%= otu_relationship_type_label(otu_relationship) %>
<%= otu_tag( otu_relationship.object_otu ) %>
<%= fancy_metadata_cells_tag(otu_relationship) -%>
<% end %>
From 727f59e91dab69fbf70ad27505b2f8d1a46b5681 Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 21:50:13 -0500
Subject: [PATCH 79/88] Add RCC5 support. Fix #257.
---
CHANGELOG.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d0d0816f7d..7e2842f2ae 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ This project does not yet adheres to [Semantic Versioning](https://semv
### Added
+- Basic RCC5 support (= OtuRelationship) [#257]
- Unified filter to observation matrix integration [#3415]
- Biological associations can now be depicted
- Data depiction facets
@@ -42,6 +43,7 @@ This project does not yet adheres to [Semantic Versioning](https://semv
- Changing the number of items per page or the page shows loan items that are not from the current loan in New/edit loan task [#3413]
- Sort by name gives an wrong order in filter nomenclature task
+[#257]: https://github.com/SpeciesFileGroup/taxonworks/issues/257
[#3409]: https://github.com/SpeciesFileGroup/taxonworks/issues/3409
[#3407]: https://github.com/SpeciesFileGroup/taxonworks/issues/3407
[#3418]: https://github.com/SpeciesFileGroup/taxonworks/issues/3418
From de11906e4393ab176d19118c4ba8fe8508c45e7c Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 21:53:32 -0500
Subject: [PATCH 80/88] bundle update
---
CHANGELOG.md | 12 ++++++------
Gemfile.lock | 29 ++++++++++++++++-------------
2 files changed, 22 insertions(+), 19 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7e2842f2ae..f0a47ae5df 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -44,17 +44,17 @@ This project does not yet adheres to [Semantic Versioning](https://semv
- Sort by name gives an wrong order in filter nomenclature task
[#257]: https://github.com/SpeciesFileGroup/taxonworks/issues/257
-[#3409]: https://github.com/SpeciesFileGroup/taxonworks/issues/3409
-[#3407]: https://github.com/SpeciesFileGroup/taxonworks/issues/3407
-[#3418]: https://github.com/SpeciesFileGroup/taxonworks/issues/3418
-[#3415]: https://github.com/SpeciesFileGroup/taxonworks/issues/3415
-[#3411]: https://github.com/SpeciesFileGroup/taxonworks/issues/3411
[#3367]: https://github.com/SpeciesFileGroup/taxonworks/issues/3367
[#3400]: https://github.com/SpeciesFileGroup/taxonworks/issues/3400
-[#3416]: https://github.com/SpeciesFileGroup/taxonworks/issues/3416
+[#3407]: https://github.com/SpeciesFileGroup/taxonworks/issues/3407
[#3408]: https://github.com/SpeciesFileGroup/taxonworks/issues/3408
+[#3409]: https://github.com/SpeciesFileGroup/taxonworks/issues/3409
+[#3411]: https://github.com/SpeciesFileGroup/taxonworks/issues/3411
[#3412]: https://github.com/SpeciesFileGroup/taxonworks/issues/3412
[#3413]: https://github.com/SpeciesFileGroup/taxonworks/issues/3413
+[#3415]: https://github.com/SpeciesFileGroup/taxonworks/issues/3415
+[#3416]: https://github.com/SpeciesFileGroup/taxonworks/issues/3416
+[#3418]: https://github.com/SpeciesFileGroup/taxonworks/issues/3418
[#3419]: https://github.com/SpeciesFileGroup/taxonworks/issues/3419
## [0.32.3] - 2023-05-05
diff --git a/Gemfile.lock b/Gemfile.lock
index 91251323fc..9c88362e0d 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -144,7 +144,7 @@ GEM
public_suffix (>= 2.0.2, < 6.0)
afm (0.2.2)
amazing_print (1.4.0)
- asciidoctor (2.0.18)
+ asciidoctor (2.0.20)
ast (2.4.2)
babel-source (5.8.35)
babel-transpiler (0.7.0)
@@ -164,7 +164,7 @@ GEM
brakeman (5.4.1)
builder (3.2.4)
byebug (11.1.3)
- capybara (3.39.0)
+ capybara (3.39.1)
addressable
matrix
mini_mime (>= 0.1.3)
@@ -312,9 +312,9 @@ GEM
parslet
logical_query_parser (0.3.2)
treetop (~> 1.6.8)
- loofah (2.20.0)
+ loofah (2.21.3)
crass (~> 1.0.2)
- nokogiri (>= 1.5.9)
+ nokogiri (>= 1.12.0)
lumberjack (1.2.8)
mail (2.8.1)
mini_mime (>= 0.1.1)
@@ -348,9 +348,9 @@ GEM
net-protocol
netrc (0.11.0)
nio4r (2.5.9)
- nokogiri (1.14.3-x86_64-darwin)
+ nokogiri (1.15.0-x86_64-darwin)
racc (~> 1.4)
- nokogiri (1.14.3-x86_64-linux)
+ nokogiri (1.15.0-x86_64-linux)
racc (~> 1.4)
notiffany (0.1.3)
nenv (~> 0.1)
@@ -362,7 +362,7 @@ GEM
paperclip-meta (3.1.0)
paperclip (>= 5.0)
parallel (1.23.0)
- parallel_tests (4.2.0)
+ parallel_tests (4.2.1)
parallel
parser (3.2.2.1)
ast (~> 2.4.1)
@@ -474,7 +474,7 @@ GEM
nokogiri
roo (>= 2.0.0, < 3)
spreadsheet (> 0.9.0)
- rouge (4.1.0)
+ rouge (4.1.1)
rqrcode_core (1.2.0)
rspec (3.12.0)
rspec-core (~> 3.12.0)
@@ -502,7 +502,7 @@ GEM
rspec-support (~> 3.10)
rspec-support (3.12.0)
rtesseract (3.1.2)
- rubocop (1.50.2)
+ rubocop (1.51.0)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.2.0.0)
@@ -516,6 +516,8 @@ GEM
parser (>= 3.2.1.0)
rubocop-capybara (2.18.0)
rubocop (~> 1.41)
+ rubocop-factory_bot (2.23.1)
+ rubocop (~> 1.33)
rubocop-faker (1.1.0)
faker (>= 2.12.0)
rubocop (>= 0.82.0)
@@ -526,9 +528,10 @@ GEM
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
- rubocop-rspec (2.20.0)
+ rubocop-rspec (2.22.0)
rubocop (~> 1.33)
rubocop-capybara (~> 2.17)
+ rubocop-factory_bot (~> 2.22)
ruby-graphviz (1.2.5)
rexml
ruby-lsp (0.4.5)
@@ -554,7 +557,7 @@ GEM
rdoc (>= 5.0)
seedbank (0.5.0)
rake (>= 10.0)
- selenium-webdriver (4.9.0)
+ selenium-webdriver (4.9.1)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
@@ -573,7 +576,7 @@ GEM
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
- sorbet-runtime (0.5.10801)
+ sorbet-runtime (0.5.10832)
spreadsheet (1.3.0)
ruby-ole
spring (4.1.1)
@@ -603,7 +606,7 @@ GEM
tins (~> 1.0)
terrapin (0.6.0)
climate_control (>= 0.0.3, < 1.0)
- thor (1.2.1)
+ thor (1.2.2)
tilt (2.1.0)
timecop (0.9.6)
timeliness (0.4.5)
From 155449352694d3d460f04a9da53658c824580299 Mon Sep 17 00:00:00 2001
From: mjy
Date: Thu, 18 May 2023 22:55:29 -0500
Subject: [PATCH 81/88] Fix otu.rb
---
app/models/otu.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/models/otu.rb b/app/models/otu.rb
index 57833ed1a1..29c136161e 100644
--- a/app/models/otu.rb
+++ b/app/models/otu.rb
@@ -79,7 +79,7 @@ class Otu < ApplicationRecord
has_many :content_topics, through: :contents, source: :topic
has_many :otu_relationships, foreign_key: :subject_otu_id
- has_many :related_otu_relationships, foreign_key: :object_otu_id
+ has_many :related_otu_relationships, class_name: 'OtuRelationship', foreign_key: :object_otu_id
scope :with_taxon_name_id, -> (taxon_name_id) { where(taxon_name_id:) }
scope :with_name, -> (name) { where(name:) }
From 8143f4f95597b9c600840520cb562a0c206f93d8 Mon Sep 17 00:00:00 2001
From: mjy
Date: Fri, 19 May 2023 08:20:02 -0500
Subject: [PATCH 82/88] OTU relationship validation, type fix.
---
app/models/otu_relationship.rb | 7 +++----
app/views/otu_relationships/_form.html.erb | 2 +-
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/app/models/otu_relationship.rb b/app/models/otu_relationship.rb
index 549d83cb27..773aefe4ea 100644
--- a/app/models/otu_relationship.rb
+++ b/app/models/otu_relationship.rb
@@ -1,7 +1,4 @@
-# TODO: controller spec refactor
-#
-#
-# An OtuRelationhip links two OTUs in a euler/rcc5 relatinship.
+# An OtuRelationhip links two OTUs in a euler/rcc5 relationship.
#
# # @!attribute subject_otu_id
# @return [integer]
@@ -36,5 +33,7 @@ class OtuRelationship < ApplicationRecord
validates_presence_of :subject_otu
validates_presence_of :object_otu
+ validates_uniqueness_of :subject_otu_id, scope: [:type, :object_otu_id]
+
end
diff --git a/app/views/otu_relationships/_form.html.erb b/app/views/otu_relationships/_form.html.erb
index 1a0c2d420b..be8c9bc8cc 100644
--- a/app/views/otu_relationships/_form.html.erb
+++ b/app/views/otu_relationships/_form.html.erb
@@ -17,7 +17,7 @@
<%= form.label :type %>
- <%= form.select :type, options: %w{OtuRelationship;:Intersecting OtuRelationship::Disjoint OtuRelationship::Equal OtuRelationship::ProperPartInverse OtuRelationship::ProperPart OtuRelationship::PartiallyOverlapping } %>
+ <%= form.select :type, options: %w{OtuRelationship::Intersecting OtuRelationship::Disjoint OtuRelationship::Equal OtuRelationship::ProperPartInverse OtuRelationship::ProperPart OtuRelationship::PartiallyOverlapping } %>
From b633402ae4beeac2626d337dde2178ee537021d7 Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Fri, 19 May 2023 10:49:55 -0300
Subject: [PATCH 83/88] Disable radial matrix and loan when list is empty
---
.../vue/components/radials/loan/radial.vue | 7 ++++++-
.../vue/components/radials/matrix/radial.vue | 8 +++++++-
.../vue/tasks/collection_objects/filter/app.vue | 12 ++++++++++--
app/javascript/vue/tasks/descriptors/filter/App.vue | 2 ++
app/javascript/vue/tasks/extracts/filter/App.vue | 2 ++
app/javascript/vue/tasks/observations/filter/App.vue | 2 ++
app/javascript/vue/tasks/otu/filter/App.vue | 2 ++
7 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/app/javascript/vue/components/radials/loan/radial.vue b/app/javascript/vue/components/radials/loan/radial.vue
index 3b16d1414c..ced62d42f2 100644
--- a/app/javascript/vue/components/radials/loan/radial.vue
+++ b/app/javascript/vue/components/radials/loan/radial.vue
@@ -40,7 +40,7 @@
title="Radial Loan"
circle
color="radial"
- :disabled="!ids.length && !Object.keys(params).length"
+ :disabled="disabled || (!ids.length && !Object.keys(params).length)"
@click="isModalVisible = true"
>
[]
},
+ disabled: {
+ type: Boolean,
+ default: false
+ },
+
parameters: {
type: Object,
default: () => ({})
diff --git a/app/javascript/vue/components/radials/matrix/radial.vue b/app/javascript/vue/components/radials/matrix/radial.vue
index c564ca83de..01544a9d54 100644
--- a/app/javascript/vue/components/radials/matrix/radial.vue
+++ b/app/javascript/vue/components/radials/matrix/radial.vue
@@ -42,7 +42,8 @@
circle
color="radial"
:disabled="
- !ids.length && !Object.keys(params[QUERY_PARAM[objectType]]).length
+ disabled ||
+ (!ids.length && !Object.keys(params[QUERY_PARAM[objectType]]).length)
"
@click="isModalVisible = true"
>
@@ -84,6 +85,11 @@ const props = defineProps({
default: () => []
},
+ disabled: {
+ type: Boolean,
+ default: false
+ },
+
parameters: {
type: Object,
default: () => ({})
diff --git a/app/javascript/vue/tasks/collection_objects/filter/app.vue b/app/javascript/vue/tasks/collection_objects/filter/app.vue
index a656f8a344..bb1f3267fe 100644
--- a/app/javascript/vue/tasks/collection_objects/filter/app.vue
+++ b/app/javascript/vue/tasks/collection_objects/filter/app.vue
@@ -17,17 +17,25 @@
@reset="resetFilter"
>
-
+
-
+
@@ -23,6 +24,7 @@
diff --git a/app/javascript/vue/tasks/extracts/filter/App.vue b/app/javascript/vue/tasks/extracts/filter/App.vue
index 9c76f2d3de..b66bc803fe 100644
--- a/app/javascript/vue/tasks/extracts/filter/App.vue
+++ b/app/javascript/vue/tasks/extracts/filter/App.vue
@@ -18,12 +18,14 @@
diff --git a/app/javascript/vue/tasks/observations/filter/App.vue b/app/javascript/vue/tasks/observations/filter/App.vue
index 70897643ad..be7cccff51 100644
--- a/app/javascript/vue/tasks/observations/filter/App.vue
+++ b/app/javascript/vue/tasks/observations/filter/App.vue
@@ -18,12 +18,14 @@
diff --git a/app/javascript/vue/tasks/otu/filter/App.vue b/app/javascript/vue/tasks/otu/filter/App.vue
index 70cebac839..d0d789e175 100644
--- a/app/javascript/vue/tasks/otu/filter/App.vue
+++ b/app/javascript/vue/tasks/otu/filter/App.vue
@@ -18,6 +18,7 @@
@@ -25,6 +26,7 @@
From b6be9a24e31186bef5a6d3aed92ca54b70474860 Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Fri, 19 May 2023 11:18:37 -0300
Subject: [PATCH 84/88] Update packages
---
package-lock.json | 389 ++++++++++++++++++++++++----------------------
package.json | 19 ++-
2 files changed, 212 insertions(+), 196 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 8553cf85ba..cd46fae126 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -25,7 +25,7 @@
"marked": "^5.0.2",
"parse-dms": "0.0.5",
"pdfjs-dist": "3.6.172",
- "pinia": "^2.1.2",
+ "pinia": "^2.1.3",
"qs": "^6.11.2",
"shakapacker": "6.6.0",
"v-hotkey": "^0.9.0",
@@ -46,18 +46,17 @@
"@vue/compiler-sfc": "^3.3.4",
"babel-loader": "^9.1.2",
"compression-webpack-plugin": "^10.0.0",
- "css-loader": "^6.7.3",
+ "css-loader": "^6.7.4",
"css-minimizer-webpack-plugin": "^5.0.0",
- "eslint": "^8.39.0",
+ "eslint": "^8.40.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.27.5",
- "eslint-plugin-n": "^15.7.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-standard": "^4.1.0",
- "eslint-plugin-vue": "^9.11.0",
- "mini-css-extract-plugin": "^2.7.5",
+ "eslint-plugin-vue": "^9.13.0",
+ "mini-css-extract-plugin": "^2.7.6",
"postcss": "^8.4.23",
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-import": "^15.1.0",
@@ -67,16 +66,16 @@
"resolve-url-loader": "^5.0.0",
"sass": "^1.62.1",
"sass-loader": "^13.2.2",
- "style-loader": "^3.3.2",
+ "style-loader": "^3.3.3",
"stylus": "^0.59.0",
"stylus-loader": "^7.1.0",
- "terser-webpack-plugin": "^5.3.7",
+ "terser-webpack-plugin": "^5.3.9",
"url": "^0.11.0",
"vue-loader": "^17.1.1",
- "webpack": "^5.82.0",
+ "webpack": "^5.83.1",
"webpack-assets-manifest": "^5.1.0",
"webpack-cli": "^5.0.2",
- "webpack-dev-server": "^4.13.3",
+ "webpack-dev-server": "^4.15.0",
"webpack-merge": "^5.8.0",
"worker-loader": "^3.0.8"
}
@@ -2224,9 +2223,9 @@
}
},
"node_modules/@eslint-community/eslint-utils": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.3.0.tgz",
- "integrity": "sha512-v3oplH6FYCULtFuCeqyuTd9D2WKO937Dxdq+GmHOLL72TTRriLxz2VLlNfkZRsvj6PKnOPAtuT6dwrs/pA5DvA==",
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
+ "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==",
"dev": true,
"dependencies": {
"eslint-visitor-keys": "^3.3.0"
@@ -2239,23 +2238,23 @@
}
},
"node_modules/@eslint-community/regexpp": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.4.0.tgz",
- "integrity": "sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ==",
+ "version": "4.5.1",
+ "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz",
+ "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==",
"dev": true,
"engines": {
"node": "^12.0.0 || ^14.0.0 || >=16.0.0"
}
},
"node_modules/@eslint/eslintrc": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz",
- "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==",
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz",
+ "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==",
"dev": true,
"dependencies": {
"ajv": "^6.12.4",
"debug": "^4.3.2",
- "espree": "^9.5.1",
+ "espree": "^9.5.2",
"globals": "^13.19.0",
"ignore": "^5.2.0",
"import-fresh": "^3.2.1",
@@ -2286,9 +2285,9 @@
}
},
"node_modules/@eslint/js": {
- "version": "8.39.0",
- "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.39.0.tgz",
- "integrity": "sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng==",
+ "version": "8.40.0",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.40.0.tgz",
+ "integrity": "sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -2476,18 +2475,18 @@
}
},
"node_modules/@jridgewell/source-map": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz",
- "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==",
+ "version": "0.3.3",
+ "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.3.tgz",
+ "integrity": "sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==",
"dependencies": {
"@jridgewell/gen-mapping": "^0.3.0",
"@jridgewell/trace-mapping": "^0.3.9"
}
},
"node_modules/@jridgewell/source-map/node_modules/@jridgewell/gen-mapping": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz",
- "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==",
+ "version": "0.3.3",
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
+ "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
"dependencies": {
"@jridgewell/set-array": "^1.0.1",
"@jridgewell/sourcemap-codec": "^1.4.10",
@@ -3907,6 +3906,7 @@
"resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz",
"integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==",
"dev": true,
+ "peer": true,
"dependencies": {
"semver": "^7.0.0"
}
@@ -3916,6 +3916,7 @@
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
"integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
"dev": true,
+ "peer": true,
"dependencies": {
"lru-cache": "^6.0.0"
},
@@ -4426,15 +4427,15 @@
}
},
"node_modules/css-loader": {
- "version": "6.7.3",
- "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.7.3.tgz",
- "integrity": "sha512-qhOH1KlBMnZP8FzRO6YCH9UHXQhVMcEGLyNdb7Hv2cpcmJbW0YrddO+tG1ab5nT41KpHIYGsbeHqxB9xPu1pKQ==",
+ "version": "6.7.4",
+ "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.7.4.tgz",
+ "integrity": "sha512-0Y5uHtK5BswfaGJ+jrO+4pPg1msFBc0pwPIE1VqfpmVn6YbDfYfXMj8rfd7nt+4goAhJueO+H/I40VWJfcP1mQ==",
"dev": true,
"dependencies": {
"icss-utils": "^5.1.0",
- "postcss": "^8.4.19",
+ "postcss": "^8.4.21",
"postcss-modules-extract-imports": "^3.0.0",
- "postcss-modules-local-by-default": "^4.0.0",
+ "postcss-modules-local-by-default": "^4.0.1",
"postcss-modules-scope": "^3.0.0",
"postcss-modules-values": "^4.0.0",
"postcss-value-parser": "^4.2.0",
@@ -5391,9 +5392,9 @@
}
},
"node_modules/enhanced-resolve": {
- "version": "5.13.0",
- "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.13.0.tgz",
- "integrity": "sha512-eyV8f0y1+bzyfh8xAwW/WTSZpLbjhqc4ne9eGSH4Zo2ejdyiNG9pU6mf9DG8a7+Auk6MFTlNOT4Y2y/9k8GKVg==",
+ "version": "5.14.0",
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.14.0.tgz",
+ "integrity": "sha512-+DCows0XNwLDcUhbFJPdlQEVnT2zXlCv7hPxemTz86/O+B/hCQ+mb7ydkPKiflpVraqLPCAfu7lDy+hBXueojw==",
"dependencies": {
"graceful-fs": "^4.2.4",
"tapable": "^2.2.0"
@@ -5548,15 +5549,15 @@
}
},
"node_modules/eslint": {
- "version": "8.39.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.39.0.tgz",
- "integrity": "sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og==",
+ "version": "8.40.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.40.0.tgz",
+ "integrity": "sha512-bvR+TsP9EHL3TqNtj9sCNJVAFK3fBN8Q7g5waghxyRsPLIMwL73XSKnZFK0hk/O2ANC+iAoq6PWMQ+IfBAJIiQ==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.4.0",
- "@eslint/eslintrc": "^2.0.2",
- "@eslint/js": "8.39.0",
+ "@eslint/eslintrc": "^2.0.3",
+ "@eslint/js": "8.40.0",
"@humanwhocodes/config-array": "^0.11.8",
"@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8",
@@ -5567,8 +5568,8 @@
"doctrine": "^3.0.0",
"escape-string-regexp": "^4.0.0",
"eslint-scope": "^7.2.0",
- "eslint-visitor-keys": "^3.4.0",
- "espree": "^9.5.1",
+ "eslint-visitor-keys": "^3.4.1",
+ "espree": "^9.5.2",
"esquery": "^1.4.2",
"esutils": "^2.0.2",
"fast-deep-equal": "^3.1.3",
@@ -5693,6 +5694,7 @@
"resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz",
"integrity": "sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==",
"dev": true,
+ "peer": true,
"dependencies": {
"eslint-utils": "^2.0.0",
"regexpp": "^3.0.0"
@@ -5712,6 +5714,7 @@
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
"integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
"dev": true,
+ "peer": true,
"dependencies": {
"eslint-visitor-keys": "^1.1.0"
},
@@ -5727,6 +5730,7 @@
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
"integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
"dev": true,
+ "peer": true,
"engines": {
"node": ">=4"
}
@@ -5786,6 +5790,7 @@
"resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.7.0.tgz",
"integrity": "sha512-jDex9s7D/Qial8AGVIHq4W7NswpUD5DPDL2RH8Lzd9EloWUuvUkHfv4FRLMipH5q2UtyurorBkPeNi1wVWNh3Q==",
"dev": true,
+ "peer": true,
"dependencies": {
"builtins": "^5.0.1",
"eslint-plugin-es": "^4.1.0",
@@ -5807,10 +5812,11 @@
}
},
"node_modules/eslint-plugin-n/node_modules/semver": {
- "version": "7.3.8",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
- "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
+ "version": "7.5.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz",
+ "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==",
"dev": true,
+ "peer": true,
"dependencies": {
"lru-cache": "^6.0.0"
},
@@ -5920,9 +5926,9 @@
}
},
"node_modules/eslint-plugin-vue": {
- "version": "9.11.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.11.0.tgz",
- "integrity": "sha512-bBCJAZnkBV7ATH4Z1E7CvN3nmtS4H7QUU3UBxPdo8WohRU+yHjnQRALpTbxMVcz0e4Mx3IyxIdP5HYODMxK9cQ==",
+ "version": "9.13.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.13.0.tgz",
+ "integrity": "sha512-aBz9A8WB4wmpnVv0pYUt86cmH9EkcwWzgEwecBxMoRNhQjTL5i4sqadnwShv/hOdr8Hbl8XANGV7dtX9UQIAyA==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.3.0",
@@ -5930,7 +5936,7 @@
"nth-check": "^2.0.1",
"postcss-selector-parser": "^6.0.9",
"semver": "^7.3.5",
- "vue-eslint-parser": "^9.0.1",
+ "vue-eslint-parser": "^9.3.0",
"xml-name-validator": "^4.0.0"
},
"engines": {
@@ -5976,6 +5982,7 @@
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz",
"integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==",
"dev": true,
+ "peer": true,
"dependencies": {
"eslint-visitor-keys": "^2.0.0"
},
@@ -5994,14 +6001,15 @@
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz",
"integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==",
"dev": true,
+ "peer": true,
"engines": {
"node": ">=10"
}
},
"node_modules/eslint-visitor-keys": {
- "version": "3.4.0",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz",
- "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==",
+ "version": "3.4.1",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz",
+ "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -6108,14 +6116,14 @@
}
},
"node_modules/espree": {
- "version": "9.5.1",
- "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz",
- "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==",
+ "version": "9.5.2",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz",
+ "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==",
"dev": true,
"dependencies": {
"acorn": "^8.8.0",
"acorn-jsx": "^5.3.2",
- "eslint-visitor-keys": "^3.4.0"
+ "eslint-visitor-keys": "^3.4.1"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -7215,9 +7223,9 @@
}
},
"node_modules/is-core-module": {
- "version": "2.11.0",
- "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz",
- "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==",
+ "version": "2.12.1",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz",
+ "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==",
"dependencies": {
"has": "^1.0.3"
},
@@ -8024,9 +8032,9 @@
}
},
"node_modules/mini-css-extract-plugin": {
- "version": "2.7.5",
- "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.5.tgz",
- "integrity": "sha512-9HaR++0mlgom81s95vvNjxkg52n2b5s//3ZTI1EtzFb98awsLSivs2LMsVqnQ3ay0PVhqWcGNyDaTE961FOcjQ==",
+ "version": "2.7.6",
+ "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.6.tgz",
+ "integrity": "sha512-Qk7HcgaPkGG6eD77mLvZS1nmxlao3j+9PkrT9Uc7HAE1id3F41+DdBRYRYkbyfNRGzm8/YWtzhw7nVPmwhqTQw==",
"dev": true,
"dependencies": {
"schema-utils": "^4.0.0"
@@ -8604,9 +8612,9 @@
}
},
"node_modules/pinia": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.1.2.tgz",
- "integrity": "sha512-GNnd8V2NnSn5zZLb1xokH3nEMm8Tl/rvJduj/IMwWkUGsYPhnVyN92WIIxD59ZvnM+7EV28lXt5+NnYn1d81cg==",
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.1.3.tgz",
+ "integrity": "sha512-XNA/z/ye4P5rU1pieVmh0g/hSuDO98/a5UC8oSP0DNdvt6YtetJNHTrXwpwsQuflkGT34qKxAEcp7lSxXNjf/A==",
"dependencies": {
"@vue/devtools-api": "^6.5.0",
"vue-demi": ">=0.14.5"
@@ -9345,9 +9353,9 @@
}
},
"node_modules/postcss-modules-local-by-default": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz",
- "integrity": "sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==",
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.1.tgz",
+ "integrity": "sha512-Zr/dB+IlXaEqdoslLHhhqecwj73vc3rDmOpsBNBEVk7P2aqAlz+Ijy0fFbU5Ie9PtreDOIgGa9MsLWakVGl+fA==",
"dev": true,
"dependencies": {
"icss-utils": "^5.0.0",
@@ -10184,11 +10192,11 @@
"integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ=="
},
"node_modules/resolve": {
- "version": "1.22.1",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
- "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
+ "version": "1.22.2",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz",
+ "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==",
"dependencies": {
- "is-core-module": "^2.9.0",
+ "is-core-module": "^2.11.0",
"path-parse": "^1.0.7",
"supports-preserve-symlinks-flag": "^1.0.0"
},
@@ -10898,9 +10906,9 @@
}
},
"node_modules/style-loader": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.2.tgz",
- "integrity": "sha512-RHs/vcrKdQK8wZliteNK4NKzxvLBzpuHMqYmUVWeKa6MkaIQ97ZTOS0b+zapZhy6GcrgWnvWYCMHRirC3FsUmw==",
+ "version": "3.3.3",
+ "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.3.tgz",
+ "integrity": "sha512-53BiGLXAcll9maCYtZi2RCQZKa8NQQai5C4horqKyRmHj9H7QmcUyucrH+4KW/gBQbXM2AsB0axoEcFZPlfPcw==",
"dev": true,
"engines": {
"node": ">= 12.13.0"
@@ -11054,9 +11062,9 @@
}
},
"node_modules/terser": {
- "version": "5.16.6",
- "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.6.tgz",
- "integrity": "sha512-IBZ+ZQIA9sMaXmRZCUMDjNH0D5AQQfdn4WUjHL0+1lF4TP1IHRJbrhb6fNaXWikrYQTSkb7SLxkeXAiy1p7mbg==",
+ "version": "5.17.4",
+ "resolved": "https://registry.npmjs.org/terser/-/terser-5.17.4.tgz",
+ "integrity": "sha512-jcEKZw6UPrgugz/0Tuk/PVyLAPfMBJf5clnGueo45wTweoV8yh7Q7PEkhkJ5uuUbC7zAxEcG3tqNr1bstkQ8nw==",
"dependencies": {
"@jridgewell/source-map": "^0.3.2",
"acorn": "^8.5.0",
@@ -11071,15 +11079,15 @@
}
},
"node_modules/terser-webpack-plugin": {
- "version": "5.3.7",
- "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.7.tgz",
- "integrity": "sha512-AfKwIktyP7Cu50xNjXF/6Qb5lBNzYaWpU6YfoX3uZicTx0zTy0stDDCsvjDapKsSDvOeWo5MEq4TmdBy2cNoHw==",
+ "version": "5.3.9",
+ "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz",
+ "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==",
"dependencies": {
"@jridgewell/trace-mapping": "^0.3.17",
"jest-worker": "^27.4.5",
"schema-utils": "^3.1.1",
"serialize-javascript": "^6.0.1",
- "terser": "^5.16.5"
+ "terser": "^5.16.8"
},
"engines": {
"node": ">= 10.13.0"
@@ -11457,9 +11465,9 @@
}
},
"node_modules/vue-eslint-parser": {
- "version": "9.1.0",
- "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.1.0.tgz",
- "integrity": "sha512-NGn/iQy8/Wb7RrRa4aRkokyCZfOUWk19OP5HP6JEozQFX5AoS/t+Z0ZN7FY4LlmWc4FNI922V7cvX28zctN8dQ==",
+ "version": "9.3.0",
+ "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.3.0.tgz",
+ "integrity": "sha512-48IxT9d0+wArT1+3wNIy0tascRoywqSUe2E1YalIC1L8jsUGe5aJQItWfRok7DVFGz3UYvzEI7n5wiTXsCMAcQ==",
"dev": true,
"dependencies": {
"debug": "^4.3.4",
@@ -11481,9 +11489,9 @@
}
},
"node_modules/vue-eslint-parser/node_modules/semver": {
- "version": "7.3.7",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
- "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
+ "version": "7.5.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz",
+ "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==",
"dev": true,
"dependencies": {
"lru-cache": "^6.0.0"
@@ -11702,9 +11710,9 @@
"optional": true
},
"node_modules/webpack": {
- "version": "5.82.0",
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.82.0.tgz",
- "integrity": "sha512-iGNA2fHhnDcV1bONdUu554eZx+XeldsaeQ8T67H6KKHl2nUSwX8Zm7cmzOA46ox/X1ARxf7Bjv8wQ/HsB5fxBg==",
+ "version": "5.83.1",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.83.1.tgz",
+ "integrity": "sha512-TNsG9jDScbNuB+Lb/3+vYolPplCS3bbEaJf+Bj0Gw4DhP3ioAflBb1flcRt9zsWITyvOhM96wMQNRWlSX52DgA==",
"dependencies": {
"@types/eslint-scope": "^3.7.3",
"@types/estree": "^1.0.0",
@@ -11715,7 +11723,7 @@
"acorn-import-assertions": "^1.7.6",
"browserslist": "^4.14.5",
"chrome-trace-event": "^1.0.2",
- "enhanced-resolve": "^5.13.0",
+ "enhanced-resolve": "^5.14.0",
"es-module-lexer": "^1.2.1",
"eslint-scope": "5.1.1",
"events": "^3.2.0",
@@ -11923,9 +11931,9 @@
}
},
"node_modules/webpack-dev-server": {
- "version": "4.13.3",
- "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.13.3.tgz",
- "integrity": "sha512-KqqzrzMRSRy5ePz10VhjyL27K2dxqwXQLP5rAKwRJBPUahe7Z2bBWzHw37jeb8GCPKxZRO79ZdQUAPesMh/Nug==",
+ "version": "4.15.0",
+ "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.0.tgz",
+ "integrity": "sha512-HmNB5QeSl1KpulTBQ8UT4FPrByYyaLxpJoQ0+s7EvUrMc16m0ZS1sgb1XGqzmgCPk0c9y+aaXxn11tbLzuM7NQ==",
"dependencies": {
"@types/bonjour": "^3.5.9",
"@types/connect-history-api-fallback": "^1.3.5",
@@ -13580,29 +13588,29 @@
"integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw=="
},
"@eslint-community/eslint-utils": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.3.0.tgz",
- "integrity": "sha512-v3oplH6FYCULtFuCeqyuTd9D2WKO937Dxdq+GmHOLL72TTRriLxz2VLlNfkZRsvj6PKnOPAtuT6dwrs/pA5DvA==",
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
+ "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==",
"dev": true,
"requires": {
"eslint-visitor-keys": "^3.3.0"
}
},
"@eslint-community/regexpp": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.4.0.tgz",
- "integrity": "sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ==",
+ "version": "4.5.1",
+ "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz",
+ "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==",
"dev": true
},
"@eslint/eslintrc": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz",
- "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==",
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz",
+ "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==",
"dev": true,
"requires": {
"ajv": "^6.12.4",
"debug": "^4.3.2",
- "espree": "^9.5.1",
+ "espree": "^9.5.2",
"globals": "^13.19.0",
"ignore": "^5.2.0",
"import-fresh": "^3.2.1",
@@ -13623,9 +13631,9 @@
}
},
"@eslint/js": {
- "version": "8.39.0",
- "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.39.0.tgz",
- "integrity": "sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng==",
+ "version": "8.40.0",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.40.0.tgz",
+ "integrity": "sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA==",
"dev": true
},
"@geoman-io/leaflet-geoman-free": {
@@ -13763,18 +13771,18 @@
"integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw=="
},
"@jridgewell/source-map": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz",
- "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==",
+ "version": "0.3.3",
+ "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.3.tgz",
+ "integrity": "sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==",
"requires": {
"@jridgewell/gen-mapping": "^0.3.0",
"@jridgewell/trace-mapping": "^0.3.9"
},
"dependencies": {
"@jridgewell/gen-mapping": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz",
- "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==",
+ "version": "0.3.3",
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
+ "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
"requires": {
"@jridgewell/set-array": "^1.0.1",
"@jridgewell/sourcemap-codec": "^1.4.10",
@@ -14940,6 +14948,7 @@
"resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz",
"integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==",
"dev": true,
+ "peer": true,
"requires": {
"semver": "^7.0.0"
},
@@ -14949,6 +14958,7 @@
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
"integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
"dev": true,
+ "peer": true,
"requires": {
"lru-cache": "^6.0.0"
}
@@ -15302,15 +15312,15 @@
}
},
"css-loader": {
- "version": "6.7.3",
- "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.7.3.tgz",
- "integrity": "sha512-qhOH1KlBMnZP8FzRO6YCH9UHXQhVMcEGLyNdb7Hv2cpcmJbW0YrddO+tG1ab5nT41KpHIYGsbeHqxB9xPu1pKQ==",
+ "version": "6.7.4",
+ "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.7.4.tgz",
+ "integrity": "sha512-0Y5uHtK5BswfaGJ+jrO+4pPg1msFBc0pwPIE1VqfpmVn6YbDfYfXMj8rfd7nt+4goAhJueO+H/I40VWJfcP1mQ==",
"dev": true,
"requires": {
"icss-utils": "^5.1.0",
- "postcss": "^8.4.19",
+ "postcss": "^8.4.21",
"postcss-modules-extract-imports": "^3.0.0",
- "postcss-modules-local-by-default": "^4.0.0",
+ "postcss-modules-local-by-default": "^4.0.1",
"postcss-modules-scope": "^3.0.0",
"postcss-modules-values": "^4.0.0",
"postcss-value-parser": "^4.2.0",
@@ -15975,9 +15985,9 @@
"integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w=="
},
"enhanced-resolve": {
- "version": "5.13.0",
- "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.13.0.tgz",
- "integrity": "sha512-eyV8f0y1+bzyfh8xAwW/WTSZpLbjhqc4ne9eGSH4Zo2ejdyiNG9pU6mf9DG8a7+Auk6MFTlNOT4Y2y/9k8GKVg==",
+ "version": "5.14.0",
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.14.0.tgz",
+ "integrity": "sha512-+DCows0XNwLDcUhbFJPdlQEVnT2zXlCv7hPxemTz86/O+B/hCQ+mb7ydkPKiflpVraqLPCAfu7lDy+hBXueojw==",
"requires": {
"graceful-fs": "^4.2.4",
"tapable": "^2.2.0"
@@ -16096,15 +16106,15 @@
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="
},
"eslint": {
- "version": "8.39.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.39.0.tgz",
- "integrity": "sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og==",
+ "version": "8.40.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.40.0.tgz",
+ "integrity": "sha512-bvR+TsP9EHL3TqNtj9sCNJVAFK3fBN8Q7g5waghxyRsPLIMwL73XSKnZFK0hk/O2ANC+iAoq6PWMQ+IfBAJIiQ==",
"dev": true,
"requires": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.4.0",
- "@eslint/eslintrc": "^2.0.2",
- "@eslint/js": "8.39.0",
+ "@eslint/eslintrc": "^2.0.3",
+ "@eslint/js": "8.40.0",
"@humanwhocodes/config-array": "^0.11.8",
"@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8",
@@ -16115,8 +16125,8 @@
"doctrine": "^3.0.0",
"escape-string-regexp": "^4.0.0",
"eslint-scope": "^7.2.0",
- "eslint-visitor-keys": "^3.4.0",
- "espree": "^9.5.1",
+ "eslint-visitor-keys": "^3.4.1",
+ "espree": "^9.5.2",
"esquery": "^1.4.2",
"esutils": "^2.0.2",
"fast-deep-equal": "^3.1.3",
@@ -16270,6 +16280,7 @@
"resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz",
"integrity": "sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==",
"dev": true,
+ "peer": true,
"requires": {
"eslint-utils": "^2.0.0",
"regexpp": "^3.0.0"
@@ -16280,6 +16291,7 @@
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
"integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
"dev": true,
+ "peer": true,
"requires": {
"eslint-visitor-keys": "^1.1.0"
}
@@ -16288,7 +16300,8 @@
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
"integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
- "dev": true
+ "dev": true,
+ "peer": true
}
}
},
@@ -16340,6 +16353,7 @@
"resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.7.0.tgz",
"integrity": "sha512-jDex9s7D/Qial8AGVIHq4W7NswpUD5DPDL2RH8Lzd9EloWUuvUkHfv4FRLMipH5q2UtyurorBkPeNi1wVWNh3Q==",
"dev": true,
+ "peer": true,
"requires": {
"builtins": "^5.0.1",
"eslint-plugin-es": "^4.1.0",
@@ -16352,10 +16366,11 @@
},
"dependencies": {
"semver": {
- "version": "7.3.8",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
- "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
+ "version": "7.5.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz",
+ "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==",
"dev": true,
+ "peer": true,
"requires": {
"lru-cache": "^6.0.0"
}
@@ -16418,9 +16433,9 @@
"requires": {}
},
"eslint-plugin-vue": {
- "version": "9.11.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.11.0.tgz",
- "integrity": "sha512-bBCJAZnkBV7ATH4Z1E7CvN3nmtS4H7QUU3UBxPdo8WohRU+yHjnQRALpTbxMVcz0e4Mx3IyxIdP5HYODMxK9cQ==",
+ "version": "9.13.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.13.0.tgz",
+ "integrity": "sha512-aBz9A8WB4wmpnVv0pYUt86cmH9EkcwWzgEwecBxMoRNhQjTL5i4sqadnwShv/hOdr8Hbl8XANGV7dtX9UQIAyA==",
"dev": true,
"requires": {
"@eslint-community/eslint-utils": "^4.3.0",
@@ -16428,7 +16443,7 @@
"nth-check": "^2.0.1",
"postcss-selector-parser": "^6.0.9",
"semver": "^7.3.5",
- "vue-eslint-parser": "^9.0.1",
+ "vue-eslint-parser": "^9.3.0",
"xml-name-validator": "^4.0.0"
},
"dependencies": {
@@ -16458,6 +16473,7 @@
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz",
"integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==",
"dev": true,
+ "peer": true,
"requires": {
"eslint-visitor-keys": "^2.0.0"
},
@@ -16466,25 +16482,26 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz",
"integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==",
- "dev": true
+ "dev": true,
+ "peer": true
}
}
},
"eslint-visitor-keys": {
- "version": "3.4.0",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz",
- "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==",
+ "version": "3.4.1",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz",
+ "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==",
"dev": true
},
"espree": {
- "version": "9.5.1",
- "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz",
- "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==",
+ "version": "9.5.2",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz",
+ "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==",
"dev": true,
"requires": {
"acorn": "^8.8.0",
"acorn-jsx": "^5.3.2",
- "eslint-visitor-keys": "^3.4.0"
+ "eslint-visitor-keys": "^3.4.1"
}
},
"esquery": {
@@ -17293,9 +17310,9 @@
"dev": true
},
"is-core-module": {
- "version": "2.11.0",
- "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz",
- "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==",
+ "version": "2.12.1",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz",
+ "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==",
"requires": {
"has": "^1.0.3"
}
@@ -17869,9 +17886,9 @@
"optional": true
},
"mini-css-extract-plugin": {
- "version": "2.7.5",
- "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.5.tgz",
- "integrity": "sha512-9HaR++0mlgom81s95vvNjxkg52n2b5s//3ZTI1EtzFb98awsLSivs2LMsVqnQ3ay0PVhqWcGNyDaTE961FOcjQ==",
+ "version": "2.7.6",
+ "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.6.tgz",
+ "integrity": "sha512-Qk7HcgaPkGG6eD77mLvZS1nmxlao3j+9PkrT9Uc7HAE1id3F41+DdBRYRYkbyfNRGzm8/YWtzhw7nVPmwhqTQw==",
"dev": true,
"requires": {
"schema-utils": "^4.0.0"
@@ -18272,9 +18289,9 @@
"dev": true
},
"pinia": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.1.2.tgz",
- "integrity": "sha512-GNnd8V2NnSn5zZLb1xokH3nEMm8Tl/rvJduj/IMwWkUGsYPhnVyN92WIIxD59ZvnM+7EV28lXt5+NnYn1d81cg==",
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.1.3.tgz",
+ "integrity": "sha512-XNA/z/ye4P5rU1pieVmh0g/hSuDO98/a5UC8oSP0DNdvt6YtetJNHTrXwpwsQuflkGT34qKxAEcp7lSxXNjf/A==",
"requires": {
"@vue/devtools-api": "^6.5.0",
"vue-demi": ">=0.14.5"
@@ -18689,9 +18706,9 @@
"requires": {}
},
"postcss-modules-local-by-default": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz",
- "integrity": "sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==",
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.1.tgz",
+ "integrity": "sha512-Zr/dB+IlXaEqdoslLHhhqecwj73vc3rDmOpsBNBEVk7P2aqAlz+Ijy0fFbU5Ie9PtreDOIgGa9MsLWakVGl+fA==",
"dev": true,
"requires": {
"icss-utils": "^5.0.0",
@@ -19246,11 +19263,11 @@
"integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ=="
},
"resolve": {
- "version": "1.22.1",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
- "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
+ "version": "1.22.2",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz",
+ "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==",
"requires": {
- "is-core-module": "^2.9.0",
+ "is-core-module": "^2.11.0",
"path-parse": "^1.0.7",
"supports-preserve-symlinks-flag": "^1.0.0"
}
@@ -19767,9 +19784,9 @@
"dev": true
},
"style-loader": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.2.tgz",
- "integrity": "sha512-RHs/vcrKdQK8wZliteNK4NKzxvLBzpuHMqYmUVWeKa6MkaIQ97ZTOS0b+zapZhy6GcrgWnvWYCMHRirC3FsUmw==",
+ "version": "3.3.3",
+ "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.3.tgz",
+ "integrity": "sha512-53BiGLXAcll9maCYtZi2RCQZKa8NQQai5C4horqKyRmHj9H7QmcUyucrH+4KW/gBQbXM2AsB0axoEcFZPlfPcw==",
"dev": true,
"requires": {}
},
@@ -19862,9 +19879,9 @@
}
},
"terser": {
- "version": "5.16.6",
- "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.6.tgz",
- "integrity": "sha512-IBZ+ZQIA9sMaXmRZCUMDjNH0D5AQQfdn4WUjHL0+1lF4TP1IHRJbrhb6fNaXWikrYQTSkb7SLxkeXAiy1p7mbg==",
+ "version": "5.17.4",
+ "resolved": "https://registry.npmjs.org/terser/-/terser-5.17.4.tgz",
+ "integrity": "sha512-jcEKZw6UPrgugz/0Tuk/PVyLAPfMBJf5clnGueo45wTweoV8yh7Q7PEkhkJ5uuUbC7zAxEcG3tqNr1bstkQ8nw==",
"requires": {
"@jridgewell/source-map": "^0.3.2",
"acorn": "^8.5.0",
@@ -19880,15 +19897,15 @@
}
},
"terser-webpack-plugin": {
- "version": "5.3.7",
- "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.7.tgz",
- "integrity": "sha512-AfKwIktyP7Cu50xNjXF/6Qb5lBNzYaWpU6YfoX3uZicTx0zTy0stDDCsvjDapKsSDvOeWo5MEq4TmdBy2cNoHw==",
+ "version": "5.3.9",
+ "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz",
+ "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==",
"requires": {
"@jridgewell/trace-mapping": "^0.3.17",
"jest-worker": "^27.4.5",
"schema-utils": "^3.1.1",
"serialize-javascript": "^6.0.1",
- "terser": "^5.16.5"
+ "terser": "^5.16.8"
},
"dependencies": {
"schema-utils": {
@@ -20150,9 +20167,9 @@
}
},
"vue-eslint-parser": {
- "version": "9.1.0",
- "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.1.0.tgz",
- "integrity": "sha512-NGn/iQy8/Wb7RrRa4aRkokyCZfOUWk19OP5HP6JEozQFX5AoS/t+Z0ZN7FY4LlmWc4FNI922V7cvX28zctN8dQ==",
+ "version": "9.3.0",
+ "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.3.0.tgz",
+ "integrity": "sha512-48IxT9d0+wArT1+3wNIy0tascRoywqSUe2E1YalIC1L8jsUGe5aJQItWfRok7DVFGz3UYvzEI7n5wiTXsCMAcQ==",
"dev": true,
"requires": {
"debug": "^4.3.4",
@@ -20165,9 +20182,9 @@
},
"dependencies": {
"semver": {
- "version": "7.3.7",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
- "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
+ "version": "7.5.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz",
+ "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==",
"dev": true,
"requires": {
"lru-cache": "^6.0.0"
@@ -20334,9 +20351,9 @@
"optional": true
},
"webpack": {
- "version": "5.82.0",
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.82.0.tgz",
- "integrity": "sha512-iGNA2fHhnDcV1bONdUu554eZx+XeldsaeQ8T67H6KKHl2nUSwX8Zm7cmzOA46ox/X1ARxf7Bjv8wQ/HsB5fxBg==",
+ "version": "5.83.1",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.83.1.tgz",
+ "integrity": "sha512-TNsG9jDScbNuB+Lb/3+vYolPplCS3bbEaJf+Bj0Gw4DhP3ioAflBb1flcRt9zsWITyvOhM96wMQNRWlSX52DgA==",
"requires": {
"@types/eslint-scope": "^3.7.3",
"@types/estree": "^1.0.0",
@@ -20347,7 +20364,7 @@
"acorn-import-assertions": "^1.7.6",
"browserslist": "^4.14.5",
"chrome-trace-event": "^1.0.2",
- "enhanced-resolve": "^5.13.0",
+ "enhanced-resolve": "^5.14.0",
"es-module-lexer": "^1.2.1",
"eslint-scope": "5.1.1",
"events": "^3.2.0",
@@ -20499,9 +20516,9 @@
}
},
"webpack-dev-server": {
- "version": "4.13.3",
- "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.13.3.tgz",
- "integrity": "sha512-KqqzrzMRSRy5ePz10VhjyL27K2dxqwXQLP5rAKwRJBPUahe7Z2bBWzHw37jeb8GCPKxZRO79ZdQUAPesMh/Nug==",
+ "version": "4.15.0",
+ "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.0.tgz",
+ "integrity": "sha512-HmNB5QeSl1KpulTBQ8UT4FPrByYyaLxpJoQ0+s7EvUrMc16m0ZS1sgb1XGqzmgCPk0c9y+aaXxn11tbLzuM7NQ==",
"requires": {
"@types/bonjour": "^3.5.9",
"@types/connect-history-api-fallback": "^1.3.5",
diff --git a/package.json b/package.json
index 2a32a37828..f5c86aee72 100644
--- a/package.json
+++ b/package.json
@@ -19,7 +19,7 @@
"marked": "^5.0.2",
"parse-dms": "0.0.5",
"pdfjs-dist": "3.6.172",
- "pinia": "^2.1.2",
+ "pinia": "^2.1.3",
"qs": "^6.11.2",
"shakapacker": "6.6.0",
"v-hotkey": "^0.9.0",
@@ -49,18 +49,17 @@
"@vue/compiler-sfc": "^3.3.4",
"babel-loader": "^9.1.2",
"compression-webpack-plugin": "^10.0.0",
- "css-loader": "^6.7.3",
+ "css-loader": "^6.7.4",
"css-minimizer-webpack-plugin": "^5.0.0",
- "eslint": "^8.39.0",
+ "eslint": "^8.40.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.27.5",
- "eslint-plugin-n": "^15.7.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-standard": "^4.1.0",
- "eslint-plugin-vue": "^9.11.0",
- "mini-css-extract-plugin": "^2.7.5",
+ "eslint-plugin-vue": "^9.13.0",
+ "mini-css-extract-plugin": "^2.7.6",
"postcss": "^8.4.23",
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-import": "^15.1.0",
@@ -70,16 +69,16 @@
"resolve-url-loader": "^5.0.0",
"sass": "^1.62.1",
"sass-loader": "^13.2.2",
- "style-loader": "^3.3.2",
+ "style-loader": "^3.3.3",
"stylus": "^0.59.0",
"stylus-loader": "^7.1.0",
- "terser-webpack-plugin": "^5.3.7",
+ "terser-webpack-plugin": "^5.3.9",
"url": "^0.11.0",
"vue-loader": "^17.1.1",
- "webpack": "^5.82.0",
+ "webpack": "^5.83.1",
"webpack-assets-manifest": "^5.1.0",
"webpack-cli": "^5.0.2",
- "webpack-dev-server": "^4.13.3",
+ "webpack-dev-server": "^4.15.0",
"webpack-merge": "^5.8.0",
"worker-loader": "^3.0.8"
}
From 27db39eacadea282e71dcd8dc74dc12bdefe81a1 Mon Sep 17 00:00:00 2001
From: jlpereira
Date: Fri, 19 May 2023 11:58:11 -0300
Subject: [PATCH 85/88] Fix shortcut
---
app/assets/javascripts/workbench/keyboard.js | 105 +++++++++++++------
1 file changed, 72 insertions(+), 33 deletions(-)
diff --git a/app/assets/javascripts/workbench/keyboard.js b/app/assets/javascripts/workbench/keyboard.js
index 04494e10a5..1ce0db6a00 100644
--- a/app/assets/javascripts/workbench/keyboard.js
+++ b/app/assets/javascripts/workbench/keyboard.js
@@ -16,11 +16,10 @@ TW.workbench = TW.workbench || {}
TW.workbench.keyboard = TW.workbench.keyboard || {}
Object.assign(TW.workbench.keyboard, {
-
keyCode: ['UP', 'DOWN', 'LEFT', 'RIGHT', 'COMMAND'],
keyCodeReplace: ['↑', '↓', '←', '→', '⌘'],
- init_keyShortcuts () {
+ init_keyShortcuts() {
const keyboardTable = document.querySelector('#keyShortcuts')
if (keyboardTable) {
@@ -40,14 +39,32 @@ Object.assign(TW.workbench.keyboard, {
this.handleEvents()
},
- generalShortcuts () {
- const platformKey = (navigator.platform.indexOf('Mac') > -1 ? 'ctrl' : 'alt')
-
- this.createLegend(`${platformKey}+h`, 'Go to hub', 'General shortcuts', true)
- this.createLegend(`${platformKey}+?`, 'Show/hide help', 'General shortcuts', true)
+ generalShortcuts() {
+ const platformKey = navigator.platform.indexOf('Mac') > -1 ? 'ctrl' : 'alt'
+
+ this.createShortcut(
+ `${platformKey}+h`,
+ 'Go to hub',
+ 'General shortcuts',
+ function () {
+ const element = document.querySelector('.hub_project_name')
+ element.click()
+ },
+ true
+ )
+ this.createShortcut(
+ `${platformKey}+?`,
+ 'Show/hide help',
+ 'General shortcuts',
+ function () {
+ const element = document.querySelector('.help-button')
+ element.click()
+ },
+ true
+ )
},
- createTable () {
+ createTable() {
const divContainer = document.createElement('div')
divContainer.id = 'keyShortcuts'
@@ -73,15 +90,20 @@ Object.assign(TW.workbench.keyboard, {
return divContainer
},
- createShortcut (key, description, section, func, isLeft = false) {
- const legendElement = this.createLegendElement(key, description, section, isLeft)
+ createShortcut(key, description, section, func, isLeft = false) {
+ const legendElement = this.createLegendElement(
+ key,
+ description,
+ section,
+ isLeft
+ )
- function customFunction (event) {
+ function customFunction(event) {
event.preventDefault()
func(event)
}
- Mousetrap.bind(key, customFunction)
+ Mousetrap.bind(key, customFunction)
document.body.append(legendElement)
},
@@ -97,8 +119,13 @@ Object.assign(TW.workbench.keyboard, {
return legendElement
},
- createLegend (key, description, section, isLeft = false) {
- const legendElement = this.createLegendElement(key, description, section, isLeft)
+ createLegend(key, description, section, isLeft = false) {
+ const legendElement = this.createLegendElement(
+ key,
+ description,
+ section,
+ isLeft
+ )
document.body.append(legendElement)
if (!this.isShortcutInTable(key)) {
@@ -106,27 +133,34 @@ Object.assign(TW.workbench.keyboard, {
}
},
- fillTable () {
- document.querySelectorAll('[data-shortcut-key]').forEach(element => {
+ fillTable() {
+ document.querySelectorAll('[data-shortcut-key]').forEach((element) => {
const key = element.getAttribute('data-shortcut-key')
if (!this.isShortcutInTable(key)) {
- TW.workbench.keyboard.addNewShortcut(TW.workbench.keyboard.checkReplaceKeyCode(element))
+ TW.workbench.keyboard.addNewShortcut(
+ TW.workbench.keyboard.checkReplaceKeyCode(element)
+ )
}
})
},
- checkReplaceKeyCode (element) {
+ checkReplaceKeyCode(element) {
const shortcut = element.getAttribute('data-shortcut-key').toUpperCase()
- const index = TW.workbench.keyboard.keyCode.findIndex(item => item === shortcut)
+ const index = TW.workbench.keyboard.keyCode.findIndex(
+ (item) => item === shortcut
+ )
if (index > -1) {
- element.setAttribute('data-shortcut-key', TW.workbench.keyboard.keyCodeReplace[index])
+ element.setAttribute(
+ 'data-shortcut-key',
+ TW.workbench.keyboard.keyCodeReplace[index]
+ )
}
return element
},
- createSection (name) {
+ createSection(name) {
const theadElement = document.createElement('thead')
const tbodyElement = document.createElement('tbody')
const columnName = document.createElement('th')
@@ -140,7 +174,7 @@ Object.assign(TW.workbench.keyboard, {
return [theadElement, tbodyElement]
},
- addRowShortcut (shortcutKey, description) {
+ addRowShortcut(shortcutKey, description) {
const rowElement = document.createElement('tr')
const shortcutColumn = document.createElement('td')
const descriptionColumn = document.createElement('td')
@@ -158,42 +192,47 @@ Object.assign(TW.workbench.keyboard, {
return rowElement
},
- isShortcutInTable (shortcutKey) {
+ isShortcutInTable(shortcutKey) {
return document.querySelector(`[data-table-shortcut-key="${shortcutKey}"]`)
},
- addNewShortcut (element) {
+ addNewShortcut(element) {
const sectionName = element.getAttribute('data-shortcut-section')
const shortcutKey = element.getAttribute('data-shortcut-key')
- const shortcutDescription = element.getAttribute('data-shortcut-description')
+ const shortcutDescription = element.getAttribute(
+ 'data-shortcut-description'
+ )
const isLeftTable = element.getAttribute('data-shortcut-left') === 'true'
const queryString = `.list table tbody[data-shortcut-section="${sectionName}"`
- const tableClass = isLeftTable
- ? '.page-default'
- : '.page-shortcuts'
+ const tableClass = isLeftTable ? '.page-default' : '.page-shortcuts'
let sectionElement = this.keyShortcutElement.querySelector(queryString)
if (!sectionElement) {
- this.keyShortcutElement.querySelector(`.list ${tableClass} table`).append(...this.createSection(sectionName))
+ this.keyShortcutElement
+ .querySelector(`.list ${tableClass} table`)
+ .append(...this.createSection(sectionName))
sectionElement = this.keyShortcutElement.querySelector(queryString)
}
sectionElement.append(this.addRowShortcut(shortcutKey, shortcutDescription))
},
- openViewPanel () {
+ openViewPanel() {
this.keyShortcutsPanel.classList.add('active')
},
- closeViewPanel () {
+ closeViewPanel() {
this.keyShortcutsPanel.classList.remove('active')
},
- handleEvents () {
+ handleEvents() {
this.legendLink.addEventListener('click', this.openViewPanel.bind(this))
this.btnClose.addEventListener('click', this.closeViewPanel.bind(this))
- this.helpBackground.addEventListener('click', this.closeViewPanel.bind(this))
+ this.helpBackground.addEventListener(
+ 'click',
+ this.closeViewPanel.bind(this)
+ )
}
})
From ee99308400d23b448b1d76b602a3ea9a9e61d06e Mon Sep 17 00:00:00 2001
From: mjy
Date: Fri, 19 May 2023 10:03:33 -0500
Subject: [PATCH 86/88] Fix OtuRelationship constant. Add more boolean facets.
---
.../filter/components/FilterView.vue | 6 +++---
.../tasks/collecting_events/filter/components/Filter.vue | 8 ++++++--
.../collection_objects/filter/components/filter.vue | 9 ++++++---
.../vue/tasks/contents/filter/components/FilterView.vue | 2 +-
.../tasks/nomenclature/filter/components/FilterView.vue | 4 ++++
.../tasks/observations/filter/components/FilterView.vue | 6 +++++-
.../vue/tasks/otu/filter/components/FilterView.vue | 1 +
lib/queries/concerns/depictions.rb | 6 +++---
8 files changed, 29 insertions(+), 13 deletions(-)
diff --git a/app/javascript/vue/tasks/biological_associations/filter/components/FilterView.vue b/app/javascript/vue/tasks/biological_associations/filter/components/FilterView.vue
index 98fbde1773..7406677cd4 100644
--- a/app/javascript/vue/tasks/biological_associations/filter/components/FilterView.vue
+++ b/app/javascript/vue/tasks/biological_associations/filter/components/FilterView.vue
@@ -62,11 +62,11 @@ import { computed } from 'vue'
const WITH_PARAMS = [
'citations',
-'origin_citation',
-'depictions',
'data_depictions',
+'depictions',
'notes',
-'tags'
+'origin_citation',
+'tags',
]
const props = defineProps({
diff --git a/app/javascript/vue/tasks/collecting_events/filter/components/Filter.vue b/app/javascript/vue/tasks/collecting_events/filter/components/Filter.vue
index 9e6ddef0e4..b2ccab3db8 100644
--- a/app/javascript/vue/tasks/collecting_events/filter/components/Filter.vue
+++ b/app/javascript/vue/tasks/collecting_events/filter/components/Filter.vue
@@ -65,13 +65,17 @@ const WITH_PARAMS = [
'collection_objects',
'collectors',
'data_attributes',
+ 'data_depictions',
'depictions',
'geographic_area',
'georeferences',
+ 'global_identifiers',
'identifiers',
'local_identifiers',
- 'global_identifiers',
- 'origin_citation'
+ 'notes',
+ 'origin_citation',
+ 'protocols',
+ 'tags',
]
const emit = defineEmits(['update:modelValue'])
diff --git a/app/javascript/vue/tasks/collection_objects/filter/components/filter.vue b/app/javascript/vue/tasks/collection_objects/filter/components/filter.vue
index 153da2ebf5..164193040d 100644
--- a/app/javascript/vue/tasks/collection_objects/filter/components/filter.vue
+++ b/app/javascript/vue/tasks/collection_objects/filter/components/filter.vue
@@ -78,24 +78,27 @@ const WITH_PARAMS = [
'collectors',
'current_repository',
'data_attributes',
+ 'data_depictions',
'dates',
'deaccessioned',
+ 'depictions',
'determiners',
'dwc_indexed',
'geographic_area',
'georeferences',
- 'depictions',
- 'local_identifiers',
'global_identifiers',
+ 'local_identifiers',
'notes',
'origin_citation',
'preparation_type',
+ 'protocols',
'repository',
+ 'tags',
'taxon_determinations',
'type_material',
'with_buffered_collecting_event',
'with_buffered_determinations',
- 'with_buffered_other_labels'
+ 'with_buffered_other_labels',
]
const emit = defineEmits(['update:modelValue'])
diff --git a/app/javascript/vue/tasks/contents/filter/components/FilterView.vue b/app/javascript/vue/tasks/contents/filter/components/FilterView.vue
index 2a8bd8c67a..76eec4a38d 100644
--- a/app/javascript/vue/tasks/contents/filter/components/FilterView.vue
+++ b/app/javascript/vue/tasks/contents/filter/components/FilterView.vue
@@ -34,7 +34,7 @@ import FacetNotes from 'components/Filter/Facets/shared/FacetNotes.vue'
import FacetParamExact from 'components/Filter/Facets/shared/FacetParamExact.vue'
import FacetOtu from 'components/Filter/Facets/Otu/FacetOtu.vue'
-const WITH_PARAMS = ['citations', 'origin_citation', 'images']
+const WITH_PARAMS = ['citations', 'origin_citation', 'depictions']
const props = defineProps({
modelValue: {
diff --git a/app/javascript/vue/tasks/nomenclature/filter/components/FilterView.vue b/app/javascript/vue/tasks/nomenclature/filter/components/FilterView.vue
index fc18c2e733..f1547a332c 100644
--- a/app/javascript/vue/tasks/nomenclature/filter/components/FilterView.vue
+++ b/app/javascript/vue/tasks/nomenclature/filter/components/FilterView.vue
@@ -87,7 +87,11 @@ const WITH_PARAMS = [
'citation_documents',
'combinations',
'data_attributes',
+ 'depictions',
+ 'data_depictions',
'etymology',
+ 'notes',
+ 'tags',
'leaves',
'not_specified',
'origin_citation',
diff --git a/app/javascript/vue/tasks/observations/filter/components/FilterView.vue b/app/javascript/vue/tasks/observations/filter/components/FilterView.vue
index 8411bd08bf..cad169903a 100644
--- a/app/javascript/vue/tasks/observations/filter/components/FilterView.vue
+++ b/app/javascript/vue/tasks/observations/filter/components/FilterView.vue
@@ -42,7 +42,11 @@ import FacetOtu from 'components/Filter/Facets/Otu/FacetOtu.vue'
import FacetObservationType from 'components/Filter/Facets/Observation/FacetObservationType.vue'
import FacetObservationObjectType from 'components/Filter/Facets/Observation/FacetObservationObjectType.vue'
-const WITH_PARAMS = ['depictions', 'notes']
+const WITH_PARAMS = [
+ 'depictions',
+ 'data_depictions',
+ 'notes'
+]
const props = defineProps({
modelValue: {
diff --git a/app/javascript/vue/tasks/otu/filter/components/FilterView.vue b/app/javascript/vue/tasks/otu/filter/components/FilterView.vue
index 3def2b8069..f39878a1c3 100644
--- a/app/javascript/vue/tasks/otu/filter/components/FilterView.vue
+++ b/app/javascript/vue/tasks/otu/filter/components/FilterView.vue
@@ -59,6 +59,7 @@ const WITH_PARAMS = [
'collection_objects',
'contents,',
'depictions',
+ 'data_depictions',
'determinations',
'observations',
'origin_citation',
diff --git a/lib/queries/concerns/depictions.rb b/lib/queries/concerns/depictions.rb
index c9aed910cf..fddbc68ee7 100644
--- a/lib/queries/concerns/depictions.rb
+++ b/lib/queries/concerns/depictions.rb
@@ -64,12 +64,12 @@ def depictions_facet
end
def data_depiction_facet
- return nil if depictions.blank?
+ return nil if data_depictions.blank?
if data_depictions
- referenced_klass.joins(:depictions).where(data_depictions: true).distinct
+ referenced_klass.joins(:depictions).where(depictions: {is_metadata_depiction: true}).distinct
else
a = referenced_klass.where.missing(:depictions)
- b = referenced_klass.joins(:depictions).where.not(depictions: {data_depiction: true})
+ b = referenced_klass.joins(:depictions).where.not(depictions: {is_metadata_depiction: true})
referenced_klass_union([a,b]).distinct
end
From 8a6bd7471ae7fc0a86d9b57020f6083e365a494a Mon Sep 17 00:00:00 2001
From: mjy
Date: Fri, 19 May 2023 10:05:07 -0500
Subject: [PATCH 87/88] Add image distinct clauses.
---
lib/queries/image/filter.rb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/queries/image/filter.rb b/lib/queries/image/filter.rb
index 3fa3755e48..db33b13015 100644
--- a/lib/queries/image/filter.rb
+++ b/lib/queries/image/filter.rb
@@ -409,9 +409,9 @@ def taxon_name_id_facet
if q1 && q2
::Image.from("((#{q1.to_sql}) UNION (#{q2.to_sql})) as images")
elsif q1
- q1
+ q1.distinct
else
- q2
+ q2.distinct
end
end
@@ -430,7 +430,7 @@ def query_facets_facet(name = nil)
.joins("JOIN #{n} as #{n}1 on depictions.depiction_object_id = #{n}1.id AND depictions.depiction_object_type = '#{name.treetop_camelize}'")
.to_sql
- ::Image.from('(' + s + ') as images')
+ ::Image.from('(' + s + ') as images').distinct
end
def merge_clauses
From efe8318cab8b5c1d42d992eeb5389934229ded6e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hern=C3=A1n=20Lucas=20Pereira?=
Date: Fri, 19 May 2023 13:23:16 -0300
Subject: [PATCH 88/88] Preparing for version 0.33.0 release [skip ci]
---
CHANGELOG.md | 8 +++++++-
lib/taxonworks/version.rb | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f0a47ae5df..36ce743da0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@ This project does not yet adheres to [Semantic Versioning](https://semv
## [unreleased]
+\-
+
+## [0.33.0] - 2023-05-19
+
### Added
- Basic RCC5 support (= OtuRelationship) [#257]
@@ -3626,7 +3630,9 @@ This project does not yet adheres to [Semantic Versioning](https://semv
- Loosing input page numbers when switching tabs on New Taxon Name task
[#1532]: https://github.com/SpeciesFileGroup/taxonworks/issues/1532
-[unreleased]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.32.3...development
+
+[unreleased]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.33.0...development
+[0.33.0]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.32.3...v0.33.0
[0.32.3]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.32.2...v0.32.3
[0.32.2]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.32.1...v0.32.2
[0.32.1]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.32.0...v0.32.1
diff --git a/lib/taxonworks/version.rb b/lib/taxonworks/version.rb
index b36349a7c4..29483df4c0 100644
--- a/lib/taxonworks/version.rb
+++ b/lib/taxonworks/version.rb
@@ -1,3 +1,3 @@
module Taxonworks
- VERSION = "0.32.3"
+ VERSION = "0.33.0"
end