├── .gitattributes ├── .gitignore ├── App.razor ├── Areas └── Identity │ ├── Pages │ ├── Account │ │ └── LogOut.cshtml │ └── Shared │ │ └── _LoginPartial.cshtml │ └── RevalidatingIdentityAuthenticationStateProvider.cs ├── BlazorApp.csproj ├── BlazorApp.sln ├── Controllers └── ToDoListController.cs ├── Data ├── ApplicationDbContext.cs ├── Category.cs ├── Migrations │ ├── 00000000000000_CreateIdentitySchema.Designer.cs │ ├── 00000000000000_CreateIdentitySchema.cs │ ├── 20191003132359_AddedToDoListTable.Designer.cs │ ├── 20191003132359_AddedToDoListTable.cs │ ├── 20191014141558_AddedCascadingDropdownTables.Designer.cs │ ├── 20191014141558_AddedCascadingDropdownTables.cs │ └── ApplicationDbContextModelSnapshot.cs ├── ToDo.cs ├── WeatherForecast.cs └── WeatherForecastService.cs ├── Pages ├── CascadingDropdown - Copy.razor ├── CascadingDropdown.razor ├── ConfirmDialog.razor ├── Counter.razor ├── Error.razor ├── FetchData.razor ├── Index.razor ├── Pager.razor ├── TaskDetail.razor ├── TaskDetailv2.razor ├── ToDoList.razor ├── ToDoListv2.razor └── _Host.cshtml ├── Program.cs ├── Properties └── launchSettings.json ├── Services ├── ApiService.cs ├── CascadingDropdownService.cs ├── PaginatedList.cs └── ToDoListService.cs ├── Shared ├── LoginDisplay.razor ├── MainLayout.razor └── NavMenu.razor ├── Startup.cs ├── _Imports.razor ├── appsettings.Development.json ├── appsettings.json ├── libman.json └── wwwroot ├── css ├── bootstrap │ ├── bootstrap.min.css │ └── bootstrap.min.css.map ├── open-iconic │ ├── FONT-LICENSE │ ├── ICON-LICENSE │ ├── README.md │ └── font │ │ ├── css │ │ └── open-iconic-bootstrap.min.css │ │ └── fonts │ │ ├── open-iconic.eot │ │ ├── open-iconic.otf │ │ ├── open-iconic.svg │ │ ├── open-iconic.ttf │ │ └── open-iconic.woff └── site.css ├── favicon.ico └── lib ├── bootstrap ├── LICENSE ├── README.md ├── dist │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ └── bootstrap.min.js.map ├── js │ ├── dist │ │ ├── alert.js │ │ ├── alert.js.map │ │ ├── alert.min.js │ │ ├── button.js │ │ ├── button.js.map │ │ ├── button.min.js │ │ ├── carousel.js │ │ ├── carousel.js.map │ │ ├── carousel.min.js │ │ ├── collapse.js │ │ ├── collapse.js.map │ │ ├── collapse.min.js │ │ ├── dropdown.js │ │ ├── dropdown.js.map │ │ ├── dropdown.min.js │ │ ├── index.js │ │ ├── index.js.map │ │ ├── index.min.js │ │ ├── modal.js │ │ ├── modal.js.map │ │ ├── modal.min.js │ │ ├── popover.js │ │ ├── popover.js.map │ │ ├── popover.min.js │ │ ├── scrollspy.js │ │ ├── scrollspy.js.map │ │ ├── scrollspy.min.js │ │ ├── tab.js │ │ ├── tab.js.map │ │ ├── tab.min.js │ │ ├── toast.js │ │ ├── toast.js.map │ │ ├── toast.min.js │ │ ├── tooltip.js │ │ ├── tooltip.js.map │ │ ├── tooltip.min.js │ │ ├── util.js │ │ ├── util.js.map │ │ └── util.min.js │ └── src │ │ ├── alert.js │ │ ├── alert.min.js │ │ ├── button.js │ │ ├── button.min.js │ │ ├── carousel.js │ │ ├── carousel.min.js │ │ ├── collapse.js │ │ ├── collapse.min.js │ │ ├── dropdown.js │ │ ├── dropdown.min.js │ │ ├── index.js │ │ ├── index.min.js │ │ ├── modal.js │ │ ├── modal.min.js │ │ ├── popover.js │ │ ├── popover.min.js │ │ ├── scrollspy.js │ │ ├── scrollspy.min.js │ │ ├── tab.js │ │ ├── tab.min.js │ │ ├── toast.js │ │ ├── toast.min.js │ │ ├── tools │ │ ├── sanitizer.js │ │ └── sanitizer.min.js │ │ ├── tooltip.js │ │ ├── tooltip.min.js │ │ ├── util.js │ │ └── util.min.js ├── package.json └── scss │ ├── _alert.scss │ ├── _badge.scss │ ├── _breadcrumb.scss │ ├── _button-group.scss │ ├── _buttons.scss │ ├── _card.scss │ ├── _carousel.scss │ ├── _close.scss │ ├── _code.scss │ ├── _custom-forms.scss │ ├── _dropdown.scss │ ├── _forms.scss │ ├── _functions.scss │ ├── _grid.scss │ ├── _images.scss │ ├── _input-group.scss │ ├── _jumbotron.scss │ ├── _list-group.scss │ ├── _media.scss │ ├── _mixins.scss │ ├── _modal.scss │ ├── _nav.scss │ ├── _navbar.scss │ ├── _pagination.scss │ ├── _popover.scss │ ├── _print.scss │ ├── _progress.scss │ ├── _reboot.scss │ ├── _root.scss │ ├── _spinners.scss │ ├── _tables.scss │ ├── _toasts.scss │ ├── _tooltip.scss │ ├── _transitions.scss │ ├── _type.scss │ ├── _utilities.scss │ ├── _variables.scss │ ├── bootstrap-grid.scss │ ├── bootstrap-reboot.scss │ ├── bootstrap.scss │ ├── mixins │ ├── _alert.scss │ ├── _background-variant.scss │ ├── _badge.scss │ ├── _border-radius.scss │ ├── _box-shadow.scss │ ├── _breakpoints.scss │ ├── _buttons.scss │ ├── _caret.scss │ ├── _clearfix.scss │ ├── _deprecate.scss │ ├── _float.scss │ ├── _forms.scss │ ├── _gradients.scss │ ├── _grid-framework.scss │ ├── _grid.scss │ ├── _hover.scss │ ├── _image.scss │ ├── _list-group.scss │ ├── _lists.scss │ ├── _nav-divider.scss │ ├── _pagination.scss │ ├── _reset-text.scss │ ├── _resize.scss │ ├── _screen-reader.scss │ ├── _size.scss │ ├── _table-row.scss │ ├── _text-emphasis.scss │ ├── _text-hide.scss │ ├── _text-truncate.scss │ ├── _transition.scss │ └── _visibility.scss │ ├── utilities │ ├── _align.scss │ ├── _background.scss │ ├── _borders.scss │ ├── _clearfix.scss │ ├── _display.scss │ ├── _embed.scss │ ├── _flex.scss │ ├── _float.scss │ ├── _overflow.scss │ ├── _position.scss │ ├── _screenreaders.scss │ ├── _shadows.scss │ ├── _sizing.scss │ ├── _spacing.scss │ ├── _stretched-link.scss │ ├── _text.scss │ └── _visibility.scss │ └── vendor │ └── _rfs.scss └── jquery ├── core.js ├── jquery.js ├── jquery.min.js ├── jquery.min.map ├── jquery.slim.js ├── jquery.slim.min.js └── jquery.slim.min.map /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /App.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 |

Sorry, there's nothing at this address.

