Skip to content

Commit 40aca7b

Browse files
committed
V14 Hubspot integration for Forms
- update UI
1 parent 8b2c60e commit 40aca7b

File tree

8 files changed

+69
-44
lines changed

8 files changed

+69
-44
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const outputPath = 'Debug' !== 'Release' ? '../wwwroot' : '../obj/Debug/net8.0/clientassets'
1+
export const outputPath = 'Debug' !== 'Release' ? '../wwwroot' : '../obj/Debug/net8.0/clientassets'

src/Umbraco.Forms.Integrations.Crm.Hubspot/Client/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Umbraco.Forms.Integrations.Crm.Hubspot/Client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "hubspot",
2+
"name": "hubspot-crm",
33
"private": true,
44
"version": "0.0.0",
55
"type": "module",

src/Umbraco.Forms.Integrations.Crm.Hubspot/Client/public/umbraco-package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
{
77
"name": "Umbraco EntryPoint",
88
"alias": "Umb.Hubspot.EntryPoint",
9-
"type": "entryPoint"
9+
"type": "entryPoint",
10+
"js": "/App_Plugins/HubSpot/hubspot-crm.js"
1011
}
1112
]
1213
}

src/Umbraco.Forms.Integrations.Crm.Hubspot/Client/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import { manifests as localizationManifests } from "./lang/manifests.js";
66

77
import { OpenAPI } from "@umbraco-integrations/hubspot/generated";
88

