Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .github/workflows/bit.full.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,14 @@ jobs:
dotnet build src/BlazorUI/Bit.BlazorUI.Extras/Bit.BlazorUI.Extras.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
dotnet pack src/BlazorUI/Bit.BlazorUI.Extras/Bit.BlazorUI.Extras.csproj --output ./packages --configuration Release

- name: Generate CSS/JS files BlazorUI.Legacy
run: dotnet build src/BlazorUI/Bit.BlazorUI.Legacy/Bit.BlazorUI.Legacy.csproj -t:BeforeBuildTasks --no-restore -f:net10.0 -c Release

- name: Build and pack BlazorUI.Legacy
run: |
dotnet build src/BlazorUI/Bit.BlazorUI.Legacy/Bit.BlazorUI.Legacy.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
dotnet pack src/BlazorUI/Bit.BlazorUI.Legacy/Bit.BlazorUI.Legacy.csproj --output ./packages --configuration Release

- name: Generate CSS/JS files BlazorUI.Assets
run: dotnet build src/BlazorUI/Bit.BlazorUI.Assets/Bit.BlazorUI.Assets.csproj -t:BeforeBuildTasks --no-restore -f:net10.0 -c Release

Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/nuget.org.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ jobs:
- name: dotnet pack BlazorUI.Extras
run: dotnet pack src/BlazorUI/Bit.BlazorUI.Extras/Bit.BlazorUI.Extras.csproj --output . --configuration Release

- name: Generate CSS/JS files BlazorUI.Legacy
run: dotnet build src/BlazorUI/Bit.BlazorUI.Legacy/Bit.BlazorUI.Legacy.csproj -t:BeforeBuildTasks --no-restore -f:net10.0 -c Release
- name: dotnet build BlazorUI.Legacy
run: dotnet build src/BlazorUI/Bit.BlazorUI.Legacy/Bit.BlazorUI.Legacy.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
- name: dotnet pack BlazorUI.Legacy
run: dotnet pack src/BlazorUI/Bit.BlazorUI.Legacy/Bit.BlazorUI.Legacy.csproj --output . --configuration Release

- name: Generate CSS/JS files BlazorUI.Assets
run: dotnet build src/BlazorUI/Bit.BlazorUI.Assets/Bit.BlazorUI.Assets.csproj -t:BeforeBuildTasks --no-restore -f:net10.0 -c Release
- name: dotnet build BlazorUI.Assets
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/prerelease.nuget.org.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ jobs:
- name: dotnet pack BlazorUI.Extras
run: dotnet pack src/BlazorUI/Bit.BlazorUI.Extras/Bit.BlazorUI.Extras.csproj --output . --configuration Release

- name: Generate CSS/JS files BlazorUI.Legacy
run: dotnet build src/BlazorUI/Bit.BlazorUI.Legacy/Bit.BlazorUI.Legacy.csproj -t:BeforeBuildTasks --no-restore -f:net10.0 -c Release
- name: dotnet build BlazorUI.Legacy
run: dotnet build src/BlazorUI/Bit.BlazorUI.Legacy/Bit.BlazorUI.Legacy.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
- name: dotnet pack BlazorUI.Legacy
run: dotnet pack src/BlazorUI/Bit.BlazorUI.Legacy/Bit.BlazorUI.Legacy.csproj --output . --configuration Release

- name: Generate CSS/JS files BlazorUI.Assets
run: dotnet build src/BlazorUI/Bit.BlazorUI.Assets/Bit.BlazorUI.Assets.csproj -t:BeforeBuildTasks --no-restore -f:net10.0 -c Release
- name: dotnet build BlazorUI.Assets
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,12 @@ _book
!/src/BlazorUI/Bit.BlazorUI.Extras/wwwroot/quilljs/*.css
!/src/BlazorUI/Bit.BlazorUI.Extras/wwwroot/leaflet/*.css

/src/BlazorUI/Bit.BlazorUI.Legacy/**/*.css
/src/BlazorUI/Bit.BlazorUI.Legacy/Scripts/*.js
/src/BlazorUI/Bit.BlazorUI.Legacy/wwwroot/scripts/*.js
/src/BlazorUI/Bit.BlazorUI.Legacy/wwwroot/**/*.css.gz
!/src/BlazorUI/Bit.BlazorUI.Legacy/wwwroot/quilljs/*.css

/src/BlazorUI/Bit.BlazorUI.Assets/**/*.css
/src/BlazorUI/Bit.BlazorUI.Assets/wwwroot/scripts/*.js
/src/BlazorUI/Bit.BlazorUI.Assets/wwwroot/**/*.css.gz
Expand Down
87 changes: 87 additions & 0 deletions src/BlazorUI/Bit.BlazorUI.Legacy/Bit.BlazorUI.Legacy.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<Import Project="../../Bit.Build.props" />

