From e46fbcbf479486af2005fc87d9b42a4d2729d472 Mon Sep 17 00:00:00 2001 From: capdiem Date: Wed, 15 May 2024 16:27:55 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A=20refactor(Picker):=20move=20code?= =?UTF-8?q?=20to=20Masa.Blazor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DatePicker/DatePicker/BDatePicker.razor | 41 -------- .../DatePicker/BDatePicker.razor.cs | 53 ---------- .../DatePickerAbstractProviderExtensitions.cs | 14 --- .../DateTable/BDatePickerDateTable.razor | 6 -- .../DateTable/BDatePickerDateTable.razor.cs | 7 -- .../DatePicker/DatePicker/IDatePicker.cs | 7 -- .../MonthTable/BDatePickerMonthTable.razor | 6 -- .../MonthTable/BDatePickerMonthTable.razor.cs | 7 -- .../TableHeader/BDatePickerTableHeader.razor | 6 -- .../BDatePickerTableHeader.razor.cs | 7 -- .../DatePicker/Years/BDatePickerYears.razor | 5 - .../Years/BDatePickerYears.razor.cs | 6 -- .../DatePickerHeader/BDatePickerHeader.razor | 12 --- .../BDatePickerHeader.razor.cs | 34 ------- .../Btn/BDatePickerHeaderBtn.razor | 11 --- .../Btn/BDatePickerHeaderBtn.razor.cs | 15 --- ...ickerHeaderAbstractProviderExtensitions.cs | 12 --- .../Header/BDatePickerHeaderHeader.razor | 21 ---- .../Header/BDatePickerHeaderHeader.razor.cs | 15 --- .../DatePickerHeader/IDatePickerHeader.cs | 21 ---- .../BDatePickerDateTableSlot.razor | 6 -- .../BDatePickerDateTableSlot.razor.cs | 7 -- ...erDateTableAbstractProviderExtensitions.cs | 15 --- .../IDatePickerDateTable.cs | 17 ---- .../TBody/BDatePickerDateTableTBody.razor | 43 -------- .../TBody/BDatePickerDateTableTBody.razor.cs | 97 ------------------- .../BDatePickerDateTableWeekNumber.razor | 10 -- .../BDatePickerDateTableWeekNumber.razor.cs | 8 -- .../THead/BDatePickerDateTableTHead.razor | 23 ----- .../THead/BDatePickerDateTableTHead.razor.cs | 9 -- .../THead/TR/BDatePickerDateTableTR.razor | 7 -- .../THead/TR/BDatePickerDateTableTR.razor.cs | 8 -- .../BDatePickerMonthTableSlot.razor | 7 -- .../BDatePickerMonthTableSlot.razor.cs | 7 -- .../DatePickerMonthTableAbstractProvider.cs | 12 --- .../IDatePickerMonthTable.cs | 7 -- .../TBody/BDatePickerMonthTableTBody.razor | 26 ----- .../TBody/BDatePickerMonthTableTBody.razor.cs | 7 -- .../DatePickerTable/BDatePickerTable.razor | 15 --- .../DatePickerTable/BDatePickerTable.razor.cs | 37 ------- .../BDatePickerTableSlot.razor | 6 -- .../BDatePickerTableSlot.razor.cs | 6 -- .../Button/BDatePickerTableButton.razor | 11 --- .../Button/BDatePickerTableButton.razor.cs | 18 ---- .../Events/BDatePickerTableEvents.razor | 19 ---- .../Events/BDatePickerTableEvents.razor.cs | 50 ---------- ...PickerTableAbstractProviderExtensitions.cs | 13 --- .../DatePickerTable/IDatePickerTable.cs | 14 --- .../DatePickerTitle/BDatePickerTitle.razor | 7 -- .../DatePickerTitle/BDatePickerTitle.razor.cs | 6 -- ...tePickerTitleAbstractProviderExtensions.cs | 15 --- .../DatePickerTitle/IDatePickerTitle.cs | 21 ---- .../TitleDate/BDatePickerTitleTitleDate.razor | 6 -- .../BDatePickerTitleTitleDate.razor.cs | 7 -- .../TitleText/BDatePickerTitleTitleText.razor | 10 -- .../BDatePickerTitleTitleText.razor.cs | 11 --- .../YearBtn/BDatePickerTitleYearBtn.razor | 17 ---- .../YearBtn/BDatePickerTitleYearBtn.razor.cs | 11 --- .../BPickerTitlePickerButton.razor | 8 -- .../BPickerTitlePickerButton.razor.cs | 14 --- .../YearIcon/BDatePickerTitleYearIcon.razor | 7 -- .../BDatePickerTitleYearIcon.razor.cs | 7 -- .../DatePickerYears/BDatePickerYears.razor | 7 -- .../DatePickerYears/BDatePickerYears.razor.cs | 6 -- ...PickerYearsAbstractProviderExtensitions.cs | 12 --- .../DatePickerYears/IDatePickerYears.cs | 15 --- .../YearItems/BDatePickerYearsYearItems.razor | 15 --- .../BDatePickerYearsYearItems.razor.cs | 11 --- .../YearItem/BDatePickerYearsYearItem.razor | 11 --- .../BDatePickerYearsYearItem.razor.cs | 14 --- .../Picker/Actions/BPickerActions.razor | 11 --- .../Picker/Actions/BPickerActions.razor.cs | 7 -- .../Components/Picker/BPicker.razor | 17 ---- .../Components/Picker/BPicker.razor.cs | 43 -------- .../Components/Picker/Body/BPickerBody.razor | 8 -- .../Picker/Body/BPickerBody.razor.cs | 7 -- .../BPickerBodyTransition.razor | 7 -- .../BPickerBodyTransition.razor.cs | 11 --- .../Components/Picker/IPicker.cs | 15 --- .../PickerAbstractProviderExtensitions.cs | 14 --- .../Picker/Title/BPickerTitle.razor | 8 -- .../Picker/Title/BPickerTitle.razor.cs | 7 -- .../{TimePickerTitle => }/SelectingTimes.cs | 0 .../TimePicker/{TimePicker => }/TimeFormat.cs | 0 .../TimePicker/TimePicker/BTimePicker.razor | 20 ---- .../TimePicker/BTimePicker.razor.cs | 11 --- .../TimePicker/TimePicker/ITimePicker.cs | 19 ---- .../PickerBody/BTimePickerPickerBody.razor | 12 --- .../PickerBody/BTimePickerPickerBody.razor.cs | 11 --- .../ClockAmPm/BTimePickerClockAmPm.razor | 9 -- .../ClockAmPm/BTimePickerClockAmPm.razor.cs | 13 --- .../TimePickerAbstractProviderExtensitions.cs | 13 --- .../TimePickerClock/BTimePickerClock.razor | 15 --- .../TimePickerClock/BTimePickerClock.razor.cs | 62 ------------ .../Hand/BTimePickerClockHand.razor | 7 -- .../Hand/BTimePickerClockHand.razor.cs | 6 -- .../TimePickerClock/ITimePickerClock.cs | 13 --- ...PickerClockAbstractProviderExtensitions.cs | 12 --- .../Values/BTimePickerClockValues.razor | 11 --- .../Values/BTimePickerClockValues.razor.cs | 13 --- .../AmPm/BTimePickerTitleAmPm.razor | 15 --- .../AmPm/BTimePickerTitleAmPm.razor.cs | 17 ---- .../TimePickerTitle/BTimePickerTitle.razor | 11 --- .../TimePickerTitle/BTimePickerTitle.razor.cs | 10 -- .../TimePickerTitle/ITimePickerTitle.cs | 31 ------ .../Time/BTimePickerTitleTime.razor | 15 --- .../Time/BTimePickerTitleTime.razor.cs | 19 ---- ...PickerTitleAbstractProviderExtensitions.cs | 13 --- 108 files changed, 1582 deletions(-) delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePicker/BDatePicker.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePicker/BDatePicker.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePicker/DatePickerAbstractProviderExtensitions.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePicker/DateTable/BDatePickerDateTable.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePicker/DateTable/BDatePickerDateTable.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePicker/IDatePicker.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePicker/MonthTable/BDatePickerMonthTable.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePicker/MonthTable/BDatePickerMonthTable.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePicker/TableHeader/BDatePickerTableHeader.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePicker/TableHeader/BDatePickerTableHeader.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePicker/Years/BDatePickerYears.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePicker/Years/BDatePickerYears.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/BDatePickerHeader.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/BDatePickerHeader.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/Btn/BDatePickerHeaderBtn.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/Btn/BDatePickerHeaderBtn.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/DatePickerHeaderAbstractProviderExtensitions.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/Header/BDatePickerHeaderHeader.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/Header/BDatePickerHeaderHeader.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/IDatePickerHeader.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/BDatePickerDateTableSlot.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/BDatePickerDateTableSlot.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/DatePickerDateTableAbstractProviderExtensitions.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/IDatePickerDateTable.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/TBody/BDatePickerDateTableTBody.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/TBody/BDatePickerDateTableTBody.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/TBody/WeekNumber/BDatePickerDateTableWeekNumber.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/TBody/WeekNumber/BDatePickerDateTableWeekNumber.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/THead/BDatePickerDateTableTHead.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/THead/BDatePickerDateTableTHead.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/THead/TR/BDatePickerDateTableTR.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/THead/TR/BDatePickerDateTableTR.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/BDatePickerMonthTableSlot.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/BDatePickerMonthTableSlot.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/DatePickerMonthTableAbstractProvider.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/IDatePickerMonthTable.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/TBody/BDatePickerMonthTableTBody.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/TBody/BDatePickerMonthTableTBody.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/BDatePickerTable.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/BDatePickerTable.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/BDatePickerTableSlot.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/BDatePickerTableSlot.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/Button/BDatePickerTableButton.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/Button/BDatePickerTableButton.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/Button/Events/BDatePickerTableEvents.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/Button/Events/BDatePickerTableEvents.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/DatePickerTableAbstractProviderExtensitions.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/IDatePickerTable.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/BDatePickerTitle.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/BDatePickerTitle.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/DatePickerTitleAbstractProviderExtensions.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/IDatePickerTitle.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/TitleDate/BDatePickerTitleTitleDate.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/TitleDate/BDatePickerTitleTitleDate.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/TitleDate/TitleText/BDatePickerTitleTitleText.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/TitleDate/TitleText/BDatePickerTitleTitleText.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/BDatePickerTitleYearBtn.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/BDatePickerTitleYearBtn.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/PickerButton/BPickerTitlePickerButton.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/PickerButton/BPickerTitlePickerButton.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/YearIcon/BDatePickerTitleYearIcon.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/YearIcon/BDatePickerTitleYearIcon.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/BDatePickerYears.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/BDatePickerYears.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/DatePickerYearsAbstractProviderExtensitions.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/IDatePickerYears.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/YearItems/BDatePickerYearsYearItems.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/YearItems/BDatePickerYearsYearItems.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/YearItems/YearItem/BDatePickerYearsYearItem.razor delete mode 100644 src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/YearItems/YearItem/BDatePickerYearsYearItem.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/Picker/Actions/BPickerActions.razor delete mode 100644 src/Component/BlazorComponent/Components/Picker/Actions/BPickerActions.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/Picker/BPicker.razor delete mode 100644 src/Component/BlazorComponent/Components/Picker/BPicker.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/Picker/Body/BPickerBody.razor delete mode 100644 src/Component/BlazorComponent/Components/Picker/Body/BPickerBody.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/Picker/Body/BodyTransition/BPickerBodyTransition.razor delete mode 100644 src/Component/BlazorComponent/Components/Picker/Body/BodyTransition/BPickerBodyTransition.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/Picker/IPicker.cs delete mode 100644 src/Component/BlazorComponent/Components/Picker/PickerAbstractProviderExtensitions.cs delete mode 100644 src/Component/BlazorComponent/Components/Picker/Title/BPickerTitle.razor delete mode 100644 src/Component/BlazorComponent/Components/Picker/Title/BPickerTitle.razor.cs rename src/Component/BlazorComponent/Components/TimePicker/{TimePickerTitle => }/SelectingTimes.cs (100%) rename src/Component/BlazorComponent/Components/TimePicker/{TimePicker => }/TimeFormat.cs (100%) delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePicker/BTimePicker.razor delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePicker/BTimePicker.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePicker/ITimePicker.cs delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePicker/PickerBody/BTimePickerPickerBody.razor delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePicker/PickerBody/BTimePickerPickerBody.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePicker/PickerBody/ClockAmPm/BTimePickerClockAmPm.razor delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePicker/PickerBody/ClockAmPm/BTimePickerClockAmPm.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePicker/TimePickerAbstractProviderExtensitions.cs delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/BTimePickerClock.razor delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/BTimePickerClock.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/Hand/BTimePickerClockHand.razor delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/Hand/BTimePickerClockHand.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/ITimePickerClock.cs delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/TimePickerClockAbstractProviderExtensitions.cs delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/Values/BTimePickerClockValues.razor delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/Values/BTimePickerClockValues.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/AmPm/BTimePickerTitleAmPm.razor delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/AmPm/BTimePickerTitleAmPm.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/BTimePickerTitle.razor delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/BTimePickerTitle.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/ITimePickerTitle.cs delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/Time/BTimePickerTitleTime.razor delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/Time/BTimePickerTitleTime.razor.cs delete mode 100644 src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/TimePickerTitleAbstractProviderExtensitions.cs diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/BDatePicker.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePicker/BDatePicker.razor deleted file mode 100644 index a24a60740..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/BDatePicker.razor +++ /dev/null @@ -1,41 +0,0 @@ -@namespace BlazorComponent -@inherits BDomComponentBase - - - @{ - //We want default to be null,so that BPicker Title will render nothing - var titleContent = (RenderFragment?)null; - @if (!NoTitle) - { - titleContent =@; - } - } - - - - - @if (InternalActivePicker == DatePickerType.Year) - { - @RenderPart(typeof(BDatePickerYears<>)) - } - else - { - @RenderPart(typeof(BDatePickerTableHeader<>)) - if (InternalActivePicker == DatePickerType.Date) - { - @RenderPart(typeof(BDatePickerDateTable<>)) - } - else - { - @RenderPart(typeof(BDatePickerMonthTable<>)) - } - } - - - - - - diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/BDatePicker.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePicker/BDatePicker.razor.cs deleted file mode 100644 index e08a8c5e7..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/BDatePicker.razor.cs +++ /dev/null @@ -1,53 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePicker - { - [Parameter] - public bool NoTitle { get; set; } - - [Parameter] - public DatePickerType Type { get; set; } = DatePickerType.Date; - - [Parameter] - public RenderFragment? ChildContent { get; set; } - - [Parameter] - public bool Dark { get; set; } - - [Parameter] - public bool Light { get; set; } - - [CascadingParameter(Name = "IsDark")] - public bool CascadingIsDark { get; set; } - - public bool IsDark - { - get - { - if (Dark) - { - return true; - } - - if (Light) - { - return false; - } - - return CascadingIsDark; - } - } - - protected DatePickerType InternalActivePicker - { - get - { - return GetValue(); - } - set - { - SetValue(value); - } - } - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/DatePickerAbstractProviderExtensitions.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePicker/DatePickerAbstractProviderExtensitions.cs deleted file mode 100644 index 289d76c6a..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/DatePickerAbstractProviderExtensitions.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace BlazorComponent -{ - public static class DatePickerAbstractProviderExtensitions - { - public static ComponentAbstractProvider ApplyDatePickerDefault(this ComponentAbstractProvider abstractProvider) - { - return abstractProvider - .Apply(typeof(BDatePickerYears<>), typeof(BDatePickerYears)) - .Apply(typeof(BDatePickerTableHeader<>), typeof(BDatePickerTableHeader)) - .Apply(typeof(BDatePickerDateTable<>), typeof(BDatePickerDateTable)) - .Apply(typeof(BDatePickerMonthTable<>), typeof(BDatePickerMonthTable)); - } - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/DateTable/BDatePickerDateTable.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePicker/DateTable/BDatePickerDateTable.razor deleted file mode 100644 index 56bb9e7e4..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/DateTable/BDatePickerDateTable.razor +++ /dev/null @@ -1,6 +0,0 @@ -@namespace BlazorComponent -@typeparam TDatePicker -@inherits ComponentPartBase - - - diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/DateTable/BDatePickerDateTable.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePicker/DateTable/BDatePickerDateTable.razor.cs deleted file mode 100644 index 11938a421..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/DateTable/BDatePickerDateTable.razor.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerDateTable where TDatePicker : IDatePicker - { - - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/IDatePicker.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePicker/IDatePicker.cs deleted file mode 100644 index f4b54d28f..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/IDatePicker.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace BlazorComponent -{ - public interface IDatePicker : IHasProviderComponent - { - - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/MonthTable/BDatePickerMonthTable.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePicker/MonthTable/BDatePickerMonthTable.razor deleted file mode 100644 index 056c8faa5..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/MonthTable/BDatePickerMonthTable.razor +++ /dev/null @@ -1,6 +0,0 @@ -@namespace BlazorComponent -@typeparam TDatePicker -@inherits ComponentPartBase - - - diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/MonthTable/BDatePickerMonthTable.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePicker/MonthTable/BDatePickerMonthTable.razor.cs deleted file mode 100644 index b1de8b1b0..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/MonthTable/BDatePickerMonthTable.razor.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerMonthTable where TDatePicker : IDatePicker - { - - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/TableHeader/BDatePickerTableHeader.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePicker/TableHeader/BDatePickerTableHeader.razor deleted file mode 100644 index 8101bf744..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/TableHeader/BDatePickerTableHeader.razor +++ /dev/null @@ -1,6 +0,0 @@ -@namespace BlazorComponent -@typeparam TDatePicker -@inherits ComponentPartBase - - - diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/TableHeader/BDatePickerTableHeader.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePicker/TableHeader/BDatePickerTableHeader.razor.cs deleted file mode 100644 index 363815e86..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/TableHeader/BDatePickerTableHeader.razor.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerTableHeader where TDatePicker : IDatePicker - { - - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/Years/BDatePickerYears.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePicker/Years/BDatePickerYears.razor deleted file mode 100644 index e2b12ea48..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/Years/BDatePickerYears.razor +++ /dev/null @@ -1,5 +0,0 @@ -@namespace BlazorComponent -@typeparam TDatePicker -@inherits ComponentPartBase - - diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/Years/BDatePickerYears.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePicker/Years/BDatePickerYears.razor.cs deleted file mode 100644 index 0046ac55e..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePicker/Years/BDatePickerYears.razor.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerYears where TDatePicker : IDatePicker - { - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/BDatePickerHeader.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/BDatePickerHeader.razor deleted file mode 100644 index 853c954c5..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/BDatePickerHeader.razor +++ /dev/null @@ -1,12 +0,0 @@ -@namespace BlazorComponent -@inherits BDomComponentBase - - -
- @RenderPart(typeof(BDatePickerHeaderBtn<>),-1,arg0Name:"Change") - @RenderPart(typeof(BDatePickerHeaderHeader<>)) - @RenderPart(typeof(BDatePickerHeaderBtn<>),+1,arg0Name:"Change") -
-
- - diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/BDatePickerHeader.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/BDatePickerHeader.razor.cs deleted file mode 100644 index 2cfee74f3..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/BDatePickerHeader.razor.cs +++ /dev/null @@ -1,34 +0,0 @@ -using Microsoft.AspNetCore.Components; - -namespace BlazorComponent -{ - public partial class BDatePickerHeader : BDomComponentBase, IThemeable - { - [Parameter] - public bool Dark { get; set; } - - [Parameter] - public bool Light { get; set; } - - [CascadingParameter(Name = "IsDark")] - public bool CascadingIsDark { get; set; } - - public bool IsDark - { - get - { - if (Dark) - { - return true; - } - - if (Light) - { - return false; - } - - return CascadingIsDark; - } - } - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/Btn/BDatePickerHeaderBtn.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/Btn/BDatePickerHeaderBtn.razor deleted file mode 100644 index f21f65917..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/Btn/BDatePickerHeaderBtn.razor +++ /dev/null @@ -1,11 +0,0 @@ -@namespace BlazorComponent -@typeparam TDatePickerHeader -@inherits ComponentPartBase - -@*TODO: arialLabel*@ - - - @((Change < 0) == !RTL ? PrevIcon : NextIcon) - - - diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/Btn/BDatePickerHeaderBtn.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/Btn/BDatePickerHeaderBtn.razor.cs deleted file mode 100644 index b01cbdf8c..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/Btn/BDatePickerHeaderBtn.razor.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerHeaderBtn - where TDatePickerHeader : IDatePickerHeader - { - [Parameter] - public int Change { get; set; } - - public bool RTL => Component.RTL; - - public string PrevIcon => Component.PrevIcon; - - public string NextIcon => Component.NextIcon; - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/DatePickerHeaderAbstractProviderExtensitions.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/DatePickerHeaderAbstractProviderExtensitions.cs deleted file mode 100644 index 00f13c68a..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/DatePickerHeaderAbstractProviderExtensitions.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace BlazorComponent -{ - public static class DatePickerHeaderAbstractProviderExtensitions - { - public static ComponentAbstractProvider ApplyDatePickerHeaderDefault(this ComponentAbstractProvider abstractProvider) - { - return abstractProvider - .Apply(typeof(BDatePickerHeaderHeader<>), typeof(BDatePickerHeaderHeader)) - .Apply(typeof(BDatePickerHeaderBtn<>), typeof(BDatePickerHeaderBtn)); - } - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/Header/BDatePickerHeaderHeader.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/Header/BDatePickerHeaderHeader.razor deleted file mode 100644 index 5b284e0c6..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/Header/BDatePickerHeaderHeader.razor +++ /dev/null @@ -1,21 +0,0 @@ -@namespace BlazorComponent -@typeparam TDatePickerHeader -@inherits ComponentPartBase - -
- - - - - -
- diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/Header/BDatePickerHeaderHeader.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/Header/BDatePickerHeaderHeader.razor.cs deleted file mode 100644 index 602115618..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/Header/BDatePickerHeaderHeader.razor.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerHeaderHeader where TDatePickerHeader : IDatePickerHeader - { - public string? Transition => Component.Transition; - - public DateOnly Value => Component.Value; - - public RenderFragment? ComponentChildContent => Component.ChildContent; - - public Dictionary HeaderAttrs => Component.ButtonAttrs; - - public Func Formatter => Component.Formatter; - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/IDatePickerHeader.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/IDatePickerHeader.cs deleted file mode 100644 index bbf34e943..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerHeader/IDatePickerHeader.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace BlazorComponent -{ - public interface IDatePickerHeader : IHasProviderComponent - { - bool RTL { get; } - - string? PrevIcon { get; } - - string? NextIcon { get; } - - string? Transition { get; } - - DateOnly Value { get; } - - Dictionary ButtonAttrs { get; } - - RenderFragment? ChildContent { get; } - - Func Formatter { get; } - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/BDatePickerDateTableSlot.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/BDatePickerDateTableSlot.razor deleted file mode 100644 index 9929025cf..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/BDatePickerDateTableSlot.razor +++ /dev/null @@ -1,6 +0,0 @@ -@namespace BlazorComponent -@typeparam TDatePickerDateTable -@inherits ComponentPartBase - -@RenderPart(typeof(BDatePickerDateTableTHead<>)) -@RenderPart(typeof(BDatePickerDateTableTBody<>)) diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/BDatePickerDateTableSlot.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/BDatePickerDateTableSlot.razor.cs deleted file mode 100644 index f025b16ab..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/BDatePickerDateTableSlot.razor.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerDateTableSlot where TDatePickerDateTable : IDatePickerDateTable - { - - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/DatePickerDateTableAbstractProviderExtensitions.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/DatePickerDateTableAbstractProviderExtensitions.cs deleted file mode 100644 index e44e188f8..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/DatePickerDateTableAbstractProviderExtensitions.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace BlazorComponent -{ - public static class DatePickerDateTableAbstractProviderExtensitions - { - public static ComponentAbstractProvider ApplyDatePickerDateTableDefault(this ComponentAbstractProvider abstractProvider) - { - return abstractProvider - .Merge(typeof(BDatePickerTableSlot<>), typeof(BDatePickerDateTableSlot)) - .Apply(typeof(BDatePickerDateTableTHead<>), typeof(BDatePickerDateTableTHead)) - .Apply(typeof(BDatePickerDateTableTR<>), typeof(BDatePickerDateTableTR)) - .Apply(typeof(BDatePickerDateTableTBody<>), typeof(BDatePickerDateTableTBody)) - .Apply(typeof(BDatePickerDateTableWeekNumber<>), typeof(BDatePickerDateTableWeekNumber)); - } - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/IDatePickerDateTable.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/IDatePickerDateTable.cs deleted file mode 100644 index 23cd6ca0b..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/IDatePickerDateTable.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace BlazorComponent -{ - public interface IDatePickerDateTable : IDatePickerTable - { - IEnumerable WeekDays { get; } - - bool ShowWeek { get; } - - int DisplayedMonth { get; } - - int WeekDaysBeforeFirstDayOfTheMonth { get; } - - int GetWeekNumber(int dayInMonth); - - bool ShowAdjacentMonths { get; } - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/TBody/BDatePickerDateTableTBody.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/TBody/BDatePickerDateTableTBody.razor deleted file mode 100644 index 0f2890d69..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/TBody/BDatePickerDateTableTBody.razor +++ /dev/null @@ -1,43 +0,0 @@ -@namespace BlazorComponent -@typeparam TDatePickerDateTable -@inherits ComponentPartBase - - - @foreach (var child in Children) - { - var childDatas = child; - - RenderFragment childContent = builder => - { - var sequence = 0; - foreach (var data in childDatas) - { - var rowData = data; - if (rowData.Type == "WeekNumber") - { - builder.AddContent(sequence++, RenderPart(typeof(BDatePickerDateTableWeekNumber<>), rowData.Attrs)); - } - else if (rowData.Type == "ShowAdjacentMonthsButton") - { - builder.AddContent(sequence++,@ - @if (ShowAdjacentMonths) - { - @RenderPart(typeof(BDatePickerTableButton<>),rowData.Attrs) - } - ); - - } - else if (rowData.Type == "Button") - { - builder.AddContent(sequence++,@ - @RenderPart(typeof(BDatePickerTableButton<>),rowData.Attrs) - ); - } - } - }; - - @RenderPart(typeof(BDatePickerDateTableTR<>),childContent) - } - - - diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/TBody/BDatePickerDateTableTBody.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/TBody/BDatePickerDateTableTBody.razor.cs deleted file mode 100644 index 27743002f..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/TBody/BDatePickerDateTableTBody.razor.cs +++ /dev/null @@ -1,97 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerDateTableTBody where TDatePickerDateTable : IDatePickerDateTable - { - public int DisplayedYear => Component.DisplayedYear; - - public int DisplayedMonth => Component.DisplayedMonth; - - public int WeekDaysBeforeFirstDayOfTheMonth => Component.WeekDaysBeforeFirstDayOfTheMonth; - - public bool ShowWeek => Component.ShowWeek; - - public Func GetWeekNumber => Component.GetWeekNumber; - - public bool ShowAdjacentMonths => Component.ShowAdjacentMonths; - - public List Attrs)>> Children - { - get - { - var children = new List Attrs)>>(); - var daysInMonth = DateTime.DaysInMonth(DisplayedYear, DisplayedMonth + 1); - var rows = new List<(string Type, Dictionary Attrs)>(); - var day = WeekDaysBeforeFirstDayOfTheMonth; - - if (ShowWeek) - { - rows.Add(("WeekNumber", new Dictionary - { - {"WeekNumber",GetWeekNumber(1)} - })); - } - - var prevMonthYear = DisplayedMonth > 0 ? DisplayedYear : DisplayedYear - 1; - var prevMonth = (DisplayedMonth + 11) % 12; - var firstDayFormPreviousMonth = DateTime.DaysInMonth(DisplayedMonth > 0 ? DisplayedYear : DisplayedYear - 1, DisplayedMonth == 0 ? 12 : DisplayedMonth); - var cellsInRow = ShowWeek ? 8 : 7; - - while (day-- > 0) - { - var date = new DateOnly(prevMonthYear, prevMonth + 1, firstDayFormPreviousMonth - day); - rows.Add(("ShowAdjacentMonthsButton", new Dictionary - { - {"Date",date}, - {"IsFloating",true}, - {"IsOtherMonth",true} - })); - } - - for (day = 1; day <= daysInMonth; day++) - { - var date = new DateOnly(DisplayedYear, DisplayedMonth + 1, day); - rows.Add(("Button", new Dictionary - { - {"Date",date}, - {"IsFloating",true} - })); - - if (rows.Count % cellsInRow == 0) - { - children.Add(rows); - rows = new List<(string Type, Dictionary Attrs)>(); - if (ShowWeek && (day < daysInMonth || ShowAdjacentMonths)) - { - rows.Add(("WeekNumber", new Dictionary - { - {"WeekNumber",GetWeekNumber(day+7)} - })); - } - } - } - - var nextMonthYear = DisplayedMonth == 11 ? DisplayedYear + 1 : DisplayedYear; - var nextMonth = (DisplayedMonth + 1) % 12; - var nextMonthDay = 1; - - while (rows.Count < cellsInRow) - { - var date = new DateOnly(nextMonthYear, nextMonth + 1, nextMonthDay++); - rows.Add(("ShowAdjacentMonthsButton", new Dictionary - { - {"Date",date}, - {"IsFloating",true}, - {"IsOtherMonth",true} - })); - } - - if (rows.Count > 0) - { - children.Add(rows); - } - - return children; - } - } - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/TBody/WeekNumber/BDatePickerDateTableWeekNumber.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/TBody/WeekNumber/BDatePickerDateTableWeekNumber.razor deleted file mode 100644 index 0596b6b2d..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/TBody/WeekNumber/BDatePickerDateTableWeekNumber.razor +++ /dev/null @@ -1,10 +0,0 @@ -@namespace BlazorComponent -@typeparam TDatePickerDateTable -@inherits ComponentPartBase - - - - @WeekNumber - - - diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/TBody/WeekNumber/BDatePickerDateTableWeekNumber.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/TBody/WeekNumber/BDatePickerDateTableWeekNumber.razor.cs deleted file mode 100644 index ea4637fc7..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/TBody/WeekNumber/BDatePickerDateTableWeekNumber.razor.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerDateTableWeekNumber where TDatePickerDateTable : IDatePickerDateTable - { - [Parameter] - public int WeekNumber { get; set; } - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/THead/BDatePickerDateTableTHead.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/THead/BDatePickerDateTableTHead.razor deleted file mode 100644 index 0c56c2cde..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/THead/BDatePickerDateTableTHead.razor +++ /dev/null @@ -1,23 +0,0 @@ -@namespace BlazorComponent -@typeparam TDatePickerDateTable -@inherits ComponentPartBase - - - @{ - //REVIEW: How about remove this to BDatePickerDateTableTR<> - RenderFragment childContent = builder => - { - var sequence = 0; - if (ShowWeek) - { - builder.AddContent(sequence++,@); - } - foreach (var day in WeekDays) - { - builder.AddContent(sequence++,@@day); - } - }; - } - @RenderPart(typeof(BDatePickerDateTableTR<>),childContent) - - diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/THead/BDatePickerDateTableTHead.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/THead/BDatePickerDateTableTHead.razor.cs deleted file mode 100644 index 0974c84ce..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/THead/BDatePickerDateTableTHead.razor.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerDateTableTHead where TDatePickerDateTable : IDatePickerDateTable - { - public bool ShowWeek => Component.ShowWeek; - - public IEnumerable WeekDays => Component.WeekDays; - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/THead/TR/BDatePickerDateTableTR.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/THead/TR/BDatePickerDateTableTR.razor deleted file mode 100644 index 3548d11bd..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/THead/TR/BDatePickerDateTableTR.razor +++ /dev/null @@ -1,7 +0,0 @@ -@namespace BlazorComponent -@typeparam TDatePickerDateTable -@inherits ComponentPartBase - - - @ChildContent - diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/THead/TR/BDatePickerDateTableTR.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/THead/TR/BDatePickerDateTableTR.razor.cs deleted file mode 100644 index 58ac22d30..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerDateTable/THead/TR/BDatePickerDateTableTR.razor.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerDateTableTR where TDatePickerDateTable : IDatePickerDateTable - { - [Parameter] - public RenderFragment? ChildContent { get; set; } - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/BDatePickerMonthTableSlot.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/BDatePickerMonthTableSlot.razor deleted file mode 100644 index d4ce42edc..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/BDatePickerMonthTableSlot.razor +++ /dev/null @@ -1,7 +0,0 @@ -@namespace BlazorComponent -@typeparam TDatePickerMonthTable -@inherits ComponentPartBase - -@RenderPart(typeof(BDatePickerMonthTableTBody<>)) - - diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/BDatePickerMonthTableSlot.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/BDatePickerMonthTableSlot.razor.cs deleted file mode 100644 index 3ef599c5a..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/BDatePickerMonthTableSlot.razor.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerMonthTableSlot where TDatePickerMonthTable : IDatePickerMonthTable - { - - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/DatePickerMonthTableAbstractProvider.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/DatePickerMonthTableAbstractProvider.cs deleted file mode 100644 index b18bd73c6..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/DatePickerMonthTableAbstractProvider.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace BlazorComponent -{ - public static class DatePickerMonthTableAbstractProvider - { - public static ComponentAbstractProvider ApplyDatePickerMonthTableDefault(this ComponentAbstractProvider abstractProvider) - { - return abstractProvider - .Merge(typeof(BDatePickerTableSlot<>), typeof(BDatePickerMonthTableSlot)) - .Apply(typeof(BDatePickerMonthTableTBody<>), typeof(BDatePickerMonthTableTBody)); - } - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/IDatePickerMonthTable.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/IDatePickerMonthTable.cs deleted file mode 100644 index 35222aec4..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/IDatePickerMonthTable.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace BlazorComponent -{ - public interface IDatePickerMonthTable : IDatePickerTable - { - - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/TBody/BDatePickerMonthTableTBody.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/TBody/BDatePickerMonthTableTBody.razor deleted file mode 100644 index 5a207e98d..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/TBody/BDatePickerMonthTableTBody.razor +++ /dev/null @@ -1,26 +0,0 @@ -@namespace BlazorComponent -@typeparam TDatePickerMonthTable -@inherits ComponentPartBase - - @{ - var cols = new[] { 0, 1, 2 }; - var rows = 12 / cols.Length; - - @for (var i = 0; i < rows; i++) - { - var row = i; - - @foreach (var col in cols) - { - var month = row * cols.Length + col; - var date = new DateOnly(DisplayedYear, month + 1, 1); - - @RenderPart(typeof(BDatePickerTableButton<>),date,false,arg1Name:"IsFloating") - - } - - } - -} - - diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/TBody/BDatePickerMonthTableTBody.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/TBody/BDatePickerMonthTableTBody.razor.cs deleted file mode 100644 index d00af3ca5..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerMonthTable/TBody/BDatePickerMonthTableTBody.razor.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerMonthTableTBody where TDatePickerMonthTable : IDatePickerMonthTable - { - public int DisplayedYear => Component.DisplayedYear; - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/BDatePickerTable.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/BDatePickerTable.razor deleted file mode 100644 index 0c61c455e..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/BDatePickerTable.razor +++ /dev/null @@ -1,15 +0,0 @@ -@namespace BlazorComponent -@inherits BDomComponentBase - -@*TODO: onwheel event*@ - -
- - - @RenderPart(typeof(BDatePickerTableSlot<>)) - - -
-
- - diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/BDatePickerTable.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/BDatePickerTable.razor.cs deleted file mode 100644 index ed2e92c5c..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/BDatePickerTable.razor.cs +++ /dev/null @@ -1,37 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerTable : BDomComponentBase - { - [Parameter] - public virtual DateOnly TableDate { get; set; } - - [Parameter] - public bool Dark { get; set; } - - [Parameter] - public bool Light { get; set; } - - [CascadingParameter(Name = "IsDark")] - public bool CascadingIsDark { get; set; } - - public bool IsDark - { - get - { - if (Dark) - { - return true; - } - - if (Light) - { - return false; - } - - return CascadingIsDark; - } - } - - protected virtual string? ComputedTransition { get; } - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/BDatePickerTableSlot.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/BDatePickerTableSlot.razor deleted file mode 100644 index 558544d63..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/BDatePickerTableSlot.razor +++ /dev/null @@ -1,6 +0,0 @@ -@namespace BlazorComponent -@typeparam TDatePickerTable -@inherits ComponentPartBase - -@*Default is empty*@ - diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/BDatePickerTableSlot.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/BDatePickerTableSlot.razor.cs deleted file mode 100644 index a2aa9e9ee..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/BDatePickerTableSlot.razor.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerTableSlot where TDatePickerTable : IDatePickerTable - { - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/Button/BDatePickerTableButton.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/Button/BDatePickerTableButton.razor deleted file mode 100644 index 0cfa9409f..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/Button/BDatePickerTableButton.razor +++ /dev/null @@ -1,11 +0,0 @@ -@namespace BlazorComponent -@typeparam TDatePickerTable -@inherits ComponentPartBase - - diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/Button/BDatePickerTableButton.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/Button/BDatePickerTableButton.razor.cs deleted file mode 100644 index 2b5b5ef68..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/Button/BDatePickerTableButton.razor.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerTableButton where TDatePickerTable : IDatePickerTable - { - [Parameter] - public DateOnly Date { get; set; } - - [Parameter] - public bool IsFloating { get; set; } - - [Parameter] - public bool IsOtherMonth { get; set; } - - public Func> GetButtonAttrs => Component.GetButtonAttrs; - - public Func Formatter => Component.Formatter; - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/Button/Events/BDatePickerTableEvents.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/Button/Events/BDatePickerTableEvents.razor deleted file mode 100644 index 22192ee8b..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/Button/Events/BDatePickerTableEvents.razor +++ /dev/null @@ -1,19 +0,0 @@ -@namespace BlazorComponent -@typeparam TDatePickerTable -@inherits ComponentPartBase - -@{ - var eventColors = GetEventColors(); - - if (eventColors.Any()) - { -
- @foreach (var color in eventColors) - { -
-
- } -
- } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/Button/Events/BDatePickerTableEvents.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/Button/Events/BDatePickerTableEvents.razor.cs deleted file mode 100644 index d36ed9105..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/Button/Events/BDatePickerTableEvents.razor.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace BlazorComponent; - -public partial class BDatePickerTableEvents where TDatePickerTable : IDatePickerTable -{ - [Parameter] - public DateOnly Date { get; set; } - - public OneOf>? Events => Component.Events; - - public OneOf, Func>? EventColor => Component.EventColor; - - private IEnumerable GetEventColors() - { - var eventData = false; - var eventColors = Array.Empty(); - - if (!Events.HasValue) - { - eventData = false; - } - else if (Events.Value.IsT0) - { - eventData = Events.Value.AsT0.Contains(Date); - } - else if (Events.Value.IsT1) - { - eventData = Events.Value.AsT1.Invoke(Date); - } - - if (!eventData || !EventColor.HasValue) - { - return eventColors; - } - - if (EventColor.Value.IsT0) - { - eventColors = new[] { EventColor.Value.AsT0 }; - } - else if (EventColor.Value.IsT1) - { - eventColors = new[] { EventColor.Value.AsT1.Invoke(Date) }; - } - else if (EventColor.Value.IsT2) - { - eventColors = EventColor.Value.AsT2.Invoke(Date).ToArray(); - } - - return eventColors.Where(e => !string.IsNullOrWhiteSpace(e)); - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/DatePickerTableAbstractProviderExtensitions.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/DatePickerTableAbstractProviderExtensitions.cs deleted file mode 100644 index 0942a2e50..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/DatePickerTableAbstractProviderExtensitions.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace BlazorComponent -{ - public static class DatePickerTableAbstractProviderExtensitions - { - public static ComponentAbstractProvider ApplyDatePickerTableDefault(this ComponentAbstractProvider abstractProvider) - { - return abstractProvider - .Apply(typeof(BDatePickerTableSlot<>), typeof(BDatePickerTableSlot)) - .Apply(typeof(BDatePickerTableButton<>), typeof(BDatePickerTableButton)) - .Apply(typeof(BDatePickerTableEvents<>), typeof(BDatePickerTableEvents)); - } - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/IDatePickerTable.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/IDatePickerTable.cs deleted file mode 100644 index 4bc2576ca..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTable/DatePickerTable/IDatePickerTable.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace BlazorComponent; - -public interface IDatePickerTable : IHasProviderComponent -{ - int DisplayedYear { get; } - - Dictionary GetButtonAttrs(DateOnly value); - - Func? Formatter { get; } - - OneOf>? Events { get; } - - OneOf, Func>? EventColor { get; } -} \ No newline at end of file diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/BDatePickerTitle.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/BDatePickerTitle.razor deleted file mode 100644 index acccf993e..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/BDatePickerTitle.razor +++ /dev/null @@ -1,7 +0,0 @@ -@namespace BlazorComponent -@inherits BDomComponentBase - -
- @RenderPart(typeof(BDatePickerTitleYearBtn<>)) - @RenderPart(typeof(BDatePickerTitleTitleDate<>)) -
diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/BDatePickerTitle.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/BDatePickerTitle.razor.cs deleted file mode 100644 index 52de20309..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/BDatePickerTitle.razor.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerTitle - { - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/DatePickerTitleAbstractProviderExtensions.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/DatePickerTitleAbstractProviderExtensions.cs deleted file mode 100644 index f39fd6408..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/DatePickerTitleAbstractProviderExtensions.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace BlazorComponent -{ - public static class DatePickerTitleAbstractProviderExtensions - { - public static ComponentAbstractProvider ApplyDatePickerTitleDefault(this ComponentAbstractProvider abstractProvider) - { - return abstractProvider - .Apply(typeof(BDatePickerTitleYearBtn<>), typeof(BDatePickerTitleYearBtn)) - .Apply(typeof(BDatePickerTitleTitleDate<>), typeof(BDatePickerTitleTitleDate)) - .Apply(typeof(BPickerTitlePickerButton<>), typeof(BPickerTitlePickerButton)) - .Apply(typeof(BDatePickerTitleYearIcon<>), typeof(BDatePickerTitleYearIcon)) - .Apply(typeof(BDatePickerTitleTitleText<>), typeof(BDatePickerTitleTitleText)); - } - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/IDatePickerTitle.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/IDatePickerTitle.cs deleted file mode 100644 index 6d6bfc852..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/IDatePickerTitle.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace BlazorComponent -{ - public interface IDatePickerTitle : IHasProviderComponent - { - string? Year { get; } - - string? YearIcon { get; } - - string? ComputedTransition { get; } - - string? Date { get; } - - DateOnly Value { get; } - - bool SelectingYear { get; } - - Task HandleOnTitleDateBtnClickAsync(MouseEventArgs arg); - - Task HandleOnYearBtnClickAsync(MouseEventArgs arg); - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/TitleDate/BDatePickerTitleTitleDate.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/TitleDate/BDatePickerTitleTitleDate.razor deleted file mode 100644 index 30d8420e4..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/TitleDate/BDatePickerTitleTitleDate.razor +++ /dev/null @@ -1,6 +0,0 @@ -@namespace BlazorComponent -@typeparam TDatePickerTitle -@inherits ComponentPartBase - -@RenderPart(typeof(BPickerTitlePickerButton<>),"title-date-btn",OnTitleDateBtnClick,RenderPart(typeof(BDatePickerTitleTitleText<>)),arg0Name:"Name",arg1Name:"OnClick",arg2Name:"ChildContent") - diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/TitleDate/BDatePickerTitleTitleDate.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/TitleDate/BDatePickerTitleTitleDate.razor.cs deleted file mode 100644 index b60b5f6cb..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/TitleDate/BDatePickerTitleTitleDate.razor.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerTitleTitleDate where TDatePickerTitle : IDatePickerTitle - { - public EventCallback OnTitleDateBtnClick => CreateEventCallback(Component.HandleOnTitleDateBtnClickAsync); - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/TitleDate/TitleText/BDatePickerTitleTitleText.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/TitleDate/TitleText/BDatePickerTitleTitleText.razor deleted file mode 100644 index 59961d429..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/TitleDate/TitleText/BDatePickerTitleTitleText.razor +++ /dev/null @@ -1,10 +0,0 @@ -@namespace BlazorComponent -@typeparam TDatePickerTitle -@inherits ComponentPartBase - - - - @((MarkupString)(Date??" ")) - - - diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/TitleDate/TitleText/BDatePickerTitleTitleText.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/TitleDate/TitleText/BDatePickerTitleTitleText.razor.cs deleted file mode 100644 index fcc25c277..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/TitleDate/TitleText/BDatePickerTitleTitleText.razor.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerTitleTitleText where TDatePickerTitle : IDatePickerTitle - { - public string? ComputedTransition => Component.ComputedTransition; - - public string? Date => Component.Date; - - public DateOnly Value => Component.Value; - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/BDatePickerTitleYearBtn.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/BDatePickerTitleYearBtn.razor deleted file mode 100644 index b87981565..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/BDatePickerTitleYearBtn.razor +++ /dev/null @@ -1,17 +0,0 @@ -@namespace BlazorComponent -@typeparam TDatePickerTitle -@inherits ComponentPartBase - -@{ - //REVIEW: Why we get this? - RenderFragment childContent = builder => - { - builder.AddContent(0, Year); - if (YearIcon != null) - { - builder.AddContent(1, RenderPart(typeof(BDatePickerTitleYearIcon<>))); - } - }; -} -@RenderPart(typeof(BPickerTitlePickerButton<>),"year-btn",OnYearBtnClick,childContent,arg0Name:"Name",arg1Name:"OnClick") - diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/BDatePickerTitleYearBtn.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/BDatePickerTitleYearBtn.razor.cs deleted file mode 100644 index 2a5a7f6ab..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/BDatePickerTitleYearBtn.razor.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerTitleYearBtn where TDatePickerTitle : IDatePickerTitle - { - public string Year => Component.Year; - - public string YearIcon => Component.YearIcon; - - public EventCallback OnYearBtnClick => CreateEventCallback(Component.HandleOnYearBtnClickAsync); - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/PickerButton/BPickerTitlePickerButton.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/PickerButton/BPickerTitlePickerButton.razor deleted file mode 100644 index 29ee3e889..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/PickerButton/BPickerTitlePickerButton.razor +++ /dev/null @@ -1,8 +0,0 @@ -@namespace BlazorComponent -@typeparam TComponent -@inherits ComponentPartBase - -
- @ChildContent -
- diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/PickerButton/BPickerTitlePickerButton.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/PickerButton/BPickerTitlePickerButton.razor.cs deleted file mode 100644 index 988d7e9fc..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/PickerButton/BPickerTitlePickerButton.razor.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace BlazorComponent -{ - public partial class BPickerTitlePickerButton where TComponent : IHasProviderComponent - { - [Parameter] - public string Name { get; set; } = null!; - - [Parameter] - public EventCallback OnClick { get; set; } - - [Parameter] - public RenderFragment? ChildContent { get; set; } - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/YearIcon/BDatePickerTitleYearIcon.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/YearIcon/BDatePickerTitleYearIcon.razor deleted file mode 100644 index ad3b5d666..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/YearIcon/BDatePickerTitleYearIcon.razor +++ /dev/null @@ -1,7 +0,0 @@ -@namespace BlazorComponent -@typeparam TDatePickerTitle -@inherits ComponentPartBase - - - @YearIcon - diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/YearIcon/BDatePickerTitleYearIcon.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/YearIcon/BDatePickerTitleYearIcon.razor.cs deleted file mode 100644 index 1fe327486..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerTitle/YearBtn/YearIcon/BDatePickerTitleYearIcon.razor.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerTitleYearIcon where TDatePickerTitle : IDatePickerTitle - { - public string YearIcon => Component.YearIcon; - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/BDatePickerYears.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/BDatePickerYears.razor deleted file mode 100644 index 913917832..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/BDatePickerYears.razor +++ /dev/null @@ -1,7 +0,0 @@ -@namespace BlazorComponent -@inherits BDomComponentBase - -
    - @RenderPart(typeof(BDatePickerYearsYearItems<>)) -
- diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/BDatePickerYears.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/BDatePickerYears.razor.cs deleted file mode 100644 index b249f1fdb..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/BDatePickerYears.razor.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerYears : BDomComponentBase - { - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/DatePickerYearsAbstractProviderExtensitions.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/DatePickerYearsAbstractProviderExtensitions.cs deleted file mode 100644 index 2887affae..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/DatePickerYearsAbstractProviderExtensitions.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace BlazorComponent -{ - public static class DatePickerYearsAbstractProviderExtensitions - { - public static ComponentAbstractProvider ApplyDatePickerYearsDefault(this ComponentAbstractProvider abstractProvider) - { - return abstractProvider - .Apply(typeof(BDatePickerYearsYearItems<>), typeof(BDatePickerYearsYearItems)) - .Apply(typeof(BDatePickerYearsYearItem<>), typeof(BDatePickerYearsYearItem)); - } - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/IDatePickerYears.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/IDatePickerYears.cs deleted file mode 100644 index ab980dd1e..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/IDatePickerYears.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace BlazorComponent -{ - public interface IDatePickerYears : IHasProviderComponent - { - int Value { get; } - - DateOnly? Max { get; } - - DateOnly? Min { get; } - - Func Formatter { get; } - - Task HandleOnYearItemClickAsync(int year); - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/YearItems/BDatePickerYearsYearItems.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/YearItems/BDatePickerYearsYearItems.razor deleted file mode 100644 index bcf2d404f..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/YearItems/BDatePickerYearsYearItems.razor +++ /dev/null @@ -1,15 +0,0 @@ -@namespace BlazorComponent -@typeparam TDatePickerYears -@inherits ComponentPartBase - - @{ - var selectedYear = Value > 0 ? Value : DateTime.Now.Year; - var maxYear = Max != null ? Max.Value.Year : (selectedYear + 100); - var minYear = Math.Min(maxYear, Min != null ? Min.Value.Year : (selectedYear - 100)); - - for (var year = maxYear; year >= minYear; year--) - { - @RenderPart(typeof(BDatePickerYearsYearItem<>),year) - } -} - diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/YearItems/BDatePickerYearsYearItems.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/YearItems/BDatePickerYearsYearItems.razor.cs deleted file mode 100644 index 665ada493..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/YearItems/BDatePickerYearsYearItems.razor.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerYearsYearItems where TDatePickerYears : IDatePickerYears - { - public int Value => Component.Value; - - public DateOnly? Max => Component.Max; - - public DateOnly? Min => Component.Min; - } -} diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/YearItems/YearItem/BDatePickerYearsYearItem.razor b/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/YearItems/YearItem/BDatePickerYearsYearItem.razor deleted file mode 100644 index fb7ffce64..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/YearItems/YearItem/BDatePickerYearsYearItem.razor +++ /dev/null @@ -1,11 +0,0 @@ -@namespace BlazorComponent -@typeparam TDatePickerYears -@inherits ComponentPartBase - - @{ - var active = Value == Year; -
  • - @Formatter(new DateOnly(Year,1,1)) -
  • -} - diff --git a/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/YearItems/YearItem/BDatePickerYearsYearItem.razor.cs b/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/YearItems/YearItem/BDatePickerYearsYearItem.razor.cs deleted file mode 100644 index add75cca1..000000000 --- a/src/Component/BlazorComponent/Components/DatePicker/DatePickerYears/YearItems/YearItem/BDatePickerYearsYearItem.razor.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace BlazorComponent -{ - public partial class BDatePickerYearsYearItem where TDatePickerYears : IDatePickerYears - { - [Parameter] - public int Year { get; set; } - - public Func Formatter => Component.Formatter; - - public int Value => Component.Value; - - public EventCallback HandleOnYearItemClick => CreateEventCallback(args => Component.HandleOnYearItemClickAsync(Year)); - } -} diff --git a/src/Component/BlazorComponent/Components/Picker/Actions/BPickerActions.razor b/src/Component/BlazorComponent/Components/Picker/Actions/BPickerActions.razor deleted file mode 100644 index b1fa8b4f3..000000000 --- a/src/Component/BlazorComponent/Components/Picker/Actions/BPickerActions.razor +++ /dev/null @@ -1,11 +0,0 @@ -@namespace BlazorComponent -@typeparam TPicker -@inherits ComponentPartBase - - @if (ActionsContent != null) -{ -
    - @ActionsContent -
    -} - diff --git a/src/Component/BlazorComponent/Components/Picker/Actions/BPickerActions.razor.cs b/src/Component/BlazorComponent/Components/Picker/Actions/BPickerActions.razor.cs deleted file mode 100644 index 49a40959d..000000000 --- a/src/Component/BlazorComponent/Components/Picker/Actions/BPickerActions.razor.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace BlazorComponent -{ - public partial class BPickerActions where TPicker : IPicker - { - public RenderFragment? ActionsContent => Component.ActionsContent; - } -} diff --git a/src/Component/BlazorComponent/Components/Picker/BPicker.razor b/src/Component/BlazorComponent/Components/Picker/BPicker.razor deleted file mode 100644 index 9de86ce1f..000000000 --- a/src/Component/BlazorComponent/Components/Picker/BPicker.razor +++ /dev/null @@ -1,17 +0,0 @@ -@namespace BlazorComponent -@inherits BDomComponentBase - - -
    - @if (TitleContent != null) - { - @RenderPart(typeof(BPickerTitle<>)) - } - @RenderPart(typeof(BPickerBody<>)) - @if (ActionsContent != null) - { - @RenderPart(typeof(BPickerActions<>)) - } -
    -
    - diff --git a/src/Component/BlazorComponent/Components/Picker/BPicker.razor.cs b/src/Component/BlazorComponent/Components/Picker/BPicker.razor.cs deleted file mode 100644 index c7d685793..000000000 --- a/src/Component/BlazorComponent/Components/Picker/BPicker.razor.cs +++ /dev/null @@ -1,43 +0,0 @@ -using Microsoft.AspNetCore.Components; - -namespace BlazorComponent -{ - public partial class BPicker : BDomComponentBase - { - [Parameter] - public RenderFragment? TitleContent { get; set; } - - [Parameter] - public RenderFragment? ActionsContent { get; set; } - - [Parameter] - public RenderFragment? ChildContent { get; set; } - - [Parameter] - public bool Dark { get; set; } - - [Parameter] - public bool Light { get; set; } - - [CascadingParameter(Name = "IsDark")] - public bool CascadingIsDark { get; set; } - - public bool IsDark - { - get - { - if (Dark) - { - return true; - } - - if (Light) - { - return false; - } - - return CascadingIsDark; - } - } - } -} diff --git a/src/Component/BlazorComponent/Components/Picker/Body/BPickerBody.razor b/src/Component/BlazorComponent/Components/Picker/Body/BPickerBody.razor deleted file mode 100644 index 9d32cb379..000000000 --- a/src/Component/BlazorComponent/Components/Picker/Body/BPickerBody.razor +++ /dev/null @@ -1,8 +0,0 @@ -@namespace BlazorComponent -@typeparam TPicker -@inherits ComponentPartBase - -
    - @RenderPart(typeof(BPickerBodyTransition<>)) -
    - diff --git a/src/Component/BlazorComponent/Components/Picker/Body/BPickerBody.razor.cs b/src/Component/BlazorComponent/Components/Picker/Body/BPickerBody.razor.cs deleted file mode 100644 index d48a13212..000000000 --- a/src/Component/BlazorComponent/Components/Picker/Body/BPickerBody.razor.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace BlazorComponent -{ - public partial class BPickerBody where TPicker : IPicker - { - - } -} diff --git a/src/Component/BlazorComponent/Components/Picker/Body/BodyTransition/BPickerBodyTransition.razor b/src/Component/BlazorComponent/Components/Picker/Body/BodyTransition/BPickerBodyTransition.razor deleted file mode 100644 index e70b89b1e..000000000 --- a/src/Component/BlazorComponent/Components/Picker/Body/BodyTransition/BPickerBodyTransition.razor +++ /dev/null @@ -1,7 +0,0 @@ -@namespace BlazorComponent -@typeparam TPicker -@inherits ComponentPartBase - - - @ComponentChildContent - diff --git a/src/Component/BlazorComponent/Components/Picker/Body/BodyTransition/BPickerBodyTransition.razor.cs b/src/Component/BlazorComponent/Components/Picker/Body/BodyTransition/BPickerBodyTransition.razor.cs deleted file mode 100644 index 4c35a1fb9..000000000 --- a/src/Component/BlazorComponent/Components/Picker/Body/BodyTransition/BPickerBodyTransition.razor.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace BlazorComponent -{ - public partial class BPickerBodyTransition where TPicker : IPicker - { - public string? Transition => Component.Transition; - - public bool NoTitle => Component.NoTitle; - - public RenderFragment? ComponentChildContent => Component.ChildContent; - } -} diff --git a/src/Component/BlazorComponent/Components/Picker/IPicker.cs b/src/Component/BlazorComponent/Components/Picker/IPicker.cs deleted file mode 100644 index 580ec9a03..000000000 --- a/src/Component/BlazorComponent/Components/Picker/IPicker.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace BlazorComponent -{ - public interface IPicker : IHasProviderComponent - { - RenderFragment? TitleContent { get; } - - RenderFragment? ActionsContent { get; } - - string? Transition { get; } - - RenderFragment? ChildContent { get; } - - bool NoTitle { get; } - } -} diff --git a/src/Component/BlazorComponent/Components/Picker/PickerAbstractProviderExtensitions.cs b/src/Component/BlazorComponent/Components/Picker/PickerAbstractProviderExtensitions.cs deleted file mode 100644 index 758494912..000000000 --- a/src/Component/BlazorComponent/Components/Picker/PickerAbstractProviderExtensitions.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace BlazorComponent -{ - public static class PickerAbstractProviderExtensitions - { - public static ComponentAbstractProvider ApplyPickerDefault(this ComponentAbstractProvider abstractProvider) - { - return abstractProvider - .Apply(typeof(BPickerTitle<>), typeof(BPickerTitle)) - .Apply(typeof(BPickerBody<>), typeof(BPickerBody)) - .Apply(typeof(BPickerBodyTransition<>), typeof(BPickerBodyTransition)) - .Apply(typeof(BPickerActions<>), typeof(BPickerActions)); - } - } -} diff --git a/src/Component/BlazorComponent/Components/Picker/Title/BPickerTitle.razor b/src/Component/BlazorComponent/Components/Picker/Title/BPickerTitle.razor deleted file mode 100644 index f86c6fd48..000000000 --- a/src/Component/BlazorComponent/Components/Picker/Title/BPickerTitle.razor +++ /dev/null @@ -1,8 +0,0 @@ -@namespace BlazorComponent -@typeparam TPicker -@inherits ComponentPartBase - -
    - @TitleContent -
    - diff --git a/src/Component/BlazorComponent/Components/Picker/Title/BPickerTitle.razor.cs b/src/Component/BlazorComponent/Components/Picker/Title/BPickerTitle.razor.cs deleted file mode 100644 index 49c459999..000000000 --- a/src/Component/BlazorComponent/Components/Picker/Title/BPickerTitle.razor.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace BlazorComponent -{ - public partial class BPickerTitle where TPicker : IPicker - { - public RenderFragment? TitleContent => Component.TitleContent; - } -} diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/SelectingTimes.cs b/src/Component/BlazorComponent/Components/TimePicker/SelectingTimes.cs similarity index 100% rename from src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/SelectingTimes.cs rename to src/Component/BlazorComponent/Components/TimePicker/SelectingTimes.cs diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePicker/TimeFormat.cs b/src/Component/BlazorComponent/Components/TimePicker/TimeFormat.cs similarity index 100% rename from src/Component/BlazorComponent/Components/TimePicker/TimePicker/TimeFormat.cs rename to src/Component/BlazorComponent/Components/TimePicker/TimeFormat.cs diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePicker/BTimePicker.razor b/src/Component/BlazorComponent/Components/TimePicker/TimePicker/BTimePicker.razor deleted file mode 100644 index 57966dfec..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePicker/BTimePicker.razor +++ /dev/null @@ -1,20 +0,0 @@ -@namespace BlazorComponent -@inherits BDomComponentBase - -@{ - //We want default to be null,so that BPicker Title will render nothing - var titleContent = (RenderFragment?)null; - @if (!NoTitle) - { - titleContent = @; - } -} - - - - @RenderPart(typeof(BTimePickerPickerBody<>)) - - diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePicker/BTimePicker.razor.cs b/src/Component/BlazorComponent/Components/TimePicker/TimePicker/BTimePicker.razor.cs deleted file mode 100644 index e4c6b481b..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePicker/BTimePicker.razor.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace BlazorComponent -{ - public partial class BTimePicker: BDomComponentBase - { - [Parameter] - public bool NoTitle { get; set; } - - [Parameter] - public RenderFragment? ChildContent { get; set; } - } -} diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePicker/ITimePicker.cs b/src/Component/BlazorComponent/Components/TimePicker/TimePicker/ITimePicker.cs deleted file mode 100644 index 136d22391..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePicker/ITimePicker.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace BlazorComponent -{ - public interface ITimePicker : IHasProviderComponent - { - SelectingTimes Selecting { get; } - - bool AmPmInTitle { get; } - - string? AmText { get; } - - string? PmText { get; } - - bool IsAmPm { get; } - - Task HandleOnAmClickAsync(MouseEventArgs args); - - Task HandleOnPmClickAsync(MouseEventArgs args); - } -} diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePicker/PickerBody/BTimePickerPickerBody.razor b/src/Component/BlazorComponent/Components/TimePicker/TimePicker/PickerBody/BTimePickerPickerBody.razor deleted file mode 100644 index 5c5a86ede..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePicker/PickerBody/BTimePickerPickerBody.razor +++ /dev/null @@ -1,12 +0,0 @@ -@namespace BlazorComponent -@typeparam TTimePicker -@inherits ComponentPartBase - -
    - @if (!AmPmInTitle && IsAmPm) - { - @RenderPart(typeof(BTimePickerClockAmPm<>)) - } - -
    - diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePicker/PickerBody/BTimePickerPickerBody.razor.cs b/src/Component/BlazorComponent/Components/TimePicker/TimePicker/PickerBody/BTimePickerPickerBody.razor.cs deleted file mode 100644 index 6340dc93d..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePicker/PickerBody/BTimePickerPickerBody.razor.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace BlazorComponent -{ - public partial class BTimePickerPickerBody where TTimePicker : ITimePicker - { - public SelectingTimes Selecting => Component.Selecting; - - public bool AmPmInTitle => Component.AmPmInTitle; - - public bool IsAmPm => Component.IsAmPm; - } -} diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePicker/PickerBody/ClockAmPm/BTimePickerClockAmPm.razor b/src/Component/BlazorComponent/Components/TimePicker/TimePicker/PickerBody/ClockAmPm/BTimePickerClockAmPm.razor deleted file mode 100644 index b81234b77..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePicker/PickerBody/ClockAmPm/BTimePickerClockAmPm.razor +++ /dev/null @@ -1,9 +0,0 @@ -@namespace BlazorComponent -@typeparam TTimePicker -@inherits ComponentPartBase - -
    - @RenderPart(typeof(BPickerTitlePickerButton<>),"picker-button-am",OnAmClick,RenderText(AmText),arg0Name:"Name",arg1Name:"OnClick",arg2Name:"ChildContent") - @RenderPart(typeof(BPickerTitlePickerButton<>),"picker-button-pm",OnPmClick,RenderText(PmText),arg0Name:"Name",arg1Name:"OnClick",arg2Name:"ChildContent") -
    - diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePicker/PickerBody/ClockAmPm/BTimePickerClockAmPm.razor.cs b/src/Component/BlazorComponent/Components/TimePicker/TimePicker/PickerBody/ClockAmPm/BTimePickerClockAmPm.razor.cs deleted file mode 100644 index b633b6bbe..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePicker/PickerBody/ClockAmPm/BTimePickerClockAmPm.razor.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace BlazorComponent -{ - public partial class BTimePickerClockAmPm where TTimePicker : ITimePicker - { - public EventCallback OnAmClick => CreateEventCallback(Component.HandleOnAmClickAsync); - - public EventCallback OnPmClick => CreateEventCallback(Component.HandleOnPmClickAsync); - - public string? AmText => Component.AmText; - - public string? PmText => Component.PmText; - } -} diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePicker/TimePickerAbstractProviderExtensitions.cs b/src/Component/BlazorComponent/Components/TimePicker/TimePicker/TimePickerAbstractProviderExtensitions.cs deleted file mode 100644 index 14fae8fc4..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePicker/TimePickerAbstractProviderExtensitions.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace BlazorComponent -{ - public static class TimePickerAbstractProviderExtensitions - { - public static ComponentAbstractProvider ApplyTimePickerDefault(this ComponentAbstractProvider abstractProvider) - { - return abstractProvider - .Apply(typeof(BTimePickerPickerBody<>), typeof(BTimePickerPickerBody)) - .Apply(typeof(BTimePickerClockAmPm<>), typeof(BTimePickerClockAmPm)) - .Apply(typeof(BPickerTitlePickerButton<>), typeof(BPickerTitlePickerButton)); - } - } -} diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/BTimePickerClock.razor b/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/BTimePickerClock.razor deleted file mode 100644 index 6ed81b0f6..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/BTimePickerClock.razor +++ /dev/null @@ -1,15 +0,0 @@ -@namespace BlazorComponent -@inherits BDomComponentBase - - -
    -
    - @RenderPart(typeof(BTimePickerClockHand<>)) - @RenderPart(typeof(BTimePickerClockValues<>)) -
    -
    -
    - diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/BTimePickerClock.razor.cs b/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/BTimePickerClock.razor.cs deleted file mode 100644 index 97b3c1821..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/BTimePickerClock.razor.cs +++ /dev/null @@ -1,62 +0,0 @@ -using Microsoft.AspNetCore.Components; -using Microsoft.AspNetCore.Components.Web; - -namespace BlazorComponent -{ - public partial class BTimePickerClock - { - [Parameter] - public bool Dark { get; set; } - - [Parameter] - public bool Light { get; set; } - - [CascadingParameter(Name = "IsDark")] - public bool CascadingIsDark { get; set; } - - public bool IsDark - { - get - { - if (Dark) - { - return true; - } - - if (Light) - { - return false; - } - - return CascadingIsDark; - } - } - - public ElementReference InnerClockElement { get; set; } - - protected virtual Task HandleOnMouseDownAsync(MouseEventArgs args) - { - return Task.CompletedTask; - } - - protected virtual Task HandleOnMouseUpAsync(MouseEventArgs args) - { - return Task.CompletedTask; - } - - protected virtual Task HandleOnMouseLeaveAsync(MouseEventArgs args) - { - return Task.CompletedTask; - } - - protected virtual Task HandleOnDragMoveAsync(MouseEventArgs args) - { - return Task.CompletedTask; - } - - protected virtual Task HandleOnWheelAsync(WheelEventArgs args) - { - return Task.CompletedTask; - } - } -} diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/Hand/BTimePickerClockHand.razor b/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/Hand/BTimePickerClockHand.razor deleted file mode 100644 index b8c22146d..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/Hand/BTimePickerClockHand.razor +++ /dev/null @@ -1,7 +0,0 @@ -@namespace BlazorComponent -@typeparam TTimePickerClock -@inherits ComponentPartBase - -
    -
    - diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/Hand/BTimePickerClockHand.razor.cs b/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/Hand/BTimePickerClockHand.razor.cs deleted file mode 100644 index 16dfaba8a..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/Hand/BTimePickerClockHand.razor.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace BlazorComponent -{ - public partial class BTimePickerClockHand where TTimePickerClock : ITimePickerClock - { - } -} diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/ITimePickerClock.cs b/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/ITimePickerClock.cs deleted file mode 100644 index bdb8ab9b2..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/ITimePickerClock.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace BlazorComponent -{ - public interface ITimePickerClock : IHasProviderComponent - { - int Min { get; } - - int Max { get; } - - int Step { get; } - - Func? Format { get; } - } -} diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/TimePickerClockAbstractProviderExtensitions.cs b/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/TimePickerClockAbstractProviderExtensitions.cs deleted file mode 100644 index 9945fc3a4..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/TimePickerClockAbstractProviderExtensitions.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace BlazorComponent -{ - public static class TimePickerClockAbstractProviderExtensitions - { - public static ComponentAbstractProvider ApplyTimePickerClocDefault(this ComponentAbstractProvider abstractProvider) - { - return abstractProvider - .Apply(typeof(BTimePickerClockHand<>), typeof(BTimePickerClockHand)) - .Apply(typeof(BTimePickerClockValues<>), typeof(BTimePickerClockValues)); - } - } -} diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/Values/BTimePickerClockValues.razor b/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/Values/BTimePickerClockValues.razor deleted file mode 100644 index 1b20cf5fd..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/Values/BTimePickerClockValues.razor +++ /dev/null @@ -1,11 +0,0 @@ -@namespace BlazorComponent -@typeparam TTimePickerClock -@inherits ComponentPartBase - - @for (var value = Min; value <= Max; value = value + Step) -{ - - @Format?.Invoke(value) - -} - diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/Values/BTimePickerClockValues.razor.cs b/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/Values/BTimePickerClockValues.razor.cs deleted file mode 100644 index 5fa9ade31..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePickerClock/Values/BTimePickerClockValues.razor.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace BlazorComponent -{ - public partial class BTimePickerClockValues where TTimePickerClock : ITimePickerClock - { - public int Min => Component.Min; - - public int Max => Component.Max; - - public int Step => Component.Step; - - public Func? Format => Component.Format; - } -} diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/AmPm/BTimePickerTitleAmPm.razor b/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/AmPm/BTimePickerTitleAmPm.razor deleted file mode 100644 index 07d7dec6f..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/AmPm/BTimePickerTitleAmPm.razor +++ /dev/null @@ -1,15 +0,0 @@ -@namespace BlazorComponent -@typeparam TTimePickerTitle -@inherits ComponentPartBase - -
    - @if (!AmPmReadonly || Period == TimePeriod.Am) - { - @RenderPart(typeof(BPickerTitlePickerButton<>),"picker-button-am",OnAmClick,RenderText(AmText),arg0Name:"Name",arg1Name:"OnClick",arg2Name:"ChildContent") - } - @if (!AmPmReadonly || Period == TimePeriod.Pm) - { - @RenderPart(typeof(BPickerTitlePickerButton<>),"picker-button-pm",OnPmClick,RenderText(PmText),arg0Name:"Name",arg1Name:"OnClick",arg2Name:"ChildContent") - } -
    - diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/AmPm/BTimePickerTitleAmPm.razor.cs b/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/AmPm/BTimePickerTitleAmPm.razor.cs deleted file mode 100644 index d2c6f0d89..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/AmPm/BTimePickerTitleAmPm.razor.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace BlazorComponent -{ - public partial class BTimePickerTitleAmPm where TTimePickerTitle : ITimePickerTitle - { - public bool AmPmReadonly => Component.AmPmReadonly; - - public TimePeriod Period => Component.Period; - - public EventCallback OnAmClick => CreateEventCallback(Component.HandleOnAmClickAsync); - - public EventCallback OnPmClick => CreateEventCallback(Component.HandleOnPmClickAsync); - - public string? AmText => Component.AmText; - - public string? PmText => Component.PmText; - } -} diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/BTimePickerTitle.razor b/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/BTimePickerTitle.razor deleted file mode 100644 index 70d92a454..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/BTimePickerTitle.razor +++ /dev/null @@ -1,11 +0,0 @@ -@namespace BlazorComponent -@inherits BDomComponentBase - -
    - @RenderPart(typeof(BTimePickerTitleTime<>)) - @if (AmPm) - { - @RenderPart(typeof(BTimePickerTitleAmPm<>)) - } -
    - diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/BTimePickerTitle.razor.cs b/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/BTimePickerTitle.razor.cs deleted file mode 100644 index 1a5e902ad..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/BTimePickerTitle.razor.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.AspNetCore.Components; - -namespace BlazorComponent -{ - public partial class BTimePickerTitle - { - [Parameter] - public bool AmPm { get; set; } - } -} diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/ITimePickerTitle.cs b/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/ITimePickerTitle.cs deleted file mode 100644 index 6141a19da..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/ITimePickerTitle.cs +++ /dev/null @@ -1,31 +0,0 @@ -namespace BlazorComponent -{ - public interface ITimePickerTitle : IHasProviderComponent - { - bool AmPmReadonly { get; } - - string? AmText { get; } - - string? PmText { get; } - - TimePeriod Period { get; } - - string? DisplayHour { get; } - - string? DisplayMinute { get; } - - string? DisplaySecond { get; } - - bool UseSeconds { get; } - - Task HandleOnAmClickAsync(MouseEventArgs args); - - Task HandleOnPmClickAsync(MouseEventArgs args); - - Task HandleOnHourClickAsync(MouseEventArgs args); - - Task HandleOnMinuteClickAsync(MouseEventArgs args); - - Task HandleOnSecondClickAsync(MouseEventArgs args); - } -} diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/Time/BTimePickerTitleTime.razor b/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/Time/BTimePickerTitleTime.razor deleted file mode 100644 index f2c8edb8c..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/Time/BTimePickerTitleTime.razor +++ /dev/null @@ -1,15 +0,0 @@ -@namespace BlazorComponent -@typeparam TTimePickerTitle -@inherits ComponentPartBase - -
    - @RenderPart(typeof(BPickerTitlePickerButton<>),"picker-button-hour",OnHourClick,RenderText(DisplayedHour),arg0Name:"Name",arg1Name:"OnClick",arg2Name:"ChildContent") - : - @RenderPart(typeof(BPickerTitlePickerButton<>),"picker-button-minute",OnMinuteClick,RenderText(DisplayedMinute),arg0Name:"Name",arg1Name:"OnClick",arg2Name:"ChildContent") - @if (UseSeconds) - { - : - @RenderPart(typeof(BPickerTitlePickerButton<>),"picker-button-second",OnSecondClick,RenderText(DisplayedSecond),arg0Name:"Name",arg1Name:"OnClick",arg2Name:"ChildContent") - } -
    - diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/Time/BTimePickerTitleTime.razor.cs b/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/Time/BTimePickerTitleTime.razor.cs deleted file mode 100644 index 839b57bed..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/Time/BTimePickerTitleTime.razor.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace BlazorComponent -{ - public partial class BTimePickerTitleTime where TTimePickerTitle : ITimePickerTitle - { - public string? DisplayedHour => Component.DisplayHour; - - public string? DisplayedMinute => Component.DisplayMinute; - - public string? DisplayedSecond => Component.DisplaySecond; - - public bool UseSeconds => Component.UseSeconds; - - public EventCallback OnHourClick => CreateEventCallback(Component.HandleOnHourClickAsync); - - public EventCallback OnMinuteClick => CreateEventCallback(Component.HandleOnMinuteClickAsync); - - public EventCallback OnSecondClick => CreateEventCallback(Component.HandleOnSecondClickAsync); - } -} diff --git a/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/TimePickerTitleAbstractProviderExtensitions.cs b/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/TimePickerTitleAbstractProviderExtensitions.cs deleted file mode 100644 index d5591ae95..000000000 --- a/src/Component/BlazorComponent/Components/TimePicker/TimePickerTitle/TimePickerTitleAbstractProviderExtensitions.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace BlazorComponent -{ - public static class TimePickerTitleAbstractProviderExtensitions - { - public static ComponentAbstractProvider ApplyTimePickerTitleDefault(this ComponentAbstractProvider abstractProvider) - { - return abstractProvider - .Apply(typeof(BTimePickerTitleTime<>), typeof(BTimePickerTitleTime)) - .Apply(typeof(BTimePickerTitleAmPm<>), typeof(BTimePickerTitleAmPm)) - .Apply(typeof(BPickerTitlePickerButton<>), typeof(BPickerTitlePickerButton)); - } - } -}