Skip to content

Commit

Permalink
Formating
Browse files Browse the repository at this point in the history
  • Loading branch information
stsrki committed Nov 12, 2024
1 parent ff35474 commit c6a289b
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 85 deletions.
2 changes: 1 addition & 1 deletion Source/Blazorise/Components/Button/Button.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ protected override void OnInitialized()
{
ExecuteAfterRender( async () =>
{
await JSModule.Initialize( ElementRef, ElementId, new ButtonJSOptions {PreventDefaultOnSubmit =PreventDefaultOnSubmit });
await JSModule.Initialize( ElementRef, ElementId, new ButtonJSOptions { PreventDefaultOnSubmit = PreventDefaultOnSubmit } );
} );
}

Expand Down
18 changes: 9 additions & 9 deletions Source/Blazorise/Components/ColorPicker/ColorPicker.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ public override async Task SetParametersAsync( ParameterView parameters )
|| disabledChanged
|| readOnlyChanged ) )
{
ExecuteAfterRender(async () => await JSModule.UpdateOptions(ElementRef,ElementId,
ExecuteAfterRender( async () => await JSModule.UpdateOptions( ElementRef, ElementId,
new ColorPickerUpdateJsOptions
{
PaletteChange = new JSOptionChange<string[]>(paletteChanged, palette),
ShowPalette = new JSOptionChange<bool>(showPaletteChanged, showPalette),
HideAfterPaletteSelect = new JSOptionChange<bool>(hideAfterPaletteSelectChanged, hideAfterPaletteSelect),
Disabled = new JSOptionChange<bool>(disabledChanged, disabled),
ReadOnly = new JSOptionChange<bool>(readOnlyChanged, readOnly)
}));
PaletteChange = new JSOptionChange<string[]>( paletteChanged, palette ),
ShowPalette = new JSOptionChange<bool>( showPaletteChanged, showPalette ),
HideAfterPaletteSelect = new JSOptionChange<bool>( hideAfterPaletteSelectChanged, hideAfterPaletteSelect ),
Disabled = new JSOptionChange<bool>( disabledChanged, disabled ),
ReadOnly = new JSOptionChange<bool>( readOnlyChanged, readOnly )
} ) );


}
Expand Down Expand Up @@ -113,7 +113,7 @@ protected override async Task OnFirstAfterRenderAsync()
{
dotNetObjectRef ??= CreateDotNetObjectRef( value: this );

await JSModule.Initialize(dotNetObjectRef: dotNetObjectRef,elementRef: ElementRef,elementId: ElementId,
await JSModule.Initialize( dotNetObjectRef: dotNetObjectRef, elementRef: ElementRef, elementId: ElementId,
options: new ColorPickerJSOptions
{
Default = Color,
Expand All @@ -130,7 +130,7 @@ await JSModule.Initialize(dotNetObjectRef: dotNetObjectRef,elementRef: ElementRe
Localization = Localizer.GetStrings(),
ColorPreviewElementSelector = ColorPreviewElementSelector,
ColorValueElementSelector = ColorValueElementSelector
});
} );


await base.OnFirstAfterRenderAsync();
Expand Down
54 changes: 27 additions & 27 deletions Source/Blazorise/Components/DatePicker/DatePicker.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,22 +92,22 @@ public override async Task SetParametersAsync( ParameterView parameters )
{
ExecuteAfterRender( async () => await JSModule.UpdateOptions( ElementRef, ElementId, new DatePickerUpdateJSOptions()
{
FirstDayOfWeek = new JSOptionChange<int>(firstDayOfWeekChanged, (int)paramFirstDayOfWeek),
DisplayFormat = new JSOptionChange<string>(displayFormatChanged, DisplayFormatConverter.Convert(paramDisplayFormat)),
InputFormat = new JSOptionChange<string>(inputFormatChanged, InputFormatConverter.Convert(paramInputFormat)),
TimeAs24hr = new JSOptionChange<bool>(timeAs24hrChanged, paramTimeAs24hr),
Min = new JSOptionChange<string>(minChanged, paramMin?.ToString(DateFormat)),
Max = new JSOptionChange<string>(maxChanged, paramMax?.ToString(DateFormat)),
Disabled = new JSOptionChange<bool>(disabledChanged, paramDisabled),
ReadOnly = new JSOptionChange<bool>(readOnlyChanged, paramReadOnly),
DisabledDates = new JSOptionChange<IEnumerable<string>>(disabledDatesChanged, paramDisabledDates?.Select(x => FormatValueAsString(new TValue[] { x }))),
EnabledDates = new JSOptionChange<IEnumerable<string>>(enabledDatesChanged, paramEnabledDates?.Select(x => FormatValueAsString(new TValue[] { x }))),
DisabledDays = new JSOptionChange<IEnumerable<int>>(disabledDaysChanged, paramDisabledDays?.Select(x => (int)x)),
SelectionMode = new JSOptionChange<DateInputSelectionMode>(selectionModeChanged, paramSelectionMode),
Inline = new JSOptionChange<bool>(inlineChanged, paramInline),
DisableMobile = new JSOptionChange<bool>(disableMobileChanged, paramDisableMobile),
Placeholder = new JSOptionChange<string>(placeholderChanged, paramPlaceholder),
StaticPicker = new JSOptionChange<bool>(staticPickerChanged, paramSaticPicker),
FirstDayOfWeek = new JSOptionChange<int>( firstDayOfWeekChanged, (int)paramFirstDayOfWeek ),
DisplayFormat = new JSOptionChange<string>( displayFormatChanged, DisplayFormatConverter.Convert( paramDisplayFormat ) ),
InputFormat = new JSOptionChange<string>( inputFormatChanged, InputFormatConverter.Convert( paramInputFormat ) ),
TimeAs24hr = new JSOptionChange<bool>( timeAs24hrChanged, paramTimeAs24hr ),
Min = new JSOptionChange<string>( minChanged, paramMin?.ToString( DateFormat ) ),
Max = new JSOptionChange<string>( maxChanged, paramMax?.ToString( DateFormat ) ),
Disabled = new JSOptionChange<bool>( disabledChanged, paramDisabled ),
ReadOnly = new JSOptionChange<bool>( readOnlyChanged, paramReadOnly ),
DisabledDates = new JSOptionChange<IEnumerable<string>>( disabledDatesChanged, paramDisabledDates?.Select( x => FormatValueAsString( new TValue[] { x } ) ) ),
EnabledDates = new JSOptionChange<IEnumerable<string>>( enabledDatesChanged, paramEnabledDates?.Select( x => FormatValueAsString( new TValue[] { x } ) ) ),
DisabledDays = new JSOptionChange<IEnumerable<int>>( disabledDaysChanged, paramDisabledDays?.Select( x => (int)x ) ),
SelectionMode = new JSOptionChange<DateInputSelectionMode>( selectionModeChanged, paramSelectionMode ),
Inline = new JSOptionChange<bool>( inlineChanged, paramInline ),
DisableMobile = new JSOptionChange<bool>( disableMobileChanged, paramDisableMobile ),
Placeholder = new JSOptionChange<string>( placeholderChanged, paramPlaceholder ),
StaticPicker = new JSOptionChange<bool>( staticPickerChanged, paramSaticPicker ),
} ) );
}
}
Expand Down Expand Up @@ -166,33 +166,33 @@ protected override async Task OnFirstAfterRenderAsync()
else
defaultDate = FormatValueAsString( new TValue[] { Date } );

