protected override async Task OnInitializedAsync() { var url = "https://raw.githubusercontent.com/AdrienTorris/awesome-blazor/master/README.md"; var awesomeBlazorContents = await this.HttpClient.GetStringAsync(url); this.RootGroup = AwesomeBlazorParser.ParseMarkdown(awesomeBlazorContents); this.ParsingComplete = true; }
public void GetExpandedDescendantsCount_Test() { var root = new AwesomeResourceGroup { Expanded = true, SubGroups = { new AwesomeResourceGroup { }, // 1 new AwesomeResourceGroup { // 2 Expanded = true, SubGroups = { new AwesomeResourceGroup { }, // 3 new AwesomeResourceGroup { } // 4 } }, new AwesomeResourceGroup { }, // 5 new AwesomeResourceGroup { // 6 Expanded = false, SubGroups = { new AwesomeResourceGroup { }, // No Count due to collapsed new AwesomeResourceGroup { } } } } }; root.GetExpandedDescendantsCount().Is(6); }
private Task _OnChangeSubGroupState(AwesomeResourceGroup group) { return(this.OnChangeGroupState.InvokeAsync(group)); }
public string GetSubGroupsHeight(AwesomeResourceGroup group) { var expandedDescendantsCount = group.GetExpandedDescendantsCount(); return((expandedDescendantsCount * 26) + "px"); }
private Task OnClickExpandBox(AwesomeResourceGroup group) { group.Expanded = !group.Expanded; return(this.OnChangeGroupState.InvokeAsync(group)); }
private Task OnClickToggleBox(AwesomeResourceGroup group) { group.SelectionState = group.SelectionState != SelectionState.Selected ? SelectionState.Selected : SelectionState.Unselected; return(this.OnChangeGroupState.InvokeAsync(group)); }
private Task _OnChangeGroupSelection(AwesomeResourceGroup group) { return(this.OnChangeGroupSelection.InvokeAsync(group)); }
public string GetSubGroupsHeight(AwesomeResourceGroup group) { return(group.Expanded ? (group.SubGroups.Count * 26) + "px" : "0"); }
private Task OnClickExpandBox(AwesomeResourceGroup group) { group.Expanded = !group.Expanded; return(Task.CompletedTask); }