< Summary

Information
Class: Syki.Front.Components.Custom.SykiTextField
Assembly: Front
File(s): /home/runner/work/syki/syki/Front/Components/Custom/SykiTextField.razor
Tag: 22_11348620282
Line coverage
0%
Covered lines: 0
Uncovered lines: 10
Coverable lines: 10
Total lines: 55
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Value()100%210%
get_ValueChanged()100%210%
get_Label()100%210%
get_Class()100%210%
get_AutoFocus()100%210%
get_ReadOnly()100%210%
get_MaxLength()100%210%
get_CopyAdornment()100%210%
OnAdornmentClick()100%210%

File(s)

/home/runner/work/syki/syki/Front/Components/Custom/SykiTextField.razor

#LineLine coverage
 1@namespace Syki.Front.Components.Custom
 2
 3<MudTextField
 4    T="string"
 5    Class="@Class"
 6    Label="@Label"
 7    Value="@Value"
 8    Required="true"
 9    Immediate="true"
 10    ReadOnly="@ReadOnly"
 11    Margin="Margin.Dense"
 12    MaxLength="@MaxLength"
 13    AutoFocus="@AutoFocus"
 14    RequiredError="Informe!"
 15    OnlyValidateIfDirty="true"
 16    Variant="Variant.Outlined"
 17    ValueChanged="@ValueChanged"
 18    OnAdornmentClick="@OnAdornmentClick"
 19  AdornmentIcon="@Icons.Material.Filled.ContentCopy"
 20    Adornment="@(CopyAdornment ? Adornment.End : Adornment.None)"
 21/>
 22
 23@inject ClipboardService ClipboardService
 24
 25@code
 26{
 27    [Parameter]
 028    public string Value { get; set; }
 29
 30    [Parameter]
 031    public EventCallback<string> ValueChanged { get; set; }
 32
 33    [Parameter]
 034    public string Label { get; set; }
 35
 36    [Parameter]
 037    public string Class { get; set; } = "pb-2";
 38
 39    [Parameter]
 040    public bool AutoFocus { get; set; }
 41
 42    [Parameter]
 043    public bool ReadOnly { get; set; }
 44
 45    [Parameter]
 046    public int MaxLength { get; set; } = 100;
 47
 48  [Parameter]
 049  public bool CopyAdornment { get; set; }
 50
 51  private async Task OnAdornmentClick()
 52  {
 053    await ClipboardService.CopyToClipboard(Value);
 054  }
 55}