Skip to content

Commit

Permalink
Merge pull request #9659 from bitfoundation/develop
Browse files Browse the repository at this point in the history
Version 9.3.0 (#9655)
  • Loading branch information
msynk authored Jan 11, 2025
2 parents 261dfba + 7091085 commit 7fda4df
Show file tree
Hide file tree
Showing 208 changed files with 1,597 additions and 468 deletions.
2 changes: 1 addition & 1 deletion src/Besql/Bit.Besql/wwwroot/bit-besql.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var BitBesql = window.BitBesql || {};
BitBesql.version = window['bit-besql version'] = '9.2.1';
BitBesql.version = window['bit-besql version'] = '9.3.0';

BitBesql.init = async function init(fileName) {
const sqliteFilePath = `/${fileName}`;
Expand Down
2 changes: 1 addition & 1 deletion src/Bit.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<PackageProjectUrl>https://github.com/bitfoundation/bitplatform</PackageProjectUrl>

<!-- Version -->
<ReleaseVersion>9.2.1</ReleaseVersion>
<ReleaseVersion>9.3.0</ReleaseVersion>
<PackageVersion>$(ReleaseVersion)</PackageVersion>
<PackageReleaseNotes>https://github.com/bitfoundation/bitplatform/releases/tag/v-$(ReleaseVersion)</PackageReleaseNotes>
<Version Condition=" '$(Configuration)' == 'Release' ">$([System.String]::Copy($(ReleaseVersion)).Replace('-pre-', '.'))</Version>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace Bit.BlazorUI;

/// <summary>
/// BitAppShell is an advanced container to handle the nuances of a cross-platform layout.
/// </summary>
public partial class BitAppShell : BitComponentBase
{
private ElementReference _containerRef = default!;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Bit.BlazorUI;

/// <summary>
/// Represents a Chart.js chart.
/// Simple and flexible charting component for data visualization, which supports eight chart types: bar, line, area, pie, bubble, radar, polar, and scatter.
/// </summary>
public partial class BitChart : IAsyncDisposable
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace Bit.BlazorUI;

/// <summary>
/// A component that displays a grid.
/// BitDataGrid is a robust way to display an information-rich collection of items, and allow people to sort, and filter the content.
/// </summary>
/// <typeparam name="TGridItem">The type of data represented by each row in the grid.</typeparam>
[CascadingTypeParameter(nameof(TGridItem))]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
@namespace Bit.BlazorUI
@inherits ErrorBoundaryBase

@if (CurrentException is null)
{
@(Body ?? ChildContent)
}
else if (ErrorContent is not null)
{
@ErrorContent(CurrentException)
}
else
{
<div class="bit-erb">
<svg width="64" height="64" viewBox="0 0 64 64" fill="none">
<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" />
<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" />
</svg>

<BitText Color="BitColor.Error" Typography="BitTypography.H3">
@(Title ?? "Oops, Something went wrong...")
</BitText>

@if (ShowException)
{
<div class="bit-erb-exp">
@CurrentException?.ToString()
</div>
}

@if (Footer is not null)
{
@Footer
}
else
{
<div class="bit-erb-ftr">
<BitButton OnClick="Refresh">@(RefreshText ?? "Refresh")</BitButton>
<BitButton OnClick="GoHome" Variant="BitVariant.Outline">@(HomeText ?? "Home")</BitButton>
<BitButton OnClick="Recover" Variant="BitVariant.Outline">@(RecoverText ?? "Recover")</BitButton>
@if (AdditionalButtons is not null)
{
@AdditionalButtons
}
</div>
}
</div>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
namespace Bit.BlazorUI;

/// <summary>
/// BitErrorBoundary is a simple error boundary to handle exceptions happening in its children.
/// </summary>
public partial class BitErrorBoundary : ErrorBoundaryBase
{
[Inject] private NavigationManager _navigationManager { get; set; } = default!;



/// <summary>
/// The footer content of the boundary.
/// </summary>
[Parameter] public RenderFragment? AdditionalButtons { get; set; }

/// <summary>
/// Alias of the ChildContent.
/// </summary>
[Parameter] public RenderFragment? Body { get; set; }

/// <summary>
/// The footer content of the boundary.
/// </summary>
[Parameter] public RenderFragment? Footer { get; set; }

/// <summary>
/// The text of the Home button.
/// </summary>
[Parameter] public string? HomeText { get; set; }

/// <summary>
/// The url of the home page for the Home button.
/// </summary>
[Parameter] public string? HomeUrl { get; set; }

/// <summary>
/// The callback for when an error get caught by the boundary.
/// </summary>
[Parameter] public EventCallback<Exception> OnError { get; set; }

/// <summary>
/// The text of the Recover button.
/// </summary>
[Parameter] public string? RecoverText { get; set; }

/// <summary>
/// The text of the Refresh button.
/// </summary>
[Parameter] public string? RefreshText { get; set; }

/// <summary>
/// Whether the actual exception information should be shown or not.
/// </summary>
[Parameter] public bool ShowException { get; set; }

/// <summary>
/// The header title of the boundary.
/// </summary>
[Parameter] public string? Title { get; set; }



protected override async Task OnErrorAsync(Exception exception)
{
await OnError.InvokeAsync(exception);
}



private void Refresh()
{
_navigationManager.Refresh(forceReload: true);
}

private void GoHome()
{
_navigationManager.NavigateTo(HomeUrl ?? "/", forceLoad: true);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
@import '../../../Bit.BlazorUI/Styles/functions.scss';

.bit-erb {
width: 100%;
height: 100%;
display: flex;
gap: spacing(2);
align-items: center;
box-sizing: border-box;
flex-direction: column;
justify-content: center;
background-color: $clr-bg-pri;
}

.bit-erb-exp {
width: 90%;
overflow: auto;
white-space: pre;
text-align: start;
margin: spacing(3);
}

.bit-erb-ftr {
width: 100%;
display: flex;
gap: spacing(2);
align-items: center;
box-sizing: border-box;
justify-content: center;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
@namespace Bit.BlazorUI

<div style="@Styles?.Root" class="bit-msb @Classes?.Root">
<div style="@Styles?.Container" class="bit-msb-con @Classes?.Container">
<div style="@Styles?.Header" class="bit-msb-hdr @Classes?.Header">
<BitText Typography="BitTypography.H5"
Color="BitColor.Tertiary"
Style="@(Styles?.Title)"
Class="@(Classes?.Title)">
@Title
</BitText>

<BitSpacer Style="@(Styles?.Spacer)" Class="@(Classes?.Spacer)" />

<BitButton OnClick="CloseModal"
IconName="ChromeClose"
Color="BitColor.Tertiary"
Variant="BitVariant.Text"
Styles="@Styles?.CloseButton"
Classes="@Classes?.CloseButton" />
</div>

<div style="@Styles?.Body" class="bit-msb-bdy @Classes?.Body">
@Body
</div>

<div style="@Styles?.Footer" class="bit-msb-ftr @Classes?.Footer">
<BitButton OnClick="OnOkClick"
Color="BitColor.Tertiary"
Styles="@Styles?.OkButton"
Classes="@Classes?.OkButton">
@(OkText ?? "Ok")
</BitButton>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
using System.Reflection.Metadata;

namespace Bit.BlazorUI;

/// <summary>
/// BitMessageBox is a pre-implemented box for showing messages with title and body.
/// </summary>
public partial class BitMessageBox
{
/// <summary>
/// The body of the message box.
/// </summary>
[Parameter] public string? Body { get; set; }

/// <summary>
/// Custom CSS classes for different parts of the message box.
/// </summary>
[Parameter] public BitMessageBoxClassStyles? Classes { get; set; }

/// <summary>
/// The text of the Ok button.
/// </summary>
[Parameter] public string? OkText { get; set; }

/// <summary>
/// The event callback for closing the message box.
/// </summary>
[Parameter] public EventCallback OnClose { get; set; }

/// <summary>
/// Custom CSS styles for different parts of the message box.
/// </summary>
[Parameter] public BitMessageBoxClassStyles? Styles { get; set; }

/// <summary>
/// The title of the message box.
/// </summary>
[Parameter] public string? Title { get; set; }



private async Task CloseModal()
{
await OnClose.InvokeAsync();
}

private async Task OnOkClick()
{
await OnClose.InvokeAsync();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
@import "../../Styles/extra-variables.scss";
@import "../../../Bit.BlazorUI/Styles/functions.scss";
@import "../../../Bit.BlazorUI/Styles/media-queries.scss";

.bit-msb {
padding: spacing(2);
min-width: spacing(40);
max-height: $bit-env-height-available;

@include lt-md {
min-width: unset;
}
}

.bit-msb-con {
width: 100%;
height: 100%;
display: flex;
gap: spacing(2);
box-sizing: border-box;
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;
max-height: calc(#{$bit-env-height-available} - #{spacing(6)});
}

.bit-msb-hdr {
width: 100%;
display: flex;
gap: spacing(2);
flex-direction: row;
box-sizing: border-box;
align-items: flex-start;
justify-content: flex-start;
}

.bit-msb-bdy {
width: 100%;
flex-grow: 1;
display: flex;
overflow: auto;
color: $clr-ter;
line-height: 1.5;
white-space: pre;
font-weight: 400;
font-size: spacing(2);
letter-spacing: 0.01em;
}

.bit-msb-ftr {
width: 100%;
display: flex;
gap: spacing(2);
align-items: center;
box-sizing: border-box;
flex-direction: column;
justify-content: center;
}
Loading

0 comments on commit 7fda4df

Please sign in to comment.