diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..6f752c3 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "dependencies/Connected"] + path = dependencies/Connected + url = https://git.tompit.com/Connected/Connected.git diff --git a/Connected.Components.sln b/Connected.Components.sln index 4b866f4..adf711a 100644 --- a/Connected.Components.sln +++ b/Connected.Components.sln @@ -9,6 +9,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Connected.Components.Showca EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Connected.Components.Showcase.Runner", "src\Connected.Components.Showcase.Runner\Connected.Components.Showcase.Runner.csproj", "{347B526C-39A0-43CE-B0F9-79E61B4897C6}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Dependencies", "Dependencies", "{BCBA8E3E-D4C0-45A5-8780-FDED0B4C7A47}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Connected.Client", "dependencies\Connected\src\Connected.Client\Connected.Client.csproj", "{2118ED53-21AC-4D53-8B02-52980E5C715F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -27,10 +31,17 @@ Global {347B526C-39A0-43CE-B0F9-79E61B4897C6}.Debug|Any CPU.Build.0 = Debug|Any CPU {347B526C-39A0-43CE-B0F9-79E61B4897C6}.Release|Any CPU.ActiveCfg = Release|Any CPU {347B526C-39A0-43CE-B0F9-79E61B4897C6}.Release|Any CPU.Build.0 = Release|Any CPU + {2118ED53-21AC-4D53-8B02-52980E5C715F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2118ED53-21AC-4D53-8B02-52980E5C715F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2118ED53-21AC-4D53-8B02-52980E5C715F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2118ED53-21AC-4D53-8B02-52980E5C715F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {2118ED53-21AC-4D53-8B02-52980E5C715F} = {BCBA8E3E-D4C0-45A5-8780-FDED0B4C7A47} + EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {CBDD97EC-4855-4005-97A7-29FE298FB057} EndGlobalSection diff --git a/dependencies/Connected b/dependencies/Connected new file mode 160000 index 0000000..cc259df --- /dev/null +++ b/dependencies/Connected @@ -0,0 +1 @@ +Subproject commit cc259dfc18c4ad6989898fa813e281b9249c3bd3 diff --git a/src/Connected.Components.Showcase.Runner/Pages/Index.razor b/src/Connected.Components.Showcase.Runner/Pages/Index.razor index 748b937..4798256 100644 --- a/src/Connected.Components.Showcase.Runner/Pages/Index.razor +++ b/src/Connected.Components.Showcase.Runner/Pages/Index.razor @@ -8,56 +8,20 @@

ValueText: @inputValueText

SimpleSelectValue: @SelectedItemValue

- - - - - - - - + - - - - - + @code { diff --git a/src/Connected.Components.Showcase/Connected.Components.Showcase.csproj b/src/Connected.Components.Showcase/Connected.Components.Showcase.csproj index 767a1cc..5890883 100644 --- a/src/Connected.Components.Showcase/Connected.Components.Showcase.csproj +++ b/src/Connected.Components.Showcase/Connected.Components.Showcase.csproj @@ -20,7 +20,6 @@ - @@ -39,6 +38,7 @@ + diff --git a/src/Connected.Components/Components/SimpleSelect.razor b/src/Connected.Components/Components/SimpleSelect.razor deleted file mode 100644 index facc072..0000000 --- a/src/Connected.Components/Components/SimpleSelect.razor +++ /dev/null @@ -1,18 +0,0 @@ -@using Connected.Models; - -@typeparam ValueType - -@inherits InputBase; - -
- -
\ No newline at end of file diff --git a/src/Connected.Components/Components/SimpleSelect.razor.cs b/src/Connected.Components/Components/SimpleSelect.razor.cs deleted file mode 100644 index 4bdfdc2..0000000 --- a/src/Connected.Components/Components/SimpleSelect.razor.cs +++ /dev/null @@ -1,45 +0,0 @@ -using Connected.Models; -using Microsoft.AspNetCore.Components; -using System; - -namespace Connected.Components; -public partial class SimpleSelect : InputBase -{ - [Parameter] - public ValueType Value { get; set; } - - [Parameter] - public IEnumerable> Items { get; set; } - - public IEnumerable> OriginalItems { get; set; } - - [Parameter] - public bool EnableSearch { get; set; } = true; - public string SearchText { get; set; } - - public void FilterItems() - { - Items= Items.Where(item => item.Value.ToString().ToLower().Contains(SearchText.ToLower()) || item.DisplayedText.ToString().ToLower().Contains(SearchText.ToLower())); - } - - - [Parameter] - public EventCallback ValueChanged { get; set; } - - private async Task ChangeValueAsync(ChangeEventArgs args) - { - await ValueChanged.InvokeAsync((ValueType)Convert.ChangeType(args.Value, typeof(ValueType))); - } - - protected override async Task OnParametersSetAsync() - { - if (base.InputAttributes is null) base.InputAttributes = new(); - if (base.Required) - { - if (base.InputAttributes.ContainsKey("required")) base.InputAttributes.Add("required", true); - } - OriginalItems = Items; - await base.OnInitializedAsync(); - } - -} \ No newline at end of file