Skip to content

Commit 1ef1e2b

Browse files
committed
Final commit to add last changes
1 parent 47c2099 commit 1ef1e2b

12 files changed

Lines changed: 160 additions & 56 deletions

File tree

docs/CodeBeam.MudBlazor.Extensions.Docs.Wasm/wwwroot/CodeBeam.MudBlazor.Extensions.xml

Lines changed: 92 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/CodeBeam.MudBlazor.Extensions.Docs/Pages/Components/Animate/Examples/AnimateExample1.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
</MudGrid>
6767

6868
@code {
69-
MudAnimate? _animate = new();
69+
MudAnimate _animate = null!;
7070
double _duration = 1;
7171
double _delay = 0;
7272
int _iterationCount = 1;

src/CodeBeam.MudBlazor.Extensions/Base/MudBaseInputExtended.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected MudBaseInputExtended()
6262
/// handled. This can be useful for intercepting or modifying input behavior in advanced scenarios
6363
/// </remarks>
6464
[Parameter]
65-
public EventCallback<MudBeforeInputEventArgs> OnBeforeInput { get; set; }
65+
public EventCallback<BeforeInputEventArgs> OnBeforeInput { get; set; }
6666

6767
/// <summary>
6868
/// Gets or sets a value indicating whether the component has an adornment at the start.
@@ -109,7 +109,7 @@ protected MudBaseInputExtended()
109109
/// </summary>
110110
/// <param name="args">The event data associated with the before input operation.</param>
111111
/// <returns>A task that represents the asynchronous operation.</returns>
112-
protected async Task InvokeBeforeInputAsync(MudBeforeInputEventArgs args)
112+
protected async Task InvokeBeforeInputAsync(BeforeInputEventArgs args)
113113
{
114114
_isFocused = true;
115115
await OnBeforeInputAsync(args);
@@ -151,9 +151,9 @@ protected override async Task OnConverterChangedAsync()
151151
/// <param name="dto"></param>
152152
/// <returns></returns>
153153
[JSInvokable("OnBeforeInput")]
154-
public async Task<bool> OnBeforeInputFromJs(MudBeforeInputJsDto dto)
154+
public async Task<bool> OnBeforeInputFromJs(BeforeInputJsDto dto)
155155
{
156-
var args = new MudBeforeInputEventArgs
156+
var args = new BeforeInputEventArgs
157157
{
158158
Data = dto.Data,
159159
InputType = dto.InputType ?? string.Empty,
@@ -172,7 +172,7 @@ public async Task<bool> OnBeforeInputFromJs(MudBeforeInputJsDto dto)
172172
/// occurs.</remarks>
173173
/// <param name="args">An object containing event data for the input operation.</param>
174174
/// <returns>A task that represents the asynchronous operation. The default implementation returns a completed task.</returns>
175-
protected virtual Task OnBeforeInputAsync(MudBeforeInputEventArgs args) => Task.CompletedTask;
175+
protected virtual Task OnBeforeInputAsync(BeforeInputEventArgs args) => Task.CompletedTask;
176176

177177

178178
}

src/CodeBeam.MudBlazor.Extensions/Components/ChipField/MudChipField.razor.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ namespace MudExtensions
1212
/// <typeparam name="T"></typeparam>
1313
public partial class MudChipField<T> : MudTextFieldExtended<T>
1414
{
15+
/// <summary>
16+
///
17+
/// </summary>
1518
public MudChipField()
1619
{
1720
using var registerScope = CreateRegisterScope();
@@ -168,7 +171,12 @@ protected async Task HandleKeyUp(KeyboardEventArgs args)
168171
await OnKeyUp.InvokeAsync(args);
169172
}
170173

171-
protected internal async Task HandleBeforeInput(MudBeforeInputEventArgs args)
174+
/// <summary>
175+
///
176+
/// </summary>
177+
/// <param name="args"></param>
178+
/// <returns></returns>
179+
protected internal async Task HandleBeforeInput(BeforeInputEventArgs args)
172180
{
173181
if (args.IsComposing)
174182
{

src/CodeBeam.MudBlazor.Extensions/Components/InputExtended/MudInputExtended.razor.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -349,23 +349,13 @@ private bool ShowClearButton()
349349
return HasValue(ReadValue);
350350
}
351351

352-
/// <summary>
353-
///
354-
/// </summary>
355-
/// <param name="updateValue"></param>
356-
/// <returns></returns>
357352
//protected override async Task UpdateTextPropertyAsync(bool updateValue)
358353
//{
359354
// await base.UpdateTextPropertyAsync(updateValue);
360355
// if (Clearable)
361356
// UpdateClearable(ReadText);
362357
//}
363358

364-
/// <summary>
365-
///
366-
/// </summary>
367-
/// <param name="updateText"></param>
368-
/// <returns></returns>
369359
//protected override async Task UpdateValuePropertyAsync(bool updateText)
370360
//{
371361
// await base.UpdateValuePropertyAsync(updateText);

src/CodeBeam.MudBlazor.Extensions/Components/JsonTreeView/MudJsonTreeViewNode.razor.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ public partial class MudJsonTreeViewNode : ComponentBase
3333
[Parameter]
3434
public string Text { get; set; } = string.Empty;
3535

36+
/// <summary>
37+
///
38+
/// </summary>
39+
/// <param name="item"></param>
40+
/// <returns></returns>
3641
public RenderFragment RenderJsonItem(KeyValuePair<string, JsonNode?> item) => builder =>
3742
{
3843
try

src/CodeBeam.MudBlazor.Extensions/Components/PasswordField/MudPasswordField.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public MudPasswordField()
3838
/// </summary>
3939
public MudInputExtended<string?> InputReference { get; private set; } = null!;
4040
private InputType GetPasswordInputType() => _passwordMode.Value ? InputType.Password : InputType.Text;
41-
private string? GetPasswordIcon() => _passwordMode.Value ? Icons.Material.Filled.VisibilityOff : Icons.Material.Filled.Visibility;
41+
private string? GetPasswordIcon() => _passwordMode.Value ? Icons.Material.Filled.Visibility : Icons.Material.Filled.VisibilityOff;
4242
//InputType _passwordInput = InputType.Password;
4343
//string? _passwordIcon = Icons.Material.Filled.VisibilityOff;
4444

src/CodeBeam.MudBlazor.Extensions/Utilities/MudBeforeInputEventArgs.cs renamed to src/CodeBeam.MudBlazor.Extensions/Utilities/BeforeInputEventArgs.cs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace MudExtensions
22
{
3-
public sealed class MudBeforeInputEventArgs
3+
public sealed class BeforeInputEventArgs
44
{
55
/// <summary>
66
/// Text that will be inserted. Null for delete actions.
@@ -22,14 +22,29 @@ public sealed class MudBeforeInputEventArgs
2222
/// </summary>
2323
public bool PreventDefault { get; set; }
2424

25+
/// <summary>
26+
///
27+
/// </summary>
2528
public bool IsInsert => InputType.StartsWith("insert", StringComparison.Ordinal);
2629

30+
/// <summary>
31+
///
32+
/// </summary>
2733
public bool IsDeleteBackward => InputType == "deleteContentBackward";
2834

35+
/// <summary>
36+
///
37+
/// </summary>
2938
public bool IsDeleteForward => InputType == "deleteContentForward";
3039

40+
/// <summary>
41+
///
42+
/// </summary>
3143
public bool IsPaste => InputType == "insertFromPaste";
3244

45+
/// <summary>
46+
///
47+
/// </summary>
3348
public bool IsEnter => InputType == "insertLineBreak";
3449
}
3550
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
namespace MudExtensions
2+
{
3+
/// <summary>
4+
///
5+
/// </summary>
6+
public sealed class BeforeInputJsDto
7+
{
8+
/// <summary>
9+
///
10+
/// </summary>
11+
public BeforeInputJsDto() { }
12+
13+
/// <summary>
14+
///
15+
/// </summary>
16+
public string? Data { get; set; }
17+
18+
/// <summary>
19+
///
20+
/// </summary>
21+
public string? InputType { get; set; }
22+
23+
/// <summary>
24+
///
25+
/// </summary>
26+
public bool IsComposing { get; set; }
27+
}
28+
}

src/CodeBeam.MudBlazor.Extensions/Utilities/MudBeforeInputJsDto.cs

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)