9 |
10 |
11 |
12 |
13 | -------------------------------------------------------------------------------- /Areas/Identity/Pages/Account/LogOut.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @using Microsoft.AspNetCore.Identity 3 | @attribute [IgnoreAntiforgeryToken] 4 | @inject SignInManager SignInManager 5 | @functions { 6 | public async Task OnPost() 7 | { 8 | if (SignInManager.IsSignedIn(User)) 9 | { 10 | await SignInManager.SignOutAsync(); 11 | } 12 | 13 | return Redirect("~/"); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Areas/Identity/Pages/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Identity 2 | @inject SignInManager SignInManager 3 | @inject UserManager UserManager 4 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 5 | 6 | 26 | -------------------------------------------------------------------------------- /Areas/Identity/RevalidatingIdentityAuthenticationStateProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Security.Claims; 3 | using System.Threading; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Components; 6 | using Microsoft.AspNetCore.Components.Authorization; 7 | using Microsoft.AspNetCore.Components.Server; 8 | using Microsoft.AspNetCore.Identity; 9 | using Microsoft.Extensions.DependencyInjection; 10 | using Microsoft.Extensions.Logging; 11 | using Microsoft.Extensions.Options; 12 | 13 | namespace BlazorApp.Areas.Identity 14 | { 15 | public class RevalidatingIdentityAuthenticationStateProvider 16 | : RevalidatingServerAuthenticationStateProvider where TUser : class 17 | { 18 | private readonly IServiceScopeFactory _scopeFactory; 19 | private readonly IdentityOptions _options; 20 | 21 | public RevalidatingIdentityAuthenticationStateProvider( 22 | ILoggerFactory loggerFactory, 23 | IServiceScopeFactory scopeFactory, 24 | IOptions optionsAccessor) 25 | : base(loggerFactory) 26 | { 27 | _scopeFactory = scopeFactory; 28 | _options = optionsAccessor.Value; 29 | } 30 | 31 | protected override TimeSpan RevalidationInterval => TimeSpan.FromMinutes(30); 32 | 33 | protected override async Task ValidateAuthenticationStateAsync( 34 | AuthenticationState authenticationState, CancellationToken cancellationToken) 35 | { 36 | // Get the user manager from a new scope to ensure it fetches fresh data 37 | var scope = _scopeFactory.CreateScope(); 38 | try 39 | { 40 | var userManager = scope.ServiceProvider.GetRequiredService>(); 41 | return await ValidateSecurityStampAsync(userManager, authenticationState.User); 42 | } 43 | finally 44 | { 45 | if (scope is IAsyncDisposable asyncDisposable) 46 | { 47 | await asyncDisposable.DisposeAsync(); 48 | } 49 | else 50 | { 51 | scope.Dispose(); 52 | } 53 | } 54 | } 55 | 56 | private async Task ValidateSecurityStampAsync(UserManager userManager, ClaimsPrincipal principal) 57 | { 58 | var user = await userManager.GetUserAsync(principal); 59 | if (user == null) 60 | { 61 | return false; 62 | } 63 | else if (!userManager.SupportsUserSecurityStamp) 64 | { 65 | return true; 66 | } 67 | else 68 | { 69 | var principalStamp = principal.FindFirstValue(_options.ClaimsIdentity.SecurityStampClaimType); 70 | var userStamp = await userManager.GetSecurityStampAsync(user); 71 | return principalStamp == userStamp; 72 | } 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /BlazorApp.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.0 5 | aspnet-BlazorApp-1F527F84-3BAB-44C2-A0A9-9F4E175E1E0A 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /BlazorApp.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29319.158 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorApp", "BlazorApp.csproj", "{8924464E-A4C5-4C83-9266-86A9F09296CD}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorDataService", "..\..\Proejcts\BlazorDataService\BlazorDataService.csproj", "{2939C2D4-D982-4D2F-91F9-BB748BC0709B}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {8924464E-A4C5-4C83-9266-86A9F09296CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {8924464E-A4C5-4C83-9266-86A9F09296CD}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {8924464E-A4C5-4C83-9266-86A9F09296CD}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {8924464E-A4C5-4C83-9266-86A9F09296CD}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {2939C2D4-D982-4D2F-91F9-BB748BC0709B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {2939C2D4-D982-4D2F-91F9-BB748BC0709B}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {2939C2D4-D982-4D2F-91F9-BB748BC0709B}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {2939C2D4-D982-4D2F-91F9-BB748BC0709B}.Release|Any CPU.Build.0 = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {D9313C42-288A-4171-9CC0-F7C9DAB3F301} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /Controllers/ToDoListController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using System.Threading.Tasks; 4 | using Microsoft.AspNetCore.Mvc; 5 | using Microsoft.EntityFrameworkCore; 6 | using BlazorApp.Data; 7 | 8 | namespace BlazorApp.Controllers 9 | { 10 | [Route("api/[controller]")] 11 | [ApiController] 12 | public class ToDoListController : ControllerBase 13 | { 14 | private readonly ApplicationDbContext _context; 15 | 16 | public ToDoListController(ApplicationDbContext context) 17 | { 18 | _context = context; 19 | } 20 | 21 | // GET: api/ToDoList 22 | [HttpGet] 23 | public async Task>> GetToDoList() 24 | { 25 | return await _context.ToDoList.ToListAsync(); 26 | } 27 | 28 | // GET: api/ToDoList/5 29 | [HttpGet("{id}")] 30 | public async Task> GetToDo(int id) 31 | { 32 | var toDo = await _context.ToDoList.FindAsync(id); 33 | 34 | if (toDo == null) 35 | { 36 | return NotFound(); 37 | } 38 | 39 | return toDo; 40 | } 41 | 42 | // PUT: api/ToDoList/5 43 | // To protect from overposting attacks, please enable the specific properties you want to bind to, for 44 | // more details see https://aka.ms/RazorPagesCRUD. 45 | [HttpPut("{id}")] 46 | public async Task PutToDo(int id, ToDo toDo) 47 | { 48 | if (id != toDo.Id) 49 | { 50 | return BadRequest(); 51 | } 52 | 53 | _context.Entry(toDo).State = EntityState.Modified; 54 | 55 | try 56 | { 57 | await _context.SaveChangesAsync(); 58 | } 59 | catch (DbUpdateConcurrencyException) 60 | { 61 | if (!ToDoExists(id)) 62 | { 63 | return NotFound(); 64 | } 65 | else 66 | { 67 | throw; 68 | } 69 | } 70 | 71 | return NoContent(); 72 | } 73 | 74 | // POST: api/ToDoList 75 | // To protect from overposting attacks, please enable the specific properties you want to bind to, for 76 | // more details see https://aka.ms/RazorPagesCRUD. 77 | [HttpPost] 78 | public async Task> PostToDo(ToDo toDo) 79 | { 80 | _context.ToDoList.Add(toDo); 81 | await _context.SaveChangesAsync(); 82 | 83 | return CreatedAtAction("GetToDo", new { id = toDo.Id }, toDo); 84 | } 85 | 86 | // DELETE: api/ToDoList/5 87 | [HttpDelete("{id}")] 88 | public async Task> DeleteToDo(int id) 89 | { 90 | var toDo = await _context.ToDoList.FindAsync(id); 91 | if (toDo == null) 92 | { 93 | return NotFound(); 94 | } 95 | 96 | _context.ToDoList.Remove(toDo); 97 | await _context.SaveChangesAsync(); 98 | 99 | return toDo; 100 | } 101 | 102 | private bool ToDoExists(int id) 103 | { 104 | return _context.ToDoList.Any(e => e.Id == id); 105 | } 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /Data/ApplicationDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Identity.EntityFrameworkCore; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace BlazorApp.Data 5 | { 6 | public class ApplicationDbContext : IdentityDbContext 7 | { 8 | public ApplicationDbContext(DbContextOptions options) 9 | : base(options) 10 | { 11 | } 12 | public DbSet ToDoList { get; set; } 13 | 14 | public DbSet Categories { get; set; } 15 | 16 | public DbSet Products { get; set; } 17 | 18 | public override int SaveChanges() 19 | { 20 | return base.SaveChanges(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Data/Category.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.ComponentModel.DataAnnotations.Schema; 3 | 4 | namespace BlazorApp.Data 5 | { 6 | public class Category 7 | { 8 | [Key] 9 | public int Id { get; set; } 10 | public string Name { get; set; } 11 | } 12 | 13 | public class Product 14 | { 15 | [Key] 16 | public int Id { get; set; } 17 | public string Name { get; set; } 18 | 19 | [ForeignKey("CategoryId")] 20 | public virtual Category Category { get; set; } 21 | 22 | public int CategoryId { get; set; } 23 | } 24 | 25 | public class Order 26 | { 27 | [Required(ErrorMessage = "Category is required")] 28 | public string CategoryId { get; set; } 29 | 30 | [Required(ErrorMessage = "Product is required")] 31 | public string ProductId { get; set; } 32 | 33 | [Required(ErrorMessage = "Shipping City is required")] 34 | public string ShipCity { get; set; } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Data/Migrations/20191003132359_AddedToDoListTable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.EntityFrameworkCore.Migrations; 3 | 4 | namespace BlazorApp.Data.Migrations 5 | { 6 | public partial class AddedToDoListTable : Migration 7 | { 8 | protected override void Up(MigrationBuilder migrationBuilder) 9 | { 10 | migrationBuilder.CreateTable( 11 | name: "ToDoList", 12 | columns: table => new 13 | { 14 | Id = table.Column(nullable: false) 15 | .Annotation("SqlServer:Identity", "1, 1"), 16 | Name = table.Column(nullable: false), 17 | Status = table.Column(nullable: false), 18 | DueDate = table.Column(nullable: false) 19 | }, 20 | constraints: table => 21 | { 22 | table.PrimaryKey("PK_ToDoList", x => x.Id); 23 | }); 24 | } 25 | 26 | protected override void Down(MigrationBuilder migrationBuilder) 27 | { 28 | migrationBuilder.DropTable( 29 | name: "ToDoList"); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Data/Migrations/20191014141558_AddedCascadingDropdownTables.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Migrations; 2 | 3 | namespace BlazorApp.Data.Migrations 4 | { 5 | public partial class AddedCascadingDropdownTables : Migration 6 | { 7 | protected override void Up(MigrationBuilder migrationBuilder) 8 | { 9 | migrationBuilder.CreateTable( 10 | name: "Categories", 11 | columns: table => new 12 | { 13 | Id = table.Column(nullable: false) 14 | .Annotation("SqlServer:Identity", "1, 1"), 15 | Name = table.Column(nullable: true) 16 | }, 17 | constraints: table => 18 | { 19 | table.PrimaryKey("PK_Categories", x => x.Id); 20 | }); 21 | 22 | migrationBuilder.CreateTable( 23 | name: "Products", 24 | columns: table => new 25 | { 26 | Id = table.Column(nullable: false) 27 | .Annotation("SqlServer:Identity", "1, 1"), 28 | Name = table.Column(nullable: true), 29 | CategoryId = table.Column(nullable: false) 30 | }, 31 | constraints: table => 32 | { 33 | table.PrimaryKey("PK_Products", x => x.Id); 34 | table.ForeignKey( 35 | name: "FK_Products_Categories_CategoryId", 36 | column: x => x.CategoryId, 37 | principalTable: "Categories", 38 | principalColumn: "Id", 39 | onDelete: ReferentialAction.Cascade); 40 | }); 41 | 42 | migrationBuilder.CreateIndex( 43 | name: "IX_Products_CategoryId", 44 | table: "Products", 45 | column: "CategoryId"); 46 | } 47 | 48 | protected override void Down(MigrationBuilder migrationBuilder) 49 | { 50 | migrationBuilder.DropTable( 51 | name: "Products"); 52 | 53 | migrationBuilder.DropTable( 54 | name: "Categories"); 55 | 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Data/ToDo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel.DataAnnotations; 3 | 4 | namespace BlazorApp.Data 5 | { 6 | public class ToDo 7 | { 8 | [Key] 9 | public int Id { get; set; } 10 | 11 | [Required(ErrorMessage = "Task name is required")] 12 | [StringLength(15, ErrorMessage = "Name is too long.")] 13 | public string Name { get; set; } 14 | 15 | [Required(ErrorMessage = "Status is required")] 16 | public string Status { get; set; } 17 | 18 | [Required(ErrorMessage = "Due Date is required")] 19 | public DateTime DueDate { get; set; } 20 | } 21 | } -------------------------------------------------------------------------------- /Data/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace BlazorApp.Data 4 | { 5 | public class WeatherForecast 6 | { 7 | public DateTime Date { get; set; } 8 | 9 | public int TemperatureC { get; set; } 10 | 11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 12 | 13 | public string Summary { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Data/WeatherForecastService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Threading.Tasks; 4 | 5 | namespace BlazorApp.Data 6 | { 7 | public class WeatherForecastService 8 | { 9 | private static readonly string[] Summaries = new[] 10 | { 11 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 12 | }; 13 | 14 | public Task GetForecastAsync(DateTime startDate) 15 | { 16 | var rng = new Random(); 17 | return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast 18 | { 19 | Date = startDate.AddDays(index), 20 | TemperatureC = rng.Next(-20, 55), 21 | Summary = Summaries[rng.Next(Summaries.Length)] 22 | }).ToArray()); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Pages/CascadingDropdown - Copy.razor: -------------------------------------------------------------------------------- 1 | @page "/cascadingdropdown1" 2 | 3 | @using BlazorApp.Data 4 | @using BlazorApp.Services 5 | @inject ICascadingDropdownService service 6 | 7 |

Cascading Dropdown

8 | 9 |

This component demonstrates Cascading dropdown

10 | 11 | @if (categories == null) 12 | { 13 |

Loading...

14 | } 15 | else 16 | { 17 |
18 | 19 |
20 | 21 | 22 | 23 | @foreach (var category in categories) 24 | { 25 | 28 | } 29 | 30 |
31 |
32 | 33 | 34 | 35 | @if (products != null) 36 | { 37 | @foreach (var product in products) 38 | { 39 | 42 | } 43 | } 44 | 45 |
46 | 47 |
48 |
49 | } 50 | 51 | 52 | @code { 53 | List categories; 54 | List products; 55 | 56 | 57 | [Parameter] 58 | public Order OrderObject { get; set; } 59 | 60 | 61 | protected override async Task OnInitializedAsync() 62 | { 63 | categories = await service.GetCategories(); 64 | OrderObject = new Order(); 65 | } 66 | 67 | private string category; 68 | public string Category 69 | { 70 | get => category; 71 | set 72 | { 73 | category = OrderObject.CategoryId = value; 74 | Product = default; 75 | GetProducts(); 76 | } 77 | } 78 | 79 | void GetProducts() 80 | { 81 | products = null; 82 | if (!string.IsNullOrEmpty(category)) 83 | { 84 | var selectedCategory = Convert.ToInt16(category); 85 | products = service.GetProducts(selectedCategory); 86 | } 87 | } 88 | 89 | private string product; 90 | public string Product 91 | { 92 | get => product; 93 | set 94 | { 95 | product = OrderObject.ProductId = value; 96 | OrderObject.ShipCity = default; 97 | } 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /Pages/CascadingDropdown.razor: -------------------------------------------------------------------------------- 1 | @page "/cascadingdropdown" 2 | 3 | @using BlazorApp.Data 4 | @using BlazorApp.Services 5 | @inject ICascadingDropdownService service 6 | 7 |

Cascading Dropdown

8 | 9 |

This component demonstrates Cascading dropdown

10 | 11 | @if (categories == null) 12 | { 13 |

Loading...

14 | } 15 | else 16 | { 17 |
18 | 19 | 20 |
21 | 22 | 23 | 24 | @foreach (var category in categories) 25 | { 26 | 29 | } 30 | 31 | 32 |
33 | 34 |
35 | 36 | 37 | 38 | @if (products != null) 39 | { 40 | @foreach (var product in products) 41 | { 42 | 45 | } 46 | } 47 | 48 | 49 |
50 | @if (!string.IsNullOrEmpty(Product)) 51 | { 52 |
53 | 54 | 55 | 56 | @foreach (var city in Cities) 57 | { 58 | 61 | } 62 | 63 | 64 |
65 | } 66 | 67 |
68 |
69 | } 70 | 71 | 72 | 73 | @code { 74 | List categories; 75 | List products; 76 | 77 | 78 | [Parameter] 79 | public Order OrderObject { get; set; } 80 | 81 | List Cities = new List() { "Chennai", "Kolkata", "Mumbai", "New Delhi" }; 82 | 83 | protected override async Task OnInitializedAsync() 84 | { 85 | categories = await service.GetCategories(); 86 | OrderObject = new Order(); 87 | } 88 | 89 | private string category; 90 | public string Category 91 | { 92 | get => category; 93 | set 94 | { 95 | category = OrderObject.CategoryId = value; 96 | Product = default; 97 | GetProducts(); 98 | } 99 | } 100 | 101 | void GetProducts() 102 | { 103 | products = null; 104 | if (!string.IsNullOrEmpty(category)) 105 | { 106 | var selectedCategory = Convert.ToInt16(category); 107 | products = service.GetProducts(selectedCategory); 108 | } 109 | } 110 | 111 | private string product; 112 | public string Product 113 | { 114 | get => product; 115 | set 116 | { 117 | product = OrderObject.ProductId = value; 118 | Console.WriteLine(Product); 119 | OrderObject.ShipCity = default; 120 | } 121 | } 122 | 123 | 124 | private void HandleValidSubmit() 125 | { 126 | Console.WriteLine("OnValidSubmit"); 127 | } 128 | 129 | } 130 | -------------------------------------------------------------------------------- /Pages/ConfirmDialog.razor: -------------------------------------------------------------------------------- 1 |  20 | 21 | @code { 22 | [Parameter] 23 | public int Id { get; set; } 24 | 25 | [Parameter] 26 | public EventCallback OnClick { get; set; } 27 | } 28 | -------------------------------------------------------------------------------- /Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | 3 | 4 | 5 |

Counter

6 |

Current count: @currentCount

7 | 8 | 9 |
10 | 11 | You are not authorized to view this page! 12 | 13 |
14 | 15 | @code { 16 | int currentCount = 0; 17 | 18 | void IncrementCount() 19 | { 20 | currentCount++; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Pages/Error.razor: -------------------------------------------------------------------------------- 1 | @page "/error" 2 | 3 | 4 |

Error.

5 |

An error occurred while processing your request.

6 | 7 |

Development Mode

8 |

9 | Swapping to Development environment will display more detailed information about the error that occurred. 10 |

11 |

12 | The Development environment shouldn't be enabled for deployed applications. 13 | It can result in displaying sensitive information from exceptions to end users. 14 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 15 | and restarting the app. 16 |

-------------------------------------------------------------------------------- /Pages/FetchData.razor: -------------------------------------------------------------------------------- 1 | @page "/fetchdata" 2 | 3 | @using BlazorApp.Data 4 | @inject WeatherForecastService ForecastService 5 | 6 |

Weather forecast

7 | 8 |

This component demonstrates fetching data from a service.

9 | 10 | @if (forecasts == null) 11 | { 12 |

Loading...

13 | } 14 | else 15 | { 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | @foreach (var forecast in forecasts) 27 | { 28 | 29 | 30 | 31 | 32 | 33 | 34 | } 35 | 36 |
DateTemp. (C)Temp. (F)Summary
@forecast.Date.ToShortDateString()@forecast.TemperatureC@forecast.TemperatureF@forecast.Summary
37 | } 38 | 39 | @code { 40 | WeatherForecast[] forecasts; 41 | 42 | protected override async Task OnInitializedAsync() 43 | { 44 | forecasts = await ForecastService.GetForecastAsync(DateTime.Now); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 |

Hello, world!

4 | 5 | Welcome to your new app. 6 | -------------------------------------------------------------------------------- /Pages/Pager.razor: -------------------------------------------------------------------------------- 1 | @if (TotalPages > 0) 2 | { 3 |
4 | 7 | 10 | @PageIndex 11 | 14 | 17 |
18 | } 19 | 20 | 26 | 27 | @code { 28 | [Parameter] 29 | public int PageIndex { get; set; } 30 | 31 | [Parameter] 32 | public int TotalPages { get; set; } 33 | 34 | [Parameter] 35 | public bool HasPreviousPage { get; set; } 36 | 37 | [Parameter] 38 | public bool HasNextPage { get; set; } 39 | 40 | [Parameter] 41 | public EventCallback OnClick { get; set; } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /Pages/TaskDetail.razor: -------------------------------------------------------------------------------- 1 | @using BlazorApp.Data 2 | @using BlazorApp.Services 3 | @inject IToDoListService service 4 | @inject IJSRuntime jsRuntime 5 | 6 | 7 | 52 | 53 | 54 | @code { 55 | [Parameter] 56 | public ToDo TaskObject { get; set; } 57 | 58 | [Parameter] 59 | public Action DataChanged { get; set; } 60 | 61 | [Parameter] 62 | public RenderFragment CustomHeader { get; set; } 63 | 64 | //private ToDo task = new ToDo(); 65 | List TaskStatusList = new List() { "New", "In Progress", "Completed" }; 66 | 67 | private async Task CloseTaskModal() 68 | { 69 | await jsRuntime.InvokeAsync("CloseModal", "taskModal"); 70 | } 71 | 72 | 73 | private async void HandleValidSubmit() 74 | { 75 | if (TaskObject.Id == 0) 76 | { 77 | await service.Add(TaskObject); 78 | } 79 | else 80 | { 81 | await service.Update(TaskObject); 82 | } 83 | await CloseTaskModal(); 84 | DataChanged?.Invoke(); 85 | } 86 | 87 | } 88 | 89 | 90 | -------------------------------------------------------------------------------- /Pages/TaskDetailv2.razor: -------------------------------------------------------------------------------- 1 | @using BlazorApp.Data 2 | @using BlazorApp.Services 3 | 4 | @inject ApiService service 5 | @inject IJSRuntime jsRuntime 6 | 7 | 8 | 52 | 53 | 54 | @code { 55 | [Parameter] 56 | public ToDo TaskObject { get; set; } 57 | 58 | [Parameter] 59 | public Action DataChanged { get; set; } 60 | 61 | [Parameter] 62 | public RenderFragment CustomHeader { get; set; } 63 | 64 | List TaskStatusList = new List() { "New", "In Progress", "Completed" }; 65 | 66 | private async Task CloseTaskModal() 67 | { 68 | await jsRuntime.InvokeAsync("CloseModal", "taskModal"); 69 | } 70 | 71 | 72 | private async void HandleValidSubmit() 73 | { 74 | if (TaskObject.Id == 0) 75 | { 76 | await service.Add(TaskObject); 77 | } 78 | else 79 | { 80 | await service.Update(TaskObject); 81 | } 82 | await CloseTaskModal(); 83 | DataChanged?.Invoke(); 84 | } 85 | 86 | } 87 | 88 | 89 | -------------------------------------------------------------------------------- /Pages/ToDoList.razor: -------------------------------------------------------------------------------- 1 | @page "/todolist" 2 | 3 | @using BlazorApp.Data 4 | @using BlazorApp.Services 5 | @inject IToDoListService service 6 | @inject IJSRuntime jsRuntime 7 | 8 |

To Do List

9 | 10 |

This component demonstrates fetching data from Database.

11 | 12 | @if (toDoList == null) 13 | { 14 |

Loading...

15 | } 16 | else 17 | { 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | @foreach (var toDoItem in toDoList) 30 | { 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | } 39 | 40 |
TaskStatusDue DateEditDelete
@toDoItem.Name@toDoItem.Status@toDoItem.DueDate.ToShortDateString()
41 | } 42 |
43 | 44 |
45 | 46 | 47 | 48 | @customHeader 49 | 50 | 51 | @code { 52 | List toDoList; 53 | ToDo taskObject = new ToDo(); 54 | string customHeader = string.Empty; 55 | 56 | private void InitializeTaskObject() 57 | { 58 | taskObject = new ToDo(); 59 | taskObject.DueDate = DateTime.Now; 60 | customHeader = "Add New Task"; 61 | } 62 | 63 | private void PrepareForEdit(ToDo task) 64 | { 65 | customHeader = "Edit Task"; 66 | taskObject = task; 67 | } 68 | 69 | private void PrepareForDelete(ToDo task) 70 | { 71 | taskObject = task; 72 | } 73 | 74 | protected override async Task OnInitializedAsync() 75 | { 76 | toDoList = await service.Get(); 77 | } 78 | 79 | private async Task Delete() 80 | { 81 | var task = await service.Delete(taskObject.Id); 82 | await jsRuntime.InvokeAsync("CloseModal", "confirmDeleteModal"); 83 | toDoList = await service.Get(); 84 | taskObject = new ToDo(); 85 | } 86 | 87 | private async void DataChanged() 88 | { 89 | toDoList = await service.Get(); 90 | StateHasChanged(); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /Pages/_Host.cshtml: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @namespace BlazorApp.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | 5 | 6 | 7 | 8 | 9 | 10 | BlazorApp 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | @(await Html.RenderComponentAsync(RenderMode.ServerPrerendered)) 19 | 20 | 21 | 22 | 23 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Hosting; 10 | using Microsoft.Extensions.Logging; 11 | 12 | namespace BlazorApp 13 | { 14 | public class Program 15 | { 16 | public static void Main(string[] args) 17 | { 18 | CreateHostBuilder(args).Build().Run(); 19 | } 20 | 21 | public static IHostBuilder CreateHostBuilder(string[] args) => 22 | Host.CreateDefaultBuilder(args) 23 | .ConfigureWebHostDefaults(webBuilder => 24 | { 25 | webBuilder.UseStartup(); 26 | }); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:63851", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "BlazorApp": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development" 23 | }, 24 | "applicationUrl": "https://localhost:5001;http://localhost:5000" 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Services/ApiService.cs: -------------------------------------------------------------------------------- 1 | using BlazorApp.Data; 2 | using System.Net.Http; 3 | using System.Text.Json; 4 | using System.Threading.Tasks; 5 | 6 | namespace BlazorApp.Services 7 | { 8 | public class ApiService 9 | { 10 | public HttpClient _httpClient; 11 | 12 | public ApiService(HttpClient client) 13 | { 14 | _httpClient = client; 15 | } 16 | 17 | public async Task> GetPagedResult(int? pageNumber, string sortField, string sortOrder) 18 | { 19 | var response = await _httpClient.GetAsync($"/BlazorDataService/ToDoList/Getv2?pageNumber={pageNumber}&sortField={sortField}&sortOrder={sortOrder}"); 20 | response.EnsureSuccessStatusCode(); 21 | 22 | using var responseStream = await response.Content.ReadAsStreamAsync(); 23 | var result = await JsonSerializer.DeserializeAsync>(responseStream, new JsonSerializerOptions 24 | { 25 | PropertyNamingPolicy = JsonNamingPolicy.CamelCase, 26 | PropertyNameCaseInsensitive = true, 27 | }); 28 | return result; 29 | } 30 | 31 | public async Task Delete(int id) 32 | { 33 | var response = await _httpClient.DeleteAsync($"/BlazorDataService/ToDoList/{id}"); 34 | response.EnsureSuccessStatusCode(); 35 | 36 | using var responseStream = await response.Content.ReadAsStreamAsync(); 37 | return await JsonSerializer.DeserializeAsync(responseStream); 38 | } 39 | 40 | public async Task Add(ToDo task) 41 | { 42 | var stringData = JsonSerializer.Serialize(task); 43 | var httpContent = new StringContent(stringData, System.Text.Encoding.UTF8, "application/json"); 44 | var response = await _httpClient.PostAsync("/BlazorDataService/ToDoList", httpContent); 45 | response.EnsureSuccessStatusCode(); 46 | 47 | using var responseStream = await response.Content.ReadAsStreamAsync(); 48 | return await JsonSerializer.DeserializeAsync(responseStream); 49 | } 50 | 51 | public async Task Update(ToDo task) 52 | { 53 | var stringData = JsonSerializer.Serialize(task); 54 | var httpContent = new StringContent(stringData, System.Text.Encoding.UTF8, "application/json"); 55 | var response = await _httpClient.PutAsync($"/BlazorDataService/ToDoList/{task.Id}", httpContent); 56 | response.EnsureSuccessStatusCode(); 57 | 58 | string jsonResponse = await response.Content.ReadAsStringAsync(); 59 | return jsonResponse; 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Services/CascadingDropdownService.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using System.Threading.Tasks; 4 | using BlazorApp.Data; 5 | using Microsoft.EntityFrameworkCore; 6 | 7 | namespace BlazorApp.Services 8 | { 9 | public interface ICascadingDropdownService 10 | { 11 | Task> GetCategories(); 12 | List GetProducts(int id); 13 | } 14 | public class CascadingDropdownService : ICascadingDropdownService 15 | { 16 | private readonly ApplicationDbContext _context; 17 | 18 | public CascadingDropdownService(ApplicationDbContext context) 19 | { 20 | _context = context; 21 | } 22 | 23 | public async Task> GetCategories() 24 | { 25 | return await _context.Categories.ToListAsync(); 26 | } 27 | 28 | public List GetProducts(int id) 29 | { 30 | var products = _context.Products.Where(x => x.CategoryId.Equals(id)).ToList(); 31 | return products; 32 | } 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Services/PaginatedList.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace BlazorApp.Services 8 | { 9 | public class PaginatedList 10 | { 11 | public PaginatedList() 12 | { 13 | 14 | } 15 | public int PageIndex { get; set; } 16 | public int TotalPages { get; set; } 17 | 18 | public List Items { get; set; } 19 | 20 | public PaginatedList(List items, int count, int pageIndex, int pageSize) 21 | { 22 | PageIndex = pageIndex; 23 | TotalPages = (int)Math.Ceiling(count / (double)pageSize); 24 | 25 | this.Items = new List(); 26 | this.Items.AddRange(items); 27 | } 28 | 29 | public bool HasPreviousPage 30 | { 31 | get 32 | { 33 | return (PageIndex > 1); 34 | } 35 | set { } 36 | } 37 | 38 | public bool HasNextPage 39 | { 40 | get 41 | { 42 | return (PageIndex < TotalPages); 43 | } 44 | set { } 45 | } 46 | 47 | public static async Task> CreateAsync(IQueryable source, int pageIndex, int pageSize) 48 | { 49 | var count = await source.CountAsync(); 50 | var items = await source.Skip((pageIndex - 1) * pageSize).Take(pageSize).ToListAsync(); 51 | return new PaginatedList(items, count, pageIndex, pageSize); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Services/ToDoListService.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using BlazorApp.Data; 4 | using Microsoft.EntityFrameworkCore; 5 | 6 | namespace BlazorApp.Services 7 | { 8 | public interface IToDoListService 9 | { 10 | Task> Get(); 11 | Task Get(int id); 12 | Task Add(ToDo toDo); 13 | Task Update(ToDo toDo); 14 | Task Delete(int id); 15 | } 16 | public class ToDoListService : IToDoListService 17 | { 18 | private readonly ApplicationDbContext _context; 19 | 20 | public ToDoListService(ApplicationDbContext context) 21 | { 22 | _context = context; 23 | } 24 | public async Task> Get() 25 | { 26 | return await _context.ToDoList.ToListAsync(); 27 | } 28 | 29 | public async Task Get(int id) 30 | { 31 | var toDo = await _context.ToDoList.FindAsync(id); 32 | return toDo; 33 | } 34 | 35 | public async Task Add(ToDo toDo) 36 | { 37 | _context.ToDoList.Add(toDo); 38 | await _context.SaveChangesAsync(); 39 | return toDo; 40 | } 41 | 42 | public async Task Update(ToDo toDo) 43 | { 44 | _context.Entry(toDo).State = EntityState.Modified; 45 | await _context.SaveChangesAsync(); 46 | return toDo; 47 | } 48 | 49 | public async Task Delete(int id) 50 | { 51 | var toDo = await _context.ToDoList.FindAsync(id); 52 | _context.ToDoList.Remove(toDo); 53 | await _context.SaveChangesAsync(); 54 | return toDo; 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Shared/LoginDisplay.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | Hello, @context.User.Identity.Name! 4 |
5 | 6 |
7 |
8 | 9 | Register 10 | Log in 11 | 12 |
13 | -------------------------------------------------------------------------------- /Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |
8 |
9 | 10 | About 11 |
12 | 13 |
14 | @Body 15 |
16 |
17 | -------------------------------------------------------------------------------- /Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 |  7 | 8 |
9 | 41 |
42 | 43 | @code { 44 | bool collapseNavMenu = true; 45 | 46 | string NavMenuCssClass => collapseNavMenu ? "collapse" : null; 47 | 48 | void ToggleNavMenu() 49 | { 50 | collapseNavMenu = !collapseNavMenu; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /_Imports.razor: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Authorization 2 | @using Microsoft.AspNetCore.Components.Authorization 3 | @using Microsoft.AspNetCore.Components.Forms 4 | @using Microsoft.AspNetCore.Components.Routing 5 | @using Microsoft.AspNetCore.Components.Web 6 | @using Microsoft.JSInterop 7 | @using BlazorApp 8 | @using BlazorApp.Shared 9 | -------------------------------------------------------------------------------- /appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-BlazorApp-1F527F84-3BAB-44C2-A0A9-9F4E175E1E0A;Trusted_Connection=True;MultipleActiveResultSets=true" 4 | }, 5 | "Logging": { 6 | "LogLevel": { 7 | "Default": "Information", 8 | "Microsoft": "Warning", 9 | "Microsoft.Hosting.Lifetime": "Information" 10 | } 11 | }, 12 | "AllowedHosts": "*" 13 | } 14 | -------------------------------------------------------------------------------- /libman.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "defaultProvider": "cdnjs", 4 | "libraries": [ 5 | { 6 | "library": "jquery@3.4.1", 7 | "destination": "wwwroot/lib/jquery/" 8 | }, 9 | { 10 | "provider": "jsdelivr", 11 | "library": "bootstrap@4.3.1", 12 | "destination": "wwwroot/lib/bootstrap/" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /wwwroot/css/open-iconic/FONT-LICENSE: -------------------------------------------------------------------------------- 1 | SIL OPEN FONT LICENSE Version 1.1 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | PREAMBLE 6 | The goals of the Open Font License (OFL) are to stimulate worldwide 7 | development of collaborative font projects, to support the font creation 8 | efforts of academic and linguistic communities, and to provide a free and 9 | open framework in which fonts may be shared and improved in partnership 10 | with others. 11 | 12 | The OFL allows the licensed fonts to be used, studied, modified and 13 | redistributed freely as long as they are not sold by themselves. The 14 | fonts, including any derivative works, can be bundled, embedded, 15 | redistributed and/or sold with any software provided that any reserved 16 | names are not used by derivative works. The fonts and derivatives, 17 | however, cannot be released under any other type of license. The 18 | requirement for fonts to remain under this license does not apply 19 | to any document created using the fonts or their derivatives. 20 | 21 | DEFINITIONS 22 | "Font Software" refers to the set of files released by the Copyright 23 | Holder(s) under this license and clearly marked as such. This may 24 | include source files, build scripts and documentation. 25 | 26 | "Reserved Font Name" refers to any names specified as such after the 27 | copyright statement(s). 28 | 29 | "Original Version" refers to the collection of Font Software components as 30 | distributed by the Copyright Holder(s). 31 | 32 | "Modified Version" refers to any derivative made by adding to, deleting, 33 | or substituting -- in part or in whole -- any of the components of the 34 | Original Version, by changing formats or by porting the Font Software to a 35 | new environment. 36 | 37 | "Author" refers to any designer, engineer, programmer, technical 38 | writer or other person who contributed to the Font Software. 39 | 40 | PERMISSION & CONDITIONS 41 | Permission is hereby granted, free of charge, to any person obtaining 42 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 43 | redistribute, and sell modified and unmodified copies of the Font 44 | Software, subject to the following conditions: 45 | 46 | 1) Neither the Font Software nor any of its individual components, 47 | in Original or Modified Versions, may be sold by itself. 48 | 49 | 2) Original or Modified Versions of the Font Software may be bundled, 50 | redistributed and/or sold with any software, provided that each copy 51 | contains the above copyright notice and this license. These can be 52 | included either as stand-alone text files, human-readable headers or 53 | in the appropriate machine-readable metadata fields within text or 54 | binary files as long as those fields can be easily viewed by the user. 55 | 56 | 3) No Modified Version of the Font Software may use the Reserved Font 57 | Name(s) unless explicit written permission is granted by the corresponding 58 | Copyright Holder. This restriction only applies to the primary font name as 59 | presented to the users. 60 | 61 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 62 | Software shall not be used to promote, endorse or advertise any 63 | Modified Version, except to acknowledge the contribution(s) of the 64 | Copyright Holder(s) and the Author(s) or with their explicit written 65 | permission. 66 | 67 | 5) The Font Software, modified or unmodified, in part or in whole, 68 | must be distributed entirely under this license, and must not be 69 | distributed under any other license. The requirement for fonts to 70 | remain under this license does not apply to any document created 71 | using the Font Software. 72 | 73 | TERMINATION 74 | This license becomes null and void if any of the above conditions are 75 | not met. 76 | 77 | DISCLAIMER 78 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 79 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 80 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 81 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 82 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 83 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 84 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 85 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 86 | OTHER DEALINGS IN THE FONT SOFTWARE. 87 | -------------------------------------------------------------------------------- /wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /wwwroot/css/open-iconic/README.md: -------------------------------------------------------------------------------- 1 | [Open Iconic v1.1.1](http://useiconic.com/open) 2 | =========== 3 | 4 | ### Open Iconic is the open source sibling of [Iconic](http://useiconic.com). It is a hyper-legible collection of 223 icons with a tiny footprint—ready to use with Bootstrap and Foundation. [View the collection](http://useiconic.com/open#icons) 5 | 6 | 7 | 8 | ## What's in Open Iconic? 9 | 10 | * 223 icons designed to be legible down to 8 pixels 11 | * Super-light SVG files - 61.8 for the entire set 12 | * SVG sprite—the modern replacement for icon fonts 13 | * Webfont (EOT, OTF, SVG, TTF, WOFF), PNG and WebP formats 14 | * Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats 15 | * PNG and WebP raster images in 8px, 16px, 24px, 32px, 48px and 64px. 16 | 17 | 18 | ## Getting Started 19 | 20 | #### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](http://useiconic.com/open#icons) and [Reference](http://useiconic.com/open#reference) sections. 21 | 22 | ### General Usage 23 | 24 | #### Using Open Iconic's SVGs 25 | 26 | We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest you display them like you would any other image (don't forget the `alt` attribute). 27 | 28 | ``` 29 | icon name 30 | ``` 31 | 32 | #### Using Open Iconic's SVG Sprite 33 | 34 | Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack. 35 | 36 | Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `` *tag and a unique class name for each different icon in the* `` *tag.* 37 | 38 | ``` 39 | 40 | 41 | 42 | ``` 43 | 44 | Sizing icons only needs basic CSS. All the icons are in a square format, so just set the `` tag with equal width and height dimensions. 45 | 46 | ``` 47 | .icon { 48 | width: 16px; 49 | height: 16px; 50 | } 51 | ``` 52 | 53 | Coloring icons is even easier. All you need to do is set the `fill` rule on the `` tag. 54 | 55 | ``` 56 | .icon-account-login { 57 | fill: #f00; 58 | } 59 | ``` 60 | 61 | To learn more about SVG Sprites, read [Chris Coyier's guide](http://css-tricks.com/svg-sprites-use-better-icon-fonts/). 62 | 63 | #### Using Open Iconic's Icon Font... 64 | 65 | 66 | ##### …with Bootstrap 67 | 68 | You can find our Bootstrap stylesheets in `font/css/open-iconic-bootstrap.{css, less, scss, styl}` 69 | 70 | 71 | ``` 72 | 73 | ``` 74 | 75 | 76 | ``` 77 | 78 | ``` 79 | 80 | ##### …with Foundation 81 | 82 | You can find our Foundation stylesheets in `font/css/open-iconic-foundation.{css, less, scss, styl}` 83 | 84 | ``` 85 | 86 | ``` 87 | 88 | 89 | ``` 90 | 91 | ``` 92 | 93 | ##### …on its own 94 | 95 | You can find our default stylesheets in `font/css/open-iconic.{css, less, scss, styl}` 96 | 97 | ``` 98 | 99 | ``` 100 | 101 | ``` 102 | 103 | ``` 104 | 105 | 106 | ## License 107 | 108 | ### Icons 109 | 110 | All code (including SVG markup) is under the [MIT License](http://opensource.org/licenses/MIT). 111 | 112 | ### Fonts 113 | 114 | All fonts are under the [SIL Licensed](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web). 115 | -------------------------------------------------------------------------------- /wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blogofpi/BlazorApp/766aaf5523183fd2b00b44b2ceed7aff42904970/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blogofpi/BlazorApp/766aaf5523183fd2b00b44b2ceed7aff42904970/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blogofpi/BlazorApp/766aaf5523183fd2b00b44b2ceed7aff42904970/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blogofpi/BlazorApp/766aaf5523183fd2b00b44b2ceed7aff42904970/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | @import url('open-iconic/font/css/open-iconic-bootstrap.min.css'); 2 | 3 | html, body { 4 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 5 | } 6 | 7 | a, .btn-link { 8 | color: #0366d6; 9 | } 10 | 11 | .btn-primary { 12 | color: #fff; 13 | background-color: #1b6ec2; 14 | border-color: #1861ac; 15 | } 16 | 17 | app { 18 | position: relative; 19 | display: flex; 20 | flex-direction: column; 21 | } 22 | 23 | .top-row { 24 | height: 3.5rem; 25 | display: flex; 26 | align-items: center; 27 | } 28 | 29 | .main { 30 | flex: 1; 31 | } 32 | 33 | .main .top-row { 34 | background-color: #f7f7f7; 35 | border-bottom: 1px solid #d6d5d5; 36 | justify-content: flex-end; 37 | } 38 | 39 | .main .top-row > a { 40 | margin-left: 1.5rem; 41 | } 42 | 43 | .sidebar { 44 | background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); 45 | } 46 | 47 | .sidebar .top-row { 48 | background-color: rgba(0,0,0,0.4); 49 | } 50 | 51 | .sidebar .navbar-brand { 52 | font-size: 1.1rem; 53 | } 54 | 55 | .sidebar .oi { 56 | width: 2rem; 57 | font-size: 1.1rem; 58 | vertical-align: text-top; 59 | top: -2px; 60 | } 61 | 62 | .nav-item { 63 | font-size: 0.9rem; 64 | padding-bottom: 0.5rem; 65 | } 66 | 67 | .nav-item:first-of-type { 68 | padding-top: 1rem; 69 | } 70 | 71 | .nav-item:last-of-type { 72 | padding-bottom: 1rem; 73 | } 74 | 75 | .nav-item a { 76 | color: #d7d7d7; 77 | border-radius: 4px; 78 | height: 3rem; 79 | display: flex; 80 | align-items: center; 81 | line-height: 3rem; 82 | } 83 | 84 | .nav-item a.active { 85 | background-color: rgba(255,255,255,0.25); 86 | color: white; 87 | } 88 | 89 | .nav-item a:hover { 90 | background-color: rgba(255,255,255,0.1); 91 | color: white; 92 | } 93 | 94 | .content { 95 | padding-top: 1.1rem; 96 | } 97 | 98 | .navbar-toggler { 99 | background-color: rgba(255, 255, 255, 0.1); 100 | } 101 | 102 | .valid.modified:not([type=checkbox]) { 103 | outline: 1px solid #26b050; 104 | } 105 | 106 | .invalid { 107 | outline: 1px solid red; 108 | } 109 | 110 | .validation-message { 111 | color: red; 112 | } 113 | 114 | @media (max-width: 767.98px) { 115 | .main .top-row { 116 | display: none; 117 | } 118 | } 119 | 120 | @media (min-width: 768px) { 121 | app { 122 | flex-direction: row; 123 | } 124 | 125 | .sidebar { 126 | width: 250px; 127 | height: 100vh; 128 | position: sticky; 129 | top: 0; 130 | } 131 | 132 | .main .top-row { 133 | position: sticky; 134 | top: 0; 135 | } 136 | 137 | .main > div { 138 | padding-left: 2rem !important; 139 | padding-right: 1.5rem !important; 140 | } 141 | 142 | .navbar-toggler { 143 | display: none; 144 | } 145 | 146 | .sidebar .collapse { 147 | /* Never collapse the sidebar for wide screens */ 148 | display: block; 149 | } 150 | } 151 | -------------------------------------------------------------------------------- /wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blogofpi/BlazorApp/766aaf5523183fd2b00b44b2ceed7aff42904970/wwwroot/favicon.ico -------------------------------------------------------------------------------- /wwwroot/lib/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2019 Twitter, Inc. 4 | Copyright (c) 2011-2019 The Bootstrap Authors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.3.1 (https://getbootstrap.com/) 3 | * Copyright 2011-2019 The Bootstrap Authors 4 | * Copyright 2011-2019 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}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:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[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}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important} 8 | /*# sourceMappingURL=bootstrap-reboot.min.css.map */ -------------------------------------------------------------------------------- /wwwroot/lib/bootstrap/js/dist/alert.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Minified by jsDelivr using Terser v3.14.1. 3 | * Original file: /npm/bootstrap@4.3.1/js/dist/alert.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery"),require("./util.js")):"function"==typeof define&&define.amd?define(["jquery","./util.js"],t):(e=e||self).Alert=t(e.jQuery,e.Util)}(this,function(e,t){"use strict";function n(e,t){for(var n=0;n= maxMajor) { 20 | throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0'); 21 | } 22 | })($); 23 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /wwwroot/lib/bootstrap/js/dist/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["../src/index.js"],"names":["$","TypeError","version","fn","jquery","split","minMajor","ltMajor","minMinor","minPatch","maxMajor","Error"],"mappings":"AAaA;;;;;;AAOA,CAAC,UAACA,CAAD,EAAO;AACN,MAAI,OAAOA,CAAP,KAAa,WAAjB,EAA8B;AAC5B,UAAM,IAAIC,SAAJ,CAAc,kGAAd,CAAN;AACD;;AAED,MAAMC,UAAUF,EAAEG,EAAF,CAAKC,MAAL,CAAYC,KAAZ,CAAkB,GAAlB,EAAuB,CAAvB,EAA0BA,KAA1B,CAAgC,GAAhC,CAAhB;AACA,MAAMC,WAAW,CAAjB;AACA,MAAMC,UAAU,CAAhB;AACA,MAAMC,WAAW,CAAjB;AACA,MAAMC,WAAW,CAAjB;AACA,MAAMC,WAAW,CAAjB;;AAEA,MAAIR,QAAQ,CAAR,IAAaK,OAAb,IAAwBL,QAAQ,CAAR,IAAaM,QAArC,IAAiDN,QAAQ,CAAR,MAAeI,QAAf,IAA2BJ,QAAQ,CAAR,MAAeM,QAA1C,IAAsDN,QAAQ,CAAR,IAAaO,QAApH,IAAgIP,QAAQ,CAAR,KAAcQ,QAAlJ,EAA4J;AAC1J,UAAM,IAAIC,KAAJ,CAAU,8EAAV,CAAN;AACD;AACF,CAfD,EAeGX,CAfH","sourcesContent":["import $ from 'jquery'\nimport Alert from './alert'\nimport Button from './button'\nimport Carousel from './carousel'\nimport Collapse from './collapse'\nimport Dropdown from './dropdown'\nimport Modal from './modal'\nimport Popover from './popover'\nimport Scrollspy from './scrollspy'\nimport Tab from './tab'\nimport Tooltip from './tooltip'\nimport Util from './util'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.1.2): index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n(($) => {\n if (typeof $ === 'undefined') {\n throw new TypeError('Bootstrap\\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\\'s JavaScript.')\n }\n\n const version = $.fn.jquery.split(' ')[0].split('.')\n const minMajor = 1\n const ltMajor = 2\n const minMinor = 9\n const minPatch = 1\n const maxMajor = 4\n\n if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {\n throw new Error('Bootstrap\\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')\n }\n})($)\n\nexport {\n Util,\n Alert,\n Button,\n Carousel,\n Collapse,\n Dropdown,\n Modal,\n Popover,\n Scrollspy,\n Tab,\n Tooltip\n}\n"],"file":"index.js"} -------------------------------------------------------------------------------- /wwwroot/lib/bootstrap/js/dist/index.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Minified by jsDelivr using Terser v3.14.1. 3 | * Original file: /npm/bootstrap@4.3.1/js/dist/index.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | !function(r){if(void 0===r)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=r.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}($); 8 | //# sourceMappingURL=/sm/56dc4e953c19117f273d1cab00acb6257a9284c09657d8a0ad7fd2bc73afbfa7.map -------------------------------------------------------------------------------- /wwwroot/lib/bootstrap/js/dist/popover.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Minified by jsDelivr using Terser v3.14.1. 3 | * Original file: /npm/bootstrap@4.3.1/js/dist/popover.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery"),require("./tooltip.js")):"function"==typeof define&&define.amd?define(["jquery","./tooltip.js"],t):(e=e||self).Popover=t(e.jQuery,e.Tooltip)}(this,function(e,t){"use strict";function n(e,t){for(var n=0;n

'}),p=r({},t.DefaultType,{content:"(string|element|function)"}),a="fade",l="show",h=".popover-header",d=".popover-body",y={HIDE:"hide"+u,HIDDEN:"hidden"+u,SHOW:"show"+u,SHOWN:"shown"+u,INSERTED:"inserted"+u,CLICK:"click"+u,FOCUSIN:"focusin"+u,FOCUSOUT:"focusout"+u,MOUSEENTER:"mouseenter"+u,MOUSELEAVE:"mouseleave"+u},v=function(t){var o,r;function s(){return t.apply(this,arguments)||this}r=t,(o=s).prototype=Object.create(r.prototype),o.prototype.constructor=o,o.__proto__=r;var v,g,m,b=s.prototype;return b.isWithContent=function(){return this.getTitle()||this._getContent()},b.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-popover-"+t)},b.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},b.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(h),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(t.find(d),n),t.removeClass(a+" "+l)},b._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},b._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(c);null!==n&&n.length>0&&t.removeClass(n.join(""))},s._jQueryInterface=function(t){return this.each(function(){var n=e(this).data("bs.popover"),o="object"==typeof t?t:null;if((n||!/dispose|hide/.test(t))&&(n||(n=new s(this,o),e(this).data("bs.popover",n)),"string"==typeof t)){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}})},v=s,m=[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return f}},{key:"NAME",get:function(){return i}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return y}},{key:"EVENT_KEY",get:function(){return u}},{key:"DefaultType",get:function(){return p}}],(g=null)&&n(v.prototype,g),m&&n(v,m),s}(t);return e.fn[i]=v._jQueryInterface,e.fn[i].Constructor=v,e.fn[i].noConflict=function(){return e.fn[i]=s,v._jQueryInterface},v}); 8 | //# sourceMappingURL=/sm/48dbd951ccb16384f148c6a54569994309125a54f5405b854d2ed4ee5ab3a8c5.map -------------------------------------------------------------------------------- /wwwroot/lib/bootstrap/js/dist/tab.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Minified by jsDelivr using Terser v3.14.1. 3 | * Original file: /npm/bootstrap@4.3.1/js/dist/tab.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery"),require("./util.js")):"function"==typeof define&&define.amd?define(["jquery","./util.js"],t):(e=e||self).Tab=t(e.jQuery,e.Util)}(this,function(e,t){"use strict";function a(e,t){for(var a=0;athis._destroyElement(e,t)).emulateTransitionEnd(t)}_destroyElement(e){$(e).detach().trigger(Event.CLOSED).remove()}static _jQueryInterface(e){return this.each(function(){const t=$(this);let r=t.data(DATA_KEY);r||(r=new Alert(this),t.data(DATA_KEY,r)),"close"===e&&r[e](this)})}static _handleDismiss(e){return function(t){t&&t.preventDefault(),e.close(this)}}}$(document).on(Event.CLICK_DATA_API,Selector.DISMISS,Alert._handleDismiss(new Alert)),$.fn.alert=Alert._jQueryInterface,$.fn.alert.Constructor=Alert,$.fn.alert.noConflict=(()=>($.fn.alert=JQUERY_NO_CONFLICT,Alert._jQueryInterface));export default Alert; 8 | //# sourceMappingURL=/sm/e763106380c08e0865a6f103f3979f9d355b0cc03e50d6897b0ec5d815d5b7f2.map -------------------------------------------------------------------------------- /wwwroot/lib/bootstrap/js/src/button.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Minified by jsDelivr using Terser v3.14.1. 3 | * Original file: /npm/bootstrap@4.3.1/js/src/button.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | import $ from"jquery";const NAME="button",VERSION="4.3.1",DATA_KEY="bs.button",EVENT_KEY=`.${DATA_KEY}`,DATA_API_KEY=".data-api",JQUERY_NO_CONFLICT=$.fn[NAME],ClassName={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},Selector={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:'input:not([type="hidden"])',ACTIVE:".active",BUTTON:".btn"},Event={CLICK_DATA_API:`click${EVENT_KEY}.data-api`,FOCUS_BLUR_DATA_API:`focus${EVENT_KEY}.data-api `+`blur${EVENT_KEY}.data-api`};class Button{constructor(t){this._element=t}static get VERSION(){return VERSION}toggle(){let t=!0,e=!0;const s=$(this._element).closest(Selector.DATA_TOGGLE)[0];if(s){const a=this._element.querySelector(Selector.INPUT);if(a){if("radio"===a.type)if(a.checked&&this._element.classList.contains(ClassName.ACTIVE))t=!1;else{const t=s.querySelector(Selector.ACTIVE);t&&$(t).removeClass(ClassName.ACTIVE)}if(t){if(a.hasAttribute("disabled")||s.hasAttribute("disabled")||a.classList.contains("disabled")||s.classList.contains("disabled"))return;a.checked=!this._element.classList.contains(ClassName.ACTIVE),$(a).trigger("change")}a.focus(),e=!1}}e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(ClassName.ACTIVE)),t&&$(this._element).toggleClass(ClassName.ACTIVE)}dispose(){$.removeData(this._element,DATA_KEY),this._element=null}static _jQueryInterface(t){return this.each(function(){let e=$(this).data(DATA_KEY);e||(e=new Button(this),$(this).data(DATA_KEY,e)),"toggle"===t&&e[t]()})}}$(document).on(Event.CLICK_DATA_API,Selector.DATA_TOGGLE_CARROT,t=>{t.preventDefault();let e=t.target;$(e).hasClass(ClassName.BUTTON)||(e=$(e).closest(Selector.BUTTON)),Button._jQueryInterface.call($(e),"toggle")}).on(Event.FOCUS_BLUR_DATA_API,Selector.DATA_TOGGLE_CARROT,t=>{const e=$(t.target).closest(Selector.BUTTON)[0];$(e).toggleClass(ClassName.FOCUS,/^focus(in)?$/.test(t.type))}),$.fn[NAME]=Button._jQueryInterface,$.fn[NAME].Constructor=Button,$.fn[NAME].noConflict=(()=>($.fn[NAME]=JQUERY_NO_CONFLICT,Button._jQueryInterface));export default Button; 8 | //# sourceMappingURL=/sm/e620c39304dc808a3d404560607028ce927333084afe2b96e96801319769890e.map -------------------------------------------------------------------------------- /wwwroot/lib/bootstrap/js/src/index.js: -------------------------------------------------------------------------------- 1 | import $ from 'jquery' 2 | import Alert from './alert' 3 | import Button from './button' 4 | import Carousel from './carousel' 5 | import Collapse from './collapse' 6 | import Dropdown from './dropdown' 7 | import Modal from './modal' 8 | import Popover from './popover' 9 | import Scrollspy from './scrollspy' 10 | import Tab from './tab' 11 | import Toast from './toast' 12 | import Tooltip from './tooltip' 13 | import Util from './util' 14 | 15 | /** 16 | * -------------------------------------------------------------------------- 17 | * Bootstrap (v4.3.1): index.js 18 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 19 | * -------------------------------------------------------------------------- 20 | */ 21 | 22 | (() => { 23 | if (typeof $ === 'undefined') { 24 | throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.') 25 | } 26 | 27 | const version = $.fn.jquery.split(' ')[0].split('.') 28 | const minMajor = 1 29 | const ltMajor = 2 30 | const minMinor = 9 31 | const minPatch = 1 32 | const maxMajor = 4 33 | 34 | if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) { 35 | throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0') 36 | } 37 | })() 38 | 39 | export { 40 | Util, 41 | Alert, 42 | Button, 43 | Carousel, 44 | Collapse, 45 | Dropdown, 46 | Modal, 47 | Popover, 48 | Scrollspy, 49 | Tab, 50 | Toast, 51 | Tooltip 52 | } 53 | -------------------------------------------------------------------------------- /wwwroot/lib/bootstrap/js/src/index.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Minified by jsDelivr using Terser v3.14.1. 3 | * Original file: /npm/bootstrap@4.3.1/js/src/index.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | import $ from"jquery";import Alert from"./alert";import Button from"./button";import Carousel from"./carousel";import Collapse from"./collapse";import Dropdown from"./dropdown";import Modal from"./modal";import Popover from"./popover";import Scrollspy from"./scrollspy";import Tab from"./tab";import Toast from"./toast";import Tooltip from"./tooltip";import Util from"./util";(()=>{if(void 0===$)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");const o=$.fn.jquery.split(" ")[0].split(".");if(o[0]<2&&o[1]<9||1===o[0]&&9===o[1]&&o[2]<1||o[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")})();export{Util,Alert,Button,Carousel,Collapse,Dropdown,Modal,Popover,Scrollspy,Tab,Toast,Tooltip}; 8 | //# sourceMappingURL=/sm/a53072a58a5e15c385d70d9b85a15a64595af48084dc597be47e4ab47c452262.map -------------------------------------------------------------------------------- /wwwroot/lib/bootstrap/js/src/popover.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Minified by jsDelivr using Terser v3.14.1. 3 | * Original file: /npm/bootstrap@4.3.1/js/src/popover.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | import $ from"jquery";import Tooltip from"./tooltip";const NAME="popover",VERSION="4.3.1",DATA_KEY="bs.popover",EVENT_KEY=`.${DATA_KEY}`,JQUERY_NO_CONFLICT=$.fn[NAME],CLASS_PREFIX="bs-popover",BSCLS_PREFIX_REGEX=new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`,"g"),Default={...Tooltip.Default,placement:"right",trigger:"click",content:"",template:''},DefaultType={...Tooltip.DefaultType,content:"(string|element|function)"},ClassName={FADE:"fade",SHOW:"show"},Selector={TITLE:".popover-header",CONTENT:".popover-body"},Event={HIDE:`hide${EVENT_KEY}`,HIDDEN:`hidden${EVENT_KEY}`,SHOW:`show${EVENT_KEY}`,SHOWN:`shown${EVENT_KEY}`,INSERTED:`inserted${EVENT_KEY}`,CLICK:`click${EVENT_KEY}`,FOCUSIN:`focusin${EVENT_KEY}`,FOCUSOUT:`focusout${EVENT_KEY}`,MOUSEENTER:`mouseenter${EVENT_KEY}`,MOUSELEAVE:`mouseleave${EVENT_KEY}`};class Popover extends Tooltip{static get VERSION(){return VERSION}static get Default(){return Default}static get NAME(){return NAME}static get DATA_KEY(){return DATA_KEY}static get Event(){return Event}static get EVENT_KEY(){return EVENT_KEY}static get DefaultType(){return DefaultType}isWithContent(){return this.getTitle()||this._getContent()}addAttachmentClass(t){$(this.getTipElement()).addClass(`${CLASS_PREFIX}-${t}`)}getTipElement(){return this.tip=this.tip||$(this.config.template)[0],this.tip}setContent(){const t=$(this.getTipElement());this.setElementContent(t.find(Selector.TITLE),this.getTitle());let e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(Selector.CONTENT),e),t.removeClass(`${ClassName.FADE} ${ClassName.SHOW}`)}_getContent(){return this.element.getAttribute("data-content")||this.config.content}_cleanTipClass(){const t=$(this.getTipElement()),e=t.attr("class").match(BSCLS_PREFIX_REGEX);null!==e&&e.length>0&&t.removeClass(e.join(""))}static _jQueryInterface(t){return this.each(function(){let e=$(this).data(DATA_KEY);const o="object"==typeof t?t:null;if((e||!/dispose|hide/.test(t))&&(e||(e=new Popover(this,o),$(this).data(DATA_KEY,e)),"string"==typeof t)){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}$.fn[NAME]=Popover._jQueryInterface,$.fn[NAME].Constructor=Popover,$.fn[NAME].noConflict=(()=>($.fn[NAME]=JQUERY_NO_CONFLICT,Popover._jQueryInterface));export default Popover; 8 | //# sourceMappingURL=/sm/d43cb10978107421e4a2d14a8224f194ef4505c1d7a02ec3c0c21f20132830d0.map -------------------------------------------------------------------------------- /wwwroot/lib/bootstrap/js/src/tab.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Minified by jsDelivr using Terser v3.14.1. 3 | * Original file: /npm/bootstrap@4.3.1/js/src/tab.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | import $ from"jquery";import Util from"./util";const NAME="tab",VERSION="4.3.1",DATA_KEY="bs.tab",EVENT_KEY=`.${DATA_KEY}`,DATA_API_KEY=".data-api",JQUERY_NO_CONFLICT=$.fn.tab,Event={HIDE:`hide${EVENT_KEY}`,HIDDEN:`hidden${EVENT_KEY}`,SHOW:`show${EVENT_KEY}`,SHOWN:`shown${EVENT_KEY}`,CLICK_DATA_API:`click${EVENT_KEY}.data-api`},ClassName={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},Selector={DROPDOWN:".dropdown",NAV_LIST_GROUP:".nav, .list-group",ACTIVE:".active",ACTIVE_UL:"> li > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"};class Tab{constructor(e){this._element=e}static get VERSION(){return VERSION}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&$(this._element).hasClass(ClassName.ACTIVE)||$(this._element).hasClass(ClassName.DISABLED))return;let e,t;const a=$(this._element).closest(Selector.NAV_LIST_GROUP)[0],s=Util.getSelectorFromElement(this._element);if(a){const e="UL"===a.nodeName||"OL"===a.nodeName?Selector.ACTIVE_UL:Selector.ACTIVE;t=(t=$.makeArray($(a).find(e)))[t.length-1]}const n=$.Event(Event.HIDE,{relatedTarget:this._element}),l=$.Event(Event.SHOW,{relatedTarget:t});if(t&&$(t).trigger(n),$(this._element).trigger(l),l.isDefaultPrevented()||n.isDefaultPrevented())return;s&&(e=document.querySelector(s)),this._activate(this._element,a);const r=()=>{const e=$.Event(Event.HIDDEN,{relatedTarget:this._element}),a=$.Event(Event.SHOWN,{relatedTarget:t});$(t).trigger(e),$(this._element).trigger(a)};e?this._activate(e,e.parentNode,r):r()}dispose(){$.removeData(this._element,DATA_KEY),this._element=null}_activate(e,t,a){const s=(!t||"UL"!==t.nodeName&&"OL"!==t.nodeName?$(t).children(Selector.ACTIVE):$(t).find(Selector.ACTIVE_UL))[0],n=a&&s&&$(s).hasClass(ClassName.FADE),l=()=>this._transitionComplete(e,s,a);if(s&&n){const e=Util.getTransitionDurationFromElement(s);$(s).removeClass(ClassName.SHOW).one(Util.TRANSITION_END,l).emulateTransitionEnd(e)}else l()}_transitionComplete(e,t,a){if(t){$(t).removeClass(ClassName.ACTIVE);const e=$(t.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];e&&$(e).removeClass(ClassName.ACTIVE),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!1)}if($(e).addClass(ClassName.ACTIVE),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),Util.reflow(e),e.classList.contains(ClassName.FADE)&&e.classList.add(ClassName.SHOW),e.parentNode&&$(e.parentNode).hasClass(ClassName.DROPDOWN_MENU)){const t=$(e).closest(Selector.DROPDOWN)[0];if(t){const e=[].slice.call(t.querySelectorAll(Selector.DROPDOWN_TOGGLE));$(e).addClass(ClassName.ACTIVE)}e.setAttribute("aria-expanded",!0)}a&&a()}static _jQueryInterface(e){return this.each(function(){const t=$(this);let a=t.data(DATA_KEY);if(a||(a=new Tab(this),t.data(DATA_KEY,a)),"string"==typeof e){if(void 0===a[e])throw new TypeError(`No method named "${e}"`);a[e]()}})}}$(document).on(Event.CLICK_DATA_API,Selector.DATA_TOGGLE,function(e){e.preventDefault(),Tab._jQueryInterface.call($(this),"show")}),$.fn.tab=Tab._jQueryInterface,$.fn.tab.Constructor=Tab,$.fn.tab.noConflict=(()=>($.fn.tab=JQUERY_NO_CONFLICT,Tab._jQueryInterface));export default Tab; 8 | //# sourceMappingURL=/sm/d5d5ff1d288193e418c00a4e570f2d2322e7d845e272a244020a6f98ae1bc40d.map -------------------------------------------------------------------------------- /wwwroot/lib/bootstrap/js/src/toast.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Minified by jsDelivr using Terser v3.14.1. 3 | * Original file: /npm/bootstrap@4.3.1/js/src/toast.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | import $ from"jquery";import Util from"./util";const NAME="toast",VERSION="4.3.1",DATA_KEY="bs.toast",EVENT_KEY=`.${DATA_KEY}`,JQUERY_NO_CONFLICT=$.fn[NAME],Event={CLICK_DISMISS:`click.dismiss${EVENT_KEY}`,HIDE:`hide${EVENT_KEY}`,HIDDEN:`hidden${EVENT_KEY}`,SHOW:`show${EVENT_KEY}`,SHOWN:`shown${EVENT_KEY}`},ClassName={FADE:"fade",HIDE:"hide",SHOW:"show",SHOWING:"showing"},DefaultType={animation:"boolean",autohide:"boolean",delay:"number"},Default={animation:!0,autohide:!0,delay:500},Selector={DATA_DISMISS:'[data-dismiss="toast"]'};class Toast{constructor(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}static get VERSION(){return VERSION}static get DefaultType(){return DefaultType}static get Default(){return Default}show(){$(this._element).trigger(Event.SHOW),this._config.animation&&this._element.classList.add(ClassName.FADE);const t=()=>{this._element.classList.remove(ClassName.SHOWING),this._element.classList.add(ClassName.SHOW),$(this._element).trigger(Event.SHOWN),this._config.autohide&&this.hide()};if(this._element.classList.remove(ClassName.HIDE),this._element.classList.add(ClassName.SHOWING),this._config.animation){const e=Util.getTransitionDurationFromElement(this._element);$(this._element).one(Util.TRANSITION_END,t).emulateTransitionEnd(e)}else t()}hide(t){this._element.classList.contains(ClassName.SHOW)&&($(this._element).trigger(Event.HIDE),t?this._close():this._timeout=setTimeout(()=>{this._close()},this._config.delay))}dispose(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains(ClassName.SHOW)&&this._element.classList.remove(ClassName.SHOW),$(this._element).off(Event.CLICK_DISMISS),$.removeData(this._element,DATA_KEY),this._element=null,this._config=null}_getConfig(t){return t={...Default,...$(this._element).data(),..."object"==typeof t&&t?t:{}},Util.typeCheckConfig(NAME,t,this.constructor.DefaultType),t}_setListeners(){$(this._element).on(Event.CLICK_DISMISS,Selector.DATA_DISMISS,()=>this.hide(!0))}_close(){const t=()=>{this._element.classList.add(ClassName.HIDE),$(this._element).trigger(Event.HIDDEN)};if(this._element.classList.remove(ClassName.SHOW),this._config.animation){const e=Util.getTransitionDurationFromElement(this._element);$(this._element).one(Util.TRANSITION_END,t).emulateTransitionEnd(e)}else t()}static _jQueryInterface(t){return this.each(function(){const e=$(this);let s=e.data(DATA_KEY);if(s||(s=new Toast(this,"object"==typeof t&&t),e.data(DATA_KEY,s)),"string"==typeof t){if(void 0===s[t])throw new TypeError(`No method named "${t}"`);s[t](this)}})}}$.fn[NAME]=Toast._jQueryInterface,$.fn[NAME].Constructor=Toast,$.fn[NAME].noConflict=(()=>($.fn[NAME]=JQUERY_NO_CONFLICT,Toast._jQueryInterface));export default Toast; 8 | //# sourceMappingURL=/sm/dbaa9a75c052b05bda3ec7524028d200dcc4bae6461259cfa91195a49e3e5cbc.map -------------------------------------------------------------------------------- /wwwroot/lib/bootstrap/js/src/tools/sanitizer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * -------------------------------------------------------------------------- 3 | * Bootstrap (v4.3.1): tools/sanitizer.js 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | * -------------------------------------------------------------------------- 6 | */ 7 | 8 | const uriAttrs = [ 9 | 'background', 10 | 'cite', 11 | 'href', 12 | 'itemtype', 13 | 'longdesc', 14 | 'poster', 15 | 'src', 16 | 'xlink:href' 17 | ] 18 | 19 | const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i 20 | 21 | export const DefaultWhitelist = { 22 | // Global attributes allowed on any supplied element below. 23 | '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN], 24 | a: ['target', 'href', 'title', 'rel'], 25 | area: [], 26 | b: [], 27 | br: [], 28 | col: [], 29 | code: [], 30 | div: [], 31 | em: [], 32 | hr: [], 33 | h1: [], 34 | h2: [], 35 | h3: [], 36 | h4: [], 37 | h5: [], 38 | h6: [], 39 | i: [], 40 | img: ['src', 'alt', 'title', 'width', 'height'], 41 | li: [], 42 | ol: [], 43 | p: [], 44 | pre: [], 45 | s: [], 46 | small: [], 47 | span: [], 48 | sub: [], 49 | sup: [], 50 | strong: [], 51 | u: [], 52 | ul: [] 53 | } 54 | 55 | /** 56 | * A pattern that recognizes a commonly useful subset of URLs that are safe. 57 | * 58 | * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts 59 | */ 60 | const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi 61 | 62 | /** 63 | * A pattern that matches safe data URLs. Only matches image, video and audio types. 64 | * 65 | * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts 66 | */ 67 | const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i 68 | 69 | function allowedAttribute(attr, allowedAttributeList) { 70 | const attrName = attr.nodeName.toLowerCase() 71 | 72 | if (allowedAttributeList.indexOf(attrName) !== -1) { 73 | if (uriAttrs.indexOf(attrName) !== -1) { 74 | return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN)) 75 | } 76 | 77 | return true 78 | } 79 | 80 | const regExp = allowedAttributeList.filter((attrRegex) => attrRegex instanceof RegExp) 81 | 82 | // Check if a regular expression validates the attribute. 83 | for (let i = 0, l = regExp.length; i < l; i++) { 84 | if (attrName.match(regExp[i])) { 85 | return true 86 | } 87 | } 88 | 89 | return false 90 | } 91 | 92 | export function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) { 93 | if (unsafeHtml.length === 0) { 94 | return unsafeHtml 95 | } 96 | 97 | if (sanitizeFn && typeof sanitizeFn === 'function') { 98 | return sanitizeFn(unsafeHtml) 99 | } 100 | 101 | const domParser = new window.DOMParser() 102 | const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html') 103 | const whitelistKeys = Object.keys(whiteList) 104 | const elements = [].slice.call(createdDocument.body.querySelectorAll('*')) 105 | 106 | for (let i = 0, len = elements.length; i < len; i++) { 107 | const el = elements[i] 108 | const elName = el.nodeName.toLowerCase() 109 | 110 | if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) { 111 | el.parentNode.removeChild(el) 112 | 113 | continue 114 | } 115 | 116 | const attributeList = [].slice.call(el.attributes) 117 | const whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []) 118 | 119 | attributeList.forEach((attr) => { 120 | if (!allowedAttribute(attr, whitelistedAttributes)) { 121 | el.removeAttribute(attr.nodeName) 122 | } 123 | }) 124 | } 125 | 126 | return createdDocument.body.innerHTML 127 | } 128 | -------------------------------------------------------------------------------- /wwwroot/lib/bootstrap/js/src/tools/sanitizer.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Minified by jsDelivr using Terser v3.14.1. 3 | * Original file: /npm/bootstrap@4.3.1/js/src/tools/sanitizer.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | const uriAttrs=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],ARIA_ATTRIBUTE_PATTERN=/^aria-[\w-]*$/i;export const DefaultWhitelist={"*":["class","dir","id","lang","role",ARIA_ATTRIBUTE_PATTERN],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]};const SAFE_URL_PATTERN=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:\/?#]*(?:[\/?#]|$))/gi,DATA_URL_PATTERN=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function allowedAttribute(e,t){const o=e.nodeName.toLowerCase();if(-1!==t.indexOf(o))return-1===uriAttrs.indexOf(o)||Boolean(e.nodeValue.match(SAFE_URL_PATTERN)||e.nodeValue.match(DATA_URL_PATTERN));const r=t.filter(e=>e instanceof RegExp);for(let e=0,t=r.length;e{allowedAttribute(e,l)||o.removeAttribute(e.nodeName)})}return r.body.innerHTML} 8 | //# sourceMappingURL=/sm/d3900f5b8bdd08ab48f17e7fd334d18e694573954860baaedde42bdd32989031.map -------------------------------------------------------------------------------- /wwwroot/lib/bootstrap/js/src/util.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Minified by jsDelivr using Terser v3.14.1. 3 | * Original file: /npm/bootstrap@4.3.1/js/src/util.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | import $ from"jquery";const TRANSITION_END="transitionend",MAX_UID=1e6,MILLISECONDS_MULTIPLIER=1e3;function toType(t){return{}.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase()}function getSpecialTransitionEndEvent(){return{bindType:TRANSITION_END,delegateType:TRANSITION_END,handle(t){if($(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}}}function transitionEndEmulator(t){let e=!1;return $(this).one(Util.TRANSITION_END,()=>{e=!0}),setTimeout(()=>{e||Util.triggerTransitionEnd(this)},t),this}function setTransitionEndSupport(){$.fn.emulateTransitionEnd=transitionEndEmulator,$.event.special[Util.TRANSITION_END]=getSpecialTransitionEndEvent()}const Util={TRANSITION_END:"bsTransitionEnd",getUID(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement(t){let e=t.getAttribute("data-target");if(!e||"#"===e){const n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement(t){if(!t)return 0;let e=$(t).css("transition-duration"),n=$(t).css("transition-delay");const o=parseFloat(e),r=parseFloat(n);return o||r?(e=e.split(",")[0],n=n.split(",")[0],1e3*(parseFloat(e)+parseFloat(n))):0},reflow:t=>t.offsetHeight,triggerTransitionEnd(t){$(t).trigger(TRANSITION_END)},supportsTransitionEnd:()=>Boolean(TRANSITION_END),isElement:t=>(t[0]||t).nodeType,typeCheckConfig(t,e,n){for(const o in n)if(Object.prototype.hasOwnProperty.call(n,o)){const r=n[o],i=e[o],a=i&&Util.isElement(i)?"element":toType(i);if(!new RegExp(r).test(a))throw new Error(`${t.toUpperCase()}: `+`Option "${o}" provided type "${a}" `+`but expected type "${r}".`)}},findShadowRoot(t){if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?Util.findShadowRoot(t.parentNode):null}};setTransitionEndSupport();export default Util; 8 | //# sourceMappingURL=/sm/9e0ac59512d744eac35eac373cbd76368f8c2b9148394de59c389569e153d2a6.map -------------------------------------------------------------------------------- /wwwroot/lib/bootstrap/scss/_alert.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Base styles 3 | // 4 | 5 | .alert { 6 | position: relative; 7 | padding: $alert-padding-y $alert-padding-x; 8 | margin-bottom: $alert-margin-bottom; 9 | border: $alert-border-width solid transparent; 10 | @include border-radius($alert-border-radius); 11 | } 12 | 13 | // Headings for larger alerts 14 | .alert-heading { 15 | // Specified to prevent conflicts of changing $headings-color 16 | color: inherit; 17 | } 18 | 19 | // Provide class for links that match alerts 20 | .alert-link { 21 | font-weight: $alert-link-font-weight; 22 | } 23 | 24 | 25 | // Dismissible alerts 26 | // 27 | // Expand the right padding and account for the close button's positioning. 28 | 29 | .alert-dismissible { 30 | padding-right: $close-font-size + $alert-padding-x * 2; 31 | 32 | // Adjust close link position 33 | .close { 34 | position: absolute; 35 | top: 0; 36 | right: 0; 37 | padding: $alert-padding-y $alert-padding-x; 38 | color: inherit; 39 | } 40 | } 41 | 42 | 43 | // Alternate styles 44 | // 45 | // Generate contextual modifier classes for colorizing the alert. 46 | 47 | @each $color, $value in $theme-colors { 48 | .alert-#{$color} { 49 | @include alert-variant(theme-color-level($color, $alert-bg-level), theme-color-level($color, $alert-border-level), theme-color-level($color, $alert-color-level)); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /wwwroot/lib/bootstrap/scss/_badge.scss: -------------------------------------------------------------------------------- 1 | // Base class 2 | // 3 | // Requires one of the contextual, color modifier classes for `color` and 4 | // `background-color`. 5 | 6 | .badge { 7 | display: inline-block; 8 | padding: $badge-padding-y $badge-padding-x; 9 | @include font-size($badge-font-size); 10 | font-weight: $badge-font-weight; 11 | line-height: 1; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | @include border-radius($badge-border-radius); 16 | @include transition($badge-transition); 17 | 18 | @at-root a#{&} { 19 | @include hover-focus { 20 | text-decoration: none; 21 | } 22 | } 23 | 24 | // Empty badges collapse automatically 25 | &:empty { 26 | display: none; 27 | } 28 | } 29 | 30 | // Quick fix for badges in buttons 31 | .btn .badge { 32 | position: relative; 33 | top: -1px; 34 | } 35 | 36 | // Pill badges 37 | // 38 | // Make them extra rounded with a modifier to replace v3's badges. 39 | 40 | .badge-pill { 41 | padding-right: $badge-pill-padding-x; 42 | padding-left: $badge-pill-padding-x; 43 | @include border-radius($badge-pill-border-radius); 44 | } 45 | 46 | // Colors 47 | // 48 | // Contextual variations (linked badges get darker on :hover). 49 | 50 | @each $color, $value in $theme-colors { 51 | .badge-#{$color} { 52 | @include badge-variant($value); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /wwwroot/lib/bootstrap/scss/_breadcrumb.scss: -------------------------------------------------------------------------------- 1 | .breadcrumb { 2 | display: flex; 3 | flex-wrap: wrap; 4 | padding: $breadcrumb-padding-y $breadcrumb-padding-x; 5 | margin-bottom: $breadcrumb-margin-bottom; 6 | list-style: none; 7 | background-color: $breadcrumb-bg; 8 | @include border-radius($breadcrumb-border-radius); 9 | } 10 | 11 | .breadcrumb-item { 12 | // The separator between breadcrumbs (by default, a forward-slash: "/") 13 | + .breadcrumb-item { 14 | padding-left: $breadcrumb-item-padding; 15 | 16 | &::before { 17 | display: inline-block; // Suppress underlining of the separator in modern browsers 18 | padding-right: $breadcrumb-item-padding; 19 | color: $breadcrumb-divider-color; 20 | content: $breadcrumb-divider; 21 | } 22 | } 23 | 24 | // IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built 25 | // without `