Skip to content

Commit

Permalink
Merge 6.0.18
Browse files Browse the repository at this point in the history
  • Loading branch information
Garderoben committed Nov 9, 2022
2 parents 57c235a + b3e19da commit ee80585
Show file tree
Hide file tree
Showing 147 changed files with 3,004 additions and 882 deletions.
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "6.0.100",
"rollForward": "latestFeature"
}
}
3 changes: 2 additions & 1 deletion src/MudBlazor.Docs.Compiler/DocStrings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public bool Execute()
}

// TableContext was causing conflicts due to the imperfect mapping from the name of class to the name of field in DocStrings
if (type.IsSubclassOf(typeof(Attribute)) || GetSaveTypename(type) == "TypeInference" || type == typeof(Utilities.CssBuilder) || type == typeof(TableContext))
if (type.IsSubclassOf(typeof(Attribute)) || GetSaveTypename(type) == "TypeInference"
|| type == typeof(Utilities.CssBuilder) || type == typeof(TableContext) || GetSaveTypename(type).StartsWith("EventUtil_"))
continue;

foreach (var method in type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.FlattenHierarchy))
Expand Down
2 changes: 1 addition & 1 deletion src/MudBlazor.Docs.Compiler/MudBlazor.Docs.Compiler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ColorCode.HTML" Version="2.0.13" />
<PackageReference Include="ColorCode.HTML" Version="2.0.14" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions src/MudBlazor.Docs.Server/Pages/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
<meta name="theme-color" content="#ffffff">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700&amp;display=swap" rel="stylesheet">
<link href="_content/MudBlazor/MudBlazor.min.css?v=6.0.17" rel="stylesheet" />
<link href="_content/MudBlazor.Docs/MudBlazorDocs.min.css?v=6.0.17" rel="stylesheet" />
<link href="_content/MudBlazor/MudBlazor.min.css?v=6.0.18" rel="stylesheet" />
<link href="_content/MudBlazor.Docs/MudBlazorDocs.min.css?v=6.0.18" rel="stylesheet" />
</head>

<body>
Expand All @@ -80,8 +80,8 @@
<a class="dismiss">🗙</a>
</div>

<script src="_content/MudBlazor/MudBlazor.min.js?v=6.0.17"></script>
<script src="_content/MudBlazor.Docs/JS/docs.js?v=6.0.17"></script>
<script src="_content/MudBlazor/MudBlazor.min.js?v=6.0.18"></script>
<script src="_content/MudBlazor.Docs/JS/docs.js?v=6.0.18"></script>
<script src="_framework/blazor.server.js"></script>
<script src="_content/Blazor-Analytics/blazor-analytics.js"></script>
</body>
Expand Down
3 changes: 1 addition & 2 deletions src/MudBlazor.Docs.Server/_Imports.razor
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@
@using Blazor.Analytics.Components
@using MudBlazor.Docs.Server
@using MudBlazor.Docs
@using MudBlazor
@using MudBlazor.Events
@using MudBlazor
4 changes: 2 additions & 2 deletions src/MudBlazor.Docs.Wasm/MudBlazor.Docs.Wasm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.9.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.9.*" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.10.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.10.*" PrivateAssets="all" />
<PackageReference Include="System.Net.Http.Json" Version="6.0.0.*" />
</ItemGroup>

Expand Down
1 change: 0 additions & 1 deletion src/MudBlazor.Docs.Wasm/_Imports.razor
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@
@using MudBlazor.Docs.Wasm
@using MudBlazor.Docs
@using MudBlazor
@using MudBlazor.Events
8 changes: 4 additions & 4 deletions src/MudBlazor.Docs.Wasm/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<meta name="theme-color" content="#ffffff">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700&amp;display=swap" rel="stylesheet">
<link href="_content/MudBlazor/MudBlazor.min.css?v=6.0.17" rel="stylesheet" />
<link href="_content/MudBlazor.Docs/MudBlazorDocs.min.css?v=6.0.17" rel="stylesheet" />
<link href="_content/MudBlazor/MudBlazor.min.css?v=6.0.18" rel="stylesheet" />
<link href="_content/MudBlazor.Docs/MudBlazorDocs.min.css?v=6.0.18" rel="stylesheet" />
</head>

