From e42a13ee8022b3c3d153b33d5008e5382cc3d091 Mon Sep 17 00:00:00 2001 From: Lucas Bach Bisgaard Date: Tue, 30 Aug 2022 12:43:24 +0200 Subject: [PATCH 1/2] Remove old --- assets/images/icon.png | Bin 6430 -> 0 bytes assets/umbraco/data/umbraco.sdf | Bin 65536 -> 0 bytes .../AutodiscoverEmbedProviderTests.cs | 29 -- .../HttpClientFactory.cs | 9 - .../Novicell.Umbraco.OEmbed.Tests.csproj | 34 --- ...dDiscoveryService_DiscoverFromUrl_Tests.cs | 80 ----- ...yService_FindOEmbedEndpointInHtml_Tests.cs | 31 -- ...ce_FindOEmbedEndpointInLinkHeader_Tests.cs | 37 --- .../OEmbedServiceIntegrationTests.cs | 124 -------- .../OEmbedServiceUnitTests.cs | 82 ----- .../Novicell.Umbraco.OEmbed.Website.csproj | 62 ---- .../Program.cs | 19 -- .../Properties/launchSettings.json | 26 -- .../Startup.cs | 71 ----- .../Views/Home.cshtml | 66 ---- .../Views/Partials/blocklist/default.cshtml | 12 - .../Partials/grid/bootstrap3-fluid.cshtml | 94 ------ .../Views/Partials/grid/bootstrap3.cshtml | 101 ------ .../Views/Partials/grid/editors/base.cshtml | 23 -- .../Views/Partials/grid/editors/embed.cshtml | 10 - .../Views/Partials/grid/editors/macro.cshtml | 15 - .../Views/Partials/grid/editors/media.cshtml | 61 ---- .../Views/Partials/grid/editors/rte.cshtml | 13 - .../Partials/grid/editors/textstring.cshtml | 23 -- .../Views/Site.cshtml | 8 - .../Views/_ViewImports.cshtml | 5 - .../appsettings.Development.json | 62 ---- .../appsettings.json | 20 -- .../uSync/v9/Content/home1.config | 39 --- .../uSync/v9/Content/site1.config | 16 - .../uSync/v9/ContentTypes/home.config | 25 -- .../uSync/v9/ContentTypes/pagecontent.config | 44 --- .../uSync/v9/ContentTypes/site.config | 23 -- .../uSync/v9/DataTypes/ApprovedColor.config | 12 - .../uSync/v9/DataTypes/CheckboxList.config | 11 - .../uSync/v9/DataTypes/ContentPicker.config | 13 - .../uSync/v9/DataTypes/DatePicker.config | 12 - .../v9/DataTypes/DatePickerWithTime.config | 12 - .../uSync/v9/DataTypes/Dropdown.config | 12 - .../v9/DataTypes/DropdownMultiple.config | 12 - .../uSync/v9/DataTypes/ImageCropper.config | 11 - .../v9/DataTypes/ImageMediaPicker.config | 20 -- .../uSync/v9/DataTypes/LabelBigint.config | 11 - .../uSync/v9/DataTypes/LabelDatetime.config | 11 - .../uSync/v9/DataTypes/LabelDecimal.config | 11 - .../uSync/v9/DataTypes/LabelInteger.config | 11 - .../uSync/v9/DataTypes/LabelString.config | 11 - .../uSync/v9/DataTypes/LabelTime.config | 11 - .../uSync/v9/DataTypes/ListViewContent.config | 54 ---- .../uSync/v9/DataTypes/ListViewMedia.config | 54 ---- .../uSync/v9/DataTypes/ListViewMembers.config | 60 ---- .../uSync/v9/DataTypes/MediaPicker.config | 20 -- .../v9/DataTypes/MediaPickerLegacy.config | 15 - .../uSync/v9/DataTypes/MemberPicker.config | 9 - .../uSync/v9/DataTypes/MultiURLPicker.config | 15 - .../DataTypes/MultipleImageMediaPicker.config | 20 -- .../v9/DataTypes/MultipleMediaPicker.config | 20 -- .../MultipleMediaPickerLegacy.config | 15 - .../uSync/v9/DataTypes/Numeric.config | 9 - .../uSync/v9/DataTypes/OEmbedVideo.config | 11 - .../uSync/v9/DataTypes/Radiobox.config | 11 - .../uSync/v9/DataTypes/RichtextEditor.config | 14 - .../uSync/v9/DataTypes/Tags.config | 13 - .../uSync/v9/DataTypes/Textarea.config | 12 - .../uSync/v9/DataTypes/Textstring.config | 11 - .../uSync/v9/DataTypes/Truefalse.config | 14 - .../uSync/v9/DataTypes/UploadArticle.config | 24 -- .../uSync/v9/DataTypes/UploadAudio.config | 28 -- .../uSync/v9/DataTypes/UploadFile.config | 11 - .../v9/DataTypes/UploadVectorGraphics.config | 16 - .../uSync/v9/DataTypes/UploadVideo.config | 24 -- .../uSync/v9/Languages/en-us.config | 6 - .../uSync/v9/Media/lion.config | 17 -- .../uSync/v9/MediaTypes/file.config | 70 ----- .../uSync/v9/MediaTypes/folder.config | 25 -- .../uSync/v9/MediaTypes/image.config | 100 ------ .../v9/MediaTypes/umbracomediaarticle.config | 70 ----- .../v9/MediaTypes/umbracomediaaudio.config | 70 ----- .../umbracomediavectorgraphics.config | 70 ----- .../v9/MediaTypes/umbracomediavideo.config | 70 ----- .../uSync/v9/MemberTypes/member.config | 151 --------- .../uSync/v9/Templates/home.config | 5 - .../uSync/v9/Templates/site.config | 5 - .../uSync/v9/usync.config | 4 - src/Novicell.Umbraco.OEmbed.sln | 70 ----- .../Novicell.OEmbed/Lang/da-dk.xml | 14 - .../Novicell.OEmbed/Lang/en-us.xml | 14 - .../App_Plugins/Novicell.OEmbed/oembed.css | 47 --- .../Novicell.OEmbed/oembed.editor.html | 42 --- .../App_Plugins/Novicell.OEmbed/oembed.js | 287 ------------------ .../Novicell.OEmbed/oembed.preview.html | 35 --- .../oembed.propertyeditor.html | 25 -- .../Composing/OEmbedComposer.cs | 25 -- .../Configuration/Models/OEmbedSettings.cs | 9 - .../Controllers/OEmbedController.cs | 104 ------- .../Models/OEmbedResponse.cs | 76 ----- .../Models/OEmbedType.cs | 10 - .../Models/OEmbedValue.cs | 9 - .../Novicell.Umbraco.OEmbed.csproj | 56 ---- .../OEmbedException.cs | 27 -- .../OEmbedUrlNotSupportedException.cs | 28 -- .../PropertyEditors/OEmbedConfiguration.cs | 10 - .../OEmbedConfigurationEditor.cs | 39 --- .../OEmbedConfigurationTypeFieldValidator.cs | 34 --- .../PropertyEditors/OEmbedPropertyEditor.cs | 41 --- .../OEmbedPropertyValueConverter.cs | 50 --- .../Services/IOEmbedDiscoveryService.cs | 27 -- .../Services/IOEmbedService.cs | 12 - .../Services/OEmbedDiscoveryService.cs | 234 -------------- .../Services/OEmbedService.cs | 193 ------------ .../Services/OEmbedServiceBase.cs | 41 --- .../UmbracoBuilderExtensions.cs | 37 --- .../build/Novicell.Umbraco.OEmbed.targets | 26 -- 113 files changed, 4210 deletions(-) delete mode 100644 assets/images/icon.png delete mode 100644 assets/umbraco/data/umbraco.sdf delete mode 100644 src/Novicell.Umbraco.OEmbed.Tests/AutodiscoverEmbedProviderTests.cs delete mode 100644 src/Novicell.Umbraco.OEmbed.Tests/HttpClientFactory.cs delete mode 100644 src/Novicell.Umbraco.OEmbed.Tests/Novicell.Umbraco.OEmbed.Tests.csproj delete mode 100644 src/Novicell.Umbraco.OEmbed.Tests/OEmbedDiscoveryService_DiscoverFromUrl_Tests.cs delete mode 100644 src/Novicell.Umbraco.OEmbed.Tests/OEmbedDiscoveryService_FindOEmbedEndpointInHtml_Tests.cs delete mode 100644 src/Novicell.Umbraco.OEmbed.Tests/OEmbedDiscoveryService_FindOEmbedEndpointInLinkHeader_Tests.cs delete mode 100644 src/Novicell.Umbraco.OEmbed.Tests/OEmbedServiceIntegrationTests.cs delete mode 100644 src/Novicell.Umbraco.OEmbed.Tests/OEmbedServiceUnitTests.cs delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/Novicell.Umbraco.OEmbed.Website.csproj delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/Program.cs delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/Properties/launchSettings.json delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/Startup.cs delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/Views/Home.cshtml delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/Views/Partials/blocklist/default.cshtml delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/Views/Partials/grid/bootstrap3-fluid.cshtml delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/Views/Partials/grid/bootstrap3.cshtml delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/Views/Partials/grid/editors/base.cshtml delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/Views/Partials/grid/editors/embed.cshtml delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/Views/Partials/grid/editors/macro.cshtml delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/Views/Partials/grid/editors/media.cshtml delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/Views/Partials/grid/editors/rte.cshtml delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/Views/Partials/grid/editors/textstring.cshtml delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/Views/Site.cshtml delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/Views/_ViewImports.cshtml delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/appsettings.Development.json delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/appsettings.json delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/Content/home1.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/Content/site1.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/ContentTypes/home.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/ContentTypes/pagecontent.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/ContentTypes/site.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ApprovedColor.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/CheckboxList.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ContentPicker.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/DatePicker.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/DatePickerWithTime.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Dropdown.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/DropdownMultiple.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ImageCropper.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ImageMediaPicker.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelBigint.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelDatetime.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelDecimal.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelInteger.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelString.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelTime.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ListViewContent.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ListViewMedia.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ListViewMembers.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MediaPicker.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MediaPickerLegacy.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MemberPicker.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MultiURLPicker.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MultipleImageMediaPicker.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MultipleMediaPicker.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MultipleMediaPickerLegacy.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Numeric.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/OEmbedVideo.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Radiobox.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/RichtextEditor.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Tags.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Textarea.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Textstring.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Truefalse.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/UploadArticle.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/UploadAudio.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/UploadFile.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/UploadVectorGraphics.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/UploadVideo.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/Languages/en-us.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/Media/lion.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/file.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/folder.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/image.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/umbracomediaarticle.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/umbracomediaaudio.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/umbracomediavectorgraphics.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/umbracomediavideo.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MemberTypes/member.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/Templates/home.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/Templates/site.config delete mode 100644 src/Novicell.Umbraco.OEmbed.Website/uSync/v9/usync.config delete mode 100644 src/Novicell.Umbraco.OEmbed.sln delete mode 100644 src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/Lang/da-dk.xml delete mode 100644 src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/Lang/en-us.xml delete mode 100644 src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.css delete mode 100644 src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.editor.html delete mode 100644 src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.js delete mode 100644 src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.preview.html delete mode 100644 src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.propertyeditor.html delete mode 100644 src/Novicell.Umbraco.OEmbed/Composing/OEmbedComposer.cs delete mode 100644 src/Novicell.Umbraco.OEmbed/Configuration/Models/OEmbedSettings.cs delete mode 100644 src/Novicell.Umbraco.OEmbed/Controllers/OEmbedController.cs delete mode 100644 src/Novicell.Umbraco.OEmbed/Models/OEmbedResponse.cs delete mode 100644 src/Novicell.Umbraco.OEmbed/Models/OEmbedType.cs delete mode 100644 src/Novicell.Umbraco.OEmbed/Models/OEmbedValue.cs delete mode 100644 src/Novicell.Umbraco.OEmbed/Novicell.Umbraco.OEmbed.csproj delete mode 100644 src/Novicell.Umbraco.OEmbed/OEmbedException.cs delete mode 100644 src/Novicell.Umbraco.OEmbed/OEmbedUrlNotSupportedException.cs delete mode 100644 src/Novicell.Umbraco.OEmbed/PropertyEditors/OEmbedConfiguration.cs delete mode 100644 src/Novicell.Umbraco.OEmbed/PropertyEditors/OEmbedConfigurationEditor.cs delete mode 100644 src/Novicell.Umbraco.OEmbed/PropertyEditors/OEmbedConfigurationTypeFieldValidator.cs delete mode 100644 src/Novicell.Umbraco.OEmbed/PropertyEditors/OEmbedPropertyEditor.cs delete mode 100644 src/Novicell.Umbraco.OEmbed/PropertyEditors/OEmbedPropertyValueConverter.cs delete mode 100644 src/Novicell.Umbraco.OEmbed/Services/IOEmbedDiscoveryService.cs delete mode 100644 src/Novicell.Umbraco.OEmbed/Services/IOEmbedService.cs delete mode 100644 src/Novicell.Umbraco.OEmbed/Services/OEmbedDiscoveryService.cs delete mode 100644 src/Novicell.Umbraco.OEmbed/Services/OEmbedService.cs delete mode 100644 src/Novicell.Umbraco.OEmbed/Services/OEmbedServiceBase.cs delete mode 100644 src/Novicell.Umbraco.OEmbed/UmbracoBuilderExtensions.cs delete mode 100644 src/Novicell.Umbraco.OEmbed/build/Novicell.Umbraco.OEmbed.targets diff --git a/assets/images/icon.png b/assets/images/icon.png deleted file mode 100644 index 163fc232d9413114cc2580473c284ca3426bb2c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6430 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�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 diff --git a/assets/umbraco/data/umbraco.sdf b/assets/umbraco/data/umbraco.sdf deleted file mode 100644 index 960db024b3722ad8e9c4565a203072acd72a81e7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 65536 zcmeI(F^a-K6adh#8G~!1g}ovkK-hZ0dQV_!XYVyUfQ@(rkKtJ?y@4jU8MoTb1@(Oh z`5A`H|1Z@r$((JjLQ9S_y z1PBlyK!5-N0t5&UAn>Qau3U9fTIM-L{e! x.Key == "a"); - Assert.Contains(provider.RequestParams, x => x.Key == "b"); - - Assert.Equal("1", provider.RequestParams["a"]); - Assert.Equal("2", provider.RequestParams["b"]); - } - } -} \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Tests/HttpClientFactory.cs b/src/Novicell.Umbraco.OEmbed.Tests/HttpClientFactory.cs deleted file mode 100644 index 52d0674..0000000 --- a/src/Novicell.Umbraco.OEmbed.Tests/HttpClientFactory.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Net.Http; - -namespace Novicell.Umbraco.OEmbed.Tests -{ - public class HttpClientFactory : IHttpClientFactory - { - public HttpClient CreateClient(string name) => new(); - } -} \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Tests/Novicell.Umbraco.OEmbed.Tests.csproj b/src/Novicell.Umbraco.OEmbed.Tests/Novicell.Umbraco.OEmbed.Tests.csproj deleted file mode 100644 index d2ddb07..0000000 --- a/src/Novicell.Umbraco.OEmbed.Tests/Novicell.Umbraco.OEmbed.Tests.csproj +++ /dev/null @@ -1,34 +0,0 @@ - - - - net5.0 - - false - - - - True - - - - True - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - diff --git a/src/Novicell.Umbraco.OEmbed.Tests/OEmbedDiscoveryService_DiscoverFromUrl_Tests.cs b/src/Novicell.Umbraco.OEmbed.Tests/OEmbedDiscoveryService_DiscoverFromUrl_Tests.cs deleted file mode 100644 index 281084a..0000000 --- a/src/Novicell.Umbraco.OEmbed.Tests/OEmbedDiscoveryService_DiscoverFromUrl_Tests.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading.Tasks; -using Novicell.Umbraco.OEmbed.Services; -using Xunit; - -namespace Novicell.Umbraco.OEmbed.Tests -{ - [Trait("Category", "Services")] - [Trait("Category", "Integration")] - public class OEmbedDiscoveryService_DiscoverFromUrl_Tests - { - private readonly IHttpClientFactory _httpClientFactory = new HttpClientFactory(); - - [Fact] - public async void CanNotDiscoverInvalidUrl() - { - var url = new Uri("https://0.0.0.0/not-found"); - - var discovery = new OEmbedDiscoveryService(_httpClientFactory); - - var provider = await discovery.DiscoverFromUrlAsync(url); - - Assert.False(provider.Success); - Assert.Null(provider.Result); - } - - [Fact] - public async Task CanDiscoverFlickrEndpoint() - { - var url = new Uri("https://www.flickr.com/photos/percipientstudios/18009929763"); - - var discovery = new OEmbedDiscoveryService(_httpClientFactory); - - var provider = await discovery.DiscoverFromUrlAsync(url); - - Assert.True(provider.Success); - Assert.NotNull(provider.Result); - Assert.Equal("https://www.flickr.com/services/oembed", provider.Result.ApiEndpoint); - - Assert.StartsWith(provider.Result.RequestParams["url"], url.AbsoluteUri); - } - - [Fact] - public async Task CanDiscoverVimeoEndpoint() - { - var url = new Uri("https://vimeo.com/371827688"); - - var discovery = new OEmbedDiscoveryService(_httpClientFactory); - - var provider = await discovery.DiscoverFromUrlAsync(url); - - Assert.True(provider.Success); - Assert.NotNull(provider.Result); - - Assert.Equal("https://vimeo.com/api/oembed.json", provider.Result.ApiEndpoint); - - // use StartsWith, as Vimeo appends some data to the url in the url-param - Assert.StartsWith(url.AbsoluteUri, provider.Result.RequestParams["url"]); - } - - [Fact] - public async Task CanDiscoverYoutubeEndpoint() - { - var url = new Uri("https://www.youtube.com/watch?v=dQw4w9WgXcQ"); - - var discovery = new OEmbedDiscoveryService(_httpClientFactory); - - var provider = await discovery.DiscoverFromUrlAsync(url); - - Assert.True(provider.Success); - Assert.NotNull(provider.Result); - - Assert.Equal("https://www.youtube.com/oembed", provider.Result.ApiEndpoint); - - Assert.Equal("json", provider.Result.RequestParams["format"]); - Assert.Equal(url.AbsoluteUri, provider.Result.RequestParams["url"]); - } - } -} \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Tests/OEmbedDiscoveryService_FindOEmbedEndpointInHtml_Tests.cs b/src/Novicell.Umbraco.OEmbed.Tests/OEmbedDiscoveryService_FindOEmbedEndpointInHtml_Tests.cs deleted file mode 100644 index e77dbcd..0000000 --- a/src/Novicell.Umbraco.OEmbed.Tests/OEmbedDiscoveryService_FindOEmbedEndpointInHtml_Tests.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using Novicell.Umbraco.OEmbed.Services; -using Xunit; - -namespace Novicell.Umbraco.OEmbed.Tests -{ - [Trait("Category", "Services")] - public class OEmbedDiscoveryService_FindOEmbedEndpointInHtml_Tests - { - [Fact] - public void CanOEmbedEndpointFromHtml() - { - const string html = ""; - - var endpoint = OEmbedDiscoveryService.FindOEmbedEndpointInHtml(html); - - Assert.NotNull(endpoint); - Assert.Equal(new Uri("https://example.com/oembed/"), endpoint); - } - - [Fact] - public void CanNotOEmbedEndpointFromHtml() - { - const string html = ""; - - var endpoint = OEmbedDiscoveryService.FindOEmbedEndpointInHtml(html); - - Assert.Null(endpoint); - } - } -} \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Tests/OEmbedDiscoveryService_FindOEmbedEndpointInLinkHeader_Tests.cs b/src/Novicell.Umbraco.OEmbed.Tests/OEmbedDiscoveryService_FindOEmbedEndpointInLinkHeader_Tests.cs deleted file mode 100644 index 037a583..0000000 --- a/src/Novicell.Umbraco.OEmbed.Tests/OEmbedDiscoveryService_FindOEmbedEndpointInLinkHeader_Tests.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using Novicell.Umbraco.OEmbed.Services; -using Xunit; - -namespace Novicell.Umbraco.OEmbed.Tests -{ - [Trait("Category", "Services")] - public class OEmbedDiscoveryService_FindOEmbedEndpointInLinkHeader_Tests - { - [Fact] - public void CanFindAlternateOEmbedUrlFromLinkHeader() - { - const string linkHeaderValue = "; rel=alternate; type=application/json+oembed"; - - var endpoint = OEmbedDiscoveryService.FindOEmbedEndpointInLinkHeader(new[] - { - linkHeaderValue - }); - - Assert.NotNull(endpoint); - Assert.Equal(new Uri("https://example.com/oembed/"), endpoint); - } - - [Fact] - public void CanNotFindAlternateOEmbedUrlFromLinkHeaderWithoutOEmbedType() - { - const string linkHeaderValue = "; rel=alternate; type=not-text/not-json"; - - var endpoint = OEmbedDiscoveryService.FindOEmbedEndpointInLinkHeader(new[] - { - linkHeaderValue - }); - - Assert.Null(endpoint); - } - } -} \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Tests/OEmbedServiceIntegrationTests.cs b/src/Novicell.Umbraco.OEmbed.Tests/OEmbedServiceIntegrationTests.cs deleted file mode 100644 index aece828..0000000 --- a/src/Novicell.Umbraco.OEmbed.Tests/OEmbedServiceIntegrationTests.cs +++ /dev/null @@ -1,124 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading.Tasks; -using Microsoft.Extensions.Options; -using Novicell.Umbraco.OEmbed.Configuration.Models; -using Novicell.Umbraco.OEmbed.Services; -using Umbraco.Cms.Core.Media; -using Umbraco.Cms.Core.Media.EmbedProviders; -using Umbraco.Cms.Infrastructure.Serialization; -using Xunit; - -namespace Novicell.Umbraco.OEmbed.Tests -{ - [Trait("Category", "Services")] - [Trait("Category", "Integration")] - public class OEmbedServiceIntegrationTests - { - private readonly EmbedProvidersCollection YouTubeOnlyEmbedProvidersCollection; - private readonly EmbedProvidersCollection SoundCloudOnlyEmbedProvidersCollection; - private readonly EmbedProvidersCollection EmptyEmbedProvidersCollection; - private readonly IHttpClientFactory _httpClientFactory = new HttpClientFactory(); - - public OEmbedServiceIntegrationTests() - { - var jsonSerializer = new JsonNetSerializer(); - - YouTubeOnlyEmbedProvidersCollection = new EmbedProvidersCollection(() => new[] - { - new YouTube(jsonSerializer), - }); - - SoundCloudOnlyEmbedProvidersCollection = new EmbedProvidersCollection(() => new[] - { - new Soundcloud(jsonSerializer), - }); - - EmptyEmbedProvidersCollection = new EmbedProvidersCollection(Array.Empty); - } - - [Fact] - public async Task EmbedSoundcloudRichFromKnownProvider() - { - var oembed = new OEmbedService(SoundCloudOnlyEmbedProvidersCollection, _httpClientFactory, null, null); - var embed = await oembed.GetOEmbedAsync(new Uri("https://soundcloud.com/dj_zanderz/mellemfingamuzik-jungle-zanderz-remix-demo"), 0, 0); - Assert.True(embed.Success); - Assert.NotNull(embed.Result); - Assert.StartsWith("MellemFingaMuzik", embed.Result.Title); - } - - [Fact] - public async Task EmbedYouTubeVideoFromKnownProvider() - { - var oembed = new OEmbedService(YouTubeOnlyEmbedProvidersCollection, _httpClientFactory, null,null); - var embed = await oembed.GetOEmbedAsync(new Uri("https://www.youtube.com/watch?v=dQw4w9WgXcQ"), 0, 0); - Assert.True(embed.Success); - Assert.NotNull(embed.Result); - Assert.StartsWith("Rick Astley", embed.Result.Title); - } - - [Fact] - public async Task EmbedYouTubeVideoFromAutodiscover() - { - var settings = new OptionsWrapper(new OEmbedSettings - { - Autodiscover = true, - }); - - var discovery = new OEmbedDiscoveryService(_httpClientFactory); - var oembed = new OEmbedService(EmptyEmbedProvidersCollection, _httpClientFactory, discovery, settings); - var embed = await oembed.GetOEmbedAsync(new Uri("https://www.youtube.com/watch?v=dQw4w9WgXcQ"), 0, 0); - Assert.True(embed.Success); - Assert.NotNull(embed.Result); - Assert.StartsWith("Rick Astley", embed.Result.Title); - } - - [Fact] - public async Task EmbedVimeoVideoFromAutodiscover() - { - var settings = new OptionsWrapper(new OEmbedSettings - { - Autodiscover = true, - }); - - var discovery = new OEmbedDiscoveryService(_httpClientFactory); - var oembed = new OEmbedService(EmptyEmbedProvidersCollection, _httpClientFactory, discovery, settings); - var embed = await oembed.GetOEmbedAsync(new Uri("https://vimeo.com/251769074"), 0, 0); - Assert.True(embed.Success); - Assert.NotNull(embed.Result); - Assert.StartsWith("Welcome to Umbraco HQ", embed.Result.Title); - - if (embed.Result.TryGetValue("upload_date", out var uploadDateValue) && - DateTime.TryParse(uploadDateValue, out var uploadDate)) - { - /*Assert.NotNull(uploadDate);*/ - Assert.NotEqual(default, uploadDate); - } - } - - [Fact] - public async Task FailWhenNoProvidersEnabled() - { - var settings = new OptionsWrapper(new OEmbedSettings - { - Autodiscover = false, - }); - - var oembed = new OEmbedService(EmptyEmbedProvidersCollection, _httpClientFactory, null, settings); - - var embed = await oembed.GetOEmbedAsync(new Uri("https://www.youtube.com/watch?v=0BPL5tT9_2Y"), 0, 0); - Assert.False(embed.Success); - Assert.IsType(embed.Exception); - } - - [Fact] - public async Task FailWhenNoProvidersGiven() - { - var oembed = new OEmbedService(null, _httpClientFactory, null, null); - - var embed = await oembed.GetOEmbedAsync(new Uri("https://www.youtube.com/watch?v=0BPL5tT9_2Y"), 0, 0); - Assert.False(embed.Success); - Assert.IsType(embed.Exception); - } - } -} diff --git a/src/Novicell.Umbraco.OEmbed.Tests/OEmbedServiceUnitTests.cs b/src/Novicell.Umbraco.OEmbed.Tests/OEmbedServiceUnitTests.cs deleted file mode 100644 index 9abfccd..0000000 --- a/src/Novicell.Umbraco.OEmbed.Tests/OEmbedServiceUnitTests.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using System.Threading.Tasks; -using Novicell.Umbraco.OEmbed.Services; -using Xunit; - -namespace Novicell.Umbraco.OEmbed.Tests -{ - [Trait("Category", "Services")] - public class OEmbedServiceUnitTests - { - [Fact] - public async Task EmbedFromVimeoJson() - { - // example from https://vimeo.com/api/oembed.json?url=https%3A%2F%2Fvimeo.com%2F251769074 - - const string json = "{\"type\":\"video\",\"version\":\"1.0\",\"provider_name\":\"Vimeo\",\"provider_url\":\"https:\\/\\/vimeo.com\\/\",\"title\":\"Welcome to Umbraco HQ\",\"author_name\":\"Umbraco\",\"author_url\":\"https:\\/\\/vimeo.com\\/umbraco\",\"is_plus\":\"0\",\"account_type\":\"pro\",\"html\":\"", - "url": null, - "height": 113, - "width": 200, - "cache_age": null - } -}]]> - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/Content/site1.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/Content/site1.config deleted file mode 100644 index f7e2d17..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/Content/site1.config +++ /dev/null @@ -1,16 +0,0 @@ - - - - - /site1 - false - site - 2021-07-11T22:34:49 - - 0 - - - - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/ContentTypes/home.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/ContentTypes/home.config deleted file mode 100644 index 8e7d012..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/ContentTypes/home.config +++ /dev/null @@ -1,25 +0,0 @@ - - - - Home - icon-home color-black - folder.png - - False - False - Nothing - false - site - - pageContent - site - - Home - - - - - - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/ContentTypes/pagecontent.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/ContentTypes/pagecontent.config deleted file mode 100644 index cd1bf64..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/ContentTypes/pagecontent.config +++ /dev/null @@ -1,44 +0,0 @@ - - - - Page Content - icon-defrag color-purple - folder.png - - False - False - Nothing - false - Compositions - - - - - - - - 2fcebd66-a228-461b-897b-6c184feba9c3 - Video - pageVideo - 238d60ea-7686-4172-98d4-b617235e132b - Novicell.OEmbed - false - - - 0 - Content - Nothing - - - false - - - - - Content - content - Group - 0 - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/ContentTypes/site.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/ContentTypes/site.config deleted file mode 100644 index cb4ff12..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/ContentTypes/site.config +++ /dev/null @@ -1,23 +0,0 @@ - - - - Site - icon-umb-translation color-green - folder.png - - True - False - Nothing - false - - Site - - - - - - home - - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ApprovedColor.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ApprovedColor.config deleted file mode 100644 index ca11632..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ApprovedColor.config +++ /dev/null @@ -1,12 +0,0 @@ - - - - Approved Color - Umbraco.ColorPicker - Nvarchar - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/CheckboxList.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/CheckboxList.config deleted file mode 100644 index 354bf20..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/CheckboxList.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - Checkbox list - Umbraco.CheckBoxList - Nvarchar - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ContentPicker.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ContentPicker.config deleted file mode 100644 index 233af08..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ContentPicker.config +++ /dev/null @@ -1,13 +0,0 @@ - - - - Content Picker - Umbraco.ContentPicker - Nvarchar - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/DatePicker.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/DatePicker.config deleted file mode 100644 index 3f9c5c2..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/DatePicker.config +++ /dev/null @@ -1,12 +0,0 @@ - - - - Date Picker - Umbraco.DateTime - Date - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/DatePickerWithTime.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/DatePickerWithTime.config deleted file mode 100644 index 2c289d1..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/DatePickerWithTime.config +++ /dev/null @@ -1,12 +0,0 @@ - - - - Date Picker with time - Umbraco.DateTime - Date - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Dropdown.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Dropdown.config deleted file mode 100644 index 4be476b..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Dropdown.config +++ /dev/null @@ -1,12 +0,0 @@ - - - - Dropdown - Umbraco.DropDown.Flexible - Nvarchar - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/DropdownMultiple.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/DropdownMultiple.config deleted file mode 100644 index 1407630..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/DropdownMultiple.config +++ /dev/null @@ -1,12 +0,0 @@ - - - - Dropdown multiple - Umbraco.DropDown.Flexible - Nvarchar - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ImageCropper.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ImageCropper.config deleted file mode 100644 index ccd9162..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ImageCropper.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - Image Cropper - Umbraco.ImageCropper - Ntext - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ImageMediaPicker.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ImageMediaPicker.config deleted file mode 100644 index cc84a6a..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ImageMediaPicker.config +++ /dev/null @@ -1,20 +0,0 @@ - - - - Image Media Picker - Umbraco.MediaPicker3 - Ntext - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelBigint.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelBigint.config deleted file mode 100644 index 909f50d..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelBigint.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - Label (bigint) - Umbraco.Label - Nvarchar - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelDatetime.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelDatetime.config deleted file mode 100644 index 7163ac9..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelDatetime.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - Label (datetime) - Umbraco.Label - Date - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelDecimal.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelDecimal.config deleted file mode 100644 index 045b4f5..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelDecimal.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - Label (decimal) - Umbraco.Label - Decimal - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelInteger.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelInteger.config deleted file mode 100644 index 19ea1dc..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelInteger.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - Label (integer) - Umbraco.Label - Integer - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelString.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelString.config deleted file mode 100644 index af5067c..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelString.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - Label (string) - Umbraco.Label - Nvarchar - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelTime.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelTime.config deleted file mode 100644 index df2170a..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/LabelTime.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - Label (time) - Umbraco.Label - Date - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ListViewContent.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ListViewContent.config deleted file mode 100644 index c2ad8bd..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ListViewContent.config +++ /dev/null @@ -1,54 +0,0 @@ - - - - List View - Content - Umbraco.ListView - Nvarchar - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ListViewMedia.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ListViewMedia.config deleted file mode 100644 index 59fdbcc..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ListViewMedia.config +++ /dev/null @@ -1,54 +0,0 @@ - - - - List View - Media - Umbraco.ListView - Nvarchar - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ListViewMembers.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ListViewMembers.config deleted file mode 100644 index 5a08349..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/ListViewMembers.config +++ /dev/null @@ -1,60 +0,0 @@ - - - - List View - Members - Umbraco.ListView - Nvarchar - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MediaPicker.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MediaPicker.config deleted file mode 100644 index c4d9283..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MediaPicker.config +++ /dev/null @@ -1,20 +0,0 @@ - - - - Media Picker - Umbraco.MediaPicker3 - Ntext - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MediaPickerLegacy.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MediaPickerLegacy.config deleted file mode 100644 index 08c6991..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MediaPickerLegacy.config +++ /dev/null @@ -1,15 +0,0 @@ - - - - Media Picker (legacy) - Umbraco.MediaPicker - Ntext - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MemberPicker.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MemberPicker.config deleted file mode 100644 index 260c185..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MemberPicker.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - Member Picker - Umbraco.MemberPicker - Nvarchar - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MultiURLPicker.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MultiURLPicker.config deleted file mode 100644 index f8f7413..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MultiURLPicker.config +++ /dev/null @@ -1,15 +0,0 @@ - - - - Multi URL Picker - Umbraco.MultiUrlPicker - Ntext - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MultipleImageMediaPicker.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MultipleImageMediaPicker.config deleted file mode 100644 index f0a8d0b..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MultipleImageMediaPicker.config +++ /dev/null @@ -1,20 +0,0 @@ - - - - Multiple Image Media Picker - Umbraco.MediaPicker3 - Ntext - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MultipleMediaPicker.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MultipleMediaPicker.config deleted file mode 100644 index 6bae71f..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MultipleMediaPicker.config +++ /dev/null @@ -1,20 +0,0 @@ - - - - Multiple Media Picker - Umbraco.MediaPicker3 - Ntext - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MultipleMediaPickerLegacy.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MultipleMediaPickerLegacy.config deleted file mode 100644 index 9d3d9ee..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/MultipleMediaPickerLegacy.config +++ /dev/null @@ -1,15 +0,0 @@ - - - - Multiple Media Picker (legacy) - Umbraco.MediaPicker - Ntext - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Numeric.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Numeric.config deleted file mode 100644 index cd6d29b..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Numeric.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - Numeric - Umbraco.Integer - Integer - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/OEmbedVideo.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/OEmbedVideo.config deleted file mode 100644 index 7fc2fc4..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/OEmbedVideo.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - OEmbed Video - Novicell.OEmbed - Ntext - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Radiobox.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Radiobox.config deleted file mode 100644 index a166cb7..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Radiobox.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - Radiobox - Umbraco.RadioButtonList - Nvarchar - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/RichtextEditor.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/RichtextEditor.config deleted file mode 100644 index b8d9e11..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/RichtextEditor.config +++ /dev/null @@ -1,14 +0,0 @@ - - - - Richtext editor - Umbraco.TinyMCE - Ntext - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Tags.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Tags.config deleted file mode 100644 index fc1025e..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Tags.config +++ /dev/null @@ -1,13 +0,0 @@ - - - - Tags - Umbraco.Tags - Ntext - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Textarea.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Textarea.config deleted file mode 100644 index a495b9e..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Textarea.config +++ /dev/null @@ -1,12 +0,0 @@ - - - - Textarea - Umbraco.TextArea - Ntext - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Textstring.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Textstring.config deleted file mode 100644 index dc90bf0..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Textstring.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - Textstring - Umbraco.TextBox - Nvarchar - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Truefalse.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Truefalse.config deleted file mode 100644 index 7b65efb..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/Truefalse.config +++ /dev/null @@ -1,14 +0,0 @@ - - - - True/false - Umbraco.TrueFalse - Integer - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/UploadArticle.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/UploadArticle.config deleted file mode 100644 index 1d76dc8..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/UploadArticle.config +++ /dev/null @@ -1,24 +0,0 @@ - - - - Upload Article - Umbraco.UploadField - Nvarchar - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/UploadAudio.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/UploadAudio.config deleted file mode 100644 index 66b66ca..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/UploadAudio.config +++ /dev/null @@ -1,28 +0,0 @@ - - - - Upload Audio - Umbraco.UploadField - Nvarchar - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/UploadFile.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/UploadFile.config deleted file mode 100644 index bdd8d01..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/UploadFile.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - Upload File - Umbraco.UploadField - Nvarchar - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/UploadVectorGraphics.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/UploadVectorGraphics.config deleted file mode 100644 index 6088f33..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/UploadVectorGraphics.config +++ /dev/null @@ -1,16 +0,0 @@ - - - - Upload Vector Graphics - Umbraco.UploadField - Nvarchar - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/UploadVideo.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/UploadVideo.config deleted file mode 100644 index fb8f018..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/DataTypes/UploadVideo.config +++ /dev/null @@ -1,24 +0,0 @@ - - - - Upload Video - Umbraco.UploadField - Nvarchar - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/Languages/en-us.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/Languages/en-us.config deleted file mode 100644 index c2fe77b..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/Languages/en-us.config +++ /dev/null @@ -1,6 +0,0 @@ - - - en-US - false - true - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/Media/lion.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/Media/lion.config deleted file mode 100644 index 84dd29b..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/Media/lion.config +++ /dev/null @@ -1,17 +0,0 @@ - - - - - /Lion - false - Image - 2021-07-21T17:36:42 - - 0 - - - - - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/file.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/file.config deleted file mode 100644 index 5570b83..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/file.config +++ /dev/null @@ -1,70 +0,0 @@ - - - - File - icon-document - icon-document - - True - False - Nothing - false - - - - - 0000001a-0000-0000-0000-000000000000 - Size - umbracoBytes - 930861bf-e262-4ead-a704-f99453565708 - Umbraco.Label - false - - - 2 - File - - - false - - - 00000019-0000-0000-0000-000000000000 - Type - umbracoExtension - f0bc4bfb-b499-40d6-ba86-058885a5178c - Umbraco.Label - false - - - 1 - File - - - false - - - 00000018-0000-0000-0000-000000000000 - File - umbracoFile - 84c6b441-31df-4ffe-b67e-67d5bc3ae65a - Umbraco.UploadField - true - - - 0 - File - - - false - - - - - - File - file - Group - 1 - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/folder.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/folder.config deleted file mode 100644 index 8565321..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/folder.config +++ /dev/null @@ -1,25 +0,0 @@ - - - - Folder - icon-folder - icon-folder - - True - False - Nothing - false - - - - - Folder - Image - File - umbracoMediaVideo - umbracoMediaAudio - umbracoMediaArticle - umbracoMediaVectorGraphics - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/image.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/image.config deleted file mode 100644 index b3c99a8..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/image.config +++ /dev/null @@ -1,100 +0,0 @@ - - - - Image - icon-picture - icon-picture - - True - False - Nothing - false - - - - - 00000009-0000-0000-0000-000000000000 - Size - umbracoBytes - 930861bf-e262-4ead-a704-f99453565708 - Umbraco.Label - false - - - 3 - Image - - - false - - - 0000000a-0000-0000-0000-000000000000 - Type - umbracoExtension - f0bc4bfb-b499-40d6-ba86-058885a5178c - Umbraco.Label - false - - - 4 - Image - - - false - - - 00000006-0000-0000-0000-000000000000 - Image - umbracoFile - 1df9f033-e6d4-451f-b8d2-e0cbc50a836f - Umbraco.ImageCropper - true - - - 0 - Image - - - false - - - 00000008-0000-0000-0000-000000000000 - Height - umbracoHeight - 8e7f995c-bd81-4627-9932-c40e568ec788 - Umbraco.Label - false - - - 2 - Image - - - false - - - 00000007-0000-0000-0000-000000000000 - Width - umbracoWidth - 8e7f995c-bd81-4627-9932-c40e568ec788 - Umbraco.Label - false - - - 1 - Image - - - false - - - - - - Image - image - Group - 1 - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/umbracomediaarticle.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/umbracomediaarticle.config deleted file mode 100644 index 327d496..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/umbracomediaarticle.config +++ /dev/null @@ -1,70 +0,0 @@ - - - - Article - icon-article - icon-article - - True - False - Nothing - false - - - - - 00000030-0000-0000-0000-000000000000 - Size - umbracoBytes - 930861bf-e262-4ead-a704-f99453565708 - Umbraco.Label - false - - - 2 - Article - - - false - - - 0000002f-0000-0000-0000-000000000000 - Type - umbracoExtension - f0bc4bfb-b499-40d6-ba86-058885a5178c - Umbraco.Label - false - - - 1 - Article - - - false - - - 0000002e-0000-0000-0000-000000000000 - Article - umbracoFile - bc1e266c-dac4-4164-bf08-8a1ec6a7143d - Umbraco.UploadField - true - - - 0 - Article - - - false - - - - - - Article - article - Group - 1 - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/umbracomediaaudio.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/umbracomediaaudio.config deleted file mode 100644 index 186d2d5..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/umbracomediaaudio.config +++ /dev/null @@ -1,70 +0,0 @@ - - - - Audio - icon-sound-waves - icon-sound-waves - - True - False - Nothing - false - - - - - 0000002d-0000-0000-0000-000000000000 - Size - umbracoBytes - 930861bf-e262-4ead-a704-f99453565708 - Umbraco.Label - false - - - 2 - Audio - - - false - - - 0000002c-0000-0000-0000-000000000000 - Type - umbracoExtension - f0bc4bfb-b499-40d6-ba86-058885a5178c - Umbraco.Label - false - - - 1 - Audio - - - false - - - 0000002b-0000-0000-0000-000000000000 - Audio - umbracoFile - 8f430dd6-4e96-447e-9dc0-cb552c8cd1f3 - Umbraco.UploadField - true - - - 0 - Audio - - - false - - - - - - Audio - audio - Group - 1 - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/umbracomediavectorgraphics.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/umbracomediavectorgraphics.config deleted file mode 100644 index 89c8192..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/umbracomediavectorgraphics.config +++ /dev/null @@ -1,70 +0,0 @@ - - - - Vector Graphics (SVG) - icon-picture - icon-picture - - True - False - Nothing - false - - - - - 00000033-0000-0000-0000-000000000000 - Size - umbracoBytes - 930861bf-e262-4ead-a704-f99453565708 - Umbraco.Label - false - - - 2 - Vector Graphics - - - false - - - 00000032-0000-0000-0000-000000000000 - Type - umbracoExtension - f0bc4bfb-b499-40d6-ba86-058885a5178c - Umbraco.Label - false - - - 1 - Vector Graphics - - - false - - - 00000031-0000-0000-0000-000000000000 - Vector Graphics - umbracoFile - 215cb418-2153-4429-9aef-8c0f0041191b - Umbraco.UploadField - true - - - 0 - Vector Graphics - - - false - - - - - - Vector Graphics - vectorGraphics - Group - 1 - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/umbracomediavideo.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/umbracomediavideo.config deleted file mode 100644 index b3bfd9d..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MediaTypes/umbracomediavideo.config +++ /dev/null @@ -1,70 +0,0 @@ - - - - Video - icon-video - icon-video - - True - False - Nothing - false - - - - - 0000002a-0000-0000-0000-000000000000 - Size - umbracoBytes - 930861bf-e262-4ead-a704-f99453565708 - Umbraco.Label - false - - - 2 - Video - - - false - - - 00000029-0000-0000-0000-000000000000 - Type - umbracoExtension - f0bc4bfb-b499-40d6-ba86-058885a5178c - Umbraco.Label - false - - - 1 - Video - - - false - - - 00000028-0000-0000-0000-000000000000 - Video - umbracoFile - 70575fe7-9812-4396-bbe1-c81a76db71b5 - Umbraco.UploadField - true - - - 0 - Video - - - false - - - - - - Video - video - Group - 1 - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MemberTypes/member.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MemberTypes/member.config deleted file mode 100644 index 9b1f242..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/MemberTypes/member.config +++ /dev/null @@ -1,151 +0,0 @@ - - - - Member - icon-user - icon-user - - False - False - Nothing - false - - - - - e79dccfb-0000-0000-0000-000000000000 - Is Approved - umbracoMemberApproved - 92897bc6-a5f3-4ffe-ae27-f2e7e33dda49 - Umbraco.TrueFalse - false - - - 2 - Membership - false - false - true - - - false - - - 2a280588-0000-0000-0000-000000000000 - Comments - umbracoMemberComments - c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3 - Umbraco.TextArea - false - - - 0 - Membership - false - false - true - - - false - - - 0f2ea539-0000-0000-0000-000000000000 - Failed Password Attempts - umbracoMemberFailedPasswordAttempts - 8e7f995c-bd81-4627-9932-c40e568ec788 - Umbraco.Label - false - - - 1 - Membership - false - false - true - - - false - - - 3a7bc3c6-0000-0000-0000-000000000000 - Last Lockout Date - umbracoMemberLastLockoutDate - 0e9794eb-f9b5-4f20-a788-93acd233a7e4 - Umbraco.Label - false - - - 4 - Membership - false - false - true - - - false - - - b5e309ba-0000-0000-0000-000000000000 - Last Login Date - umbracoMemberLastLogin - 0e9794eb-f9b5-4f20-a788-93acd233a7e4 - Umbraco.Label - false - - - 5 - Membership - false - false - true - - - false - - - ded56d3f-0000-0000-0000-000000000000 - Last Password Change Date - umbracoMemberLastPasswordChangeDate - 0e9794eb-f9b5-4f20-a788-93acd233a7e4 - Umbraco.Label - false - - - 6 - Membership - false - false - true - - - false - - - c36093d2-0000-0000-0000-000000000000 - Is Locked Out - umbracoMemberLockedOut - 92897bc6-a5f3-4ffe-ae27-f2e7e33dda49 - Umbraco.TrueFalse - false - - - 3 - Membership - false - false - true - - - false - - - - - - Membership - membership - Group - 1 - - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/Templates/home.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/Templates/home.config deleted file mode 100644 index c83dc33..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/Templates/home.config +++ /dev/null @@ -1,5 +0,0 @@ - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/Templates/site.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/Templates/site.config deleted file mode 100644 index 59b23ed..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/Templates/site.config +++ /dev/null @@ -1,5 +0,0 @@ - - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/usync.config b/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/usync.config deleted file mode 100644 index 072721c..0000000 --- a/src/Novicell.Umbraco.OEmbed.Website/uSync/v9/usync.config +++ /dev/null @@ -1,4 +0,0 @@ - - - 2021-09-09T19:20:19 - \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed.sln b/src/Novicell.Umbraco.OEmbed.sln deleted file mode 100644 index ad0b4ea..0000000 --- a/src/Novicell.Umbraco.OEmbed.sln +++ /dev/null @@ -1,70 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.6.30114.105 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Novicell.Umbraco.OEmbed.Website", "Novicell.Umbraco.OEmbed.Website\Novicell.Umbraco.OEmbed.Website.csproj", "{EC79CF03-B2DB-4664-AEBE-C6527A9AE3F2}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Novicell.Umbraco.OEmbed", "Novicell.Umbraco.OEmbed\Novicell.Umbraco.OEmbed.csproj", "{68E10957-CF84-4D57-9C67-ADE2039D3503}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{BF432BD5-D2A8-4CAB-A805-589B64CF741C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Novicell.Umbraco.OEmbed.Tests", "Novicell.Umbraco.OEmbed.Tests\Novicell.Umbraco.OEmbed.Tests.csproj", "{079ED247-77E3-4E31-B39B-ED6511E3B91B}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {EC79CF03-B2DB-4664-AEBE-C6527A9AE3F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EC79CF03-B2DB-4664-AEBE-C6527A9AE3F2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EC79CF03-B2DB-4664-AEBE-C6527A9AE3F2}.Debug|x64.ActiveCfg = Debug|Any CPU - {EC79CF03-B2DB-4664-AEBE-C6527A9AE3F2}.Debug|x64.Build.0 = Debug|Any CPU - {EC79CF03-B2DB-4664-AEBE-C6527A9AE3F2}.Debug|x86.ActiveCfg = Debug|Any CPU - {EC79CF03-B2DB-4664-AEBE-C6527A9AE3F2}.Debug|x86.Build.0 = Debug|Any CPU - {EC79CF03-B2DB-4664-AEBE-C6527A9AE3F2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EC79CF03-B2DB-4664-AEBE-C6527A9AE3F2}.Release|Any CPU.Build.0 = Release|Any CPU - {EC79CF03-B2DB-4664-AEBE-C6527A9AE3F2}.Release|x64.ActiveCfg = Release|Any CPU - {EC79CF03-B2DB-4664-AEBE-C6527A9AE3F2}.Release|x64.Build.0 = Release|Any CPU - {EC79CF03-B2DB-4664-AEBE-C6527A9AE3F2}.Release|x86.ActiveCfg = Release|Any CPU - {EC79CF03-B2DB-4664-AEBE-C6527A9AE3F2}.Release|x86.Build.0 = Release|Any CPU - {68E10957-CF84-4D57-9C67-ADE2039D3503}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {68E10957-CF84-4D57-9C67-ADE2039D3503}.Debug|Any CPU.Build.0 = Debug|Any CPU - {68E10957-CF84-4D57-9C67-ADE2039D3503}.Debug|x64.ActiveCfg = Debug|Any CPU - {68E10957-CF84-4D57-9C67-ADE2039D3503}.Debug|x64.Build.0 = Debug|Any CPU - {68E10957-CF84-4D57-9C67-ADE2039D3503}.Debug|x86.ActiveCfg = Debug|Any CPU - {68E10957-CF84-4D57-9C67-ADE2039D3503}.Debug|x86.Build.0 = Debug|Any CPU - {68E10957-CF84-4D57-9C67-ADE2039D3503}.Release|Any CPU.ActiveCfg = Release|Any CPU - {68E10957-CF84-4D57-9C67-ADE2039D3503}.Release|Any CPU.Build.0 = Release|Any CPU - {68E10957-CF84-4D57-9C67-ADE2039D3503}.Release|x64.ActiveCfg = Release|Any CPU - {68E10957-CF84-4D57-9C67-ADE2039D3503}.Release|x64.Build.0 = Release|Any CPU - {68E10957-CF84-4D57-9C67-ADE2039D3503}.Release|x86.ActiveCfg = Release|Any CPU - {68E10957-CF84-4D57-9C67-ADE2039D3503}.Release|x86.Build.0 = Release|Any CPU - {079ED247-77E3-4E31-B39B-ED6511E3B91B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {079ED247-77E3-4E31-B39B-ED6511E3B91B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {079ED247-77E3-4E31-B39B-ED6511E3B91B}.Debug|x64.ActiveCfg = Debug|Any CPU - {079ED247-77E3-4E31-B39B-ED6511E3B91B}.Debug|x64.Build.0 = Debug|Any CPU - {079ED247-77E3-4E31-B39B-ED6511E3B91B}.Debug|x86.ActiveCfg = Debug|Any CPU - {079ED247-77E3-4E31-B39B-ED6511E3B91B}.Debug|x86.Build.0 = Debug|Any CPU - {079ED247-77E3-4E31-B39B-ED6511E3B91B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {079ED247-77E3-4E31-B39B-ED6511E3B91B}.Release|Any CPU.Build.0 = Release|Any CPU - {079ED247-77E3-4E31-B39B-ED6511E3B91B}.Release|x64.ActiveCfg = Release|Any CPU - {079ED247-77E3-4E31-B39B-ED6511E3B91B}.Release|x64.Build.0 = Release|Any CPU - {079ED247-77E3-4E31-B39B-ED6511E3B91B}.Release|x86.ActiveCfg = Release|Any CPU - {079ED247-77E3-4E31-B39B-ED6511E3B91B}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {EC79CF03-B2DB-4664-AEBE-C6527A9AE3F2} = {BF432BD5-D2A8-4CAB-A805-589B64CF741C} - {079ED247-77E3-4E31-B39B-ED6511E3B91B} = {BF432BD5-D2A8-4CAB-A805-589B64CF741C} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {2F18F0F5-C3E9-431B-8C34-99D240197BFD} - EndGlobalSection -EndGlobal diff --git a/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/Lang/da-dk.xml b/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/Lang/da-dk.xml deleted file mode 100644 index 4794030..0000000 --- a/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/Lang/da-dk.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - Novicell - https://novicell.com - - - Url er ikke udfyldt. - Ugyldig url angivet. - Ingen udgiver konfigureret for denne url. - Indlejring ikke fundet. - Typen af indlejring er ikke gyldig (skal være %type%). - - diff --git a/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/Lang/en-us.xml b/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/Lang/en-us.xml deleted file mode 100644 index 4199260..0000000 --- a/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/Lang/en-us.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - Novicell - https://novicell.com - - - No url provided. - Invalid url. - No provider configured for the given url, please review the url. - Embed not found, please review url. - Embed type is not valid (must be %type%). - - diff --git a/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.css b/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.css deleted file mode 100644 index ea88be7..0000000 --- a/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.css +++ /dev/null @@ -1,47 +0,0 @@ -.novicell-oembed-property-editor -.novicell-oembed-property-editor__preview -.umb-node-preview__actions { - align-items: start; -} - -.novicell-oembed-property-editor -.novicell-oembed-property-editor__preview -.umb-node-preview__content { - overflow: unset; -} - -.novicell-oembed-preview .novicell-oembed-preview__frame, -.novicell-oembed-preview .novicell-oembed-preview__photo { - max-width: 100%; -} - -.novicell-oembed-preview__container { - max-width: 100%; - width: 100%; -} - -.novicell-oembed-preview__container--fixed-ratio { - position: relative; - padding-top: 0; -} - -.novicell-oembed-preview .novicell-oembed-preview__frame { - width: 100%; - height: 0; -} - -.novicell-oembed-preview -.novicell-oembed-preview__container--fixed-ratio -.novicell-oembed-preview__frame { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - height: 100%; -} - -.novicell-oembed-preview .__info { - position: unset; - opacity: unset; -} diff --git a/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.editor.html b/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.editor.html deleted file mode 100644 index d713d68..0000000 --- a/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.editor.html +++ /dev/null @@ -1,42 +0,0 @@ -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
diff --git a/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.js b/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.js deleted file mode 100644 index 1d7fc8e..0000000 --- a/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.js +++ /dev/null @@ -1,287 +0,0 @@ -(function (window) { - "use strict"; - - var angular = window.angular; - var Utilities = window.Utilities; - var _ = window._; - - var mapFromUmbracoSettings = function (settingsKey) { - var getSetting = function (key, umbracoSettings) { - return (umbracoSettings || window.Umbraco.Sys.ServerVariables.umbracoSettings)[ - key - ]; - }; - return function (p, umbracoSettings) { - return getSetting(settingsKey, umbracoSettings) + p; - }; - }; - - var mapFromAppPluginsPath = mapFromUmbracoSettings("appPluginsPath"); - var mapFromUmbracoPath = mapFromUmbracoSettings("umbracoPath"); - - var previewController = function ($sce) { - var vm = this; - - vm.aspectRatio = null; - - var createSrcDoc = function (html, aspectRatio) { - if (Utilities.isUndefined(html) || !Utilities.isString(html)) - { - return null; - } - - var element = window.document.createElement("div"); - - element.insertAdjacentHTML("afterbegin", html); - - if (aspectRatio > 0) - { - element.style.width = "100%"; - element.style.height = "100%"; - } - - var srcdoc = [ - "", - aspectRatio > 0 ? - "" : - "", - "", - element.outerHTML, - "" - ]; - - return $sce.trustAsHtml(srcdoc.join("")); - }; - - vm.observeFrame = function (frame) { - function createMutationObserver(document, callback) { - var target = document.querySelector("body"), - config = { - attributes: true, - attributeOldValue: false, - characterData: true, - characterDataOldValue: false, - childList: true, - subtree: true - }, - observer = new MutationObserver(callback); - - observer.observe(target, config); - } - - var updateFrameSize = function (width, height) { - //frame.width = width; - frame.style.height = height + "px"; - }; - - var contentWindow = frame.contentWindow; - - createMutationObserver( - contentWindow.document, - _.debounce( - function (/*mutations*/) { - var e = contentWindow.document.documentElement; - updateFrameSize(e.offsetWidth, e.offsetHeight); - }, - 1 - ) - ); - }; - - var round = function (n, d) { - var m = Math.pow(10, d); - return Math.round(n * m) / m; - }; - - vm.$onChanges = function (/*changes*/) { - // we only get updates on the model (oembed obj) - - if (vm.model) { - vm.aspectRatio = - isNaN(vm.model.width) || isNaN(vm.model.height) - ? null - : round(vm.model.height / vm.model.width, 4); - - vm.srcdoc = createSrcDoc(vm.model.html, vm.aspectRatio); - } else { - vm.srcdoc = null; - vm.aspectRatio = null; - } - }; - }; - - var previewComponent = { - transclude: true, - bindings: { - model: "<" - }, - bindToController: true, - controller: previewController, - controllerAs: "vm", - templateUrl: function () { - return mapFromAppPluginsPath("/Novicell.OEmbed/oembed.preview.html"); - } - }; - - // - angular - .module("umbraco.directives") - .component("novicellOembedPreview", previewComponent); - - var propertyEditorController = function ( - $scope, - editorService, - angularHelper - ) { - var vm = this; - - vm.add = function () { - openOEmbedEditor(null); - }; - - vm.remove = function () { - $scope.model.value = null; - setDirty(); - }; - - vm.edit = function () { - openOEmbedEditor(_.clone($scope.model.value)); - }; - - function setDirty() { - angularHelper.getCurrentForm($scope).$setDirty(); - } - - function openOEmbedEditor(value) { - var editor = { - view: mapFromAppPluginsPath("/Novicell.OEmbed/oembed.editor.html"), - size: "small", - value: value, - config: $scope.model.config, - submit: function (model) { - $scope.model.value = model.value; - editorService.close(); - setDirty(); - }, - close: function () { - editorService.close(); - } - }; - - editorService.open(editor); - } - }; - - angular - .module("umbraco") - .controller( - "Novicell.OEmbed.PropertyEditorController", - propertyEditorController - ); - - var editorController = function ( - $scope, - formHelper, - localizationService, - novicellOEmbedResource - ) { - var vm = this; - - // public - vm.preview = null; - - vm.submit = function () { - if ($scope.model && $scope.model.submit) { - $scope.model.submit($scope.model); - } - }; - - vm.close = function () { - if ($scope.model && $scope.model.close) { - $scope.model.close(); - } - }; - - vm.update = function () { - var args = { scope: $scope, skipValidation: true }; - if (!formHelper.submitForm(args)) { - return; - } - - var url = $scope.model.value.url; - - if (Utilities.isString(url) && url !== "") { - novicellOEmbedResource.getOEmbed(url, $scope.model.config.type) - .then(function (data/*, status, headers, config*/) { - $scope.model.value.oembed = data; - }, function (data/*, status, headers, config*/) { - formHelper.handleError(data); - $scope.model.value.oembed = null; - }); - } else { - $scope.model.value.oembed = null; - } - }; - - vm.validateMandatory = function () { - - var validate = function (model) { - - if (!model.validation.mandatory) - { - return true; - } - - var value = model.value; - - return Utilities.isObject(value) && - Utilities.isString(value.url) && - Utilities.isObject(value.oembed); - }; - - return { - isValid: validate($scope.model), - errorMsg: "Value cannot be empty", - errorKey: "required" - }; - }; - - vm.$onInit = function () { - if (!$scope.model.title) { - localizationService.localize("general_embed").then(function (value) { - $scope.model.title = value; - }); - } - }; - }; - - angular - .module("umbraco") - .controller("Novicell.OEmbed.EditorController", editorController); - - angular - .module('umbraco.resources') - .factory('novicellOEmbedResource', - function ($http, umbRequestHelper) { - - var endpoint = mapFromUmbracoPath("/backoffice/novicell/oembed/"); - - // the factory object returned - return { - // this calls the ApiController we setup earlier - getOEmbed: function (url, type) { - - var requestConfig = { - cache: true, - umbIgnoreErrors: true, - params: { 'url': url, 'type': type } - }; - - return umbRequestHelper.resourcePromise( - $http.get(endpoint + "Get", requestConfig), - "Failed to retrieve OEmbed"); - } - }; - } - ); -})(window); diff --git a/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.preview.html b/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.preview.html deleted file mode 100644 index 59be3e2..0000000 --- a/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.preview.html +++ /dev/null @@ -1,35 +0,0 @@ -
-
-
-
-
- -
-
-
- -
-
- -
-
-
-
- - by - - - - () - -
-
-
-
-
diff --git a/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.propertyeditor.html b/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.propertyeditor.html deleted file mode 100644 index 76f1f63..0000000 --- a/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.propertyeditor.html +++ /dev/null @@ -1,25 +0,0 @@ -
-
-
-
- -
-
- - -
-
-
- - -
\ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed/Composing/OEmbedComposer.cs b/src/Novicell.Umbraco.OEmbed/Composing/OEmbedComposer.cs deleted file mode 100644 index 2e4a098..0000000 --- a/src/Novicell.Umbraco.OEmbed/Composing/OEmbedComposer.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Linq; -using Novicell.Umbraco.OEmbed.Services; -using Umbraco.Cms.Core.Composing; -using Umbraco.Cms.Core.DependencyInjection; -using Umbraco.Extensions; - -namespace Novicell.Umbraco.OEmbed.Composing -{ - public class OEmbedComposer : IComposer - { - public void Compose(IUmbracoBuilder builder) - { - // if the IOEmbedService Service is registered then we assume this has been added before so we don't do it again. - // - borrowed from Kevin Jump - thx ;) - var registration = builder.Services - .FirstOrDefault(x => x.ServiceType.Implements()); - if (registration != null) - { - return; - } - - builder.AddNovicellOEmbed(); - } - } -} \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed/Configuration/Models/OEmbedSettings.cs b/src/Novicell.Umbraco.OEmbed/Configuration/Models/OEmbedSettings.cs deleted file mode 100644 index d13845d..0000000 --- a/src/Novicell.Umbraco.OEmbed/Configuration/Models/OEmbedSettings.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Novicell.Umbraco.OEmbed.Configuration.Models -{ - public class OEmbedSettings - { - internal const string SectionKey = nameof(Novicell) + ":" + nameof(OEmbed); - - public bool Autodiscover { get; init; } - } -} \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed/Controllers/OEmbedController.cs b/src/Novicell.Umbraco.OEmbed/Controllers/OEmbedController.cs deleted file mode 100644 index 637ee26..0000000 --- a/src/Novicell.Umbraco.OEmbed/Controllers/OEmbedController.cs +++ /dev/null @@ -1,104 +0,0 @@ -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; -using System; -using System.ComponentModel; -using System.Threading; -using Novicell.Umbraco.OEmbed.PropertyEditors; -using Umbraco.Cms.Web.BackOffice.Controllers; -using Umbraco.Cms.Web.Common.Attributes; -using Umbraco.Cms.Web.Common.Authorization; -using Umbraco.Cms.Core.Services; -using Umbraco.Extensions; -using System.Collections.Generic; -using System.Threading.Tasks; -using Novicell.Umbraco.OEmbed.Services; - -namespace Novicell.Umbraco.OEmbed.Controllers -{ - /// - /// A controller used for the embed dialog - /// - [EditorBrowsable(EditorBrowsableState.Never)] - [PluginController(OEmbedPropertyEditor.PluginAreaName), IsBackOffice] - [Authorize(Policy = AuthorizationPolicies.BackOfficeAccess)] - public class OEmbedController : UmbracoAuthorizedJsonController - { - private readonly ILocalizedTextService _localizedTextService; - private readonly IOEmbedService _oembedService; - - public OEmbedController( - ILocalizedTextService localizedTextService, - IOEmbedService oembedService) - { - _localizedTextService = localizedTextService; - _oembedService = oembedService; - } - - public async Task Get(string url, int maxwidth = 0, int maxheight = 0, string type = null) - { - Uri _url = null; - - if (string.IsNullOrWhiteSpace(url)) - { - var errorMessage = _localizedTextService.Localize("novicellOEmbed", "url_missing"); - ModelState.AddModelError(nameof(url), errorMessage); - } - else if (!Uri.TryCreate(url, UriKind.Absolute, out _url)) - { - var errorMessage = _localizedTextService.Localize("novicellOEmbed", "url_invalid"); - ModelState.AddModelError(nameof(url), errorMessage); - } - - if (maxwidth < 0) - { - ModelState.AddModelError(nameof(maxwidth), "Must be higher than 0"); - } - - if (maxheight < 0) - { - ModelState.AddModelError(nameof(maxheight), "Must be higher than 0"); - } - - if (!ModelState.IsValid) - { - return ValidationProblem(modelStateDictionary: ModelState); - } - - var embed = await _oembedService.GetOEmbedAsync(_url, maxwidth, maxheight); - - if (embed.Success) - { - var result = embed.Result; - - if (!string.IsNullOrWhiteSpace(type) && !type.InvariantEquals(result?.Type)) - { - var tokens = new Dictionary { { nameof(type), type } }; - var errorMessage = _localizedTextService.Localize("novicellOEmbed", "embed_type_invalid", Thread.CurrentThread.CurrentUICulture, tokens); - ModelState.AddModelError(nameof(url), errorMessage); - } - } - else if (embed.Exception is OEmbedUrlNotSupportedException) - { - var errorMessage = _localizedTextService.Localize("novicellOEmbed", "url_not_supported"); - ModelState.AddModelError(nameof(url), errorMessage); - } - else if (embed.Exception is OEmbedException e) - { - ModelState.AddModelError(nameof(url), e.Message); - } - else if (embed.Result is null) - { - var errorMessage = _localizedTextService.Localize("novicellOEmbed", "embed_not_found"); - ModelState.AddModelError(nameof(url), errorMessage); - } - - if (!ModelState.IsValid) - { - return ValidationProblem(modelStateDictionary: ModelState); - } - - return Ok(embed.Result); - } - } - -} \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed/Models/OEmbedResponse.cs b/src/Novicell.Umbraco.OEmbed/Models/OEmbedResponse.cs deleted file mode 100644 index b70d153..0000000 --- a/src/Novicell.Umbraco.OEmbed/Models/OEmbedResponse.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -namespace Novicell.Umbraco.OEmbed.Models -{ - [DataContract] - public class OEmbedResponse - { - [DataMember(Name = "type")] - public string Type { get; set; } - - [DataMember(Name = "version")] - public string Version { get; set; } - - [DataMember(Name = "title")] - public string Title { get; set; } - - [DataMember(Name = "author_name")] - public string AuthorName { get; set; } - - [DataMember(Name = "author_url")] - public string AuthorUrl { get; set; } - - [DataMember(Name = "provider_name")] - public string ProviderName { get; set; } - - [DataMember(Name = "provider_url")] - public string ProviderUrl { get; set; } - - [DataMember(Name = "thumbnail_url")] - public string ThumbnailUrl { get; set; } - - [DataMember(Name = "thumbnail_height")] - public int? ThumbnailHeight { get; set; } - - [DataMember(Name = "thumbnail_width")] - public int? ThumbnailWidth { get; set; } - - [DataMember(Name = "html")] - public string Html { get; set; } - - [DataMember(Name = "url")] - public string Url { get; set; } - - [DataMember(Name = "height")] - public int? Height { get; set; } - - [DataMember(Name = "width")] - public int? Width { get; set; } - - [DataMember(Name = "cache_age")] - public int? CacheAge { get; set; } - - [JsonExtensionData] - // ReSharper disable once CollectionNeverUpdated.Local - private readonly IDictionary _additionalData = new Dictionary(); - - public bool TryGetValue(string key, [MaybeNullWhen(false)] out T value) - { - value = default; - - if (_additionalData.TryGetValue(key, out var token)) - { - value = token.ToObject(); - - return true; - } - - return false; - } - - } -} \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed/Models/OEmbedType.cs b/src/Novicell.Umbraco.OEmbed/Models/OEmbedType.cs deleted file mode 100644 index 8f5749a..0000000 --- a/src/Novicell.Umbraco.OEmbed/Models/OEmbedType.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Novicell.Umbraco.OEmbed.Models -{ - internal enum OEmbedType - { - Video, - Photo, - Link, - Rich, - } -} diff --git a/src/Novicell.Umbraco.OEmbed/Models/OEmbedValue.cs b/src/Novicell.Umbraco.OEmbed/Models/OEmbedValue.cs deleted file mode 100644 index 331ffc9..0000000 --- a/src/Novicell.Umbraco.OEmbed/Models/OEmbedValue.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Novicell.Umbraco.OEmbed.Models -{ - public class OEmbedValue - { - public string Url { get; set; } - - public OEmbedResponse OEmbed { get; set; } - } -} \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed/Novicell.Umbraco.OEmbed.csproj b/src/Novicell.Umbraco.OEmbed/Novicell.Umbraco.OEmbed.csproj deleted file mode 100644 index 4dcb673..0000000 --- a/src/Novicell.Umbraco.OEmbed/Novicell.Umbraco.OEmbed.csproj +++ /dev/null @@ -1,56 +0,0 @@ - - - net5.0 - . - Novicell.Umbraco.OEmbed - Novicell.Umbraco.OEmbed - Novicell.Umbraco.OEmbed - OEmbed propertyeditor for Umbraco. - Novicell.Umbraco.OEmbed - novicell umbraco oembed plugin propertyeditor editor video embed link photo image - - False - https://github.com/Novicell/Novicell.Umbraco.OEmbed - https://github.com/Novicell/Novicell.Umbraco.OEmbed - MIT - icon.png - - - True - - - True - - - - - - - - - - true - Always - - - True - build - - - - - - - - - - - <_Parameter1>$(AssemblyName).Tests - - - - - - - - diff --git a/src/Novicell.Umbraco.OEmbed/OEmbedException.cs b/src/Novicell.Umbraco.OEmbed/OEmbedException.cs deleted file mode 100644 index c4cba17..0000000 --- a/src/Novicell.Umbraco.OEmbed/OEmbedException.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Novicell.Umbraco.OEmbed -{ - public class OEmbedException : Exception - { - protected OEmbedException() - { - } - - protected OEmbedException(string message) - : base(message) - { - } - - protected OEmbedException(string message, Exception innerException) - : base(message, innerException) - { - } - - protected OEmbedException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } - } -} \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed/OEmbedUrlNotSupportedException.cs b/src/Novicell.Umbraco.OEmbed/OEmbedUrlNotSupportedException.cs deleted file mode 100644 index edbe41e..0000000 --- a/src/Novicell.Umbraco.OEmbed/OEmbedUrlNotSupportedException.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Novicell.Umbraco.OEmbed -{ - public class OEmbedUrlNotSupportedException : OEmbedException - { - public OEmbedUrlNotSupportedException() - { - - } - - public OEmbedUrlNotSupportedException(string message) - : base(message) - { - } - - public OEmbedUrlNotSupportedException(string message, Exception innerException) - : base(message, innerException) - { - } - - protected OEmbedUrlNotSupportedException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } - } -} \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed/PropertyEditors/OEmbedConfiguration.cs b/src/Novicell.Umbraco.OEmbed/PropertyEditors/OEmbedConfiguration.cs deleted file mode 100644 index fd4ff47..0000000 --- a/src/Novicell.Umbraco.OEmbed/PropertyEditors/OEmbedConfiguration.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Umbraco.Cms.Core.PropertyEditors; - -namespace Novicell.Umbraco.OEmbed.PropertyEditors -{ - public class OEmbedConfiguration - { - [ConfigurationField("type", "Type", "radiobuttonlist", Description = "Allowed Type")] - public string Type { get; set; } - } -} \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed/PropertyEditors/OEmbedConfigurationEditor.cs b/src/Novicell.Umbraco.OEmbed/PropertyEditors/OEmbedConfigurationEditor.cs deleted file mode 100644 index 8f09543..0000000 --- a/src/Novicell.Umbraco.OEmbed/PropertyEditors/OEmbedConfigurationEditor.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Novicell.Umbraco.OEmbed.Models; -using Umbraco.Cms.Core.IO; -using Umbraco.Cms.Core.PropertyEditors; - -namespace Novicell.Umbraco.OEmbed.PropertyEditors -{ - public class OEmbedConfigurationEditor : ConfigurationEditor - { - public OEmbedConfigurationEditor(IIOHelper ioHelper) : base(ioHelper) - { - var type = Field(nameof(OEmbedConfiguration.Type)); - ConfigureTypeField(type); - } - - private static void ConfigureTypeField(ConfigurationField field) - { - var types = new[] - { - Tuple.Create(nameof(OEmbedType.Video), "Video"), - Tuple.Create(nameof(OEmbedType.Photo), "Photo"), - Tuple.Create(nameof(OEmbedType.Rich), "Rich"), - Tuple.Create(nameof(OEmbedType.Link), "Link"), - Tuple.Create("", "(Any)"), - }; - - field.Validators.Add(new OEmbedConfigurationTypeFieldValidator(field.Key)); - field.Config = new Dictionary - { - { - "prevalues", types - .Select(x => new {key = x.Item1, value = x.Item1, label = x.Item2}) - } - }; - } - } -} \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed/PropertyEditors/OEmbedConfigurationTypeFieldValidator.cs b/src/Novicell.Umbraco.OEmbed/PropertyEditors/OEmbedConfigurationTypeFieldValidator.cs deleted file mode 100644 index 9dc4388..0000000 --- a/src/Novicell.Umbraco.OEmbed/PropertyEditors/OEmbedConfigurationTypeFieldValidator.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using Novicell.Umbraco.OEmbed.Models; -using Umbraco.Cms.Core.PropertyEditors; - -namespace Novicell.Umbraco.OEmbed.PropertyEditors -{ - internal class OEmbedConfigurationTypeFieldValidator : IManifestValueValidator - { - private readonly string _memberName; - - public OEmbedConfigurationTypeFieldValidator(string memberName) - { - _memberName = memberName; - } - - public IEnumerable Validate(object value, string valueType, object dataTypeConfiguration) - { - if (value?.ToString() is not { } s || string.IsNullOrWhiteSpace(s)) - { - yield break; - } - - if (!Enum.TryParse(s, true, out OEmbedType _)) - { - yield return new ValidationResult("The value " + value + " is not a valid OEmbed type", - new[] {_memberName}); - } - } - - public string ValidationName => "OEmbedType"; - } -} \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed/PropertyEditors/OEmbedPropertyEditor.cs b/src/Novicell.Umbraco.OEmbed/PropertyEditors/OEmbedPropertyEditor.cs deleted file mode 100644 index ab2cb51..0000000 --- a/src/Novicell.Umbraco.OEmbed/PropertyEditors/OEmbedPropertyEditor.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Umbraco.Cms.Core.IO; -using Umbraco.Cms.Core.PropertyEditors; -using Umbraco.Cms.Core.WebAssets; - -namespace Novicell.Umbraco.OEmbed.PropertyEditors -{ - /// - [DataEditor(PropertyEditorAlias, "Novicell OEmbed", - PluginFolder + "oembed.propertyeditor.html", Group = "media", ValueType = ValueTypes.Json)] - internal class OEmbedPropertyEditor : DataEditor - { - public class OEmbedJavaScriptFile : JavaScriptFile - { - public OEmbedJavaScriptFile() : base(PluginFolder + "oembed.js") { } - } - - public class OEmbedCssFile : CssFile - { - public OEmbedCssFile() : base(PluginFolder + "oembed.css") { } - } - - private const string PluginFolder = "/App_Plugins/" + PropertyEditorAlias + "/"; - public const string PropertyEditorAlias = "Novicell.OEmbed"; - public const string PluginAreaName = "Novicell"; - - private readonly IIOHelper _ioHelper; - - public OEmbedPropertyEditor( - IDataValueEditorFactory dataValueEditorFactory, - IIOHelper ioHelper) - : base(dataValueEditorFactory) - { - _ioHelper = ioHelper; - } - - protected override IConfigurationEditor CreateConfigurationEditor() - { - return new OEmbedConfigurationEditor(_ioHelper); - } - } -} \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed/PropertyEditors/OEmbedPropertyValueConverter.cs b/src/Novicell.Umbraco.OEmbed/PropertyEditors/OEmbedPropertyValueConverter.cs deleted file mode 100644 index 18f44dc..0000000 --- a/src/Novicell.Umbraco.OEmbed/PropertyEditors/OEmbedPropertyValueConverter.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using Newtonsoft.Json; -using Novicell.Umbraco.OEmbed.Models; -using Umbraco.Cms.Core.Models.PublishedContent; -using Umbraco.Cms.Core.PropertyEditors; -using Umbraco.Extensions; - -namespace Novicell.Umbraco.OEmbed.PropertyEditors -{ - public class OEmbedPropertyValueConverter : PropertyValueConverterBase - { - /// - public override bool IsConverter(IPublishedPropertyType propertyType) - => propertyType.EditorAlias == OEmbedPropertyEditor.PropertyEditorAlias; - - /// - public override Type GetPropertyValueType(IPublishedPropertyType propertyType) - => typeof(OEmbedValue); - - /// - public override PropertyCacheLevel GetPropertyCacheLevel(IPublishedPropertyType propertyType) - => PropertyCacheLevel.Element; - - /// - public override object ConvertIntermediateToObject(IPublishedElement owner, IPublishedPropertyType propertyType, - PropertyCacheLevel referenceCacheLevel, object inter, bool preview) - { - if (inter == null) - return null; - - var model = JsonConvert.DeserializeObject((string)inter); - - return model; - } - - /// - public override object ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPropertyType propertyType, object source, - bool preview) - { - if (source is not string json || - string.IsNullOrWhiteSpace(json) || - !json.DetectIsJson()) - { - return null; - } - - return json; - } - } -} \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed/Services/IOEmbedDiscoveryService.cs b/src/Novicell.Umbraco.OEmbed/Services/IOEmbedDiscoveryService.cs deleted file mode 100644 index 4e51df6..0000000 --- a/src/Novicell.Umbraco.OEmbed/Services/IOEmbedDiscoveryService.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Threading.Tasks; -using Umbraco.Cms.Core; -using Umbraco.Cms.Core.Media; - -namespace Novicell.Umbraco.OEmbed.Services -{ - public interface IOEmbedDiscoveryService - { - /// - /// Discover the OEmbed endpoint of the provided url. - /// - /// - /// https://oembed.com/#section4 - /// oEmbed providers can choose to make their oEmbed support discoverable by adding - /// elements to the head of their existing (X)HTML documents. - /// The URLs contained within the href attribute should be the full oEmbed endpoint - /// plus URL and any needed format parameter. No other request parameters should be - /// included in this URL. - /// The type attribute must contain either application/json+oembed for JSON responses, - /// or text/xml+oembed for XML. - /// - /// The url of the (X)HTML document that contains the resource that should be embedded. - /// If discovered, an that describes the endpoint. - Task> DiscoverFromUrlAsync(Uri url); - } -} \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed/Services/IOEmbedService.cs b/src/Novicell.Umbraco.OEmbed/Services/IOEmbedService.cs deleted file mode 100644 index c656f20..0000000 --- a/src/Novicell.Umbraco.OEmbed/Services/IOEmbedService.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Threading.Tasks; -using Novicell.Umbraco.OEmbed.Models; -using Umbraco.Cms.Core; - -namespace Novicell.Umbraco.OEmbed.Services -{ - public interface IOEmbedService - { - Task> GetOEmbedAsync(Uri url, int maxwidth, int maxheight); - } -} \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed/Services/OEmbedDiscoveryService.cs b/src/Novicell.Umbraco.OEmbed/Services/OEmbedDiscoveryService.cs deleted file mode 100644 index d564857..0000000 --- a/src/Novicell.Umbraco.OEmbed/Services/OEmbedDiscoveryService.cs +++ /dev/null @@ -1,234 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Net.Http; -using System.Threading.Tasks; -using System.Web; -using Umbraco.Cms.Core; -using Umbraco.Cms.Core.Media; - -namespace Novicell.Umbraco.OEmbed.Services -{ - internal class OEmbedDiscoveryService : OEmbedServiceBase, IOEmbedDiscoveryService - { - private const string TypeAttributeName = "type"; - private const string RelAttributeName = "rel"; - - private readonly IHttpClientFactory _httpClientFactory; - - public OEmbedDiscoveryService(IHttpClientFactory httpClientFactory) - { - _httpClientFactory = httpClientFactory; - } - - /// - /// Discover the OEmbed endpoint of the provided url. - /// - /// - /// https://oembed.com/#section4 - /// oEmbed providers can choose to make their oEmbed support discoverable by adding - /// elements to the head of their existing (X)HTML documents. - /// The URLs contained within the href attribute should be the full oEmbed endpoint - /// plus URL and any needed format parameter. No other request parameters should be - /// included in this URL. - /// The type attribute must contain either application/json+oembed for JSON responses, - /// or text/xml+oembed for XML. - /// - /// The url of the (X)HTML document that contains the resource that should be embedded. - /// If discovered, an that describes the endpoint. - public async Task> DiscoverFromUrlAsync(Uri url) - { - var client = _httpClientFactory.CreateClient(); - - Uri endpoint; - - try - { - var response = await client.GetAsync(url); - - response.EnsureSuccessStatusCode(); - - var content = await response.Content.ReadAsStringAsync(); - - endpoint = FindOEmbedEndpointInHtml(content); - - if(endpoint == null && response.Headers.TryGetValues("Link", out var link)) - { - endpoint = FindOEmbedEndpointInLinkHeader(link); - } - - } - catch (HttpRequestException e) - { - if (e.StatusCode == HttpStatusCode.NotFound) - { - return Attempt.Fail(null); - } - - return Attempt.Fail(null, new Exception($"Error downloading html from '{url}'", e)); - } - catch (Exception e) - { - return Attempt.Fail(null, e); - } - - if (endpoint != null) - { - if (!endpoint.IsAbsoluteUri) - { - endpoint = new Uri(url, endpoint); - } - - var provider = new AutodiscoverEmbedProvider(endpoint); - - return Attempt.Succeed((IEmbedProvider)provider); - } - - return Attempt.Fail(null); - } - - /// - /// Find the endpoint defined in a link-header. - /// - /// The link-header values from the page being disvored. - /// The endpoint found in one of the provided link-header values. - internal static Uri FindOEmbedEndpointInLinkHeader(IEnumerable linkHeaderValues) - { - var links = new List<(string Href, string MediaType)>(); - - foreach (var headerValue in linkHeaderValues) - { - var inputs = headerValue.Split(new[] { ';' }, StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries); - - if (!inputs.Any()) - { - continue; - } - - var url = inputs[0].StartsWith('<') && inputs[0].EndsWith('>') ? - inputs[0][1..^1] : null; - - if (url == null) - { - continue; - } - - if (!inputs.Skip(1) - .Where(x => x.StartsWith(RelAttributeName)) - .Any(x => IsAlternateOrAlternative(x[(RelAttributeName.Length + 1)..]))) - { - continue; - } - - var type = inputs.Skip(1) - .Where(x => x.StartsWith(TypeAttributeName)) - .Select(x => x[(TypeAttributeName.Length + 1)..]) - .FirstOrDefault(x => !string.IsNullOrWhiteSpace(x)); - - if (type == null) - { - continue; - } - - links.Add((url, type)); - } - - return GetOEmbedEndpointFromLinks(links.ToArray()); - } - - /// - /// Find the endpoint defined in a link-element found in the html. - /// - /// The html content of the page being discovered. - /// The endpoint found in a link-element in the html. - internal static Uri FindOEmbedEndpointInHtml(string html) - { - var doc = new HtmlAgilityPack.HtmlDocument(); - - doc.LoadHtml(html); - - var links = doc.DocumentNode.Descendants() - .Where(e => e.NodeType == HtmlAgilityPack.HtmlNodeType.Element && e.Name == "link") - .Select(x => new - { - Href = HttpUtility.HtmlDecode(x.GetAttributeValue("href", string.Empty)), - Rel = HttpUtility.HtmlDecode(x.GetAttributeValue(RelAttributeName, string.Empty)), - Type = HttpUtility.HtmlDecode(x.GetAttributeValue(TypeAttributeName, string.Empty)), - }) - .Where(x => IsAlternateOrAlternative(x.Rel?.ToLowerInvariant())) - .Where(x => !string.IsNullOrWhiteSpace(x.Href)) - .ToList(); - - return GetOEmbedEndpointFromLinks(links.Select(x => (x.Href, x.Type)).ToArray()); - } - - private static Uri GetOEmbedEndpointFromLinks(ICollection<(string Href, string MediaType)> links) - { - if (!links.Any()) - { - return null; - } - - foreach (var p in new Func[] { - t => IsJson(t, OEmbedMediaTypeSuffix), - t => IsXml(t, OEmbedMediaTypeSuffix), }) - { - foreach(var (href, _) in links.Where(x => p(x.MediaType))) - { - if (Uri.TryCreate(href, UriKind.RelativeOrAbsolute, out var _url)) - { - return _url; - } - } - } - - return null; - } - - internal sealed class AutodiscoverEmbedProvider : IEmbedProvider - { - public AutodiscoverEmbedProvider(Uri endpoint) - { - if (endpoint == null) throw new ArgumentNullException(nameof(endpoint)); - - ApiEndpoint = endpoint.GetLeftPart(UriPartial.Path); - - RequestParams = GetRequestParameters(endpoint.Query); - } - - private static Dictionary GetRequestParameters(string query) - { - if (string.IsNullOrWhiteSpace(query)) - { - return null; - } - - var queryString = HttpUtility.ParseQueryString(query); - - if (queryString.Count > 0) - { - var requestParameters = new Dictionary(); - foreach (var key in queryString.AllKeys) - { - requestParameters[key!] = queryString.Get(key); - } - return requestParameters; - } - - return null; - } - - public string GetMarkup(string url, int maxWidth = 0, int maxHeight = 0) - { - throw new NotImplementedException(); - } - - public string ApiEndpoint { get; } - - public Dictionary RequestParams { get; } - - public string[] UrlSchemeRegex => null; - } - } -} \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed/Services/OEmbedService.cs b/src/Novicell.Umbraco.OEmbed/Services/OEmbedService.cs deleted file mode 100644 index cdcca4f..0000000 --- a/src/Novicell.Umbraco.OEmbed/Services/OEmbedService.cs +++ /dev/null @@ -1,193 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net.Http; -using System.Text.RegularExpressions; -using System.Threading.Tasks; -using System.Web; -using System.Xml.Linq; -using Microsoft.Extensions.Options; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using Novicell.Umbraco.OEmbed.Configuration.Models; -using Umbraco.Cms.Core; -using Umbraco.Cms.Core.Media.EmbedProviders; - -namespace Novicell.Umbraco.OEmbed.Services -{ - internal class OEmbedService : OEmbedServiceBase, IOEmbedService - { - private readonly EmbedProvidersCollection _providers; - private readonly IHttpClientFactory _httpClientFactory; - private readonly IOEmbedDiscoveryService _discoveryService; - private readonly OEmbedSettings _settings; - - public OEmbedService( - EmbedProvidersCollection providers, - IHttpClientFactory httpClientFactory, - IOEmbedDiscoveryService discoveryService, - IOptions settings) - { - _providers = providers; - _httpClientFactory = httpClientFactory; - _discoveryService = discoveryService; - _settings = settings?.Value; - } - - public async Task> GetOEmbedAsync(Uri url, int maxwidth, int maxheight) - { - var _url = await GetOEmbedUrlAsync(url, maxwidth, maxheight); - - if (_url == null) - { - return Attempt.Fail(null, new OEmbedUrlNotSupportedException()); - } - - var client = _httpClientFactory.CreateClient(); - - var result = await FetchOEmbedFromUrlAsync(_url, client); - - return result; - } - - private async Task GetOEmbedUrlAsync(Uri url, int maxwidth, int maxheight) - { - var isUrlMatch = new Func((input, patterns) - => patterns.Any(p => Regex.IsMatch(input, p, RegexOptions.IgnoreCase))); - - var provider = _providers? - .Where(x => x.UrlSchemeRegex != null) - .FirstOrDefault(x => isUrlMatch(url.AbsoluteUri, x.UrlSchemeRegex)); - - if (provider == null && _settings?.Autodiscover == true) - { - var discovered = await _discoveryService.DiscoverFromUrlAsync(url); - - if (discovered.Success) - { - provider = discovered.Result; - } - } - - switch (provider) - { - case null: - return null; - - case EmbedProviderBase providerBase: - { - var providerUrl = providerBase.GetEmbedProviderUrl(url.ToString(), maxwidth, maxheight); - - return string.IsNullOrWhiteSpace(providerUrl) ? null : new Uri(providerUrl); - } - default: - return BuildProviderOEmbedUrl(provider.ApiEndpoint, provider.RequestParams, url, maxwidth, maxheight); - } - } - - private static async Task> FetchOEmbedFromUrlAsync(Uri url, HttpClient client) - { - var response = await client.GetAsync(url); - - try - { - response.EnsureSuccessStatusCode(); - } - catch (HttpRequestException e) - { - return Attempt.Fail(null, e); - } - - var mediaType = response.Content.Headers.ContentType?.MediaType; - - var json = IsJson(mediaType) ? await response.Content.ReadAsStringAsync() : null; - - if (json == null && IsXml(mediaType)) - { - var xml = await response.Content.ReadAsStringAsync(); - json = ConvertXmlToJson(xml); - } - - if (string.IsNullOrWhiteSpace(json)) - { - return Attempt.Fail(new Exception($"Invalid response - content type '{mediaType ?? "unkown"}' not supported")); - } - - var result = DeserializeResponse(json); - - return Attempt.Succeed(result); - } - - internal static T DeserializeResponse(string json) - { - var result = JsonConvert.DeserializeObject(json, new JsonSerializerSettings - { - //MissingMemberHandling = MissingMemberHandling.Ignore, - Error = (_, args) => - { - args.ErrorContext.Handled = true; - }, - }); - - return result; - } - - private static Uri BuildProviderOEmbedUrl(string endpoint, IDictionary parameters, Uri url, int maxwidth, int maxheight) - { - if (string.IsNullOrWhiteSpace(endpoint)) - { - return null; - } - - var builder = new UriBuilder(endpoint); - - var queryString = HttpUtility.ParseQueryString(builder.Query); - - if (parameters != null) - { - foreach (var (key, value) in parameters) - { - queryString[key] = HttpUtility.UrlEncode(value); - } - } - - queryString[nameof(url)] = url.ToString(); - - if (maxwidth > 0) - { - queryString[nameof(maxwidth)] = maxwidth.ToString(); - } - - if (maxheight > 0) - { - queryString[nameof(maxheight)] = maxheight.ToString(); - } - - builder.Query = queryString.ToString() ?? string.Empty; - - return builder.Uri; - } - - internal static string ConvertXmlToJson(string text) - { - var x = XDocument.Parse(text); - - if (x.Root == null) - { - return null; - } - - var o = new JObject(); - foreach (var e in x.Root.Elements()) - { - var propertyName = new string(e.Name.LocalName - .Select(c => char.IsLetterOrDigit(c) ? c : '_' /* hi there ^_^ */) - .ToArray()); - - o[propertyName] = e.Value; - } - - return o.ToString(Formatting.None); - } - } -} diff --git a/src/Novicell.Umbraco.OEmbed/Services/OEmbedServiceBase.cs b/src/Novicell.Umbraco.OEmbed/Services/OEmbedServiceBase.cs deleted file mode 100644 index 457f299..0000000 --- a/src/Novicell.Umbraco.OEmbed/Services/OEmbedServiceBase.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Linq; -using System.Net.Mime; - -namespace Novicell.Umbraco.OEmbed.Services -{ - internal abstract class OEmbedServiceBase - { - internal static string OEmbedMediaTypeSuffix = "+oembed"; - - private static readonly string[] XmlMediaTypes - = new[] { MediaTypeNames.Text.Xml, MediaTypeNames.Application.Xml }; - - private static readonly string[] JsonMediaTypes - = new[] { MediaTypeNames.Application.Json }; - - internal static bool IsJson(string mediaType, string suffix = null) - => IsAnyOfWithSuffix(mediaType, suffix ?? string.Empty, JsonMediaTypes); - - internal static bool IsXml(string mediaType, string suffix = null) - => IsAnyOfWithSuffix(mediaType, suffix??string.Empty, XmlMediaTypes); - - internal static bool IsAlternateOrAlternative(string rel) - => IsAnyOf(rel, "alternate", "alternative"); - - private static bool IsAnyOf(string input, params string[] options) - { - if (string.IsNullOrWhiteSpace(input)) - { - return false; - } - - return options.Any(x => x.Equals(input, StringComparison.InvariantCultureIgnoreCase)); - } - - private static bool IsAnyOfWithSuffix(string input, string suffix, params string[] options) - { - return IsAnyOf(input, options.Select(x => x + suffix).ToArray()); - } - } -} \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed/UmbracoBuilderExtensions.cs b/src/Novicell.Umbraco.OEmbed/UmbracoBuilderExtensions.cs deleted file mode 100644 index 00d893d..0000000 --- a/src/Novicell.Umbraco.OEmbed/UmbracoBuilderExtensions.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using Microsoft.Extensions.DependencyInjection; -using Novicell.Umbraco.OEmbed.Configuration.Models; -using Novicell.Umbraco.OEmbed.PropertyEditors; -using Novicell.Umbraco.OEmbed.Services; -using Umbraco.Cms.Core.DependencyInjection; - -namespace Novicell.Umbraco.OEmbed -{ - public static class UmbracoBuilderExtensions - { - public static IUmbracoBuilder AddNovicellOEmbed(this IUmbracoBuilder builder, - Action defaultOptions = default) - { - // load up the settings. - var options = builder.Services.AddOptions() - .Bind(builder.Config.GetSection(OEmbedSettings.SectionKey)); - - if (defaultOptions != default) - { - options.Configure(defaultOptions); - } - - options.ValidateDataAnnotations(); - - builder.BackOfficeAssets() - .Append() - .Append(); - - builder.Services.AddScoped(); - - builder.Services.AddScoped(); - - return builder; - } - } -} \ No newline at end of file diff --git a/src/Novicell.Umbraco.OEmbed/build/Novicell.Umbraco.OEmbed.targets b/src/Novicell.Umbraco.OEmbed/build/Novicell.Umbraco.OEmbed.targets deleted file mode 100644 index cd109c9..0000000 --- a/src/Novicell.Umbraco.OEmbed/build/Novicell.Umbraco.OEmbed.targets +++ /dev/null @@ -1,26 +0,0 @@ - - - - $(MSBuildThisFileDirectory)..\App_Plugins\Novicell.OEmbed\**\*.* - - - - - - - - - - - - - - - - - - - From e280e484d1a82663bfb4fa88134cd83e503eb20b Mon Sep 17 00:00:00 2001 From: Lucas Bach Bisgaard Date: Tue, 30 Aug 2022 12:43:48 +0200 Subject: [PATCH 2/2] Add v2 --- Novicell.Umbraco.OEmbed.Web/.gitignore | 478 ++++++++++++++++++ .../Composer/AdvanceOEmbedComposer.cs | 13 + .../Manifest/AdvanceOEmbedManifestFilter.cs | 27 + .../Novicell.OEmbed.Web.csproj | 34 ++ Novicell.Umbraco.OEmbed.Web/Program.cs | 19 + .../Properties/launchSettings.json | 29 ++ .../AdvanceOEmbedPrropertyEditor.cs | 27 + Novicell.Umbraco.OEmbed.Web/Startup.cs | 65 +++ .../Views/Frontpage.cshtml | 6 + .../Views/Partials/blocklist/default.cshtml | 13 + .../Partials/grid/bootstrap3-fluid.cshtml | 106 ++++ .../Views/Partials/grid/bootstrap3.cshtml | 112 ++++ .../Views/Partials/grid/editors/base.cshtml | 27 + .../Views/Partials/grid/editors/embed.cshtml | 11 + .../Views/Partials/grid/editors/macro.cshtml | 15 + .../Views/Partials/grid/editors/media.cshtml | 64 +++ .../Views/Partials/grid/editors/rte.cshtml | 13 + .../Partials/grid/editors/textstring.cshtml | 23 + .../Views/_ViewImports.cshtml | 9 + .../appsettings.Development.json | 34 ++ Novicell.Umbraco.OEmbed.Web/appsettings.json | 30 ++ .../App_Plugins/Scripts/OEmbed.Controller.js | 1 + .../wwwroot/App_Plugins/Styles/OEmbed.css | 2 + .../App_Plugins/ombed.propertyeditor.html | 1 + .../wwwroot/favicon.ico | Bin 0 -> 15406 bytes Novicell.Umbraco.OEmbed.sln | 31 ++ Novicell.Umbraco.OEmbed/Constants.cs | 26 + .../Novicell.OEmbed.Core.csproj | 16 + 28 files changed, 1232 insertions(+) create mode 100644 Novicell.Umbraco.OEmbed.Web/.gitignore create mode 100644 Novicell.Umbraco.OEmbed.Web/Composer/AdvanceOEmbedComposer.cs create mode 100644 Novicell.Umbraco.OEmbed.Web/Manifest/AdvanceOEmbedManifestFilter.cs create mode 100644 Novicell.Umbraco.OEmbed.Web/Novicell.OEmbed.Web.csproj create mode 100644 Novicell.Umbraco.OEmbed.Web/Program.cs create mode 100644 Novicell.Umbraco.OEmbed.Web/Properties/launchSettings.json create mode 100644 Novicell.Umbraco.OEmbed.Web/PropertyEditors/AdvanceOEmbedPrropertyEditor.cs create mode 100644 Novicell.Umbraco.OEmbed.Web/Startup.cs create mode 100644 Novicell.Umbraco.OEmbed.Web/Views/Frontpage.cshtml create mode 100644 Novicell.Umbraco.OEmbed.Web/Views/Partials/blocklist/default.cshtml create mode 100644 Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/bootstrap3-fluid.cshtml create mode 100644 Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/bootstrap3.cshtml create mode 100644 Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/base.cshtml create mode 100644 Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/embed.cshtml create mode 100644 Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/macro.cshtml create mode 100644 Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/media.cshtml create mode 100644 Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/rte.cshtml create mode 100644 Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/textstring.cshtml create mode 100644 Novicell.Umbraco.OEmbed.Web/Views/_ViewImports.cshtml create mode 100644 Novicell.Umbraco.OEmbed.Web/appsettings.Development.json create mode 100644 Novicell.Umbraco.OEmbed.Web/appsettings.json create mode 100644 Novicell.Umbraco.OEmbed.Web/wwwroot/App_Plugins/Scripts/OEmbed.Controller.js create mode 100644 Novicell.Umbraco.OEmbed.Web/wwwroot/App_Plugins/Styles/OEmbed.css create mode 100644 Novicell.Umbraco.OEmbed.Web/wwwroot/App_Plugins/ombed.propertyeditor.html create mode 100644 Novicell.Umbraco.OEmbed.Web/wwwroot/favicon.ico create mode 100644 Novicell.Umbraco.OEmbed.sln create mode 100644 Novicell.Umbraco.OEmbed/Constants.cs create mode 100644 Novicell.Umbraco.OEmbed/Novicell.OEmbed.Core.csproj diff --git a/Novicell.Umbraco.OEmbed.Web/.gitignore b/Novicell.Umbraco.OEmbed.Web/.gitignore new file mode 100644 index 0000000..d183720 --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/.gitignore @@ -0,0 +1,478 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# Tye +.tye/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +## +## Visual studio for Mac +## + + +# globs +Makefile.in +*.userprefs +*.usertasks +config.make +config.status +aclocal.m4 +install-sh +autom4te.cache/ +*.tar.gz +tarballs/ +test-results/ + +# Mac bundle stuff +*.dmg +*.app + +# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# JetBrains Rider +.idea/ +*.sln.iml + +## +## Visual Studio Code +## +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +## +## Umbraco CMS +## + +# JSON schema file for appsettings.json +appsettings-schema.json + +# Packages created from the backoffice (package.xml/package.zip) +/umbraco/Data/CreatedPackages/ + +# Temp folder containing Examine indexes, NuCache, MediaCache, etc. +/umbraco/Data/TEMP/ + +# SQLite database files +/umbraco/Data/*.sqlite.db +/umbraco/Data/*.sqlite.db-shm +/umbraco/Data/*.sqlite.db-wal + +# Log files +/umbraco/Logs/ + +# Media files +/wwwroot/media/ diff --git a/Novicell.Umbraco.OEmbed.Web/Composer/AdvanceOEmbedComposer.cs b/Novicell.Umbraco.OEmbed.Web/Composer/AdvanceOEmbedComposer.cs new file mode 100644 index 0000000..9dd64f8 --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/Composer/AdvanceOEmbedComposer.cs @@ -0,0 +1,13 @@ +using Novicell.OEmbed.Web.Manifest; +using Umbraco.Cms.Core.Composing; + +namespace Novicell.OEmbed.Web.Composer +{ + public class AdvanceOEmbedComposer : IComposer + { + public void Compose(IUmbracoBuilder builder) + { + builder.ManifestFilters().Append(); + } + } +} diff --git a/Novicell.Umbraco.OEmbed.Web/Manifest/AdvanceOEmbedManifestFilter.cs b/Novicell.Umbraco.OEmbed.Web/Manifest/AdvanceOEmbedManifestFilter.cs new file mode 100644 index 0000000..c831139 --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/Manifest/AdvanceOEmbedManifestFilter.cs @@ -0,0 +1,27 @@ +using Umbraco.Cms.Core.Manifest; + +namespace Novicell.OEmbed.Web.Manifest +{ + /// + public class AdvanceOEmbedManifestFilter : IManifestFilter + { + /// + public void Filter(List manifests) + { + manifests.Add(new PackageManifest + { + PackageName = Novicell.OEmbed.Core.Constants.Package.Alias, + BundleOptions = BundleOptions.Independent, + Scripts = new[] + { + Core.Constants.Package.PluginFolder + "Scripts/Controller/OEmbed.Controller.js" + }, + Stylesheets = new[] + { + Core.Constants.Package.PluginFolder + "Styles/OEmbed.css" + }, + Version = Novicell.OEmbed.Core.Constants.Package.Version + }); + } + } +} diff --git a/Novicell.Umbraco.OEmbed.Web/Novicell.OEmbed.Web.csproj b/Novicell.Umbraco.OEmbed.Web/Novicell.OEmbed.Web.csproj new file mode 100644 index 0000000..03547df --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/Novicell.OEmbed.Web.csproj @@ -0,0 +1,34 @@ + + + net6.0 + enable + enable + + + + + + + + + + + + + + + + + + + + true + + + + + false + false + + + diff --git a/Novicell.Umbraco.OEmbed.Web/Program.cs b/Novicell.Umbraco.OEmbed.Web/Program.cs new file mode 100644 index 0000000..d5313b5 --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/Program.cs @@ -0,0 +1,19 @@ +namespace Novicell.OEmbed.Web +{ + public class Program + { + public static void Main(string[] args) + => CreateHostBuilder(args) + .Build() + .Run(); + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureUmbracoDefaults() + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStaticWebAssets(); + webBuilder.UseStartup(); + }); + } +} diff --git a/Novicell.Umbraco.OEmbed.Web/Properties/launchSettings.json b/Novicell.Umbraco.OEmbed.Web/Properties/launchSettings.json new file mode 100644 index 0000000..2101218 --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/Properties/launchSettings.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:61969", + "sslPort": 44393 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "Umbraco.Web.UI": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "https://localhost:44393;http://localhost:61969", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/Novicell.Umbraco.OEmbed.Web/PropertyEditors/AdvanceOEmbedPrropertyEditor.cs b/Novicell.Umbraco.OEmbed.Web/PropertyEditors/AdvanceOEmbedPrropertyEditor.cs new file mode 100644 index 0000000..f94dd48 --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/PropertyEditors/AdvanceOEmbedPrropertyEditor.cs @@ -0,0 +1,27 @@ +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Services; + +namespace Novicell.OEmbed.Web.PropertyEditors +{ + /// + /// Represents a AdvanceOEmbed property editor. + /// + [DataEditor( + alias: Novicell.OEmbed.Core.Constants.Package.Alias, + name: Novicell.OEmbed.Core.Constants.Package.Name, + view: Novicell.OEmbed.Core.Constants.Package.PluginFolder + "ombed.propertyeditor.html", + Group = Umbraco.Cms.Core.Constants.PropertyEditors.Groups.Media, + Icon = "icon-picture", + ValueType = ValueTypes.Json)] + public class AdvanceOEmbedPrropertyEditor: DataEditor + { + /// + /// Initializes a new instance of the class. + /// + public AdvanceOEmbedPrropertyEditor(IDataValueEditorFactory dataValueEditorFactory) + : base(dataValueEditorFactory) + { + } + } +} diff --git a/Novicell.Umbraco.OEmbed.Web/Startup.cs b/Novicell.Umbraco.OEmbed.Web/Startup.cs new file mode 100644 index 0000000..5237990 --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/Startup.cs @@ -0,0 +1,65 @@ +namespace Novicell.OEmbed.Web +{ + public class Startup + { + private readonly IWebHostEnvironment _env; + private readonly IConfiguration _config; + + /// + /// Initializes a new instance of the class. + /// + /// The web hosting environment. + /// The configuration. + /// + /// Only a few services are possible to be injected here https://github.com/dotnet/aspnetcore/issues/9337. + /// + public Startup(IWebHostEnvironment webHostEnvironment, IConfiguration config) + { + _env = webHostEnvironment ?? throw new ArgumentNullException(nameof(webHostEnvironment)); + _config = config ?? throw new ArgumentNullException(nameof(config)); + } + + /// + /// Configures the services. + /// + /// The services. + /// + /// This method gets called by the runtime. Use this method to add services to the container. + /// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940. + /// + public void ConfigureServices(IServiceCollection services) + { + services.AddUmbraco(_env, _config) + .AddBackOffice() + .AddWebsite() + .AddComposers() + .Build(); + } + + /// + /// Configures the application. + /// + /// The application builder. + /// The web hosting environment. + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + + app.UseUmbraco() + .WithMiddleware(u => + { + u.UseBackOffice(); + u.UseWebsite(); + }) + .WithEndpoints(u => + { + u.UseInstallerEndpoints(); + u.UseBackOfficeEndpoints(); + u.UseWebsiteEndpoints(); + }); + } + } +} diff --git a/Novicell.Umbraco.OEmbed.Web/Views/Frontpage.cshtml b/Novicell.Umbraco.OEmbed.Web/Views/Frontpage.cshtml new file mode 100644 index 0000000..284e8c6 --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/Views/Frontpage.cshtml @@ -0,0 +1,6 @@ +@using Umbraco.Cms.Web.Common.PublishedModels; +@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage +@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels; +@{ + Layout = null; +} \ No newline at end of file diff --git a/Novicell.Umbraco.OEmbed.Web/Views/Partials/blocklist/default.cshtml b/Novicell.Umbraco.OEmbed.Web/Views/Partials/blocklist/default.cshtml new file mode 100644 index 0000000..accca2e --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/Views/Partials/blocklist/default.cshtml @@ -0,0 +1,13 @@ +@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage +@{ + if (Model?.Any() != true) { return; } +} +
+ @foreach (var block in Model) + { + if (block?.ContentUdi == null) { continue; } + var data = block.Content; + + @await Html.PartialAsync("blocklist/Components/" + data.ContentType.Alias, block) + } +
diff --git a/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/bootstrap3-fluid.cshtml b/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/bootstrap3-fluid.cshtml new file mode 100644 index 0000000..b92734e --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/bootstrap3-fluid.cshtml @@ -0,0 +1,106 @@ +@using System.Web +@using Microsoft.AspNetCore.Html +@using Newtonsoft.Json.Linq +@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage + +@* + Razor helpers located at the bottom of this file +*@ + +@if (Model is JObject && Model?.sections is not null) +{ + var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1; + +
+ @if (oneColumn) + { + foreach (var section in Model.sections) + { +
+ @foreach (var row in section.rows) + { + renderRow(row); + } +
+ } + } + else + { +
+ @foreach (var sec in Model.sections) + { +
+
+ @foreach (var row in sec.rows) + { + renderRow(row); + } +
+
+ } +
+ } +
+} + +@functions{ + + private async Task renderRow(dynamic row) + { +
+
+ @foreach (var area in row.areas) + { +
+
+ @foreach (var control in area.controls) + { + if (control?.editor?.view != null) + { + @await Html.PartialAsync("grid/editors/base", (object)control) + } + } +
+
+ } +
+
+ } +} + +@functions{ + + public static HtmlString RenderElementAttributes(dynamic contentItem) + { + var attrs = new List(); + JObject cfg = contentItem.config; + + if (cfg != null) + { + foreach (JProperty property in cfg.Properties()) + { + var propertyValue = HttpUtility.HtmlAttributeEncode(property.Value.ToString()); + attrs.Add(property.Name + "=\"" + propertyValue + "\""); + } + } + + JObject style = contentItem.styles; + + if (style != null) { + var cssVals = new List(); + foreach (JProperty property in style.Properties()) + { + var propertyValue = property.Value.ToString(); + if (string.IsNullOrWhiteSpace(propertyValue) == false) + { + cssVals.Add(property.Name + ":" + propertyValue + ";"); + } + } + + if (cssVals.Any()) + attrs.Add("style='" + HttpUtility.HtmlAttributeEncode(string.Join(" ", cssVals)) + "'"); + } + + return new HtmlString(string.Join(" ", attrs)); + } +} diff --git a/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/bootstrap3.cshtml b/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/bootstrap3.cshtml new file mode 100644 index 0000000..8863788 --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/bootstrap3.cshtml @@ -0,0 +1,112 @@ +@using System.Web +@using Microsoft.AspNetCore.Html +@using Newtonsoft.Json.Linq +@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage + +@if (Model is JObject && Model?.sections is not null) +{ + var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1; + +
+ @if (oneColumn) + { + foreach (var section in Model.sections) + { +
+ @foreach (var row in section.rows) + { + renderRow(row, true); + } +
+ } + } + else + { +
+
+ @foreach (var sec in Model.sections) + { +
+
+ @foreach (var row in sec.rows) + { + renderRow(row, false); + } +
+
+ } +
+
+ } +
+} + +@functions{ + + private async Task renderRow(dynamic row, bool singleColumn) + { +
+ @if (singleColumn) { + @:
+ } +
+ @foreach (var area in row.areas) + { +
+
+ @foreach (var control in area.controls) + { + if (control?.editor?.view != null) + { + @await Html.PartialAsync("grid/editors/base", (object)control) + } + } +
+
+ } +
+ @if (singleColumn) { + @:
+ } +
+ } + +} + +@functions{ + + public static HtmlString RenderElementAttributes(dynamic contentItem) + { + var attrs = new List(); + JObject cfg = contentItem.config; + + if (cfg != null) + { + foreach (JProperty property in cfg.Properties()) + { + var propertyValue = HttpUtility.HtmlAttributeEncode(property.Value.ToString()); + attrs.Add(property.Name + "=\"" + propertyValue + "\""); + } + } + + JObject style = contentItem.styles; + + if (style != null) + { + var cssVals = new List(); + foreach (JProperty property in style.Properties()) + { + var propertyValue = property.Value.ToString(); + if (string.IsNullOrWhiteSpace(propertyValue) == false) + { + cssVals.Add(property.Name + ":" + propertyValue + ";"); + } + } + + if (cssVals.Any()) + attrs.Add("style=\"" + HttpUtility.HtmlAttributeEncode(string.Join(" ", cssVals)) + "\""); + } + + return new HtmlString(string.Join(" ", attrs)); + } +} diff --git a/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/base.cshtml b/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/base.cshtml new file mode 100644 index 0000000..e40543b --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/base.cshtml @@ -0,0 +1,27 @@ +@model dynamic + +@try +{ + string editor = EditorView(Model); + @await Html.PartialAsync(editor, Model as object) +} +catch (Exception ex) +{ +
@ex.ToString()
+} + +@functions{ + + public static string EditorView(dynamic contentItem) + { + string view = contentItem.editor.render != null ? contentItem.editor.render.ToString() : contentItem.editor.view.ToString(); + view = view.Replace(".html", ".cshtml"); + + if (!view.Contains("/")) + { + view = "grid/editors/" + view; + } + + return view; + } +} diff --git a/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/embed.cshtml b/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/embed.cshtml new file mode 100644 index 0000000..74c8fe2 --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/embed.cshtml @@ -0,0 +1,11 @@ +@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage + +@if (Model is not null) +{ + string embedValue = Convert.ToString(Model.value); + embedValue = embedValue.DetectIsJson() ? Model.value.preview : Model.value; + +
+ @Html.Raw(embedValue) +
+} diff --git a/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/macro.cshtml b/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/macro.cshtml new file mode 100644 index 0000000..a4450d1 --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/macro.cshtml @@ -0,0 +1,15 @@ +@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage + +@if (Model?.value is not null) +{ + string macroAlias = Model.value.macroAlias.ToString(); + var parameters = new Dictionary(); + foreach (var mpd in Model.value.macroParamsDictionary) + { + parameters.Add(mpd.Name, mpd.Value); + } + + + @await Umbraco.RenderMacroAsync(macroAlias, parameters) + +} diff --git a/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/media.cshtml b/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/media.cshtml new file mode 100644 index 0000000..bc3b111 --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/media.cshtml @@ -0,0 +1,64 @@ +@model dynamic +@using Umbraco.Cms.Core.Media +@using Umbraco.Cms.Core.PropertyEditors.ValueConverters +@inject IImageUrlGenerator ImageUrlGenerator + +@if (Model?.value is not null) +{ + var url = Model.value.image; + + if (Model.editor.config != null && Model.editor.config.size != null) + { + if (Model.value.coordinates != null) + { + url = ImageCropperTemplateCoreExtensions.GetCropUrl( + (string)url, + ImageUrlGenerator, + width: (int)Model.editor.config.size.width, + height: (int)Model.editor.config.size.height, + cropAlias: "default", + cropDataSet: new ImageCropperValue + { + Crops = new[] + { + new ImageCropperValue.ImageCropperCrop + { + Alias = "default", + Coordinates = new ImageCropperValue.ImageCropperCropCoordinates + { + X1 = (decimal)Model.value.coordinates.x1, + Y1 = (decimal)Model.value.coordinates.y1, + X2 = (decimal)Model.value.coordinates.x2, + Y2 = (decimal)Model.value.coordinates.y2 + } + } + } + }); + } + else + { + url = ImageCropperTemplateCoreExtensions.GetCropUrl( + (string)url, + ImageUrlGenerator, + width: (int)Model.editor.config.size.width, + height: (int)Model.editor.config.size.height, + cropDataSet: new ImageCropperValue + { + FocalPoint = new ImageCropperValue.ImageCropperFocalPoint + { + Top = Model.value.focalPoint == null ? 0.5m : Model.value.focalPoint.top, + Left = Model.value.focalPoint == null ? 0.5m : Model.value.focalPoint.left + } + }); + } + } + + var altText = Model.value.altText ?? Model.value.caption ?? string.Empty; + + @altText + + if (Model.value.caption != null) + { +

@Model.value.caption

+ } +} diff --git a/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/rte.cshtml b/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/rte.cshtml new file mode 100644 index 0000000..9445666 --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/rte.cshtml @@ -0,0 +1,13 @@ +@using Umbraco.Cms.Core.Templates +@model dynamic +@inject HtmlLocalLinkParser HtmlLocalLinkParser; +@inject HtmlUrlParser HtmlUrlParser; +@inject HtmlImageSourceParser HtmlImageSourceParser; + +@{ + var value = HtmlLocalLinkParser.EnsureInternalLinks(Model?.value.ToString()); + value = HtmlUrlParser.EnsureUrls(value); + value = HtmlImageSourceParser.EnsureImageSources(value); +} + +@Html.Raw(value) diff --git a/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/textstring.cshtml b/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/textstring.cshtml new file mode 100644 index 0000000..d4152a5 --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/Views/Partials/grid/editors/textstring.cshtml @@ -0,0 +1,23 @@ +@using System.Web +@model dynamic + +@if (Model?.editor.config.markup is not null) +{ + string markup = Model.editor.config.markup.ToString(); + markup = markup.Replace("#value#", Html.ReplaceLineBreaks((string)Model.value.ToString()).ToString()); + + if (Model.editor.config.style != null) + { + markup = markup.Replace("#style#", Model.editor.config.style.ToString()); + } + + + @Html.Raw(markup) + +} +else +{ + +
@Model?.value
+
+} diff --git a/Novicell.Umbraco.OEmbed.Web/Views/_ViewImports.cshtml b/Novicell.Umbraco.OEmbed.Web/Views/_ViewImports.cshtml new file mode 100644 index 0000000..9e939f3 --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/Views/_ViewImports.cshtml @@ -0,0 +1,9 @@ +@using Umbraco.Extensions +@using Novicell.OEmbed.Web +@using Umbraco.Cms.Web.Common.PublishedModels +@using Umbraco.Cms.Web.Common.Views +@using Umbraco.Cms.Core.Models.PublishedContent +@using Microsoft.AspNetCore.Html +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, Smidge +@inject Smidge.SmidgeHelper SmidgeHelper diff --git a/Novicell.Umbraco.OEmbed.Web/appsettings.Development.json b/Novicell.Umbraco.OEmbed.Web/appsettings.Development.json new file mode 100644 index 0000000..91cd2da --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/appsettings.Development.json @@ -0,0 +1,34 @@ +{ + "$schema": "./appsettings-schema.json", + "Serilog": { + "MinimumLevel": { + "Default": "Information" + }, + "WriteTo": [ + { + "Name": "Async", + "Args": { + "configure": [ + { + "Name": "Console" + } + ] + } + } + ] + }, + "Umbraco": { + "CMS": { + "Content": { + "MacroErrors": "Throw" + }, + "Hosting": { + "Debug": true + }, + "RuntimeMinification": { + "UseInMemoryCache": true, + "CacheBuster": "Timestamp" + } + } + } +} diff --git a/Novicell.Umbraco.OEmbed.Web/appsettings.json b/Novicell.Umbraco.OEmbed.Web/appsettings.json new file mode 100644 index 0000000..6ef6be5 --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/appsettings.json @@ -0,0 +1,30 @@ +{ + "$schema": "./appsettings-schema.json", + "Serilog": { + "MinimumLevel": { + "Default": "Information", + "Override": { + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information", + "System": "Warning" + } + } + }, + "Umbraco": { + "CMS": { + "Global": { + "Id": "24016af2-0688-443a-8567-adeb594a7f17", + "SanitizeTinyMce": true + }, + "Content": { + "ContentVersionCleanupPolicy": { + "EnableCleanup": true + } + } + } + }, + "ConnectionStrings": { + "umbracoDbDSN": "Data Source=|DataDirectory|/Umbraco.sqlite.db;Cache=Shared;Foreign Keys=True;Pooling=True", + "umbracoDbDSN_ProviderName": "Microsoft.Data.Sqlite" + } +} \ No newline at end of file diff --git a/Novicell.Umbraco.OEmbed.Web/wwwroot/App_Plugins/Scripts/OEmbed.Controller.js b/Novicell.Umbraco.OEmbed.Web/wwwroot/App_Plugins/Scripts/OEmbed.Controller.js new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/wwwroot/App_Plugins/Scripts/OEmbed.Controller.js @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Novicell.Umbraco.OEmbed.Web/wwwroot/App_Plugins/Styles/OEmbed.css b/Novicell.Umbraco.OEmbed.Web/wwwroot/App_Plugins/Styles/OEmbed.css new file mode 100644 index 0000000..46800d1 --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/wwwroot/App_Plugins/Styles/OEmbed.css @@ -0,0 +1,2 @@ +body { +} diff --git a/Novicell.Umbraco.OEmbed.Web/wwwroot/App_Plugins/ombed.propertyeditor.html b/Novicell.Umbraco.OEmbed.Web/wwwroot/App_Plugins/ombed.propertyeditor.html new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/Novicell.Umbraco.OEmbed.Web/wwwroot/App_Plugins/ombed.propertyeditor.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Novicell.Umbraco.OEmbed.Web/wwwroot/favicon.ico b/Novicell.Umbraco.OEmbed.Web/wwwroot/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..c0749ddf7f1b68606b0672aa8d709779d6b0817a GIT binary patch literal 15406 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 literal 0 HcmV?d00001 diff --git a/Novicell.Umbraco.OEmbed.sln b/Novicell.Umbraco.OEmbed.sln new file mode 100644 index 0000000..aa22c24 --- /dev/null +++ b/Novicell.Umbraco.OEmbed.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32630.192 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Novicell.OEmbed.Core", "Novicell.Umbraco.OEmbed\Novicell.OEmbed.Core.csproj", "{1BBD0925-61E0-42C6-BA1D-2546968DDEF1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Novicell.OEmbed.Web", "Novicell.OEmbed.Web\Novicell.OEmbed.Web.csproj", "{48B09BBB-7612-4D59-8ECC-81F42CABA8B3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1BBD0925-61E0-42C6-BA1D-2546968DDEF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1BBD0925-61E0-42C6-BA1D-2546968DDEF1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1BBD0925-61E0-42C6-BA1D-2546968DDEF1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1BBD0925-61E0-42C6-BA1D-2546968DDEF1}.Release|Any CPU.Build.0 = Release|Any CPU + {48B09BBB-7612-4D59-8ECC-81F42CABA8B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {48B09BBB-7612-4D59-8ECC-81F42CABA8B3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {48B09BBB-7612-4D59-8ECC-81F42CABA8B3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {48B09BBB-7612-4D59-8ECC-81F42CABA8B3}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {CBF91C9F-0C24-409A-92F1-031957B79EB1} + EndGlobalSection +EndGlobal diff --git a/Novicell.Umbraco.OEmbed/Constants.cs b/Novicell.Umbraco.OEmbed/Constants.cs new file mode 100644 index 0000000..b346c14 --- /dev/null +++ b/Novicell.Umbraco.OEmbed/Constants.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Novicell.OEmbed.Core +{ + /// + /// Defines constants. + /// + public static partial class Constants + { + /// + /// Defines constants for gernal packeage data. + /// + public static class Package + { + public const string Name = "Novicell.Umbraco.OEmbed"; + public const string Alias = "novicellUmbracoOEmbed"; + public const string Version = "2.0.0"; + public const string PluginFolder = $"/App_Plugins/{Alias}/"; + public const string PluginAreaName = "Novicell"; + } + } +} diff --git a/Novicell.Umbraco.OEmbed/Novicell.OEmbed.Core.csproj b/Novicell.Umbraco.OEmbed/Novicell.OEmbed.Core.csproj new file mode 100644 index 0000000..c8beabd --- /dev/null +++ b/Novicell.Umbraco.OEmbed/Novicell.OEmbed.Core.csproj @@ -0,0 +1,16 @@ + + + net6.0 + . + Novicell.Umbraco.OEmbed + Novicell.Umbraco.OEmbed + Novicell.Umbraco.OEmbed + ... + umbraco plugin package + + + + + + +