await JSModule.Initialize(dotNetObjectRef, ElementRef, ElementId, new DatePickerInitializeJSOptions
await JSModule.Initialize( dotNetObjectRef, ElementRef, ElementId, new DatePickerInitializeJSOptions
{
InputMode = InputMode,
SelectionMode = SelectionMode.ToDateInputSelectionMode(),
FirstDayOfWeek = (int)FirstDayOfWeek,
DisplayFormat = DisplayFormatConverter.Convert(DisplayFormat),
InputFormat = InputFormatConverter.Convert(InputFormat),
DisplayFormat = DisplayFormatConverter.Convert( DisplayFormat ),
InputFormat = InputFormatConverter.Convert( InputFormat ),
TimeAs24hr = TimeAs24hr,
DefaultDate = defaultDate,
Min = Min?.ToString(DateFormat),
Max = Max?.ToString(DateFormat),
Min = Min?.ToString( DateFormat ),
Max = Max?.ToString( DateFormat ),
Disabled = Disabled,
ReadOnly = ReadOnly,
DisabledDates = DisabledDates?.Select(x => FormatValueAsString(new TValue[] { x })),
EnabledDates = EnabledDates?.Select(x => FormatValueAsString(new TValue[] { x })),
DisabledDays = DisabledDays?.Select(x => (int)x),
DisabledDates = DisabledDates?.Select( x => FormatValueAsString( new TValue[] { x } ) ),
EnabledDates = EnabledDates?.Select( x => FormatValueAsString( new TValue[] { x } ) ),
DisabledDays = DisabledDays?.Select( x => (int)x ),
Localization = GetLocalizationObject(),
Inline = Inline,
DisableMobile = DisableMobile,
Placeholder = Placeholder,
StaticPicker = StaticPicker,
ValidationStatus = new
{
SuccessClass = ClassProvider.DatePickerValidation(ValidationStatus.Success),
ErrorClass = ClassProvider.DatePickerValidation(ValidationStatus.Error),
SuccessClass = ClassProvider.DatePickerValidation( ValidationStatus.Success ),
ErrorClass = ClassProvider.DatePickerValidation( ValidationStatus.Error ),
}
});
} );