<body>
Expand All @@ -80,8 +80,8 @@
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
<script src="_content/MudBlazor/MudBlazor.min.js?v=6.0.17"></script>
<script src="_content/MudBlazor.Docs/JS/docs.js?v=6.0.17"></script>
<script src="_content/MudBlazor/MudBlazor.min.js?v=6.0.18"></script>
<script src="_content/MudBlazor.Docs/JS/docs.js?v=6.0.18"></script>
<script src="_framework/blazor.webassembly.js"></script>
<script src="_content/Blazor-Analytics/blazor-analytics.js"></script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion src/MudBlazor.Docs.WasmHost/MudBlazor.Docs.WasmHost.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="6.0.9.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="6.0.10.*" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions src/MudBlazor.Docs.WasmHost/Pages/_Host.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
<meta name="theme-color" content="#ffffff">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700&amp;display=swap" rel="stylesheet">
<link href="_content/MudBlazor/MudBlazor.min.css?v=6.0.17" rel="stylesheet" />
<link href="_content/MudBlazor.Docs/MudBlazorDocs.min.css?v=6.0.17" rel="stylesheet" />
<link href="_content/MudBlazor/MudBlazor.min.css?v=6.0.18" rel="stylesheet" />
<link href="_content/MudBlazor.Docs/MudBlazorDocs.min.css?v=6.0.18" rel="stylesheet" />
</head>

<body>
Expand All @@ -91,8 +91,8 @@
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
<script src="_content/MudBlazor/MudBlazor.min.js?v=6.0.17"></script>
<script src="_content/MudBlazor.Docs/JS/docs.js?v=6.0.17"></script>
<script src="_content/MudBlazor/MudBlazor.min.js?v=6.0.18"></script>
<script src="_content/MudBlazor.Docs/JS/docs.js?v=6.0.18"></script>
<script src="_framework/blazor.webassembly.js"></script>
<script src="_content/Blazor-Analytics/blazor-analytics.js"></script>
</body>
Expand Down
20 changes: 0 additions & 20 deletions src/MudBlazor.Docs/Components/EnumSwitch.razor
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,3 @@
}
</MudButtonGroup>
</div>

@code {
private T _value;

[Parameter]
public T Value
{
get => _value;
set
{
if (_value.Equals(value)) return;
_value = value;
ValueChanged.InvokeAsync(value);
}
}

[Parameter] public EventCallback<T> ValueChanged { get; set; }

private Type Type => typeof(T);
}
25 changes: 25 additions & 0 deletions src/MudBlazor.Docs/Components/EnumSwitch.razor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using System;
using Microsoft.AspNetCore.Components;

namespace MudBlazor.Docs.Components;

public partial class EnumSwitch<T>
{
private T _value;

[Parameter]
public T Value
{
get => _value;
set
{
if (_value.Equals(value)) return;
_value = value;
ValueChanged.InvokeAsync(value);
}
}

[Parameter] public EventCallback<T> ValueChanged { get; set; }

private Type Type => typeof(T);
}
15 changes: 11 additions & 4 deletions src/MudBlazor.Docs/Extensions/DocsViewExtension.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Blazored.LocalStorage;
using Blazor.Analytics;
using Blazor.Analytics;
using Blazored.LocalStorage;
using Microsoft.Extensions.DependencyInjection;
using MudBlazor.Docs.Services;
using MudBlazor.Docs.Services.Notifications;
using MudBlazor.Docs.Services.UserPreferences;
using MudBlazor.Services;
using MudBlazor.Examples.Data;
using MudBlazor.Services;

