Merge branch 'unstable' into 'main'
A lot of fixes See merge request internship-2025/survey-webapp/survey-webapp!16
|
|
@ -0,0 +1,84 @@
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using SurveyBackend.DTOs.AnswerVariant;
|
||||||
|
using SurveyBackend.Mappers;
|
||||||
|
using SurveyLib.Core.Services;
|
||||||
|
|
||||||
|
namespace SurveyBackend.Controllers;
|
||||||
|
|
||||||
|
[ApiController]
|
||||||
|
[Route("api/surveys/{surveyId}/questions/{questionId}/answerVariants")]
|
||||||
|
public class AnswerVariantsController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly IAnswerVariantsService _answerVariantsService;
|
||||||
|
|
||||||
|
public AnswerVariantsController(IAnswerVariantsService answerVariantsService)
|
||||||
|
{
|
||||||
|
_answerVariantsService = answerVariantsService;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Получить варианты ответа на вопрос
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="surveyId"></param>
|
||||||
|
/// <param name="questionId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[AllowAnonymous]
|
||||||
|
[HttpGet]
|
||||||
|
public async Task<IActionResult> Get(int surveyId, int questionId)
|
||||||
|
{
|
||||||
|
var answerVariants = await _answerVariantsService.GetAnswerVariantsByQuestionIdAsync(questionId);
|
||||||
|
var result = answerVariants.Select(AnswerVariantMapper.ModelToOutputDto);
|
||||||
|
return Ok(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Добавить новый вариант ответа для вопроса
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="surveyId">Идентификатор опроса</param>
|
||||||
|
/// <param name="questionId">Идентификатор вопроса</param>
|
||||||
|
/// <param name="dto">Объект с данными для создания варианта ответа</param>
|
||||||
|
/// <returns>Результат операции добавления</returns>
|
||||||
|
[Authorize]
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IActionResult> Add(int surveyId, int questionId, [FromBody] AnswerVariantCreateDto dto)
|
||||||
|
{
|
||||||
|
var model = AnswerVariantMapper.CreateDtoToModel(dto, questionId);
|
||||||
|
await _answerVariantsService.AddAnswerVariantAsync(model);
|
||||||
|
var result = AnswerVariantMapper.ModelToOutputDto(model);
|
||||||
|
return Ok(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Обновить вариант ответа на вопрос
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="surveyId">Идентификатор опроса</param>
|
||||||
|
/// <param name="questionId">Идентификатор вопроса</param>
|
||||||
|
/// <param name="id">Идентификатор варианта ответа</param>
|
||||||
|
/// <param name="dto">Объект с данными для обновления варианта ответа</param>
|
||||||
|
/// <returns>Результат обновленного варианта ответа</returns>
|
||||||
|
[Authorize]
|
||||||
|
[HttpPut("{id}")]
|
||||||
|
public async Task<IActionResult> Update(int surveyId, int questionId, int id, [FromBody] AnswerVariantUpdateDto dto)
|
||||||
|
{
|
||||||
|
var model = AnswerVariantMapper.UpdateDtoToModel(dto, questionId, id);
|
||||||
|
await _answerVariantsService.UpdateAnswerVariantAsync(model);
|
||||||
|
var result = AnswerVariantMapper.ModelToOutputDto(model);
|
||||||
|
return Ok(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Удалить вариант ответа на вопрос
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="surveyId">Идентификатор опроса</param>
|
||||||
|
/// <param name="questionId">Идентификатор вопроса</param>
|
||||||
|
/// <param name="id">Идентификатор варианта ответа</param>
|
||||||
|
/// <returns>Результат операции удаления</returns>
|
||||||
|
[Authorize]
|
||||||
|
[HttpDelete("{id}")]
|
||||||
|
public async Task<IActionResult> Delete(int surveyId, int questionId, int id)
|
||||||
|
{
|
||||||
|
await _answerVariantsService.DeleteAnswerVariantAsync(id);
|
||||||
|
return Ok();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -67,6 +67,11 @@ public class AuthController : ControllerBase
|
||||||
return Ok(new { token = token });
|
return Ok(new { token = token });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Получить информацию о нынешнем юзере
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>Возвращает инфо о пользователе, токен которого был использован</remarks>
|
||||||
|
/// <returns></returns>
|
||||||
[Authorize]
|
[Authorize]
|
||||||
[HttpGet("me")]
|
[HttpGet("me")]
|
||||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,13 @@ public class QuestionController : ControllerBase
|
||||||
return Ok(result);
|
return Ok(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Обновляет вопрос целиком
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dto"></param>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <param name="surveyId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
[Authorize]
|
[Authorize]
|
||||||
[HttpPut("{id}")]
|
[HttpPut("{id}")]
|
||||||
public async Task<IActionResult> UpdateQuestion([FromBody] QuestionUpdateDto dto, [FromRoute] int id,
|
public async Task<IActionResult> UpdateQuestion([FromBody] QuestionUpdateDto dto, [FromRoute] int id,
|
||||||
|
|
@ -67,6 +74,12 @@ public class QuestionController : ControllerBase
|
||||||
return Ok(result);
|
return Ok(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Удаляет вопрос по его ID
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <param name="surveyId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
[Authorize]
|
[Authorize]
|
||||||
[HttpDelete("{id}")]
|
[HttpDelete("{id}")]
|
||||||
public async Task<IActionResult> DeleteQuestion([FromRoute] int id, [FromRoute] int surveyId)
|
public async Task<IActionResult> DeleteQuestion([FromRoute] int id, [FromRoute] int surveyId)
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,8 @@ public class SurveyController : ControllerBase
|
||||||
{
|
{
|
||||||
var userId = _userContext.UserId;
|
var userId = _userContext.UserId;
|
||||||
|
|
||||||
var result = await _surveyService.GetSurveysByUserIdAsync(userId);
|
var surveys = await _surveyService.GetSurveysByUserIdAsync(userId);
|
||||||
|
var result = surveys.Select(SurveyMapper.ModelToOutputDto);
|
||||||
return Ok(result);
|
return Ok(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using SurveyLib.Core.Services;
|
|
||||||
|
|
||||||
namespace SurveyBackend.Controllers;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Удалим когда-нибудь
|
|
||||||
/// </summary>
|
|
||||||
[ApiController]
|
|
||||||
[Route("api/test")]
|
|
||||||
public class TestController : ControllerBase
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
namespace SurveyBackend.DTOs.AnswerVariant;
|
||||||
|
|
||||||
|
public class AnswerVariantCreateDto
|
||||||
|
{
|
||||||
|
public required string Text { get; set; }
|
||||||
|
}
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
namespace SurveyBackend.DTOs.Question;
|
namespace SurveyBackend.DTOs.AnswerVariant;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Выходная схема вариантов ответа
|
/// Выходная схема вариантов ответа
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class OutputAnswerVariantDto
|
public class AnswerVariantOutputDto
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ID варианта ответа
|
/// ID варианта ответа
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
namespace SurveyBackend.DTOs.AnswerVariant;
|
||||||
|
|
||||||
|
public class AnswerVariantUpdateDto : AnswerVariantCreateDto
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
using SurveyBackend.DTOs.AnswerVariant;
|
||||||
|
|
||||||
namespace SurveyBackend.DTOs.Question;
|
namespace SurveyBackend.DTOs.Question;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -28,5 +30,5 @@ public class QuestionOutputDto
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Варианты ответа
|
/// Варианты ответа
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<OutputAnswerVariantDto>? AnswerVariants { get; set; }
|
public List<AnswerVariantOutputDto>? AnswerVariants { get; set; }
|
||||||
}
|
}
|
||||||
|
|
@ -9,16 +9,21 @@ public class SurveyOutputDto
|
||||||
/// ID опроса
|
/// ID опроса
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public required int Id { get; set; }
|
public required int Id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Название опроса
|
/// Название опроса
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public required string Title { get; set; }
|
public required string Title { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Описание опроса
|
/// Описание опроса
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public required string Description { get; set; }
|
public required string Description { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Создатель опроса (опционально)
|
/// Создатель опроса (опционально)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? CreatedBy { get; set; }
|
public int? CreatedBy { get; set; }
|
||||||
|
|
||||||
|
public required DateTime CreatedAt { get; set; }
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
using SurveyBackend.DTOs.AnswerVariant;
|
||||||
|
using SurveyLib.Core.Models;
|
||||||
|
|
||||||
|
namespace SurveyBackend.Mappers;
|
||||||
|
|
||||||
|
public static class AnswerVariantMapper
|
||||||
|
{
|
||||||
|
public static AnswerVariant CreateDtoToModel(AnswerVariantCreateDto dto, int questionId) => new AnswerVariant
|
||||||
|
{
|
||||||
|
QuestionId = questionId,
|
||||||
|
Text = dto.Text
|
||||||
|
};
|
||||||
|
|
||||||
|
public static AnswerVariant UpdateDtoToModel(AnswerVariantUpdateDto dto, int answerVariantId, int questionId) =>
|
||||||
|
new AnswerVariant
|
||||||
|
{
|
||||||
|
QuestionId = questionId,
|
||||||
|
Id = answerVariantId,
|
||||||
|
Text = dto.Text
|
||||||
|
};
|
||||||
|
|
||||||
|
public static AnswerVariantOutputDto ModelToOutputDto(AnswerVariant model) => new AnswerVariantOutputDto
|
||||||
|
{
|
||||||
|
Id = model.Id,
|
||||||
|
QuestionId = model.QuestionId,
|
||||||
|
Text = model.Text
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
using SurveyBackend.DTOs.AnswerVariant;
|
||||||
using SurveyBackend.DTOs.Question;
|
using SurveyBackend.DTOs.Question;
|
||||||
using SurveyBackend.Services.Exceptions;
|
using SurveyBackend.Services.Exceptions;
|
||||||
using SurveyLib.Core.Models;
|
using SurveyLib.Core.Models;
|
||||||
|
|
@ -88,9 +89,9 @@ public static class QuestionMapper
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<OutputAnswerVariantDto> AnswerVariantsToDto(IEnumerable<AnswerVariant> answerVariants)
|
private static List<AnswerVariantOutputDto> AnswerVariantsToDto(IEnumerable<AnswerVariant> answerVariants)
|
||||||
{
|
{
|
||||||
return answerVariants.Select(av => new OutputAnswerVariantDto
|
return answerVariants.Select(av => new AnswerVariantOutputDto
|
||||||
{
|
{
|
||||||
Id = av.Id,
|
Id = av.Id,
|
||||||
QuestionId = av.QuestionId,
|
QuestionId = av.QuestionId,
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ public static class SurveyMapper
|
||||||
Title = survey.Title,
|
Title = survey.Title,
|
||||||
Description = survey.Description,
|
Description = survey.Description,
|
||||||
CreatedBy = survey.CreatedBy,
|
CreatedBy = survey.CreatedBy,
|
||||||
|
CreatedAt = survey.CreatedAt,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -48,9 +48,11 @@ public class Program
|
||||||
|
|
||||||
builder.Services.AddScoped<ISurveyRepository, SurveyRepository>();
|
builder.Services.AddScoped<ISurveyRepository, SurveyRepository>();
|
||||||
builder.Services.AddScoped<IQuestionRepository, QuestionRepository>();
|
builder.Services.AddScoped<IQuestionRepository, QuestionRepository>();
|
||||||
|
builder.Services.AddScoped<IAnswerVariantsRepository, AnswerVariantsRepository>();
|
||||||
|
|
||||||
builder.Services.AddScoped<ISurveyService, SurveyService>();
|
builder.Services.AddScoped<ISurveyService, SurveyService>();
|
||||||
builder.Services.AddScoped<IQuestionService, QuestionService>();
|
builder.Services.AddScoped<IQuestionService, QuestionService>();
|
||||||
|
builder.Services.AddScoped<IAnswerVariantsService, AnswerVariantsService>();
|
||||||
|
|
||||||
|
|
||||||
builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
|
builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,311 @@
|
||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using SurveyBackend.Infrastructure.Data;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace SurveyBackend.Infrastructure.Data.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(ApplicationDbContext))]
|
||||||
|
[Migration("20250520111858_Add CreatedAt to survey")]
|
||||||
|
partial class AddCreatedAttosurvey
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder.HasAnnotation("ProductVersion", "8.0.15");
|
||||||
|
|
||||||
|
modelBuilder.Entity("GroupUser", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("GroupsId")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<int>("UsersId")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.HasKey("GroupsId", "UsersId");
|
||||||
|
|
||||||
|
b.HasIndex("UsersId");
|
||||||
|
|
||||||
|
b.ToTable("GroupUser");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SurveyBackend.Core.Models.Group", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("Label")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Groups");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SurveyBackend.Core.Models.User", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<string>("FirstName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<string>("LastName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<string>("Password")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Users");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SurveyLib.Core.Models.Answer", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("CompletionId")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<int>("QuestionId")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("AnswerText")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.HasKey("CompletionId", "QuestionId");
|
||||||
|
|
||||||
|
b.HasIndex("QuestionId");
|
||||||
|
|
||||||
|
b.ToTable("Answers");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SurveyLib.Core.Models.AnswerVariant", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<int>("QuestionId")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("Text")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("QuestionId");
|
||||||
|
|
||||||
|
b.ToTable("AnswerVariants");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SurveyLib.Core.Models.Completion", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<DateTime>("FinishedAt")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<int>("SurveyId")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("SurveyId");
|
||||||
|
|
||||||
|
b.ToTable("Completions");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SurveyLib.Core.Models.QuestionBase", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("Discriminator")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(34)
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<int>("SurveyId")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("Title")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("SurveyId");
|
||||||
|
|
||||||
|
b.ToTable("Questions");
|
||||||
|
|
||||||
|
b.HasDiscriminator().HasValue("QuestionBase");
|
||||||
|
|
||||||
|
b.UseTphMappingStrategy();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SurveyLib.Core.Models.Survey", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreatedAt")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<int?>("CreatedBy")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("Description")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<string>("Title")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("CreatedBy");
|
||||||
|
|
||||||
|
b.ToTable("Surveys");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SurveyLib.Core.Models.QuestionVariants.MultipleAnswerQuestion", b =>
|
||||||
|
{
|
||||||
|
b.HasBaseType("SurveyLib.Core.Models.QuestionBase");
|
||||||
|
|
||||||
|
b.HasDiscriminator().HasValue("MultipleAnswerQuestion");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SurveyLib.Core.Models.QuestionVariants.SingleAnswerQuestion", b =>
|
||||||
|
{
|
||||||
|
b.HasBaseType("SurveyLib.Core.Models.QuestionBase");
|
||||||
|
|
||||||
|
b.HasDiscriminator().HasValue("SingleAnswerQuestion");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SurveyLib.Core.Models.QuestionVariants.TextQuestion", b =>
|
||||||
|
{
|
||||||
|
b.HasBaseType("SurveyLib.Core.Models.QuestionBase");
|
||||||
|
|
||||||
|
b.HasDiscriminator().HasValue("TextQuestion");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("GroupUser", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("SurveyBackend.Core.Models.Group", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("GroupsId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("SurveyBackend.Core.Models.User", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UsersId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SurveyLib.Core.Models.Answer", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("SurveyLib.Core.Models.Completion", "Completion")
|
||||||
|
.WithMany("Answers")
|
||||||
|
.HasForeignKey("CompletionId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("SurveyLib.Core.Models.QuestionBase", "Question")
|
||||||
|
.WithMany("Answers")
|
||||||
|
.HasForeignKey("QuestionId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Completion");
|
||||||
|
|
||||||
|
b.Navigation("Question");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SurveyLib.Core.Models.AnswerVariant", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("SurveyLib.Core.Models.QuestionBase", "Question")
|
||||||
|
.WithMany("AnswerVariants")
|
||||||
|
.HasForeignKey("QuestionId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Question");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SurveyLib.Core.Models.Completion", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("SurveyLib.Core.Models.Survey", "Survey")
|
||||||
|
.WithMany("Completions")
|
||||||
|
.HasForeignKey("SurveyId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Survey");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SurveyLib.Core.Models.QuestionBase", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("SurveyLib.Core.Models.Survey", "Survey")
|
||||||
|
.WithMany("Questions")
|
||||||
|
.HasForeignKey("SurveyId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Survey");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SurveyLib.Core.Models.Survey", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("SurveyBackend.Core.Models.User", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("CreatedBy")
|
||||||
|
.OnDelete(DeleteBehavior.SetNull);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SurveyLib.Core.Models.Completion", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Answers");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SurveyLib.Core.Models.QuestionBase", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("AnswerVariants");
|
||||||
|
|
||||||
|
b.Navigation("Answers");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SurveyLib.Core.Models.Survey", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Completions");
|
||||||
|
|
||||||
|
b.Navigation("Questions");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,90 @@
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace SurveyBackend.Infrastructure.Data.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class AddCreatedAttosurvey : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_AnswerVariant_Questions_QuestionId",
|
||||||
|
table: "AnswerVariant");
|
||||||
|
|
||||||
|
migrationBuilder.DropPrimaryKey(
|
||||||
|
name: "PK_AnswerVariant",
|
||||||
|
table: "AnswerVariant");
|
||||||
|
|
||||||
|
migrationBuilder.RenameTable(
|
||||||
|
name: "AnswerVariant",
|
||||||
|
newName: "AnswerVariants");
|
||||||
|
|
||||||
|
migrationBuilder.RenameIndex(
|
||||||
|
name: "IX_AnswerVariant_QuestionId",
|
||||||
|
table: "AnswerVariants",
|
||||||
|
newName: "IX_AnswerVariants_QuestionId");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<DateTime>(
|
||||||
|
name: "CreatedAt",
|
||||||
|
table: "Surveys",
|
||||||
|
type: "TEXT",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||||
|
|
||||||
|
migrationBuilder.AddPrimaryKey(
|
||||||
|
name: "PK_AnswerVariants",
|
||||||
|
table: "AnswerVariants",
|
||||||
|
column: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_AnswerVariants_Questions_QuestionId",
|
||||||
|
table: "AnswerVariants",
|
||||||
|
column: "QuestionId",
|
||||||
|
principalTable: "Questions",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_AnswerVariants_Questions_QuestionId",
|
||||||
|
table: "AnswerVariants");
|
||||||
|
|
||||||
|
migrationBuilder.DropPrimaryKey(
|
||||||
|
name: "PK_AnswerVariants",
|
||||||
|
table: "AnswerVariants");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "CreatedAt",
|
||||||
|
table: "Surveys");
|
||||||
|
|
||||||
|
migrationBuilder.RenameTable(
|
||||||
|
name: "AnswerVariants",
|
||||||
|
newName: "AnswerVariant");
|
||||||
|
|
||||||
|
migrationBuilder.RenameIndex(
|
||||||
|
name: "IX_AnswerVariants_QuestionId",
|
||||||
|
table: "AnswerVariant",
|
||||||
|
newName: "IX_AnswerVariant_QuestionId");
|
||||||
|
|
||||||
|
migrationBuilder.AddPrimaryKey(
|
||||||
|
name: "PK_AnswerVariant",
|
||||||
|
table: "AnswerVariant",
|
||||||
|
column: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_AnswerVariant_Questions_QuestionId",
|
||||||
|
table: "AnswerVariant",
|
||||||
|
column: "QuestionId",
|
||||||
|
principalTable: "Questions",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -110,7 +110,7 @@ namespace SurveyBackend.Infrastructure.Data.Migrations
|
||||||
|
|
||||||
b.HasIndex("QuestionId");
|
b.HasIndex("QuestionId");
|
||||||
|
|
||||||
b.ToTable("AnswerVariant");
|
b.ToTable("AnswerVariants");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("SurveyLib.Core.Models.Completion", b =>
|
modelBuilder.Entity("SurveyLib.Core.Models.Completion", b =>
|
||||||
|
|
@ -167,6 +167,9 @@ namespace SurveyBackend.Infrastructure.Data.Migrations
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreatedAt")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<int?>("CreatedBy")
|
b.Property<int?>("CreatedBy")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
using SurveyLib.Core.Models;
|
||||||
|
using SurveyLib.Core.Repositories;
|
||||||
|
using SurveyLib.Core.Services;
|
||||||
|
|
||||||
|
namespace SurveyBackend.Services.Services;
|
||||||
|
|
||||||
|
public class AnswerVariantsService : IAnswerVariantsService
|
||||||
|
{
|
||||||
|
private readonly IAnswerVariantsRepository _answerVariantsRepository;
|
||||||
|
|
||||||
|
public AnswerVariantsService(IAnswerVariantsRepository answerVariantsRepository)
|
||||||
|
{
|
||||||
|
_answerVariantsRepository = answerVariantsRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task AddAnswerVariantAsync(AnswerVariant answerVariant)
|
||||||
|
{
|
||||||
|
await _answerVariantsRepository.AddAsync(answerVariant);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task UpdateAnswerVariantAsync(AnswerVariant answerVariant)
|
||||||
|
{
|
||||||
|
await _answerVariantsRepository.UpdateAsync(answerVariant);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task DeleteAnswerVariantAsync(int id)
|
||||||
|
{
|
||||||
|
await _answerVariantsRepository.DeleteAsync(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<AnswerVariant> GetAnswerVariantByIdAsync(int id)
|
||||||
|
{
|
||||||
|
return await _answerVariantsRepository.GetByIdAsync(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<AnswerVariant>> GetAnswerVariantsByQuestionIdAsync(int questionId)
|
||||||
|
{
|
||||||
|
return await _answerVariantsRepository.GetAnswerVariantsByQuestionIdAsync(questionId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -38,7 +38,7 @@ public class QuestionService : IQuestionService
|
||||||
throw new NotFoundException("Question not found");
|
throw new NotFoundException("Question not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
await _questionRepository.DeleteAsync(question);
|
await _questionRepository.DeleteAsync(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<QuestionBase> GetQuestionByIdAsync(int id)
|
public async Task<QuestionBase> GetQuestionByIdAsync(int id)
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ public class SurveyService : ISurveyService
|
||||||
throw new UnauthorizedException("You are not authorized to delete this survey.");
|
throw new UnauthorizedException("You are not authorized to delete this survey.");
|
||||||
}
|
}
|
||||||
|
|
||||||
await _surveyRepository.DeleteAsync(survey);
|
await _surveyRepository.DeleteAsync(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<IEnumerable<Survey>> GetSurveysAsync()
|
public async Task<IEnumerable<Survey>> GetSurveysAsync()
|
||||||
|
|
|
||||||
456
SurveyFrontend/package-lock.json
generated
|
|
@ -25,7 +25,8 @@
|
||||||
"globals": "^15.15.0",
|
"globals": "^15.15.0",
|
||||||
"typescript": "~5.7.2",
|
"typescript": "~5.7.2",
|
||||||
"typescript-eslint": "^8.24.1",
|
"typescript-eslint": "^8.24.1",
|
||||||
"vite": "^6.2.0"
|
"vite": "^6.2.0",
|
||||||
|
"vite-plugin-svgr": "^4.3.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@ampproject/remapping": {
|
"node_modules/@ampproject/remapping": {
|
||||||
|
|
@ -994,6 +995,42 @@
|
||||||
"node": ">= 8"
|
"node": ">= 8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@rollup/pluginutils": {
|
||||||
|
"version": "5.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.4.tgz",
|
||||||
|
"integrity": "sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/estree": "^1.0.0",
|
||||||
|
"estree-walker": "^2.0.2",
|
||||||
|
"picomatch": "^4.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"rollup": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@rollup/pluginutils/node_modules/picomatch": {
|
||||||
|
"version": "4.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
|
||||||
|
"integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/jonschlinkert"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@rollup/rollup-android-arm-eabi": {
|
"node_modules/@rollup/rollup-android-arm-eabi": {
|
||||||
"version": "4.35.0",
|
"version": "4.35.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.35.0.tgz",
|
||||||
|
|
@ -1241,6 +1278,231 @@
|
||||||
"win32"
|
"win32"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"node_modules/@svgr/babel-plugin-add-jsx-attribute": {
|
||||||
|
"version": "8.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-8.0.0.tgz",
|
||||||
|
"integrity": "sha512-b9MIk7yhdS1pMCZM8VeNfUlSKVRhsHZNMl5O9SfaX0l0t5wjdgu4IDzGB8bpnGBBOjGST3rRFVsaaEtI4W6f7g==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/gregberge"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@babel/core": "^7.0.0-0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@svgr/babel-plugin-remove-jsx-attribute": {
|
||||||
|
"version": "8.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-8.0.0.tgz",
|
||||||
|
"integrity": "sha512-BcCkm/STipKvbCl6b7QFrMh/vx00vIP63k2eM66MfHJzPr6O2U0jYEViXkHJWqXqQYjdeA9cuCl5KWmlwjDvbA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/gregberge"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@babel/core": "^7.0.0-0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@svgr/babel-plugin-remove-jsx-empty-expression": {
|
||||||
|
"version": "8.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-8.0.0.tgz",
|
||||||
|
"integrity": "sha512-5BcGCBfBxB5+XSDSWnhTThfI9jcO5f0Ai2V24gZpG+wXF14BzwxxdDb4g6trdOux0rhibGs385BeFMSmxtS3uA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/gregberge"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@babel/core": "^7.0.0-0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@svgr/babel-plugin-replace-jsx-attribute-value": {
|
||||||
|
"version": "8.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-8.0.0.tgz",
|
||||||
|
"integrity": "sha512-KVQ+PtIjb1BuYT3ht8M5KbzWBhdAjjUPdlMtpuw/VjT8coTrItWX6Qafl9+ji831JaJcu6PJNKCV0bp01lBNzQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/gregberge"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@babel/core": "^7.0.0-0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@svgr/babel-plugin-svg-dynamic-title": {
|
||||||
|
"version": "8.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-8.0.0.tgz",
|
||||||
|
"integrity": "sha512-omNiKqwjNmOQJ2v6ge4SErBbkooV2aAWwaPFs2vUY7p7GhVkzRkJ00kILXQvRhA6miHnNpXv7MRnnSjdRjK8og==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/gregberge"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@babel/core": "^7.0.0-0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@svgr/babel-plugin-svg-em-dimensions": {
|
||||||
|
"version": "8.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-8.0.0.tgz",
|
||||||
|
"integrity": "sha512-mURHYnu6Iw3UBTbhGwE/vsngtCIbHE43xCRK7kCw4t01xyGqb2Pd+WXekRRoFOBIY29ZoOhUCTEweDMdrjfi9g==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/gregberge"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@babel/core": "^7.0.0-0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@svgr/babel-plugin-transform-react-native-svg": {
|
||||||
|
"version": "8.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-8.1.0.tgz",
|
||||||
|
"integrity": "sha512-Tx8T58CHo+7nwJ+EhUwx3LfdNSG9R2OKfaIXXs5soiy5HtgoAEkDay9LIimLOcG8dJQH1wPZp/cnAv6S9CrR1Q==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/gregberge"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@babel/core": "^7.0.0-0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@svgr/babel-plugin-transform-svg-component": {
|
||||||
|
"version": "8.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-8.0.0.tgz",
|
||||||
|
"integrity": "sha512-DFx8xa3cZXTdb/k3kfPeaixecQLgKh5NVBMwD0AQxOzcZawK4oo1Jh9LbrcACUivsCA7TLG8eeWgrDXjTMhRmw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/gregberge"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@babel/core": "^7.0.0-0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@svgr/babel-preset": {
|
||||||
|
"version": "8.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@svgr/babel-preset/-/babel-preset-8.1.0.tgz",
|
||||||
|
"integrity": "sha512-7EYDbHE7MxHpv4sxvnVPngw5fuR6pw79SkcrILHJ/iMpuKySNCl5W1qcwPEpU+LgyRXOaAFgH0KhwD18wwg6ug==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@svgr/babel-plugin-add-jsx-attribute": "8.0.0",
|
||||||
|
"@svgr/babel-plugin-remove-jsx-attribute": "8.0.0",
|
||||||
|
"@svgr/babel-plugin-remove-jsx-empty-expression": "8.0.0",
|
||||||
|
"@svgr/babel-plugin-replace-jsx-attribute-value": "8.0.0",
|
||||||
|
"@svgr/babel-plugin-svg-dynamic-title": "8.0.0",
|
||||||
|
"@svgr/babel-plugin-svg-em-dimensions": "8.0.0",
|
||||||
|
"@svgr/babel-plugin-transform-react-native-svg": "8.1.0",
|
||||||
|
"@svgr/babel-plugin-transform-svg-component": "8.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/gregberge"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@babel/core": "^7.0.0-0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@svgr/core": {
|
||||||
|
"version": "8.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@svgr/core/-/core-8.1.0.tgz",
|
||||||
|
"integrity": "sha512-8QqtOQT5ACVlmsvKOJNEaWmRPmcojMOzCz4Hs2BGG/toAp/K38LcsMRyLp349glq5AzJbCEeimEoxaX6v/fLrA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/core": "^7.21.3",
|
||||||
|
"@svgr/babel-preset": "8.1.0",
|
||||||
|
"camelcase": "^6.2.0",
|
||||||
|
"cosmiconfig": "^8.1.3",
|
||||||
|
"snake-case": "^3.0.4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/gregberge"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@svgr/hast-util-to-babel-ast": {
|
||||||
|
"version": "8.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-8.0.0.tgz",
|
||||||
|
"integrity": "sha512-EbDKwO9GpfWP4jN9sGdYwPBU0kdomaPIL2Eu4YwmgP+sJeXT+L7bMwJUBnhzfH8Q2qMBqZ4fJwpCyYsAN3mt2Q==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/types": "^7.21.3",
|
||||||
|
"entities": "^4.4.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/gregberge"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@svgr/plugin-jsx": {
|
||||||
|
"version": "8.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@svgr/plugin-jsx/-/plugin-jsx-8.1.0.tgz",
|
||||||
|
"integrity": "sha512-0xiIyBsLlr8quN+WyuxooNW9RJ0Dpr8uOnH/xrCVO8GLUcwHISwj1AG0k+LFzteTkAA0GbX0kj9q6Dk70PTiPA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/core": "^7.21.3",
|
||||||
|
"@svgr/babel-preset": "8.1.0",
|
||||||
|
"@svgr/hast-util-to-babel-ast": "8.0.0",
|
||||||
|
"svg-parser": "^2.0.4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/gregberge"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@svgr/core": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/babel__core": {
|
"node_modules/@types/babel__core": {
|
||||||
"version": "7.20.5",
|
"version": "7.20.5",
|
||||||
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
|
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
|
||||||
|
|
@ -1666,6 +1928,19 @@
|
||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/camelcase": {
|
||||||
|
"version": "6.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
|
||||||
|
"integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/caniuse-lite": {
|
"node_modules/caniuse-lite": {
|
||||||
"version": "1.0.30001704",
|
"version": "1.0.30001704",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001704.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001704.tgz",
|
||||||
|
|
@ -1741,6 +2016,33 @@
|
||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/cosmiconfig": {
|
||||||
|
"version": "8.3.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz",
|
||||||
|
"integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"import-fresh": "^3.3.0",
|
||||||
|
"js-yaml": "^4.1.0",
|
||||||
|
"parse-json": "^5.2.0",
|
||||||
|
"path-type": "^4.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/d-fischer"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"typescript": ">=4.9.5"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"typescript": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/cross-spawn": {
|
"node_modules/cross-spawn": {
|
||||||
"version": "7.0.6",
|
"version": "7.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
||||||
|
|
@ -1784,12 +2086,46 @@
|
||||||
"integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
|
"integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/dot-case": {
|
||||||
|
"version": "3.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz",
|
||||||
|
"integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"no-case": "^3.0.4",
|
||||||
|
"tslib": "^2.0.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/electron-to-chromium": {
|
"node_modules/electron-to-chromium": {
|
||||||
"version": "1.5.118",
|
"version": "1.5.118",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.118.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.118.tgz",
|
||||||
"integrity": "sha512-yNDUus0iultYyVoEFLnQeei7LOQkL8wg8GQpkPCRrOlJXlcCwa6eGKZkxQ9ciHsqZyYbj8Jd94X1CTPzGm+uIA==",
|
"integrity": "sha512-yNDUus0iultYyVoEFLnQeei7LOQkL8wg8GQpkPCRrOlJXlcCwa6eGKZkxQ9ciHsqZyYbj8Jd94X1CTPzGm+uIA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/entities": {
|
||||||
|
"version": "4.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
|
||||||
|
"integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "BSD-2-Clause",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/fb55/entities?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/error-ex": {
|
||||||
|
"version": "1.3.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
|
||||||
|
"integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"is-arrayish": "^0.2.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/esbuild": {
|
"node_modules/esbuild": {
|
||||||
"version": "0.25.1",
|
"version": "0.25.1",
|
||||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.1.tgz",
|
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.1.tgz",
|
||||||
|
|
@ -2010,6 +2346,13 @@
|
||||||
"node": ">=4.0"
|
"node": ">=4.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/estree-walker": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
|
||||||
|
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/esutils": {
|
"node_modules/esutils": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
|
||||||
|
|
@ -2229,6 +2572,13 @@
|
||||||
"node": ">=0.8.19"
|
"node": ">=0.8.19"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/is-arrayish": {
|
||||||
|
"version": "0.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
|
||||||
|
"integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/is-extglob": {
|
"node_modules/is-extglob": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
||||||
|
|
@ -2301,6 +2651,13 @@
|
||||||
"integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
|
"integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/json-parse-even-better-errors": {
|
||||||
|
"version": "2.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
|
||||||
|
"integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/json-schema-traverse": {
|
"node_modules/json-schema-traverse": {
|
||||||
"version": "0.4.1",
|
"version": "0.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
|
||||||
|
|
@ -2347,6 +2704,13 @@
|
||||||
"node": ">= 0.8.0"
|
"node": ">= 0.8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/lines-and-columns": {
|
||||||
|
"version": "1.2.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
|
||||||
|
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/locate-path": {
|
"node_modules/locate-path": {
|
||||||
"version": "6.0.0",
|
"version": "6.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
|
||||||
|
|
@ -2368,6 +2732,16 @@
|
||||||
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
|
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/lower-case": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz",
|
||||||
|
"integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "^2.0.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/lru-cache": {
|
"node_modules/lru-cache": {
|
||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
|
||||||
|
|
@ -2441,6 +2815,17 @@
|
||||||
"integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
|
"integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/no-case": {
|
||||||
|
"version": "3.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
|
||||||
|
"integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"lower-case": "^2.0.2",
|
||||||
|
"tslib": "^2.0.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/node-releases": {
|
"node_modules/node-releases": {
|
||||||
"version": "2.0.19",
|
"version": "2.0.19",
|
||||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz",
|
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz",
|
||||||
|
|
@ -2506,6 +2891,25 @@
|
||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/parse-json": {
|
||||||
|
"version": "5.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
|
||||||
|
"integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/code-frame": "^7.0.0",
|
||||||
|
"error-ex": "^1.3.1",
|
||||||
|
"json-parse-even-better-errors": "^2.3.0",
|
||||||
|
"lines-and-columns": "^1.1.6"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/path-exists": {
|
"node_modules/path-exists": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
|
||||||
|
|
@ -2524,6 +2928,16 @@
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/path-type": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/picocolors": {
|
"node_modules/picocolors": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
||||||
|
|
@ -2796,6 +3210,17 @@
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/snake-case": {
|
||||||
|
"version": "3.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz",
|
||||||
|
"integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"dot-case": "^3.0.4",
|
||||||
|
"tslib": "^2.0.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/source-map-js": {
|
"node_modules/source-map-js": {
|
||||||
"version": "1.2.1",
|
"version": "1.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
||||||
|
|
@ -2829,6 +3254,13 @@
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/svg-parser": {
|
||||||
|
"version": "2.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.4.tgz",
|
||||||
|
"integrity": "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/to-regex-range": {
|
"node_modules/to-regex-range": {
|
||||||
"version": "5.0.1",
|
"version": "5.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||||
|
|
@ -2853,6 +3285,13 @@
|
||||||
"typescript": ">=4.8.4"
|
"typescript": ">=4.8.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/tslib": {
|
||||||
|
"version": "2.8.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
||||||
|
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "0BSD"
|
||||||
|
},
|
||||||
"node_modules/turbo-stream": {
|
"node_modules/turbo-stream": {
|
||||||
"version": "2.4.0",
|
"version": "2.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/turbo-stream/-/turbo-stream-2.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/turbo-stream/-/turbo-stream-2.4.0.tgz",
|
||||||
|
|
@ -3029,6 +3468,21 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/vite-plugin-svgr": {
|
||||||
|
"version": "4.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/vite-plugin-svgr/-/vite-plugin-svgr-4.3.0.tgz",
|
||||||
|
"integrity": "sha512-Jy9qLB2/PyWklpYy0xk0UU3TlU0t2UMpJXZvf+hWII1lAmRHrOUKi11Uw8N3rxoNk7atZNYO3pR3vI1f7oi+6w==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@rollup/pluginutils": "^5.1.3",
|
||||||
|
"@svgr/core": "^8.1.0",
|
||||||
|
"@svgr/plugin-jsx": "^8.1.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vite": ">=2.6.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/which": {
|
"node_modules/which": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
"globals": "^15.15.0",
|
"globals": "^15.15.0",
|
||||||
"typescript": "~5.7.2",
|
"typescript": "~5.7.2",
|
||||||
"typescript-eslint": "^8.24.1",
|
"typescript-eslint": "^8.24.1",
|
||||||
"vite": "^6.2.0"
|
"vite": "^6.2.0",
|
||||||
|
"vite-plugin-svgr": "^4.3.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 268 B After Width: | Height: | Size: 268 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 152 B After Width: | Height: | Size: 152 B |
|
Before Width: | Height: | Size: 150 B After Width: | Height: | Size: 150 B |
|
Before Width: | Height: | Size: 596 B After Width: | Height: | Size: 596 B |
|
Before Width: | Height: | Size: 355 B After Width: | Height: | Size: 355 B |
|
Before Width: | Height: | Size: 355 B After Width: | Height: | Size: 355 B |
|
Before Width: | Height: | Size: 607 B After Width: | Height: | Size: 607 B |
|
Before Width: | Height: | Size: 166 B After Width: | Height: | Size: 166 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
|
@ -1,5 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import styles from './Account.module.css'
|
import styles from './Account.module.css'
|
||||||
|
import AccountImg from '../../assets/account.svg?react';
|
||||||
|
|
||||||
interface AccountProps {
|
interface AccountProps {
|
||||||
href: string;
|
href: string;
|
||||||
|
|
@ -10,7 +11,7 @@ const Account: React.FC<AccountProps> = ({href, user}) => {
|
||||||
return (
|
return (
|
||||||
<div className={styles.account}>
|
<div className={styles.account}>
|
||||||
<a className={styles.accountText} href={href}>
|
<a className={styles.accountText} href={href}>
|
||||||
<img src='../../../public/account.svg' className={styles.accountImg} alt='account'/>
|
<AccountImg className={styles.accountImg}/>
|
||||||
{user}
|
{user}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import styles from './AddAnswerButton.module.css'
|
import styles from './AddAnswerButton.module.css'
|
||||||
|
import AddAnswerImg from '../../assets/add_answer.svg?react';
|
||||||
|
|
||||||
|
|
||||||
interface AddAnswerButtonProps {
|
interface AddAnswerButtonProps {
|
||||||
|
|
@ -10,7 +11,7 @@ const AddAnswerButton: React.FC<AddAnswerButtonProps> = ({onClick}) => {
|
||||||
return (
|
return (
|
||||||
<button className={styles.answerButton} onClick={onClick}>
|
<button className={styles.answerButton} onClick={onClick}>
|
||||||
Добавить вариант ответа {' '}
|
Добавить вариант ответа {' '}
|
||||||
<img src='../../../public/add_answer.svg' className={styles.addAnswerImg} alt="add answer"/>
|
<AddAnswerImg className={styles.addAnswerImg} />
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import styles from './AddQuestionButton.module.css'
|
import styles from './AddQuestionButton.module.css'
|
||||||
|
import AddQuestionImg from '../../assets/add_question.svg?react';
|
||||||
|
|
||||||
interface AddQuestionButtonProps {
|
interface AddQuestionButtonProps {
|
||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
|
|
@ -8,7 +9,7 @@ interface AddQuestionButtonProps {
|
||||||
const AddQuestionButton: React.FC<AddQuestionButtonProps> = ({onClick}) => {
|
const AddQuestionButton: React.FC<AddQuestionButtonProps> = ({onClick}) => {
|
||||||
return (
|
return (
|
||||||
<button className={styles.questionButton} onClick={onClick}>
|
<button className={styles.questionButton} onClick={onClick}>
|
||||||
<img src='../../../public/add_question.svg' className={styles.questionButtonImg} alt='add question' />
|
<AddQuestionImg className={styles.questionButtonImg}/>
|
||||||
<span className={styles.textButton}>Добавить вопрос</span>
|
<span className={styles.textButton}>Добавить вопрос</span>
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,8 @@
|
||||||
import React, {useState, useRef, useEffect} from "react";
|
import React, {useState, useRef, useEffect} from "react";
|
||||||
import styles from'./AnswerOption.module.css';
|
import styles from'./AnswerOption.module.css';
|
||||||
|
import Delete from '../../assets/delete.svg?react';
|
||||||
const single_selected_response = '../../../public/radio_button_checked.svg';
|
import Single from '../../assets/radio_button_unchecked.svg?react';
|
||||||
const multiple_selected_response = '../../../public/check_box.svg';
|
import Multiple from '../../assets/emptyCheckbox.svg?react';
|
||||||
const single_response = '../../../public/radio_button_unchecked.svg';
|
|
||||||
const multiple_response ='../../../public/emptyCheckbox.svg';
|
|
||||||
|
|
||||||
interface AnswerOptionProps{
|
interface AnswerOptionProps{
|
||||||
index: number;
|
index: number;
|
||||||
|
|
@ -12,11 +10,10 @@ interface AnswerOptionProps{
|
||||||
onChange: (value: string) => void;
|
onChange: (value: string) => void;
|
||||||
onDelete:(index: number) => void;
|
onDelete:(index: number) => void;
|
||||||
selectedType: 'single' | 'multiply';
|
selectedType: 'single' | 'multiply';
|
||||||
isSelected: boolean;
|
|
||||||
toggleSelect: () => void;
|
toggleSelect: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AnswerOption: React.FC<AnswerOptionProps> = ({index, value, onChange, onDelete, selectedType, isSelected, toggleSelect}) => {
|
const AnswerOption: React.FC<AnswerOptionProps> = ({index, value, onChange, onDelete, selectedType, toggleSelect}) => {
|
||||||
const [currentValue, setCurrentValue] = useState(value);
|
const [currentValue, setCurrentValue] = useState(value);
|
||||||
const [isEditing, setIsEditing] = useState(false);
|
const [isEditing, setIsEditing] = useState(false);
|
||||||
|
|
||||||
|
|
@ -70,25 +67,13 @@ const AnswerOption: React.FC<AnswerOptionProps> = ({index, value, onChange, onDe
|
||||||
}
|
}
|
||||||
}, [isEditing]);
|
}, [isEditing]);
|
||||||
|
|
||||||
const getImage = () => {
|
|
||||||
if (selectedType === 'multiply') {
|
|
||||||
return isSelected ? multiple_selected_response : multiple_response;
|
|
||||||
} else {
|
|
||||||
return isSelected ? single_selected_response : single_response;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.answer}>
|
<div className={styles.answer}>
|
||||||
<button
|
<button
|
||||||
className={`${styles.buttonMarker} ${isEditing ? styles.editing : ''}`}
|
className={`${styles.buttonMarker} ${isEditing ? styles.editing : ''}`}
|
||||||
onClick={toggleSelect}
|
onClick={toggleSelect}
|
||||||
>
|
>
|
||||||
<img
|
{selectedType === 'single' ? < Single className={styles.answerIcon} /> : <Multiple className={styles.answerIcon} />}
|
||||||
className={styles.answerIcon}
|
|
||||||
src={getImage()}
|
|
||||||
alt=""
|
|
||||||
/>
|
|
||||||
</button>
|
</button>
|
||||||
{isEditing ? (
|
{isEditing ? (
|
||||||
<textarea
|
<textarea
|
||||||
|
|
@ -106,7 +91,7 @@ const AnswerOption: React.FC<AnswerOptionProps> = ({index, value, onChange, onDe
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
<button className={styles.deleteButton} onClick={() => onDelete(index)}>
|
<button className={styles.deleteButton} onClick={() => onDelete(index)}>
|
||||||
<img src='../../../public/delete.svg' alt="Удалить" />
|
<Delete />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import styles from './Logo.module.css'
|
import styles from './Logo.module.css'
|
||||||
|
import LogoImg from '../../assets/logo.svg?react'
|
||||||
|
|
||||||
interface LogoProps {
|
interface LogoProps {
|
||||||
href: string;
|
href: string;
|
||||||
|
|
@ -9,7 +10,7 @@ interface LogoProps {
|
||||||
const Logo: React.FC<LogoProps> = ({href, onClick}) => {
|
const Logo: React.FC<LogoProps> = ({href, onClick}) => {
|
||||||
return (
|
return (
|
||||||
<a className={styles.logo} href={href} onClick={onClick}>
|
<a className={styles.logo} href={href} onClick={onClick}>
|
||||||
<img src='../../../public/logo.svg' alt="" />
|
<LogoImg/>
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import AnswerOption from '../AnswerOption/AnswerOption';
|
||||||
import AddAnswerButton from "../AddAnswerButton/AddAnswerButton.tsx";
|
import AddAnswerButton from "../AddAnswerButton/AddAnswerButton.tsx";
|
||||||
import TypeDropdown from "../TypeDropdown/TypeDropdown.tsx";
|
import TypeDropdown from "../TypeDropdown/TypeDropdown.tsx";
|
||||||
import styles from './QuestionItem.module.css'
|
import styles from './QuestionItem.module.css'
|
||||||
|
import Delete from '../../assets/deleteQuestion.svg?react';
|
||||||
|
|
||||||
|
|
||||||
interface QuestionItemProps {
|
interface QuestionItemProps {
|
||||||
|
|
@ -134,7 +135,6 @@ const QuestionItem: React.FC<QuestionItemProps> = ({indexQuestion, initialTextQu
|
||||||
value={answerText}
|
value={answerText}
|
||||||
onChange={(value) => handleAnswerChange(index, value)}
|
onChange={(value) => handleAnswerChange(index, value)}
|
||||||
onDelete={() => handleDeleteAnswer(index)}
|
onDelete={() => handleDeleteAnswer(index)}
|
||||||
isSelected={selectedAnswers.includes(index)}
|
|
||||||
toggleSelect={() => toggleSelect(index)}
|
toggleSelect={() => toggleSelect(index)}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|
@ -145,7 +145,7 @@ const QuestionItem: React.FC<QuestionItemProps> = ({indexQuestion, initialTextQu
|
||||||
/>
|
/>
|
||||||
<button className={styles.deleteQuestionButton} onClick={handleDeleteQuestion}>
|
<button className={styles.deleteQuestionButton} onClick={handleDeleteQuestion}>
|
||||||
Удалить{/**/}
|
Удалить{/**/}
|
||||||
<img className={styles.basketImg} src='../../../public/deleteQuestion.svg' alt='deleteQuestion' />
|
<Delete className={styles.basketImg}/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import React, {useState, useRef, useEffect} from "react";
|
import React, {useState, useRef, useEffect} from "react";
|
||||||
import styles from './SurveyInfo.module.css'
|
import styles from './SurveyInfo.module.css'
|
||||||
|
import AddDescripImg from '../../assets/add_circle.svg?react';
|
||||||
|
|
||||||
const SurveyInfo: React.FC = () => {
|
const SurveyInfo: React.FC = () => {
|
||||||
const [descriptionSurvey, setDescriptionSurvey] = useState('');
|
const [descriptionSurvey, setDescriptionSurvey] = useState('');
|
||||||
|
|
@ -109,7 +110,7 @@ const SurveyInfo: React.FC = () => {
|
||||||
onClick={handleAddDescriptionClick}
|
onClick={handleAddDescriptionClick}
|
||||||
>
|
>
|
||||||
<span className={styles.textButton}>Добавить описание</span>
|
<span className={styles.textButton}>Добавить описание</span>
|
||||||
<img src='../../../public/add_circle.svg' className={styles.descButtonImg} alt='add circle'/>
|
<AddDescripImg className={styles.descButtonImg}/>
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,10 @@
|
||||||
import React, { useState, useRef, useEffect } from "react";
|
import React, {useState, useRef, useEffect} from "react";
|
||||||
|
import DropDown from '../../assets/arrow_drop_down.svg?react';
|
||||||
|
import DropUp from '../../assets/arrow_drop_up.svg?react';
|
||||||
|
import Single from '../../assets/radio_button_checked.svg?react';
|
||||||
|
import Multiple from '../../assets/check_box.svg?react';
|
||||||
import styles from './TypeDropdown.module.css'
|
import styles from './TypeDropdown.module.css'
|
||||||
|
|
||||||
const single_selected = '../../../public/radio_button_checked.svg';
|
|
||||||
const multiple_selected = '../../../public/check_box.svg';
|
|
||||||
|
|
||||||
const arrow_drop_down = '../../../public/arrow_drop_down.svg';
|
|
||||||
const arrow_drop_up = '../../../public/arrow_drop_up.svg';
|
|
||||||
|
|
||||||
interface TypeDropdownProps {
|
interface TypeDropdownProps {
|
||||||
selectedType: 'single' | 'multiply';
|
selectedType: 'single' | 'multiply';
|
||||||
onTypeChange: (type: 'single' | 'multiply') => void;
|
onTypeChange: (type: 'single' | 'multiply') => void;
|
||||||
|
|
@ -39,28 +36,12 @@ const TypeDropdown: React.FC<TypeDropdownProps> = ({selectedType, onTypeChange})
|
||||||
};
|
};
|
||||||
}, [dropdownRef]);
|
}, [dropdownRef]);
|
||||||
|
|
||||||
const getImage = (typeValue: string): string => {
|
|
||||||
if (typeValue === 'multiply') {
|
|
||||||
return multiple_selected;
|
|
||||||
} else {
|
|
||||||
return single_selected;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.dropdownContainer} ref={dropdownRef}>
|
<div className={styles.dropdownContainer} ref={dropdownRef}>
|
||||||
<button className={styles.dropdownButton} onClick={handleToggle}>
|
<button className={styles.dropdownButton} onClick={handleToggle}>
|
||||||
<img
|
{selectedType === 'single' ? <Single className={styles.selectedTypeIcon} /> : <Multiple className={styles.selectedTypeIcon} />}
|
||||||
src={getImage(selectedType)}
|
|
||||||
alt={selectedType === "single" ? "Одиночный выбор" : "Множественный выбор"}
|
|
||||||
className={styles.selectedTypeIcon}
|
|
||||||
/>
|
|
||||||
{selectedType === "single" ? "Одиночный выбор" : "Множественный выбор"}
|
{selectedType === "single" ? "Одиночный выбор" : "Множественный выбор"}
|
||||||
<img
|
{isOpen ? <DropUp className={styles.dropdownArrow} /> : <DropDown className={styles.dropdownArrow}/>}
|
||||||
src={isOpen ? arrow_drop_up : arrow_drop_down}
|
|
||||||
alt={isOpen ? "Закрыть" : "Открыть"}
|
|
||||||
className={styles.dropdownArrow}
|
|
||||||
/>
|
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{isOpen && (
|
{isOpen && (
|
||||||
|
|
@ -68,21 +49,14 @@ const TypeDropdown: React.FC<TypeDropdownProps> = ({selectedType, onTypeChange})
|
||||||
<li>
|
<li>
|
||||||
<button onClick={() => handleSelect("single")}
|
<button onClick={() => handleSelect("single")}
|
||||||
className={styles.dropdownItem}>
|
className={styles.dropdownItem}>
|
||||||
<img
|
<Single className={styles.dropdownItemIcon}/>{' '}
|
||||||
className={styles.dropdownItemIcon}
|
|
||||||
src={getImage("single")}
|
|
||||||
alt=""/>{' '}
|
|
||||||
Одиночный выбор
|
Одиночный выбор
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<button className={styles.dropdownItem}
|
<button className={styles.dropdownItem}
|
||||||
onClick={() => handleSelect("multiply")}>
|
onClick={() => handleSelect("multiply")}>
|
||||||
<img
|
<Multiple className={styles.dropdownItemIcon}/>{' '}
|
||||||
src={getImage("multiply")}
|
|
||||||
alt="Множественный выбор"
|
|
||||||
className={styles.dropdownItemIcon}
|
|
||||||
/>{' '}
|
|
||||||
Множественный выбор
|
Множественный выбор
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
1
SurveyFrontend/src/vite-env.d.ts
vendored
|
|
@ -1 +1,2 @@
|
||||||
/// <reference types="vite/client" />
|
/// <reference types="vite/client" />
|
||||||
|
/// <reference types="vite-plugin-svgr/client" />
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
import react from '@vitejs/plugin-react'
|
import react from '@vitejs/plugin-react'
|
||||||
|
import svgr from 'vite-plugin-svgr';
|
||||||
|
|
||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react()],
|
plugins: [react(), svgr()],
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit eb48f28d66c1eeb4673659534bef24a2f721c647
|
Subproject commit a34c2d20fb04c25bc8120264e92f7ca02d7ed617
|
||||||