diff --git a/Gemfile b/Gemfile index 148efc6d3..35fa6f955 100644 --- a/Gemfile +++ b/Gemfile @@ -66,7 +66,7 @@ gem 'scenic', '~> 1.4' gem 'sdoc', '~> 1.0', group: :doc gem 'silencer' # Silence certain Rails logs gem 'sneaky-save', git: 'https://github.com/einzige/sneaky-save' -gem 'turbolinks', '~> 5.1.1' +gem 'turbolinks', '~> 5.2.0' gem 'underscore-rails' gem 'wicked_pdf' diff --git a/Gemfile.lock b/Gemfile.lock index e67559ab1..79d648afd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -478,7 +478,7 @@ GEM pry (>= 0.10.4) psych (3.3.4) public_suffix (5.0.1) - puma (6.3.0) + puma (6.3.1) nio4r (~> 2.0) raabro (1.4.0) racc (1.7.1) @@ -644,8 +644,8 @@ GEM tilt (2.2.0) timecop (0.9.6) timeout (0.4.0) - turbolinks (5.1.1) - turbolinks-source (~> 5.1) + turbolinks (5.2.1) + turbolinks-source (~> 5.2) turbolinks-source (5.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) @@ -752,7 +752,7 @@ DEPENDENCIES puma rack-attack rack-cors - rails (~> 7.0.5.1) + rails (~> 7.0.5) rails-controller-testing rails_12factor rails_autolink (~> 1.1, >= 1.1.6) @@ -778,7 +778,7 @@ DEPENDENCIES sprockets-rails tailwindcss-rails (~> 2.0) timecop - turbolinks (~> 5.1.1) + turbolinks (~> 5.2.0) tzinfo-data uglifier (>= 1.3.0) underscore-rails diff --git a/app/assets/javascripts/application.js.erb b/app/assets/javascripts/application.js.erb index a95bcdcd8..232c61da7 100644 --- a/app/assets/javascripts/application.js.erb +++ b/app/assets/javascripts/application.js.erb @@ -1,5 +1,6 @@ // turbolinks MUST BE THE LAST inclusion +//= require moment //= require bootstrap-datetimepicker //= require bootstrap-colorselector //= require bootstrap-tagsinput.min diff --git a/app/assets/javascripts/jquery_bundle.js b/app/assets/javascripts/jquery_bundle.js index 0d50b3277..6a050fd23 100644 --- a/app/assets/javascripts/jquery_bundle.js +++ b/app/assets/javascripts/jquery_bundle.js @@ -1,2 +1 @@ - -//= require jquery.min +//= require jquery diff --git a/app/assets/javascripts/my_modules/results.js b/app/assets/javascripts/my_modules/results.js index 7f1202292..d08dac060 100644 --- a/app/assets/javascripts/my_modules/results.js +++ b/app/assets/javascripts/my_modules/results.js @@ -1,7 +1,8 @@ +/* eslint-disable no-unused-vars */ /* global Results ActiveStorage animateSpinner Comments ResultAssets FilePreviewModal TinyMCE getParam applyCreateWopiFileCallback initFormSubmitLinks textValidator - GLOBAL_CONSTANTS + GLOBAL_CONSTANTS ActiveStoragePreviews */ (function(global) { @@ -92,8 +93,9 @@ // Handle the error } else { let formData = new FormData(); + const assetId = form.find('#result_asset_attributes_id').val(); formData.append('result[name]', form.find('#result_name').val()); - formData.append('result[asset_attributes][id]', form.find('#result_asset_attributes_id').val()); + formData.append('result[asset_attributes][id]', assetId); formData.append('result[asset_attributes][signed_blob_id]', blob.signed_id); $.ajax({ @@ -102,7 +104,7 @@ data: formData, success: function(data) { animateSpinner(null, false); - $('.edit_result').parent().remove(); + $('.edit-result-asset').parent().remove(); $(data.html).prependTo('#results').promise().done(() => { $.each($('#results').find('.result'), function() { initFormSubmitLinks($(this)); @@ -113,13 +115,14 @@ ResultAssets.initNewResultAsset(); expandResult($(this)); }); + ActiveStoragePreviews.reloadPreview(`.asset[data-asset-id=${assetId}] .attachment-preview img`); }); $('#results-toolbar').show(); }, error: function(XHR) { animateSpinner(null, false); - $('.edit_result').renderFormErrors('result', XHR.responseJSON.errors); + $('.edit-result-asset').renderFormErrors('result', XHR.responseJSON.errors); }, processData: false, contentType: false diff --git a/app/assets/javascripts/navigation.js b/app/assets/javascripts/navigation.js index 9179dd5a3..baf922322 100644 --- a/app/assets/javascripts/navigation.js +++ b/app/assets/javascripts/navigation.js @@ -147,7 +147,6 @@ noRecentText.show(); } bindSystemNotificationAjax(); - SystemNotificationsMarkAsSeen(); } }); $('#count-system-notifications').hide(); diff --git a/app/assets/javascripts/projects/index.js b/app/assets/javascripts/projects/index.js index e9e194f0b..34df7ad5f 100644 --- a/app/assets/javascripts/projects/index.js +++ b/app/assets/javascripts/projects/index.js @@ -416,12 +416,12 @@ var ProjectsIndex = (function() { viewContainer.removeClass('no-results no-data'); viewContainer.find('.card, .projects-group, .no-results-container, .no-data-container').remove(); - if (viewContainer.find('.list').length) { + viewContainer.append(data.cards_html); + + if (viewContainer.hasClass('list')) { viewContainer.find('.table-header').show(); } - viewContainer.append(data.cards_html); - if (viewContainer.find('.no-results-container').length) { viewContainer.addClass('no-results'); } diff --git a/app/assets/javascripts/repositories/renderers/view_renderers.js b/app/assets/javascripts/repositories/renderers/view_renderers.js index b67fa7c29..364bf1aaf 100644 --- a/app/assets/javascripts/repositories/renderers/view_renderers.js +++ b/app/assets/javascripts/repositories/renderers/view_renderers.js @@ -5,7 +5,7 @@ $.fn.dataTable.render.RepositoryAssetValue = function(data) { if (asset.id) { return `
-
+ <%= form_with(model: @result, url: result_asset_path(format: :json), data: { remote: true }, html: { class: 'edit-result-asset' }) do |f| %> +
@@ -18,5 +21,4 @@ class: 'btn btn-primary save-result' %>
+
+
- <%= notification ? notification.modal_title.html_safe : '' %> -
-- <%= I18n.t("system_notifications.emails.intro_paragraph", user_name: @user.name) %> -
-- <%= link_to @system_notification.title.html_safe, system_notifications_url %> -
- -- <%= @system_notification.description.html_safe %> -
diff --git a/app/views/users/settings/teams/_destroy_modal.html.erb b/app/views/users/settings/teams/_destroy_modal.html.erb index cefc3b7ac..7b41326af 100644 --- a/app/views/users/settings/teams/_destroy_modal.html.erb +++ b/app/views/users/settings/teams/_destroy_modal.html.erb @@ -13,7 +13,7 @@ <%= t("users.settings.teams.edit.modal_destroy_team.message", team: team.name) %><%=t 'users.settings.teams.new.description_sublabel' %> diff --git a/app/views/users/settings/user_teams/_destroy_user_team_modal_body.html.erb b/app/views/users/settings/user_teams/_destroy_user_team_modal_body.html.erb index 104bf3bd1..fe336e059 100644 --- a/app/views/users/settings/user_teams/_destroy_user_team_modal_body.html.erb +++ b/app/views/users/settings/user_teams/_destroy_user_team_modal_body.html.erb @@ -1,8 +1,7 @@ <%= form_with model: user_assignment, url: destroy_user_team_path(user_assignment, format: :json), - data: { remote: true }, - method: :delete, - data: { id: 'destroy-user-team-form' } do |f| %> + data: { remote: true, id: 'destroy-user-team-form' }, + method: :delete do |f| %>
<%= t("users.settings.user_teams.destroy_uo_message", user: user_assignment.user.full_name, team: user_assignment.assignable.name) %>
diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index fb2e45779..03bf49a74 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -73,7 +73,6 @@ Rails.application.config.assets.precompile += %w(jszip.min.js) Rails.application.config.assets.precompile += %w(comments.js) Rails.application.config.assets.precompile += %w(projects/show.js) Rails.application.config.assets.precompile += %w(notifications.js) -Rails.application.config.assets.precompile += %w(system_notifications/index.js) Rails.application.config.assets.precompile += %w(users/invite_users_modal.js) Rails.application.config.assets.precompile += %w(search.js) Rails.application.config.assets.precompile += %w(label_printers/index.js) @@ -98,7 +97,6 @@ Rails.application.config.assets.precompile += %w(users/login_disclaimer.js) Rails.application.config.assets.precompile += %w(assets/office_form.js) Rails.application.config.assets.precompile += %w(global_activities/date_picker.js) Rails.application.config.assets.precompile += %w(shared/color_picker_select.js) -Rails.application.config.assets.precompile += %w(system_notifications/system_notification_modal.js) Rails.application.config.assets.precompile += %w(users/confirmation/new.js) Rails.application.config.assets.precompile += %w(users/invitations/team_errors.js) Rails.application.config.assets.precompile += %w(users/invitations/resource_errors.js) @@ -108,10 +106,6 @@ Rails.application.config.assets.precompile += %w(users/registrations/new_with_pr Rails.application.config.assets.precompile += %w(team_zip_exports/load_handson.js) Rails.application.config.assets.precompile += %w(repository_columns/manage_column_partials/number.js) Rails.application.config.assets.precompile += %w(repository_columns/manage_column_partials/stock.js) -Rails.application.config.assets.precompile += %w(results/result_assets/new.js) -Rails.application.config.assets.precompile += %w(results/result_assets/edit.js) -Rails.application.config.assets.precompile += %w(results/result_tables/new.js) -Rails.application.config.assets.precompile += %w(results/result_tables/edit.js) Rails.application.config.assets.precompile += %w(results/result_texts/new.js) Rails.application.config.assets.precompile += %w(results/result_texts/edit.js) Rails.application.config.assets.precompile += %w(shared/file_preview.js) @@ -138,3 +132,6 @@ Rails.application.config.assets.precompile += %w(big.min.js) # JQuery related includes Rails.application.config.assets.precompile += %w(jquery_bundle.js) + +# Add stuff installed by yarn +Rails.application.config.assets.paths << Rails.root.join('node_modules') diff --git a/config/initializers/azure_ad.rb b/config/initializers/azure_ad.rb index ba68ebdad..2a8faa7b0 100644 --- a/config/initializers/azure_ad.rb +++ b/config/initializers/azure_ad.rb @@ -3,6 +3,7 @@ ActiveSupport::Reloader.to_prepare do azure_app_ids = ENV.select { |name, _| name =~ /^[[:alnum:]]*_AZURE_AD_APP_ID/ } settings = ApplicationSettings.instance + settings.values['azure_ad_apps'] ||= [] azure_app_ids.each do |name, value| app_name = name.sub('_AZURE_AD_APP_ID', '') diff --git a/config/initializers/extends.rb b/config/initializers/extends.rb index 73b20bbb6..9362e225f 100644 --- a/config/initializers/extends.rb +++ b/config/initializers/extends.rb @@ -467,7 +467,7 @@ class Extends 83, 101, 112, 123, 125, 117, 119, 129, 131, 170, 173, 179, 187, 186, 190, 191, *204..215, 220, 221, 223, 227, 228, 229, *230..235, *237..240], team: [92, 94, 93, 97, 104, 244, 245], - label_repository: [*216..219] + label_templates: [*216..219] } TOP_LEVEL_ASSIGNABLES = %w(Project Team Protocol Repository).freeze @@ -494,9 +494,9 @@ class Extends DEFAULT_FLOW_NAME = 'SciNote Free default task flow' DEFAULT_FLOW_STATUSES = [ - { name: 'Not started', color: '#406d86' }, - { name: 'In progress', color: '#0065ff', consequences: ['MyModuleStatusConsequences::Uncompletion'] }, - { name: 'Completed', color: '#00b900', consequences: ['MyModuleStatusConsequences::Completion'] } + { name: 'Not started', color: '#FFFFFF' }, + { name: 'In progress', color: '#3070ED', consequences: ['MyModuleStatusConsequences::Uncompletion'] }, + { name: 'Completed', color: '#5EC66F', consequences: ['MyModuleStatusConsequences::Completion'] } ] REPORT_TEMPLATES = {} diff --git a/config/initializers/omniauth.rb b/config/initializers/omniauth.rb index b646199a2..b00568bd2 100644 --- a/config/initializers/omniauth.rb +++ b/config/initializers/omniauth.rb @@ -27,6 +27,7 @@ AZURE_SETUP_PROC = lambda do |env| env['omniauth.strategy'].options[:tenant_id] = provider_conf['tenant_id'] env['omniauth.strategy'].options[:sign_in_policy] = provider_conf['sign_in_policy'] env['omniauth.strategy'].options[:name] = 'customazureactivedirectory' + env['omniauth.strategy'].options[:conf_url] = provider_conf['conf_url'] conf_uri = URI.parse(provider_conf['conf_url']) env['omniauth.strategy'].options[:base_azure_url] = "#{conf_uri.scheme || 'https'}://#{conf_uri.host}" end diff --git a/config/initializers/scheduler.rb b/config/initializers/scheduler.rb index d9d650bd6..52c0f946d 100644 --- a/config/initializers/scheduler.rb +++ b/config/initializers/scheduler.rb @@ -16,23 +16,6 @@ if ENV['ENABLE_TEMPLATES_SYNC'] == 'true' end end -if Rails.application.secrets.system_notifications_uri.present? && - Rails.application.secrets.system_notifications_channel.present? - - # System notifications periodic task - scheduler.every '1h' do - Rails.logger.info('System Notifications syncing') - Rails.logger.info(Process.pid) - result = Notifications::SyncSystemNotificationsService.call - if result.errors.any? - Rails.logger.info('System Notifications sync error: ') - Rails.logger.info(result.errors.to_s) - else - Rails.logger.info('System Notifications sync done') - end - end -end - if ENV['ENABLE_FLUICS_SYNC'] == 'true' scheduler.every '24h' do LabelPrinters::Fluics::SyncService.new.sync_templates! if LabelPrinter.fluics.any? diff --git a/config/locales/en.yml b/config/locales/en.yml index 6656ffa80..63ec9ca4b 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1679,6 +1679,8 @@ en: uploaded_asset: "Uploaded file" update: "Update" locked_file_error: 'This file is being edited by someone else.' + label: + name: 'Name' create: success_flash: "Successfully added file result to task %{module}" update: @@ -1700,10 +1702,14 @@ en: head_title: "%{project} | %{module} | Add table result" title: "Add result to task %{module}" create: "Add" + label: + name: 'Name' edit: head_title: "%{project} | %{module} | Edit table result" title: "Edit result from task %{module}" update: "Update" + label: + name: 'Name' create: success_flash: "Successfully added table result to task %{module}" update: @@ -2332,19 +2338,6 @@ en: my_to_team_message: 'My protocols to Team protocols' team_to_my_message: 'Team protocols to My protocols' - system_notifications: - navbar: - tooltip: 'What’s new notifications' - emails: - subject: "You've received a What's new notification" - intro_paragraph: "Hi %{user_name}, you've received What's new notification in SciNote:" - index: - whats_new_html: "What's New" - more_notifications: "Show more notifications" - no_notifications: "No more notifications" - settings: "Settings" - see_all: "show all" - user_my_modules: new: head_title: "%{project} | %{module} | Add user" diff --git a/config/routes.rb b/config/routes.rb index b73b202a1..984aa288b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -572,17 +572,6 @@ Rails.application.routes.draw do end end - # System notifications routes - resources :system_notifications, only: %i(show) do - collection do - post 'mark_as_seen' - get 'unseen_counter' - end - member do - post 'mark_as_read' - end - end - # tinyMCE image uploader endpoint resources :tiny_mce_assets, only: [:create] do member do diff --git a/config/secrets.yml b/config/secrets.yml index d7ae8cd6e..a5b890c0e 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -62,23 +62,17 @@ common: &common development: secret_key_base: 22f2adf8f5cb73351da28f2292daa840cc2a414ae00ae605b175a8d5c73932f7e5b8ff8ef8f1554a7f1064f9869b15347f7709f0daa6ccb24c50f3cace304f64 - system_notifications_uri: <%= ENV["SYSTEM_NOTIFICATIONS_URI"] %> - system_notifications_channel: <%= ENV["SYSTEM_NOTIFICATIONS_CHANNEL"] %> export_all_limit_24h: <%= ENV['EXPORT_ALL_LIMIT_24_HOURS'] %> <<: *common test: secret_key_base: f3719934e04fa8871cf5d33d5c60f05e1b8995e0315265aef9f8b878da49bd2d386eb25ce35545b469a94ccf22f91e0052b93a15194b4f57b0c8d6ce8b150e1e - system_notifications_uri: 'system-notifications-service.test' - system_notifications_channel: 'test-channel' export_all_limit_24h: '3' <<: *common production: secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> - system_notifications_uri: <%= ENV["SYSTEM_NOTIFICATIONS_URI"] %> - system_notifications_channel: <%= ENV["SYSTEM_NOTIFICATIONS_CHANNEL"] %> export_all_limit_24h: <%= ENV['EXPORT_ALL_LIMIT_24_HOURS'] %> <<: *common diff --git a/config/webpack/webpack.config.js b/config/webpack/webpack.config.js index e7b5ecc5a..cc26b4922 100644 --- a/config/webpack/webpack.config.js +++ b/config/webpack/webpack.config.js @@ -21,7 +21,6 @@ const entryList = { tui_image_editor_styles: './app/javascript/packs/tui_image_editor_styles.scss', croppie: './app/javascript/packs/custom/croppie.js', croppie_styles: './app/javascript/packs/custom/croppie_styles.scss', - bootstrap: './app/javascript/packs/bootstrap.scss', inputmask: './app/javascript/packs/custom/inputmask.js', pdfjs: './app/javascript/packs/pdfjs/pdf_js.js', pdf_js_styles: './app/javascript/packs/pdfjs/pdf_js_styles.scss', @@ -88,7 +87,8 @@ module.exports = { }, externals: { $: 'jquery', - jquery: 'jQuery' + jquery: 'jQuery', + moment: 'moment' }, module: { rules: [ @@ -101,6 +101,15 @@ module.exports = { exclude: /node_modules/, use: ['babel-loader'] }, + { + test: /\.less$/i, + use: [ + // compiles Less to CSS + "style-loader", + "css-loader", + "less-loader", + ], + }, { test: /\.(?:sa|sc|c)ss$/i, use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader'] @@ -113,7 +122,7 @@ module.exports = { }, resolve: { // Add additional file types - extensions: ['.js', '.jsx', '.scss', '.css', '.vue'] + extensions: ['.js', '.jsx', '.scss', '.css', '.vue', '.less'] }, plugins: [ new webpack.optimize.LimitChunkCountPlugin({ diff --git a/db/migrate/20230724094959_drop_system_notifications.rb b/db/migrate/20230724094959_drop_system_notifications.rb new file mode 100644 index 000000000..07a7063dd --- /dev/null +++ b/db/migrate/20230724094959_drop_system_notifications.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true + +class DropSystemNotifications < ActiveRecord::Migration[7.0] + def up + drop_table :user_system_notifications + drop_table :system_notifications + end +end diff --git a/db/migrate/20230817074851_update_values_in_my_module_statuses.rb b/db/migrate/20230817074851_update_values_in_my_module_statuses.rb new file mode 100644 index 000000000..35f8ff2e6 --- /dev/null +++ b/db/migrate/20230817074851_update_values_in_my_module_statuses.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +# rubocop:disable Rails/SkipsModelValidations +class UpdateValuesInMyModuleStatuses < ActiveRecord::Migration[7.0] + def up + MyModuleStatus.where(name: 'Not started').update_all(color: '#FFFFFF') + MyModuleStatus.where(name: 'In progress').update_all(color: '#3070ED') + MyModuleStatus.where(name: 'Completed').update_all(color: '#5EC66F') + end + + def down + MyModuleStatus.where(name: 'Not started').update_all(color: '#406d86') + MyModuleStatus.where(name: 'In progress').update_all(color: '#0065ff') + MyModuleStatus.where(name: 'Completed').update_all(color: '#00b900') + end +end +# rubocop:enable Rails/SkipsModelValidations diff --git a/db/schema.rb b/db/schema.rb index 4fb53c937..15401949f 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2023_07_20_070830) do +ActiveRecord::Schema[7.0].define(version: 2023_07_24_094959) do # These are extensions that must be enabled in order to support this database enable_extension "btree_gist" enable_extension "pg_trgm" @@ -997,22 +997,6 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_20_070830) do t.index ["user_id"], name: "index_steps_on_user_id" end - create_table "system_notifications", force: :cascade do |t| - t.string "title" - t.text "description" - t.string "modal_title" - t.text "modal_body" - t.boolean "show_on_login", default: false - t.datetime "source_created_at", precision: nil - t.bigint "source_id" - t.datetime "last_time_changed_at", precision: nil, null: false - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.index ["last_time_changed_at"], name: "index_system_notifications_on_last_time_changed_at" - t.index ["source_created_at"], name: "index_system_notifications_on_source_created_at" - t.index ["source_id"], name: "index_system_notifications_on_source_id", unique: true - end - create_table "tables", force: :cascade do |t| t.binary "contents", null: false t.datetime "created_at", precision: nil, null: false @@ -1168,20 +1152,6 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_20_070830) do t.index ["last_modified_by_id"], name: "index_user_roles_on_last_modified_by_id" end - create_table "user_system_notifications", force: :cascade do |t| - t.bigint "user_id" - t.bigint "system_notification_id" - t.datetime "seen_at", precision: nil - t.datetime "read_at", precision: nil - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.index ["read_at"], name: "index_user_system_notifications_on_read_at" - t.index ["seen_at"], name: "index_user_system_notifications_on_seen_at" - t.index ["system_notification_id"], name: "index_user_system_notifications_on_system_notification_id" - t.index ["user_id", "system_notification_id"], name: "index_user_system_notifications_on_user_and_notification_id", unique: true - t.index ["user_id"], name: "index_user_system_notifications_on_user_id" - end - create_table "user_teams", force: :cascade do |t| t.integer "role", default: 1, null: false t.bigint "user_id", null: false @@ -1470,8 +1440,6 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_20_070830) do add_foreign_key "user_projects", "users", column: "assigned_by_id" add_foreign_key "user_roles", "users", column: "created_by_id" add_foreign_key "user_roles", "users", column: "last_modified_by_id" - add_foreign_key "user_system_notifications", "system_notifications" - add_foreign_key "user_system_notifications", "users" add_foreign_key "user_teams", "teams" add_foreign_key "user_teams", "users" add_foreign_key "user_teams", "users", column: "assigned_by_id" diff --git a/lib/omniauth/strategies/custom_azure_active_directory.rb b/lib/omniauth/strategies/custom_azure_active_directory.rb index 4e8ce9ebe..a2ff9e29e 100644 --- a/lib/omniauth/strategies/custom_azure_active_directory.rb +++ b/lib/omniauth/strategies/custom_azure_active_directory.rb @@ -7,6 +7,22 @@ module OmniAuth option :name, 'customazureactivedirectory' + def client + omni_client = super + begin + app_conf = + Rails.cache.fetch("ad_app_conf_#{options[:client_id]}", expires_in: 1.day) do + JSON.parse(Net::HTTP.get(URI(options[:conf_url]))) + end + omni_client.options[:authorize_url] = app_conf['authorization_endpoint'] + omni_client.options[:token_url] = app_conf['token_endpoint'] + rescue StandardError => e + Rails.logger.error('Failed to load OAuth2 configuration from the remote server! Using defaults.') + Rails.logger.error(e.message) + end + omni_client + end + def raw_info if @raw_info.nil? id_token_data = ::JWT.decode(access_token.params['id_token'], nil, false).first rescue {} diff --git a/lib/tasks/notifications.rake b/lib/tasks/notifications.rake deleted file mode 100644 index 7b1c1f4fa..000000000 --- a/lib/tasks/notifications.rake +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -# rubocop:disable Metrics/BlockLength -namespace :notifications do - desc 'Copies system notifications to newly created data structure.' \ - 'IT SHOULD BE RUN ONE TIME ONLY' - task copy_system_notifications: :environment do - t0 = Time.now - system_notifications = Notification - .where(type_of: :system_message) - .where(generator_user_id: nil) - .where.not('title like ?', 'Congratulations%') - - system_notifications.each do |system_notification| - new_notification = SystemNotification.create!( - source_id: -1, - title: system_notification.title, - description: system_notification.message, - modal_title: system_notification.title, - modal_body: system_notification.message, - show_on_login: false, - source_created_at: system_notification.created_at, - last_time_changed_at: system_notification.created_at - ) - - created_at = system_notification.created_at - - sql = ' INSERT INTO user_system_notifications - ( - user_id, - created_at, - updated_at, - system_notification_id, - seen_at, - read_at - ) - VALUES - ' - user_notifications = UserNotification - .where(notification_id: system_notification.id) - values_array = user_notifications.map do |user_notification| - user_notification - .slice(:user_id, :created_at, :updated_at) - .merge(system_notification_id: new_notification.id) - .merge(seen_at: created_at, read_at: created_at) - .values - .map { |v| "'#{v}'" } - .join(',') - end - - values_sql = values_array - .map { |v| "(#{v})" } - .join(',') - - sql += values_sql - ActiveRecord::Base.connection.execute(sql) - end - - t1 = Time.now - puts "Task took #{t1 - t0}" - end - - desc 'Removes obsolete system notifications from notifications table.' - task delete_obsolete_system_notifications: :environment do - system_notifications = Notification - .where(type_of: :system_message) - .where(generator_user_id: nil) - .where.not('title like ?', 'Congratulations%') - UserNotification - .where(notification_id: system_notifications.pluck(:id)) - .delete_all - - system_notifications.delete_all - end -end -# rubocop:enable Metrics/BlockLength diff --git a/package.json b/package.json index 65c0bc196..9dce96aef 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,8 @@ "eslint-plugin-react": "^7.10.0", "flow-bin": "^0.56.0", "flow-typed": "3.8.0", + "less": "^4.2.0", + "less-loader": "^11.1.3", "prettier": "^1.13.7", "prettier-eslint": "15.0.1" }, @@ -67,6 +69,7 @@ "intl": "^1.2.5", "jquery": "3.7.0", "jquery-autosize": "^1.18.18", + "jquery-migrate": "^3.4.1", "jquery-mousewheel": "^3.1.13", "jquery-ui": "^1.13.2", "jquery-ujs": "^1.2.3", diff --git a/public/403.html b/public/403.html index 127284095..d34f62dac 100644 --- a/public/403.html +++ b/public/403.html @@ -102,7 +102,7 @@#{pr}
" }.join } - source_created_at { Faker::Time.between(from: 3.days.ago, to: Date.today) } - source_id { SystemNotification.order(source_id: :desc).first&.source_id.to_i + 1 } - last_time_changed_at { Time.now } - trait :show_on_login do - show_on_login { true } - end - end -end diff --git a/spec/factories/user_system_notifications.rb b/spec/factories/user_system_notifications.rb deleted file mode 100644 index 6b50720e5..000000000 --- a/spec/factories/user_system_notifications.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -FactoryBot.define do - factory :user_system_notification do - user - system_notification - trait :seen do - seen_at { Faker::Time.between(from: 3.days.ago, to: Date.today) } - end - trait :read do - read_at { Faker::Time.between(from: 3.days.ago, to: Date.today) } - end - trait :seen_and_read do - seen_at { Faker::Time.between(from: 3.days.ago, to: Date.today) } - read_at { Faker::Time.between(from: seen_at, to: Date.today) } - end - end -end diff --git a/spec/models/system_notification_spec.rb b/spec/models/system_notification_spec.rb deleted file mode 100644 index 136a8f905..000000000 --- a/spec/models/system_notification_spec.rb +++ /dev/null @@ -1,77 +0,0 @@ -# frozen_string_literal: true - -require 'rails_helper' - -describe SystemNotification do - let(:system_notification) { build :system_notification } - - it 'is valid' do - expect(system_notification).to be_valid - end - - describe 'Validations' do - describe '#title' do - it { is_expected.to validate_presence_of(:title) } - it { is_expected.to validate_length_of(:title).is_at_most(255) } - end - - describe '#modal_title' do - it { is_expected.to validate_presence_of(:modal_title) } - it { is_expected.to validate_length_of(:modal_title).is_at_most(255) } - end - - describe '#modal_body' do - it { is_expected.to validate_presence_of(:modal_body) } - it { is_expected.to validate_length_of(:modal_body).is_at_most(100000) } - end - - describe '#description' do - it { is_expected.to validate_presence_of(:description) } - it { is_expected.to validate_length_of(:description).is_at_most(255) } - end - - describe '#source_id' do - it { is_expected.to validate_presence_of(:source_id) } - end - - describe '#source_created_at' do - it { is_expected.to validate_presence_of(:source_created_at) } - end - - describe '#last_time_changed_at' do - it { is_expected.to validate_presence_of(:last_time_changed_at) } - end - end - - describe 'Associations' do - it { is_expected.to have_many(:users) } - end - - describe 'self.last_sync_timestamp' do - context 'when there is no users or system notifications in db' do - it 'returns nil' do - expect(described_class.last_sync_timestamp).to be_nil - end - end - - context 'when there is no system notifications in db' do - it 'returns first users created_at' do - create :user - create :user, created_at: Time.now + 5.seconds - - expect(described_class.last_sync_timestamp) - .to be == User.first.created_at.to_i - end - end - - context 'when have some system notifications' do - it 'returns last system notifications last_time_changed_at timestamp' do - create :user - create :system_notification - - expect(described_class.last_sync_timestamp) - .to be SystemNotification.last.last_time_changed_at.to_i - end - end - end -end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 831a438d4..4795b5a74 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -302,10 +302,6 @@ describe User, type: :model do end end - describe 'Associations' do - it { is_expected.to have_many(:system_notifications) } - end - describe 'Email downcase' do it 'downcases email before validating and saving user' do user = User.new(email: 'Test@Email.com') diff --git a/spec/models/user_system_notification_spec.rb b/spec/models/user_system_notification_spec.rb deleted file mode 100644 index 199b4d052..000000000 --- a/spec/models/user_system_notification_spec.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -require 'rails_helper' - -describe UserSystemNotification do - let(:user_system_notification) { build :user_system_notification } - - it 'is valid' do - expect(user_system_notification).to be_valid - end - - describe 'Associations' do - it { should belong_to :user } - it { should belong_to :system_notification } - end - - describe 'Methods' do - let(:user) { create :user } - let(:notifcation_one) { create :system_notification } - let(:notifcation_two) { create :system_notification } - let(:notifcation_three) { create :system_notification, :show_on_login } - - it 'make_as_seen update seen_at' do - usn = create :user_system_notification, - user: user, - system_notification: notifcation_one - notifications_to_update = [usn.system_notification_id] - user.user_system_notifications.mark_as_seen - expect(UserSystemNotification.find(usn.id).seen_at).not_to be_nil - end - - it 'make_as_read update read_at' do - usn = create :user_system_notification, - user: user, - system_notification: notifcation_one - user.user_system_notifications.mark_as_read(usn.system_notification_id) - expect(UserSystemNotification.find(usn.id).read_at).not_to be_nil - end - - it 'show_on_login method only check any notifications' do - usn = create :user_system_notification, - user: user, - system_notification: notifcation_three - result = user.user_system_notifications.show_on_login - expect(result).not_to be_nil - expect(UserSystemNotification.find(usn.id).seen_at).to be_nil - expect(UserSystemNotification.find(usn.id).read_at).to be_nil - end - - it 'show_on_login method update notification read and seen time' do - usn = create :user_system_notification, - user: user, - system_notification: notifcation_three - result = user.user_system_notifications.show_on_login(true) - expect(result).not_to be_nil - expect(UserSystemNotification.find(usn.id).seen_at).not_to be_nil - expect(UserSystemNotification.find(usn.id).read_at).not_to be_nil - end - end -end diff --git a/spec/services/notifications/handle_system_notification_in_communication_channel_service_spec.rb b/spec/services/notifications/handle_system_notification_in_communication_channel_service_spec.rb deleted file mode 100644 index d9786201b..000000000 --- a/spec/services/notifications/handle_system_notification_in_communication_channel_service_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -require 'rails_helper' - -describe Notifications::HandleSystemNotificationInCommunicationChannelService do - let(:system_notification) { create :system_notification } - let!(:user_system_notification) do - create :user_system_notification, user: user, system_notification: system_notification - end - let(:user) { create :user } - let(:service_call) do - Notifications::HandleSystemNotificationInCommunicationChannelService.call(system_notification) - end - - context 'when user has enabled notifications' do - it 'calls AppMailer' do - allow_any_instance_of(User).to receive(:system_message_email_notification).and_return(true) - - expect(AppMailer).to receive(:system_notification).and_return(double('Mailer', deliver: true)) - - service_call - end - end - - context 'when user has disabled notifications' do - it 'does not call AppMailer' do - allow_any_instance_of(User).to receive(:system_message_email_notification).and_return(false) - - expect(AppMailer).not_to receive(:system_notification) - - service_call - end - end -end diff --git a/spec/services/notifications/push_to_communication_channel_service_spec.rb b/spec/services/notifications/push_to_communication_channel_service_spec.rb deleted file mode 100644 index 753ab13a0..000000000 --- a/spec/services/notifications/push_to_communication_channel_service_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -require 'rails_helper' - -describe Notifications::PushToCommunicationChannelService do - let(:system_notification) { create :system_notification } - let(:service_call) do - Notifications::PushToCommunicationChannelService.call(item_id: system_notification.id, - item_type: system_notification.class.name) - end - - context 'when call with valid items' do - it 'call service to to handle sending out' do - expect(Notifications::HandleSystemNotificationInCommunicationChannelService) - .to receive(:call).with(system_notification) - - service_call - end - end - - context 'when call with not valid items' do - it 'returns error with key invalid_arguments when system notification not exists' do - allow(SystemNotification).to receive(:find).and_return(nil) - - expect(service_call.errors).to have_key(:invalid_arguments) - end - - it 'raise error when have not listed object' do - u = create :user - - expect do - Notifications::PushToCommunicationChannelService.call(item_id: u.id, item_type: 'User') - end.to(raise_error('Dont know how to handle this type of items')) - end - end -end diff --git a/spec/services/notifications/sync_system_notifications_service_spec.rb b/spec/services/notifications/sync_system_notifications_service_spec.rb deleted file mode 100644 index 3ea110d1f..000000000 --- a/spec/services/notifications/sync_system_notifications_service_spec.rb +++ /dev/null @@ -1,119 +0,0 @@ -# frozen_string_literal: true - -require 'rails_helper' - -describe Notifications::SyncSystemNotificationsService do - url = 'http://system-notifications-service.test/api/system_notifications' - let!(:user) { create :user } - let(:service_call) do - allow_any_instance_of(Notifications::PushToCommunicationChannelService).to receive(:call).and_return(nil) - - Notifications::SyncSystemNotificationsService.call - end - - let(:first_call_result) do - notifications = (1..10).map do |id| - FactoryBot.attributes_for(:system_notification) - .merge('source_id': id) - end - { notifications: notifications } - end - - before(:all) do - Timecop.freeze - end - - after(:all) do - Timecop.return - end - - context 'when request is successful' do - before do |test| - if test.metadata[:add_notifications_before] - create :system_notification, - source_id: 10, - last_time_changed_at: 10.days.ago.to_datetime - end - - stub_request(:get, url) - .with(query: { 'last_sync_timestamp': - SystemNotification.last_sync_timestamp, - 'channels_slug': 'test-channel' }, - headers: { 'accept': - 'application/vnd.system-notifications.1+json' }) - .to_return(body: first_call_result.to_json, - status: 200, - headers: { 'Content-Type': 'application/json' }) - end - - it 'adds 10 notifictions into db' do - expect { service_call }.to(change { SystemNotification.all.count }.by(10)) - end - - it 'does not add 10 notifications because ther are already in DB' do - first_call_result[:notifications].each do |sn| - SystemNotification.create(sn) - end - - expect { service_call }.not_to(change { SystemNotification.all.count }) - end - - it 'updates existing notification', add_notifications_before: true do - expect { service_call } - .to(change { SystemNotification.last.last_time_changed_at }) - end - - it 'add only 3 notifications' do - first_call_result[:notifications][2..8].each do |sn| - SystemNotification.create(sn) - end - - expect { service_call }.to(change { SystemNotification.all.count }.by(3)) - end - - it 'return error when last_sync_timestamp is nil' do - allow(SystemNotification).to receive(:last_sync_timestamp).and_return(nil) - - expect(service_call.errors).to have_key(:last_sync_timestamp) - end - - it 'adds 20 user_system_notifications records' do - create :user # add another user, so have 2 users in DB - - expect { service_call }.to change { UserSystemNotification.count }.by(20) - end - - it 'calls service to notify users about notification' do - expect(Notifications::PushToCommunicationChannelService).to receive(:call).exactly(10) - - service_call - end - end - - context 'when request is unsuccessful' do - before do - stub_request(:get, url) - .with(query: { 'last_sync_timestamp': - SystemNotification.last_sync_timestamp, - 'channels_slug': 'test-channel' }) - .to_return(status: [500, 'Internal Server Error']) - end - - it 'returns api_error with message' do - expect(service_call.errors).to have_key(:api_error) - end - - it 'returns error with description about itself' do - allow(Notifications::SyncSystemNotificationsService) - .to receive(:get).and_raise(SocketError) - - expect(service_call.errors).to have_key(:socketerror) - end - - it 'does not call service to notify users about notification' do - expect(Notifications::PushToCommunicationChannelService).to_not receive(:call) - - service_call - end - end -end diff --git a/test/mailers/previews/app_mailer_preview.rb b/test/mailers/previews/app_mailer_preview.rb index c728d926b..c68b4697d 100644 --- a/test/mailers/previews/app_mailer_preview.rb +++ b/test/mailers/previews/app_mailer_preview.rb @@ -57,19 +57,6 @@ class AppMailerPreview < ActionMailer::Preview ) end - # DEPRECATED: Please use system_notification instead. - def system_message_notification - AppMailer.notification( - fake_user, - Notification.new( - type_of: :system_message, - title: 'SciNote 9.1 released!', - message: 'View release notes', - created_at: Time.now - ) - ) - end - def delivery_notification AppMailer.notification( fake_user, @@ -83,12 +70,6 @@ class AppMailerPreview < ActionMailer::Preview ) end - def system_notification - sn = FactoryBot.build(:system_notification) - user = FactoryBot.build(:user) - AppMailer.system_notification(user, sn) - end - private def fake_user diff --git a/vendor/assets/images/32px.png b/vendor/assets/images/32px.png index 14a0e65eb..40370608b 100644 Binary files a/vendor/assets/images/32px.png and b/vendor/assets/images/32px.png differ diff --git a/vendor/assets/javascripts/jquery.min.js b/vendor/assets/javascripts/jquery.min.js deleted file mode 100644 index e7e29d5b2..000000000 --- a/vendor/assets/javascripts/jquery.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jQuery v3.7.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.0",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return R(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return R(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0= 2.1.2 < 3"
-iconv-lite@^0.6.2:
+iconv-lite@^0.6.2, iconv-lite@^0.6.3:
version "0.6.3"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501"
integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==
@@ -4060,6 +4074,11 @@ ignore@^5.2.0:
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324"
integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==
+image-size@~0.5.0:
+ version "0.5.5"
+ resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c"
+ integrity sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==
+
immutability-helper@^2.7.1:
version "2.9.1"
resolved "https://registry.yarnpkg.com/immutability-helper/-/immutability-helper-2.9.1.tgz#71c423ba387e67b6c6ceba0650572f2a2a6727df"
@@ -4372,6 +4391,11 @@ is-weakref@^1.0.2:
dependencies:
call-bind "^1.0.2"
+is-what@^3.14.1:
+ version "3.14.1"
+ resolved "https://registry.yarnpkg.com/is-what/-/is-what-3.14.1.tgz#e1222f46ddda85dead0fd1c9df131760e77755c1"
+ integrity sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==
+
isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
@@ -4401,6 +4425,11 @@ jquery-autosize@^1.18.18:
resolved "https://registry.yarnpkg.com/jquery-autosize/-/jquery-autosize-1.18.18.tgz#28fcdfd671cbf3ee661ca484c19ee7aaa65e825a"
integrity sha512-Z2nzJEbchigrxqqqr026TMPdTZJ8syt2xeGMGkqCXbb1raI3J/X0LdiIhyIMcJ+nTjwTBf/p6bbRVP0vAuqd/w==
+jquery-migrate@^3.4.1:
+ version "3.4.1"
+ resolved "https://registry.yarnpkg.com/jquery-migrate/-/jquery-migrate-3.4.1.tgz#6a7114626b80e0d9e1cb77f170623efd85c5fc9c"
+ integrity sha512-6RaV23lLAYccu8MtLfy2sIxOvx+bulnWHm/pvffAi7KOzPk1sN9IYglpkl1ZNCj1FSgSNDPS2fSZ1hWsXc200Q==
+
jquery-mousewheel@^3.1.13:
version "3.1.13"
resolved "https://registry.yarnpkg.com/jquery-mousewheel/-/jquery-mousewheel-3.1.13.tgz#06f0335f16e353a695e7206bf50503cb523a6ee5"
@@ -4588,6 +4617,28 @@ klona@^2.0.4:
resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.6.tgz#85bffbf819c03b2f53270412420a4555ef882e22"
integrity sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==
+less-loader@^11.1.3:
+ version "11.1.3"
+ resolved "https://registry.yarnpkg.com/less-loader/-/less-loader-11.1.3.tgz#1bb62d6ca9bf00a177c02793b54baac40f9be694"
+ integrity sha512-A5b7O8dH9xpxvkosNrP0dFp2i/dISOJa9WwGF3WJflfqIERE2ybxh1BFDj5CovC2+jCE4M354mk90hN6ziXlVw==
+
+less@^4.2.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/less/-/less-4.2.0.tgz#cbefbfaa14a4cd388e2099b2b51f956e1465c450"
+ integrity sha512-P3b3HJDBtSzsXUl0im2L7gTO5Ubg8mEN6G8qoTS77iXxXX4Hvu4Qj540PZDvQ8V6DmX6iXo98k7Md0Cm1PrLaA==
+ dependencies:
+ copy-anything "^2.0.1"
+ parse-node-version "^1.0.1"
+ tslib "^2.3.0"
+ optionalDependencies:
+ errno "^0.1.1"
+ graceful-fs "^4.1.2"
+ image-size "~0.5.0"
+ make-dir "^2.1.0"
+ mime "^1.4.1"
+ needle "^3.1.0"
+ source-map "~0.6.0"
+
levn@^0.3.0, levn@~0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
@@ -4733,6 +4784,14 @@ lru-cache@^7.7.1:
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89"
integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==
+make-dir@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5"
+ integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==
+ dependencies:
+ pify "^4.0.1"
+ semver "^5.6.0"
+
make-dir@^3.0.2, make-dir@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f"
@@ -4830,6 +4889,11 @@ mime-types@^2.1.12, mime-types@^2.1.27:
dependencies:
mime-db "1.52.0"
+mime@^1.4.1:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
+ integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==
+
mimic-fn@^1.0.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
@@ -4997,6 +5061,15 @@ natural-compare@^1.4.0:
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==
+needle@^3.1.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/needle/-/needle-3.2.0.tgz#07d240ebcabfd65c76c03afae7f6defe6469df44"
+ integrity sha512-oUvzXnyLiVyVGoianLijF9O/RecZUf7TkBfimjGrLM4eQhXyeJwM6GeAWccwfQ9aa4gMCZKqhAOuLaMIcQxajQ==
+ dependencies:
+ debug "^3.2.6"
+ iconv-lite "^0.6.3"
+ sax "^1.2.4"
+
negotiator@^0.6.3:
version "0.6.3"
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd"
@@ -5331,6 +5404,11 @@ parse-json@^5.0.0:
json-parse-even-better-errors "^2.3.0"
lines-and-columns "^1.1.6"
+parse-node-version@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/parse-node-version/-/parse-node-version-1.0.1.tgz#e2b5dbede00e7fa9bc363607f53327e8b073189b"
+ integrity sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==
+
parse5@6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b"
@@ -5420,6 +5498,11 @@ pify@^2.3.0:
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==
+pify@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231"
+ integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==
+
pkg-dir@^4.1.0, pkg-dir@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3"
@@ -5800,6 +5883,11 @@ prop-types@^15.8.1:
object-assign "^4.1.1"
react-is "^16.13.1"
+prr@~1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476"
+ integrity sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==
+
pseudomap@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
@@ -6183,6 +6271,11 @@ sass@^1.63.6:
immutable "^4.0.0"
source-map-js ">=0.6.2 <2.0.0"
+sax@^1.2.4:
+ version "1.2.4"
+ resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
+ integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
+
saxes@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d"
@@ -6230,7 +6323,7 @@ semver@7.3.2:
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938"
integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==
-semver@^5.5.0, semver@^5.5.1:
+semver@^5.5.0, semver@^5.5.1, semver@^5.6.0:
version "5.7.2"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8"
integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==
@@ -6408,7 +6501,7 @@ source-map-support@~0.5.20:
buffer-from "^1.0.0"
source-map "^0.6.0"
-source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
+source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
@@ -6782,6 +6875,11 @@ tslib@^2.0.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf"
integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==
+tslib@^2.3.0:
+ version "2.6.1"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.1.tgz#fd8c9a0ff42590b25703c0acb3de3d3f4ede0410"
+ integrity sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==
+
tsutils@^3.21.0:
version "3.21.0"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"