diff --git a/blazorbootstrap/Components/ScriptLoader/ScriptLoader.razor.cs b/blazorbootstrap/Components/ScriptLoader/ScriptLoader.razor.cs index d09d3b859..0683213f5 100644 --- a/blazorbootstrap/Components/ScriptLoader/ScriptLoader.razor.cs +++ b/blazorbootstrap/Components/ScriptLoader/ScriptLoader.razor.cs @@ -71,53 +71,74 @@ public void OnLoadJS() /// /// Gets or sets a value indicating whether the script should be loaded asynchronously. - /// - /// + /// /// Default value is . - /// + /// + /// + [AddedVersion("1.11.0")] + [DefaultValue(false)] + [Description("Gets or sets a value indicating whether the script should be loaded asynchronously.")] [Parameter] public bool Async { get; set; } /// /// Gets or sets a value indicating whether the script is meant to be executed - /// after the document has been parsed, but before firing DOMContentLoaded event.. - /// - /// + /// after the document has been parsed, but before firing DOMContentLoaded event. + /// /// Default value is . - /// + /// + /// + [AddedVersion("1.11.0")] + [DefaultValue(false)] + [Description("Gets or sets a value indicating whether the script is meant to be executed after the document has been parsed, but before firing DOMContentLoaded event.")] [Parameter] public bool Defer { get; set; } /// /// An event that is fired when a script loading error occurs. /// + [AddedVersion("1.11.0")] + [Description("An event that is fired when a script loading error occurs.")] [Parameter] public EventCallback OnError { get; set; } /// /// An event that is fired when a script has been successfully loaded. /// + [AddedVersion("1.11.0")] + [Description("An event that is fired when a script has been successfully loaded.")] [Parameter] public EventCallback OnLoad { get; set; } /// /// Gets or sets the ID of the script element. - /// - /// + /// /// Default value is . - /// + /// + /// + [AddedVersion("1.11.0")] + [DefaultValue(null)] + [Description("Gets or sets the ID of the script element.")] [Parameter] public string? ScriptId { get; set; } /// /// Gets or sets the URI of the external script to load. - /// - /// + /// /// Default value is . - /// - [Parameter] + /// + /// + [AddedVersion("1.11.0")] + [DefaultValue(null)] + [Description("Gets or sets the URI of the external script to load.")] [EditorRequired] - public string? Source { get; set; } = default!; + [Parameter] + public string? Source { get; set; } + + // NOTE: Hiding base Class and Style properties to prevent their usage in this component. + private new string? Class { get; set; } + + private new string? Style { get; set; } #endregion } diff --git a/blazorbootstrap/Components/Sidebar/Sidebar.razor.cs b/blazorbootstrap/Components/Sidebar/Sidebar.razor.cs index f7624e37e..7c9b77d61 100644 --- a/blazorbootstrap/Components/Sidebar/Sidebar.razor.cs +++ b/blazorbootstrap/Components/Sidebar/Sidebar.razor.cs @@ -58,6 +58,8 @@ public void bsWindowResize(int width) /// Refresh the sidebar data. /// /// Task + [AddedVersion("1.4.0")] + [Description("Refresh the sidebar data.")] public async Task RefreshDataAsync(bool firstRender = false) { if (requestInProgress) @@ -80,6 +82,8 @@ public async Task RefreshDataAsync(bool firstRender = false) /// /// Toggles sidebar. /// + [AddedVersion("1.4.0")] + [Description("Toggles sidebar.")] public void ToggleSidebar() { collapseSidebar = !collapseSidebar; @@ -128,64 +132,87 @@ private string GetNavMenuCssClass() /// /// Gets or sets the badge text. + /// + /// Default value is . + /// /// - /// - /// Default value is null. - /// + [AddedVersion("1.4.0")] + [DefaultValue(null)] + [Description("Gets or sets the badge text.")] [Parameter] public string? BadgeText { get; set; } /// /// Gets or sets the custom icon name. + /// + /// Default value is . + /// /// - /// - /// Default value is null. - /// + [AddedVersion("1.4.0")] + [DefaultValue(null)] + [Description("Gets or sets the custom icon name.")] [Parameter] public string? CustomIconName { get; set; } /// /// Gets or sets the data provider. + /// + /// Default value is . + /// /// - /// - /// Default value is null. - /// - [Parameter] + [AddedVersion("1.4.0")] + [DefaultValue(null)] + [Description("Gets or sets the data provider.")] [EditorRequired] - public SidebarDataProviderDelegate? DataProvider { get; set; } = default!; + [Parameter] + public SidebarDataProviderDelegate? DataProvider { get; set; } /// /// Gets or sets the Href. - /// - /// + /// /// Default value is . - /// + /// + /// + [AddedVersion("3.0.0")] + [DefaultValue("Empty string")] + [Description("Gets or sets the Href.")] [Parameter] - public string? Href { get; set; } = string.Empty; + public string Href { get; set; } = string.Empty; /// /// Gets or sets the IconName. - /// - /// + /// /// Default value is . - /// + /// + /// + [AddedVersion("1.4.0")] + [DefaultValue(IconName.None)] + [Description("Gets or sets the IconName.")] [Parameter] public IconName IconName { get; set; } = IconName.None; /// /// Gets or sets the sidebar logo. + /// + /// Default value is . + /// /// - /// - /// Default value is null. - /// + [AddedVersion("1.4.0")] + [DefaultValue(null)] + [Description("Gets or sets the sidebar logo.")] [Parameter] public string? ImageSrc { get; set; } /// /// Gets or sets the width of the image in pixels. /// You can change the unit by setting . - /// Default value is 0. + /// + /// Default value is 0. + /// /// + [AddedVersion("3.4.0")] + [DefaultValue(0)] + [Description("Gets or sets the width of the image in pixels. You can change the unit by setting WidthUnit.")] [Parameter] public float ImageWidth { get; set; } = 0; @@ -193,24 +220,37 @@ private string GetNavMenuCssClass() /// /// Gets or sets the sidebar title. + /// + /// Default value is . + /// /// - /// - /// Default value is null. - /// + [AddedVersion("1.4.0")] + [DefaultValue(null)] + [Description("Gets or sets the sidebar title.")] [Parameter] - public string? Title { get; set; } = default!; + public string? Title { get; set; } /// /// Gets or sets the sidebar width. + /// + /// Default value is 270. + /// /// - /// Default value is 270. + [AddedVersion("3.0.0")] + [DefaultValue(270)] + [Description("Gets or sets the sidebar width.")] [Parameter] public float Width { get; set; } = 270; /// /// Gets or sets the sidebar width unit. + /// + /// Default value is . + /// /// - /// Default value is . + [AddedVersion("3.0.0")] + [DefaultValue(Unit.Px)] + [Description("Gets or sets the sidebar width unit.")] [Parameter] public Unit WidthUnit { get; set; } = Unit.Px; diff --git a/blazorbootstrap/Models/NavItem.cs b/blazorbootstrap/Models/NavItem.cs index ab9ba48ea..9ab547021 100644 --- a/blazorbootstrap/Models/NavItem.cs +++ b/blazorbootstrap/Models/NavItem.cs @@ -12,11 +12,15 @@ public class NavItem /// /// Gets or sets an additional CSS class. /// + [AddedVersion("1.10.3")] + [Description("Gets or sets an additional CSS class.")] public string? Class { get; set; } /// /// Gets or sets the name of the custom icon to display. /// + [AddedVersion("1.4.0")] + [Description("Gets or sets the name of the custom icon to display.")] public string? CustomIconName { get; set; } /// @@ -27,51 +31,71 @@ public class NavItem /// /// Gets or sets the HyperText Reference (href). /// + [AddedVersion("1.4.0")] + [Description("Gets or sets the HyperText Reference (href).")] public string? Href { get; set; } /// /// Gets or sets the icon color. /// + [AddedVersion("1.4.0")] + [Description("Gets or sets the icon color.")] public IconColor IconColor { get; set; } /// /// Gets or sets the icon name. /// + [AddedVersion("1.4.0")] + [Description("Gets or sets the icon name.")] public IconName IconName { get; set; } /// /// Gets or sets the Id. /// + [AddedVersion("1.4.0")] + [Description("Gets or sets the Id.")] public string? Id { get; set; } /// /// Gets or sets the item level. /// - public int Level { get; set; } = 0; + [AddedVersion("1.4.0")] + [Description("Gets or sets the item level.")] + public int Level { get; set; } /// /// Gets or sets the URL matching behavior. /// + [AddedVersion("2.1.0")] + [Description("Gets or sets the URL matching behavior.")] public NavLinkMatch Match { get; set; } /// /// Gets or sets the parent Id. /// + [AddedVersion("1.4.0")] + [Description("Gets or sets the parent Id.")] public string? ParentId { get; set; } /// /// Gets or sets the sequence. /// + [AddedVersion("1.4.0")] + [Description("Gets or sets the sequence.")] public int Sequence { get; set; } /// /// Gets or sets the target. /// + [AddedVersion("1.4.0")] + [Description("Gets or sets the target.")] public Target Target { get; set; } /// /// Gets or sets the navigation link text. /// + [AddedVersion("1.4.0")] + [Description("Gets or sets the navigation link text.")] public string? Text { get; set; } #endregion