Skip to content

Commit

Permalink
Update package 5.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavnavar committed Jan 15, 2024
1 parent d1ae637 commit 0019067
Show file tree
Hide file tree
Showing 136 changed files with 29,796 additions and 62 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,5 @@
/GridBlazorGrpc.Client/obj
/GridBlazorGrpc.Server/obj
/GridBlazorGrpc.Shared/obj
/GridBlazorSpring/bin
/GridBlazorSpring/obj
8 changes: 7 additions & 1 deletion Grid.Blazor.sln
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GridBlazorGrpc.Client", "Gr
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GridBlazorGrpc.Server", "GridBlazorGrpc.Server\GridBlazorGrpc.Server.csproj", "{FD560288-98BB-45C3-AD8E-5085E62AB6EA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GridBlazorSpring", "GridBlazorSpring\GridBlazorSpring.csproj", "{C0F887ED-EE28-4966-8EE1-A78D97490F29}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -123,12 +125,16 @@ Global
{FD560288-98BB-45C3-AD8E-5085E62AB6EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FD560288-98BB-45C3-AD8E-5085E62AB6EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FD560288-98BB-45C3-AD8E-5085E62AB6EA}.Release|Any CPU.Build.0 = Release|Any CPU
{C0F887ED-EE28-4966-8EE1-A78D97490F29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C0F887ED-EE28-4966-8EE1-A78D97490F29}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C0F887ED-EE28-4966-8EE1-A78D97490F29}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C0F887ED-EE28-4966-8EE1-A78D97490F29}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {895FF79E-EBAE-48F1-BB99-DEE7E62B0DB6}
VisualSVNWorkingCopyRoot = .
SolutionGuid = {895FF79E-EBAE-48F1-BB99-DEE7E62B0DB6}
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion GridBlazor/GridBlazor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<LangVersion>11.0</LangVersion>
<GenerateEmbeddedFilesManifest>True</GenerateEmbeddedFilesManifest>
<EnableDefaultEmbeddedResourceItems>False</EnableDefaultEmbeddedResourceItems>
<Version>5.0.4</Version>
<Version>5.0.5</Version>
<Title>GridBlazor</Title>
<Description>Grid components for Blazor</Description>
<Summary>Grid components for Blazor</Summary>
Expand Down
2 changes: 1 addition & 1 deletion GridBlazor/Pagination/GridPager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public GridPager(IGrid grid)
else
{
ParameterName = DefaultPageQueryParameter;
MaxDisplayedPages = MaxDisplayedPages;
MaxDisplayedPages = DefaultMaxDisplayedPages;
PageSize = DefaultPageSize;

_query = grid.Query;
Expand Down
68 changes: 34 additions & 34 deletions GridBlazorClientSide.Server/Controllers/SampleDataController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace GridBlazorClientSide.Server.Controllers
{
[Route("api/[controller]")]
[Route("api/[controller]/[action]")]
public class SampleDataController : Controller
{
private readonly NorthwindDbContext _context;
Expand All @@ -25,7 +25,7 @@ public SampleDataController(NorthwindDbContext context)
_context = context;
}

[HttpGet("[action]")]
[HttpGet]
public async Task<ActionResult> GetOrdersGrid()
{
var repository = new OrdersRepository(_context);
Expand All @@ -42,7 +42,7 @@ public async Task<ActionResult> GetOrdersGrid()
return Ok(items);
}

[HttpGet("[action]")]
[HttpGet]
public ActionResult GetOrdersGridordersAutoGenerateColumns()
{
var repository = new OrdersRepository(_context);
Expand All @@ -60,7 +60,7 @@ public ActionResult GetOrdersGridordersAutoGenerateColumns()
return Ok(items);
}

[HttpGet("[action]")]
[HttpGet]
public async Task<ActionResult> GetOrdersGridWithTotals()
{
var repository = new OrdersRepository(_context);
Expand All @@ -77,7 +77,7 @@ public async Task<ActionResult> GetOrdersGridWithTotals()
return Ok(items);
}

[HttpGet("[action]")]
[HttpGet]
public ActionResult GetOrdersGridWithCount()
{
var repository = new OrdersRepository(_context);
Expand All @@ -94,7 +94,7 @@ public ActionResult GetOrdersGridWithCount()
return Ok(items);
}

[HttpGet("[action]")]
[HttpGet]
public async Task<ActionResult> GetOrdersGridSearchable()
{
var repository = new OrdersRepository(_context);
Expand All @@ -112,7 +112,7 @@ public async Task<ActionResult> GetOrdersGridSearchable()
return Ok(items);
}

[HttpGet("[action]")]
[HttpGet]
public async Task<ActionResult> GetOrdersGridExtSorting()
{
var repository = new OrdersRepository(_context);
Expand All @@ -130,7 +130,7 @@ public async Task<ActionResult> GetOrdersGridExtSorting()
return Ok(items);
}

[HttpGet("[action]")]
[HttpGet]
public async Task<ActionResult> GetOrdersGridGroupable()
{
var repository = new OrdersRepository(_context);
Expand All @@ -148,7 +148,7 @@ public async Task<ActionResult> GetOrdersGridGroupable()
return Ok(items);
}

[HttpGet("[action]")]
[HttpGet]
public async Task<ActionResult> GetVirtualizedOrdersGrid()
{
var repository = new OrdersRepository(_context);
Expand All @@ -166,7 +166,7 @@ public async Task<ActionResult> GetVirtualizedOrdersGrid()
return Ok(items);
}

[HttpGet("[action]")]
[HttpGet]
public ActionResult GetMaxFreight(string clientName)
{
var repository = new OrdersRepository(_context);
Expand All @@ -179,7 +179,7 @@ public ActionResult GetMaxFreight(string clientName)
return Ok(new Order() { Freight = server.ItemsToDisplay.Items.Max(r => r.Freight) });
}

[HttpGet("[action]")]
[HttpGet]
public ActionResult GetMinFreight(string clientName)
{
var repository = new OrdersRepository(_context);
Expand All @@ -192,7 +192,7 @@ public ActionResult GetMinFreight(string clientName)
return Ok(new Order() { Freight = server.ItemsToDisplay.Items.Min(r => r.Freight) });
}

[HttpGet("[action]")]
[HttpGet]
public async Task<ActionResult> GetOrdersGridWithSubgrids()
{
var repository = new OrdersRepository(_context);
Expand All @@ -209,7 +209,7 @@ public async Task<ActionResult> GetOrdersGridWithSubgrids()
return Ok(items);
}

[HttpGet("[action]")]
[HttpGet]
public async Task<ActionResult> OrderColumnsListFilter()
{
var repository = new OrdersRepository(_context);
Expand All @@ -226,7 +226,7 @@ public async Task<ActionResult> OrderColumnsListFilter()
return Ok(items);
}

[HttpGet("[action]")]
[HttpGet]
public async Task<ActionResult> OrderColumnsWithEdit()
{
var repository = new OrdersRepository(_context);
Expand All @@ -243,7 +243,7 @@ public async Task<ActionResult> OrderColumnsWithEdit()
return Ok(items);
}

[HttpGet("[action]")]
[HttpGet]
public async Task<ActionResult> OrderColumnsWithCrud()
{
var repository = new OrdersRepository(_context);
Expand All @@ -260,7 +260,7 @@ public async Task<ActionResult> OrderColumnsWithCrud()
return Ok(items);
}

[HttpGet("[action]")]
[HttpGet]
public async Task<ActionResult> OrderColumnsWithSubgridCrud()
{
var repository = new OrdersRepository(_context);
Expand All @@ -277,7 +277,7 @@ public async Task<ActionResult> OrderColumnsWithSubgridCrud()
return Ok(items);
}

[HttpGet("[action]")]
[HttpGet]
public ActionResult GetOrderColumnsWithErrors()
{
var random = new Random();
Expand All @@ -298,7 +298,7 @@ public ActionResult GetOrderColumnsWithErrors()
return Ok(items);
}

[HttpGet("[action]")]
[HttpGet]
public async Task<ActionResult> GetOrdersGridAllFeatures()
{
var repository = new OrdersRepository(_context);
Expand All @@ -316,7 +316,7 @@ public async Task<ActionResult> GetOrdersGridAllFeatures()
return Ok(items);
}

[HttpGet("[action]")]
[HttpGet]
public ActionResult GetCustomersNames()
{
// get all customer ids in the grid with the current filters
Expand All @@ -331,7 +331,7 @@ public ActionResult GetCustomersNames()
return Ok(customers);
}

[HttpGet("[action]")]
[HttpGet]
public ActionResult GetAllCustomers()
{
var repository = new CustomersRepository(_context);
Expand All @@ -340,7 +340,7 @@ public ActionResult GetAllCustomers()
.ToList());
}

[HttpGet("[action]")]
[HttpGet]
public ActionResult GetAllCustomers2()
{
var repository = new CustomersRepository(_context);
Expand All @@ -349,7 +349,7 @@ public ActionResult GetAllCustomers2()
.ToList());
}

