Skip to content

Commit

Permalink
✏ fix: typo (#1684)
Browse files Browse the repository at this point in the history
  • Loading branch information
capdiem authored Dec 21, 2023
1 parent 472adc3 commit 097c15e
Show file tree
Hide file tree
Showing 83 changed files with 195 additions and 210 deletions.
4 changes: 2 additions & 2 deletions src/Masa.Blazor.Docs.ApiGenerator/ApiGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Masa.Blazor.Docs.ApiGenerator;
public class ApiGenerator : IIncrementalGenerator
{
private const string BlazorParameterAttributeName = "ParameterAttribute";
private const string MassApiParameterAttributeName = "MassApiParameterAttribute";
private const string MasaApiParameterAttributeName = "MasaApiParameterAttribute";
private const string MasaApiPublicMethodAttributeName = "MasaApiPublicMethodAttribute";

private static Dictionary<string, string> s_typeDescCache = new();
Expand Down Expand Up @@ -164,7 +164,7 @@ private static void AnalyzeParameters(INamedTypeSymbol classSymbol, List<Paramet
{
var attrs = parameterSymbol.GetAttributes();

var apiParameterAttribute = attrs.FirstOrDefault(attr => attr.AttributeClass?.Name == MassApiParameterAttributeName);
var apiParameterAttribute = attrs.FirstOrDefault(attr => attr.AttributeClass?.Name == MasaApiParameterAttributeName);
if (apiParameterAttribute is not null)
{
if (IsIgnoredParameter(apiParameterAttribute))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Masa.Blazor.Docs.ApiGenerator;
public class ComponentApiGenerator : IIncrementalGenerator
{
private const string BlazorParameterAttributeName = "ParameterAttribute";
private const string MassApiParameterAttributeName = "MasaApiParameterAttribute";
private const string MasaApiParameterAttributeName = "MasaApiParameterAttribute";
private const string MasaApiPublicMethodAttributeName = "MasaApiPublicMethodAttribute";

private static Dictionary<string, string> s_typeDescCache = new();
Expand Down Expand Up @@ -143,7 +143,7 @@ private static void AnalyzeParameters(INamedTypeSymbol classSymbol, List<Paramet
{
var attrs = parameterSymbol.GetAttributes();

var apiParameterAttribute = attrs.FirstOrDefault(attr => attr.AttributeClass?.Name == MassApiParameterAttributeName);
var apiParameterAttribute = attrs.FirstOrDefault(attr => attr.AttributeClass?.Name == MasaApiParameterAttributeName);
if (apiParameterAttribute is not null)
{
if (IsIgnoredParameter(apiParameterAttribute))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public partial class PImageCaptcha
public StringNumber? Height { get; set; }

[Parameter]
[MassApiParameter(80)]
[MasaApiParameter(80)]
public int CaptchaWidth { get; set; } = 80;

[Parameter]
Expand All @@ -27,7 +27,7 @@ public partial class PImageCaptcha
public bool Clearable { get; set; }

[Parameter]
[MassApiParameter("$clear")]
[MasaApiParameter("$clear")]
public string? ClearIcon { get; set; } = "$clear";

[Parameter]
Expand Down
8 changes: 4 additions & 4 deletions src/Masa.Blazor.SomethingSkia/Watermark/MWatermark.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ public partial class MWatermark : BDomComponentBase

[Parameter] public string? Text { get; set; }

[Parameter] [MassApiParameter(16)] public int TextSize { get; set; } = 16;
[Parameter] [MasaApiParameter(16)] public int TextSize { get; set; } = 16;

[Parameter] [MassApiParameter(-22)] public int Rotate { get; set; } = -22;
[Parameter] [MasaApiParameter(-22)] public int Rotate { get; set; } = -22;

[Parameter] [MassApiParameter("new SKColor(0, 0, 0, 38)")]
[Parameter] [MasaApiParameter("new SKColor(0, 0, 0, 38)")]
public SKColor Color { get; set; } = s_defaultSkColor;

[Parameter] public RenderFragment? ChildContent { get; set; }
Expand All @@ -33,7 +33,7 @@ [Parameter] [MassApiParameter("new SKColor(0, 0, 0, 38)")]
/// <summary>
/// Determines whether the watermark is grayscale. Only works when <see cref="Image"/> is not null.
/// </summary>
[Parameter] [MassApiParameter(true)] public bool Grayscale { get; set; } = true;
[Parameter] [MasaApiParameter(true)] public bool Grayscale { get; set; } = true;

private static readonly SKColor s_defaultSkColor = new(0, 0, 0, 38);

Expand Down
4 changes: 2 additions & 2 deletions src/Masa.Blazor/Components/AppBar/MAppBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public partial class MAppBar : MToolbar, IScrollable, IAsyncDisposable
public bool CollapseOnScroll { get; set; }

[Parameter]
[MassApiParameter("window")]
[MasaApiParameter("window")]
public string ScrollTarget { get; set; } = "window";

/// <summary>
Expand Down Expand Up @@ -52,7 +52,7 @@ public partial class MAppBar : MToolbar, IScrollable, IAsyncDisposable
public bool ScrollOffScreen { get; set; }

[Parameter]
[MassApiParameter(true)]
[MasaApiParameter(true)]
public bool Value { get; set; } = true;

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions src/Masa.Blazor/Components/Autocomplete/MAutocomplete.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ public class MAutocomplete<TItem, TItemValue, TValue> : MSelect<TItem, TItemValu
private Func<TItem, string, string, bool>? _filter;

[Parameter]
[MassApiParameter(true)]
[MasaApiParameter(true)]
public bool AllowOverflow { get; set; } = true;

[Parameter]
public bool AutoSelectFirst { get; set; }

[Parameter]
[MassApiParameter("(item, query, text) => text.IndexOf(query, StringComparison.OrdinalIgnoreCase) > -1")]
[MasaApiParameter("(item, query, text) => text.IndexOf(query, StringComparison.OrdinalIgnoreCase) > -1")]
public Func<TItem, string, string, bool> Filter
{
get { return _filter ??= (_, query, text) => text.IndexOf(query, StringComparison.OrdinalIgnoreCase) > -1; }
Expand Down
2 changes: 1 addition & 1 deletion src/Masa.Blazor/Components/Avatar/MAvatar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public partial class MAvatar : BAvatar
public bool Tile { get; set; }

[Parameter]
[MassApiParameter(48)]
[MasaApiParameter(48)]
public StringNumber Size { get; set; } = 48;

[Parameter]
Expand Down
4 changes: 2 additions & 2 deletions src/Masa.Blazor/Components/Badge/MBadge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public partial class MBadge : BBadge, IBadge
public bool Bordered { get; set; }

[Parameter]
[MassApiParameter("primary")]
[MasaApiParameter("primary")]
public string? Color { get; set; } = "primary";

[Parameter]
Expand All @@ -37,7 +37,7 @@ public partial class MBadge : BBadge, IBadge
public bool Tile { get; set; }

[Parameter]
[MassApiParameter("scale-rotate-transition")]
[MasaApiParameter("scale-rotate-transition")]
public string Transition { get; set; } = "scale-rotate-transition";

[Parameter]
Expand Down
2 changes: 1 addition & 1 deletion src/Masa.Blazor/Components/Banner/MBanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public partial class MBanner : BBanner, IBanner
public string? Color { get; set; }

[Parameter]
[MassApiParameter(0)]
[MasaApiParameter(0)]
public StringNumber Elevation { get; set; } = "0";

[Parameter]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public MBottomNavigation() : base(GroupType.ButtonGroup)
public bool Grow { get; set; }

[Parameter]
[MassApiParameter(56)]
[MasaApiParameter(56)]
public StringNumber? Height { get; set; } = 56;

[Parameter]
Expand Down Expand Up @@ -59,7 +59,7 @@ public MBottomNavigation() : base(GroupType.ButtonGroup)
public bool Shift { get; set; }

[Parameter]
[MassApiParameter(true)]
[MasaApiParameter(true)]
public bool InputValue { get; set; } = true;

[Parameter]
Expand Down
6 changes: 3 additions & 3 deletions src/Masa.Blazor/Components/Card/MCard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ public partial class MCard : MSheet, ICard, IRoutable, ILoadable
[Parameter]
public string? Img { get; set; }

[Parameter, MassApiParameter(4)]
[Parameter, MasaApiParameter(4)]
public StringNumber LoaderHeight { get; set; } = 4;

[Parameter, MassApiParameter(false)]
[Parameter, MasaApiParameter(false)]
public StringBoolean Loading { get; set; } = false;

[Parameter]
Expand All @@ -57,7 +57,7 @@ public partial class MCard : MSheet, ICard, IRoutable, ILoadable
[Parameter]
public string? Href { get; set; }

[Parameter, MassApiParameter(true)]
[Parameter, MasaApiParameter(true)]
public bool Ripple { get; set; } = true;

[Parameter]
Expand Down
4 changes: 2 additions & 2 deletions src/Masa.Blazor/Components/Carousel/MCarousel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public bool Cycle
public string? DelimiterIcon { get; set; }

[Parameter]
[MassApiParameter(500)]
[MasaApiParameter(500)]
public StringNumber? Height
{
get => GetValue((StringNumber)500);
Expand All @@ -30,7 +30,7 @@ public StringNumber? Height
public bool HideDelimiterBackground { get; set; }

[Parameter]
[MassApiParameter(6000)]
[MasaApiParameter(6000)]
public int Interval
{
get => GetValue(6000);
Expand Down
2 changes: 1 addition & 1 deletion src/Masa.Blazor/Components/Cascader/MCascader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public partial class MCascader<TItem, TValue> : MSelect<TItem, TValue, TValue>,
[Parameter]
public bool ChangeOnSelect { get; set; }

[Parameter, MassApiParameter(true)]
[Parameter, MasaApiParameter(true)]
public bool ShowAllLevels { get; set; } = true;

[Parameter, EditorRequired]
Expand Down
2 changes: 1 addition & 1 deletion src/Masa.Blazor/Components/Chip/MChip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public partial class MChip : BChip, IThemeable, IChip, ISizeable
public bool Pill { get; set; }

[Parameter]
[MassApiParameter(true)]
[MasaApiParameter(true)]
public bool Ripple { get; set; } = true;

[Parameter]
Expand Down
4 changes: 2 additions & 2 deletions src/Masa.Blazor/Components/DataFilter/PDataFilter.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ public partial class PDataFilter : BDomComponentBase, IAsyncDisposable

[Parameter] public RenderFragment? ActionsContent { get; set; }

[Parameter] [MassApiParameter(true)] public bool Dense { get; set; } = true;
[Parameter] [MasaApiParameter(true)] public bool Dense { get; set; } = true;

[Parameter] public bool HideResetButton { get; set; }

[Parameter] public bool HideSearchButton { get; set; }

[Parameter] [MassApiParameter(true)] public StringBoolean? HideDetails { get; set; } = true;
[Parameter] [MasaApiParameter(true)] public StringBoolean? HideDetails { get; set; } = true;

[Parameter] public RenderFragment? HighFrequencyContent { get; set; }

Expand Down
16 changes: 8 additions & 8 deletions src/Masa.Blazor/Components/DataIterator/MDataFooter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class MDataFooter : BDataFooter, IDataFooter
[Inject]
protected MasaBlazor MasaBlazor { get; set; } = null!;

[Parameter, MassApiParameter("$masaBlazor.dataFooter.itemsPerPageText")]
[Parameter, MasaApiParameter("$masaBlazor.dataFooter.itemsPerPageText")]
public string? ItemsPerPageText { get; set; }

[Parameter, EditorRequired]
Expand All @@ -21,7 +21,7 @@ public class MDataFooter : BDataFooter, IDataFooter
public EventCallback<Action<DataOptions>> OnOptionsUpdate { get; set; }

[Parameter]
[MassApiParameter("new List<OneOf<int, DataItemsPerPageOption>>(){5, 10, 15, -1}")]
[MasaApiParameter("new List<OneOf<int, DataItemsPerPageOption>>(){5, 10, 15, -1}")]
public IEnumerable<OneOf<int, DataItemsPerPageOption>>? ItemsPerPageOptions { get; set; } = new List<OneOf<int, DataItemsPerPageOption>>()
{
5,
Expand All @@ -30,19 +30,19 @@ public class MDataFooter : BDataFooter, IDataFooter
-1
};

[Parameter, MassApiParameter("$prev")]
[Parameter, MasaApiParameter("$prev")]
public string? PrevIcon { get; set; } = "$prev";

[Parameter, MassApiParameter("$next")]
[Parameter, MasaApiParameter("$next")]
public string? NextIcon { get; set; } = "$next";

[Parameter, MassApiParameter("$last")]
[Parameter, MasaApiParameter("$last")]
public string? LastIcon { get; set; } = "$last";

[Parameter, MassApiParameter("$first")]
[Parameter, MasaApiParameter("$first")]
public string? FirstIcon { get; set; } = "$first";

[Parameter, MassApiParameter("$masaBlazor.dataFooter.itemsPerPageAll")]
[Parameter, MasaApiParameter("$masaBlazor.dataFooter.itemsPerPageAll")]
public string? ItemsPerPageAllText { get; set; }

[Parameter]
Expand All @@ -57,7 +57,7 @@ public class MDataFooter : BDataFooter, IDataFooter
[Parameter]
public bool DisableItemsPerPage { get; set; }

[Parameter, MassApiParameter("$masaBlazor.dataFooter.pageText")]
[Parameter, MasaApiParameter("$masaBlazor.dataFooter.pageText")]
public string? PageText { get; set; }

[Parameter]
Expand Down
7 changes: 3 additions & 4 deletions src/Masa.Blazor/Components/DataTable/MDataTable.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Components.Rendering;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.Web;

namespace Masa.Blazor
{
Expand Down Expand Up @@ -87,7 +86,7 @@ public class MDataTable<TItem> : MDataIterator<TItem>, IDataTable<TItem>, IMobil
public RenderFragment? ItemDataTableExpandContent { get; set; }

[Parameter]
[MassApiParameter("$expand")]
[MasaApiParameter("$expand")]
public string ExpandIcon { get; set; } = "$expand";

[Parameter]
Expand Down Expand Up @@ -119,7 +118,7 @@ public class MDataTable<TItem> : MDataIterator<TItem>, IDataTable<TItem>, IMobil
public bool OnRowContextmenuPreventDefault { get; set; }

[Parameter]
[MassApiParameter(ReleasedOn = "v1.0.4")]
[MasaApiParameter(ReleasedOn = "v1.0.4")]
public DataTableResizeMode ResizeMode
{
get => GetValue(DataTableResizeMode.None);
Expand Down
8 changes: 4 additions & 4 deletions src/Masa.Blazor/Components/DatePicker/MDatePicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public DatePickerType? ActivePicker
public bool Scrollable { get; set; }

[Parameter]
[MassApiParameter(true)]
[MasaApiParameter(true)]
public OneOf<DateOnly, bool> ShowCurrent { get; set; } = true;

[Parameter]
Expand All @@ -64,7 +64,7 @@ public DatePickerType? ActivePicker
public bool Landscape { get; set; }

[Parameter]
[MassApiParameter(290)]
[MasaApiParameter(290)]
public StringNumber Width { get; set; } = 290;

[Parameter]
Expand Down Expand Up @@ -117,11 +117,11 @@ public TValue? Value
public string? YearIcon { get; set; }

[Parameter]
[MassApiParameter("$next")]
[MasaApiParameter("$next")]
public string NextIcon { get; set; } = "$next";

[Parameter]
[MassApiParameter("$prev")]
[MasaApiParameter("$prev")]
public string PrevIcon { get; set; } = "$prev";

[Parameter]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ public partial class PDateDigitalClockPicker<TValue>: PDateTimePickerBase<TValue

[Parameter] public bool MultiSection { get; set; }

[Parameter] [MassApiParameter("TimeSpan.FromMinutes(30)")]
[Parameter] [MasaApiParameter("TimeSpan.FromMinutes(30)")]
public TimeSpan Step { get; set; } = TimeSpan.FromMinutes(30);

[Parameter] [MassApiParameter(1)]
[Parameter] [MasaApiParameter(1)]
public int HourStep { get; set; } = 1;

[Parameter] [MassApiParameter(1)]
[Parameter] [MasaApiParameter(1)]
public int MinuteStep { get; set; } = 1;

[Parameter] [MassApiParameter(1)]
[Parameter] [MasaApiParameter(1)]
public int SecondStep { get; set; } = 1;
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public partial class PDateTimePickerBase<TValue> : PDateTimePickerView<TValue>,

[Parameter] public RenderFragment<ActivatorProps>? ActivatorContent { get; set; }

[Parameter] [MassApiParameter(DateTimePickerViewType.Auto)]
[Parameter] [MasaApiParameter(DateTimePickerViewType.Auto)]
public DateTimePickerViewType ViewType { get; set; }

[Parameter] public string? TabItemTransition { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ public class PDateDigitalClockPickerViewBase<TValue> : PDateTimePickerViewBase<T

[Parameter] public bool MultiSection { get; set; }

[Parameter] [MassApiParameter("TimeSpan.FromMinutes(30)")]
[Parameter] [MasaApiParameter("TimeSpan.FromMinutes(30)")]
public TimeSpan Step { get; set; } = TimeSpan.FromMinutes(30);

[Parameter] [MassApiParameter(1)]
[Parameter] [MasaApiParameter(1)]
public int HourStep { get; set; } = 1;

[Parameter] [MassApiParameter(1)]
[Parameter] [MasaApiParameter(1)]
public int MinuteStep { get; set; } = 1;

[Parameter] [MassApiParameter(1)]
[Parameter] [MasaApiParameter(1)]
public int SecondStep { get; set; } = 1;
}
Loading

0 comments on commit 097c15e

Please sign in to comment.