await base.OnFirstAfterRenderAsync();
Expand Down
4 changes: 2 additions & 2 deletions Source/Blazorise/Components/InputMask/InputMask.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ protected override async Task OnFirstAfterRenderAsync()
{
dotNetObjectRef ??= CreateDotNetObjectRef( this );

await JSModule.Initialize(dotNetObjectRef, ElementRef, ElementId, new InputMaskInitializeJSOptions
await JSModule.Initialize( dotNetObjectRef, ElementRef, ElementId, new InputMaskInitializeJSOptions
{
Mask = Mask,
Regex = Regex,
Expand All @@ -86,7 +86,7 @@ protected override async Task OnFirstAfterRenderAsync()
ClearIncomplete = ClearIncomplete,
Disabled = Disabled,
ReadOnly = ReadOnly,
});
} );


await base.OnFirstAfterRenderAsync();
Expand Down
16 changes: 8 additions & 8 deletions Source/Blazorise/Components/MemoEdit/MemoEdit.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ public override async Task SetParametersAsync( ParameterView parameters )
|| softTabsChanged
|| autoSizeChanged ) )
{
ExecuteAfterRender(async () => await JSModule.UpdateOptions(ElementRef, ElementId, new MemoEditUpdateJSOptions
ExecuteAfterRender( async () => await JSModule.UpdateOptions( ElementRef, ElementId, new MemoEditUpdateJSOptions
{
ReplaceTab = new JSOptionChange<bool>(replaceTabChanged, paramReplaceTab),
TabSize = new JSOptionChange<int>(tabSizeChanged, paramTabSize),
SoftTabs = new JSOptionChange<bool>(softTabsChanged, paramSoftTabs),
AutoSize = new JSOptionChange<bool>(autoSizeChanged, paramAutoSize),
}));
ReplaceTab = new JSOptionChange<bool>( replaceTabChanged, paramReplaceTab ),
TabSize = new JSOptionChange<int>( tabSizeChanged, paramTabSize ),
SoftTabs = new JSOptionChange<bool>( softTabsChanged, paramSoftTabs ),
AutoSize = new JSOptionChange<bool>( autoSizeChanged, paramAutoSize ),
} ) );

}

Expand Down Expand Up @@ -100,13 +100,13 @@ protected override void OnInitialized()
/// <inheritdoc/>
protected async override Task OnFirstAfterRenderAsync()
{
await JSModule.Initialize(ElementRef, ElementId, new MemoEditInitializeJSOptions
await JSModule.Initialize( ElementRef, ElementId, new MemoEditInitializeJSOptions
{
ReplaceTab = ReplaceTab,
TabSize = TabSize,
SoftTabs = SoftTabs,
AutoSize = AutoSize,
});
} );