9-
// export * from "./property-editor/index.js";
10-
119
export const onInit: UmbEntryPointOnInit = (host, extensionRegistry) => {
1210
extensionRegistry.registerMany([
1311
hubspotContext,

src/Umbraco.Forms.Integrations.Crm.Hubspot/Umbraco.Forms.Integrations.Crm.Hubspot.csproj

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<ImplicitUsings>enable</ImplicitUsings>
77
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
88
<EnableDefaultContentItems>false</EnableDefaultContentItems>
9+
<StaticWebAssetBasePath>/App_Plugins/HubSpot</StaticWebAssetBasePath>
910
</PropertyGroup>
1011

1112
<PropertyGroup>
@@ -36,13 +37,6 @@
3637
<PackageReference Include="Umbraco.Forms.Core" Version="14.1.1" />
3738
</ItemGroup>
3839

39-
<ItemGroup>
40-
<None Include="build\**\*.*">
41-
<Pack>True</Pack>
42-
<PackagePath>buildTransitive</PackagePath>
43-
</None>
44-
</ItemGroup>
45-
4640
<ItemGroup>
4741
<Content Include="hubspot.png">
4842
<Pack>true</Pack>
@@ -59,7 +53,7 @@
5953
</ItemGroup>
6054

6155
<!-- Build client assets using NPM -->
62-
<Import Project="build\Umbraco.Forms.Integrations.Crm.Hubspot.targets" />
56+
<Import Project="build\Microsoft.AspNetCore.ClientAssets.targets" />
6357
<PropertyGroup>
6458
<!-- Use this to (temporarily) disable building client assets, e.g. to start the project and generate updated API models -->
6559
<ShouldRunClientAssetsBuild>true</ShouldRunClientAssetsBuild>
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<Project>
2+
<!--
3+
Copied from: https://github.com/aspnet/AspLabs/blob/main/src/ClientAssets/Microsoft.AspNetCore.ClientAssets/build/netstandard2.0/Microsoft.AspNetCore.ClientAssets.targets
4+
5+
More information:
6+
- https://devblogs.microsoft.com/dotnet/build-client-web-assets-for-your-razor-class-library/
7+
- https://github.com/dotnet/aspnetcore/issues/38445
8+
-->
9+
<PropertyGroup>
10+
<ClientAssetsDirectory Condition="'$(ClientAssetsDirectory)' == ''">Client\</ClientAssetsDirectory>
11+
<ClientAssetsRestoreInputs Condition="'$(ClientAssetsRestoreInputs)' == ''">$(ClientAssetsDirectory)\package-lock.json;$(ClientAssetsDirectory)\package.json</ClientAssetsRestoreInputs>
12+
<ClientAssetsRestoreOutputs Condition="'$(ClientAssetsRestoreOutputs)' == ''">$(ClientAssetsDirectory)node_modules\.package-lock.json</ClientAssetsRestoreOutputs>
13+
<ClientAssetsRestoreCommand Condition="'$(ClientAssetsRestoreCommand)' == ''">npm ci --no-fund --no-audit --prefer-offline</ClientAssetsRestoreCommand>
14+
<ClientAssetsBuildCommand Condition="'$(ClientAssetsBuildCommand)' == ''">npm run build</ClientAssetsBuildCommand>
15+
16+
<!-- Include project file to pick up changes in the above values -->
17+
<ClientAssetsRestoreInputs>$(MSBuildProjectFile);$(ClientAssetsRestoreInputs)</ClientAssetsRestoreInputs>
18+
<!-- Run restore only once for multi targeting builds -->
19+
<ClientAssetsRestoreBeforeTargets Condition="'$(TargetFramework)' == ''">DispatchToInnerBuilds</ClientAssetsRestoreBeforeTargets>
20+
<!-- Allow multitargeting projects to choose the target framework in which they run by setting this value to true only for a given target framework -->
21+
<ShouldRunClientAssetsBuild Condition="'$(ShouldRunClientAssetsBuild)' == ''">true</ShouldRunClientAssetsBuild>
22+
</PropertyGroup>
23+
24+
<ItemGroup>
25+
<ClientAssetsInputs Include="$(ClientAssetsDirectory)**" Exclude="$(DefaultItemExcludes)" />
26+
</ItemGroup>
27+
28+
<Target Name="ClientAssetsRestore" BeforeTargets="$(ClientAssetsRestoreBeforeTargets)" Inputs="$(ClientAssetsRestoreInputs)" Outputs="$(ClientAssetsRestoreOutputs)">
29+
<Message Text="Restoring NPM packages" Importance="high" />
30+
<Exec Command="$(ClientAssetsRestoreCommand)" WorkingDirectory="$(ClientAssetsDirectory)"/>
31+
</Target>
32+
33+
<Target Name="ClientAssetsBuild" Condition="'$(ShouldRunClientAssetsBuild)' == 'true'" DependsOnTargets="ClientAssetsRestore" BeforeTargets="AssignTargetPaths" Inputs="@(ClientAssetsInputs)" Outputs="$(IntermediateOutputPath)clientassetsbuild.complete.txt">
34+
<PropertyGroup>
35+
<_ClientAssetsOutputFullPath>$([System.IO.Path]::GetFullPath('$(IntermediateOutputPath)clientassets'))</_ClientAssetsOutputFullPath>
36+
</PropertyGroup>
37+
38+
<Message Text="Executing NPM build script" Importance="High" />
39+
40+
<MakeDir Directories="$(_ClientAssetsOutputFullPath)" />
41+
<Exec Command="$(ClientAssetsBuildCommand)" WorkingDirectory="$(ClientAssetsDirectory)" />
42+
43+
<ItemGroup>
44+
<_ClientAssetsBuildOutput Include="$(IntermediateOutputPath)clientassets\**"></_ClientAssetsBuildOutput>
45+
</ItemGroup>
46+
47+
<WriteLinesToFile File="$(IntermediateOutputPath)clientassetsbuild.complete.txt" Lines="@(_ClientAssetsBuildOutput)" />
48+
</Target>
49+
50+
<Target Name="DefineClientAssets" AfterTargets="ClientAssetsBuild" DependsOnTargets="ResolveStaticWebAssetsConfiguration">
51+
<ItemGroup>
52+
<FileWrites Include="@(_ClientAssetsBuildOutput)" />
53+
<FileWrites Include="$(IntermediateOutputPath)clientassetsbuild.complete.txt" />
54+
</ItemGroup>
55+
56+
<DefineStaticWebAssets CandidateAssets="@(_ClientAssetsBuildOutput)" SourceId="$(PackageId)" SourceType="Computed" ContentRoot="$(_ClientAssetsOutputFullPath)" BasePath="$(StaticWebAssetBasePath)">
57+
<Output TaskParameter="Assets" ItemName="StaticWebAsset" />
58+
</DefineStaticWebAssets>
59+
</Target>
60+
61+
</Project>

src/Umbraco.Forms.Integrations.Crm.Hubspot/build/Umbraco.Forms.Integrations.Crm.Hubspot.targets

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)