Skip to content

Commit 6b87fd7

Browse files
authored
Merge pull request #1831 from Basaingeal/release/v5.2.0
Release/v5.2.0
2 parents 0adece9 + 28032fc commit 6b87fd7

9 files changed

+2620
-2809
lines changed

CHANGELOG.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
# v5.1.0
1+
# v5.2.0
22

3-
## .NET 6 multi-targetting enabled
3+
## 🎉 New Features
4+
5+
### Additional `SweetAlertOptions` properties
6+
7+
- `Color`
8+
- `CustomClass.TimerProgressBar`
9+
410
## Dependencies
511

6-
- bump `sweetalert2` to `11.1.9`
7-
- bump `@sweetalert2/themes` to `5.0.7`
12+
- bump `sweetalert2` to `11.4.4`
13+
- bump `@sweetalert2/themes` to `5.0.10`
814

CurrieTechnologies.Razor.SweetAlert2.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<Description>
1010
A Razor class library for interacting with SweetAlert2.
1111
Use in Blazor Server Apps or Blazor WebAssembly Apps.
12-
Currently using sweetalert2@11.1.7
12+
Currently using sweetalert2@11.4.4
1313
</Description>
1414
<Copyright>Michael J. Currie</Copyright>
1515
<PackageLicenseExpression>MIT</PackageLicenseExpression>
@@ -20,8 +20,8 @@
2020
<PackageTags>Blazor SweetAlert SweetAlert2 JSInterop Server Razor</PackageTags>
2121
<PackageReadmeFile>README.md</PackageReadmeFile>
2222
<PackageReleaseNotes>
23-
.NET 6 support
2423
bump sweetalert2
24+
bump @sweetalert2/themes
2525
</PackageReleaseNotes>
2626
</PropertyGroup>
2727

@@ -42,7 +42,7 @@
4242
</ItemGroup>
4343

4444
<ItemGroup>
45-
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="5.0.3">
45+
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0">
4646
<PrivateAssets>all</PrivateAssets>
4747
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4848
</PackageReference>

Models/SweetAlertCustomClass.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,7 @@ public SweetAlertCustomClass(string popup)
4949
[JsonPropertyName("loader")] public string Loader { get; set; }
5050

5151
[JsonPropertyName("footer")] public string Footer { get; set; }
52+
53+
[JsonPropertyName("timerProgressBar")] public string TimerProgressBar { get; set; }
5254
}
5355
}

Models/SweetAlertOptionPOCO.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ internal class SweetAlertOptionPOCO
3333

3434
[JsonPropertyName("padding")] public string Padding { get; set; }
3535

36+
[JsonPropertyName("color")] public string Color { get; set; }
37+
3638
[JsonPropertyName("background")] public string Background { get; set; }
3739

3840
[JsonPropertyName("position")] public string Position { get; set; }

Models/SweetAlertOptions.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ public SweetAlertOptions(string title)
109109
/// </summary>
110110
public string Padding { get; set; }
111111

112+
/// <summary>
113+
/// Popup color for title, content and footer (CSS `color` property).
114+
/// </summary>
115+
public string Color { get; set; }
116+
112117
/// <summary>
113118
/// Modal window background (CSS background property).
114119
/// </summary>
@@ -331,18 +336,18 @@ public SweetAlertOptions(string title)
331336

332337
#pragma warning disable CA1056 // Uri properties should not be strings
333338
/// <summary>
334-
/// Add a customized icon for the modal. Should contain a string with the path or URL to the image.
339+
/// Add an image to the popup. Should contain a string with the path or URL to the image.
335340
/// </summary>
336341
public string ImageUrl { get; set; }
337342
#pragma warning restore CA1056 // Uri properties should not be strings
338343

339344
/// <summary>
340-
/// If imageUrl is set, you can specify imageWidth to describes image width in px.
345+
/// If imageUrl is set, you can specify imageWidth to describes image width.
341346
/// </summary>
342347
public double? ImageWidth { get; set; }
343348

344349
/// <summary>
345-
/// If imageUrl is set, you can specify imageHeight to describes image height in px.
350+
/// If imageUrl is set, you can specify imageHeight to describes image height.
346351
/// </summary>
347352
public double? ImageHeight { get; set; }
348353

@@ -485,6 +490,7 @@ internal SweetAlertOptionPOCO ToPOCO()
485490
Input = Input?.ToString(),
486491
Width = Width,
487492
Padding = Padding,
493+
Color = Color,
488494
Background = Background,
489495
Position = Position?.ToString(),
490496
Grow = Grow?.ToString(),

Services/SweetAlertOptionsMixingService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ internal static SweetAlertOptions Mix(SweetAlertOptions oldSettings, SweetAlertO
1919
Input = newSettings.Input ?? oldSettings.Input,
2020
Width = newSettings.Width ?? oldSettings.Width,
2121
Padding = newSettings.Padding ?? oldSettings.Padding,
22+
Color = newSettings.Color ?? oldSettings.Color,
2223
Background = newSettings.Background ?? oldSettings.Background,
2324
Position = newSettings.Position ?? oldSettings.Position,
2425
Grow = newSettings.Grow ?? oldSettings.Grow,

0 commit comments

Comments
 (0)