1.0.0
Full All
This commit is contained in:
commit
c99c7eaa9f
261
.gitignore
vendored
Normal file
261
.gitignore
vendored
Normal file
@ -0,0 +1,261 @@
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
|
||||
# Visual Studio 2015 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUNIT
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# DNX
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_i.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# JustCode is a .NET coding add-in
|
||||
.JustCode
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# TODO: Comment the next line if you want to checkin your web deploy settings
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
#*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/packages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/packages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/packages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignoreable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
node_modules/
|
||||
orleans.codegen.cs
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# JetBrains Rider
|
||||
.idea/
|
||||
*.sln.iml
|
||||
|
||||
# CodeRush
|
||||
.cr/
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
9
APP_LOGGING/APP_LOGGING.csproj
Normal file
9
APP_LOGGING/APP_LOGGING.csproj
Normal file
@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,67 @@
|
||||
using System.Reflection;
|
||||
|
||||
using APP_LOGGING.Services.AppLoggingService;
|
||||
using APP_LOGGING.Services.AppLoggingService.Implements;
|
||||
|
||||
namespace APP_LOGGING.Accessories.LoggingAccessories;
|
||||
|
||||
/// <summary>
|
||||
/// Вспомогательные методы логирования
|
||||
/// </summary>
|
||||
public static class LoggingExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Полный путь к рабочей директории приложения
|
||||
/// </summary>
|
||||
private static string? _appDir;
|
||||
|
||||
/// <summary>
|
||||
/// Обертка полного пути к рабочей директории приложения
|
||||
/// </summary>
|
||||
public static string? AppDir => _appDir ??= Path.GetDirectoryName(Assembly.GetEntryAssembly()?.Location);
|
||||
|
||||
/// <summary>
|
||||
/// Интерфейс логирования
|
||||
/// </summary>
|
||||
private static ILoggingService? _logging;
|
||||
|
||||
/// <summary>
|
||||
/// Обертка интерфейса логирования
|
||||
/// </summary>
|
||||
public static ILoggingService Logging => _logging ??= new LoggingService();
|
||||
|
||||
/// <summary>
|
||||
/// Метод - расширение логирует исключение
|
||||
/// </summary>
|
||||
/// <param name="exception">Исключение</param>
|
||||
/// <param name="notice">Дополнительная метка для исключения</param>
|
||||
public static void LogException(this Exception exception, string notice = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
//логируем исключение
|
||||
Logging?.LogExceptionAsync(exception, notice);
|
||||
}
|
||||
catch
|
||||
{
|
||||
//Ignore
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Метод - расширение логирует сообщение
|
||||
/// </summary>
|
||||
/// <param name="textMessage">Текст сообщения</param>
|
||||
public static void LogMessage(this string textMessage)
|
||||
{
|
||||
try
|
||||
{
|
||||
//логируем сообщение
|
||||
Logging?.LogMessageAsync(textMessage);
|
||||
}
|
||||
catch
|
||||
{
|
||||
//Ignore
|
||||
}
|
||||
}
|
||||
}
|
31
APP_LOGGING/Services/AppLoggingService/ILoggingService.cs
Normal file
31
APP_LOGGING/Services/AppLoggingService/ILoggingService.cs
Normal file
@ -0,0 +1,31 @@
|
||||
namespace APP_LOGGING.Services.AppLoggingService;
|
||||
|
||||
/// <summary>
|
||||
/// Интерфейс логирования
|
||||
/// </summary>
|
||||
public interface ILoggingService
|
||||
{
|
||||
/// <summary>
|
||||
/// Метод инициализирует сервис логирования
|
||||
/// </summary>
|
||||
/// <param name="nameProject">Название проекта</param>
|
||||
void InitializeLogging(string nameProject);
|
||||
|
||||
/// <summary>
|
||||
/// Метод выключает сервис логирования
|
||||
/// </summary>
|
||||
void DeinitializeLogging();
|
||||
|
||||
/// <summary>
|
||||
/// Метод сохраняет сообщения
|
||||
/// </summary>
|
||||
/// <param name="textMessage">Текст сообщения</param>
|
||||
void LogMessageAsync(string textMessage);
|
||||
|
||||
/// <summary>
|
||||
/// Метод сохраняет исключения
|
||||
/// </summary>
|
||||
/// <param name="exception">Исключение</param>
|
||||
/// <param name="notice">Дополнительная метка для исключения</param>
|
||||
void LogExceptionAsync(Exception exception, string notice = null!);
|
||||
}
|
@ -0,0 +1,238 @@
|
||||
using System.Text;
|
||||
|
||||
using APP_LOGGING.Accessories.LoggingAccessories;
|
||||
using APP_LOGGING.Services.AppLoggingService;
|
||||
|
||||
using Timer = System.Timers.Timer;
|
||||
|
||||
namespace APP_LOGGING.Services.AppLoggingService.Implements;
|
||||
|
||||
/// <summary>
|
||||
/// Реализация интерфейса логирования
|
||||
/// </summary>
|
||||
public class LoggingService : ILoggingService
|
||||
{
|
||||
/// <summary>
|
||||
/// Имя директории хранения логов
|
||||
/// </summary>
|
||||
private static string NameLogDir => "Logging";
|
||||
|
||||
/// <summary>
|
||||
/// Блокиратор
|
||||
/// </summary>
|
||||
private SemaphoreSlim Locker { get; }
|
||||
|
||||
/// <summary>
|
||||
/// TextWriter логирования
|
||||
/// </summary>
|
||||
private TextWriter LoggingWriter { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Таймер изменения текущих файлов лога
|
||||
/// </summary>
|
||||
private Timer ChangeLogFilesTimer { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Конструктор
|
||||
/// </summary>
|
||||
public LoggingService()
|
||||
{
|
||||
Locker = new SemaphoreSlim(1);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Метод инициализирует сервис логирования
|
||||
/// </summary>
|
||||
/// <param name="nameProject">Название проекта</param>
|
||||
public void InitializeLogging(string nameProject)
|
||||
{
|
||||
try
|
||||
{
|
||||
//генерируем путь к директории логирования
|
||||
var logDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), Path.Combine(LoggingExtensions.AppDir, NameLogDir));
|
||||
|
||||
//получаем информацию о директории логирования
|
||||
var logDirectoryInfo = new DirectoryInfo(logDirectory);
|
||||
|
||||
//проверяем наличие директории
|
||||
if (!logDirectoryInfo.Exists)
|
||||
{
|
||||
//создаем директорию если ее нет
|
||||
logDirectoryInfo.Create();
|
||||
}
|
||||
|
||||
//обходим все файлы в директории
|
||||
foreach (var fileInfo in logDirectoryInfo.GetFiles())
|
||||
{
|
||||
//если файлу менее трех дней, продолжаем цикл
|
||||
if ((DateTime.Now - fileInfo.CreationTime).TotalDays <= 3) continue;
|
||||
|
||||
try
|
||||
{
|
||||
//удаляем файл
|
||||
fileInfo.Delete();
|
||||
}
|
||||
catch
|
||||
{
|
||||
//Ignored
|
||||
}
|
||||
}
|
||||
|
||||
//генерируем полный путь к файлу лога
|
||||
var fullPathLogExceptionFile = Path.GetFullPath($"{logDirectory}/log_{DateTime.Now:dd.MM.yy}.log");
|
||||
|
||||
//проверяем наличие файлов логов
|
||||
if (!File.Exists(fullPathLogExceptionFile))
|
||||
{
|
||||
//создаем и закрываем файл логов
|
||||
File.Create(fullPathLogExceptionFile).Close();
|
||||
}
|
||||
|
||||
//инициализируем TextWriter логирования
|
||||
LoggingWriter = TextWriter.Synchronized(new StreamWriter(fullPathLogExceptionFile, true, new UTF8Encoding(false)));
|
||||
|
||||
//пишем сообщение о начале логирования в файл лога исключений
|
||||
LogMessageAsync($"START LOGGING {nameProject}...");
|
||||
|
||||
//останавливаем таймер изменения текущих файлов лога
|
||||
ChangeLogFilesTimer?.Stop();
|
||||
|
||||
//разрушаем таймер изменения текущих файлов лога
|
||||
ChangeLogFilesTimer?.Dispose();
|
||||
|
||||
//запускаем новый таймер изменения текущих файлов лога
|
||||
ChangeLogFilesTimer = new Timer
|
||||
{
|
||||
Interval = 24 * 60 * 60 * 1000, //1 сутки
|
||||
AutoReset = true,
|
||||
Enabled = true
|
||||
};
|
||||
|
||||
//действие по таймеру
|
||||
ChangeLogFilesTimer.Elapsed += (_, _) =>
|
||||
{
|
||||
//пишем строку об окончании логирования в текущем файле
|
||||
LogMessageAsync("STOP LOGGING...\n");
|
||||
|
||||
//закрываем TextWriter логирования
|
||||
LoggingWriter?.Close();
|
||||
|
||||
//уничтожаем TextWriter логирования
|
||||
LoggingWriter?.Dispose();
|
||||
|
||||
//присваиваем null TextWriter логирования
|
||||
LoggingWriter = null!;
|
||||
|
||||
//заново инициализируем логирование
|
||||
InitializeLogging(nameProject);
|
||||
};
|
||||
}
|
||||
catch
|
||||
{
|
||||
//Ignore
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Метод деинициализирует сервис логирования
|
||||
/// </summary>
|
||||
public void DeinitializeLogging()
|
||||
{
|
||||
try
|
||||
{
|
||||
//пишем сообщение об окончании логирования в файл лога исключений
|
||||
LogMessageAsync("STOP LOGGING...\n");
|
||||
|
||||
//останавливаем таймер изменения текущих файлов лога
|
||||
ChangeLogFilesTimer?.Stop();
|
||||
|
||||
//разрушаем таймер изменения текущих файлов лога
|
||||
ChangeLogFilesTimer?.Dispose();
|
||||
|
||||
//закрываем TextWriter логирования
|
||||
LoggingWriter?.Close();
|
||||
|
||||
//уничтожаем TextWriter логирования
|
||||
LoggingWriter?.Dispose();
|
||||
|
||||
//присваиваем null TextWriter логирования
|
||||
LoggingWriter = null!;
|
||||
|
||||
//уничтожаем блокиратор
|
||||
Locker?.Dispose();
|
||||
}
|
||||
catch
|
||||
{
|
||||
//Ignore
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Метод логирует сообщения
|
||||
/// </summary>
|
||||
/// <param name="textMessage">Текст сообщения</param>
|
||||
public async void LogMessageAsync(string textMessage)
|
||||
{
|
||||
//проверяем инициализацию логирования
|
||||
if (LoggingWriter == null) return;
|
||||
|
||||
//блокируем поток
|
||||
await Locker.WaitAsync();
|
||||
|
||||
try
|
||||
{
|
||||
//генерируем текст лога
|
||||
var textLog = $"{DateTime.Now:dd.MM.yy HH:mm:ss}: {textMessage}";
|
||||
|
||||
Console.WriteLine(textLog);
|
||||
|
||||
//пишем строку лога
|
||||
await LoggingWriter.WriteLineAsync(textLog);
|
||||
|
||||
//из памяти
|
||||
await LoggingWriter.FlushAsync();
|
||||
}
|
||||
finally
|
||||
{
|
||||
//освобождаем блокировку потока
|
||||
Locker.Release();
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Метод логирует исключения
|
||||
/// </summary>
|
||||
/// <param name="exception">Исключение</param>
|
||||
/// <param name="notice">Дополнительная метка для исключения</param>
|
||||
public async void LogExceptionAsync(Exception exception, string notice = null)
|
||||
{
|
||||
//проверяем инициализацию логирования и исключение
|
||||
if (LoggingWriter == null || exception == null) return;
|
||||
|
||||
//блокируем поток
|
||||
await Locker.WaitAsync();
|
||||
|
||||
try
|
||||
{
|
||||
//генерируем текст исключения
|
||||
var textException = $"{DateTime.Now:dd.MM.yy HH:mm:ss}: {notice ?? ""} {exception.Message}, ({exception.StackTrace})";
|
||||
|
||||
Console.WriteLine(textException);
|
||||
|
||||
//пишем строку лога
|
||||
await LoggingWriter.WriteLineAsync(textException);
|
||||
|
||||
//из памяти
|
||||
await LoggingWriter.FlushAsync();
|
||||
}
|
||||
finally
|
||||
{
|
||||
//освобождаем блокировку потока
|
||||
Locker.Release();
|
||||
}
|
||||
}
|
||||
}
|
19
APP_UTILITIES/APP_UTILITIES.csproj
Normal file
19
APP_UTILITIES/APP_UTILITIES.csproj
Normal file
@ -0,0 +1,19 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNet.Mvc" Version="5.3.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Antiforgery" Version="2.3.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.3.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\APP_LOGGING\APP_LOGGING.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
181
APP_UTILITIES/Accessories/JsonAccessories/JsonExtensions.cs
Normal file
181
APP_UTILITIES/Accessories/JsonAccessories/JsonExtensions.cs
Normal file
@ -0,0 +1,181 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Web.Mvc;
|
||||
|
||||
using APP_LOGGING.Accessories.LoggingAccessories;
|
||||
|
||||
using APP_UTILITIES.FormatsData.AppEnumsData;
|
||||
using APP_UTILITIES.FormatsData.AppResponseData.BadResponses;
|
||||
|
||||
namespace APP_UTILITIES.Accessories.JsonAccessories;
|
||||
|
||||
/// <summary>
|
||||
/// Класс вспомогательных методов для работы с JSON
|
||||
/// </summary>
|
||||
public static class JsonExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Метод - расширение десериализует JSON строку в объект заданного типа
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Тип данных</typeparam>
|
||||
/// <param name="value">JSON строка</param>
|
||||
/// <param name="jsonConverter">Кастомный конвертер</param>
|
||||
/// <returns></returns>
|
||||
public static T DeserializeTo<T>(this string value, JsonConverter jsonConverter = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
//если входящая строка пуста, отдаем значение типа по умолчанию
|
||||
if (string.IsNullOrEmpty(value)) return default;
|
||||
|
||||
//создаем объект настроек сериализации
|
||||
var jsonSerializerOptions = new JsonSerializerOptions
|
||||
{
|
||||
AllowTrailingCommas = true,
|
||||
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,
|
||||
Converters =
|
||||
{
|
||||
new JsonStringEnumConverter(JsonNamingPolicy.CamelCase, false)
|
||||
}
|
||||
};
|
||||
|
||||
//если задан кастомный конвертер
|
||||
if (jsonConverter != null)
|
||||
{
|
||||
//добавляем кастомный конвертер
|
||||
jsonSerializerOptions.Converters.Add(jsonConverter);
|
||||
}
|
||||
|
||||
//десериализуем JSON строку в объект заданного типа
|
||||
return JsonSerializer.Deserialize<T>(value, jsonSerializerOptions);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
//логируем исключение
|
||||
exception.LogException();
|
||||
|
||||
//логируем строку JSON которую не удалось десериализовать
|
||||
$"JSON: {value}".LogMessage();
|
||||
|
||||
//отдаем значение типа по умолчанию
|
||||
return default;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Метод - расширение формата объекта в JSON строку
|
||||
/// </summary>
|
||||
/// <param name="data">Входящий объект</param>
|
||||
/// <param name="jsonConverter">Кастомный конвертер</param>
|
||||
/// <returns>Строка JSON</returns>
|
||||
public static string SerializeToJson(this object data, JsonConverter jsonConverter = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
//проверяем входящие данные
|
||||
if (data == null) return string.Empty;
|
||||
|
||||
//создаем объект настроек сериализации
|
||||
var jsonSerializerOptions = new JsonSerializerOptions
|
||||
{
|
||||
AllowTrailingCommas = true,
|
||||
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,
|
||||
Converters =
|
||||
{
|
||||
new JsonStringEnumConverter(JsonNamingPolicy.CamelCase, false)
|
||||
}
|
||||
};
|
||||
|
||||
//если задан кастомный конвертер
|
||||
if (jsonConverter != null)
|
||||
{
|
||||
//добавляем кастомный конвертер
|
||||
jsonSerializerOptions.Converters.Add(jsonConverter);
|
||||
}
|
||||
|
||||
//сериализуем объект в строку JSON и отдаем ее
|
||||
return JsonSerializer.Serialize(data, jsonSerializerOptions);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
//логируем исключение
|
||||
exception.LogException();
|
||||
|
||||
//отдаем пустую строку
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Метод - расширение форматирует объект в ответ с JSON строкой в теле
|
||||
/// </summary>
|
||||
/// <param name="data">Входящий объект</param>
|
||||
/// <param name="jsonConverter">Кастомный конвертер</param>
|
||||
/// <returns>Результат ответа</returns>
|
||||
public static ContentResult SuccessResponse(this object data, JsonConverter jsonConverter = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
//создаем контент ответа
|
||||
return new ContentResult
|
||||
{
|
||||
Content = data.SerializeToJson(jsonConverter),
|
||||
ContentType = "application/json",
|
||||
};
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
//логируем исключение
|
||||
exception.LogException();
|
||||
|
||||
//отдаем null
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Метод - расширение отдает ответ о неудачном запросе
|
||||
/// </summary>
|
||||
/// <param name="reason">Причина неудачного запроса</param>
|
||||
/// <param name="sideError">На чьей стороне возникла ошибка</param>
|
||||
/// <returns>Результат ответа</returns>
|
||||
public static ContentResult FailedResponse(this string reason, SideError sideError)
|
||||
{
|
||||
try
|
||||
{
|
||||
//проверяем входящие данные
|
||||
if (reason == null) return null;
|
||||
|
||||
//HTTP код статуса ответа
|
||||
int statusCode;
|
||||
|
||||
//смотрим на чьей стороне возникла ошибка
|
||||
switch (sideError)
|
||||
{
|
||||
case SideError.UserSide: //ошибка на стороне пользователя
|
||||
statusCode = 400;
|
||||
break;
|
||||
case SideError.ServerSide: //ошибка на стороне сервера
|
||||
statusCode = 500;
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
//создаем контент ответа
|
||||
return new ContentResult
|
||||
{
|
||||
Content = new FailedRequestReason { Reason = reason }.SerializeToJson(),
|
||||
ContentType = "application/json"
|
||||
};
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
//логируем исключение
|
||||
exception.LogException();
|
||||
|
||||
//отдаем null
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
10
APP_UTILITIES/FormatsData/AppEnumsData/SideError.cs
Normal file
10
APP_UTILITIES/FormatsData/AppEnumsData/SideError.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace APP_UTILITIES.FormatsData.AppEnumsData;
|
||||
|
||||
/// <summary>
|
||||
/// Перечисление на чьей стороне возникла ошибка
|
||||
/// </summary>
|
||||
public enum SideError
|
||||
{
|
||||
UserSide = 1, //ошибка на стороне пользователя
|
||||
ServerSide = 2 //ошибка на стороне сервера
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace APP_UTILITIES.FormatsData.AppResponseData.BadResponses;
|
||||
|
||||
/// <summary>
|
||||
/// Объект данных о причине неудачного запроса
|
||||
/// </summary>
|
||||
public class FailedRequestReason
|
||||
{
|
||||
/// <summary>
|
||||
/// Причина неудачного запроса
|
||||
/// </summary>
|
||||
[JsonPropertyName("reason")]
|
||||
public string Reason { get; init; }
|
||||
}
|
60
APP_UTILITIES/Middleware/AntiforgeryMiddleware.cs
Normal file
60
APP_UTILITIES/Middleware/AntiforgeryMiddleware.cs
Normal file
@ -0,0 +1,60 @@
|
||||
using APP_LOGGING.Accessories.LoggingAccessories;
|
||||
|
||||
using Microsoft.AspNetCore.Antiforgery;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace APP_UTILITIES.Middleware;
|
||||
|
||||
/// <summary>
|
||||
/// Обработчик службы против подделки запросов
|
||||
/// </summary>
|
||||
public class AntiforgeryMiddleware
|
||||
{
|
||||
/// <summary>
|
||||
/// Делегат на передачу действия следующему в роутере
|
||||
/// </summary>
|
||||
private RequestDelegate Next { get; }
|
||||
|
||||
/// <summary>
|
||||
/// API для настройки функций против подделки
|
||||
/// </summary>
|
||||
private IAntiforgery Antiforgery { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Конструктор
|
||||
/// </summary>
|
||||
/// <param name="next">Делегат на передачу действия следующему в роутере</param>
|
||||
/// <param name="antiforgery">API для настройки функций против подделки</param>
|
||||
public AntiforgeryMiddleware(RequestDelegate next, IAntiforgery antiforgery)
|
||||
{
|
||||
Next = next;
|
||||
Antiforgery = antiforgery;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Асинхронный обработчик запроса
|
||||
/// </summary>
|
||||
/// <param name="context">Контекст запроса</param>
|
||||
/// <returns></returns>
|
||||
public async Task InvokeAsync(HttpContext context)
|
||||
{
|
||||
try
|
||||
{
|
||||
//генерируем токен против подделки запросов
|
||||
var tokens = Antiforgery.GetAndStoreTokens(context);
|
||||
|
||||
//устанавливаем токен в куку
|
||||
context.Response.Cookies.Append("CSRF-TOKEN", tokens.RequestToken ?? string.Empty, new CookieOptions { HttpOnly = false });
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
//логируем исключение
|
||||
exception.LogException();
|
||||
}
|
||||
finally
|
||||
{
|
||||
//передаем управление на следующий метод в роутере что бы был вывод/перенаправление ошибки
|
||||
await Next.Invoke(context);
|
||||
}
|
||||
}
|
||||
}
|
36
APP_WEB/APP_WEB.csproj
Normal file
36
APP_WEB/APP_WEB.csproj
Normal file
@ -0,0 +1,36 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<TypeScriptCompile Remove="node_modules\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.13" />
|
||||
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="5.8.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="7.3.1" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="7.3.1" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="7.3.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="ScriptsAndCss\JsScripts\" />
|
||||
<Folder Include="wwwroot\css\" />
|
||||
<Folder Include="wwwroot\js\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\APP_LOGGING\APP_LOGGING.csproj" />
|
||||
<ProjectReference Include="..\APP_UTILITIES\APP_UTILITIES.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
27
APP_WEB/Controllers/HomeController.cs
Normal file
27
APP_WEB/Controllers/HomeController.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using System.Diagnostics;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using AppWeb.Models;
|
||||
|
||||
namespace AppWeb.Controllers
|
||||
{
|
||||
public class HomeController : Controller
|
||||
{
|
||||
private readonly ILogger<HomeController> _logger;
|
||||
|
||||
public HomeController(ILogger<HomeController> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public IActionResult Index()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||
public IActionResult Error()
|
||||
{
|
||||
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
|
||||
}
|
||||
}
|
||||
}
|
57
APP_WEB/Gruntfile.js
Normal file
57
APP_WEB/Gruntfile.js
Normal file
@ -0,0 +1,57 @@
|
||||
const webpackConfig = require('./webpack.config.js');
|
||||
|
||||
module.exports = function (grunt) {
|
||||
grunt.initConfig({
|
||||
webpack: {
|
||||
options: webpackConfig,
|
||||
build: {
|
||||
}
|
||||
},
|
||||
browserSync: {
|
||||
dev: {
|
||||
bsFiles: {
|
||||
src: [
|
||||
'wwwroot/css/*.css',
|
||||
'wwwroot/js/app.min.js', // Webpack создает app.min.js
|
||||
'Views/**/*.cshtml'
|
||||
]
|
||||
},
|
||||
options: {
|
||||
watchTask: true,
|
||||
proxy: "localhost:5000" // Замените на свой локальный адрес
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
ts: {
|
||||
files: ['ScriptsAndCss/TypeScripts/**/*.ts'],
|
||||
tasks: ['webpack:build'], // Webpack компилирует и собирает
|
||||
options: {
|
||||
spawn: false,
|
||||
},
|
||||
},
|
||||
bsReload: {
|
||||
files: ['wwwroot/css/*.css', 'wwwroot/js/app.min.js', 'Views/**/*.cshtml'],
|
||||
options: {
|
||||
reload: true
|
||||
}
|
||||
}
|
||||
},
|
||||
clean: ["wwwroot/css/*", "wwwroot/js/*", "ScriptsAndCss/Combined/*"],
|
||||
cssmin: { //сжатие CSS
|
||||
css: {
|
||||
src: ["ScriptsAndCss/CssFiles/*"], //какой файл сжимать
|
||||
dest: "wwwroot/css/app.min.css" //сжатый выходной файл
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-webpack');
|
||||
grunt.loadNpmTasks('grunt-browser-sync');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||
grunt.loadNpmTasks('grunt-contrib-cssmin');
|
||||
|
||||
grunt.registerTask("build", ["clean", "webpack:build", "cssmin"]);
|
||||
grunt.registerTask("default", ["build", "browserSync:dev", "watch"]);
|
||||
};
|
9
APP_WEB/Models/ErrorViewModel.cs
Normal file
9
APP_WEB/Models/ErrorViewModel.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace AppWeb.Models
|
||||
{
|
||||
public class ErrorViewModel
|
||||
{
|
||||
public string? RequestId { get; set; }
|
||||
|
||||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
}
|
||||
}
|
100
APP_WEB/Program.cs
Normal file
100
APP_WEB/Program.cs
Normal file
@ -0,0 +1,100 @@
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
|
||||
using APP_LOGGING.Accessories.LoggingAccessories;
|
||||
|
||||
using APP_UTILITIES.Middleware;
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.OpenApi.Models;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.Configuration.SetBasePath(Directory.GetCurrentDirectory())
|
||||
.AddJsonFile($"{LoggingExtensions.AppDir}/app_configuration.json");
|
||||
|
||||
builder.WebHost.UseUrls($"https://{builder.Configuration["appSettings:appHost"]}");
|
||||
|
||||
builder.Services.AddControllersWithViews();
|
||||
|
||||
#region  ýòîì ðåãèîíå îáúÿâëÿåì ñåðâèñû
|
||||
|
||||
// Íàïðèìåð
|
||||
// builder.Services.AddSingleton<ICashService, CashService>();
|
||||
|
||||
#endregion
|
||||
|
||||
builder.Services.Configure<JsonOptions>(options =>
|
||||
{
|
||||
options.JsonSerializerOptions.WriteIndented = true; //äëÿ êðàñèâîãî ôîðìàòèðîâàíèÿ
|
||||
options.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase;
|
||||
});
|
||||
|
||||
//íàñòðîéêè ñëóæáû ïðîòèâ ïîääåëêè çàïðîñîâ
|
||||
builder.Services.AddAntiforgery(options =>
|
||||
{
|
||||
options.HeaderName = "X-CSRF-TOKEN";
|
||||
});
|
||||
|
||||
builder.Services.AddSwaggerGen(options =>
|
||||
{
|
||||
options.SwaggerDoc("v1", new OpenApiInfo
|
||||
{
|
||||
Title = "App API",
|
||||
Version = "1.0.0",
|
||||
Description = "Èíôîðìàöèÿ îá API",
|
||||
Contact = new OpenApiContact
|
||||
{
|
||||
Name = "Dvurechensky"
|
||||
}
|
||||
});
|
||||
var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
|
||||
var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
|
||||
options.IncludeXmlComments(xmlPath);
|
||||
});
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
var appLifetime = app.Services.GetRequiredService<IHostApplicationLifetime>();
|
||||
|
||||
appLifetime.ApplicationStarted.Register(async () =>
|
||||
{ //èíèöèàëèçèðóåì ñåðâèñ ëîãèðîâàíèÿ
|
||||
LoggingExtensions.Logging.InitializeLogging("API Reagent Project Control");
|
||||
});
|
||||
|
||||
appLifetime.ApplicationStopping.Register(() =>
|
||||
{
|
||||
LoggingExtensions.Logging.DeinitializeLogging(); //âûêëþ÷àåì ñåðâèñ ëîãèðîâàíèÿ
|
||||
});
|
||||
|
||||
if (!app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseExceptionHandler("/Home/Error");
|
||||
app.UseHsts();
|
||||
}
|
||||
else
|
||||
{
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI(c =>
|
||||
{
|
||||
c.SwaggerEndpoint("/swagger/v1/swagger.json", "Äîêóìåíòàöèÿ");
|
||||
c.RoutePrefix = "docs";
|
||||
});
|
||||
app.UseDeveloperExceptionPage(); //èñïîëüçóåì ñòðàíèöó èñêëþ÷åíèé
|
||||
}
|
||||
|
||||
app.UseCookiePolicy(); //èñïîëüçîâàòü ïîëèòèêó êóêè
|
||||
|
||||
// app.UseHttpsRedirection();
|
||||
|
||||
app.UseStaticFiles();
|
||||
app.UseRouting();
|
||||
|
||||
app.UseMiddleware<AntiforgeryMiddleware>(); //îáðàáîò÷èê ñëóæáû ïðîòèâ ïîääåëêè çàïðîñîâ
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapControllerRoute(
|
||||
name: "default",
|
||||
pattern: "{controller=Home}/{action=Index}/{id?}");
|
||||
|
||||
app.Run();
|
38
APP_WEB/Properties/launchSettings.json
Normal file
38
APP_WEB/Properties/launchSettings.json
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
"$schema": "http://json.schemastore.org/launchsettings.json",
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:1645",
|
||||
"sslPort": 44318
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"http": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "http://localhost:5025",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"https": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "https://localhost:7028;http://localhost:5025",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
22
APP_WEB/ScriptsAndCss/CssFiles/styles.css
Normal file
22
APP_WEB/ScriptsAndCss/CssFiles/styles.css
Normal file
@ -0,0 +1,22 @@
|
||||
html {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
html {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
|
||||
box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
|
||||
}
|
||||
|
||||
html {
|
||||
position: relative;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin-bottom: 60px;
|
||||
}
|
33
APP_WEB/ScriptsAndCss/JsScripts/alerts.js
Normal file
33
APP_WEB/ScriptsAndCss/JsScripts/alerts.js
Normal file
@ -0,0 +1,33 @@
|
||||
export class Alerts {
|
||||
AlertShow(notification) {
|
||||
const container = document.getElementById('notification-container');
|
||||
if (!container)
|
||||
return;
|
||||
const newNotification = document.createElement('div');
|
||||
newNotification.classList.add('notification');
|
||||
switch (notification.type) {
|
||||
case TypeAlert.Error:
|
||||
newNotification.classList.add('error_alert_animate');
|
||||
break;
|
||||
case TypeAlert.Ok:
|
||||
newNotification.classList.add('ok_alert_animate');
|
||||
break;
|
||||
case TypeAlert.Warning:
|
||||
newNotification.classList.add('warning_alert_animate');
|
||||
break;
|
||||
}
|
||||
newNotification.textContent = notification.text;
|
||||
container.appendChild(newNotification);
|
||||
newNotification.classList.add('puff-in-center');
|
||||
setTimeout(() => {
|
||||
newNotification.remove();
|
||||
}, notification.duration * 1000);
|
||||
}
|
||||
}
|
||||
export var TypeAlert;
|
||||
(function (TypeAlert) {
|
||||
TypeAlert["Error"] = "error";
|
||||
TypeAlert["Warning"] = "warning";
|
||||
TypeAlert["Ok"] = "ok";
|
||||
})(TypeAlert || (TypeAlert = {}));
|
||||
//# sourceMappingURL=alerts.js.map
|
1
APP_WEB/ScriptsAndCss/JsScripts/alerts.js.map
Normal file
1
APP_WEB/ScriptsAndCss/JsScripts/alerts.js.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"alerts.js","sourceRoot":"","sources":["../TypeScripts/alerts.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,MAAM;IAMR,SAAS,CAAC,YAA0B;QACvC,MAAM,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,wBAAwB,CAAC,CAAC;QACpE,IAAI,CAAC,SAAS;YAAE,OAAO;QAGvB,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACtD,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAE9C,QAAQ,YAAY,CAAC,IAAI,EAAE,CAAC;YACxB,KAAK,SAAS,CAAC,KAAK;gBAChB,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;gBACrD,MAAM;YACV,KAAK,SAAS,CAAC,EAAE;gBACb,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;gBAClD,MAAM;YACV,KAAK,SAAS,CAAC,OAAO;gBAClB,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;gBACvD,MAAM;QACd,CAAC;QAED,eAAe,CAAC,WAAW,GAAG,YAAY,CAAC,IAAI,CAAC;QAGhD,SAAS,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;QACvC,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAGhD,UAAU,CAAC,GAAG,EAAE;YACZ,eAAe,CAAC,MAAM,EAAE,CAAC;QAC7B,CAAC,EAAE,YAAY,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IACrC,CAAC;CACJ;AASD,MAAM,CAAN,IAAY,SAIX;AAJD,WAAY,SAAS;IACjB,4BAAe,CAAA;IACf,gCAAmB,CAAA;IACnB,sBAAS,CAAA;AACb,CAAC,EAJW,SAAS,KAAT,SAAS,QAIpB"}
|
26
APP_WEB/ScriptsAndCss/JsScripts/cookies.js
Normal file
26
APP_WEB/ScriptsAndCss/JsScripts/cookies.js
Normal file
@ -0,0 +1,26 @@
|
||||
export class Cookies {
|
||||
getCookie(cookieName) {
|
||||
const name = cookieName + "=";
|
||||
const decodedCookie = decodeURIComponent(document.cookie);
|
||||
const ca = decodedCookie.split(";");
|
||||
for (let i = 0; i < ca.length; i++) {
|
||||
let c = ca[i];
|
||||
while (c.charAt(0) === " ") {
|
||||
c = c.substring(1);
|
||||
}
|
||||
if (c.indexOf(name) === 0) {
|
||||
return c.substring(name.length, c.length);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
setCookie(name, value, days) {
|
||||
const date = new Date();
|
||||
date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
|
||||
document.cookie = name + "=" + encodeURIComponent(value) + ";expires=" + date.toUTCString() + ";path=/;secure";
|
||||
}
|
||||
removeCookie(name) {
|
||||
document.cookie = name + "=;Max-Age=-99999999;";
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=cookies.js.map
|
1
APP_WEB/ScriptsAndCss/JsScripts/cookies.js.map
Normal file
1
APP_WEB/ScriptsAndCss/JsScripts/cookies.js.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"cookies.js","sourceRoot":"","sources":["../TypeScripts/cookies.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,OAAO;IAOhB,SAAS,CAAC,UAAkB;QAExB,MAAM,IAAI,GAAQ,UAAU,GAAG,GAAG,CAAC;QAEnC,MAAM,aAAa,GAAG,kBAAkB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAE1D,MAAM,EAAE,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAEjC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;YAEd,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;gBAEzB,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YACvB,CAAC;YAED,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBAExB,OAAO,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;YAC9C,CAAC;QACL,CAAC;QAED,OAAO,EAAE,CAAC;IACd,CAAC;IAOD,SAAS,CAAC,IAAY,EAAE,KAAa,EAAE,IAAY;QAG/C,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAGxB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;QAG1D,QAAQ,CAAC,MAAM,GAAG,IAAI,GAAG,GAAG,GAAG,kBAAkB,CAAC,KAAK,CAAC,GAAG,WAAW,GAAG,IAAI,CAAC,WAAW,EAAE,GAAG,gBAAgB,CAAC;IACnH,CAAC;IAMD,YAAY,CAAC,IAAY;QACrB,QAAQ,CAAC,MAAM,GAAG,IAAI,GAAG,sBAAsB,CAAC;IACpD,CAAC;CACJ"}
|
29
APP_WEB/ScriptsAndCss/JsScripts/main_api.js
Normal file
29
APP_WEB/ScriptsAndCss/JsScripts/main_api.js
Normal file
@ -0,0 +1,29 @@
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
import { Cookies } from "./cookies";
|
||||
import { Utilities } from "./utilities";
|
||||
(() => {
|
||||
window.addEventListener("load", () => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const utilities = new Utilities();
|
||||
const cookies = new Cookies();
|
||||
const currentUrl = new URL(document.location.href);
|
||||
const pathname = currentUrl.pathname.toLowerCase();
|
||||
const partsPath = pathname.split("/");
|
||||
switch (partsPath[1]) {
|
||||
case "":
|
||||
{
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}));
|
||||
})();
|
||||
//# sourceMappingURL=main_api.js.map
|
1
APP_WEB/ScriptsAndCss/JsScripts/main_api.js.map
Normal file
1
APP_WEB/ScriptsAndCss/JsScripts/main_api.js.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"main_api.js","sourceRoot":"","sources":["../TypeScripts/main_api.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,CAAC,GAAG,EAAE;IAEF,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAS,EAAE;QAEvC,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;QAGlC,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;QAG9B,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAGnD,MAAM,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;QAGnD,MAAM,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAGtC,QAAQ,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;YACnB,KAAK,EAAE;gBACH,CAAC;gBAKD,CAAC;gBACD,MAAM;YACV;gBACI,MAAM;QACd,CAAC;IACL,CAAC,CAAA,CAAC,CAAC;AACP,CAAC,CAAC,EAAE,CAAC"}
|
143
APP_WEB/ScriptsAndCss/JsScripts/utilities.js
Normal file
143
APP_WEB/ScriptsAndCss/JsScripts/utilities.js
Normal file
@ -0,0 +1,143 @@
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
import { Alerts } from "./alerts";
|
||||
export class Utilities {
|
||||
constructor() {
|
||||
this.Alerts = new Alerts();
|
||||
}
|
||||
isEmpty(value) {
|
||||
if (value == null)
|
||||
return true;
|
||||
if (value === "")
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
setInputWarning(input) {
|
||||
input.classList.add("warning_input");
|
||||
const timeout = setTimeout(() => {
|
||||
input.classList.remove("warning_input");
|
||||
clearTimeout(timeout);
|
||||
}, 3000);
|
||||
}
|
||||
setAreaWarning(input) {
|
||||
input.classList.add("warning_area");
|
||||
const timeout = setTimeout(() => {
|
||||
input.classList.remove("warning_area");
|
||||
clearTimeout(timeout);
|
||||
}, 3000);
|
||||
}
|
||||
isValidEmail(email) {
|
||||
if (this.isEmpty(email))
|
||||
return false;
|
||||
const pattern = /^([a-z0-9_.-])+@[a-z0-9-]+\.([a-z]{2,4}\.)?[a-z]{2,4}$/i;
|
||||
return pattern.test(email);
|
||||
}
|
||||
doDelay(mlsec) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise(resolve => {
|
||||
setTimeout(() => {
|
||||
resolve(null);
|
||||
}, mlsec);
|
||||
});
|
||||
});
|
||||
}
|
||||
get getWidh() {
|
||||
return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
||||
}
|
||||
get getHeight() {
|
||||
return window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
|
||||
}
|
||||
getRandomInt(min, max) {
|
||||
min = Math.ceil(min);
|
||||
max = Math.floor(max);
|
||||
return Math.floor(Math.random() * (max - min + 1)) + min;
|
||||
}
|
||||
copyValueToBuffer(value, element) {
|
||||
try {
|
||||
const coord = element.getBoundingClientRect();
|
||||
const scrolled = window.pageYOffset || document.documentElement.scrollTop;
|
||||
const iOsDevice = navigator.userAgent.match(/ipad|iphone/i);
|
||||
const textArea = document.createElement("textarea");
|
||||
textArea.readOnly = true;
|
||||
textArea.style.top = `${Math.round(scrolled + coord.top)}px`;
|
||||
textArea.classList.add("text_copy");
|
||||
textArea.value = value;
|
||||
document.body.appendChild(textArea);
|
||||
textArea.focus();
|
||||
if (iOsDevice) {
|
||||
const editable = textArea.contentEditable;
|
||||
const readOnly = textArea.readOnly;
|
||||
textArea.contentEditable = "true";
|
||||
textArea.readOnly = false;
|
||||
const range = document.createRange();
|
||||
range.selectNodeContents(textArea);
|
||||
const selection = window.getSelection();
|
||||
selection.removeAllRanges();
|
||||
selection.addRange(range);
|
||||
textArea.setSelectionRange(0, 999999);
|
||||
textArea.contentEditable = editable;
|
||||
textArea.readOnly = readOnly;
|
||||
}
|
||||
else {
|
||||
textArea.select();
|
||||
}
|
||||
const resultCopy = document.execCommand("copy");
|
||||
document.body.removeChild(textArea);
|
||||
return resultCopy;
|
||||
}
|
||||
catch (e) {
|
||||
console.error("Error: ", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
getCurrentDate() {
|
||||
const date = new Date();
|
||||
const nowDay = date.getDate();
|
||||
const nowMonth = date.getMonth() + 1;
|
||||
let forFullDay = "";
|
||||
if (nowDay < 10) {
|
||||
forFullDay = "0";
|
||||
}
|
||||
let forFullMonth = "";
|
||||
if (nowMonth < 10) {
|
||||
forFullMonth = "0";
|
||||
}
|
||||
return `${forFullDay}${nowDay}.${forFullMonth}${nowMonth}.${date.getFullYear()}`;
|
||||
}
|
||||
stringToBoolean(str) {
|
||||
const lowerStr = str.toLowerCase();
|
||||
if (lowerStr === "true") {
|
||||
return true;
|
||||
}
|
||||
else if (lowerStr === "false") {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
generateUuid() {
|
||||
var d = new Date().getTime();
|
||||
var d2 = ((typeof performance !== "undefined") && performance.now && (performance.now() * 1000)) || 0;
|
||||
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, c => {
|
||||
var r = Math.random() * 16;
|
||||
if (d > 0) {
|
||||
r = (d + r) % 16 | 0;
|
||||
d = Math.floor(d / 16);
|
||||
}
|
||||
else {
|
||||
r = (d2 + r) % 16 | 0;
|
||||
d2 = Math.floor(d2 / 16);
|
||||
}
|
||||
return (c === "x" ? r : (r & 0x3 | 0x8)).toString(16);
|
||||
});
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=utilities.js.map
|
1
APP_WEB/ScriptsAndCss/JsScripts/utilities.js.map
Normal file
1
APP_WEB/ScriptsAndCss/JsScripts/utilities.js.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"utilities.js","sourceRoot":"","sources":["../TypeScripts/utilities.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAKlC,MAAM,OAAO,SAAS;IAGlB;QACI,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;IAC/B,CAAC;IAOD,OAAO,CAAC,KAAa;QAGjB,IAAI,KAAK,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC;QAG/B,IAAI,KAAK,KAAK,EAAE;YAAE,OAAO,IAAI,CAAC;QAG9B,OAAO,KAAK,CAAC;IACjB,CAAC;IAMD,eAAe,CAAC,KAAuB;QAGnC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QAGrC,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;YAG5B,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;YAGxC,YAAY,CAAC,OAAO,CAAC,CAAC;QAE1B,CAAC,EAAE,IAAI,CAAC,CAAC;IACb,CAAC;IAMD,cAAc,CAAC,KAA0B;QAGrC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAGpC,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;YAG5B,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;YAGvC,YAAY,CAAC,OAAO,CAAC,CAAC;QAE1B,CAAC,EAAE,IAAI,CAAC,CAAC;IACb,CAAC;IAOD,YAAY,CAAC,KAAa;QAGtB,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC;QAGtC,MAAM,OAAO,GAAG,yDAAyD,CAAC;QAG1E,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAMK,OAAO,CAAC,KAAa;;YAIvB,OAAO,IAAI,OAAO,CAAO,OAAO,CAAC,EAAE;gBAG/B,UAAU,CAAC,GAAG,EAAE;oBAGZ,OAAO,CAAC,IAAI,CAAC,CAAC;gBAElB,CAAC,EAAE,KAAK,CAAC,CAAC;YACd,CAAC,CAAC,CAAC;QACP,CAAC;KAAA;IAMD,IAAI,OAAO;QAGP,OAAO,MAAM,CAAC,UAAU,IAAI,QAAQ,CAAC,eAAe,CAAC,WAAW,IAAI,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC;IAClG,CAAC;IAMD,IAAI,SAAS;QAGT,OAAO,MAAM,CAAC,WAAW,IAAI,QAAQ,CAAC,eAAe,CAAC,YAAY,IAAI,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC;IACrG,CAAC;IAOD,YAAY,CAAC,GAAW,EAAE,GAAW;QAEjC,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAErB,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEtB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;IAC7D,CAAC;IAOD,iBAAiB,CAAC,KAAa,EAAE,OAAY;QAEzC,IAAI,CAAC;YAGD,MAAM,KAAK,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;YAG9C,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,IAAI,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC;YAG1E,MAAM,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;YAG5D,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YAGpD,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC;YAGzB,QAAQ,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;YAG7D,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;YAGpC,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC;YAGvB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;YAGpC,QAAQ,CAAC,KAAK,EAAE,CAAC;YAGjB,IAAI,SAAS,EAAE,CAAC;gBAEZ,MAAM,QAAQ,GAAG,QAAQ,CAAC,eAAe,CAAC;gBAE1C,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;gBAEnC,QAAQ,CAAC,eAAe,GAAG,MAAM,CAAC;gBAElC,QAAQ,CAAC,QAAQ,GAAG,KAAK,CAAC;gBAE1B,MAAM,KAAK,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;gBAErC,KAAK,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;gBAEnC,MAAM,SAAS,GAAG,MAAM,CAAC,YAAY,EAAE,CAAC;gBAExC,SAAS,CAAC,eAAe,EAAE,CAAC;gBAE5B,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;gBAE1B,QAAQ,CAAC,iBAAiB,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;gBAEtC,QAAQ,CAAC,eAAe,GAAG,QAAQ,CAAC;gBAEpC,QAAQ,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAEjC,CAAC;iBAAM,CAAC;gBAGJ,QAAQ,CAAC,MAAM,EAAE,CAAC;YACtB,CAAC;YAGD,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;YAGhD,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;YAGpC,OAAO,UAAU,CAAC;QAEtB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YAGT,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;YAG5B,OAAO,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;IAKD,cAAc;QAGV,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAGxB,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAG9B,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;QAGrC,IAAI,UAAU,GAAG,EAAE,CAAC;QAGpB,IAAI,MAAM,GAAG,EAAE,EAAE,CAAC;YAGd,UAAU,GAAG,GAAG,CAAC;QACrB,CAAC;QAGD,IAAI,YAAY,GAAG,EAAE,CAAC;QAGtB,IAAI,QAAQ,GAAG,EAAE,EAAE,CAAC;YAGhB,YAAY,GAAG,GAAG,CAAC;QACvB,CAAC;QAED,OAAO,GAAG,UAAU,GAAG,MAAM,IAAI,YAAY,GAAG,QAAQ,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;IACrF,CAAC;IAED,eAAe,CAAC,GAAW;QACvB,MAAM,QAAQ,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC;QACnC,IAAI,QAAQ,KAAK,MAAM,EAAE,CAAC;YACtB,OAAO,IAAI,CAAC;QAChB,CAAC;aAAM,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;YAC9B,OAAO,KAAK,CAAC;QACjB,CAAC;aAAM,CAAC;YAGJ,OAAO,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;IAKD,YAAY;QAER,IAAI,CAAC,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;QAE7B,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,WAAW,KAAK,WAAW,CAAC,IAAI,WAAW,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;QAGtG,OAAO,sCAAsC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE;YAE/D,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC;YAE3B,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;gBAER,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;gBACrB,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;YAE3B,CAAC;iBAAM,CAAC;gBAEJ,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;gBACtB,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;YAC7B,CAAC;YAED,OAAO,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC1D,CAAC,CAAC,CAAC;IACP,CAAC;CACJ"}
|
51
APP_WEB/ScriptsAndCss/TypeScripts/alerts.ts
Normal file
51
APP_WEB/ScriptsAndCss/TypeScripts/alerts.ts
Normal file
@ -0,0 +1,51 @@
|
||||
export class Alerts {
|
||||
/**
|
||||
* Функция для отображения уведомления
|
||||
*
|
||||
* TODO: Сделать синхронизацию уведомления для всех - если она касается размещения задач на сервере
|
||||
*/
|
||||
public AlertShow(notification: Notification): void {
|
||||
const container = document.getElementById('notification-container');
|
||||
if (!container) return;
|
||||
|
||||
// Создаем новое уведомление
|
||||
const newNotification = document.createElement('div');
|
||||
newNotification.classList.add('notification');
|
||||
|
||||
switch (notification.type) {
|
||||
case TypeAlert.Error:
|
||||
newNotification.classList.add('error_alert_animate');
|
||||
break;
|
||||
case TypeAlert.Ok:
|
||||
newNotification.classList.add('ok_alert_animate');
|
||||
break;
|
||||
case TypeAlert.Warning:
|
||||
newNotification.classList.add('warning_alert_animate');
|
||||
break;
|
||||
}
|
||||
|
||||
newNotification.textContent = notification.text;
|
||||
|
||||
// Добавляем уведомление в контейнер
|
||||
container.appendChild(newNotification);
|
||||
newNotification.classList.add('puff-in-center');
|
||||
|
||||
// Убираем уведомление после указанного времени
|
||||
setTimeout(() => {
|
||||
newNotification.remove();
|
||||
}, notification.duration * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
// Тип для уведомлений
|
||||
interface Notification {
|
||||
text: string;
|
||||
duration: number; // продолжительность отображения в секундах
|
||||
type: TypeAlert;
|
||||
}
|
||||
|
||||
export enum TypeAlert {
|
||||
Error = 'error',
|
||||
Warning = 'warning',
|
||||
Ok = 'ok',
|
||||
}
|
61
APP_WEB/ScriptsAndCss/TypeScripts/cookies.ts
Normal file
61
APP_WEB/ScriptsAndCss/TypeScripts/cookies.ts
Normal file
@ -0,0 +1,61 @@
|
||||
/**
|
||||
* Класс работы с куками
|
||||
*/
|
||||
export class Cookies {
|
||||
|
||||
/**
|
||||
* Метод получает значение куки по имени
|
||||
* @param cookieName - название куки
|
||||
* @return - значение куки
|
||||
*/
|
||||
getCookie(cookieName: string): string {
|
||||
|
||||
const name: any = cookieName + "=";
|
||||
|
||||
const decodedCookie = decodeURIComponent(document.cookie);
|
||||
|
||||
const ca = decodedCookie.split(";");
|
||||
|
||||
for (let i = 0; i < ca.length; i++) {
|
||||
|
||||
let c = ca[i];
|
||||
|
||||
while (c.charAt(0) === " ") {
|
||||
|
||||
c = c.substring(1);
|
||||
}
|
||||
|
||||
if (c.indexOf(name) === 0) {
|
||||
|
||||
return c.substring(name.length, c.length);
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Метод устанавливает куку
|
||||
* @param name - имя куки
|
||||
* @param value - значение куки
|
||||
*/
|
||||
setCookie(name: string, value: string, days: number): void {
|
||||
|
||||
//создаем переменную даты
|
||||
const date = new Date();
|
||||
|
||||
//устанавливаем дату плюс месяц
|
||||
date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
|
||||
|
||||
//устанавливаем куку
|
||||
document.cookie = name + "=" + encodeURIComponent(value) + ";expires=" + date.toUTCString() + ";path=/;secure";
|
||||
}
|
||||
|
||||
/**
|
||||
* Метод удаляет куку по имени
|
||||
* @param name - имя куки
|
||||
*/
|
||||
removeCookie(name: string): void {
|
||||
document.cookie = name + "=;Max-Age=-99999999;";
|
||||
}
|
||||
}
|
36
APP_WEB/ScriptsAndCss/TypeScripts/main_api.ts
Normal file
36
APP_WEB/ScriptsAndCss/TypeScripts/main_api.ts
Normal file
@ -0,0 +1,36 @@
|
||||
import { Cookies } from "./cookies";
|
||||
import { Utilities } from "./utilities";
|
||||
|
||||
(() => {
|
||||
//по загрузке окна
|
||||
window.addEventListener("load", async () => {
|
||||
//создаем экземпляр класса утилит
|
||||
const utilities = new Utilities();
|
||||
|
||||
//создаем экземпляр класса кук
|
||||
const cookies = new Cookies();
|
||||
|
||||
//получаем текущий URL
|
||||
const currentUrl = new URL(document.location.href);
|
||||
|
||||
//получаем путь из URL
|
||||
const pathname = currentUrl.pathname.toLowerCase();
|
||||
|
||||
//разбиваем пути URL на части
|
||||
const partsPath = pathname.split("/");
|
||||
|
||||
//смотрим путь
|
||||
switch (partsPath[1]) {
|
||||
case "": //страница авторизации
|
||||
{
|
||||
//создаем экземпляр класса авторизации
|
||||
//const auth = new IndexPage(utilities, cookies);
|
||||
////запускаем авторизацию
|
||||
//await auth.startPage();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
})();
|
312
APP_WEB/ScriptsAndCss/TypeScripts/utilities.ts
Normal file
312
APP_WEB/ScriptsAndCss/TypeScripts/utilities.ts
Normal file
@ -0,0 +1,312 @@
|
||||
import { Alerts } from "./alerts";
|
||||
|
||||
/**
|
||||
* Класс вспомогательных методов
|
||||
*/
|
||||
export class Utilities {
|
||||
public Alerts: Alerts;
|
||||
|
||||
constructor() {
|
||||
this.Alerts = new Alerts();
|
||||
}
|
||||
|
||||
/**
|
||||
* Метод проверяет строку на пустоту
|
||||
* @param value - проверяемая строка
|
||||
* @return - true:строка пуста, false:строка не пуста
|
||||
*/
|
||||
isEmpty(value: string): boolean {
|
||||
|
||||
//проверяем строку на null
|
||||
if (value == null) return true;
|
||||
|
||||
//проверяем строку на пустоту
|
||||
if (value === "") return true;
|
||||
|
||||
//отдаем строка не пуста
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Метод ставит warning на input
|
||||
* @param input
|
||||
*/
|
||||
setInputWarning(input: HTMLInputElement): void {
|
||||
|
||||
//добавляем класс warning
|
||||
input.classList.add("warning_input");
|
||||
|
||||
//делаем задержку
|
||||
const timeout = setTimeout(() => {
|
||||
|
||||
//убираем класс warning
|
||||
input.classList.remove("warning_input");
|
||||
|
||||
//очищаем задержку
|
||||
clearTimeout(timeout);
|
||||
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
/**
|
||||
* Метод ставит warning на textarea
|
||||
* @param input
|
||||
*/
|
||||
setAreaWarning(input: HTMLTextAreaElement): void {
|
||||
|
||||
//добавляем класс warning
|
||||
input.classList.add("warning_area");
|
||||
|
||||
//делаем задержку
|
||||
const timeout = setTimeout(() => {
|
||||
|
||||
//убираем класс warning
|
||||
input.classList.remove("warning_area");
|
||||
|
||||
//очищаем задержку
|
||||
clearTimeout(timeout);
|
||||
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
/**
|
||||
* Метод проверяет валидность Email
|
||||
* @param email - email
|
||||
* @return - true:yes, false:no
|
||||
*/
|
||||
isValidEmail(email: string): boolean {
|
||||
|
||||
//проверяем Email на пустоту
|
||||
if (this.isEmpty(email)) return false;
|
||||
|
||||
//паттерн проверки валидности Email
|
||||
const pattern = /^([a-z0-9_.-])+@[a-z0-9-]+\.([a-z]{2,4}\.)?[a-z]{2,4}$/i;
|
||||
|
||||
//проверяем валидность Email и отдаем результат
|
||||
return pattern.test(email);
|
||||
}
|
||||
|
||||
/**
|
||||
* Метод делает асинхронную задержку
|
||||
* @param mlsec - размер задержки в миллисекундах
|
||||
*/
|
||||
async doDelay(mlsec: number): Promise<void> {
|
||||
|
||||
//создаем новый промис
|
||||
// ReSharper disable once TsNotResolved
|
||||
return new Promise<void>(resolve => {
|
||||
|
||||
//делаем задержку
|
||||
setTimeout(() => {
|
||||
|
||||
//оповещаем промис
|
||||
resolve(null);
|
||||
|
||||
}, mlsec);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Метод отдаем ширину окна браузера
|
||||
* @returns - ширина окна браузера
|
||||
*/
|
||||
get getWidh(): number {
|
||||
|
||||
//отдаем максимальную ширину
|
||||
return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Метод отдает высоту окна браузера
|
||||
* @returns - высота окна браузера
|
||||
*/
|
||||
get getHeight(): number {
|
||||
|
||||
//отдаем максимальную высоту
|
||||
return window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
|
||||
}
|
||||
|
||||
/**
|
||||
* Метод генерирует случайное число в заданном диапазоне
|
||||
* @param min - минимальное число
|
||||
* @param max - максимальное число
|
||||
*/
|
||||
getRandomInt(min: number, max: number) {
|
||||
|
||||
min = Math.ceil(min);
|
||||
|
||||
max = Math.floor(max);
|
||||
|
||||
return Math.floor(Math.random() * (max - min + 1)) + min;
|
||||
}
|
||||
|
||||
/**
|
||||
* Метод копирует текст в буфер обмена
|
||||
* @param value - текст для копирования в буфер
|
||||
* @param element - элемент вызывающий действие копирования
|
||||
*/
|
||||
copyValueToBuffer(value: string, element: any): boolean {
|
||||
|
||||
try {
|
||||
|
||||
//получаем координаты кнопки
|
||||
const coord = element.getBoundingClientRect();
|
||||
|
||||
//получаем расстояние сколько проскроллено сверху
|
||||
const scrolled = window.pageYOffset || document.documentElement.scrollTop;
|
||||
|
||||
//получаем iOs ли устройство
|
||||
const iOsDevice = navigator.userAgent.match(/ipad|iphone/i);
|
||||
|
||||
//создаем textarea
|
||||
const textArea = document.createElement("textarea");
|
||||
|
||||
//ставим что textarea только для чтения
|
||||
textArea.readOnly = true;
|
||||
|
||||
//ставим textarea отступ сверху на величину скролла + координаты кнопки что бы экран не прыгал
|
||||
textArea.style.top = `${Math.round(scrolled + coord.top)}px`;
|
||||
|
||||
//подставляем невидимый класс
|
||||
textArea.classList.add("text_copy");
|
||||
|
||||
//подставляем текст в textarea
|
||||
textArea.value = value;
|
||||
|
||||
//добавляем textarea в DOM
|
||||
document.body.appendChild(textArea);
|
||||
|
||||
//делаем textarea в фокус
|
||||
textArea.focus();
|
||||
|
||||
//проверяем iOs устройство
|
||||
if (iOsDevice) {
|
||||
|
||||
const editable = textArea.contentEditable;
|
||||
|
||||
const readOnly = textArea.readOnly;
|
||||
|
||||
textArea.contentEditable = "true";
|
||||
|
||||
textArea.readOnly = false;
|
||||
|
||||
const range = document.createRange();
|
||||
|
||||
range.selectNodeContents(textArea);
|
||||
|
||||
const selection = window.getSelection();
|
||||
|
||||
selection.removeAllRanges();
|
||||
|
||||
selection.addRange(range);
|
||||
|
||||
textArea.setSelectionRange(0, 999999);
|
||||
|
||||
textArea.contentEditable = editable;
|
||||
|
||||
textArea.readOnly = readOnly;
|
||||
|
||||
} else {
|
||||
|
||||
//делаем textarea выбранной
|
||||
textArea.select();
|
||||
}
|
||||
|
||||
//выполняем команду по копированию в буфер обмена
|
||||
const resultCopy = document.execCommand("copy");
|
||||
|
||||
//удаляем textarea
|
||||
document.body.removeChild(textArea);
|
||||
|
||||
//отдаем результат копирования
|
||||
return resultCopy;
|
||||
|
||||
} catch (e) {
|
||||
|
||||
//выводим ошибку на консоль
|
||||
console.error("Error: ", e);
|
||||
|
||||
//возвращаем что данные не скопированы
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Метод получает текущую дату в строковом значении
|
||||
*/
|
||||
getCurrentDate(): string {
|
||||
|
||||
//получаем текущую дату
|
||||
const date = new Date();
|
||||
|
||||
//получаем текущий день
|
||||
const nowDay = date.getDate();
|
||||
|
||||
//получаем текущий месяц
|
||||
const nowMonth = date.getMonth() + 1;
|
||||
|
||||
//добавка для полного дня с нулем
|
||||
let forFullDay = "";
|
||||
|
||||
//проверяем если день менее 10
|
||||
if (nowDay < 10) {
|
||||
|
||||
//пишем ноль в добавку
|
||||
forFullDay = "0";
|
||||
}
|
||||
|
||||
//добавка для полного месяца
|
||||
let forFullMonth = "";
|
||||
|
||||
//проверяем если месяц менее 10
|
||||
if (nowMonth < 10) {
|
||||
|
||||
//пишем ноль в добавку
|
||||
forFullMonth = "0";
|
||||
}
|
||||
|
||||
return `${forFullDay}${nowDay}.${forFullMonth}${nowMonth}.${date.getFullYear()}`;
|
||||
}
|
||||
|
||||
stringToBoolean(str: string): boolean {
|
||||
const lowerStr = str.toLowerCase();
|
||||
if (lowerStr === "true") {
|
||||
return true;
|
||||
} else if (lowerStr === "false") {
|
||||
return false;
|
||||
} else {
|
||||
// Обработка случаев, когда строка не является "true" или "false"
|
||||
// Можно вернуть null, undefined, throw an error, or return a default value (e.g., false)
|
||||
return null; // Или throw new Error("Invalid boolean string");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Метод генерирует UIID
|
||||
*/
|
||||
generateUuid() {
|
||||
|
||||
var d = new Date().getTime();
|
||||
|
||||
var d2 = ((typeof performance !== "undefined") && performance.now && (performance.now() * 1000)) || 0;
|
||||
|
||||
// ReSharper disable StringLiteralTypo
|
||||
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, c => {
|
||||
|
||||
var r = Math.random() * 16;
|
||||
|
||||
if (d > 0) {
|
||||
|
||||
r = (d + r) % 16 | 0;
|
||||
d = Math.floor(d / 16);
|
||||
|
||||
} else {
|
||||
|
||||
r = (d2 + r) % 16 | 0;
|
||||
d2 = Math.floor(d2 / 16);
|
||||
}
|
||||
|
||||
return (c === "x" ? r : (r & 0x3 | 0x8)).toString(16);
|
||||
});
|
||||
}
|
||||
}
|
8
APP_WEB/Views/Home/Index.cshtml
Normal file
8
APP_WEB/Views/Home/Index.cshtml
Normal file
@ -0,0 +1,8 @@
|
||||
@{
|
||||
ViewData["Title"] = "Home Page";
|
||||
}
|
||||
|
||||
<div class="text-center">
|
||||
<h1 class="display-4">Welcome</h1>
|
||||
<p>Learn about <a href="https://learn.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p>
|
||||
</div>
|
25
APP_WEB/Views/Shared/Error.cshtml
Normal file
25
APP_WEB/Views/Shared/Error.cshtml
Normal file
@ -0,0 +1,25 @@
|
||||
@model ErrorViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Error";
|
||||
}
|
||||
|
||||
<h1 class="text-danger">Error.</h1>
|
||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||
|
||||
@if (Model.ShowRequestId)
|
||||
{
|
||||
<p>
|
||||
<strong>Request ID:</strong> <code>@Model.RequestId</code>
|
||||
</p>
|
||||
}
|
||||
|
||||
<h3>Development Mode</h3>
|
||||
<p>
|
||||
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
|
||||
</p>
|
||||
<p>
|
||||
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
|
||||
It can result in displaying sensitive information from exceptions to end users.
|
||||
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
|
||||
and restarting the app.
|
||||
</p>
|
22
APP_WEB/Views/Shared/_Layout.cshtml
Normal file
22
APP_WEB/Views/Shared/_Layout.cshtml
Normal file
@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>@ViewData["Title"] - AppWeb</title>
|
||||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="~/css/app.min.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/AppWeb.styles.css" asp-append-version="true" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<main role="main" class="pb-3">
|
||||
@RenderBody()
|
||||
</main>
|
||||
</div>
|
||||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="~/js/app.min.js" asp-append-version="true"></script>
|
||||
@await RenderSectionAsync("Scripts", required: false)
|
||||
</body>
|
||||
</html>
|
48
APP_WEB/Views/Shared/_Layout.cshtml.css
Normal file
48
APP_WEB/Views/Shared/_Layout.cshtml.css
Normal file
@ -0,0 +1,48 @@
|
||||
/* Please see documentation at https://learn.microsoft.com/aspnet/core/client-side/bundling-and-minification
|
||||
for details on configuring this project to bundle and minify static web assets. */
|
||||
|
||||
a.navbar-brand {
|
||||
white-space: normal;
|
||||
text-align: center;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0077cc;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
color: #fff;
|
||||
background-color: #1b6ec2;
|
||||
border-color: #1861ac;
|
||||
}
|
||||
|
||||
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
|
||||
color: #fff;
|
||||
background-color: #1b6ec2;
|
||||
border-color: #1861ac;
|
||||
}
|
||||
|
||||
.border-top {
|
||||
border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
.border-bottom {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.box-shadow {
|
||||
box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
|
||||
}
|
||||
|
||||
button.accept-policy {
|
||||
font-size: 1rem;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
line-height: 60px;
|
||||
}
|
2
APP_WEB/Views/Shared/_ValidationScriptsPartial.cshtml
Normal file
2
APP_WEB/Views/Shared/_ValidationScriptsPartial.cshtml
Normal file
@ -0,0 +1,2 @@
|
||||
<script src="~/lib/jquery-validation/dist/jquery.validate.min.js"></script>
|
||||
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>
|
3
APP_WEB/Views/_ViewImports.cshtml
Normal file
3
APP_WEB/Views/_ViewImports.cshtml
Normal file
@ -0,0 +1,3 @@
|
||||
@using AppWeb
|
||||
@using AppWeb.Models
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
3
APP_WEB/Views/_ViewStart.cshtml
Normal file
3
APP_WEB/Views/_ViewStart.cshtml
Normal file
@ -0,0 +1,3 @@
|
||||
@{
|
||||
Layout = "_Layout";
|
||||
}
|
8
APP_WEB/app_configuration.json
Normal file
8
APP_WEB/app_configuration.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"appSettings": {
|
||||
"appHost": "localhost:8833"
|
||||
},
|
||||
"admins": [
|
||||
"::1"
|
||||
]
|
||||
}
|
8
APP_WEB/appsettings.Development.json
Normal file
8
APP_WEB/appsettings.Development.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
9
APP_WEB/appsettings.json
Normal file
9
APP_WEB/appsettings.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
7847
APP_WEB/package-lock.json
generated
Normal file
7847
APP_WEB/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
55
APP_WEB/package.json
Normal file
55
APP_WEB/package.json
Normal file
@ -0,0 +1,55 @@
|
||||
{
|
||||
"version": "1.0.0",
|
||||
"name": "asp.net",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"css-minimizer-webpack-plugin": "7.0.0",
|
||||
"terser-webpack-plugin": "5.3.12",
|
||||
"cytoscape": "^3.31.0",
|
||||
"cytoscape-cose-bilkent": "4.1.0",
|
||||
"grunt": "1.4.1",
|
||||
"style-loader": "^4.0.0",
|
||||
"css-loader": "^7.1.2",
|
||||
"mini-css-extract-plugin": "^2.9.2",
|
||||
"grunt-webpack": "^7.0.0",
|
||||
"webpack-cli": "^6.0.1",
|
||||
"ts-loader": "^9.5.2",
|
||||
"browser-sync": "^3.0.3",
|
||||
"grunt-browser-sync": "^2.2.0",
|
||||
"grunt-contrib-clean": "2.0.0",
|
||||
"grunt-contrib-concat": "2.0.0",
|
||||
"grunt-contrib-cssmin": "5.0.0",
|
||||
"grunt-contrib-uglify": "5.0.1",
|
||||
"grunt-contrib-watch": "1.1.0",
|
||||
"grunt-ts": "6.0.0-beta.22"
|
||||
},
|
||||
"dependencies": {
|
||||
"cytoscape": "^3.31.0"
|
||||
},
|
||||
"comments": {
|
||||
"version": "Указывает текущую версию вашего проекта.",
|
||||
"name": "Имя вашего проекта.",
|
||||
"private": "Указывает, что проект является приватным и не должен быть опубликован в npm.",
|
||||
"devDependencies": {
|
||||
"css-minimizer-webpack-plugin": "Плагин для минимизации CSS файлов в процессе сборки Webpack.",
|
||||
"terser-webpack-plugin": "Плагин для минимизации JavaScript с использованием Terser.",
|
||||
"cytoscape": "Библиотека для работы с графами и сетями.",
|
||||
"cytoscape-cose-bilkent": "Плагин для Cytoscape, который добавляет алгоритм планирования расположения узлов.",
|
||||
"grunt": "Система автоматизации задач для Node.js, например, для сборки, минификации и тестирования.",
|
||||
"style-loader": "Лоадер для инжекции CSS в DOM через теги `<style>` в процессе сборки.",
|
||||
"css-loader": "Лоадер для обработки CSS файлов и поддержки импорта других CSS или стилей.",
|
||||
"mini-css-extract-plugin": "Плагин для извлечения CSS в отдельные файлы, что улучшает производительность.",
|
||||
"grunt-webpack": "Плагин для интеграции Webpack с системой Grunt.",
|
||||
"webpack-cli": "CLI для работы с Webpack, позволяет запускать сборку через командную строку.",
|
||||
"ts-loader": "Лоадер для загрузки TypeScript файлов в Webpack.",
|
||||
"browser-sync": "Инструмент для синхронизации браузеров и автоперезагрузки в процессе разработки.",
|
||||
"grunt-browser-sync": "Плагин для интеграции BrowserSync с Grunt.",
|
||||
"grunt-contrib-clean": "Плагин для удаления файлов или папок перед выполнением задач.",
|
||||
"grunt-contrib-concat": "Плагин для конкатенации (объединения) файлов в один.",
|
||||
"grunt-contrib-cssmin": "Плагин для сжатия CSS файлов.",
|
||||
"grunt-contrib-uglify": "Плагин для сжатия JavaScript файлов (использует UglifyJS).",
|
||||
"grunt-contrib-watch": "Плагин для отслеживания изменений файлов и автоматического выполнения задач.",
|
||||
"grunt-ts": "Плагин для компиляции TypeScript файлов в Grunt."
|
||||
}
|
||||
}
|
||||
}
|
21
APP_WEB/tsconfig.json
Normal file
21
APP_WEB/tsconfig.json
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2016", // Устанавливает уровень JavaScript, в который компилируется TypeScript (в данном случае ES2016).
|
||||
"module": "es6", // Определяет, какой модульный формат используется в процессе компиляции (ES6 модули).
|
||||
"moduleResolution": "node", // Способ разрешения модулей. В данном случае используется разрешение как в Node.js.
|
||||
"jsx": "preserve", // Как компилировать JSX. В данном случае оставляем JSX без изменений.
|
||||
"declaration": false, // Указывает, генерировать ли файлы типов (.d.ts). Здесь это отключено.
|
||||
"removeComments": true, // Указывает, что комментарии должны быть удалены из скомпилированного кода.
|
||||
"noImplicitAny": false, // Отключает предупреждения о неявных типах `any` в коде.
|
||||
"noEmitOnError": true, // Указывает, что компиляция должна быть остановлена, если есть ошибки.
|
||||
"sourceMap": true, // Генерирует карты исходных кодов для упрощения отладки.
|
||||
"esModuleInterop": true, // Включает совместимость с модулями ES при импорте CommonJS модулей.
|
||||
"experimentalDecorators": true, // Включает поддержку экспериментальных декораторов в TypeScript.
|
||||
"emitDecoratorMetadata": true, // Включает генерацию метаданных для декораторов, которые могут использоваться в таких библиотеках как TypeORM или Angular.
|
||||
"outDir": "ScriptsAndCss/JsScripts", // Указывает директорию для сохранения скомпилированных файлов.
|
||||
"lib": [ "es2016", "dom" ] // Указывает библиотеки, которые будут включены при компиляции (ES2016 и DOM).
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules" // Исключает папку node_modules из процесса компиляции.
|
||||
]
|
||||
}
|
41
APP_WEB/webpack.config.js
Normal file
41
APP_WEB/webpack.config.js
Normal file
@ -0,0 +1,41 @@
|
||||
const path = require('path');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
||||
const TerserPlugin = require('terser-webpack-plugin'); // Импортируем TerserPlugin
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
app: './ScriptsAndCss/TypeScripts/main_api.ts', // Точка входа для JavaScript
|
||||
styles: './ScriptsAndCss/CssFiles/styles.css' // Точка входа для CSS (может быть любой CSS-файл)
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'wwwroot/js'),
|
||||
filename: '[name].min.js' // Используем [name] для динамического имени файла
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.ts', '.js', '.css'] // Добавили .css
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts$/,
|
||||
use: 'ts-loader',
|
||||
exclude: /node_modules/
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: [
|
||||
MiniCssExtractPlugin.loader, // Извлекает CSS в отдельные файлы
|
||||
'css-loader' // Обрабатывает @import и url()
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new MiniCssExtractPlugin({
|
||||
filename: '../css/app.min.css' // Куда Webpack должен поместить CSS-файл
|
||||
})
|
||||
],
|
||||
mode: 'development',
|
||||
watch: true,
|
||||
};
|
1
APP_WEB/wwwroot/css/app.min.css
vendored
Normal file
1
APP_WEB/wwwroot/css/app.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
html{font-size:14px}@media (min-width:768px){html{font-size:16px}}.btn-link.nav-link:focus,.btn:active:focus,.btn:focus,.form-check-input:focus,.form-control:focus{box-shadow:0 0 0 .1rem #fff,0 0 0 .25rem #258cfb}html{min-height:100%;position:relative}body{margin-bottom:60px}
|
BIN
APP_WEB/wwwroot/favicon.ico
Normal file
BIN
APP_WEB/wwwroot/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
1
APP_WEB/wwwroot/js/app.min.js
vendored
Normal file
1
APP_WEB/wwwroot/js/app.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(()=>{"use strict";class e{getCookie(e){const t=e+"=",n=decodeURIComponent(document.cookie).split(";");for(let e=0;e<n.length;e++){let o=n[e];for(;" "===o.charAt(0);)o=o.substring(1);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return""}setCookie(e,t,n){const o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3),document.cookie=e+"="+encodeURIComponent(t)+";expires="+o.toUTCString()+";path=/;secure"}removeCookie(e){document.cookie=e+"=;Max-Age=-99999999;"}}class t{AlertShow(e){const t=document.getElementById("notification-container");if(!t)return;const o=document.createElement("div");switch(o.classList.add("notification"),e.type){case n.Error:o.classList.add("error_alert_animate");break;case n.Ok:o.classList.add("ok_alert_animate");break;case n.Warning:o.classList.add("warning_alert_animate")}o.textContent=e.text,t.appendChild(o),o.classList.add("puff-in-center"),setTimeout((()=>{o.remove()}),1e3*e.duration)}}var n;!function(e){e.Error="error",e.Warning="warning",e.Ok="ok"}(n||(n={}));var o=function(e,t,n,o){return new(n||(n=Promise))((function(r,a){function i(e){try{s(o.next(e))}catch(e){a(e)}}function c(e){try{s(o.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}s((o=o.apply(e,t||[])).next())}))};class r{constructor(){this.Alerts=new t}isEmpty(e){return null==e||""===e}setInputWarning(e){e.classList.add("warning_input");const t=setTimeout((()=>{e.classList.remove("warning_input"),clearTimeout(t)}),3e3)}setAreaWarning(e){e.classList.add("warning_area");const t=setTimeout((()=>{e.classList.remove("warning_area"),clearTimeout(t)}),3e3)}isValidEmail(e){if(this.isEmpty(e))return!1;return/^([a-z0-9_.-])+@[a-z0-9-]+\.([a-z]{2,4}\.)?[a-z]{2,4}$/i.test(e)}doDelay(e){return o(this,void 0,void 0,(function*(){return new Promise((t=>{setTimeout((()=>{t(null)}),e)}))}))}get getWidh(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}get getHeight(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}getRandomInt(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}copyValueToBuffer(e,t){try{const n=t.getBoundingClientRect(),o=window.pageYOffset||document.documentElement.scrollTop,r=navigator.userAgent.match(/ipad|iphone/i),a=document.createElement("textarea");if(a.readOnly=!0,a.style.top=`${Math.round(o+n.top)}px`,a.classList.add("text_copy"),a.value=e,document.body.appendChild(a),a.focus(),r){const e=a.contentEditable,t=a.readOnly;a.contentEditable="true",a.readOnly=!1;const n=document.createRange();n.selectNodeContents(a);const o=window.getSelection();o.removeAllRanges(),o.addRange(n),a.setSelectionRange(0,999999),a.contentEditable=e,a.readOnly=t}else a.select();const i=document.execCommand("copy");return document.body.removeChild(a),i}catch(e){return console.error("Error: ",e),!1}}getCurrentDate(){const e=new Date,t=e.getDate(),n=e.getMonth()+1;let o="";t<10&&(o="0");let r="";return n<10&&(r="0"),`${o}${t}.${r}${n}.${e.getFullYear()}`}stringToBoolean(e){const t=e.toLowerCase();return"true"===t||"false"!==t&&null}generateUuid(){var e=(new Date).getTime(),t="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(n=>{var o=16*Math.random();return e>0?(o=(e+o)%16|0,e=Math.floor(e/16)):(o=(t+o)%16|0,t=Math.floor(t/16)),("x"===n?o:3&o|8).toString(16)}))}}var a=function(e,t,n,o){return new(n||(n=Promise))((function(r,a){function i(e){try{s(o.next(e))}catch(e){a(e)}}function c(e){try{s(o.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}s((o=o.apply(e,t||[])).next())}))};window.addEventListener("load",(()=>a(void 0,void 0,void 0,(function*(){new r,new e,new URL(document.location.href).pathname.toLowerCase().split("/")[1]}))))})();
|
0
APP_WEB/wwwroot/js/styles.min.js
vendored
Normal file
0
APP_WEB/wwwroot/js/styles.min.js
vendored
Normal file
22
APP_WEB/wwwroot/lib/bootstrap/LICENSE
Normal file
22
APP_WEB/wwwroot/lib/bootstrap/LICENSE
Normal file
@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2011-2021 Twitter, Inc.
|
||||
Copyright (c) 2011-2021 The Bootstrap Authors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
4997
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css
vendored
Normal file
4997
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map
vendored
Normal file
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css
vendored
Normal file
7
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map
vendored
Normal file
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
4996
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css
vendored
Normal file
4996
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map
vendored
Normal file
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css
vendored
Normal file
7
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map
vendored
Normal file
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
427
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css
vendored
Normal file
427
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css
vendored
Normal file
@ -0,0 +1,427 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors
|
||||
* Copyright 2011-2021 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
:root {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: var(--bs-body-font-family);
|
||||
font-size: var(--bs-body-font-size);
|
||||
font-weight: var(--bs-body-font-weight);
|
||||
line-height: var(--bs-body-line-height);
|
||||
color: var(--bs-body-color);
|
||||
text-align: var(--bs-body-text-align);
|
||||
background-color: var(--bs-body-bg);
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
hr {
|
||||
margin: 1rem 0;
|
||||
color: inherit;
|
||||
background-color: currentColor;
|
||||
border: 0;
|
||||
opacity: 0.25;
|
||||
}
|
||||
|
||||
hr:not([size]) {
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
h6, h5, h4, h3, h2, h1 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-weight: 500;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: calc(1.375rem + 1.5vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: calc(1.325rem + 0.9vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h2 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: calc(1.3rem + 0.6vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h3 {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h4 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
abbr[title],
|
||||
abbr[data-bs-original-title] {
|
||||
-webkit-text-decoration: underline dotted;
|
||||
text-decoration: underline dotted;
|
||||
cursor: help;
|
||||
-webkit-text-decoration-skip-ink: none;
|
||||
text-decoration-skip-ink: none;
|
||||
}
|
||||
|
||||
address {
|
||||
margin-bottom: 1rem;
|
||||
font-style: normal;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul {
|
||||
padding-left: 2rem;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
dl {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
ol ol,
|
||||
ul ul,
|
||||
ol ul,
|
||||
ul ol {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-bottom: 0.5rem;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
||||
mark {
|
||||
padding: 0.2em;
|
||||
background-color: #fcf8e3;
|
||||
}
|
||||
|
||||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
font-size: 0.75em;
|
||||
line-height: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0d6efd;
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:hover {
|
||||
color: #0a58ca;
|
||||
}
|
||||
|
||||
a:not([href]):not([class]), a:not([href]):not([class]):hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
font-size: 1em;
|
||||
direction: ltr /* rtl:ignore */;
|
||||
unicode-bidi: bidi-override;
|
||||
}
|
||||
|
||||
pre {
|
||||
display: block;
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
overflow: auto;
|
||||
font-size: 0.875em;
|
||||
}
|
||||
pre code {
|
||||
font-size: inherit;
|
||||
color: inherit;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: 0.875em;
|
||||
color: #d63384;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
a > code {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
kbd {
|
||||
padding: 0.2rem 0.4rem;
|
||||
font-size: 0.875em;
|
||||
color: #fff;
|
||||
background-color: #212529;
|
||||
border-radius: 0.2rem;
|
||||
}
|
||||
kbd kbd {
|
||||
padding: 0;
|
||||
font-size: 1em;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
img,
|
||||
svg {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table {
|
||||
caption-side: bottom;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
caption {
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
color: #6c757d;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: inherit;
|
||||
text-align: -webkit-match-parent;
|
||||
}
|
||||
|
||||
thead,
|
||||
tbody,
|
||||
tfoot,
|
||||
tr,
|
||||
td,
|
||||
th {
|
||||
border-color: inherit;
|
||||
border-style: solid;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button:focus:not(:focus-visible) {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
optgroup,
|
||||
textarea {
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
[role=button] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
select {
|
||||
word-wrap: normal;
|
||||
}
|
||||
select:disabled {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
[list]::-webkit-calendar-picker-indicator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
button,
|
||||
[type=button],
|
||||
[type=reset],
|
||||
[type=submit] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
button:not(:disabled),
|
||||
[type=button]:not(:disabled),
|
||||
[type=reset]:not(:disabled),
|
||||
[type=submit]:not(:disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
legend {
|
||||
float: left;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
line-height: inherit;
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
legend {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
legend + * {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
::-webkit-datetime-edit-fields-wrapper,
|
||||
::-webkit-datetime-edit-text,
|
||||
::-webkit-datetime-edit-minute,
|
||||
::-webkit-datetime-edit-hour-field,
|
||||
::-webkit-datetime-edit-day-field,
|
||||
::-webkit-datetime-edit-month-field,
|
||||
::-webkit-datetime-edit-year-field {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::-webkit-inner-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
[type=search] {
|
||||
outline-offset: -2px;
|
||||
-webkit-appearance: textfield;
|
||||
}
|
||||
|
||||
/* rtl:raw:
|
||||
[type="tel"],
|
||||
[type="url"],
|
||||
[type="email"],
|
||||
[type="number"] {
|
||||
direction: ltr;
|
||||
}
|
||||
*/
|
||||
::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
::-webkit-color-swatch-wrapper {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::file-selector-button {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
output {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
iframe {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=bootstrap-reboot.css.map */
|
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map
vendored
Normal file
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
8
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css
vendored
Normal file
8
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors
|
||||
* Copyright 2011-2021 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}
|
||||
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map
vendored
Normal file
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
424
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css
vendored
Normal file
424
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css
vendored
Normal file
@ -0,0 +1,424 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors
|
||||
* Copyright 2011-2021 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
:root {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: var(--bs-body-font-family);
|
||||
font-size: var(--bs-body-font-size);
|
||||
font-weight: var(--bs-body-font-weight);
|
||||
line-height: var(--bs-body-line-height);
|
||||
color: var(--bs-body-color);
|
||||
text-align: var(--bs-body-text-align);
|
||||
background-color: var(--bs-body-bg);
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
hr {
|
||||
margin: 1rem 0;
|
||||
color: inherit;
|
||||
background-color: currentColor;
|
||||
border: 0;
|
||||
opacity: 0.25;
|
||||
}
|
||||
|
||||
hr:not([size]) {
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
h6, h5, h4, h3, h2, h1 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-weight: 500;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: calc(1.375rem + 1.5vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: calc(1.325rem + 0.9vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h2 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: calc(1.3rem + 0.6vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h3 {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h4 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
abbr[title],
|
||||
abbr[data-bs-original-title] {
|
||||
-webkit-text-decoration: underline dotted;
|
||||
text-decoration: underline dotted;
|
||||
cursor: help;
|
||||
-webkit-text-decoration-skip-ink: none;
|
||||
text-decoration-skip-ink: none;
|
||||
}
|
||||
|
||||
address {
|
||||
margin-bottom: 1rem;
|
||||
font-style: normal;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul {
|
||||
padding-right: 2rem;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
dl {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
ol ol,
|
||||
ul ul,
|
||||
ol ul,
|
||||
ul ol {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-bottom: 0.5rem;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
||||
mark {
|
||||
padding: 0.2em;
|
||||
background-color: #fcf8e3;
|
||||
}
|
||||
|
||||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
font-size: 0.75em;
|
||||
line-height: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0d6efd;
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:hover {
|
||||
color: #0a58ca;
|
||||
}
|
||||
|
||||
a:not([href]):not([class]), a:not([href]):not([class]):hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
font-size: 1em;
|
||||
direction: ltr ;
|
||||
unicode-bidi: bidi-override;
|
||||
}
|
||||
|
||||
pre {
|
||||
display: block;
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
overflow: auto;
|
||||
font-size: 0.875em;
|
||||
}
|
||||
pre code {
|
||||
font-size: inherit;
|
||||
color: inherit;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: 0.875em;
|
||||
color: #d63384;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
a > code {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
kbd {
|
||||
padding: 0.2rem 0.4rem;
|
||||
font-size: 0.875em;
|
||||
color: #fff;
|
||||
background-color: #212529;
|
||||
border-radius: 0.2rem;
|
||||
}
|
||||
kbd kbd {
|
||||
padding: 0;
|
||||
font-size: 1em;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
img,
|
||||
svg {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table {
|
||||
caption-side: bottom;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
caption {
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
color: #6c757d;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: inherit;
|
||||
text-align: -webkit-match-parent;
|
||||
}
|
||||
|
||||
thead,
|
||||
tbody,
|
||||
tfoot,
|
||||
tr,
|
||||
td,
|
||||
th {
|
||||
border-color: inherit;
|
||||
border-style: solid;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button:focus:not(:focus-visible) {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
optgroup,
|
||||
textarea {
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
[role=button] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
select {
|
||||
word-wrap: normal;
|
||||
}
|
||||
select:disabled {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
[list]::-webkit-calendar-picker-indicator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
button,
|
||||
[type=button],
|
||||
[type=reset],
|
||||
[type=submit] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
button:not(:disabled),
|
||||
[type=button]:not(:disabled),
|
||||
[type=reset]:not(:disabled),
|
||||
[type=submit]:not(:disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
legend {
|
||||
float: right;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
line-height: inherit;
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
legend {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
legend + * {
|
||||
clear: right;
|
||||
}
|
||||
|
||||
::-webkit-datetime-edit-fields-wrapper,
|
||||
::-webkit-datetime-edit-text,
|
||||
::-webkit-datetime-edit-minute,
|
||||
::-webkit-datetime-edit-hour-field,
|
||||
::-webkit-datetime-edit-day-field,
|
||||
::-webkit-datetime-edit-month-field,
|
||||
::-webkit-datetime-edit-year-field {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::-webkit-inner-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
[type=search] {
|
||||
outline-offset: -2px;
|
||||
-webkit-appearance: textfield;
|
||||
}
|
||||
|
||||
[type="tel"],
|
||||
[type="url"],
|
||||
[type="email"],
|
||||
[type="number"] {
|
||||
direction: ltr;
|
||||
}
|
||||
::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
::-webkit-color-swatch-wrapper {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::file-selector-button {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
output {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
iframe {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
/*# sourceMappingURL=bootstrap-reboot.rtl.css.map */
|
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map
vendored
Normal file
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
8
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css
vendored
Normal file
8
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors
|
||||
* Copyright 2011-2021 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-right:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-right:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:right}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:right;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:right}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}[type=email],[type=number],[type=tel],[type=url]{direction:ltr}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}
|
||||
/*# sourceMappingURL=bootstrap-reboot.rtl.min.css.map */
|
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map
vendored
Normal file
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
4866
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css
vendored
Normal file
4866
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map
vendored
Normal file
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css
vendored
Normal file
7
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map
vendored
Normal file
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
4857
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css
vendored
Normal file
4857
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map
vendored
Normal file
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css
vendored
Normal file
7
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map
vendored
Normal file
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
11221
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap.css
vendored
Normal file
11221
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map
vendored
Normal file
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css
vendored
Normal file
7
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map
vendored
Normal file
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
11197
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css
vendored
Normal file
11197
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map
vendored
Normal file
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css
vendored
Normal file
7
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map
vendored
Normal file
1
APP_WEB/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
6780
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js
vendored
Normal file
6780
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map
vendored
Normal file
1
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js
vendored
Normal file
7
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map
vendored
Normal file
1
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
4977
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js
vendored
Normal file
4977
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map
vendored
Normal file
1
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js
vendored
Normal file
7
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map
vendored
Normal file
1
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
5026
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.js
vendored
Normal file
5026
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map
vendored
Normal file
1
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js
vendored
Normal file
7
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map
vendored
Normal file
1
APP_WEB/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,23 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) .NET Foundation and Contributors
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
435
APP_WEB/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js
vendored
Normal file
435
APP_WEB/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js
vendored
Normal file
@ -0,0 +1,435 @@
|
||||
/**
|
||||
* @license
|
||||
* Unobtrusive validation support library for jQuery and jQuery Validate
|
||||
* Copyright (c) .NET Foundation. All rights reserved.
|
||||
* Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
* @version v4.0.0
|
||||
*/
|
||||
|
||||
/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */
|
||||
/*global document: false, jQuery: false */
|
||||
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define("jquery.validate.unobtrusive", ['jquery-validation'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports
|
||||
module.exports = factory(require('jquery-validation'));
|
||||
} else {
|
||||
// Browser global
|
||||
jQuery.validator.unobtrusive = factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
var $jQval = $.validator,
|
||||
adapters,
|
||||
data_validation = "unobtrusiveValidation";
|
||||
|
||||
function setValidationValues(options, ruleName, value) {
|
||||
options.rules[ruleName] = value;
|
||||
if (options.message) {
|
||||
options.messages[ruleName] = options.message;
|
||||
}
|
||||
}
|
||||
|
||||
function splitAndTrim(value) {
|
||||
return value.replace(/^\s+|\s+$/g, "").split(/\s*,\s*/g);
|
||||
}
|
||||
|
||||
function escapeAttributeValue(value) {
|
||||
// As mentioned on http://api.jquery.com/category/selectors/
|
||||
return value.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, "\\$1");
|
||||
}
|
||||
|
||||
function getModelPrefix(fieldName) {
|
||||
return fieldName.substr(0, fieldName.lastIndexOf(".") + 1);
|
||||
}
|
||||
|
||||
function appendModelPrefix(value, prefix) {
|
||||
if (value.indexOf("*.") === 0) {
|
||||
value = value.replace("*.", prefix);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function onError(error, inputElement) { // 'this' is the form element
|
||||
var container = $(this).find("[data-valmsg-for='" + escapeAttributeValue(inputElement[0].name) + "']"),
|
||||
replaceAttrValue = container.attr("data-valmsg-replace"),
|
||||
replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) !== false : null;
|
||||
|
||||
container.removeClass("field-validation-valid").addClass("field-validation-error");
|
||||
error.data("unobtrusiveContainer", container);
|
||||
|
||||
if (replace) {
|
||||
container.empty();
|
||||
error.removeClass("input-validation-error").appendTo(container);
|
||||
}
|
||||
else {
|
||||
error.hide();
|
||||
}
|
||||
}
|
||||
|
||||
function onErrors(event, validator) { // 'this' is the form element
|
||||
var container = $(this).find("[data-valmsg-summary=true]"),
|
||||
list = container.find("ul");
|
||||
|
||||
if (list && list.length && validator.errorList.length) {
|
||||
list.empty();
|
||||
container.addClass("validation-summary-errors").removeClass("validation-summary-valid");
|
||||
|
||||
$.each(validator.errorList, function () {
|
||||
$("<li />").html(this.message).appendTo(list);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function onSuccess(error) { // 'this' is the form element
|
||||
var container = error.data("unobtrusiveContainer");
|
||||
|
||||
if (container) {
|
||||
var replaceAttrValue = container.attr("data-valmsg-replace"),
|
||||
replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) : null;
|
||||
|
||||
container.addClass("field-validation-valid").removeClass("field-validation-error");
|
||||
error.removeData("unobtrusiveContainer");
|
||||
|
||||
if (replace) {
|
||||
container.empty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onReset(event) { // 'this' is the form element
|
||||
var $form = $(this),
|
||||
key = '__jquery_unobtrusive_validation_form_reset';
|
||||
if ($form.data(key)) {
|
||||
return;
|
||||
}
|
||||
// Set a flag that indicates we're currently resetting the form.
|
||||
$form.data(key, true);
|
||||
try {
|
||||
$form.data("validator").resetForm();
|
||||
} finally {
|
||||
$form.removeData(key);
|
||||
}
|
||||
|
||||
$form.find(".validation-summary-errors")
|
||||
.addClass("validation-summary-valid")
|
||||
.removeClass("validation-summary-errors");
|
||||
$form.find(".field-validation-error")
|
||||
.addClass("field-validation-valid")
|
||||
.removeClass("field-validation-error")
|
||||
.removeData("unobtrusiveContainer")
|
||||
.find(">*") // If we were using valmsg-replace, get the underlying error
|
||||
.removeData("unobtrusiveContainer");
|
||||
}
|
||||
|
||||
function validationInfo(form) {
|
||||
var $form = $(form),
|
||||
result = $form.data(data_validation),
|
||||
onResetProxy = $.proxy(onReset, form),
|
||||
defaultOptions = $jQval.unobtrusive.options || {},
|
||||
execInContext = function (name, args) {
|
||||
var func = defaultOptions[name];
|
||||
func && $.isFunction(func) && func.apply(form, args);
|
||||
};
|
||||
|
||||
if (!result) {
|
||||
result = {
|
||||
options: { // options structure passed to jQuery Validate's validate() method
|
||||
errorClass: defaultOptions.errorClass || "input-validation-error",
|
||||
errorElement: defaultOptions.errorElement || "span",
|
||||
errorPlacement: function () {
|
||||
onError.apply(form, arguments);
|
||||
execInContext("errorPlacement", arguments);
|
||||
},
|
||||
invalidHandler: function () {
|
||||
onErrors.apply(form, arguments);
|
||||
execInContext("invalidHandler", arguments);
|
||||
},
|
||||
messages: {},
|
||||
rules: {},
|
||||
success: function () {
|
||||
onSuccess.apply(form, arguments);
|
||||
execInContext("success", arguments);
|
||||
}
|
||||
},
|
||||
attachValidation: function () {
|
||||
$form
|
||||
.off("reset." + data_validation, onResetProxy)
|
||||
.on("reset." + data_validation, onResetProxy)
|
||||
.validate(this.options);
|
||||
},
|
||||
validate: function () { // a validation function that is called by unobtrusive Ajax
|
||||
$form.validate();
|
||||
return $form.valid();
|
||||
}
|
||||
};
|
||||
$form.data(data_validation, result);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
$jQval.unobtrusive = {
|
||||
adapters: [],
|
||||
|
||||
parseElement: function (element, skipAttach) {
|
||||
/// <summary>
|
||||
/// Parses a single HTML element for unobtrusive validation attributes.
|
||||
/// </summary>
|
||||
/// <param name="element" domElement="true">The HTML element to be parsed.</param>
|
||||
/// <param name="skipAttach" type="Boolean">[Optional] true to skip attaching the
|
||||
/// validation to the form. If parsing just this single element, you should specify true.
|
||||
/// If parsing several elements, you should specify false, and manually attach the validation
|
||||
/// to the form when you are finished. The default is false.</param>
|
||||
var $element = $(element),
|
||||
form = $element.parents("form")[0],
|
||||
valInfo, rules, messages;
|
||||
|
||||
if (!form) { // Cannot do client-side validation without a form
|
||||
return;
|
||||
}
|
||||
|
||||
valInfo = validationInfo(form);
|
||||
valInfo.options.rules[element.name] = rules = {};
|
||||
valInfo.options.messages[element.name] = messages = {};
|
||||
|
||||
$.each(this.adapters, function () {
|
||||
var prefix = "data-val-" + this.name,
|
||||
message = $element.attr(prefix),
|
||||
paramValues = {};
|
||||
|
||||
if (message !== undefined) { // Compare against undefined, because an empty message is legal (and falsy)
|
||||
prefix += "-";
|
||||
|
||||
$.each(this.params, function () {
|
||||
paramValues[this] = $element.attr(prefix + this);
|
||||
});
|
||||
|
||||
this.adapt({
|
||||
element: element,
|
||||
form: form,
|
||||
message: message,
|
||||
params: paramValues,
|
||||
rules: rules,
|
||||
messages: messages
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$.extend(rules, { "__dummy__": true });
|
||||
|
||||
if (!skipAttach) {
|
||||
valInfo.attachValidation();
|
||||
}
|
||||
},
|
||||
|
||||
parse: function (selector) {
|
||||
/// <summary>
|
||||
/// Parses all the HTML elements in the specified selector. It looks for input elements decorated
|
||||
/// with the [data-val=true] attribute value and enables validation according to the data-val-*
|
||||
/// attribute values.
|
||||
/// </summary>
|
||||
/// <param name="selector" type="String">Any valid jQuery selector.</param>
|
||||
|
||||
// $forms includes all forms in selector's DOM hierarchy (parent, children and self) that have at least one
|
||||
// element with data-val=true
|
||||
var $selector = $(selector),
|
||||
$forms = $selector.parents()
|
||||
.addBack()
|
||||
.filter("form")
|
||||
.add($selector.find("form"))
|
||||
.has("[data-val=true]");
|
||||
|
||||
$selector.find("[data-val=true]").each(function () {
|
||||
$jQval.unobtrusive.parseElement(this, true);
|
||||
});
|
||||
|
||||
$forms.each(function () {
|
||||
var info = validationInfo(this);
|
||||
if (info) {
|
||||
info.attachValidation();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
adapters = $jQval.unobtrusive.adapters;
|
||||
|
||||
adapters.add = function (adapterName, params, fn) {
|
||||
/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation.</summary>
|
||||
/// <param name="adapterName" type="String">The name of the adapter to be added. This matches the name used
|
||||
/// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>
|
||||
/// <param name="params" type="Array" optional="true">[Optional] An array of parameter names (strings) that will
|
||||
/// be extracted from the data-val-nnnn-mmmm HTML attributes (where nnnn is the adapter name, and
|
||||
/// mmmm is the parameter name).</param>
|
||||
/// <param name="fn" type="Function">The function to call, which adapts the values from the HTML
|
||||
/// attributes into jQuery Validate rules and/or messages.</param>
|
||||
/// <returns type="jQuery.validator.unobtrusive.adapters" />
|
||||
if (!fn) { // Called with no params, just a function
|
||||
fn = params;
|
||||
params = [];
|
||||
}
|
||||
this.push({ name: adapterName, params: params, adapt: fn });
|
||||
return this;
|
||||
};
|
||||
|
||||
adapters.addBool = function (adapterName, ruleName) {
|
||||
/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
|
||||
/// the jQuery Validate validation rule has no parameter values.</summary>
|
||||
/// <param name="adapterName" type="String">The name of the adapter to be added. This matches the name used
|
||||
/// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>
|
||||
/// <param name="ruleName" type="String" optional="true">[Optional] The name of the jQuery Validate rule. If not provided, the value
|
||||
/// of adapterName will be used instead.</param>
|
||||
/// <returns type="jQuery.validator.unobtrusive.adapters" />
|
||||
return this.add(adapterName, function (options) {
|
||||
setValidationValues(options, ruleName || adapterName, true);
|
||||
});
|
||||
};
|
||||
|
||||
adapters.addMinMax = function (adapterName, minRuleName, maxRuleName, minMaxRuleName, minAttribute, maxAttribute) {
|
||||
/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
|
||||
/// the jQuery Validate validation has three potential rules (one for min-only, one for max-only, and
|
||||
/// one for min-and-max). The HTML parameters are expected to be named -min and -max.</summary>
|
||||
/// <param name="adapterName" type="String">The name of the adapter to be added. This matches the name used
|
||||
/// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>
|
||||
/// <param name="minRuleName" type="String">The name of the jQuery Validate rule to be used when you only
|
||||
/// have a minimum value.</param>
|
||||
/// <param name="maxRuleName" type="String">The name of the jQuery Validate rule to be used when you only
|
||||
/// have a maximum value.</param>
|
||||
/// <param name="minMaxRuleName" type="String">The name of the jQuery Validate rule to be used when you
|
||||
/// have both a minimum and maximum value.</param>
|
||||
/// <param name="minAttribute" type="String" optional="true">[Optional] The name of the HTML attribute that
|
||||
/// contains the minimum value. The default is "min".</param>
|
||||
/// <param name="maxAttribute" type="String" optional="true">[Optional] The name of the HTML attribute that
|
||||
/// contains the maximum value. The default is "max".</param>
|
||||
/// <returns type="jQuery.validator.unobtrusive.adapters" />
|
||||
return this.add(adapterName, [minAttribute || "min", maxAttribute || "max"], function (options) {
|
||||
var min = options.params.min,
|
||||
max = options.params.max;
|
||||
|
||||
if (min && max) {
|
||||
setValidationValues(options, minMaxRuleName, [min, max]);
|
||||
}
|
||||
else if (min) {
|
||||
setValidationValues(options, minRuleName, min);
|
||||
}
|
||||
else if (max) {
|
||||
setValidationValues(options, maxRuleName, max);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
adapters.addSingleVal = function (adapterName, attribute, ruleName) {
|
||||
/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
|
||||
/// the jQuery Validate validation rule has a single value.</summary>
|
||||
/// <param name="adapterName" type="String">The name of the adapter to be added. This matches the name used
|
||||
/// in the data-val-nnnn HTML attribute(where nnnn is the adapter name).</param>
|
||||
/// <param name="attribute" type="String">[Optional] The name of the HTML attribute that contains the value.
|
||||
/// The default is "val".</param>
|
||||
/// <param name="ruleName" type="String" optional="true">[Optional] The name of the jQuery Validate rule. If not provided, the value
|
||||
/// of adapterName will be used instead.</param>
|
||||
/// <returns type="jQuery.validator.unobtrusive.adapters" />
|
||||
return this.add(adapterName, [attribute || "val"], function (options) {
|
||||
setValidationValues(options, ruleName || adapterName, options.params[attribute]);
|
||||
});
|
||||
};
|
||||
|
||||
$jQval.addMethod("__dummy__", function (value, element, params) {
|
||||
return true;
|
||||
});
|
||||
|
||||
$jQval.addMethod("regex", function (value, element, params) {
|
||||
var match;
|
||||
if (this.optional(element)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
match = new RegExp(params).exec(value);
|
||||
return (match && (match.index === 0) && (match[0].length === value.length));
|
||||
});
|
||||
|
||||
$jQval.addMethod("nonalphamin", function (value, element, nonalphamin) {
|
||||
var match;
|
||||
if (nonalphamin) {
|
||||
match = value.match(/\W/g);
|
||||
match = match && match.length >= nonalphamin;
|
||||
}
|
||||
return match;
|
||||
});
|
||||
|
||||
if ($jQval.methods.extension) {
|
||||
adapters.addSingleVal("accept", "mimtype");
|
||||
adapters.addSingleVal("extension", "extension");
|
||||
} else {
|
||||
// for backward compatibility, when the 'extension' validation method does not exist, such as with versions
|
||||
// of JQuery Validation plugin prior to 1.10, we should use the 'accept' method for
|
||||
// validating the extension, and ignore mime-type validations as they are not supported.
|
||||
adapters.addSingleVal("extension", "extension", "accept");
|
||||
}
|
||||
|
||||
adapters.addSingleVal("regex", "pattern");
|
||||
adapters.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");
|
||||
adapters.addMinMax("length", "minlength", "maxlength", "rangelength").addMinMax("range", "min", "max", "range");
|
||||
adapters.addMinMax("minlength", "minlength").addMinMax("maxlength", "minlength", "maxlength");
|
||||
adapters.add("equalto", ["other"], function (options) {
|
||||
var prefix = getModelPrefix(options.element.name),
|
||||
other = options.params.other,
|
||||
fullOtherName = appendModelPrefix(other, prefix),
|
||||
element = $(options.form).find(":input").filter("[name='" + escapeAttributeValue(fullOtherName) + "']")[0];
|
||||
|
||||
setValidationValues(options, "equalTo", element);
|
||||
});
|
||||
adapters.add("required", function (options) {
|
||||
// jQuery Validate equates "required" with "mandatory" for checkbox elements
|
||||
if (options.element.tagName.toUpperCase() !== "INPUT" || options.element.type.toUpperCase() !== "CHECKBOX") {
|
||||
setValidationValues(options, "required", true);
|
||||
}
|
||||
});
|
||||
adapters.add("remote", ["url", "type", "additionalfields"], function (options) {
|
||||
var value = {
|
||||
url: options.params.url,
|
||||
type: options.params.type || "GET",
|
||||
data: {}
|
||||
},
|
||||
prefix = getModelPrefix(options.element.name);
|
||||
|
||||
$.each(splitAndTrim(options.params.additionalfields || options.element.name), function (i, fieldName) {
|
||||
var paramName = appendModelPrefix(fieldName, prefix);
|
||||
value.data[paramName] = function () {
|
||||
var field = $(options.form).find(":input").filter("[name='" + escapeAttributeValue(paramName) + "']");
|
||||
// For checkboxes and radio buttons, only pick up values from checked fields.
|
||||
if (field.is(":checkbox")) {
|
||||
return field.filter(":checked").val() || field.filter(":hidden").val() || '';
|
||||
}
|
||||
else if (field.is(":radio")) {
|
||||
return field.filter(":checked").val() || '';
|
||||
}
|
||||
return field.val();
|
||||
};
|
||||
});
|
||||
|
||||
setValidationValues(options, "remote", value);
|
||||
});
|
||||
adapters.add("password", ["min", "nonalphamin", "regex"], function (options) {
|
||||
if (options.params.min) {
|
||||
setValidationValues(options, "minlength", options.params.min);
|
||||
}
|
||||
if (options.params.nonalphamin) {
|
||||
setValidationValues(options, "nonalphamin", options.params.nonalphamin);
|
||||
}
|
||||
if (options.params.regex) {
|
||||
setValidationValues(options, "regex", options.params.regex);
|
||||
}
|
||||
});
|
||||
adapters.add("fileextensions", ["extensions"], function (options) {
|
||||
setValidationValues(options, "extension", options.params.extensions);
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$jQval.unobtrusive.parse(document);
|
||||
});
|
||||
|
||||
return $jQval.unobtrusive;
|
||||
}));
|
8
APP_WEB/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js
vendored
Normal file
8
APP_WEB/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
22
APP_WEB/wwwroot/lib/jquery-validation/LICENSE.md
Normal file
22
APP_WEB/wwwroot/lib/jquery-validation/LICENSE.md
Normal file
@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
=====================
|
||||
|
||||
Copyright Jörn Zaefferer
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
1512
APP_WEB/wwwroot/lib/jquery-validation/dist/additional-methods.js
vendored
Normal file
1512
APP_WEB/wwwroot/lib/jquery-validation/dist/additional-methods.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4
APP_WEB/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
vendored
Normal file
4
APP_WEB/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1661
APP_WEB/wwwroot/lib/jquery-validation/dist/jquery.validate.js
vendored
Normal file
1661
APP_WEB/wwwroot/lib/jquery-validation/dist/jquery.validate.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4
APP_WEB/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
vendored
Normal file
4
APP_WEB/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user