Skip to content

Commit 7fda4df

Browse files
authored
Merge pull request #9659 from bitfoundation/develop
Version 9.3.0 (#9655)
2 parents 261dfba + 7091085 commit 7fda4df

File tree

208 files changed

+1597
-468
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+1597
-468
lines changed

src/Besql/Bit.Besql/wwwroot/bit-besql.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var BitBesql = window.BitBesql || {};
2-
BitBesql.version = window['bit-besql version'] = '9.2.1';
2+
BitBesql.version = window['bit-besql version'] = '9.3.0';
33

44
BitBesql.init = async function init(fileName) {
55
const sqliteFilePath = `/${fileName}`;

src/Bit.Build.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<PackageProjectUrl>https://github.com/bitfoundation/bitplatform</PackageProjectUrl>
2828

2929
<!-- Version -->
30-
<ReleaseVersion>9.2.1</ReleaseVersion>
30+
<ReleaseVersion>9.3.0</ReleaseVersion>
3131
<PackageVersion>$(ReleaseVersion)</PackageVersion>
3232
<PackageReleaseNotes>https://github.com/bitfoundation/bitplatform/releases/tag/v-$(ReleaseVersion)</PackageReleaseNotes>
3333
<Version Condition=" '$(Configuration)' == 'Release' ">$([System.String]::Copy($(ReleaseVersion)).Replace('-pre-', '.'))</Version>

src/BlazorUI/Bit.BlazorUI.Extras/Components/AppShell/BitAppShell.razor.cs

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
namespace Bit.BlazorUI;
22

3+
/// <summary>
4+
/// BitAppShell is an advanced container to handle the nuances of a cross-platform layout.
5+
/// </summary>
36
public partial class BitAppShell : BitComponentBase
47
{
58
private ElementReference _containerRef = default!;

src/BlazorUI/Bit.BlazorUI.Extras/Components/Chart/BitChart.razor.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Bit.BlazorUI;
66

77
/// <summary>
8-
/// Represents a Chart.js chart.
8+
/// Simple and flexible charting component for data visualization, which supports eight chart types: bar, line, area, pie, bubble, radar, polar, and scatter.
99
/// </summary>
1010
public partial class BitChart : IAsyncDisposable
1111
{

src/BlazorUI/Bit.BlazorUI.Extras/Components/DataGrid/BitDataGrid.razor.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
namespace Bit.BlazorUI;
22

33
/// <summary>
4-
/// A component that displays a grid.
4+
/// BitDataGrid is a robust way to display an information-rich collection of items, and allow people to sort, and filter the content.
55
/// </summary>
66
/// <typeparam name="TGridItem">The type of data represented by each row in the grid.</typeparam>
77
[CascadingTypeParameter(nameof(TGridItem))]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
@namespace Bit.BlazorUI
2+
@inherits ErrorBoundaryBase
3+
4+
@if (CurrentException is null)
5+
{
6+
@(Body ?? ChildContent)
7+
}
8+
else if (ErrorContent is not null)
9+
{
10+
@ErrorContent(CurrentException)
11+
}
12+
else
13+
{
14+
<div class="bit-erb">
15+
<svg width="64" height="64" viewBox="0 0 64 64" fill="none">
16+
<path d="M30.268 3C31.0378 1.66666 32.9622 1.66667 33.7321 3L57.9808 45C58.7506 46.3333 57.7883 48 56.2487 48H7.75129C6.21169 48 5.24944 46.3333 6.01924 45L30.268 3Z" fill="#FFDAD4" />
17+
<path d="M29.0025 24C29.0025 22.8954 29.8979 22 31.0025 22H32C33.1046 22 34 22.8954 34 24V32.5C34 33.6046 33.1046 34.5 32 34.5H31.0025C29.8979 34.5 29.0025 33.6046 29.0025 32.5V24ZM29 39C29 37.8954 29.8954 37 31 37H31.9975C33.1021 37 33.9975 37.8954 33.9975 39V40C33.9975 41.1046 33.1021 42 31.9975 42H31C29.8954 42 29 41.1046 29 40V39Z" fill="#A4262C" />
18+
</svg>
19+
20+
<BitText Color="BitColor.Error" Typography="BitTypography.H3">
21+
@(Title ?? "Oops, Something went wrong...")
22+
</BitText>
23+
24+
@if (ShowException)
25+
{
26+
<div class="bit-erb-exp">
27+
@CurrentException?.ToString()
28+
</div>
29+
}
30+
31+
@if (Footer is not null)
32+
{
33+
@Footer
34+
}
35+
else
36+
{
37+
<div class="bit-erb-ftr">
38+
<BitButton OnClick="Refresh">@(RefreshText ?? "Refresh")</BitButton>
39+
<BitButton OnClick="GoHome" Variant="BitVariant.Outline">@(HomeText ?? "Home")</BitButton>
40+
<BitButton OnClick="Recover" Variant="BitVariant.Outline">@(RecoverText ?? "Recover")</BitButton>
41+
@if (AdditionalButtons is not null)
42+
{
43+
@AdditionalButtons
44+
}
45+
</div>
46+
}
47+
</div>
48+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
namespace Bit.BlazorUI;
2+
3+
/// <summary>
4+
/// BitErrorBoundary is a simple error boundary to handle exceptions happening in its children.
5+
/// </summary>
6+
public partial class BitErrorBoundary : ErrorBoundaryBase
7+
{
8+
[Inject] private NavigationManager _navigationManager { get; set; } = default!;
9+
10+
11+
12+
/// <summary>
13+
/// The footer content of the boundary.
14+
/// </summary>
15+
[Parameter] public RenderFragment? AdditionalButtons { get; set; }
16+
17+
/// <summary>
18+
/// Alias of the ChildContent.
19+
/// </summary>
20+
[Parameter] public RenderFragment? Body { get; set; }
21+
22+
/// <summary>
23+
/// The footer content of the boundary.
24+
/// </summary>
25+
[Parameter] public RenderFragment? Footer { get; set; }
26+
27+
/// <summary>
28+
/// The text of the Home button.
29+
/// </summary>
30+
[Parameter] public string? HomeText { get; set; }
31+
32+
/// <summary>
33+
/// The url of the home page for the Home button.
34+
/// </summary>
35+
[Parameter] public string? HomeUrl { get; set; }
36+
37+
/// <summary>
38+
/// The callback for when an error get caught by the boundary.
39+
/// </summary>
40+
[Parameter] public EventCallback<Exception> OnError { get; set; }
41+
42+
/// <summary>
43+
/// The text of the Recover button.
44+
/// </summary>
45+
[Parameter] public string? RecoverText { get; set; }
46+
47+
/// <summary>
48+
/// The text of the Refresh button.
49+
/// </summary>
50+
[Parameter] public string? RefreshText { get; set; }
51+
52+
/// <summary>
53+
/// Whether the actual exception information should be shown or not.
54+
/// </summary>
55+
[Parameter] public bool ShowException { get; set; }
56+
57+
/// <summary>
58+
/// The header title of the boundary.
59+
/// </summary>
60+
[Parameter] public string? Title { get; set; }
61+
62+
63+
64+
protected override async Task OnErrorAsync(Exception exception)
65+
{
66+
await OnError.InvokeAsync(exception);
67+
}
68+
69+
70+
71+
private void Refresh()
72+
{
73+
_navigationManager.Refresh(forceReload: true);
74+
}
75+
76+
private void GoHome()
77+
{
78+
_navigationManager.NavigateTo(HomeUrl ?? "/", forceLoad: true);
79+
}
80+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
@import '../../../Bit.BlazorUI/Styles/functions.scss';
2+
3+
.bit-erb {
4+
width: 100%;
5+
height: 100%;
6+
display: flex;
7+
gap: spacing(2);
8+
align-items: center;
9+
box-sizing: border-box;
10+
flex-direction: column;
11+
justify-content: center;
12+
background-color: $clr-bg-pri;
13+
}
14+
15+
.bit-erb-exp {
16+
width: 90%;
17+
overflow: auto;
18+
white-space: pre;
19+
text-align: start;
20+
margin: spacing(3);
21+
}
22+
23+
.bit-erb-ftr {
24+
width: 100%;
25+
display: flex;
26+
gap: spacing(2);
27+
align-items: center;
28+
box-sizing: border-box;
29+
justify-content: center;
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
@namespace Bit.BlazorUI
2+
3+
<div style="@Styles?.Root" class="bit-msb @Classes?.Root">
4+
<div style="@Styles?.Container" class="bit-msb-con @Classes?.Container">
5+
<div style="@Styles?.Header" class="bit-msb-hdr @Classes?.Header">
6+
<BitText Typography="BitTypography.H5"
7+
Color="BitColor.Tertiary"
8+
Style="@(Styles?.Title)"
9+
Class="@(Classes?.Title)">
10+
@Title
11+
</BitText>
12+
13+
<BitSpacer Style="@(Styles?.Spacer)" Class="@(Classes?.Spacer)" />
14+
15+
<BitButton OnClick="CloseModal"
16+
IconName="ChromeClose"
17+
Color="BitColor.Tertiary"
18+
Variant="BitVariant.Text"
19+
Styles="@Styles?.CloseButton"
20+
Classes="@Classes?.CloseButton" />
21+
</div>
22+
23+
<div style="@Styles?.Body" class="bit-msb-bdy @Classes?.Body">
24+
@Body
25+
</div>
26+
27+
<div style="@Styles?.Footer" class="bit-msb-ftr @Classes?.Footer">
28+
<BitButton OnClick="OnOkClick"
29+
Color="BitColor.Tertiary"
30+
Styles="@Styles?.OkButton"
31+
Classes="@Classes?.OkButton">
32+
@(OkText ?? "Ok")
33+
</BitButton>
34+
</div>
35+
</div>
36+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
using System.Reflection.Metadata;
2+
3+
namespace Bit.BlazorUI;
4+
5+
/// <summary>
6+
/// BitMessageBox is a pre-implemented box for showing messages with title and body.
7+
/// </summary>
8+
public partial class BitMessageBox
9+
{
10+
/// <summary>
11+
/// The body of the message box.
12+
/// </summary>
13+
[Parameter] public string? Body { get; set; }
14+
15+
/// <summary>
16+
/// Custom CSS classes for different parts of the message box.
17+
/// </summary>
18+
[Parameter] public BitMessageBoxClassStyles? Classes { get; set; }
19+
20+
/// <summary>
21+
/// The text of the Ok button.
22+
/// </summary>
23+
[Parameter] public string? OkText { get; set; }
24+
25+
/// <summary>
26+
/// The event callback for closing the message box.
27+
/// </summary>
28+
[Parameter] public EventCallback OnClose { get; set; }
29+
30+
/// <summary>
31+
/// Custom CSS styles for different parts of the message box.
32+
/// </summary>
33+
[Parameter] public BitMessageBoxClassStyles? Styles { get; set; }
34+
35+
/// <summary>
36+
/// The title of the message box.
37+
/// </summary>
38+
[Parameter] public string? Title { get; set; }
39+
40+
41+
42+
private async Task CloseModal()
43+
{
44+
await OnClose.InvokeAsync();
45+
}
46+
47+
private async Task OnOkClick()
48+
{
49+
await OnClose.InvokeAsync();
50+
}
51+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
@import "../../Styles/extra-variables.scss";
2+
@import "../../../Bit.BlazorUI/Styles/functions.scss";
3+
@import "../../../Bit.BlazorUI/Styles/media-queries.scss";
4+
5+
.bit-msb {
6+
padding: spacing(2);
7+
min-width: spacing(40);
8+
max-height: $bit-env-height-available;
9+
10+
@include lt-md {
11+
min-width: unset;
12+
}
13+
}
14+
15+
.bit-msb-con {
16+
width: 100%;
17+
height: 100%;
18+
display: flex;
19+
gap: spacing(2);
20+
box-sizing: border-box;
21+
flex-direction: column;
22+
align-items: flex-start;
23+
justify-content: flex-start;
24+
max-height: calc(#{$bit-env-height-available} - #{spacing(6)});
25+
}
26+
27+
.bit-msb-hdr {
28+
width: 100%;
29+
display: flex;
30+
gap: spacing(2);
31+
flex-direction: row;
32+
box-sizing: border-box;
33+
align-items: flex-start;
34+
justify-content: flex-start;
35+
}
36+
37+
.bit-msb-bdy {
38+
width: 100%;
39+
flex-grow: 1;
40+
display: flex;
41+
overflow: auto;
42+
color: $clr-ter;
43+
line-height: 1.5;
44+
white-space: pre;
45+
font-weight: 400;
46+
font-size: spacing(2);
47+
letter-spacing: 0.01em;
48+
}
49+
50+
.bit-msb-ftr {
51+
width: 100%;
52+
display: flex;
53+
gap: spacing(2);
54+
align-items: center;
55+
box-sizing: border-box;
56+
flex-direction: column;
57+
justify-content: center;
58+
}

0 commit comments

Comments
 (0)