[HttpGet("[action]")]
[HttpGet]
public ActionResult GetAllContacts()
{
var repository = new CustomersRepository(_context);
Expand All @@ -358,7 +358,7 @@ public ActionResult GetAllContacts()
.ToList());
}

[HttpGet("[action]")]
[HttpGet]
public ActionResult GetAllEmployees()
{
var repository = new EmployeeRepository(_context);
Expand All @@ -368,7 +368,7 @@ public ActionResult GetAllEmployees()
.ToList());
}

[HttpGet("[action]")]
[HttpGet]
public ActionResult GetAllShippers()
{
var repository = new ShipperRepository(_context);
Expand All @@ -378,7 +378,7 @@ public ActionResult GetAllShippers()
.ToList());
}

[HttpGet("[action]")]
[HttpGet]
public ActionResult GetAllProducts()
{
var repository = new ProductRepository(_context);
Expand All @@ -388,7 +388,7 @@ public ActionResult GetAllProducts()
.ToList());
}

[HttpGet("[action]")]
[HttpGet]
public async Task<ActionResult> GetOrderDetailsGrid(int OrderId)
{
var orderDetails = (new OrderDetailsRepository(_context)).GetForOrder(OrderId);
Expand All @@ -405,7 +405,7 @@ public async Task<ActionResult> GetOrderDetailsGrid(int OrderId)
return Ok(items);
}

