diff --git a/.github/workflows/staging_pipeline.yml b/.github/workflows/staging_pipeline.yml index b9ab15e17..c4a8c0a43 100644 --- a/.github/workflows/staging_pipeline.yml +++ b/.github/workflows/staging_pipeline.yml @@ -8,6 +8,7 @@ on: types: - opened - ready_for_review + - synchronize workflow_dispatch: defaults: diff --git a/app/components/primary_navigation_component.rb b/app/components/primary_navigation_component.rb index e766a83ce..82a12e447 100644 --- a/app/components/primary_navigation_component.rb +++ b/app/components/primary_navigation_component.rb @@ -3,7 +3,7 @@ class PrimaryNavigationComponent < ViewComponent::Base def initialize(items:) @items = items - Rails.env.production? ? @items = @items.reject { |nav_item| nav_item.text.include?("Supported housing") } : @items + FeatureToggle.supported_housing_schemes_enabled? ? @items : @items.reject! { |nav_item| nav_item.text.include?("Schemes") } super end diff --git a/app/controllers/schemes_controller.rb b/app/controllers/schemes_controller.rb index d9dccab5d..e97a08e4b 100644 --- a/app/controllers/schemes_controller.rb +++ b/app/controllers/schemes_controller.rb @@ -3,10 +3,11 @@ class SchemesController < ApplicationController include Modules::SearchFilter before_action :authenticate_user! + before_action :find_resource, except: %i[index] before_action :authenticate_scope! def index - redirect_to supported_housing_organisation_path(current_user.organisation) unless current_user.support? + redirect_to schemes_organisation_path(current_user.organisation) unless current_user.support? all_schemes = Scheme.all @pagy, @schemes = pagy(filtered_collection(all_schemes, search_term)) @@ -16,7 +17,12 @@ class SchemesController < ApplicationController def show @scheme = Scheme.find_by(id: params[:id]) - render_not_found and return unless (current_user.organisation == @scheme.organisation) || current_user.support? + end + + def locations + @scheme = Scheme.find_by(id: params[:id]) + @pagy, @locations = pagy(@scheme.locations) + @total_count = @scheme.locations.size end private @@ -25,7 +31,15 @@ private params["search"] end + def find_resource + @scheme = Scheme.find_by(id: params[:id]) + end + def authenticate_scope! head :unauthorized and return unless current_user.data_coordinator? || current_user.support? + + if %w[show locations].include?(action_name) && !((current_user.organisation == @scheme.organisation) || current_user.support?) + render_not_found and return + end end end diff --git a/app/frontend/application.js b/app/frontend/application.js index 4bff5c3e9..45d4b960d 100644 --- a/app/frontend/application.js +++ b/app/frontend/application.js @@ -1,22 +1,23 @@ // This file is automatically compiled by Webpack, along with any other files -// present in this directory. You're encouraged to place your actual application logic in -// a relevant structure within app/javascript and only use these pack files to reference -// that code so it'll be compiled. +// present in this directory. You're encouraged to place your actual application +// logic in a relevant structure within app/javascript and only use these pack +// files to reference that code so it'll be compiled. // Polyfills for IE -import "@webcomponents/webcomponentsjs" -import "core-js/stable" -import "regenerator-runtime/runtime" -import "@stimulus/polyfills" -import "custom-event-polyfill" -import "intersection-observer" +import '@webcomponents/webcomponentsjs' +import 'core-js/stable' +import 'regenerator-runtime/runtime' +import '@stimulus/polyfills' +import 'custom-event-polyfill' +import 'intersection-observer' + // +import GOVUKFrontend from 'govuk-frontend' +import GOVUKPrototypeComponents from 'govuk-prototype-components' +import './styles/application.scss' +import './controllers' -require.context("govuk-frontend/govuk/assets") -import GOVUKFrontend from "govuk-frontend" -import GOVUKPrototypeComponents from "govuk-prototype-components" -import "./styles/application.scss" -import "./controllers" +require.context('govuk-frontend/govuk/assets') GOVUKFrontend.initAll() GOVUKPrototypeComponents.initAll() diff --git a/app/frontend/controllers/accessible_autocomplete_controller.js b/app/frontend/controllers/accessible_autocomplete_controller.js index db34213ee..d3c900485 100644 --- a/app/frontend/controllers/accessible_autocomplete_controller.js +++ b/app/frontend/controllers/accessible_autocomplete_controller.js @@ -1,9 +1,9 @@ -import { Controller } from "@hotwired/stimulus" -import accessibleAutocomplete from "accessible-autocomplete" +import { Controller } from '@hotwired/stimulus' +import accessibleAutocomplete from 'accessible-autocomplete' import 'accessible-autocomplete/dist/accessible-autocomplete.min.css' export default class extends Controller { - connect() { + connect () { accessibleAutocomplete.enhanceSelectElement({ defaultValue: '', selectElement: this.element diff --git a/app/frontend/controllers/application.js b/app/frontend/controllers/application.js index 932e75c45..e0ec54d90 100644 --- a/app/frontend/controllers/application.js +++ b/app/frontend/controllers/application.js @@ -1,10 +1,10 @@ -import { Application } from "@hotwired/stimulus" +import { Application } from '@hotwired/stimulus' const application = Application.start() // Configure Stimulus development experience application.warnings = true -application.debug = false -window.Stimulus = application +application.debug = false +window.Stimulus = application export { application } diff --git a/app/frontend/controllers/conditional_filter_controller.js b/app/frontend/controllers/conditional_filter_controller.js index f4fee7eb9..0169bf57b 100644 --- a/app/frontend/controllers/conditional_filter_controller.js +++ b/app/frontend/controllers/conditional_filter_controller.js @@ -1,13 +1,13 @@ -import { Controller } from "@hotwired/stimulus" +import { Controller } from '@hotwired/stimulus' export default class extends Controller { - initialize() { + initialize () { this.clearIfHidden() } - clearIfHidden() { - if(this.element.style["display"] == "none") { - this.element.value = "" + clearIfHidden () { + if (this.element.style.display === 'none') { + this.element.value = '' } } } diff --git a/app/frontend/controllers/conditional_question_controller.js b/app/frontend/controllers/conditional_question_controller.js index aab48a280..c3913ceb9 100644 --- a/app/frontend/controllers/conditional_question_controller.js +++ b/app/frontend/controllers/conditional_question_controller.js @@ -1,36 +1,36 @@ -import { Controller } from "@hotwired/stimulus" +import { Controller } from '@hotwired/stimulus' export default class extends Controller { - initialize() { + initialize () { this.displayConditional() } - displayConditional() { - if(this.element.checked) { - let selectedValue = this.element.value - let conditional_for = JSON.parse(this.element.dataset.info) - Object.entries(conditional_for).map(([targetQuestion, conditions]) => { - if(conditions.map(String).includes(String(selectedValue))) { + displayConditional () { + if (this.element.checked) { + const selectedValue = this.element.value + const conditionalFor = JSON.parse(this.element.dataset.info) + + Object.entries(conditionalFor).forEach(([targetQuestion, conditions]) => { + if (!conditions.map(String).includes(String(selectedValue))) { + const textNumericInput = document.getElementById(`case-log-${targetQuestion.replaceAll('_', '-')}-field`) + if (textNumericInput == null) { + const dateInputs = [1, 2, 3].map((idx) => { + return document.getElementById(`case_log_${targetQuestion}_${idx}i`) + }) + this.clearDateInputs(dateInputs) } else { - const textNumericInput = document.getElementById(`case-log-${targetQuestion.replaceAll("_","-")}-field`) - if (textNumericInput == null) { - const dateInputs = [1,2,3].map((idx) => { - return document.getElementById(`case_log_${targetQuestion}_${idx}i`) - }) - this.clearDateInputs(dateInputs) - } else { - this.clearTextNumericInput(textNumericInput) + this.clearTextNumericInput(textNumericInput) } } }) } } - clearTextNumericInput(input) { - input.value = "" + clearTextNumericInput (input) { + input.value = '' } - clearDateInputs(inputs) { - inputs.forEach((input) => { input.value = "" }) + clearDateInputs (inputs) { + inputs.forEach((input) => { input.value = '' }) } } diff --git a/app/frontend/controllers/filter_layout_controller.js b/app/frontend/controllers/filter_layout_controller.js index a44ba5c45..a0e439af3 100644 --- a/app/frontend/controllers/filter_layout_controller.js +++ b/app/frontend/controllers/filter_layout_controller.js @@ -1,8 +1,8 @@ -import { Controller } from "@hotwired/stimulus"; -import { FilterToggle } from "../modules/filter_toggle.js" +import { Controller } from '@hotwired/stimulus' +import { FilterToggle } from '../modules/filter_toggle.js' export default class extends Controller { - connect() { + connect () { const filterToggle = new FilterToggle({ bigModeMediaQuery: '(min-width: 48.0625em)', closeButton: { diff --git a/app/frontend/controllers/govukfrontend_controller.js b/app/frontend/controllers/govukfrontend_controller.js index 9fdc001af..88edee293 100644 --- a/app/frontend/controllers/govukfrontend_controller.js +++ b/app/frontend/controllers/govukfrontend_controller.js @@ -1,9 +1,9 @@ -import GOVUKFrontend from "govuk-frontend"; -import GOVUKPrototypeComponents from "govuk-prototype-components" -import { Controller } from "@hotwired/stimulus"; +import GOVUKFrontend from 'govuk-frontend' +import GOVUKPrototypeComponents from 'govuk-prototype-components' +import { Controller } from '@hotwired/stimulus' export default class extends Controller { - connect() { + connect () { GOVUKFrontend.initAll() GOVUKPrototypeComponents.initAll() } diff --git a/app/frontend/controllers/index.js b/app/frontend/controllers/index.js index d182110a0..ece539d15 100644 --- a/app/frontend/controllers/index.js +++ b/app/frontend/controllers/index.js @@ -1,22 +1,22 @@ // Load all the controllers within this directory and all subdirectories. // Controller files must be named *_controller.js. -import { application } from "./application" +import { application } from './application' -import AccessibleAutocompleteController from "./accessible_autocomplete_controller.js" -application.register("accessible-autocomplete", AccessibleAutocompleteController) +import AccessibleAutocompleteController from './accessible_autocomplete_controller.js' -import ConditionalFilterController from "./conditional_filter_controller.js" -application.register("conditional-filter", ConditionalFilterController) +import ConditionalFilterController from './conditional_filter_controller.js' -import ConditionalQuestionController from "./conditional_question_controller.js" -application.register("conditional-question", ConditionalQuestionController) +import ConditionalQuestionController from './conditional_question_controller.js' -import GovukfrontendController from "./govukfrontend_controller.js" -application.register("govukfrontend", GovukfrontendController) +import GovukfrontendController from './govukfrontend_controller.js' -import NumericQuestionController from "./numeric_question_controller.js" -application.register("numeric-question", NumericQuestionController) +import NumericQuestionController from './numeric_question_controller.js' -import FilterLayoutController from "./filter_layout_controller.js" -application.register("filter-layout", FilterLayoutController) +import FilterLayoutController from './filter_layout_controller.js' +application.register('accessible-autocomplete', AccessibleAutocompleteController) +application.register('conditional-filter', ConditionalFilterController) +application.register('conditional-question', ConditionalQuestionController) +application.register('govukfrontend', GovukfrontendController) +application.register('numeric-question', NumericQuestionController) +application.register('filter-layout', FilterLayoutController) diff --git a/app/frontend/controllers/numeric_question_controller.js b/app/frontend/controllers/numeric_question_controller.js index 391bec630..4dad07436 100644 --- a/app/frontend/controllers/numeric_question_controller.js +++ b/app/frontend/controllers/numeric_question_controller.js @@ -1,27 +1,26 @@ -import { Controller } from "@hotwired/stimulus" +import { Controller } from '@hotwired/stimulus' export default class extends Controller { - connect() { - const affectedField = this.element.dataset.target; - const targetQuestion = affectedField.split("case-log-")[1].split("-field")[0] - const div = document.getElementById(targetQuestion + "_div"); - div.style.display = "block"; + connect () { + const affectedField = this.element.dataset.target + const targetQuestion = affectedField.split('case-log-')[1].split('-field')[0] + const div = document.getElementById(targetQuestion + '_div') + div.style.display = 'block' } - calculateFields() { - const affectedField = this.element.dataset.target; - const fieldsToAdd = JSON.parse(this.element.dataset.calculated).map(x => `case-log-${x.replaceAll("_","-")}-field`); - const valuesToAdd = fieldsToAdd.map(x => getFieldValue(x)).filter(x => x); - const newValue = valuesToAdd.map(x => parseFloat(x)).reduce((a, b) => a + b, 0).toFixed(2); - const elementToUpdate = document.getElementById(affectedField); - elementToUpdate.value = newValue; + calculateFields () { + const affectedField = this.element.dataset.target + const fieldsToAdd = JSON.parse(this.element.dataset.calculated).map(x => `case-log-${x.replaceAll('_', '-')}-field`) + const valuesToAdd = fieldsToAdd.map(x => getFieldValue(x)).filter(x => x) + const newValue = valuesToAdd.map(x => parseFloat(x)).reduce((a, b) => a + b, 0).toFixed(2) + const elementToUpdate = document.getElementById(affectedField) + elementToUpdate.value = newValue } +} +const getFieldValue = (field) => { + const elementFieldToAdd = document.getElementById(field) + if (elementFieldToAdd) { + return elementFieldToAdd.value } - let getFieldValue = (field) => { - const elementFieldToAdd= document.getElementById(field) - if (elementFieldToAdd) { - return elementFieldToAdd.value - } - return document.getElementById(`${field}-error`).value + return document.getElementById(`${field}-error`).value } - diff --git a/app/frontend/modules/filter_toggle.js b/app/frontend/modules/filter_toggle.js index 917fed62b..e65a0e785 100644 --- a/app/frontend/modules/filter_toggle.js +++ b/app/frontend/modules/filter_toggle.js @@ -25,7 +25,7 @@ export class FilterToggle { } enableSmallMode () { - this.options.filter.container.setAttribute("tabindex", "-1") + this.options.filter.container.setAttribute('tabindex', '-1') this.hideMenu() this.addMenuButton() this.addCloseButton() @@ -33,8 +33,8 @@ export class FilterToggle { addCloseButton () { if (this.options.closeButton) { - this.closeButton = document.createElement("button") - this.closeButton.classList.add("app-filter__close") + this.closeButton = document.createElement('button') + this.closeButton.classList.add('app-filter__close') this.closeButton.innerText = this.options.closeButton.text this.closeButton.type = 'button' this.closeButton.addEventListener('click', this.onCloseClick.bind(this)) @@ -56,13 +56,13 @@ export class FilterToggle { } addMenuButton () { - this.menuButton = document.createElement("button") - this.menuButton.setAttribute("aria-expanded", "false") - this.menuButton.setAttribute("aria-has-popup", "true") - this.menuButton.classList.add("govuk-button", this.options.toggleButton.classes, "app-filter-toggle__button") + this.menuButton = document.createElement('button') + this.menuButton.setAttribute('aria-expanded', 'false') + this.menuButton.setAttribute('aria-has-popup', 'true') + this.menuButton.classList.add('govuk-button', this.options.toggleButton.classes, 'app-filter-toggle__button') this.menuButton.innerText = this.options.toggleButton.showText - this.menuButton.type = "button" - this.menuButton.addEventListener("click", this.onMenuButtonClick.bind(this)) + this.menuButton.type = 'button' + this.menuButton.addEventListener('click', this.onMenuButtonClick.bind(this)) this.options.toggleButton.container.prepend(this.menuButton) } @@ -76,18 +76,18 @@ export class FilterToggle { hideMenu () { if (this.menuButton) { - this.menuButton.setAttribute("aria-expanded", "false") + this.menuButton.setAttribute('aria-expanded', 'false') this.menuButton.innerText = this.options.toggleButton.showText } - this.options.filter.container.setAttribute("hidden", true) + this.options.filter.container.setAttribute('hidden', true) } showMenu () { if (this.menuButton) { - this.menuButton.setAttribute("aria-expanded", "true") + this.menuButton.setAttribute('aria-expanded', 'true') this.menuButton.innerText = this.options.toggleButton.hideText } - this.options.filter.container.removeAttribute("hidden") + this.options.filter.container.removeAttribute('hidden') } onMenuButtonClick () { diff --git a/app/helpers/navigation_items_helper.rb b/app/helpers/navigation_items_helper.rb index 369428053..dbaf64296 100644 --- a/app/helpers/navigation_items_helper.rb +++ b/app/helpers/navigation_items_helper.rb @@ -7,12 +7,12 @@ module NavigationItemsHelper NavigationItem.new("Organisations", organisations_path, organisations_current?(path)), NavigationItem.new("Users", "/users", users_current?(path)), NavigationItem.new("Logs", case_logs_path, logs_current?(path)), - NavigationItem.new("Supported housing", "/supported-housing", supported_housing_current?(path)), + NavigationItem.new("Schemes", "/schemes", supported_housing_schemes_current?(path)), ] elsif current_user.data_coordinator? [ NavigationItem.new("Logs", case_logs_path, logs_current?(path)), - NavigationItem.new("Supported housing", "/supported-housing", subnav_supported_housing_path?(path)), + NavigationItem.new("Schemes", "/schemes", subnav_supported_housing_schemes_path?(path)), NavigationItem.new("Users", users_organisation_path(current_user.organisation), subnav_users_path?(path)), NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}", subnav_details_path?(path)), ] @@ -28,12 +28,19 @@ module NavigationItemsHelper def secondary_items(path, current_organisation_id) [ NavigationItem.new("Logs", "/organisations/#{current_organisation_id}/logs", subnav_logs_path?(path)), - NavigationItem.new("Supported housing", "/organisations/#{current_organisation_id}/supported-housing", subnav_supported_housing_path?(path)), + NavigationItem.new("Schemes", "/organisations/#{current_organisation_id}/schemes", subnav_supported_housing_schemes_path?(path)), NavigationItem.new("Users", "/organisations/#{current_organisation_id}/users", subnav_users_path?(path)), NavigationItem.new("About this organisation", "/organisations/#{current_organisation_id}", subnav_details_path?(path)), ] end + def scheme_items(path, current_scheme_id, title) + [ + NavigationItem.new("Scheme", "/schemes/#{current_scheme_id}", !path.include?("locations")), + NavigationItem.new(title, "/schemes/#{current_scheme_id}/locations", path.include?("locations")), + ] + end + private def logs_current?(path) @@ -44,16 +51,16 @@ private path == "/users" || path.include?("/users/") end - def supported_housing_current?(path) - path == "/supported-housing" || path.include?("/supported-housing/") + def supported_housing_schemes_current?(path) + path == "/schemes" || path.include?("/schemes/") end def organisations_current?(path) path == "/organisations" || path.include?("/organisations/") end - def subnav_supported_housing_path?(path) - path.include?("/organisations") && path.include?("/supported-housing") || path.include?("/supported-housing/") + def subnav_supported_housing_schemes_path?(path) + path.include?("/organisations") && path.include?("/schemes") || path.include?("/schemes/") end def subnav_users_path?(path) diff --git a/app/models/form.rb b/app/models/form.rb index 6c2d739ed..69e12a317 100644 --- a/app/models/form.rb +++ b/app/models/form.rb @@ -1,19 +1,24 @@ class Form attr_reader :form_definition, :sections, :subsections, :pages, :questions, - :start_date, :end_date, :type, :name + :start_date, :end_date, :type, :name, :setup_definition, + :setup_sections, :form_sections - def initialize(form_path, name) + def initialize(form_path, name, setup_path) + raise "No setup definition file exists for given path".freeze unless File.exist?(setup_path) raise "No form definition file exists for given year".freeze unless File.exist?(form_path) - @form_definition = JSON.parse(File.open(form_path).read) @name = name - @start_date = Time.iso8601(form_definition["start_date"]) - @end_date = Time.iso8601(form_definition["end_date"]) + @setup_definition = JSON.parse(File.open(setup_path).read) + @setup_sections = setup_definition["sections"].map { |id, s| Form::Section.new(id, s, self) } || [] + @form_definition = JSON.parse(File.open(form_path).read) + @form_sections = form_definition["sections"].map { |id, s| Form::Section.new(id, s, self) } @type = form_definition["form_type"] - @sections = form_definition["sections"].map { |id, s| Form::Section.new(id, s, self) } + @sections = setup_sections + form_sections @subsections = sections.flat_map(&:subsections) @pages = subsections.flat_map(&:pages) @questions = pages.flat_map(&:questions) + @start_date = Time.iso8601(form_definition["start_date"]) + @end_date = Time.iso8601(form_definition["end_date"]) end def get_subsection(id) diff --git a/app/models/form_handler.rb b/app/models/form_handler.rb index 13efcb9ca..5ae3c9059 100644 --- a/app/models/form_handler.rb +++ b/app/models/form_handler.rb @@ -21,12 +21,18 @@ private directories.each do |directory| Dir.glob("#{directory}/*.json").each do |form_path| form_name = File.basename(form_path, ".json") - forms[form_name] = Form.new(form_path, form_name) + forms[form_name] = Form.new(form_path, form_name, setup_path) end end forms end + def setup_path + return "spec/fixtures/forms/setup/log_setup.json" if Rails.env.test? + + "config/forms/setup/log_setup.json" + end + def directories Rails.env.test? ? ["spec/fixtures/forms"] : ["config/forms"] end diff --git a/app/models/location.rb b/app/models/location.rb new file mode 100644 index 000000000..76e3e577e --- /dev/null +++ b/app/models/location.rb @@ -0,0 +1,20 @@ +class Location < ApplicationRecord + belongs_to :scheme + + WHEELCHAIR_ADAPTATIONS = { + no: 0, + yes: 1, + }.freeze + + enum wheelchair_adaptation: WHEELCHAIR_ADAPTATIONS + + def display_attributes + [ + { name: "Location code ", value: location_code, suffix: false }, + { name: "Postcode", value: postcode, suffix: county }, + { name: "Type of unit", value: type_of_unit, suffix: false }, + { name: "Type of building", value: type_of_building, suffix: false }, + { name: "Wheelchair adaptation", value: wheelchair_adaptation, suffix: false }, + ] + end +end diff --git a/app/models/scheme.rb b/app/models/scheme.rb index 096706018..bc3273ef4 100644 --- a/app/models/scheme.rb +++ b/app/models/scheme.rb @@ -1,5 +1,6 @@ class Scheme < ApplicationRecord belongs_to :organisation + has_many :locations scope :search_by_code, ->(code) { where("code ILIKE ?", "%#{code}%") } scope :search_by_service_name, ->(name) { where("service_name ILIKE ?", "%#{name}%") } @@ -66,8 +67,8 @@ class Scheme < ApplicationRecord { name: "Service code", value: code }, { name: "Name", value: service_name }, { name: "Confidential information", value: sensitive_display }, - { name: "Managing agent", value: organisation.name }, - { name: "Type of service", value: scheme_type_display }, + { name: "Managed by", value: organisation.name }, + { name: "Type of scheme", value: scheme_type_display }, { name: "Registered under Care Standards Act 2000", value: registered_under_care_act_display }, { name: "Total number of units", value: total_units }, { name: "Primary client group", value: primary_client_group_display }, diff --git a/app/services/exports/case_log_export_service.rb b/app/services/exports/case_log_export_service.rb index 3de65608c..17f271762 100644 --- a/app/services/exports/case_log_export_service.rb +++ b/app/services/exports/case_log_export_service.rb @@ -180,6 +180,10 @@ module Exports attribute_hash["createddate"] = attribute_hash["created_at"] attribute_hash["uploaddate"] = attribute_hash["updated_at"] + attribute_hash["cbl"] = 2 if attribute_hash["cbl"]&.zero? + attribute_hash["cap"] = 2 if attribute_hash["cap"]&.zero? + attribute_hash["chr"] = 2 if attribute_hash["chr"]&.zero? + # Age refused (1..8).each do |index| attribute_hash["age#{index}"] = -9 if attribute_hash["age#{index}_known"] == 1 diff --git a/app/services/imports/case_logs_field_import_service.rb b/app/services/imports/case_logs_field_import_service.rb index 353ea3c0f..3f26c74cf 100644 --- a/app/services/imports/case_logs_field_import_service.rb +++ b/app/services/imports/case_logs_field_import_service.rb @@ -6,6 +6,8 @@ module Imports import_from(folder, :update_tenant_code) when "major_repairs" import_from(folder, :update_major_repairs) + when "lettings_allocation" + import_from(folder, :update_lettings_allocation) else raise "Updating #{field} is not supported by the field import service" end @@ -13,6 +15,36 @@ module Imports private + def update_lettings_allocation(xml_doc) + old_id = field_value(xml_doc, "meta", "document-id") + previous_status = field_value(xml_doc, "meta", "status") + record = CaseLog.find_by(old_id:) + + if record.present? && previous_status.include?("submitted") + cbl = unsafe_string_as_integer(xml_doc, "Q15CBL") + chr = unsafe_string_as_integer(xml_doc, "Q15CHR") + cap = unsafe_string_as_integer(xml_doc, "Q15CAP") + if cbl == 2 && record.cbl == 1 + record.update!(cbl: 0) + @logger.info("Case Log #{record.id}'s cbl value has been updated'") + end + if chr == 2 && record.chr == 1 + record.update!(chr: 0) + @logger.info("Case Log #{record.id}'s chr value has been updated'") + end + if cap == 2 && record.cap == 1 + record.update!(cap: 0) + @logger.info("Case Log #{record.id}'s cap value has been updated'") + end + if cbl == 2 && chr == 2 && cap == 2 && record.letting_allocation_unknown.nil? + record.update!(letting_allocation_unknown: 1) + @logger.info("Case Log #{record.id}'s letting_allocation_unknown value has been updated'") + end + else + @logger.warn("Could not find record matching legacy ID #{old_id}") + end + end + def update_major_repairs(xml_doc) old_id = field_value(xml_doc, "meta", "document-id") record = CaseLog.find_by(old_id:) @@ -67,5 +99,15 @@ module Imports str = field_value(xml_doc, "xmlns", attribute) str.presence end + + # Unsafe: A string that has more than just the integer value + def unsafe_string_as_integer(xml_doc, attribute) + str = string_or_nil(xml_doc, attribute) + if str.nil? + nil + else + str.to_i + end + end end end diff --git a/app/services/imports/case_logs_import_service.rb b/app/services/imports/case_logs_import_service.rb index f027b3319..936218838 100644 --- a/app/services/imports/case_logs_import_service.rb +++ b/app/services/imports/case_logs_import_service.rb @@ -123,9 +123,10 @@ module Imports attributes["rp_hardship"] = unsafe_string_as_integer(xml_doc, "Q14b4").present? ? 1 : nil attributes["rp_dontknow"] = unsafe_string_as_integer(xml_doc, "Q14b5").present? ? 1 : nil - attributes["cbl"] = unsafe_string_as_integer(xml_doc, "Q15CBL").present? ? 1 : nil - attributes["chr"] = unsafe_string_as_integer(xml_doc, "Q15CHR").present? ? 1 : nil - attributes["cap"] = unsafe_string_as_integer(xml_doc, "Q15CAP").present? ? 1 : nil + attributes["cbl"] = allocation_system(unsafe_string_as_integer(xml_doc, "Q15CBL")) + attributes["chr"] = allocation_system(unsafe_string_as_integer(xml_doc, "Q15CHR")) + attributes["cap"] = allocation_system(unsafe_string_as_integer(xml_doc, "Q15CAP")) + attributes["letting_allocation_unknown"] = allocation_system_unknown(attributes["cbl"], attributes["chr"], attributes["cap"]) attributes["referral"] = unsafe_string_as_integer(xml_doc, "Q16") attributes["period"] = unsafe_string_as_integer(xml_doc, "Q17") @@ -553,6 +554,26 @@ module Imports end end + def allocation_system(value) + case value + when 1 + 1 + when 2 + 0 + end + end + + def allocation_system_unknown(cbl, chr, cap) + allocation_values = [cbl, chr, cap] + if allocation_values.all?(&:nil?) + nil + elsif allocation_values.all? { |att| att&.zero? } + 1 + else + 0 + end + end + def apply_date_consistency!(attributes) return if attributes["voiddate"].nil? || attributes["startdate"].nil? diff --git a/app/views/organisations/schemes.html.erb b/app/views/organisations/schemes.html.erb index b28d9c306..ac64a6a07 100644 --- a/app/views/organisations/schemes.html.erb +++ b/app/views/organisations/schemes.html.erb @@ -1,9 +1,9 @@ <% item_label = format_label(@pagy.count, "scheme") %> -<% title = format_title(@searched, "Supported housing services", current_user, item_label, @pagy.count, @organisation.name) %> +<% title = format_title(@searched, "Supported housing schemes", current_user, item_label, @pagy.count, @organisation.name) %> <% content_for :title, title %> -<%= render partial: "organisations/headings", locals: current_user.support? ? { main: @organisation.name, sub: nil } : { main: "Supported housing services", sub: current_user.organisation.name } %> +<%= render partial: "organisations/headings", locals: current_user.support? ? { main: @organisation.name, sub: nil } : { main: "Schemes", sub: current_user.organisation.name } %> <% if current_user.support? %> <%= render SubNavigationComponent.new( @@ -11,7 +11,7 @@ ) %> <% end %> -