<PropertyGroup>
<TargetFrameworks>net10.0;net9.0;net8.0</TargetFrameworks>
<IsTrimmable>true</IsTrimmable>
<ImplicitUsings>enable</ImplicitUsings>
<ResolveStaticWebAssetsInputsDependsOn Condition="'$(TargetFramework)' == 'net10.0'">
BeforeBuildTasks;
$(ResolveStaticWebAssetsInputsDependsOn)
</ResolveStaticWebAssetsInputsDependsOn>
</PropertyGroup>

<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>

<ItemGroup>
<PackageReference Condition="'$(TargetFramework)' == 'net8.0'" Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0" />
<PackageReference Condition="'$(TargetFramework)' == 'net9.0'" Include="Microsoft.AspNetCore.Components.Web" Version="9.0.0" />
<PackageReference Condition="'$(TargetFramework)' == 'net10.0'" Include="Microsoft.AspNetCore.Components.Web" Version="10.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" PrivateAssets="all" />
<PackageReference Include="Jint" Version="4.10.0" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<Content Remove="compilerconfig.json" />
<None Include="compilerconfig.json" />
<Watch Remove="*.scss" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Bit.BlazorUI\Bit.BlazorUI.csproj" />
<ProjectReference Include="..\Bit.BlazorUI.SourceGenerators\Bit.BlazorUI.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>

<ItemGroup>
<Content Remove="tsconfig.json" />
<None Include="tsconfig.json" />
</ItemGroup>

<ItemGroup>
<Using Include="Microsoft.AspNetCore.Components" />
<Using Include="Microsoft.AspNetCore.Components.Web" />
<Using Include="Microsoft.AspNetCore.Components.Rendering" />
<Using Include="Microsoft.AspNetCore.Components.Web.Virtualization" />
<Using Include="Microsoft.JSInterop" />
<Using Include="Bit.BlazorUI" />
</ItemGroup>

<ItemGroup>
<TypeScriptFiles Include="**\*.ts" />
<ScssFiles Include="**\*.scss" />
</ItemGroup>

<Target Name="BeforeBuildTasks" AfterTargets="CoreCompile" Condition="'$(TargetFramework)' == 'net10.0'">
<CallTarget Targets="InstallNodejsDependencies" />
<CallTarget Targets="BuildJavaScript" />
<CallTarget Targets="BuildCss" />
</Target>

<Target Name="InstallNodejsDependencies" Inputs="package.json" Outputs="node_modules\.package-lock.json">
<Exec Command="npm install" StandardOutputImportance="high" StandardErrorImportance="high" />
</Target>

<Target Name="BuildJavaScript" Inputs="@(TypeScriptFiles)" Outputs="wwwroot/scripts/bit.blazorui.legacy.js">
<Exec Command="node_modules/.bin/tsc" StandardOutputImportance="high" StandardErrorImportance="high" />
<Exec Condition=" '$(Configuration)' == 'Release' " Command="node_modules/.bin/esbuild wwwroot/scripts/bit.blazorui.legacy.js --minify --outfile=wwwroot/scripts/bit.blazorui.legacy.js --allow-overwrite" StandardOutputImportance="high" StandardErrorImportance="high" />
</Target>

<Target Name="BuildCss" Inputs="@(ScssFiles)" Outputs="wwwroot/styles/bit.blazorui.legacy.css">
<Exec Command="node_modules/.bin/sass Styles/bit.blazorui.legacy.scss:wwwroot/styles/bit.blazorui.legacy.css --style compressed --load-path=. --silence-deprecation=import" StandardOutputImportance="high" StandardErrorImportance="high" LogStandardErrorAsError="true" />
</Target>

