Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 68 additions & 16 deletions blazorbootstrap/Components/Maps/GoogleMap.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ protected override async Task OnInitializedAsync()
/// </summary>
/// <param name="marker">The marker to add to the map.</param>
/// <returns>A completed task.</returns>
[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);
Expand All @@ -40,6 +42,8 @@ public async Task OnMarkerClickJS(GoogleMapMarker marker)
/// Refreshes the Google Map component.
/// </summary>
/// <returns>A completed task.</returns>
[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);
Expand All @@ -51,6 +55,8 @@ public ValueTask RefreshAsync()
/// Updates the markers on the Google Map.
/// </summary>
/// <returns>A completed task.</returns>
[AddedVersion("3.0.0")]
[Description("Updates the markers on the Google Map.")]
public ValueTask UpdateMarkersAsync(IEnumerable<GoogleMapMarker> markers)
{
JSRuntime.InvokeVoidAsync("window.blazorBootstrap.googlemaps.updateMarkers", Id, markers, objRef);
Expand All @@ -76,79 +82,125 @@ private void OnScriptLoad()

/// <summary>
/// Gets or sets the Google Map API key.
/// <para>
/// Default value is <see langword="null" />.
/// </para>
/// </summary>
[AddedVersion("3.0.0")]
[DefaultValue(null)]
[Description("Gets or sets the Google Map API key.")]
[ParameterTypeName("string?")]
[Parameter]
public string? ApiKey { get; set; }

/// <summary>
/// Gets or sets the center parameter.
/// <para>
/// Default value is <see langword="null" />.
/// </para>
/// </summary>
[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; }

/// <summary>
/// Makes the marker clickable if set to <see langword="true" />.
/// <para>
/// Default value is <see langword="false" />.
/// </para>
/// </summary>
[AddedVersion("3.0.0")]
[DefaultValue(false)]
[Description("Makes the marker clickable if set to <b>true</b>.")]
[Parameter]
public bool Clickable { get; set; }

private string? GoogleMapsJsFileUrl => $"https://maps.googleapis.com/maps/api/js?key={ApiKey}&libraries=maps,marker";

/// <summary>
/// Gets or sets the height of the <see cref="GoogleMap" />.
/// </summary>
/// <remarks>
/// <para>
/// Default value is <see langword="null" />.
/// </remarks>
/// </para>
/// </summary>
[AddedVersion("3.0.0")]
[DefaultValue(null)]
[Description("Gets or sets the height of the <b>GoogleMap</b>.")]
[ParameterTypeName("double?")]
[Parameter]
public double? Height { get; set; }

/// <summary>
/// Gets or sets the units for the <see cref="Height" />.
/// </summary>
/// <remarks>
/// <para>
/// Default value is <see cref="Unit.Px" />.
/// </remarks>
/// </para>
/// </summary>
[AddedVersion("3.0.0")]
[DefaultValue(Unit.Px)]
[Description("Gets or sets the units for the <b>Height</b>.")]
[Parameter]
public Unit HeightUnit { get; set; } = Unit.Px;

/// <summary>
/// Gets or sets the markers.
/// <para>
/// Default value is <see langword="null" />.
/// </para>
/// </summary>
[AddedVersion("3.0.0")]
[DefaultValue(null)]
[Description("Gets or sets the markers.")]
[ParameterTypeName("IEnumerable<GoogleMapMarker>?")]
[Parameter]
public IEnumerable<GoogleMapMarker>? Markers { get; set; }

/// <summary>
/// Event fired when a user clicks on a marker.
/// This event fires only when <see cref="Clickable" /> is set to <see langword="true" />.
/// </summary>
[AddedVersion("3.0.0")]
[Description("Event fired when a user clicks on a marker. This event fires only when <b>Clickable</b> is set to <b>true</b>.")]
[Parameter]
public EventCallback<GoogleMapMarker> OnMarkerClick { get; set; }

/// <summary>
/// Gets or sets the width of the <see cref="GoogleMap" />.
/// </summary>
/// <remarks>
/// <para>
/// Default value is <see langword="null" />.
/// </remarks>
/// </para>
/// </summary>
[AddedVersion("3.0.0")]
[DefaultValue(null)]
[Description("Gets or sets the width of the <b>GoogleMap</b>.")]
[ParameterTypeName("double?")]
[Parameter]
public double? Width { get; set; }

/// <summary>
/// Gets or sets the units for the <see cref="Width" />.
/// </summary>
/// <remarks>
/// <para>
/// Default value is <see cref="Unit.Percentage" />.
/// </remarks>
/// </para>
/// </summary>
[AddedVersion("3.0.0")]
[DefaultValue(Unit.Percentage)]
[Description("Gets or sets the units for the <b>Width</b>.")]
[Parameter]
public Unit WidthUnit { get; set; } = Unit.Percentage;

/// <summary>
/// Gets or sets the zoom level of the <see cref="GoogleMap" />.
/// </summary>
/// <remarks>
/// <para>
/// Default value is 14.
/// </remarks>
/// </para>
/// </summary>
[AddedVersion("3.0.0")]
[DefaultValue(14)]
[Description("Gets or sets the zoom level of the <b>GoogleMap</b>.")]
[Parameter]
public int Zoom { get; set; } = 14;

Expand Down
26 changes: 21 additions & 5 deletions blazorbootstrap/Components/Markdown/Markdown.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -678,24 +678,40 @@ private static void RemoveLastLineBreak(List<string> htmlLines)

/// <summary>
/// Gets or sets the CSS class for blockquotes.
/// <para>
/// Default value is "blockquote".
/// </para>
/// </summary>
[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";

/// <summary>
/// Gets or sets the content to be rendered within the component.
/// </summary>
/// <remarks>
/// <para>
/// Default value is <see langword="null" />.
/// </remarks>
/// </para>
/// </summary>
[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; }

/// <summary>
/// Gets or sets the CSS class for table.
/// <para>
/// Default value is "table".
/// </para>
/// </summary>
[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
}
Loading
Loading