< Summary - Syki

Information
Class: Syki.Front.Components.Custom.SykiTextField
Assembly: Front
File(s): /home/runner/work/syki/syki/Front/Components/Custom/SykiTextField.razor
Tag: 4_16869239191
Line coverage
0%
Covered lines: 0
Uncovered lines: 13
Coverable lines: 13
Total lines: 67
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_Lines()100%210%
get_MaxLines()100%210%
get_AutoGrow()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    Lines="@Lines"
 6    Class="@Class"
 7    Label="@Label"
 8    Value="@Value"
 9    Required="true"
 10    Immediate="true"
 11    AutoGrow="@AutoGrow"
 12    MaxLines="@MaxLines"
 13    ReadOnly="@ReadOnly"
 14    Margin="Margin.Dense"
 15    MaxLength="@MaxLength"
 16    AutoFocus="@AutoFocus"
 17    RequiredError="Informe!"
 18    OnlyValidateIfDirty="true"
 19    Variant="Variant.Outlined"
 20    ValueChanged="@ValueChanged"
 21    OnAdornmentClick="@OnAdornmentClick"
 22  AdornmentIcon="@Icons.Material.Filled.ContentCopy"
 23    Adornment="@(CopyAdornment ? Adornment.End : Adornment.None)"
 24/>
 25
 26@inject ClipboardService ClipboardService
 27
 28@code
 29{
 30    [Parameter]
 031    public string Value { get; set; }
 32
 33    [Parameter]
 034    public EventCallback<string> ValueChanged { get; set; }
 35
 36    [Parameter]
 037    public int Lines { get; set; }
 38
 39    [Parameter]
 040    public int MaxLines { get; set; }
 41
 42    [Parameter]
 043    public bool AutoGrow { get; set; }
 44
 45    [Parameter]
 046    public string Label { get; set; }
 47
 48    [Parameter]
 049    public string Class { get; set; } = "pb-2";
 50
 51    [Parameter]
 052    public bool AutoFocus { get; set; }
 53
 54    [Parameter]
 055    public bool ReadOnly { get; set; }
 56
 57    [Parameter]
 058    public int MaxLength { get; set; } = 100;
 59
 60  [Parameter]
 061  public bool CopyAdornment { get; set; }
 62
 63  private async Task OnAdornmentClick()
 64  {
 065    await ClipboardService.CopyToClipboard(Value);
 066  }
 67}