<ItemGroup>
<Content Remove="package*.json" />
<Content Remove="tsconfig.json" />
<None Include="package*json" />
<None Include="tsconfig.json" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
namespace Bit.BlazorUI.Legacy;

/// <summary>
/// Extended version of <see cref="BitChartCategoryAxis"/> for use in a bar chart.
/// <para>As per documentation <a href="https://www.chartjs.org/docs/latest/charts/bar.html#scale-configuration">here (Chart.js)</a>.</para>
/// </summary>
public class BitChartBarCategoryAxis : BitChartCategoryAxis
{
/// <summary>
/// Gets or sets the percentage (0-1) of the available width each bar should be within the category width.
/// 1.0 will take the whole category width and put the bars right next to each other.
/// </summary>
public double? BarPercentage { get; set; }

/// <summary>
/// Gets or sets the percentage (0-1) of the available width each category should be within the sample width.
/// </summary>
public double? CategoryPercentage { get; set; }

/// <summary>
/// Gets or sets the width of each bar in pixels.
/// If set to <see cref="BitChartBarThickness.Flex"/>, it computes "optimal" sample widths that globally arrange bars side by side. If not set (default), bars are equally sized based on the smallest interval.
/// </summary>
public BitChartBarThickness BarThickness { get; set; } = default!;

/// <summary>
/// Gets or sets the maximum bar thickness.
/// Set this to ensure that bars are not sized thicker than this.
/// </summary>
public double? MaxBarThickness { get; set; }

/// <summary>
/// Gets or sets the minimum bar length.
/// Set this to ensure that bars have a minimum length in pixels.
/// </summary>
public double? MinBarLength { get; set; }

/// <summary>
/// Gets or sets a value indicating whether grid lines will be shifted to be between labels or not.
/// If <see langword="true"/>, the bars for a particular data point fall between the grid lines.
/// The grid line will move to the left by one half of the tick interval.
/// If <see langword="false"/>, the grid line will go right down the middle of the bars.
/// <para>Changing this value will directly affect <see cref="BitChartGridLines.OffsetGridLines"/> of the property <see cref="BitChartCartesianAxis.GridLines"/> in this instance.</para>
/// </summary>
public bool? OffsetGridLines
{
get => GridLines?.OffsetGridLines;
set
{
if (GridLines == null)
{
if (value == null)
{
return;
}
else
{
GridLines = new BitChartGridLines();
}
}

GridLines.OffsetGridLines = value;
}
}

/// <summary>
/// Gets or sets a value indicating whether the bar chart is stacked or not.
/// Bar charts can be configured into stacked bar charts by changing the settings on the X and Y axes to enable stacking.
/// Stacked bar charts can be used to show how one data series is made up of a number of smaller pieces.
/// <para>As per documentation <a href="https://www.chartjs.org/docs/latest/charts/bar.html#stacked-bar-chart">here (Chart.js)</a>.</para>
/// </summary>
public bool? Stacked { get; set; }
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
namespace Bit.BlazorUI.Legacy;

/// <summary>
/// Extended version of <see cref="BitChartLinearCartesianAxis"/> for use in a bar chart.
/// <para>As per documentation <a href="https://www.chartjs.org/docs/latest/charts/bar.html#scale-configuration">here (Chart.js)</a>.</para>
/// </summary>
public class BitChartBarLinearCartesianAxis : BitChartLinearCartesianAxis
{
/// <summary>
/// Gets or sets the percentage (0-1) of the available width each bar should be within the category width.
/// 1.0 will take the whole category width and put the bars right next to each other.
/// </summary>
public double? BarPercentage { get; set; }

/// <summary>
/// Gets or sets the percentage (0-1) of the available width each category should be within the sample width.
/// </summary>
public double? CategoryPercentage { get; set; }

/// <summary>
/// Gets or sets the width of each bar in pixels.
/// If set to <see cref="BitChartBarThickness.Flex"/>, it computes "optimal" sample widths that globally arrange bars side by side. If not set (default), bars are equally sized based on the smallest interval.
/// </summary>
public BitChartBarThickness BarThickness { get; set; } = default!;

/// <summary>
/// Gets or sets the maximum bar thickness.
/// Set this to ensure that bars are not sized thicker than this.
/// </summary>
public double? MaxBarThickness { get; set; }

/// <summary>
/// Gets or sets the minimum bar length.
/// Set this to ensure that bars have a minimum length in pixels.
/// </summary>
public double? MinBarLength { get; set; }

/// <summary>
/// Gets or sets a value indicating whether grid lines will be shifted to be between labels or not.
/// If <see langword="true"/>, the bars for a particular data point fall between the grid lines.
/// The grid line will move to the left by one half of the tick interval.
/// If <see langword="false"/>, the grid line will go right down the middle of the bars.
/// <para>Changing this value will directly affect <see cref="BitChartGridLines.OffsetGridLines"/> of the property <see cref="BitChartCartesianAxis.GridLines"/> in this instance.</para>
/// </summary>
public bool? OffsetGridLines
{
get => GridLines?.OffsetGridLines;
set
{
if (GridLines == null)
{
if (value == null)
{
return;
}
else
{
GridLines = new BitChartGridLines();
}
}

GridLines.OffsetGridLines = value;
}
}

/// <summary>
/// Gets or sets a value indicating whether the bar chart is stacked or not.
/// Bar charts can be configured into stacked bar charts by changing the settings on the X and Y axes to enable stacking.
/// Stacked bar charts can be used to show how one data series is made up of a number of smaller pieces.
/// <para>As per documentation <a href="https://www.chartjs.org/docs/latest/charts/bar.html#stacked-bar-chart">here (Chart.js)</a>.</para>
/// </summary>
public bool? Stacked { get; set; }
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
namespace Bit.BlazorUI.Legacy;

/// <summary>
/// Extended version of <see cref="BitChartLogarithmicAxis"/> for use in a bar chart.
/// <para>As per documentation <a href="https://www.chartjs.org/docs/latest/charts/bar.html#scale-configuration">here (Chart.js)</a>.</para>
/// </summary>
public class BitChartBarLogarithmicAxis : BitChartLogarithmicAxis
{
/// <summary>
/// Gets or sets the percentage (0-1) of the available width each bar should be within the category width.
/// 1.0 will take the whole category width and put the bars right next to each other.
/// </summary>
public double? BarPercentage { get; set; }

/// <summary>
/// Gets or sets the percentage (0-1) of the available width each category should be within the sample width.
/// </summary>
public double? CategoryPercentage { get; set; }

/// <summary>
/// Gets or sets the width of each bar in pixels.
/// If set to <see cref="BitChartBarThickness.Flex"/>, it computes "optimal" sample widths that globally arrange bars side by side. If not set (default), bars are equally sized based on the smallest interval.
/// </summary>
public BitChartBarThickness BarThickness { get; set; } = default!;

/// <summary>
/// Gets or sets the maximum bar thickness.
/// Set this to ensure that bars are not sized thicker than this.
/// </summary>
public double? MaxBarThickness { get; set; }

/// <summary>
/// Gets or sets the minimum bar length.
/// Set this to ensure that bars have a minimum length in pixels.
/// </summary>
public double? MinBarLength { get; set; }

/// <summary>
/// Gets or sets a value indicating whether grid lines will be shifted to be between labels or not.
/// If <see langword="true"/>, the bars for a particular data point fall between the grid lines.
/// The grid line will move to the left by one half of the tick interval.
/// If <see langword="false"/>, the grid line will go right down the middle of the bars.
/// <para>Changing this value will directly affect <see cref="BitChartGridLines.OffsetGridLines"/> of the property <see cref="BitChartCartesianAxis.GridLines"/> in this instance.</para>
/// </summary>
public bool? OffsetGridLines
{
get => GridLines?.OffsetGridLines;
set
{
if (GridLines == null)
{
if (value == null)
{
return;
}
else
{
GridLines = new BitChartGridLines();
}
}

GridLines.OffsetGridLines = value;
}
}

/// <summary>
/// Gets or sets a value indicating whether the bar chart is stacked or not.
/// Bar charts can be configured into stacked bar charts by changing the settings on the X and Y axes to enable stacking.
/// Stacked bar charts can be used to show how one data series is made up of a number of smaller pieces.
/// <para>As per documentation <a href="https://www.chartjs.org/docs/latest/charts/bar.html#stacked-bar-chart">here (Chart.js)</a>.</para>
/// </summary>
public bool? Stacked { get; set; }
}

Loading
Loading