Skip to content

Commit

Permalink
moved outside click to its own project
Browse files Browse the repository at this point in the history
  • Loading branch information
erinnmclaughlin committed May 20, 2024
1 parent 310ef1e commit beb6d8d
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 10 deletions.
6 changes: 6 additions & 0 deletions HeadlessBlazor.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HeadlessBlazor.Docs", "docs
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeadlessBlazor.FloatingElement", "src\HeadlessBlazor.FloatingElement\HeadlessBlazor.FloatingElement.csproj", "{C6C092FD-EDA4-4313-B7D8-E162861A2750}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeadlessBlazor.OutsideClick", "src\HeadlessBlazor.OutsideClick\HeadlessBlazor.OutsideClick.csproj", "{A9EA3407-BCEE-4F73-980F-8287C71CB8DF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -47,6 +49,10 @@ Global
{C6C092FD-EDA4-4313-B7D8-E162861A2750}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C6C092FD-EDA4-4313-B7D8-E162861A2750}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C6C092FD-EDA4-4313-B7D8-E162861A2750}.Release|Any CPU.Build.0 = Release|Any CPU
{A9EA3407-BCEE-4F73-980F-8287C71CB8DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A9EA3407-BCEE-4F73-980F-8287C71CB8DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A9EA3407-BCEE-4F73-980F-8287C71CB8DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A9EA3407-BCEE-4F73-980F-8287C71CB8DF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
8 changes: 0 additions & 8 deletions src/HeadlessBlazor.Core/Behaviors/IReferenceable.cs

This file was deleted.

2 changes: 1 addition & 1 deletion src/HeadlessBlazor.Dropdown/HBDropdown.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace HeadlessBlazor;

public class HBDropdown : HBElement<HBDropdown>, IReferenceable
public class HBDropdown : HBElement<HBDropdown>
{
public ElementReference ElementReference { get; private set; }

Expand Down
1 change: 1 addition & 0 deletions src/HeadlessBlazor.Dropdown/HeadlessBlazor.Dropdown.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
<ItemGroup>
<ProjectReference Include="..\HeadlessBlazor.Core\HeadlessBlazor.Core.csproj" />
<ProjectReference Include="..\HeadlessBlazor.FloatingElement\HeadlessBlazor.FloatingElement.csproj" />
<ProjectReference Include="..\HeadlessBlazor.OutsideClick\HeadlessBlazor.OutsideClick.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@implements IAsyncDisposable
@namespace HeadlessBlazor
@using Microsoft.AspNetCore.Components.Rendering
@using Microsoft.JSInterop

@code {
private DotNetObjectReference<HBOutsideClickBehavior>? dotNetObjRef;
Expand Down Expand Up @@ -39,7 +40,7 @@
{
dotNetObjRef ??= DotNetObjectReference.Create(this);
var moduleName = nameof(HBOutsideClickBehavior);
var module = await JS.InvokeAsync<IJSObjectReference>("import", $"./_content/HeadlessBlazor.Core/Behaviors/OutsideClick/{moduleName}.razor.js");
var module = await JS.InvokeAsync<IJSObjectReference>("import", $"./_content/HeadlessBlazor.OutsideClick/{moduleName}.razor.js");
handlerRef = await module.InvokeAsync<IJSObjectReference>($"{moduleName}.createInstance", Container, dotNetObjRef);
await module.DisposeAsync();
}
Expand Down
18 changes: 18 additions & 0 deletions src/HeadlessBlazor.OutsideClick/HeadlessBlazor.OutsideClick.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>HeadlessBlazor</RootNamespace>
</PropertyGroup>

<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.4" />
</ItemGroup>

</Project>

0 comments on commit beb6d8d

Please sign in to comment.