diff --git a/blazorbootstrap/Components/Maps/GoogleMap.razor.cs b/blazorbootstrap/Components/Maps/GoogleMap.razor.cs index 90613c4b5..67cc365f3 100644 --- a/blazorbootstrap/Components/Maps/GoogleMap.razor.cs +++ b/blazorbootstrap/Components/Maps/GoogleMap.razor.cs @@ -22,6 +22,8 @@ protected override async Task OnInitializedAsync() /// /// The marker to add to the map. /// A completed task. + [AddedVersion("3.0.0")] + [Description("Adds a marker to the GoogleMap.")] public ValueTask AddMarkerAsync(GoogleMapMarker marker) { JSRuntime.InvokeVoidAsync("window.blazorBootstrap.googlemaps.addMarker", Id, marker, objRef); @@ -40,6 +42,8 @@ public async Task OnMarkerClickJS(GoogleMapMarker marker) /// Refreshes the Google Map component. /// /// A completed task. + [AddedVersion("3.0.0")] + [Description("Refreshes the Google Map component.")] public ValueTask RefreshAsync() { JSRuntime.InvokeVoidAsync("window.blazorBootstrap.googlemaps.initialize", Id, Zoom, Center, Markers, Clickable, objRef); @@ -51,6 +55,8 @@ public ValueTask RefreshAsync() /// Updates the markers on the Google Map. /// /// A completed task. + [AddedVersion("3.0.0")] + [Description("Updates the markers on the Google Map.")] public ValueTask UpdateMarkersAsync(IEnumerable markers) { JSRuntime.InvokeVoidAsync("window.blazorBootstrap.googlemaps.updateMarkers", Id, markers, objRef); @@ -76,19 +82,39 @@ private void OnScriptLoad() /// /// Gets or sets the Google Map API key. + /// + /// Default value is . + /// /// + [AddedVersion("3.0.0")] + [DefaultValue(null)] + [Description("Gets or sets the Google Map API key.")] + [ParameterTypeName("string?")] [Parameter] public string? ApiKey { get; set; } /// /// Gets or sets the center parameter. + /// + /// Default value is . + /// /// + [AddedVersion("3.0.0")] + [DefaultValue(null)] + [Description("Gets or sets the center parameter.")] + [ParameterTypeName("GoogleMapCenter?")] [Parameter] - public GoogleMapCenter Center { get; set; } = default!; + public GoogleMapCenter? Center { get; set; } /// /// Makes the marker clickable if set to . + /// + /// Default value is . + /// /// + [AddedVersion("3.0.0")] + [DefaultValue(false)] + [Description("Makes the marker clickable if set to true.")] [Parameter] public bool Clickable { get; set; } @@ -96,25 +122,39 @@ private void OnScriptLoad() /// /// Gets or sets the height of the . - /// - /// + /// /// Default value is . - /// + /// + /// + [AddedVersion("3.0.0")] + [DefaultValue(null)] + [Description("Gets or sets the height of the GoogleMap.")] + [ParameterTypeName("double?")] [Parameter] public double? Height { get; set; } /// /// Gets or sets the units for the . - /// - /// + /// /// Default value is . - /// + /// + /// + [AddedVersion("3.0.0")] + [DefaultValue(Unit.Px)] + [Description("Gets or sets the units for the Height.")] [Parameter] public Unit HeightUnit { get; set; } = Unit.Px; /// /// Gets or sets the markers. + /// + /// Default value is . + /// /// + [AddedVersion("3.0.0")] + [DefaultValue(null)] + [Description("Gets or sets the markers.")] + [ParameterTypeName("IEnumerable?")] [Parameter] public IEnumerable? Markers { get; set; } @@ -122,33 +162,45 @@ private void OnScriptLoad() /// Event fired when a user clicks on a marker. /// This event fires only when is set to . /// + [AddedVersion("3.0.0")] + [Description("Event fired when a user clicks on a marker. This event fires only when Clickable is set to true.")] [Parameter] public EventCallback OnMarkerClick { get; set; } /// /// Gets or sets the width of the . - /// - /// + /// /// Default value is . - /// + /// + /// + [AddedVersion("3.0.0")] + [DefaultValue(null)] + [Description("Gets or sets the width of the GoogleMap.")] + [ParameterTypeName("double?")] [Parameter] public double? Width { get; set; } /// /// Gets or sets the units for the . - /// - /// + /// /// Default value is . - /// + /// + /// + [AddedVersion("3.0.0")] + [DefaultValue(Unit.Percentage)] + [Description("Gets or sets the units for the Width.")] [Parameter] public Unit WidthUnit { get; set; } = Unit.Percentage; /// /// Gets or sets the zoom level of the . - /// - /// + /// /// Default value is 14. - /// + /// + /// + [AddedVersion("3.0.0")] + [DefaultValue(14)] + [Description("Gets or sets the zoom level of the GoogleMap.")] [Parameter] public int Zoom { get; set; } = 14; diff --git a/blazorbootstrap/Components/Markdown/Markdown.razor.cs b/blazorbootstrap/Components/Markdown/Markdown.razor.cs index c80a84b49..35f5afcf6 100644 --- a/blazorbootstrap/Components/Markdown/Markdown.razor.cs +++ b/blazorbootstrap/Components/Markdown/Markdown.razor.cs @@ -678,24 +678,40 @@ private static void RemoveLastLineBreak(List htmlLines) /// /// Gets or sets the CSS class for blockquotes. + /// + /// Default value is "blockquote". + /// /// + [AddedVersion("3.1.0")] + [DefaultValue("blockquote")] + [Description("Gets or sets the CSS class for blockquotes.")] [Parameter] - public string? BlockquotesCssClass { get; set; } = "blockquote"; + public string BlockquotesCssClass { get; set; } = "blockquote"; /// /// Gets or sets the content to be rendered within the component. - /// - /// + /// /// Default value is . - /// + /// + /// + [AddedVersion("3.1.0")] + [DefaultValue(null)] + [Description("Gets or sets the content to be rendered within the component.")] + [ParameterTypeName("RenderFragment?")] [Parameter] public RenderFragment? ChildContent { get; set; } /// /// Gets or sets the CSS class for table. + /// + /// Default value is "table". + /// /// + [AddedVersion("3.1.0")] + [DefaultValue("table")] + [Description("Gets or sets the CSS class for table.")] [Parameter] - public string? TableCssClass { get; set; } = "table"; + public string TableCssClass { get; set; } = "table"; #endregion } diff --git a/blazorbootstrap/Components/Modals/Modal.razor.cs b/blazorbootstrap/Components/Modals/Modal.razor.cs index d840f81fe..ace12f683 100644 --- a/blazorbootstrap/Components/Modals/Modal.razor.cs +++ b/blazorbootstrap/Components/Modals/Modal.razor.cs @@ -90,6 +90,8 @@ public async Task bsHiddenModal() /// /// Hides a modal. /// + [AddedVersion("1.0.0")] + [Description("Hides a modal.")] public async Task HideAsync() { isVisible = false; @@ -99,15 +101,19 @@ public async Task HideAsync() /// /// Opens a modal. /// + [AddedVersion("1.4.1")] + [Description("Opens a modal.")] public async Task ShowAsync() => await ShowAsync(null, null, null, null); /// - /// Opens a modal. + /// Opens a modal. T is component. /// /// /// /// /// + [AddedVersion("1.0.0")] + [Description("Opens a modal. T is component.")] public async Task ShowAsync(string title, string? message = null, Dictionary? parameters = null) => await ShowAsync(title, message, typeof(T), parameters); private Task OnShowAsync(ModalOption modalOption) @@ -164,84 +170,117 @@ private async Task ShowAsync(string? title, string? message, Type? type, Diction /// /// Gets or sets the body CSS class. + /// + /// Default value is . + /// /// - /// - /// Default value is null. - /// + [AddedVersion("1.0.0")] + [DefaultValue(null)] + [Description("Gets or sets the body CSS class.")] + [ParameterTypeName("string?")] [Parameter] - public string BodyCssClass { get; set; } = default!; + public string? BodyCssClass { get; set; } /// /// Gets or sets the body template. + /// + /// Default value is . + /// /// - /// - /// Default value is null. - /// + [AddedVersion("1.0.0")] + [DefaultValue(null)] + [Description("Gets or sets the body template.")] + [ParameterTypeName("RenderFragment?")] [Parameter] - public RenderFragment BodyTemplate { get; set; } = default!; + public RenderFragment? BodyTemplate { get; set; } /// /// Gets or sets the close icon color. - /// - /// + /// /// Default value is . - /// + /// + /// + [AddedVersion("1.0.0")] + [DefaultValue(IconColor.None)] + [Description("Gets or sets the close icon color.")] [Parameter] public IconColor CloseIconColor { get; set; } = IconColor.None; /// /// Indicates whether the modal closes when escape key is pressed. + /// + /// Default value is . + /// /// - /// - /// Default value is true. - /// + [AddedVersion("1.0.0")] + [DefaultValue(true)] + [Description("Indicates whether the modal closes when escape key is pressed.")] [Parameter] public bool CloseOnEscape { get; set; } = true; /// /// Gets or sets the modal dialog (div.modal-dialog) CSS class. + /// + /// Default value is . + /// /// - /// - /// Default value is null. - /// + [AddedVersion("1.0.0")] + [DefaultValue(null)] + [Description("Gets or sets the modal dialog (div.modal-dialog) CSS class.")] + [ParameterTypeName("string?")] [Parameter] - public string DialogCssClass { get; set; } = default!; + public string? DialogCssClass { get; set; } /// /// Gets or sets the footer CSS class. + /// + /// Default value is . + /// /// - /// - /// Default value is null. - /// + [AddedVersion("1.0.0")] + [DefaultValue(null)] + [Description("Gets or sets the footer CSS class.")] + [ParameterTypeName("string?")] [Parameter] - public string FooterCssClass { get; set; } = default!; + public string? FooterCssClass { get; set; } /// /// Gets or sets the footer template. + /// + /// Default value is . + /// /// - /// - /// Default value is null. - /// + [AddedVersion("1.0.0")] + [DefaultValue(null)] + [Description("Gets or sets the footer template.")] + [ParameterTypeName("RenderFragment?")] [Parameter] - public RenderFragment FooterTemplate { get; set; } = default!; + public RenderFragment? FooterTemplate { get; set; } /// /// Gets or sets the fullscreen behavior of the modal. - /// - /// + /// /// Default value is . - /// + /// + /// + [AddedVersion("1.0.0")] + [DefaultValue(ModalFullscreen.Disabled)] + [Description("Gets or sets the fullscreen behavior of the modal.")] [Parameter] public ModalFullscreen Fullscreen { get; set; } = ModalFullscreen.Disabled; /// /// Gets or sets the header CSS class. + /// + /// Default value is . + /// /// - /// - /// Default value is null. - /// + [AddedVersion("1.0.0")] + [DefaultValue(null)] + [Description("Gets or sets the header CSS class.")] + [ParameterTypeName("string?")] [Parameter] - public string HeaderCssClass { get; set; } = default!; + public string? HeaderCssClass { get; set; } // Modal close "X" button with bootstrap 5.3.3 - https://github.com/vikramlearning/blazorbootstrap/issues/714 // Review this fix after bootstrap 5.3.4 or 5.4 release. Ref: https://github.com/twbs/bootstrap/issues/39798 @@ -249,94 +288,123 @@ private async Task ShowAsync(string? title, string? message, Type? type, Diction /// /// Gets or sets the header template. + /// + /// Default value is . + /// /// - /// - /// Default value is null. - /// + [AddedVersion("1.0.0")] + [DefaultValue(null)] + [Description("Gets or sets the header template.")] + [ParameterTypeName("RenderFragment?")] [Parameter] - public RenderFragment HeaderTemplate { get; set; } = default!; + public RenderFragment? HeaderTemplate { get; set; } /// /// If , scroll will be enabled on the modal body. + /// + /// Default value is . + /// /// - /// - /// Default value is false. - /// + [AddedVersion("1.0.0")] + [DefaultValue(false)] + [Description("If true, scroll will be enabled on the modal body.")] [Parameter] public bool IsScrollable { get; set; } /// /// Indicates whether the modal is related to a modal service or not. + /// + /// Default value is . + /// /// - /// - /// Default value is false. - /// + [AddedVersion("1.9.4")] + [DefaultValue(false)] + [Description("Indicates whether the modal is related to a modal service or not.")] [Parameter] public bool IsServiceModal { get; set; } /// /// If , shows the modal vertically in the center. + /// + /// Default value is . + /// /// - /// - /// Default value is false. - /// + [AddedVersion("1.0.0")] + [DefaultValue(false)] + [Description("If true, shows the modal vertically in the center.")] [Parameter] public bool IsVerticallyCentered { get; set; } /// /// Gets or sets the message. + /// + /// Default value is . + /// /// - /// - /// Default value is null. - /// + [AddedVersion("1.0.0")] + [DefaultValue(null)] + [Description("Gets or sets the message.")] + [ParameterTypeName("string?")] [Parameter] - public string Message { get; set; } = default!; + public string? Message { get; set; } private string modalFullscreen => Fullscreen.ToModalFullscreenClass(); - [Inject] private ModalService ModalService { get; set; } = default!; + [Inject] + private ModalService ModalService { get; set; } = default!; private string modalSize => Size.ToModalSizeClass(); /// /// Gets or sets the modal type. - /// - /// + /// /// Default value is . - /// + /// + /// + [AddedVersion("1.9.5")] + [DefaultValue(ModalType.None)] + [Description("Gets or sets the modal type.")] [Parameter] public ModalType ModalType { get; set; } = ModalType.None; /// - /// This event is fired when an offcanvas element has been hidden from the user (will wait for CSS transitions to - /// complete). + /// This event is fired when an offcanvas element has been hidden from the user (will wait for CSS transitions to complete). /// + [AddedVersion("1.0.0")] + [Description("This event is fired when an offcanvas element has been hidden from the user (will wait for CSS transitions to complete).")] [Parameter] public EventCallback OnHidden { get; set; } /// /// This event is fired when the modal is shown, its backdrop is static and a click outside the modal or an escape key - /// press is performed with the keyboard option or data-bs-keyboard set to false. + /// press is performed with the keyboard option or data-bs-keyboard set to . /// + [AddedVersion("1.0.0")] + [Description("This event is fired when the modal is shown, its backdrop is static and a click outside the modal or an escape key press is performed with the keyboard option or data-bs-keyboard set to false.")] [Parameter] public EventCallback OnHidePrevented { get; set; } /// /// This event is fired immediately when the hide method has been called. /// + [AddedVersion("1.0.0")] + [Description("This event is fired immediately when the hide method has been called.")] [Parameter] public EventCallback OnHiding { get; set; } /// /// This event fires immediately when the show instance method is called. /// + [AddedVersion("1.0.0")] + [Description("This event fires immediately when the show instance method is called.")] [Parameter] public EventCallback OnShowing { get; set; } /// - /// This event is fired when an offcanvas element has been made visible to the user (will wait for CSS transitions to - /// complete). + /// This event is fired when an offcanvas element has been made visible to the user (will wait for CSS transitions to complete). /// + [AddedVersion("1.0.0")] + [Description("This event is fired when an offcanvas element has been made visible to the user (will wait for CSS transitions to complete).")] [Parameter] public EventCallback OnShown { get; set; } @@ -344,43 +412,62 @@ private async Task ShowAsync(string? title, string? message, Type? type, Diction /// /// If , close button will be visible in the modal header. + /// + /// Default value is . + /// /// - /// - /// Default value is true. - /// + [AddedVersion("1.0.0")] + [DefaultValue(true)] + [Description("If true, close button will be visible in the modal header.")] [Parameter] public bool ShowCloseButton { get; set; } = true; /// /// Gets or sets the modal size. - /// - /// + /// /// Default value is . - /// + /// + /// + [AddedVersion("1.0.0")] + [DefaultValue(ModalSize.Regular)] + [Description("Gets or sets the modal size.")] [Parameter] public ModalSize Size { get; set; } = ModalSize.Regular; /// /// Gets or sets the modal tab index. - /// - /// + /// /// Default value is -1. - /// + /// + /// + [AddedVersion("1.6.0")] + [DefaultValue(-1)] + [Description("Gets or sets the modal tab index.")] [Parameter] public int TabIndex { get; set; } = -1; /// /// Gets or sets the modal header title. + /// + /// Default value is . + /// /// + [AddedVersion("1.0.0")] + [DefaultValue(null)] + [Description("Gets or sets the modal header title.")] + [ParameterTypeName("string?")] [Parameter] - public string Title { get; set; } = default!; + public string? Title { get; set; } /// /// Indicates whether the modal uses a static backdrop. + /// + /// Default value is . + /// /// - /// - /// Default value is false. - /// + [AddedVersion("1.0.0")] + [DefaultValue(false)] + [Description("Indicates whether the modal uses a static backdrop.")] [Parameter] public bool UseStaticBackdrop { get; set; }