namespace MudBlazor.Docs.Extensions
{
Expand All @@ -16,13 +16,20 @@ public static void TryAddDocsViewServices(this IServiceCollection services)
services.AddMudServices(config =>
{
config.SnackbarConfiguration.PositionClass = Defaults.Classes.Position.BottomLeft;
config.SnackbarConfiguration.PreventDuplicates = false;
config.SnackbarConfiguration.NewestOnTop = false;
config.SnackbarConfiguration.ShowCloseIcon = true;
config.SnackbarConfiguration.VisibleStateDuration = 10000;
config.SnackbarConfiguration.HideTransitionDuration = 500;
config.SnackbarConfiguration.ShowTransitionDuration = 500;
config.SnackbarConfiguration.SnackbarVariant = Variant.Filled;
// we're currently planning on deprecating `PreventDuplicates`, at least to the end dev. however,
// we may end up wanting to instead set it as internal because the docs project relies on it
// to ensure that the Snackbar always allows duplicates. disabling the warning for now because
// the project is set to treat warnings as errors.
#pragma warning disable 0618
config.SnackbarConfiguration.PreventDuplicates = false;
#pragma warning restore 0618
});

services.AddScoped<GitHubApiClient>();
Expand Down
4 changes: 2 additions & 2 deletions src/MudBlazor.Docs/MudBlazor.Docs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@
<ItemGroup>
<PackageReference Include="Blazor-Analytics" Version="3.11.0" />
<PackageReference Include="FluentValidation" Version="11.2.2" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="6.0.9.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.9.*" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="6.0.10.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.10.*" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
<PackageReference Include="Blazored.LocalStorage" Version="4.2.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<DocsPageSection>
<SectionHeader Title="Basic Usage">
<Description>
With pointer events you can controll if a element reacts to pointer events. Try hover over the texts bellow and note the difference.
With pointer events you can control if an element reacts to pointer events. Try hovering over the text below and note the difference.
</Description>
</SectionHeader>
<SectionContent Code="PointerEventsExample" HighLight="pointer-events-auto,pointer-events-none">
Expand All @@ -22,4 +22,4 @@


</DocsPageContent>
</DocsPage>
</DocsPage>
15 changes: 14 additions & 1 deletion src/MudBlazor.Docs/Pages/Components/DataGrid/DataGridPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<DocsPageSection>
<SectionHeader Title="Advanced Data Grid">
<Description>
In a more advanced scenario, the data grid offers sorting, filtering, pagination, selection and hierarchy detail. There are two ways to filter the data
In a more advanced scenario, the data grid offers sorting, filtering, pagination and selection. There are two ways to filter the data
fed into the data grid. A <CodeInline>QuickFilter</CodeInline> function allows filtering the items in the grid globally. Data can also be filtered by specifying
column filters, enabling a more robust filtration.
<br><br>
Expand Down Expand Up @@ -151,6 +151,19 @@
</SectionContent>
</DocsPageSection>

<DocsPageSection>
<SectionHeader Title="Row Detail View">
<Description>
The The <CodeInline>&lt;MudDataGrid></CodeInline> allows you to create hierarchical layouts. To do that the <CodeInline>HierarchyColumn</CodeInline> has to be added in the <CodeInline>Columns</CodeInline> definitions.
<br><br>
You can customize the icon to toggle the RowDetail and also disable the toggle button.
</Description>
</SectionHeader>
<SectionContent DarkenBackground="true" Code="DataGridDetailRowExample" ShowCode="false" Block="true" FullWidth="true">
<DataGridDetailRowExample />
</SectionContent>
</DocsPageSection>

<DocsPageSection>
<SectionHeader Title="Resizing">
<Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="mt-0"></MudTextField>
</ToolBarContent>
<Columns>
<HierarchyColumn T="Element" />
<SelectColumn T="Element" />
<Column T="Element" Field="Number" Title="Nr" Sortable="false" Filterable="false" />
<Column T="Element" Field="Sign" />
Expand All @@ -21,19 +20,6 @@
<Column T="Element" Field="Molar" Title="Molar mass" />
<Column T="Element" Field="Group" Title="Category" />
</Columns>
<ChildRowContent>
<MudCard>
<MudCardHeader>
<CardHeaderContent>
<MudText Typo="Typo.h6">@context.Item.Name</MudText>
</CardHeaderContent>
</MudCardHeader>
<MudCardContent>
<MudText>This element is number @context.Item.Number</MudText>
<MudText>This element has a molar mass of @context.Item.Molar</MudText>
</MudCardContent>
</MudCard>
</ChildRowContent>
<PagerContent>
<MudDataGridPager T="Element" />
</PagerContent>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
@using System.Net.Http.Json
@using MudBlazor.Examples.Data.Models
@namespace MudBlazor.Docs.Examples
@inject HttpClient httpClient

<MudDataGrid Items="@Elements">
<Columns>
<HierarchyColumn T="Element" ButtonDisabledFunc="@(x => x.Sign == "He")" />
<Column T="Element" Field="Number" Title="Nr" />
<Column T="Element" Field="Sign" />
<Column T="Element" Field="Name" />
<Column T="Element" Field="Position" />
<Column T="Element" Field="Molar" Title="Molar mass" />
</Columns>
<ChildRowContent>
<MudCard>
<MudCardHeader>
<CardHeaderContent>
<MudText Typo="Typo.h6">@context.Item.Name</MudText>
</CardHeaderContent>
</MudCardHeader>
<MudCardContent>
<MudText>This element is number @context.Item.Number</MudText>
<MudText>This element has a molar mass of @context.Item.Molar</MudText>
</MudCardContent>
</MudCard>
</ChildRowContent>
<PagerContent>
<MudDataGridPager T="Element" />
</PagerContent>
</MudDataGrid>

@code {
private IEnumerable<Element> Elements = new List<Element>();

protected override async Task OnInitializedAsync()
{
Elements = await httpClient.GetFromJsonAsync<List<Element>>("webapi/periodictable");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</DocsPageSection>

<DocsPageSection>
<SectionHeader Title="Insert Dividers">
<SectionHeader Title="Inset Dividers">
<Description>Adds a margin to the left side of the divider.</Description>
</SectionHeader>
<SectionContent DarkenBackground="true" Code="DividerInsertExample">
Expand Down

0 comments on commit ee80585

Please sign in to comment.