await base.OnFirstAfterRenderAsync();
Expand Down
40 changes: 20 additions & 20 deletions Source/Blazorise/Components/NumericPicker/NumericPicker.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,25 +115,25 @@ public override async Task SetParametersAsync( ParameterView parameters )
|| allowDecimalPaddingChanged || alwaysAllowDecimalSeparatorChanged
|| modifyValueOnWheelChanged )
{
ExecuteAfterRender(async () => await JSModule.UpdateOptions(ElementRef, ElementId, new NumericPickerUpdateJSOptions
ExecuteAfterRender( async () => await JSModule.UpdateOptions( ElementRef, ElementId, new NumericPickerUpdateJSOptions
{
Decimals = new JSOptionChange<int>(decimalsChanged, GetDecimals()),
DecimalSeparator = new JSOptionChange<string>(decimalSeparatorChanged, paramDecimalSeparator),
AlternativeDecimalSeparator = new JSOptionChange<string>(alternativeDecimalSeparatorChanged, paramAlternativeDecimalSeparator),
GroupSeparator = new JSOptionChange<string>(groupSeparatorChanged, paramGroupSeparator),
GroupSpacing = new JSOptionChange<string>(groupSpacingChanged, paramGroupSpacing),
CurrencySymbol = new JSOptionChange<string>(currencySymbolChanged, paramCurrencySymbol),
CurrencySymbolPlacement = new JSOptionChange<string>(currencySymbolPlacementChanged, paramCurrencySymbolPlacement.ToCurrencySymbolPlacement()),
RoundingMethod = new JSOptionChange<string>(roundingMethodChanged, paramRoundingMethod.ToNumericRoundingMethod()),
AllowDecimalPadding = new JSOptionChange<object>(allowDecimalPaddingChanged, paramAllowDecimalPadding.ToNumericDecimalPadding()),
AlwaysAllowDecimalSeparator = new JSOptionChange<bool>(alwaysAllowDecimalSeparatorChanged, paramAlwaysAllowDecimalSeparator),
Min = new JSOptionChange<object>(minChanged, paramMin),
Max = new JSOptionChange<object>(maxChanged, paramMax),
MinMaxLimitsOverride = new JSOptionChange<object>(minMaxLimitsOverrideChanged, paramMinMaxLimitsOverride),
SelectAllOnFocus = new JSOptionChange<bool>(selectAllOnFocusChanged, paramSelectAllOnFocus),
ModifyValueOnWheel = new JSOptionChange<bool>(modifyValueOnWheelChanged, paramModifyValueOnWheel),
WheelOn = new JSOptionChange<object>(wheelOnChanged, paramWheelOn.ToNumericWheelOn()),
}));
Decimals = new JSOptionChange<int>( decimalsChanged, GetDecimals() ),
DecimalSeparator = new JSOptionChange<string>( decimalSeparatorChanged, paramDecimalSeparator ),
AlternativeDecimalSeparator = new JSOptionChange<string>( alternativeDecimalSeparatorChanged, paramAlternativeDecimalSeparator ),
GroupSeparator = new JSOptionChange<string>( groupSeparatorChanged, paramGroupSeparator ),
GroupSpacing = new JSOptionChange<string>( groupSpacingChanged, paramGroupSpacing ),
CurrencySymbol = new JSOptionChange<string>( currencySymbolChanged, paramCurrencySymbol ),
CurrencySymbolPlacement = new JSOptionChange<string>( currencySymbolPlacementChanged, paramCurrencySymbolPlacement.ToCurrencySymbolPlacement() ),
RoundingMethod = new JSOptionChange<string>( roundingMethodChanged, paramRoundingMethod.ToNumericRoundingMethod() ),
AllowDecimalPadding = new JSOptionChange<object>( allowDecimalPaddingChanged, paramAllowDecimalPadding.ToNumericDecimalPadding() ),
AlwaysAllowDecimalSeparator = new JSOptionChange<bool>( alwaysAllowDecimalSeparatorChanged, paramAlwaysAllowDecimalSeparator ),
Min = new JSOptionChange<object>( minChanged, paramMin ),
Max = new JSOptionChange<object>( maxChanged, paramMax ),
MinMaxLimitsOverride = new JSOptionChange<object>( minMaxLimitsOverrideChanged, paramMinMaxLimitsOverride ),
SelectAllOnFocus = new JSOptionChange<bool>( selectAllOnFocusChanged, paramSelectAllOnFocus ),
ModifyValueOnWheel = new JSOptionChange<bool>( modifyValueOnWheelChanged, paramModifyValueOnWheel ),
WheelOn = new JSOptionChange<object>( wheelOnChanged, paramWheelOn.ToNumericWheelOn() ),
} ) );

}
}
Expand Down Expand Up @@ -179,7 +179,7 @@ protected override async Task OnFirstAfterRenderAsync()
// find the min and max possible value based on the supplied value type
var (minFromType, maxFromType) = Converters.GetMinMaxValueOfType<TValue>();

await JSModule.Initialize(dotNetObjectRef, ElementRef, ElementId, new NumericPickerInitializeJSOptions
await JSModule.Initialize( dotNetObjectRef, ElementRef, ElementId, new NumericPickerInitializeJSOptions
{
Value = Value,
Immediate = IsImmediate,
Expand All @@ -204,7 +204,7 @@ protected override async Task OnFirstAfterRenderAsync()
SelectAllOnFocus = SelectAllOnFocus,
ModifyValueOnWheel = ModifyValueOnWheel,
WheelOn = WheelOn.ToNumericWheelOn(),
});
} );

await base.OnFirstAfterRenderAsync();
}
Expand Down
Loading

0 comments on commit c6a289b

Please sign in to comment.