Supported housing services

+

Supported housing schemes

<%= render SearchComponent.new(current_user:, search_label: "Search by service name or code", value: @searched) %> diff --git a/app/views/schemes/_scheme_list.html.erb b/app/views/schemes/_scheme_list.html.erb index 8d6ef7a72..c610610e2 100644 --- a/app/views/schemes/_scheme_list.html.erb +++ b/app/views/schemes/_scheme_list.html.erb @@ -14,10 +14,10 @@ <% row.cell(header: true, text: "Code", html_attributes: { scope: "col", }) %> - <% row.cell(header: true, text: "Service", html_attributes: { + <% row.cell(header: true, text: "Scheme", html_attributes: { scope: "col", }) %> - <% row.cell(header: true, text: "Managing agent", html_attributes: { + <% row.cell(header: true, text: "Managed by", html_attributes: { scope: "col", }) %> <% row.cell(header: true, text: "Created", html_attributes: { diff --git a/app/views/schemes/index.html.erb b/app/views/schemes/index.html.erb index b96e7bdc3..7d2ae2530 100644 --- a/app/views/schemes/index.html.erb +++ b/app/views/schemes/index.html.erb @@ -1,11 +1,11 @@ <% item_label = format_label(@pagy.count, "scheme") %> -<% title = format_title(@searched, "Supported housing services", current_user, item_label, @pagy.count, nil) %> +<% title = format_title(@searched, "Supported housing schemes", current_user, item_label, @pagy.count, nil) %> <% content_for :title, title %> -<%= render partial: "organisations/headings", locals: current_user.support? ? { main: "Supported housing services", sub: nil } : { main: "Supported housing services", sub: current_user.organisation.name } %> +<%= render partial: "organisations/headings", locals: current_user.support? ? { main: "Supported housing schemes", sub: nil } : { main: "Supported housing schemes", sub: current_user.organisation.name } %> -

Supported housing services

+

Supported housing schemes

<%= render SearchComponent.new(current_user:, search_label: "Search by service name or code", value: @searched) %> diff --git a/app/views/schemes/locations.html.erb b/app/views/schemes/locations.html.erb new file mode 100644 index 000000000..3a3f13125 --- /dev/null +++ b/app/views/schemes/locations.html.erb @@ -0,0 +1,41 @@ +<% title = @scheme.service_name %> +<% content_for :title, title %> + +<%= govuk_back_link(href: request.referer.to_s) %> + +<%= render partial: "organisations/headings", locals: { main: @scheme.service_name, sub: nil } %> + +<%= render SubNavigationComponent.new(items: scheme_items(request.path, @scheme.id, @scheme.locations.count.eql?(1) ? "1 location" : "#{@scheme.locations.count} locations")) %> + +
+
+ <% @locations.each do |location| %> +
+
+

+ <%= "#{location.address_line1}, #{location.address_line2}" %> +

+
+
+
+ <% location.display_attributes.each do |attribute| %> +
+
+ <%= attribute[:name] %> +
+
+ <%= attribute[:value] %> + <% if attribute[:suffix] %> + <%= attribute[:suffix] %> + <% end %> +
+
+ <% end %> +
+
+
+ <% end %> +
+
+ +<%== render partial: "pagy/nav", locals: { pagy: @pagy, item_name: "locations" } %> diff --git a/app/views/schemes/show.html.erb b/app/views/schemes/show.html.erb index bb883d0e9..dd1ceda70 100644 --- a/app/views/schemes/show.html.erb +++ b/app/views/schemes/show.html.erb @@ -1,17 +1,21 @@ <% title = @scheme.service_name %> <% content_for :title, title %> +<%= govuk_back_link(href: request.referer.to_s) %> + <%= render partial: "organisations/headings", locals: { main: @scheme.service_name, sub: nil } %> +<%= render SubNavigationComponent.new(items: scheme_items(request.path, @scheme.id, @scheme.locations.count.eql?(1) ? "1 location" : "#{@scheme.locations.count} locations")) %> +
<%= govuk_summary_list do |summary_list| %> <% @scheme.display_attributes.each do |attr| %> - <%= summary_list.row do |row| %> - <% row.key { attr[:name].to_s.humanize } %> - <% row.value { details_html(attr) } %> - <% end %> + <%= summary_list.row do |row| %> + <% row.key { attr[:name].eql?("Registered under Care Standards Act 2000") ? "Registered under Care Standards Act 2000" : attr[:name].to_s.humanize } %> + <% row.value { details_html(attr) } %> <% end %> + <% end %> <% end %>
diff --git a/babel.config.js b/babel.config.js index c6ecf4618..544693e50 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,9 +1,9 @@ -module.exports = function(api) { - var validEnv = ['development', 'test', 'production'] - var currentEnv = api.env() - var isDevelopmentEnv = api.env('development') - var isProductionEnv = api.env('production') - var isTestEnv = api.env('test') +module.exports = function (api) { + const validEnv = ['development', 'test', 'production'] + const currentEnv = api.env() + const isDevelopmentEnv = api.env('development') + const isProductionEnv = api.env('production') + const isTestEnv = api.env('test') if (!validEnv.includes(currentEnv)) { throw new Error( diff --git a/config/forms/setup/log_setup.json b/config/forms/setup/log_setup.json new file mode 100644 index 000000000..a760f9bd6 --- /dev/null +++ b/config/forms/setup/log_setup.json @@ -0,0 +1,138 @@ +{ + "form_type": "setup", + "sections": { + "setup": { + "label": "Before you start", + "subsections": { + "setup": { + "label": "Set up this lettings log", + "pages": { + "needs_type": { + "header": "", + "description": "", + "questions": { + "needstype": { + "check_answer_label": "Needs type", + "header": "What is the needs type?", + "hint_text": "", + "type": "radio", + "answer_options": { + "1": { + "value": "General needs" + }, + "2": { + "value": "Supported housing" + } + } + } + }, + "derived": true, + "depends_on": [ + { + "supported_housing_schemes_enabled?" : true + } + ] + }, + "renewal": { + "header": "", + "description": "", + "questions": { + "renewal": { + "check_answer_label": "Property renewal", + "header": "Is this letting a renewal?", + "hint_text": "A renewal is a letting to the same tenant in the same property.", + "type": "radio", + "answer_options": { + "1": { + "value": "Yes" + }, + "0": { + "value": "No" + } + } + } + } + }, + "tenancy_start_date": { + "header": "", + "description": "", + "questions": { + "startdate": { + "check_answer_label": "Tenancy start date", + "header": "What is the tenancy start date?", + "type": "date" + } + } + }, + "rent_type": { + "header": "", + "description": "", + "questions": { + "rent_type": { + "check_answer_label": "Rent type", + "header": "What is the rent type?", + "hint_text": "", + "type": "radio", + "answer_options": { + "1": { + "value": "Affordable Rent" + }, + "2": { + "value": "London Affordable Rent" + }, + "4": { + "value": "London Living Rent" + }, + "3": { + "value": "Rent to Buy" + }, + "0": { + "value": "Social Rent" + }, + "5": { + "value": "Other intermediate rent product" + } + }, + "conditional_for": { + "irproduct_other": [5] + } + }, + "irproduct_other": { + "check_answer_label": "Product name", + "header": "Name of rent product", + "type": "text" + } + } + }, + "tenant_code": { + "header": "", + "description": "", + "questions": { + "tenant_code": { + "check_answer_label": "Tenant code", + "header": "What is the tenant code?", + "hint_text": "This is how you usually refer to this tenancy on your own systems.", + "type": "text", + "width": 10 + } + } + }, + "property_reference": { + "header": "", + "description": "", + "questions": { + "propcode": { + "check_answer_label": "Property reference", + "header": "What is the property reference?", + "hint_text": "This is how you usually refer to this property on your own systems.", + "type": "text", + "width": 10 + } + } + } + } + } + } + } + } +} diff --git a/config/initializers/feature_toggle.rb b/config/initializers/feature_toggle.rb new file mode 100644 index 000000000..7cf1dbb76 --- /dev/null +++ b/config/initializers/feature_toggle.rb @@ -0,0 +1,7 @@ +class FeatureToggle + def self.supported_housing_schemes_enabled? + return true unless Rails.env.production? + + false + end +end diff --git a/config/routes.rb b/config/routes.rb index 3e4492127..01efc2623 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -35,7 +35,11 @@ Rails.application.routes.draw do get "edit/password", to: "users#edit_password" end - resources :schemes, path: "/supported-housing", only: %i[index show] + resources :schemes, only: %i[index show] do + member do + get "locations", to: "schemes#locations" + end + end resources :users do member do @@ -50,7 +54,7 @@ Rails.application.routes.draw do get "users", to: "organisations#users" get "users/invite", to: "users/account#new" get "logs", to: "organisations#logs" - get "supported-housing", to: "organisations#schemes" + get "schemes", to: "organisations#schemes" end end diff --git a/db/migrate/20220614124115_create_locations.rb b/db/migrate/20220614124115_create_locations.rb new file mode 100644 index 000000000..e74ba019a --- /dev/null +++ b/db/migrate/20220614124115_create_locations.rb @@ -0,0 +1,17 @@ +class CreateLocations < ActiveRecord::Migration[7.0] + def change + create_table :locations do |t| + t.string :location_code + t.string :postcode + t.string :type_of_unit + t.string :type_of_building + t.integer :wheelchair_adaptation + t.references :scheme, null: false, foreign_key: true + t.string :address_line1 + t.string :address_line2 + t.string :county + + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 4e42ac3a6..ca8c033ee 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: 2022_06_13_123730) do +ActiveRecord::Schema[7.0].define(version: 2022_06_14_124115) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -232,6 +232,21 @@ ActiveRecord::Schema[7.0].define(version: 2022_06_13_123730) do t.index ["start_year", "lettype", "beds", "la"], name: "index_la_rent_ranges_on_start_year_and_lettype_and_beds_and_la", unique: true end + create_table "locations", force: :cascade do |t| + t.string "location_code" + t.string "postcode" + t.string "type_of_unit" + t.string "type_of_building" + t.integer "wheelchair_adaptation" + t.bigint "scheme_id", null: false + t.string "address_line1" + t.string "address_line2" + t.string "county" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["scheme_id"], name: "index_locations_on_scheme_id" + end + create_table "logs_exports", force: :cascade do |t| t.datetime "created_at", default: -> { "CURRENT_TIMESTAMP" } t.datetime "started_at", null: false @@ -349,5 +364,6 @@ ActiveRecord::Schema[7.0].define(version: 2022_06_13_123730) do t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id" end + add_foreign_key "locations", "schemes" add_foreign_key "schemes", "organisations" end diff --git a/db/seeds.rb b/db/seeds.rb index ad1fc1ac4..fdf9d6172 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -70,7 +70,7 @@ unless Rails.env.test? end if Rails.env.development? && Scheme.count.zero? - Scheme.create!( + scheme1 = Scheme.create!( code: "S878", service_name: "Beulahside Care", sensitive: 0, @@ -85,7 +85,7 @@ unless Rails.env.test? created_at: Time.zone.now, ) - Scheme.create!( + scheme2 = Scheme.create!( code: "S312", service_name: "Abdullahview Point", sensitive: 0, @@ -114,6 +114,42 @@ unless Rails.env.test? organisation: dummy_org, created_at: Time.zone.now, ) + + Location.create!( + scheme: scheme1, + location_code: "S254-CU193AA", + postcode: "CU19 3AA", + address_line1: "Rectory Road", + address_line2: "North Chaim", + type_of_unit: "Self-contained flat or bedsit", + type_of_building: "Purpose-built", + county: "Mid Sussex", + wheelchair_adaptation: 0, + ) + + Location.create!( + scheme: scheme1, + location_code: "S254-DM250DC", + postcode: "DM25 0DC", + address_line1: "Smithy Lane", + address_line2: "North Kellieworth", + type_of_unit: "Self-contained flat or bedsit with common facilities", + type_of_building: "Converted from previous residential or non-residential property", + county: "Fife", + wheelchair_adaptation: 1, + ) + + Location.create!( + scheme: scheme2, + location_code: "S254-YX130WP", + postcode: "YX13 0WP", + address_line1: "Smithy Lane", + address_line2: "East Darwin", + type_of_unit: "Shared house or hostel", + type_of_building: "Converted from previous residential or non-residential property", + county: "Rochford", + wheelchair_adaptation: 1, + ) end pp "Seeded 3 dummy schemes" diff --git a/lib/tasks/data_import_field.rake b/lib/tasks/data_import_field.rake index 8498a3a89..c39afec8e 100644 --- a/lib/tasks/data_import_field.rake +++ b/lib/tasks/data_import_field.rake @@ -9,7 +9,7 @@ namespace :core do # We only allow a reduced list of known fields to be updatable case field - when "tenant_code", "major_repairs" + when "tenant_code", "major_repairs", "lettings_allocation" Imports::CaseLogsFieldImportService.new(storage_service).update_field(field, path) else raise "Field #{field} cannot be updated by data_import_field" diff --git a/lib/tasks/lint.rake b/lib/tasks/lint.rake index e27b52eed..dac1e0600 100644 --- a/lib/tasks/lint.rake +++ b/lib/tasks/lint.rake @@ -8,10 +8,15 @@ task erblint: :environment do sh "bundle exec erblint --lint-all" end +desc "Run Standard" +task standard: :environment do + sh "yarn standard" +end + desc "Run Stylelint" task stylelint: :environment do sh "yarn stylelint app/frontend/styles" end desc "Run all the linters" -task lint: %i[rubocop erblint stylelint] +task lint: %i[rubocop erblint standard stylelint] diff --git a/package.json b/package.json index 296b1c0c9..fed04131b 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "css-loader": "^6.7.1", "custom-event-polyfill": "^1.0.7", "file-loader": "^6.2.0", - "govuk-frontend": "^4.0.1", + "govuk-frontend": "4.0.1", "govuk-prototype-components": "^0.1.5", "html5shiv": "^3.7.3", "intersection-observer": "^0.12.0", @@ -36,6 +36,7 @@ "version": "0.1.0", "devDependencies": { "are-you-es5": "^2.1.2", + "standard": "^17.0.0", "stylelint": "^14.7.1", "stylelint-config-gds": "^0.2.0" }, @@ -51,6 +52,11 @@ "last 1 safari version" ] }, + "standard": { + "ignore": [ + "app/frontend/vendor/*.js" + ] + }, "stylelint": { "extends": "stylelint-config-gds/scss" }, diff --git a/spec/components/primary_navigation_component_spec.rb b/spec/components/primary_navigation_component_spec.rb index 9a3c91d09..dcab43c31 100644 --- a/spec/components/primary_navigation_component_spec.rb +++ b/spec/components/primary_navigation_component_spec.rb @@ -6,7 +6,7 @@ RSpec.describe PrimaryNavigationComponent, type: :component do NavigationItemsHelper::NavigationItem.new("Organisations", "/organisations", true), NavigationItemsHelper::NavigationItem.new("Users", "/users", false), NavigationItemsHelper::NavigationItem.new("Logs ", "/logs", false), - NavigationItemsHelper::NavigationItem.new("Supported housing", "/supported-housing", false), + NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", false), ] end @@ -36,7 +36,7 @@ RSpec.describe PrimaryNavigationComponent, type: :component do expect(result.text).to include("Organisations") expect(result.text).to include("Users") expect(result.text).to include("Logs") - expect(result.text).to include("Supported housing") + expect(result.text).to include("Schemes") end end @@ -45,9 +45,9 @@ RSpec.describe PrimaryNavigationComponent, type: :component do allow(Rails.env).to receive(:production?).and_return(true) end - it "doesn't render supported housing" do + it "doesn't render schemes" do result = render_inline(described_class.new(items:)) - expect(result.text).not_to include("Supported housing") + expect(result.text).not_to include("Schemes") end end end diff --git a/spec/factories/case_log.rb b/spec/factories/case_log.rb index 756f12883..6ec46628a 100644 --- a/spec/factories/case_log.rb +++ b/spec/factories/case_log.rb @@ -16,6 +16,9 @@ FactoryBot.define do ppostcode_full { Faker::Address.postcode } age1 { 17 } age2 { 19 } + renewal { 1 } + rent_type { 1 } + startdate { Time.zone.local(2021, 5, 1) } end trait :soft_validations_triggered do status { 1 } diff --git a/spec/factories/location.rb b/spec/factories/location.rb new file mode 100644 index 000000000..7afaeb11c --- /dev/null +++ b/spec/factories/location.rb @@ -0,0 +1,13 @@ +FactoryBot.define do + factory :location do + location_code { Faker::Name.initials(number: 10) } + postcode { Faker::Address.postcode } + address_line1 { Faker::Address.street_name } + address_line2 { Faker::Address.city } + type_of_unit { Faker::Lorem.word } + type_of_building { Faker::Lorem.word } + wheelchair_adaptation { 0 } + county { Faker::Address.state } + scheme + end +end diff --git a/spec/factories/scheme.rb b/spec/factories/scheme.rb index 6c3537146..d4f2c1cfb 100644 --- a/spec/factories/scheme.rb +++ b/spec/factories/scheme.rb @@ -1,7 +1,7 @@ FactoryBot.define do factory :scheme do code { Faker::Name.initials(number: 4) } - service_name { Faker::Name.name_with_middle } + service_name { Faker::Name.name } sensitive { Faker::Number.within(range: 0..1) } registered_under_care_act { Faker::Number.within(range: 0..1) } support_type { Faker::Number.within(range: 0..6) } diff --git a/spec/features/form/tasklist_page_spec.rb b/spec/features/form/tasklist_page_spec.rb index 59647112f..439a51515 100644 --- a/spec/features/form/tasklist_page_spec.rb +++ b/spec/features/form/tasklist_page_spec.rb @@ -27,6 +27,15 @@ RSpec.describe "Task List" do managing_organisation: user.organisation, ) end + let(:setup_completed_log) do + FactoryBot.create( + :case_log, + :about_completed, + owning_organisation: user.organisation, + managing_organisation: user.organisation, + startdate: Time.zone.local(2021, 5, 1), + ) + end let(:id) { case_log.id } let(:status) { case_log.status } @@ -40,14 +49,13 @@ RSpec.describe "Task List" do end it "shows number of completed sections if one section is completed" do - answer_all_questions_in_income_subsection(empty_case_log) - visit("/logs/#{empty_case_log.id}") - expect(page).to have_content("1 of 8 sections completed.") + visit("/logs/#{setup_completed_log.id}") + expect(page).to have_content("1 of 9 sections completed.") end it "show skip link for next incomplete section" do - answer_all_questions_in_income_subsection(empty_case_log) - visit("/logs/#{empty_case_log.id}") + answer_all_questions_in_income_subsection(setup_completed_log) + visit("/logs/#{setup_completed_log.id}") expect(page).to have_link("Skip to next incomplete section", href: /#household-characteristics/) end diff --git a/spec/features/schemes_spec.rb b/spec/features/schemes_spec.rb index f772a24c8..46ee351e0 100644 --- a/spec/features/schemes_spec.rb +++ b/spec/features/schemes_spec.rb @@ -1,6 +1,6 @@ require "rails_helper" -RSpec.describe "Supported housing scheme Features" do +RSpec.describe "Schemes scheme Features" do context "when viewing list of schemes" do context "when I am signed as a support user and there are schemes in the database" do let(:user) { FactoryBot.create(:user, :support, last_sign_in_at: Time.zone.now) } @@ -25,13 +25,13 @@ RSpec.describe "Supported housing scheme Features" do click_button("Submit") end - it "displays the link to the supported housing" do - expect(page).to have_link("Supported housing", href: "/supported-housing") + it "displays the link to the schemes" do + expect(page).to have_link("Schemes", href: "/schemes") end - context "when I click Supported housing" do + context "when I click schemes" do before do - click_link "Supported housing", href: "/supported-housing" + click_link "Schemes", href: "/schemes" end it "shows list of schemes" do @@ -99,9 +99,9 @@ RSpec.describe "Supported housing scheme Features" do click_button("Submit") end - context "when I visit supported housing page" do + context "when I visit schemes page" do before do - visit("supported-housing") + visit("schemes") end it "shows list of links to schemes" do @@ -112,8 +112,10 @@ RSpec.describe "Supported housing scheme Features" do end context "when I click to see individual scheme" do + let(:scheme) { schemes.first } + before do - click_link(schemes.first.service_name) + click_link(scheme.service_name) end it "shows me details about the selected scheme" do @@ -128,6 +130,49 @@ RSpec.describe "Supported housing scheme Features" do expect(page).to have_content(schemes.first.support_type_display) expect(page).to have_content(schemes.first.intended_stay_display) end + + context "when I click to go back" do + before do + visit("schemes") + click_link(scheme.service_name) + end + + it "shows list of links to schemes" do + click_on("Back") + schemes.each do |scheme| + expect(page).to have_link(scheme.service_name) + expect(page).to have_content(scheme.primary_client_group_display) + end + end + end + + context "when there are locations that belong to the selected scheme" do + let!(:schemes) { FactoryBot.create_list(:scheme, 5) } + let(:scheme) { schemes.first } + let!(:locations) { FactoryBot.create_list(:location, 3, scheme:) } + + before do + visit("schemes") + click_link(scheme.service_name) + end + + it "shows service and locations tab" do + expect(page).to have_link("Scheme") + expect(page).to have_link("#{scheme.locations.count} locations") + end + + context "when I click locations link" do + before do + click_link("#{scheme.locations.count} locations") + end + + it "shows details of those locations" do + locations.each do |location| + expect(page).to have_content(location.location_code) + end + end + end + end end end end diff --git a/spec/fixtures/exports/case_logs.xml b/spec/fixtures/exports/case_logs.xml index 6c8aa3446..469d8f2f0 100644 --- a/spec/fixtures/exports/case_logs.xml +++ b/spec/fixtures/exports/case_logs.xml @@ -56,7 +56,7 @@ 1 1 1 - 0 + 2 1 0 diff --git a/spec/fixtures/forms/2022_2023.json b/spec/fixtures/forms/2022_2023.json index 5a1fcc7a7..364e48d71 100644 --- a/spec/fixtures/forms/2022_2023.json +++ b/spec/fixtures/forms/2022_2023.json @@ -3,82 +3,6 @@ "start_date": "2022-04-01T00:00:00.000+01:00", "end_date": "2023-07-01T00:00:00.000+01:00", "sections": { - "setup": { - "label": "Before you start", - "subsections": { - "setup": { - "label": "Set up this lettings log", - "pages": { - "renewal": { - "header": "", - "description": "", - "questions": { - "renewal": { - "check_answer_label": "Property renewal", - "header": "Is this a renewal to the same tenant in the same property?", - "hint_text": "", - "type": "radio", - "answer_options": { - "1": "Yes", - "0": "No" - } - } - } - }, - "startdate": { - "header": "", - "description": "", - "questions": { - "startdate": { - "check_answer_label": "Tenancy start date", - "header": "What is the tenancy start date?", - "hint_text": "For example, 27 3 2007", - "type": "date" - } - } - }, - "about_this_letting": { - "header": "Tell us about this letting", - "description": "", - "questions": { - "rent_type": { - "check_answer_label": "Rent type", - "header": "What is the rent type?", - "hint_text": "", - "type": "radio", - "answer_options": { - "0": "Social rent", - "1": "Affordable rent", - "2": "London Affordable rent", - "3": "Rent to buy", - "4": "London living rent", - "5": "Other intermediate rent product" - }, - "conditional_for": { - "intermediate_rent_product_name": [5] - } - }, - "intermediate_rent_product_name": { - "check_answer_label": "Product name", - "header": "What is intermediate rent product name?", - "type": "text" - }, - "needstype": { - "check_answer_label": "Needs type", - "header": "What is the needs type?", - "hint_text": "", - "type": "radio", - "answer_options": { - "0": "Supported housing", - "1": "General needs" - } - } - } - } - } - } - } - }, "household": { "label": "About the household", "subsections": { diff --git a/spec/fixtures/forms/setup/log_setup.json b/spec/fixtures/forms/setup/log_setup.json new file mode 100644 index 000000000..1ff713dd0 --- /dev/null +++ b/spec/fixtures/forms/setup/log_setup.json @@ -0,0 +1,71 @@ +{ + "form_type": "setup", + "sections": { + "setup": { + "label": "Before you start", + "subsections": { + "setup": { + "label": "Set up this lettings log", + "pages": { + "renewal": { + "header": "", + "description": "", + "questions": { + "renewal": { + "check_answer_label": "Property renewal", + "header": "Is this a renewal to the same tenant in the same property?", + "hint_text": "", + "type": "radio", + "answer_options": { + "1": "Yes", + "0": "No" + } + } + } + }, + "startdate": { + "header": "", + "description": "", + "questions": { + "startdate": { + "check_answer_label": "Tenancy start date", + "header": "What is the tenancy start date?", + "hint_text": "For example, 27 3 2007", + "type": "date" + } + } + }, + "about_this_letting": { + "header": "Tell us about this letting", + "description": "", + "questions": { + "rent_type": { + "check_answer_label": "Rent type", + "header": "What is the rent type?", + "hint_text": "", + "type": "radio", + "answer_options": { + "0": "Social rent", + "1": "Affordable rent", + "2": "London Affordable rent", + "3": "Rent to buy", + "4": "London living rent", + "5": "Other intermediate rent product" + }, + "conditional_for": { + "intermediate_rent_product_name": [5] + } + }, + "intermediate_rent_product_name": { + "check_answer_label": "Product name", + "header": "What is intermediate rent product name?", + "type": "text" + } + } + } + } + } + } + } + } +} diff --git a/spec/fixtures/softwire_imports/case_logs/166fc004-392e-47a8-acb8-1c018734882b.xml b/spec/fixtures/softwire_imports/case_logs/166fc004-392e-47a8-acb8-1c018734882b.xml index 631f41cae..0ddca74c3 100644 --- a/spec/fixtures/softwire_imports/case_logs/166fc004-392e-47a8-acb8-1c018734882b.xml +++ b/spec/fixtures/softwire_imports/case_logs/166fc004-392e-47a8-acb8-1c018734882b.xml @@ -2,7 +2,7 @@ 2021-CORE-IR-GN 166fc004-392e-47a8-acb8-1c018734882b - e29c492473446dca4d50224f2bb7cf965a261d6f + c3061a2e6ea0b702e6f6210d5c52d2a92612d2aa 7c5bd5fb549c09a2c55d7cb90d7ba84927e64618 7c5bd5fb549c09a2c55d7cb90d7ba84927e64618 2022-04-12T14:10:59.953121Z @@ -133,7 +133,7 @@ 2 No 2 No - 2 No + 1 Yes 10 Other social landlord diff --git a/spec/fixtures/softwire_imports/case_logs/5ybz29dj-l33t-k1l0-hj86-n4k4ma77xkcd.xml b/spec/fixtures/softwire_imports/case_logs/5ybz29dj-l33t-k1l0-hj86-n4k4ma77xkcd.xml index 2531314dd..0e014e2a3 100644 --- a/spec/fixtures/softwire_imports/case_logs/5ybz29dj-l33t-k1l0-hj86-n4k4ma77xkcd.xml +++ b/spec/fixtures/softwire_imports/case_logs/5ybz29dj-l33t-k1l0-hj86-n4k4ma77xkcd.xml @@ -131,7 +131,7 @@ - 2 No + 1 Yes 2 No 2 No diff --git a/spec/fixtures/softwire_imports/case_logs/893ufj2s-lq77-42m4-rty6-ej09gh585uy1.xml b/spec/fixtures/softwire_imports/case_logs/893ufj2s-lq77-42m4-rty6-ej09gh585uy1.xml index f01bb1baa..654ade4cd 100644 --- a/spec/fixtures/softwire_imports/case_logs/893ufj2s-lq77-42m4-rty6-ej09gh585uy1.xml +++ b/spec/fixtures/softwire_imports/case_logs/893ufj2s-lq77-42m4-rty6-ej09gh585uy1.xml @@ -2,7 +2,7 @@ 2021-CORE-IR-GN 893ufj2s-lq77-42m4-rty6-ej09gh585uy1 - e29c492473446dca4d50224f2bb7cf965a261d6f + c3061a2e6ea0b702e6f6210d5c52d2a92612d2aa 7c5bd5fb549c09a2c55d7cb90d7ba84927e64618 7c5bd5fb549c09a2c55d7cb90d7ba84927e64618 2022-04-11T13:46:23.953121Z diff --git a/spec/helpers/navigation_items_helper_spec.rb b/spec/helpers/navigation_items_helper_spec.rb index 52ad582c5..90a96017b 100644 --- a/spec/helpers/navigation_items_helper_spec.rb +++ b/spec/helpers/navigation_items_helper_spec.rb @@ -12,7 +12,7 @@ RSpec.describe NavigationItemsHelper do let(:expected_navigation_items) do [ NavigationItemsHelper::NavigationItem.new("Logs", "/logs", true), - NavigationItemsHelper::NavigationItem.new("Supported housing", "/supported-housing", false), + NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", false), NavigationItemsHelper::NavigationItem.new("Users", users_path, false), NavigationItemsHelper::NavigationItem.new("About your organisation", organisation_path, false), ] @@ -27,7 +27,7 @@ RSpec.describe NavigationItemsHelper do let(:expected_navigation_items) do [ NavigationItemsHelper::NavigationItem.new("Logs", "/logs", false), - NavigationItemsHelper::NavigationItem.new("Supported housing", "/supported-housing", false), + NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", false), NavigationItemsHelper::NavigationItem.new("Users", users_path, true), NavigationItemsHelper::NavigationItem.new("About your organisation", organisation_path, false), ] @@ -42,7 +42,7 @@ RSpec.describe NavigationItemsHelper do let(:expected_navigation_items) do [ NavigationItemsHelper::NavigationItem.new("Logs", "/logs", false), - NavigationItemsHelper::NavigationItem.new("Supported housing", "/supported-housing", false), + NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", false), NavigationItemsHelper::NavigationItem.new("Users", users_path, false), NavigationItemsHelper::NavigationItem.new("About your organisation", organisation_path, true), ] @@ -57,7 +57,7 @@ RSpec.describe NavigationItemsHelper do let(:expected_navigation_items) do [ NavigationItemsHelper::NavigationItem.new("Logs", "/logs", false), - NavigationItemsHelper::NavigationItem.new("Supported housing", "/supported-housing", false), + NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", false), NavigationItemsHelper::NavigationItem.new("Users", "/organisations/#{current_user.organisation.id}/users", false), NavigationItemsHelper::NavigationItem.new("About your organisation", organisation_path, false), ] @@ -72,7 +72,7 @@ RSpec.describe NavigationItemsHelper do let(:expected_navigation_items) do [ NavigationItemsHelper::NavigationItem.new("Logs", "/logs", false), - NavigationItemsHelper::NavigationItem.new("Supported housing", "/supported-housing", false), + NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", false), NavigationItemsHelper::NavigationItem.new("Users", "/organisations/#{current_user.organisation.id}/users", true), NavigationItemsHelper::NavigationItem.new("About your organisation", organisation_path, false), ] @@ -87,14 +87,14 @@ RSpec.describe NavigationItemsHelper do let(:expected_navigation_items) do [ NavigationItemsHelper::NavigationItem.new("Logs", "/logs", false), - NavigationItemsHelper::NavigationItem.new("Supported housing", "/supported-housing", true), + NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", true), NavigationItemsHelper::NavigationItem.new("Users", "/organisations/#{current_user.organisation.id}/users", false), NavigationItemsHelper::NavigationItem.new("About your organisation", organisation_path, false), ] end - it "returns navigation items with supported housing item set as current" do - expect(primary_items("/supported-housing/1", current_user)).to eq(expected_navigation_items) + it "returns navigation items with Schemes item set as current" do + expect(primary_items("/schemes/1", current_user)).to eq(expected_navigation_items) end end end @@ -108,7 +108,7 @@ RSpec.describe NavigationItemsHelper do NavigationItemsHelper::NavigationItem.new("Organisations", "/organisations", false), NavigationItemsHelper::NavigationItem.new("Users", "/users", false), NavigationItemsHelper::NavigationItem.new("Logs", "/logs", true), - NavigationItemsHelper::NavigationItem.new("Supported housing", "/supported-housing", false), + NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", false), ] end @@ -123,7 +123,7 @@ RSpec.describe NavigationItemsHelper do NavigationItemsHelper::NavigationItem.new("Organisations", "/organisations", false), NavigationItemsHelper::NavigationItem.new("Users", "/users", true), NavigationItemsHelper::NavigationItem.new("Logs", "/logs", false), - NavigationItemsHelper::NavigationItem.new("Supported housing", "/supported-housing", false), + NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", false), ] end @@ -138,7 +138,7 @@ RSpec.describe NavigationItemsHelper do NavigationItemsHelper::NavigationItem.new("Organisations", "/organisations", false), NavigationItemsHelper::NavigationItem.new("Users", "/users", false), NavigationItemsHelper::NavigationItem.new("Logs", "/logs", false), - NavigationItemsHelper::NavigationItem.new("Supported housing", "/supported-housing", false), + NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", false), ] end @@ -147,18 +147,18 @@ RSpec.describe NavigationItemsHelper do end end - context "when the user is on the supported housing page" do + context "when the user is on the Schemes page" do let(:expected_navigation_items) do [ NavigationItemsHelper::NavigationItem.new("Organisations", "/organisations", false), NavigationItemsHelper::NavigationItem.new("Users", "/users", false), NavigationItemsHelper::NavigationItem.new("Logs", "/logs", false), - NavigationItemsHelper::NavigationItem.new("Supported housing", "/supported-housing", true), + NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", true), ] end it "returns navigation items with the users item set as current" do - expect(primary_items("/supported-housing", current_user)).to eq(expected_navigation_items) + expect(primary_items("/schemes", current_user)).to eq(expected_navigation_items) end end @@ -168,7 +168,7 @@ RSpec.describe NavigationItemsHelper do NavigationItemsHelper::NavigationItem.new("Organisations", "/organisations", false), NavigationItemsHelper::NavigationItem.new("Users", "/users", true), NavigationItemsHelper::NavigationItem.new("Logs", "/logs", false), - NavigationItemsHelper::NavigationItem.new("Supported housing", "/supported-housing", false), + NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", false), ] end @@ -183,12 +183,43 @@ RSpec.describe NavigationItemsHelper do NavigationItemsHelper::NavigationItem.new("Organisations", "/organisations", false), NavigationItemsHelper::NavigationItem.new("Users", "/users", false), NavigationItemsHelper::NavigationItem.new("Logs", "/logs", false), - NavigationItemsHelper::NavigationItem.new("Supported housing", "/supported-housing", true), + NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", true), ] end - it "returns navigation items with supported housing item set as current" do - expect(primary_items("/supported-housing/1", current_user)).to eq(expected_navigation_items) + let(:expected_scheme_items) do + [ + NavigationItemsHelper::NavigationItem.new("Scheme", "/schemes/1", true), + NavigationItemsHelper::NavigationItem.new("1 location", "/schemes/1/locations", false), + ] + end + + it "returns navigation items with Schemes item set as current" do + expect(primary_items("/schemes/1", current_user)).to eq(expected_navigation_items) + expect(scheme_items("/schemes/1", 1, "1 location")).to eq(expected_scheme_items) + end + end + + context "when the user is on the scheme locations page" do + let(:expected_navigation_items) do + [ + NavigationItemsHelper::NavigationItem.new("Organisations", "/organisations", false), + NavigationItemsHelper::NavigationItem.new("Users", "/users", false), + NavigationItemsHelper::NavigationItem.new("Logs", "/logs", false), + NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", true), + ] + end + + let(:expected_scheme_items) do + [ + NavigationItemsHelper::NavigationItem.new("Scheme", "/schemes/1", false), + NavigationItemsHelper::NavigationItem.new("1 location", "/schemes/1/locations", true), + ] + end + + it "returns navigation items with Schemes item set as current" do + expect(primary_items("/schemes/1/locations", current_user)).to eq(expected_navigation_items) + expect(scheme_items("/schemes/1/locations", 1, "1 location")).to eq(expected_scheme_items) end end @@ -200,14 +231,14 @@ RSpec.describe NavigationItemsHelper do NavigationItemsHelper::NavigationItem.new("Organisations", "/organisations", true), NavigationItemsHelper::NavigationItem.new("Users", "/users", false), NavigationItemsHelper::NavigationItem.new("Logs", "/logs", false), - NavigationItemsHelper::NavigationItem.new("Supported housing", "/supported-housing", false), + NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", false), ] end let(:expected_secondary_navigation_items) do [ NavigationItemsHelper::NavigationItem.new("Logs", "/organisations/#{current_user.organisation.id}/logs", true), - NavigationItemsHelper::NavigationItem.new("Supported housing", "/organisations/#{current_user.organisation.id}/supported-housing", false), + NavigationItemsHelper::NavigationItem.new("Schemes", "/organisations/#{current_user.organisation.id}/schemes", false), NavigationItemsHelper::NavigationItem.new("Users", "/organisations/#{current_user.organisation.id}/users", false), NavigationItemsHelper::NavigationItem.new("About this organisation", "/organisations/#{current_user.organisation.id}", false), ] @@ -226,14 +257,14 @@ RSpec.describe NavigationItemsHelper do NavigationItemsHelper::NavigationItem.new("Organisations", "/organisations", true), NavigationItemsHelper::NavigationItem.new("Users", "/users", false), NavigationItemsHelper::NavigationItem.new("Logs", "/logs", false), - NavigationItemsHelper::NavigationItem.new("Supported housing", "/supported-housing", false), + NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", false), ] end let(:expected_secondary_navigation_items) do [ NavigationItemsHelper::NavigationItem.new("Logs", "/organisations/#{current_user.organisation.id}/logs", false), - NavigationItemsHelper::NavigationItem.new("Supported housing", "/organisations/#{current_user.organisation.id}/supported-housing", false), + NavigationItemsHelper::NavigationItem.new("Schemes", "/organisations/#{current_user.organisation.id}/schemes", false), NavigationItemsHelper::NavigationItem.new("Users", "/organisations/#{current_user.organisation.id}/users", true), NavigationItemsHelper::NavigationItem.new("About this organisation", "/organisations/#{current_user.organisation.id}", false), ] @@ -246,20 +277,20 @@ RSpec.describe NavigationItemsHelper do end context "when the user is on organisation schemes page" do - let(:required_sub_path) { "supported-housing" } + let(:required_sub_path) { "schemes" } let(:expected_navigation_items) do [ NavigationItemsHelper::NavigationItem.new("Organisations", "/organisations", true), NavigationItemsHelper::NavigationItem.new("Users", "/users", false), NavigationItemsHelper::NavigationItem.new("Logs", "/logs", false), - NavigationItemsHelper::NavigationItem.new("Supported housing", "/supported-housing", false), + NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", false), ] end let(:expected_secondary_navigation_items) do [ NavigationItemsHelper::NavigationItem.new("Logs", "/organisations/#{current_user.organisation.id}/logs", false), - NavigationItemsHelper::NavigationItem.new("Supported housing", "/organisations/#{current_user.organisation.id}/supported-housing", true), + NavigationItemsHelper::NavigationItem.new("Schemes", "/organisations/#{current_user.organisation.id}/schemes", true), NavigationItemsHelper::NavigationItem.new("Users", "/organisations/#{current_user.organisation.id}/users", false), NavigationItemsHelper::NavigationItem.new("About this organisation", "/organisations/#{current_user.organisation.id}", false), ] @@ -278,14 +309,14 @@ RSpec.describe NavigationItemsHelper do NavigationItemsHelper::NavigationItem.new("Organisations", "/organisations", true), NavigationItemsHelper::NavigationItem.new("Users", "/users", false), NavigationItemsHelper::NavigationItem.new("Logs", "/logs", false), - NavigationItemsHelper::NavigationItem.new("Supported housing", "/supported-housing", false), + NavigationItemsHelper::NavigationItem.new("Schemes", "/schemes", false), ] end let(:expected_secondary_navigation_items) do [ NavigationItemsHelper::NavigationItem.new("Logs", "/organisations/#{current_user.organisation.id}/logs", false), - NavigationItemsHelper::NavigationItem.new("Supported housing", "/organisations/#{current_user.organisation.id}/supported-housing", false), + NavigationItemsHelper::NavigationItem.new("Schemes", "/organisations/#{current_user.organisation.id}/schemes", false), NavigationItemsHelper::NavigationItem.new("Users", "/organisations/#{current_user.organisation.id}/users", false), NavigationItemsHelper::NavigationItem.new("About this organisation", "/organisations/#{current_user.organisation.id}", true), ] diff --git a/spec/helpers/tab_nav_helper_spec.rb b/spec/helpers/tab_nav_helper_spec.rb index ba2dd3174..7ec36f974 100644 --- a/spec/helpers/tab_nav_helper_spec.rb +++ b/spec/helpers/tab_nav_helper_spec.rb @@ -3,7 +3,7 @@ require "rails_helper" RSpec.describe TabNavHelper do let(:organisation) { FactoryBot.create(:organisation) } let(:user) { FactoryBot.build(:user, organisation:) } - let(:scheme) { FactoryBot.build(:scheme) } + let(:scheme) { FactoryBot.build(:scheme, service_name: "Some name") } describe "#user_cell" do it "returns user link and email separated by a newline character" do @@ -21,7 +21,7 @@ RSpec.describe TabNavHelper do describe "#scheme_cell" do it "returns the scheme link service name and primary user group separated by a newline character" do - expected_html = "#{scheme.service_name}\nScheme #{scheme.primary_client_group_display}" + expected_html = "#{scheme.service_name}\nScheme #{scheme.primary_client_group_display}" expect(scheme_cell(scheme)).to match(expected_html) end end diff --git a/spec/helpers/tasklist_helper_spec.rb b/spec/helpers/tasklist_helper_spec.rb index c681211e3..a11f778f7 100644 --- a/spec/helpers/tasklist_helper_spec.rb +++ b/spec/helpers/tasklist_helper_spec.rb @@ -17,7 +17,7 @@ RSpec.describe TasklistHelper do describe "get sections count" do it "returns the total of sections if no status is given" do - expect(get_subsections_count(empty_case_log)).to eq(8) + expect(get_subsections_count(empty_case_log)).to eq(9) end it "returns 0 sections for completed sections if no sections are completed" do @@ -25,7 +25,7 @@ RSpec.describe TasklistHelper do end it "returns the number of not started sections" do - expect(get_subsections_count(empty_case_log, :not_started)).to eq(7) + expect(get_subsections_count(empty_case_log, :not_started)).to eq(8) end it "returns the number of sections in progress" do diff --git a/spec/lib/tasks/date_import_field_spec.rb b/spec/lib/tasks/date_import_field_spec.rb index 4946a3459..8a11d6631 100644 --- a/spec/lib/tasks/date_import_field_spec.rb +++ b/spec/lib/tasks/date_import_field_spec.rb @@ -42,6 +42,20 @@ describe "rake core:data_import_field", type: :task do end end + context "and we update the lettings_allocation fields" do + let(:field) { "lettings_allocation" } + + it "properly configures the storage service" do + expect(StorageService).to receive(:new).with(paas_config_service, instance_name) + task.invoke(field, fixture_path) + end + + it "calls the expected update method with parameters" do + expect(import_service).to receive(:update_field).with(field, fixture_path) + task.invoke(field, fixture_path) + end + end + context "and we update the major repairs fields" do let(:field) { "major_repairs" } diff --git a/spec/models/case_log_spec.rb b/spec/models/case_log_spec.rb index 745c8ad6d..0b80f4ae3 100644 --- a/spec/models/case_log_spec.rb +++ b/spec/models/case_log_spec.rb @@ -211,10 +211,17 @@ RSpec.describe CaseLog do }) end - it "derives that all forms are general needs" do - record_from_db = ActiveRecord::Base.connection.execute("select needstype from case_logs where id=#{case_log.id}").to_a[0] - expect(record_from_db["needstype"]).to eq(1) - expect(case_log["needstype"]).to eq(1) + context "when a case log is created in production" do + before do + allow(Rails.env).to receive(:production?).and_return(true) + end + + it "derives that all forms are general needs" do + case_log = FactoryBot.create(:case_log) + record_from_db = ActiveRecord::Base.connection.execute("select needstype from case_logs where id=#{case_log.id}").to_a[0] + expect(record_from_db["needstype"]).to eq(1) + expect(case_log["needstype"]).to eq(1) + end end it "correctly derives and saves partial and full major repairs date" do @@ -2097,4 +2104,22 @@ RSpec.describe CaseLog do end end end + + describe "supported_housing_schemes_enabled?" do + it "returns true for the case log if the environment is not production" do + case_log = FactoryBot.create(:case_log) + expect(case_log.supported_housing_schemes_enabled?).to eq(true) + end + + context "when in the production environment" do + before do + allow(Rails.env).to receive(:production?).and_return(true) + end + + it "returns false for a case log" do + case_log = FactoryBot.create(:case_log) + expect(case_log.supported_housing_schemes_enabled?).to eq(false) + end + end + end end diff --git a/spec/models/form_handler_spec.rb b/spec/models/form_handler_spec.rb index fb793d210..8f729e553 100644 --- a/spec/models/form_handler_spec.rb +++ b/spec/models/form_handler_spec.rb @@ -17,7 +17,7 @@ RSpec.describe FormHandler do form_handler = described_class.instance form = form_handler.get_form(test_form_name) expect(form).to be_a(Form) - expect(form.pages.count).to eq(34) + expect(form.pages.count).to eq(37) end end @@ -32,7 +32,7 @@ RSpec.describe FormHandler do it "loads the form once at boot time" do form_handler = described_class.instance - expect(Form).not_to receive(:new).with(:any, test_form_name) + expect(Form).not_to receive(:new).with(:any, test_form_name, :any) expect(form_handler.get_form(test_form_name)).to be_a(Form) end end diff --git a/spec/models/organisation_spec.rb b/spec/models/organisation_spec.rb index 17b8ec200..ac6a0fc6c 100644 --- a/spec/models/organisation_spec.rb +++ b/spec/models/organisation_spec.rb @@ -87,7 +87,7 @@ RSpec.describe Organisation, type: :model do end it "has case logs" do - expect(organisation.case_logs.to_a).to eq([owned_case_log, managed_case_log]) + expect(organisation.case_logs.to_a).to match_array([owned_case_log, managed_case_log]) end it "has case log status helper methods" do diff --git a/spec/models/rent_period_spec.rb b/spec/models/rent_period_spec.rb index 55252977a..3c5bc2597 100644 --- a/spec/models/rent_period_spec.rb +++ b/spec/models/rent_period_spec.rb @@ -2,7 +2,8 @@ require "rails_helper" RSpec.describe RentPeriod, type: :model do describe "rent period mapping" do - let(:form) { Form.new("spec/fixtures/forms/2021_2022.json", "2021_2022") } + let(:setup_path) { "spec/fixtures/forms/setup/log_setup.json" } + let(:form) { Form.new("spec/fixtures/forms/2021_2022.json", "2021_2022", setup_path) } before do allow(FormHandler.instance).to receive(:current_form).and_return(form) diff --git a/spec/requests/case_logs_controller_spec.rb b/spec/requests/case_logs_controller_spec.rb index 4b5f2670f..13b6e4278 100644 --- a/spec/requests/case_logs_controller_spec.rb +++ b/spec/requests/case_logs_controller_spec.rb @@ -288,7 +288,8 @@ RSpec.describe CaseLogsController, type: :request do mrcdate: Time.zone.local(2022, 2, 1), startdate: Time.zone.local(2022, 12, 1), tenancy: 6, - managing_organisation: organisation) + managing_organisation: organisation, + tenant_code: nil) end it "shows case logs for multiple selected statuses and years" do @@ -622,7 +623,7 @@ RSpec.describe CaseLogsController, type: :request do end it "displays a section status for a case log" do - assert_select ".govuk-tag", text: /Not started/, count: 6 + assert_select ".govuk-tag", text: /Not started/, count: 7 assert_select ".govuk-tag", text: /In progress/, count: 1 assert_select ".govuk-tag", text: /Completed/, count: 0 assert_select ".govuk-tag", text: /Cannot start yet/, count: 1 @@ -645,7 +646,7 @@ RSpec.describe CaseLogsController, type: :request do end it "displays a section status for a case log" do - assert_select ".govuk-tag", text: /Not started/, count: 6 + assert_select ".govuk-tag", text: /Not started/, count: 7 assert_select ".govuk-tag", text: /Completed/, count: 1 assert_select ".govuk-tag", text: /Cannot start yet/, count: 1 end diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb index b692d02b2..18fd10204 100644 --- a/spec/requests/organisations_controller_spec.rb +++ b/spec/requests/organisations_controller_spec.rb @@ -31,8 +31,8 @@ RSpec.describe OrganisationsController, type: :request do expect(response).to redirect_to("/account/sign-in") end - it "does not let you see supported housing list" do - get "/organisations/#{organisation.id}/supported-housing", headers: headers, params: {} + it "does not let you see schemes list" do + get "/organisations/#{organisation.id}/schemes", headers: headers, params: {} expect(response).to redirect_to("/account/sign-in") end end @@ -48,11 +48,11 @@ RSpec.describe OrganisationsController, type: :request do before do allow(user).to receive(:need_two_factor_authentication?).and_return(false) sign_in user - get "/organisations/#{organisation.id}/supported-housing", headers:, params: {} + get "/organisations/#{organisation.id}/schemes", headers:, params: {} end it "has page heading" do - expect(page).to have_content("Supported housing services") + expect(page).to have_content("Schemes") end it "shows a search bar" do @@ -60,7 +60,7 @@ RSpec.describe OrganisationsController, type: :request do end it "has hidden accebility field with description" do - expected_field = "

Supported housing services

" + expected_field = "

Supported housing schemes

" expect(CGI.unescape_html(response.body)).to include(expected_field) end @@ -77,7 +77,7 @@ RSpec.describe OrganisationsController, type: :request do before do allow(user).to receive(:need_two_factor_authentication?).and_return(false) - get "/organisations/#{organisation.id}/supported-housing?search=#{search_param}" + get "/organisations/#{organisation.id}/schemes?search=#{search_param}" end it "returns matching results" do @@ -104,19 +104,19 @@ RSpec.describe OrganisationsController, type: :request do before do sign_in user - get "/organisations/#{organisation.id}/supported-housing", headers:, params: {} + get "/organisations/#{organisation.id}/schemes", headers:, params: {} end it "has page heading" do - expect(page).to have_content("Supported housing services") + expect(page).to have_content("Schemes") end it "shows a search bar" do expect(page).to have_field("search", type: "search") end - it "has hidden accebility field with description" do - expected_field = "

Supported housing services

" + it "has hidden accessibility field with description" do + expected_field = "

Supported housing schemes

" expect(CGI.unescape_html(response.body)).to include(expected_field) end @@ -131,7 +131,7 @@ RSpec.describe OrganisationsController, type: :request do let!(:unauthorised_organisation) { FactoryBot.create(:organisation) } before do - get "/organisations/#{unauthorised_organisation.id}/supported-housing", headers:, params: {} + get "/organisations/#{unauthorised_organisation.id}/schemes", headers:, params: {} end it "returns not found 404 from org details route" do @@ -144,7 +144,7 @@ RSpec.describe OrganisationsController, type: :request do let(:search_param) { "CODE321" } before do - get "/organisations/#{organisation.id}/supported-housing?search=#{search_param}" + get "/organisations/#{organisation.id}/schemes?search=#{search_param}" end it "returns matching results" do @@ -159,7 +159,7 @@ RSpec.describe OrganisationsController, type: :request do end it "has search in the title" do - expect(page).to have_title("Supported housing services (1 scheme matching ‘#{search_param}’) - Submit social housing lettings and sales data (CORE) - GOV.UK") + expect(page).to have_title("Supported housing schemes (1 scheme matching ‘#{search_param}’) - Submit social housing lettings and sales data (CORE) - GOV.UK") end end end diff --git a/spec/requests/schemes_controller_spec.rb b/spec/requests/schemes_controller_spec.rb index 4d5c248d5..a7d907573 100644 --- a/spec/requests/schemes_controller_spec.rb +++ b/spec/requests/schemes_controller_spec.rb @@ -10,7 +10,7 @@ RSpec.describe SchemesController, type: :request do describe "#index" do context "when not signed in" do it "redirects to the sign in page" do - get "/supported-housing" + get "/schemes" expect(response).to redirect_to("/account/sign-in") end end @@ -20,7 +20,7 @@ RSpec.describe SchemesController, type: :request do before do sign_in user - get "/supported-housing" + get "/schemes" end it "returns 401 unauthorized" do @@ -34,12 +34,12 @@ RSpec.describe SchemesController, type: :request do before do sign_in user - get "/supported-housing" + get "/schemes" end it "redirects to the organisation schemes path" do follow_redirect! - expect(path).to match("/organisations/#{user.organisation.id}/supported-housing") + expect(path).to match("/organisations/#{user.organisation.id}/schemes") end end @@ -47,11 +47,11 @@ RSpec.describe SchemesController, type: :request do before do allow(user).to receive(:need_two_factor_authentication?).and_return(false) sign_in user - get "/supported-housing" + get "/schemes" end it "has page heading" do - expect(page).to have_content("Supported housing services") + expect(page).to have_content("Schemes") end it "shows all schemes" do @@ -65,7 +65,7 @@ RSpec.describe SchemesController, type: :request do end it "has correct title" do - expect(page).to have_title("Supported housing services - Submit social housing lettings and sales data (CORE) - GOV.UK") + expect(page).to have_title("Supported housing schemes - Submit social housing lettings and sales data (CORE) - GOV.UK") end it "shows the total organisations count" do @@ -73,7 +73,7 @@ RSpec.describe SchemesController, type: :request do end it "has hidden accebility field with description" do - expected_field = "

Supported housing services

" + expected_field = "

Supported housing schemes

" expect(CGI.unescape_html(response.body)).to include(expected_field) end @@ -86,7 +86,7 @@ RSpec.describe SchemesController, type: :request do context "when on the first page" do before do - get "/supported-housing" + get "/schemes" end it "shows the total schemes count" do @@ -98,7 +98,7 @@ RSpec.describe SchemesController, type: :request do end it "has correct page 1 of 2 title" do - expect(page).to have_title("Supported housing services (page 1 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK") + expect(page).to have_title("Supported housing schemes (page 1 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK") end it "has pagination links" do @@ -111,7 +111,7 @@ RSpec.describe SchemesController, type: :request do context "when on the second page" do before do - get "/supported-housing?page=2" + get "/schemes?page=2" end it "shows the total schemes count" do @@ -130,7 +130,7 @@ RSpec.describe SchemesController, type: :request do end it "has correct page 1 of 2 title" do - expect(page).to have_title("Supported housing services (page 2 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK") + expect(page).to have_title("Supported housing schemes (page 2 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK") end end end @@ -140,7 +140,7 @@ RSpec.describe SchemesController, type: :request do let(:search_param) { "CODE321" } before do - get "/supported-housing?search=#{search_param}" + get "/schemes?search=#{search_param}" end it "returns matching results" do @@ -155,7 +155,7 @@ RSpec.describe SchemesController, type: :request do end it "has search in the title" do - expect(page).to have_title("Supported housing services (1 scheme matching ‘#{search_param}’) - Submit social housing lettings and sales data (CORE) - GOV.UK") + expect(page).to have_title("Supported housing schemes (1 scheme matching ‘#{search_param}’) - Submit social housing lettings and sales data (CORE) - GOV.UK") end end end @@ -166,7 +166,7 @@ RSpec.describe SchemesController, type: :request do context "when not signed in" do it "redirects to the sign in page" do - get "/supported-housing/#{specific_scheme.id}" + get "/schemes/#{specific_scheme.id}" expect(response).to redirect_to("/account/sign-in") end end @@ -176,7 +176,7 @@ RSpec.describe SchemesController, type: :request do before do sign_in user - get "/supported-housing/#{specific_scheme.id}" + get "/schemes/#{specific_scheme.id}" end it "returns 401 unauthorized" do @@ -194,7 +194,7 @@ RSpec.describe SchemesController, type: :request do end it "has page heading" do - get "/supported-housing/#{specific_scheme.id}" + get "/schemes/#{specific_scheme.id}" expect(page).to have_content(specific_scheme.code) expect(page).to have_content(specific_scheme.service_name) expect(page).to have_content(specific_scheme.organisation.name) @@ -211,11 +211,11 @@ RSpec.describe SchemesController, type: :request do expect(page).to have_content(specific_scheme.intended_stay_display) end - context "when coordinator attempts to see scheme belogning to a different organisation" do + context "when coordinator attempts to see scheme belonging to a different organisation" do let!(:specific_scheme) { FactoryBot.create(:scheme) } it "returns 404 not found" do - get "/supported-housing/#{specific_scheme.id}" + get "/schemes/#{specific_scheme.id}" expect(response).to have_http_status(:not_found) end end @@ -225,7 +225,7 @@ RSpec.describe SchemesController, type: :request do before do allow(user).to receive(:need_two_factor_authentication?).and_return(false) sign_in user - get "/supported-housing/#{specific_scheme.id}" + get "/schemes/#{specific_scheme.id}" end it "has page heading" do @@ -246,4 +246,199 @@ RSpec.describe SchemesController, type: :request do end end end + + describe "#locations" do + let(:specific_scheme) { schemes.first } + + context "when not signed in" do + it "redirects to the sign in page" do + get "/schemes/#{specific_scheme.id}/locations" + expect(response).to redirect_to("/account/sign-in") + end + end + + context "when signed in as a data provider user" do + let(:user) { FactoryBot.create(:user) } + + before do + sign_in user + get "/schemes/#{specific_scheme.id}/locations" + end + + it "returns 401 unauthorized" do + request + expect(response).to have_http_status(:unauthorized) + end + end + + context "when signed in as a data coordinator user" do + let(:user) { FactoryBot.create(:user, :data_coordinator) } + let!(:scheme) { FactoryBot.create(:scheme, organisation: user.organisation) } + let!(:locations) { FactoryBot.create_list(:location, 3, scheme:) } + + before do + sign_in user + get "/schemes/#{scheme.id}/locations" + end + + context "when coordinator attempts to see scheme belonging to a different organisation" do + let!(:specific_scheme) { FactoryBot.create(:scheme) } + + before do + FactoryBot.create(:location, scheme: specific_scheme) + end + + it "returns 404 not found" do + get "/schemes/#{specific_scheme.id}/locations" + expect(response).to have_http_status(:not_found) + end + end + + it "shows scheme" do + locations.each do |location| + expect(page).to have_content(location.location_code) + expect(page).to have_content(location.postcode) + expect(page).to have_content(location.county) + expect(page).to have_content(location.type_of_unit) + expect(page).to have_content(location.type_of_building) + expect(page).to have_content(location.wheelchair_adaptation) + expect(page).to have_content(location.address_line1) + expect(page).to have_content(location.address_line2) + end + end + + it "has page heading" do + expect(page).to have_content(scheme.service_name) + end + + it "has correct title" do + expect(page).to have_title("#{scheme.service_name} - Submit social housing lettings and sales data (CORE) - GOV.UK") + end + + context "when paginating over 20 results" do + let!(:locations) { FactoryBot.create_list(:location, 25, scheme:) } + + context "when on the first page" do + before do + get "/schemes/#{scheme.id}/locations" + end + + it "shows which schemes are being shown on the current page" do + expect(CGI.unescape_html(response.body)).to match("Showing 1 to 20 of #{locations.count} locations") + end + + it "has correct page 1 of 2 title" do + expect(page).to have_title("#{scheme.service_name} (page 1 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK") + end + + it "has pagination links" do + expect(page).to have_content("Previous") + expect(page).not_to have_link("Previous") + expect(page).to have_content("Next") + expect(page).to have_link("Next") + end + end + + context "when on the second page" do + before do + get "/schemes/#{scheme.id}/locations?page=2" + end + + it "shows which schemes are being shown on the current page" do + expect(CGI.unescape_html(response.body)).to match("Showing 21 to 25 of #{locations.count} locations") + end + + it "has correct page 1 of 2 title" do + expect(page).to have_title("#{scheme.service_name} (page 2 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK") + end + + it "has pagination links" do + expect(page).to have_content("Previous") + expect(page).to have_link("Previous") + expect(page).to have_content("Next") + expect(page).not_to have_link("Next") + end + end + end + end + + context "when signed in as a support user" do + let(:user) { FactoryBot.create(:user, :support) } + let!(:scheme) { FactoryBot.create(:scheme) } + let!(:locations) { FactoryBot.create_list(:location, 3, scheme:) } + + before do + allow(user).to receive(:need_two_factor_authentication?).and_return(false) + sign_in user + get "/schemes/#{scheme.id}/locations" + end + + it "shows scheme" do + locations.each do |location| + expect(page).to have_content(location.location_code) + expect(page).to have_content(location.postcode) + expect(page).to have_content(location.county) + expect(page).to have_content(location.type_of_unit) + expect(page).to have_content(location.type_of_building) + expect(page).to have_content(location.wheelchair_adaptation) + expect(page).to have_content(location.address_line1) + expect(page).to have_content(location.address_line2) + end + end + + it "has page heading" do + expect(page).to have_content(scheme.service_name) + end + + it "has correct title" do + expect(page).to have_title("#{scheme.service_name} - Submit social housing lettings and sales data (CORE) - GOV.UK") + end + + context "when paginating over 20 results" do + let!(:locations) { FactoryBot.create_list(:location, 25, scheme:) } + + context "when on the first page" do + before do + get "/schemes/#{scheme.id}/locations" + end + + it "shows which schemes are being shown on the current page" do + expect(CGI.unescape_html(response.body)).to match("Showing 1 to 20 of #{locations.count} locations") + end + + it "has correct page 1 of 2 title" do + expect(page).to have_title("#{scheme.service_name} (page 1 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK") + end + + it "has pagination links" do + expect(page).to have_content("Previous") + expect(page).not_to have_link("Previous") + expect(page).to have_content("Next") + expect(page).to have_link("Next") + end + end + + context "when on the second page" do + before do + get "/schemes/#{scheme.id}/locations?page=2" + end + + it "shows which schemes are being shown on the current page" do + expect(CGI.unescape_html(response.body)).to match("Showing 21 to 25 of #{locations.count} locations") + end + + it "has correct page 1 of 2 title" do + expect(page).to have_title("#{scheme.service_name} (page 2 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK") + end + + it "has pagination links" do + expect(page).to have_content("Previous") + expect(page).to have_link("Previous") + expect(page).to have_content("Next") + expect(page).not_to have_link("Next") + end + end + end + end + end end diff --git a/spec/services/imports/case_logs_field_import_service_spec.rb b/spec/services/imports/case_logs_field_import_service_spec.rb index 4a058948c..a8e84cff9 100644 --- a/spec/services/imports/case_logs_field_import_service_spec.rb +++ b/spec/services/imports/case_logs_field_import_service_spec.rb @@ -6,7 +6,8 @@ RSpec.describe Imports::CaseLogsFieldImportService do let(:storage_service) { instance_double(StorageService) } let(:logger) { instance_double(ActiveSupport::Logger) } - let(:real_2021_2022_form) { Form.new("config/forms/2021_2022.json", "2021_2022") } + let(:real_setup_path) { "config/forms/setup/log_setup.json" } + let(:real_2021_2022_form) { Form.new("config/forms/2021_2022.json", "2021_2022", real_setup_path) } let(:fixture_directory) { "spec/fixtures/softwire_imports/case_logs" } let(:case_log_id) { "0ead17cb-1668-442d-898c-0d52879ff592" } @@ -74,6 +75,125 @@ RSpec.describe Imports::CaseLogsFieldImportService do end end + context "when updating letings allocation values" do + let(:field) { "lettings_allocation" } + let(:case_log) { CaseLog.find_by(old_id: case_log_id) } + + before do + allow(logger).to receive(:warn) + Imports::CaseLogsImportService.new(storage_service, logger).create_logs(fixture_directory) + case_log_file.rewind + end + + context "when cbl" do + let(:case_log_id) { "166fc004-392e-47a8-acb8-1c018734882b" } + + context "when it was incorrectly set" do + before do + case_log.update!(cbl: 1) + end + + it "updates the value" do + expect(logger).to receive(:info).with(/Case Log \d+'s cbl value has been updated/) + expect { import_service.send(:update_field, field, remote_folder) } + .to(change { case_log.reload.cbl }.from(1).to(0)) + end + end + + context "when it was correctly set" do + before do + case_log.update!(cbl: 0) + end + + it "does not update the value" do + expect { import_service.send(:update_field, field, remote_folder) } + .not_to(change { case_log.reload.cbl }) + end + end + end + + context "when chr" do + let(:case_log_id) { "166fc004-392e-47a8-acb8-1c018734882b" } + + context "when it was incorrectly set" do + before do + case_log.update!(chr: 1) + end + + it "updates the value" do + expect(logger).to receive(:info).with(/Case Log \d+'s chr value has been updated/) + expect { import_service.send(:update_field, field, remote_folder) } + .to(change { case_log.reload.chr }.from(1).to(0)) + end + end + + context "when it was correctly set" do + before do + case_log.update!(chr: 0) + end + + it "does not update the value" do + expect { import_service.send(:update_field, field, remote_folder) } + .not_to(change { case_log.reload.chr }) + end + end + end + + context "when cap" do + let(:case_log_id) { "0ead17cb-1668-442d-898c-0d52879ff592" } + + context "when it was incorrectly set" do + before do + case_log.update!(cap: 1) + end + + it "updates the value" do + expect(logger).to receive(:info).with(/Case Log \d+'s cap value has been updated/) + expect { import_service.send(:update_field, field, remote_folder) } + .to(change { case_log.reload.cap }.from(1).to(0)) + end + end + + context "when it was correctly set" do + before do + case_log.update!(cap: 0) + end + + it "does not update the value" do + expect { import_service.send(:update_field, field, remote_folder) } + .not_to(change { case_log.reload.cap }) + end + end + end + + context "when allocation type is none of cap, chr, cbl" do + let(:case_log_id) { "893ufj2s-lq77-42m4-rty6-ej09gh585uy1" } + + context "when it did not have a value set for letting_allocation_unknown" do + before do + case_log.update!(letting_allocation_unknown: nil) + end + + it "updates the value" do + expect(logger).to receive(:info).with(/Case Log \d+'s letting_allocation_unknown value has been updated/) + expect { import_service.send(:update_field, field, remote_folder) } + .to(change { case_log.reload.letting_allocation_unknown }.from(nil).to(1)) + end + end + + context "when it had a value set for letting_allocation_unknown" do + before do + case_log.update!(letting_allocation_unknown: 1) + end + + it "updates the value" do + expect { import_service.send(:update_field, field, remote_folder) } + .not_to(change { case_log.reload.letting_allocation_unknown }) + end + end + end + end + context "when updating major repairs" do let(:field) { "major_repairs" } diff --git a/spec/services/imports/case_logs_import_service_spec.rb b/spec/services/imports/case_logs_import_service_spec.rb index dfe4ceb1b..fda123b09 100644 --- a/spec/services/imports/case_logs_import_service_spec.rb +++ b/spec/services/imports/case_logs_import_service_spec.rb @@ -6,8 +6,9 @@ RSpec.describe Imports::CaseLogsImportService do let(:storage_service) { instance_double(StorageService) } let(:logger) { instance_double(ActiveSupport::Logger) } - let(:real_2021_2022_form) { Form.new("config/forms/2021_2022.json", "2021_2022") } - let(:real_2022_2023_form) { Form.new("config/forms/2022_2023.json", "2022_2023") } + let(:real_setup_path) { "config/forms/setup/log_setup.json" } + let(:real_2021_2022_form) { Form.new("config/forms/2021_2022.json", "2021_2022", real_setup_path) } + let(:real_2022_2023_form) { Form.new("config/forms/2022_2023.json", "2022_2023", real_setup_path) } let(:fixture_directory) { "spec/fixtures/softwire_imports/case_logs" } def open_file(directory, filename) diff --git a/webpack.config.js b/webpack.config.js index c22a0a141..c027f2dd2 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,18 +1,18 @@ -const path = require("path") -const webpack = require("webpack") +const path = require('node:path') +const webpack = require('webpack') const MiniCssExtractPlugin = require('mini-css-extract-plugin') const RemoveEmptyScriptsPlugin = require('webpack-remove-empty-scripts') -const CopyPlugin = require("copy-webpack-plugin"); +const CopyPlugin = require('copy-webpack-plugin') const mode = process.env.NODE_ENV === 'development' ? 'development' : 'production' module.exports = { mode, - devtool: "source-map", + devtool: 'source-map', entry: { application: [ - "./app/frontend/application.js", + './app/frontend/application.js' ] }, module: { @@ -24,9 +24,9 @@ module.exports = { path.resolve(__dirname, 'node_modules/@stimulus/polyfills'), path.resolve(__dirname, 'node_modules/@rails/actioncable'), path.resolve(__dirname, 'node_modules/chartjs'), - path.resolve(__dirname, 'app/frontend'), + path.resolve(__dirname, 'app/frontend') ], - use: ['babel-loader'], + use: ['babel-loader'] }, { test: /\.(png|jpe?g|gif|eot|woff|woff2|ttf|svg|ico)$/i, @@ -34,9 +34,9 @@ module.exports = { }, { test: /\.(scss|css)/i, - use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader'], + use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader'] } - ], + ] }, resolve: { alias: { @@ -46,11 +46,11 @@ module.exports = { modules: ['node_modules', 'node_modules/govuk-frontend/govuk'] }, output: { - filename: "[name].js", + filename: '[name].js', // we must set publicPath to an empty value to override the default of // auto which doesn't work in IE11 publicPath: '', - path: path.resolve(__dirname, "app/assets/builds"), + path: path.resolve(__dirname, 'app/assets/builds') }, plugins: [ new RemoveEmptyScriptsPlugin(), @@ -58,12 +58,12 @@ module.exports = { new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 1 }), new CopyPlugin({ patterns: [ - { from: "node_modules/govuk-frontend/govuk/assets/images", to: "images" }, - { from: "node_modules/govuk-frontend/govuk/assets/fonts", to: "fonts" }, - { from: "node_modules/html5shiv/dist/html5shiv.min.js", to: "vendor" }, - { from: "app/frontend/vendor/outerHTML.js", to: "vendor" }, - { from: "app/frontend/vendor/polyfill-output-value.js", to: "vendor" } - ], + { from: 'node_modules/govuk-frontend/govuk/assets/images', to: 'images' }, + { from: 'node_modules/govuk-frontend/govuk/assets/fonts', to: 'fonts' }, + { from: 'node_modules/html5shiv/dist/html5shiv.min.js', to: 'vendor' }, + { from: 'app/frontend/vendor/outerHTML.js', to: 'vendor' }, + { from: 'app/frontend/vendor/polyfill-output-value.js', to: 'vendor' } + ] }) ] } diff --git a/yarn.lock b/yarn.lock index 9e9c09845..3e4858f7c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -918,11 +918,40 @@ resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== +"@eslint/eslintrc@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.0.tgz#29f92c30bb3e771e4a2048c95fa6855392dfac4f" + integrity sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^9.3.2" + globals "^13.15.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + "@hotwired/stimulus@^3.0.0": version "3.0.1" resolved "https://registry.yarnpkg.com/@hotwired/stimulus/-/stimulus-3.0.1.tgz#141f15645acaa3b133b7c247cad58ae252ffae85" integrity sha512-oHsJhgY2cip+K2ED7vKUNd2P+BEswVhrCYcJ802DSsblJFv7mPFVk3cQKvm2vHgHeDVdnj7oOKrBbzp1u8D+KA== +"@humanwhocodes/config-array@^0.9.2": + version "0.9.5" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.9.5.tgz#2cbaf9a89460da24b5ca6531b8bbfc23e1df50c7" + integrity sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw== + dependencies: + "@humanwhocodes/object-schema" "^1.2.1" + debug "^4.1.1" + minimatch "^3.0.4" + +"@humanwhocodes/object-schema@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== + "@jridgewell/gen-mapping@^0.1.0": version "0.1.1" resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" @@ -1028,6 +1057,11 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== + "@types/minimist@^1.2.0": version "1.2.2" resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" @@ -1213,12 +1247,17 @@ acorn-import-assertions@^1.7.6: resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz#ba2b5939ce62c238db6d93d81c9b111b29b855e9" integrity sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw== +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + acorn@^6.0.6: version "6.4.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== -acorn@^8.4.1, acorn@^8.5.0: +acorn@^8.4.1, acorn@^8.5.0, acorn@^8.7.1: version "8.7.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30" integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A== @@ -1242,7 +1281,7 @@ ajv-keywords@^5.0.0: dependencies: fast-deep-equal "^3.1.3" -ajv@^6.12.4, ajv@^6.12.5: +ajv@^6.10.0, ajv@^6.12.4, ajv@^6.12.5: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -1274,7 +1313,7 @@ ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.0.0: +ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== @@ -1304,11 +1343,27 @@ are-you-es5@^2.1.2: commander "^2.19.0" find-up "^4.1.0" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + array-flatten@^2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099" integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== +array-includes@^3.1.4, array-includes@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.5.tgz#2c320010db8d31031fd2a5f6b3bbd4b1aad31bdb" + integrity sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + get-intrinsic "^1.1.1" + is-string "^1.0.7" + array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" @@ -1319,6 +1374,26 @@ array-union@^3.0.1: resolved "https://registry.yarnpkg.com/array-union/-/array-union-3.0.1.tgz#da52630d327f8b88cfbfb57728e2af5cd9b6b975" integrity sha512-1OvF9IbWwaeiM9VhzYXVQacMibxpXOMYVNIvMtKRyX9SImBXpKcFr8XvFDeEslCyuH/t6KRt7HEO94AlP8Iatw== +array.prototype.flat@^1.2.5: + version "1.3.0" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz#0b0c1567bf57b38b56b4c97b8aa72ab45e4adc7b" + integrity sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.2" + es-shim-unscopables "^1.0.0" + +array.prototype.flatmap@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.0.tgz#a7e8ed4225f4788a70cd910abcf0791e76a5534f" + integrity sha512-PZC9/8TKAIxcWKdyeb77EzULHPrIX/tIZebLJUQOMR1OwYosT8yggdfWScfTBCDj5utONvOuPQQumYsU2ULbkg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.2" + es-shim-unscopables "^1.0.0" + arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -1414,7 +1489,7 @@ braces@^3.0.2, braces@~3.0.2: dependencies: fill-range "^7.0.1" -browserslist@^4.14.5, browserslist@^4.20.2, browserslist@^4.20.4: +browserslist@^4.14.5, browserslist@^4.20.2, browserslist@^4.20.3: version "4.20.4" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.20.4.tgz#98096c9042af689ee1e0271333dbc564b8ce4477" integrity sha512-ok1d+1WpnU24XYN7oC3QWgTyMhY/avPJ/r9T00xxvUOIparA/gc+UPUMaod3i+G6s+nI2nUb9xZ5k794uIwShw== @@ -1430,7 +1505,14 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -call-bind@^1.0.0: +builtins@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9" + integrity sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ== + dependencies: + semver "^7.0.0" + +call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== @@ -1471,6 +1553,14 @@ chalk@^2.0.0: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + chart.js@^3.6.0: version "3.8.0" resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-3.8.0.tgz#c6c14c457b9dc3ce7f1514a59e9b262afd6f1a94" @@ -1609,7 +1699,7 @@ cosmiconfig@^7.0.0, cosmiconfig@^7.0.1: path-type "^4.0.0" yaml "^1.10.0" -cross-spawn@^7.0.3: +cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -1647,7 +1737,21 @@ custom-event-polyfill@^1.0.7: resolved "https://registry.yarnpkg.com/custom-event-polyfill/-/custom-event-polyfill-1.0.7.tgz#9bc993ddda937c1a30ccd335614c6c58c4f87aee" integrity sha512-TDDkd5DkaZxZFM8p+1I3yAlvM3rSr1wbrOliG4yJiwinMZN8z/iGL7BTlDkrJcYTmgUSb4ywVCc3ZaUtOtC76w== -debug@^4.1.0, debug@^4.1.1, debug@^4.3.4: +debug@^2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@^3.2.7: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + +debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -1667,7 +1771,12 @@ decamelize@^1.1.0, decamelize@^1.2.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== -define-properties@^1.1.3: +deep-is@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + +define-properties@^1.1.3, define-properties@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA== @@ -1682,6 +1791,20 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + electron-to-chromium@^1.4.147: version "1.4.154" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.154.tgz#d69c60499fc467a6c59591d29183e520afbc78a1" @@ -1722,11 +1845,56 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" +es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19.5: + version "1.20.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.1.tgz#027292cd6ef44bd12b1913b828116f54787d1814" + integrity sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + function.prototype.name "^1.1.5" + get-intrinsic "^1.1.1" + get-symbol-description "^1.0.0" + has "^1.0.3" + has-property-descriptors "^1.0.0" + has-symbols "^1.0.3" + internal-slot "^1.0.3" + is-callable "^1.2.4" + is-negative-zero "^2.0.2" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + is-string "^1.0.7" + is-weakref "^1.0.2" + object-inspect "^1.12.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + regexp.prototype.flags "^1.4.3" + string.prototype.trimend "^1.0.5" + string.prototype.trimstart "^1.0.5" + unbox-primitive "^1.0.2" + es-module-lexer@^0.9.0: version "0.9.3" resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19" integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ== +es-shim-unscopables@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" + integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== + dependencies: + has "^1.0.3" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -1737,6 +1905,103 @@ escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eslint-config-standard-jsx@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-standard-jsx/-/eslint-config-standard-jsx-11.0.0.tgz#70852d395731a96704a592be5b0bfaccfeded239" + integrity sha512-+1EV/R0JxEK1L0NGolAr8Iktm3Rgotx3BKwgaX+eAuSX8D952LULKtjgZD3F+e6SvibONnhLwoTi9DPxN5LvvQ== + +eslint-config-standard@17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-17.0.0.tgz#fd5b6cf1dcf6ba8d29f200c461de2e19069888cf" + integrity sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg== + +eslint-import-resolver-node@^0.3.6: + version "0.3.6" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd" + integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw== + dependencies: + debug "^3.2.7" + resolve "^1.20.0" + +eslint-module-utils@^2.7.3: + version "2.7.3" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz#ad7e3a10552fdd0642e1e55292781bd6e34876ee" + integrity sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ== + dependencies: + debug "^3.2.7" + find-up "^2.1.0" + +eslint-plugin-es@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz#f0822f0c18a535a97c3e714e89f88586a7641ec9" + integrity sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ== + dependencies: + eslint-utils "^2.0.0" + regexpp "^3.0.0" + +eslint-plugin-import@^2.26.0: + version "2.26.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b" + integrity sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA== + dependencies: + array-includes "^3.1.4" + array.prototype.flat "^1.2.5" + debug "^2.6.9" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.6" + eslint-module-utils "^2.7.3" + has "^1.0.3" + is-core-module "^2.8.1" + is-glob "^4.0.3" + minimatch "^3.1.2" + object.values "^1.1.5" + resolve "^1.22.0" + tsconfig-paths "^3.14.1" + +eslint-plugin-n@^15.1.0: + version "15.2.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-15.2.2.tgz#1ea682e57871c5ce6ba04c36e71df38466b68d34" + integrity sha512-MLjZVAv4TiCIoXqjibNqCJjLkGHfrOY3XZ0ZBLoW0OnS3o98PUBnzB/kfp8dCz/4A4Y18jjX50PRnqI4ACFY1Q== + dependencies: + builtins "^5.0.1" + eslint-plugin-es "^4.1.0" + eslint-utils "^3.0.0" + ignore "^5.1.1" + is-core-module "^2.9.0" + minimatch "^3.1.2" + resolve "^1.10.1" + semver "^7.3.7" + +eslint-plugin-promise@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-6.0.0.tgz#017652c07c9816413a41e11c30adc42c3d55ff18" + integrity sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw== + +eslint-plugin-react@^7.28.0: + version "7.30.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.30.0.tgz#8e7b1b2934b8426ac067a0febade1b13bd7064e3" + integrity sha512-RgwH7hjW48BleKsYyHK5vUAvxtE9SMPDKmcPRQgtRCYaZA0XQPt5FSkrU3nhz5ifzMZcA8opwmRJ2cmOO8tr5A== + dependencies: + array-includes "^3.1.5" + array.prototype.flatmap "^1.3.0" + doctrine "^2.1.0" + estraverse "^5.3.0" + jsx-ast-utils "^2.4.1 || ^3.0.0" + minimatch "^3.1.2" + object.entries "^1.1.5" + object.fromentries "^2.0.5" + object.hasown "^1.1.1" + object.values "^1.1.5" + prop-types "^15.8.1" + resolve "^2.0.0-next.3" + semver "^6.3.0" + string.prototype.matchall "^4.0.7" + eslint-scope@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -1745,6 +2010,100 @@ eslint-scope@5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" +eslint-scope@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" + integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-utils@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" + integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + dependencies: + eslint-visitor-keys "^2.0.0" + +eslint-visitor-keys@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== + +eslint-visitor-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== + +eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + +eslint@^8.13.0: + version "8.17.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.17.0.tgz#1cfc4b6b6912f77d24b874ca1506b0fe09328c21" + integrity sha512-gq0m0BTJfci60Fz4nczYxNAlED+sMcihltndR8t9t1evnU/azx53x3t2UHXC/uRjcbvRw/XctpaNygSTcQD+Iw== + dependencies: + "@eslint/eslintrc" "^1.3.0" + "@humanwhocodes/config-array" "^0.9.2" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + doctrine "^3.0.0" + escape-string-regexp "^4.0.0" + eslint-scope "^7.1.1" + eslint-utils "^3.0.0" + eslint-visitor-keys "^3.3.0" + espree "^9.3.2" + esquery "^1.4.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^6.0.1" + globals "^13.15.0" + ignore "^5.2.0" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^4.1.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.1" + regexpp "^3.2.0" + strip-ansi "^6.0.1" + strip-json-comments "^3.1.0" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + +espree@^9.3.2: + version "9.3.2" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.2.tgz#f58f77bd334731182801ced3380a8cc859091596" + integrity sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA== + dependencies: + acorn "^8.7.1" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.3.0" + +esquery@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" + integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== + dependencies: + estraverse "^5.1.0" + esrecurse@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" @@ -1757,7 +2116,7 @@ estraverse@^4.1.1: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== -estraverse@^5.2.0: +estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== @@ -1810,6 +2169,11 @@ fast-json-stable-stringify@^2.0.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + fastest-levenshtein@^1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz#9990f7d3a88cc5a9ffd1f1745745251700d497e2" @@ -1853,6 +2217,20 @@ find-cache-dir@^3.3.1: make-dir "^3.0.2" pkg-dir "^4.1.0" +find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ== + dependencies: + locate-path "^2.0.0" + +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -1889,12 +2267,32 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function.prototype.name@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" + integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.0" + functions-have-names "^1.2.2" + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== + +functions-have-names@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== + gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: +get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.2.tgz#336975123e05ad0b7ba41f152ee4aadbea6cf598" integrity sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA== @@ -1908,6 +2306,14 @@ get-stdin@^8.0.0: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg== +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -1960,6 +2366,13 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== +globals@^13.15.0: + version "13.15.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.15.0.tgz#38113218c907d2f7e98658af246cef8b77e90bac" + integrity sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog== + dependencies: + type-fest "^0.20.2" + globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" @@ -1989,6 +2402,11 @@ globjoin@^0.1.4: resolved "https://registry.yarnpkg.com/globjoin/-/globjoin-0.1.4.tgz#2f4494ac8919e3767c5cbb691e9f463324285d43" integrity sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg== +govuk-frontend@4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/govuk-frontend/-/govuk-frontend-4.0.1.tgz#bceff58ecb399272cba32bd2b357fe16198e3249" + integrity sha512-X+B88mqYHoxAz0ID87Uxo3oHqdKBRnNHd3Cz8+u8nvQUAsrEzROFLK+t7sAu7e+fKqCCrJyIgx6Cmr6dIGnohQ== + govuk-frontend@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/govuk-frontend/-/govuk-frontend-4.0.1.tgz#bceff58ecb399272cba32bd2b357fe16198e3249" @@ -2004,7 +2422,7 @@ govuk-prototype-components@^0.1.5: govuk-frontend "^4.0.1" lodash "^4.17.21" -graceful-fs@^4.1.2, graceful-fs@^4.2.4, graceful-fs@^4.2.9: +graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.2.4, graceful-fs@^4.2.9: version "4.2.10" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== @@ -2014,6 +2432,11 @@ hard-rejection@^2.1.0: resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== +has-bigints@^1.0.1, has-bigints@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" + integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -2031,11 +2454,18 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.1.1" -has-symbols@^1.0.1, has-symbols@^1.0.3: +has-symbols@^1.0.1, has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" @@ -2070,7 +2500,7 @@ icss-utils@^5.0.0, icss-utils@^5.1.0: resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== -ignore@^5.1.9, ignore@^5.2.0: +ignore@^5.1.1, ignore@^5.1.9, ignore@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== @@ -2080,7 +2510,7 @@ immutable@^4.0.0: resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.1.0.tgz#f795787f0db780183307b9eb2091fcac1f6fafef" integrity sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ== -import-fresh@^3.2.1: +import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -2129,6 +2559,15 @@ ini@^1.3.5: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== +internal-slot@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" + integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== + dependencies: + get-intrinsic "^1.1.0" + has "^1.0.3" + side-channel "^1.0.4" + interpret@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" @@ -2144,6 +2583,13 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== +is-bigint@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" + is-binary-path@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" @@ -2151,13 +2597,33 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" -is-core-module@^2.5.0, is-core-module@^2.8.1: +is-boolean-object@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-callable@^1.1.4, is-callable@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" + integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== + +is-core-module@^2.2.0, is-core-module@^2.5.0, is-core-module@^2.8.1, is-core-module@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== dependencies: has "^1.0.3" +is-date-object@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -2168,13 +2634,25 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: is-extglob "^2.1.1" +is-negative-zero@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" + integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== + +is-number-object@^1.0.4: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" + integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== + dependencies: + has-tostringtag "^1.0.0" + is-number@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" @@ -2197,11 +2675,47 @@ is-plain-object@^5.0.0: resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== +is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + is-regexp@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-2.1.0.tgz#cd734a56864e23b956bf4e7c66c396a4c0b22c2d" integrity sha512-OZ4IlER3zmRIoB9AqNhEggVxqIH4ofDns5nRrPS6yQxXE1TPCUpFznBfRQmQa8uC+pXqjMnukiJBxCisIxiLGA== +is-shared-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" + integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== + dependencies: + call-bind "^1.0.2" + +is-string@^1.0.5, is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + +is-symbol@^1.0.2, is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== + dependencies: + has-symbols "^1.0.2" + +is-weakref@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== + dependencies: + call-bind "^1.0.2" + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -2221,11 +2735,18 @@ jest-worker@^27.4.5: merge-stream "^2.0.0" supports-color "^8.0.0" -js-tokens@^4.0.0: +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + jsesc@^2.5.1: version "2.5.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" @@ -2236,6 +2757,11 @@ jsesc@~0.5.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== +json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" @@ -2251,11 +2777,31 @@ json-schema-traverse@^1.0.0: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + json5@^2.1.2, json5@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== +"jsx-ast-utils@^2.4.1 || ^3.0.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.0.tgz#e624f259143b9062c92b6413ff92a164c80d3ccb" + integrity sha512-XzO9luP6L0xkxwhIJMTJQpZo/eeN60K08jHdexfD569AGxeNug6UketeHXEhROoM8aR7EcUoOQmIhcJQjcuq8Q== + dependencies: + array-includes "^3.1.4" + object.assign "^4.1.2" + kind-of@^6.0.2, kind-of@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" @@ -2271,11 +2817,30 @@ known-css-properties@^0.25.0: resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.25.0.tgz#6ebc4d4b412f602e5cfbeb4086bd544e34c0a776" integrity sha512-b0/9J1O9Jcyik1GC6KC42hJ41jKwdO/Mq8Mdo5sYN+IuRTXs2YFHZC3kZSx6ueusqa95x3wLYe/ytKjbAfGixA== +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + lines-and-columns@^1.1.6: version "1.2.4" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== +load-json-file@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-5.3.0.tgz#4d3c1e01fa1c03ea78a60ac7af932c9ce53403f3" + integrity sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw== + dependencies: + graceful-fs "^4.1.15" + parse-json "^4.0.0" + pify "^4.0.1" + strip-bom "^3.0.0" + type-fest "^0.3.0" + loader-runner@^4.2.0: version "4.3.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" @@ -2290,6 +2855,22 @@ loader-utils@^2.0.0: emojis-list "^3.0.0" json5 "^2.1.2" +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA== + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + locate-path@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" @@ -2302,6 +2883,11 @@ lodash.debounce@^4.0.8: resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + lodash.truncate@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" @@ -2312,6 +2898,13 @@ lodash@^4.17.21: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== +loose-envify@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + lru-cache@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" @@ -2401,7 +2994,7 @@ mini-css-extract-plugin@^2.6.0: dependencies: schema-utils "^4.0.0" -minimatch@^3.1.1: +minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -2417,11 +3010,26 @@ minimist-options@4.1.0: is-plain-obj "^1.1.0" kind-of "^6.0.3" +minimist@^1.2.0, minimist@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + mutation-observer-inner-html-shim@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/mutation-observer-inner-html-shim/-/mutation-observer-inner-html-shim-1.0.1.tgz#84349f51dfc390d0af85011de8fa14e645fb400e" @@ -2432,6 +3040,11 @@ nanoid@^3.3.4: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + neo-async@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" @@ -2467,12 +3080,22 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== +object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== + +object-inspect@^1.12.0, object-inspect@^1.9.0: + version "1.12.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" + integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== + object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@^4.1.0: +object.assign@^4.1.0, object.assign@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== @@ -2482,6 +3105,41 @@ object.assign@^4.1.0: has-symbols "^1.0.1" object-keys "^1.1.1" +object.entries@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.5.tgz#e1acdd17c4de2cd96d5a08487cfb9db84d881861" + integrity sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + +object.fromentries@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.5.tgz#7b37b205109c21e741e605727fe8b0ad5fa08251" + integrity sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + +object.hasown@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object.hasown/-/object.hasown-1.1.1.tgz#ad1eecc60d03f49460600430d97f23882cf592a3" + integrity sha512-LYLe4tivNQzq4JdaWW6WO3HMZZJWzkkH8fnI6EebWl0VZth2wL2Lovm74ep2/gZzlaTdV62JZHEqHQ2yVn8Q/A== + dependencies: + define-properties "^1.1.4" + es-abstract "^1.19.5" + +object.values@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" + integrity sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -2489,13 +3147,46 @@ once@^1.3.0: dependencies: wrappy "1" -p-limit@^2.2.0: +optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + +p-limit@^2.0.0, p-limit@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== dependencies: p-try "^2.0.0" +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg== + dependencies: + p-limit "^1.1.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + p-locate@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" @@ -2503,6 +3194,11 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== + p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -2515,6 +3211,14 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw== + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + parse-json@^5.0.0: version "5.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" @@ -2525,6 +3229,11 @@ parse-json@^5.0.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== + path-exists@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" @@ -2540,7 +3249,7 @@ path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-parse@^1.0.7: +path-parse@^1.0.6, path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== @@ -2560,6 +3269,19 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +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-conf@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/pkg-conf/-/pkg-conf-3.1.0.tgz#d9f9c75ea1bae0e77938cde045b276dac7cc69ae" + integrity sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ== + dependencies: + find-up "^3.0.0" + load-json-file "^5.2.0" + 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" @@ -2642,6 +3364,20 @@ preact@^8.3.1: resolved "https://registry.yarnpkg.com/preact/-/preact-8.5.3.tgz#78c2a5562fcecb1fed1d0055fa4ac1e27bde17c1" integrity sha512-O3kKP+1YdgqHOFsZF2a9JVdtqD+RPzCQc3rP+Ualf7V6rmRDchZ9MJbiGTT7LuyqFKZqlHSOyO/oMFmI2lVTsw== +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + +prop-types@^15.8.1: + version "15.8.1" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" + integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.13.1" + punycode@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" @@ -2664,6 +3400,11 @@ randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" +react-is@^16.13.1: + version "16.13.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" + integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== + read-pkg-up@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" @@ -2729,6 +3470,20 @@ regenerator-transform@^0.15.0: dependencies: "@babel/runtime" "^7.8.4" +regexp.prototype.flags@^1.4.1, regexp.prototype.flags@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" + integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + functions-have-names "^1.2.2" + +regexpp@^3.0.0, regexpp@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + regexpu-core@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.0.1.tgz#c531122a7840de743dcf9c83e923b5560323ced3" @@ -2775,7 +3530,7 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== -resolve@^1.10.0, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.9.0: +resolve@^1.10.0, resolve@^1.10.1, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.9.0: version "1.22.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== @@ -2784,6 +3539,14 @@ resolve@^1.10.0, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.9.0: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +resolve@^2.0.0-next.3: + version "2.0.0-next.3" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.3.tgz#d41016293d4a8586a39ca5d9b5f15cbea1f55e46" + integrity sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q== + dependencies: + is-core-module "^2.2.0" + path-parse "^1.0.6" + reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" @@ -2873,7 +3636,7 @@ semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.3.4, semver@^7.3.5: +semver@^7.0.0, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7: version "7.3.7" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== @@ -2906,6 +3669,15 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" @@ -2974,6 +3746,30 @@ spdx-license-ids@^3.0.0: resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz#50c0d8c40a14ec1bf449bae69a0ea4685a9d9f95" integrity sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g== +standard-engine@^15.0.0: + version "15.0.0" + resolved "https://registry.yarnpkg.com/standard-engine/-/standard-engine-15.0.0.tgz#e37ca2e1a589ef85431043a3e87cb9ce95a4ca4e" + integrity sha512-4xwUhJNo1g/L2cleysUqUv7/btn7GEbYJvmgKrQ2vd/8pkTmN8cpqAZg+BT8Z1hNeEH787iWUdOpL8fmApLtxA== + dependencies: + get-stdin "^8.0.0" + minimist "^1.2.6" + pkg-conf "^3.1.0" + xdg-basedir "^4.0.0" + +standard@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/standard/-/standard-17.0.0.tgz#85718ecd04dc4133908434660788708cca855aa1" + integrity sha512-GlCM9nzbLUkr+TYR5I2WQoIah4wHA2lMauqbyPLV/oI5gJxqhHzhjl9EG2N0lr/nRqI3KCbCvm/W3smxvLaChA== + dependencies: + eslint "^8.13.0" + eslint-config-standard "17.0.0" + eslint-config-standard-jsx "^11.0.0" + eslint-plugin-import "^2.26.0" + eslint-plugin-n "^15.1.0" + eslint-plugin-promise "^6.0.0" + eslint-plugin-react "^7.28.0" + standard-engine "^15.0.0" + string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -2983,6 +3779,38 @@ string-width@^4.2.3: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" +string.prototype.matchall@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.7.tgz#8e6ecb0d8a1fb1fda470d81acecb2dba057a481d" + integrity sha512-f48okCX7JiwVi1NXCVWcFnZgADDC/n2vePlQ/KUCNqCikLLilQvwjMO8+BHVKvgzH0JB0J9LEPgxOGT02RoETg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + get-intrinsic "^1.1.1" + has-symbols "^1.0.3" + internal-slot "^1.0.3" + regexp.prototype.flags "^1.4.1" + side-channel "^1.0.4" + +string.prototype.trimend@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz#914a65baaab25fbdd4ee291ca7dde57e869cb8d0" + integrity sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + +string.prototype.trimstart@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz#5466d93ba58cfa2134839f81d7f42437e8c01fef" + integrity sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" @@ -2990,6 +3818,11 @@ strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== + strip-indent@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" @@ -2997,6 +3830,11 @@ strip-indent@^3.0.0: dependencies: min-indent "^1.0.0" +strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + style-search@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/style-search/-/style-search-0.1.0.tgz#7958c793e47e32e07d2b5cafe5c0bf8e12e77902" @@ -3115,7 +3953,7 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" -supports-color@^7.0.0: +supports-color@^7.0.0, supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== @@ -3184,6 +4022,11 @@ terser@^5.7.2: commander "^2.20.0" source-map-support "~0.5.20" +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== + to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" @@ -3201,11 +4044,38 @@ trim-newlines@^3.0.0: resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== +tsconfig-paths@^3.14.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" + integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.6" + strip-bom "^3.0.0" + +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + type-fest@^0.18.0: version "0.18.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" integrity sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw== +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + +type-fest@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" + integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ== + type-fest@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" @@ -3216,6 +4086,16 @@ type-fest@^0.8.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== +unbox-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== + dependencies: + call-bind "^1.0.2" + has-bigints "^1.0.2" + has-symbols "^1.0.3" + which-boxed-primitive "^1.0.2" + unfetch@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.2.0.tgz#7e21b0ef7d363d8d9af0fb929a5555f6ef97a3be" @@ -3256,7 +4136,7 @@ util-deprecate@^1.0.2: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== -v8-compile-cache@^2.3.0: +v8-compile-cache@^2.0.3, v8-compile-cache@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== @@ -3345,6 +4225,17 @@ webpack@^5.70.0: watchpack "^2.3.1" webpack-sources "^3.2.3" +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" @@ -3364,6 +4255,11 @@ wildcard@^2.0.0: resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== +word-wrap@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -3377,6 +4273,11 @@ write-file-atomic@^4.0.1: imurmurhash "^0.1.4" signal-exit "^3.0.7" +xdg-basedir@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13" + integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== + yallist@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"