[HttpGet("[action]")]
[HttpGet]
public async Task<ActionResult> GetOrderDetailsGridWithCrud(int OrderId)
{
var orderDetails = (new OrderDetailsRepository(_context)).GetForOrder(OrderId);
Expand All @@ -422,7 +422,7 @@ public async Task<ActionResult> GetOrderDetailsGridWithCrud(int OrderId)
return Ok(items);
}

[HttpGet("[action]")]
[HttpGet]
public async Task<ActionResult> GetOrderDetailsGridAllFeatures(int OrderId)
{
var orderDetails = (new OrderDetailsRepository(_context)).GetForOrder(OrderId);
Expand All @@ -439,7 +439,7 @@ public async Task<ActionResult> GetOrderDetailsGridAllFeatures(int OrderId)
return Ok(items);
}

[HttpGet("[action]")]
[HttpGet]
public async Task<ActionResult> GetCustomersGrid()
{
var repository = new CustomersRepository(_context);
Expand All @@ -456,7 +456,7 @@ public async Task<ActionResult> GetCustomersGrid()
return Ok(items);
}

[HttpPost("[action]")]
[HttpPost]
public async Task<ActionResult> Add1ToFreight(int id)
{
if (ModelState.IsValid)
Expand Down Expand Up @@ -488,7 +488,7 @@ public async Task<ActionResult> Add1ToFreight(int id)
});
}

[HttpPost("[action]")]
[HttpPost]
public async Task<ActionResult> Subtract1ToFreight(int id)
{
if (ModelState.IsValid)
Expand Down Expand Up @@ -520,7 +520,7 @@ public async Task<ActionResult> Subtract1ToFreight(int id)
});
}

[HttpGet("[action]")]
[HttpGet]
public async Task<ActionResult> GetEmployeesGrid()
{
var repository = new EmployeeRepository(_context);
Expand All @@ -537,7 +537,7 @@ public async Task<ActionResult> GetEmployeesGrid()
return Ok(items);
}

[HttpPost("[action]")]
[HttpPost]
public async Task<ActionResult> SetEmployeePhoto([FromBody] Employee employee)
{
if (ModelState.IsValid)
Expand All @@ -564,7 +564,7 @@ public async Task<ActionResult> SetEmployeePhoto([FromBody] Employee employee)
});
}

[HttpGet("[action]")]
[HttpGet]
public ActionResult GetTrucksGrid()
{
var repository = new EmployeeRepository(_context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<DisableImplicitComponentsAnalyzers>true</DisableImplicitComponentsAnalyzers>
<Version>5.0.2</Version>
<Version>5.0.5</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion GridBlazorGrpc.Server/GridBlazorGrpc.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<DisableImplicitComponentsAnalyzers>true</DisableImplicitComponentsAnalyzers>
<Version>5.0.2</Version>
<Version>5.0.5</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions GridBlazorGrpc.Server/Services/GridServerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,10 @@ public async ValueTask<IEnumerable<string>> GetCustomersNames(QueryDictionary<st
var orderRepository = new OrdersRepository(_context);
var server = new GridCoreServer<Order>(orderRepository.GetAll(), query, true, "ordersGrid",
ColumnCollections.OrderColumns);
return ((GridBase<Order>)server.Grid).GridItems.Where(r => !string.IsNullOrWhiteSpace(r.CustomerID))
return await ((GridBase<Order>)server.Grid).GridItems.Where(r => !string.IsNullOrWhiteSpace(r.CustomerID))
.Select(r => r.Customer).Distinct()
.Select(r => r.CompanyName)
.ToList();
.ToListAsync();
}

public async ValueTask<IEnumerable<SelectItem>> GetAllCustomers()
Expand Down
10 changes: 10 additions & 0 deletions GridBlazorSpring/App.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Router AppAssembly="@typeof(Program).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
</Found>
<NotFound>
<LayoutView Layout="@typeof(MainLayout)">
<p>Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>
Loading

0 comments on commit 0019067

Please sign in to comment.