From 7777ba40fd13d025bb578099eaff456f9ba1e384 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Mon, 10 Oct 2022 12:58:50 +0200 Subject: [PATCH 01/33] Fix broken selectable state for list view items (#13148) --- .../src/views/content/apps/listview/listview.controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/content/apps/listview/listview.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/apps/listview/listview.controller.js index 5dd205790c50..3114d0d1cef5 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/apps/listview/listview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/apps/listview/listview.controller.js @@ -9,9 +9,9 @@ function propertyEditorReadonly () { // check for permission to update - return !(typeof $scope.variantContent !== 'undefined' && $scope.variantContent.allowedActions.includes('A')); + return $scope.variantContent && !$scope.variantContent.allowedActions.includes('A'); } - + } angular.module("umbraco").controller("Umbraco.Editors.Content.Apps.ListViewController", ContentAppListViewController); From b8c73e755089617488b633c0f304aeccfd9cbfb3 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Wed, 12 Oct 2022 10:06:43 +0200 Subject: [PATCH 02/33] Add sync rendering extensions for block grid and async ones for block list (#13168) --- .../Extensions/BlockGridTemplateExtensions.cs | 65 +++++++++++++++---- .../Extensions/BlockListTemplateExtensions.cs | 51 ++++++++++++--- 2 files changed, 96 insertions(+), 20 deletions(-) diff --git a/src/Umbraco.Web.Common/Extensions/BlockGridTemplateExtensions.cs b/src/Umbraco.Web.Common/Extensions/BlockGridTemplateExtensions.cs index 4cae63426bfe..c8afbf0e68ea 100644 --- a/src/Umbraco.Web.Common/Extensions/BlockGridTemplateExtensions.cs +++ b/src/Umbraco.Web.Common/Extensions/BlockGridTemplateExtensions.cs @@ -15,6 +15,8 @@ public static class BlockGridTemplateExtensions public const string DefaultItemsTemplate = "items"; public const string DefaultItemAreasTemplate = "areas"; + #region Async + public static async Task GetBlockGridHtmlAsync(this IHtmlHelper html, BlockGridModel? model, string template = DefaultTemplate) { if (model?.Count == 0) @@ -22,8 +24,7 @@ public static async Task GetBlockGridHtmlAsync(this IHtmlHelper ht return new HtmlString(string.Empty); } - var view = $"{DefaultFolder}{template}"; - return await html.PartialAsync(view, model); + return await html.PartialAsync(DefaultFolderTemplate(template), model); } public static async Task GetBlockGridHtmlAsync(this IHtmlHelper html, IPublishedProperty property, string template = DefaultTemplate) @@ -33,6 +34,54 @@ public static async Task GetBlockGridHtmlAsync(this IHtmlHelper ht => await GetBlockGridHtmlAsync(html, contentItem, propertyAlias, DefaultTemplate); public static async Task GetBlockGridHtmlAsync(this IHtmlHelper html, IPublishedContent contentItem, string propertyAlias, string template) + { + IPublishedProperty prop = GetRequiredProperty(contentItem, propertyAlias); + return await GetBlockGridHtmlAsync(html, prop.GetValue() as BlockGridModel, template); + } + + public static async Task GetBlockGridItemsHtmlAsync(this IHtmlHelper html, IEnumerable items, string template = DefaultItemsTemplate) + => await html.PartialAsync(DefaultFolderTemplate(template), items); + + public static async Task GetBlockGridItemAreasHtmlAsync(this IHtmlHelper html, BlockGridItem item, string template = DefaultItemAreasTemplate) + => await html.PartialAsync(DefaultFolderTemplate(template), item); + + #endregion + + #region Sync + + public static IHtmlContent GetBlockGridHtml(this IHtmlHelper html, BlockGridModel? model, string template = DefaultTemplate) + { + if (model?.Count == 0) + { + return new HtmlString(string.Empty); + } + + return html.Partial(DefaultFolderTemplate(template), model); + } + + public static IHtmlContent GetBlockGridHtml(this IHtmlHelper html, IPublishedProperty property, string template = DefaultTemplate) + => GetBlockGridHtml(html, property.GetValue() as BlockGridModel, template); + + public static IHtmlContent GetBlockGridHtml(this IHtmlHelper html, IPublishedContent contentItem, string propertyAlias) + => GetBlockGridHtml(html, contentItem, propertyAlias, DefaultTemplate); + + public static IHtmlContent GetBlockGridHtml(this IHtmlHelper html, IPublishedContent contentItem, string propertyAlias, string template) + { + IPublishedProperty prop = GetRequiredProperty(contentItem, propertyAlias); + return GetBlockGridHtml(html, prop.GetValue() as BlockGridModel, template); + } + + public static IHtmlContent GetBlockGridItemsHtml(this IHtmlHelper html, IEnumerable items, string template = DefaultItemsTemplate) + => html.Partial(DefaultFolderTemplate(template), items); + + public static IHtmlContent GetBlockGridItemAreasHtml(this IHtmlHelper html, BlockGridItem item, string template = DefaultItemAreasTemplate) + => html.Partial(DefaultFolderTemplate(template), item); + + #endregion + + private static string DefaultFolderTemplate(string template) => $"{DefaultFolder}{template}"; + + private static IPublishedProperty GetRequiredProperty(IPublishedContent contentItem, string propertyAlias) { ArgumentNullException.ThrowIfNull(propertyAlias); @@ -43,18 +92,12 @@ public static async Task GetBlockGridHtmlAsync(this IHtmlHelper ht nameof(propertyAlias)); } - IPublishedProperty? prop = contentItem.GetProperty(propertyAlias); - if (prop == null) + IPublishedProperty? property = contentItem.GetProperty(propertyAlias); + if (property == null) { throw new InvalidOperationException("No property type found with alias " + propertyAlias); } - return await GetBlockGridHtmlAsync(html, prop.GetValue() as BlockGridModel, template); + return property; } - - public static async Task GetBlockGridItemsHtmlAsync(this IHtmlHelper html, IEnumerable items, string template = DefaultItemsTemplate) - => await html.PartialAsync($"{DefaultFolder}{template}", items); - - public static async Task GetBlockGridItemAreasHtmlAsync(this IHtmlHelper html, BlockGridItem item, string template = DefaultItemAreasTemplate) - => await html.PartialAsync($"{DefaultFolder}{template}", item); } diff --git a/src/Umbraco.Web.Common/Extensions/BlockListTemplateExtensions.cs b/src/Umbraco.Web.Common/Extensions/BlockListTemplateExtensions.cs index 17b620ab51ed..edf3055159fd 100644 --- a/src/Umbraco.Web.Common/Extensions/BlockListTemplateExtensions.cs +++ b/src/Umbraco.Web.Common/Extensions/BlockListTemplateExtensions.cs @@ -10,6 +10,33 @@ public static class BlockListTemplateExtensions public const string DefaultFolder = "blocklist/"; public const string DefaultTemplate = "default"; + #region Async + + public static async Task GetBlockListHtmlAsync(this IHtmlHelper html, BlockListModel? model, string template = DefaultTemplate) + { + if (model?.Count == 0) + { + return new HtmlString(string.Empty); + } + + return await html.PartialAsync(DefaultFolderTemplate(template), model); + } + + public static async Task GetBlockListHtmlAsync(this IHtmlHelper html, IPublishedProperty property, string template = DefaultTemplate) + => await GetBlockListHtmlAsync(html, property.GetValue() as BlockListModel, template); + + public static async Task GetBlockListHtmlAsync(this IHtmlHelper html, IPublishedContent contentItem, string propertyAlias) + => await GetBlockListHtmlAsync(html, contentItem, propertyAlias, DefaultTemplate); + + public static async Task GetBlockListHtmlAsync(this IHtmlHelper html, IPublishedContent contentItem, string propertyAlias, string template) + { + IPublishedProperty property = GetRequiredProperty(contentItem, propertyAlias); + return await GetBlockListHtmlAsync(html, property.GetValue() as BlockListModel, template); + } + #endregion + + #region Sync + public static IHtmlContent GetBlockListHtml(this IHtmlHelper html, BlockListModel? model, string template = DefaultTemplate) { if (model?.Count == 0) @@ -17,8 +44,7 @@ public static IHtmlContent GetBlockListHtml(this IHtmlHelper html, BlockListMode return new HtmlString(string.Empty); } - var view = DefaultFolder + template; - return html.Partial(view, model); + return html.Partial(DefaultFolderTemplate(template), model); } public static IHtmlContent GetBlockListHtml(this IHtmlHelper html, IPublishedProperty property, string template = DefaultTemplate) @@ -29,10 +55,17 @@ public static IHtmlContent GetBlockListHtml(this IHtmlHelper html, IPublishedCon public static IHtmlContent GetBlockListHtml(this IHtmlHelper html, IPublishedContent contentItem, string propertyAlias, string template) { - if (propertyAlias == null) - { - throw new ArgumentNullException(nameof(propertyAlias)); - } + IPublishedProperty property = GetRequiredProperty(contentItem, propertyAlias); + return GetBlockListHtml(html, property.GetValue() as BlockListModel, template); + } + + #endregion + + private static string DefaultFolderTemplate(string template) => $"{DefaultFolder}{template}"; + + private static IPublishedProperty GetRequiredProperty(IPublishedContent contentItem, string propertyAlias) + { + ArgumentNullException.ThrowIfNull(propertyAlias); if (string.IsNullOrWhiteSpace(propertyAlias)) { @@ -41,12 +74,12 @@ public static IHtmlContent GetBlockListHtml(this IHtmlHelper html, IPublishedCon nameof(propertyAlias)); } - IPublishedProperty? prop = contentItem.GetProperty(propertyAlias); - if (prop == null) + IPublishedProperty? property = contentItem.GetProperty(propertyAlias); + if (property == null) { throw new InvalidOperationException("No property type found with alias " + propertyAlias); } - return GetBlockListHtml(html, prop.GetValue() as BlockListModel, template); + return property; } } From d13a55762a7cb1130cdfee15982dc40da0f4b74b Mon Sep 17 00:00:00 2001 From: Nikolaj Date: Wed, 12 Oct 2022 10:29:46 +0200 Subject: [PATCH 03/33] Re-add IsPackable to Umbraco.Tests.Integration --- tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj b/tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj index 10424d2c1420..76f030d6bc5a 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj +++ b/tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj @@ -3,6 +3,7 @@ Umbraco.Cms.Tests.Integration Umbraco CMS - Integration tests Contains helper classes for integration tests with Umbraco CMS, including all internal integration tests. + true true Umbraco.Cms.Tests.Integration From 4a412bb432a9dd05629bec3daa8fe7c86573ea63 Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Wed, 12 Oct 2022 12:39:11 +0200 Subject: [PATCH 04/33] Fix for potential race condition in packages search (#13153) * search on input allowing to wait for copy/paste etc * invoke resourcePromise() with correct parameters * return the xhrStatus allowing the caller to check if the request was aborted * fix: send in canceler.promise to allow the timeout to work * catch any errors and ignore aborts if they happen * move the logic to handle cancellations outside Angulars $scope.$apply * remove file accidentally committed --- .../ourpackagerrepository.resource.js | 8 ++-- .../services/umbrequesthelper.service.js | 3 +- .../views/packages/views/repo.controller.js | 38 +++++++++++++------ .../src/views/packages/views/repo.html | 2 +- 4 files changed, 34 insertions(+), 17 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/ourpackagerrepository.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/ourpackagerrepository.resource.js index be13e6d0ec60..430f05c2c42b 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/ourpackagerrepository.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/ourpackagerrepository.resource.js @@ -57,7 +57,7 @@ function ourPackageRepositoryResource($q, $http, umbDataFormatter, umbRequestHel if (canceler) { httpConfig["timeout"] = canceler; } - + if (category === undefined) { category = ""; } @@ -69,8 +69,10 @@ function ourPackageRepositoryResource($q, $http, umbDataFormatter, umbRequestHel var order = !orderBy ? "&order=Default" : ("&order=" + orderBy); return umbRequestHelper.resourcePromise( - $http.get(baseurl + "?pageIndex=" + pageIndex + "&pageSize=" + pageSize + "&category=" + category + "&query=" + query + order + "&version=" + Umbraco.Sys.ServerVariables.application.version), - httpConfig, + $http.get( + baseurl + "?pageIndex=" + pageIndex + "&pageSize=" + pageSize + "&category=" + category + "&query=" + query + order + "&version=" + Umbraco.Sys.ServerVariables.application.version, + httpConfig + ), 'Failed to query packages'); } diff --git a/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js index 2b5447cdf681..b419600653ed 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js @@ -197,7 +197,8 @@ function umbRequestHelper($http, $q, notificationsService, eventsService, formHe return $q.reject({ errorMsg: result.errorMsg, data: result.data, - status: result.status + status: result.status, + xhrStatus: response.xhrStatus }); }); diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/views/repo.controller.js b/src/Umbraco.Web.UI.Client/src/views/packages/views/repo.controller.js index 8360663be621..b690efacdfb6 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/views/repo.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/packages/views/repo.controller.js @@ -1,7 +1,7 @@ (function () { "use strict"; - function PackagesRepoController($scope, $timeout, ourPackageRepositoryResource, $q, localizationService) { + function PackagesRepoController($scope, $timeout, ourPackageRepositoryResource, $q, localizationService, notificationsService) { var vm = this; @@ -197,18 +197,14 @@ var searchDebounced = _.debounce(function (e) { + //a canceler exists, so perform the cancelation operation and reset + if (canceler) { + canceler.resolve(); + } - $scope.$apply(function () { - - //a canceler exists, so perform the cancelation operation and reset - if (canceler) { - canceler.resolve(); - canceler = $q.defer(); - } - else { - canceler = $q.defer(); - } + canceler = $q.defer(); + $scope.$apply(function () { currSort = vm.searchQuery ? "Default" : "Latest"; ourPackageRepositoryResource.search(vm.pagination.pageNumber - 1, @@ -216,7 +212,7 @@ currSort, "", vm.searchQuery, - canceler) + canceler.promise) .then(function (pack) { vm.packages = pack.packages; vm.pagination.totalPages = Math.ceil(pack.total / vm.pagination.pageSize); @@ -224,6 +220,24 @@ vm.loading = false; //set back to null so it can be re-created canceler = null; + }) + .catch(function (err) { + canceler = null; + + if (err) { + // If an abort happened, ignore it since it happened because of a new search + if (err.xhrStatus === 'abort') { + return; + } + + // Otherwise, show the error + if (err.errorMsg) { + notificationsService.error(err.errorMsg); + return; + } + } + + console.error(err); }); }); diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/views/repo.html b/src/Umbraco.Web.UI.Client/src/views/packages/views/repo.html index f7e976de1ec5..1c3e3ec5d82c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/views/repo.html +++ b/src/Umbraco.Web.UI.Client/src/views/packages/views/repo.html @@ -17,7 +17,7 @@ localize="placeholder" placeholder="@packager_packageSearch" ng-model="vm.searchQuery" - ng-change="vm.search()" + ng-on-input="vm.search()" no-dirty-check /> From 6e7ecd0a7725646dbd294cf05d0d2eae688a621a Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Wed, 12 Oct 2022 12:39:11 +0200 Subject: [PATCH 05/33] Fix for potential race condition in packages search (#13153) * search on input allowing to wait for copy/paste etc * invoke resourcePromise() with correct parameters * return the xhrStatus allowing the caller to check if the request was aborted * fix: send in canceler.promise to allow the timeout to work * catch any errors and ignore aborts if they happen * move the logic to handle cancellations outside Angulars $scope.$apply * remove file accidentally committed (cherry picked from commit 4a412bb432a9dd05629bec3daa8fe7c86573ea63) --- .../ourpackagerrepository.resource.js | 8 ++-- .../services/umbrequesthelper.service.js | 3 +- .../views/packages/views/repo.controller.js | 38 +++++++++++++------ .../src/views/packages/views/repo.html | 2 +- 4 files changed, 34 insertions(+), 17 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/ourpackagerrepository.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/ourpackagerrepository.resource.js index be13e6d0ec60..430f05c2c42b 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/ourpackagerrepository.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/ourpackagerrepository.resource.js @@ -57,7 +57,7 @@ function ourPackageRepositoryResource($q, $http, umbDataFormatter, umbRequestHel if (canceler) { httpConfig["timeout"] = canceler; } - + if (category === undefined) { category = ""; } @@ -69,8 +69,10 @@ function ourPackageRepositoryResource($q, $http, umbDataFormatter, umbRequestHel var order = !orderBy ? "&order=Default" : ("&order=" + orderBy); return umbRequestHelper.resourcePromise( - $http.get(baseurl + "?pageIndex=" + pageIndex + "&pageSize=" + pageSize + "&category=" + category + "&query=" + query + order + "&version=" + Umbraco.Sys.ServerVariables.application.version), - httpConfig, + $http.get( + baseurl + "?pageIndex=" + pageIndex + "&pageSize=" + pageSize + "&category=" + category + "&query=" + query + order + "&version=" + Umbraco.Sys.ServerVariables.application.version, + httpConfig + ), 'Failed to query packages'); } diff --git a/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js index 2b5447cdf681..b419600653ed 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js @@ -197,7 +197,8 @@ function umbRequestHelper($http, $q, notificationsService, eventsService, formHe return $q.reject({ errorMsg: result.errorMsg, data: result.data, - status: result.status + status: result.status, + xhrStatus: response.xhrStatus }); }); diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/views/repo.controller.js b/src/Umbraco.Web.UI.Client/src/views/packages/views/repo.controller.js index 8360663be621..b690efacdfb6 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/views/repo.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/packages/views/repo.controller.js @@ -1,7 +1,7 @@ (function () { "use strict"; - function PackagesRepoController($scope, $timeout, ourPackageRepositoryResource, $q, localizationService) { + function PackagesRepoController($scope, $timeout, ourPackageRepositoryResource, $q, localizationService, notificationsService) { var vm = this; @@ -197,18 +197,14 @@ var searchDebounced = _.debounce(function (e) { + //a canceler exists, so perform the cancelation operation and reset + if (canceler) { + canceler.resolve(); + } - $scope.$apply(function () { - - //a canceler exists, so perform the cancelation operation and reset - if (canceler) { - canceler.resolve(); - canceler = $q.defer(); - } - else { - canceler = $q.defer(); - } + canceler = $q.defer(); + $scope.$apply(function () { currSort = vm.searchQuery ? "Default" : "Latest"; ourPackageRepositoryResource.search(vm.pagination.pageNumber - 1, @@ -216,7 +212,7 @@ currSort, "", vm.searchQuery, - canceler) + canceler.promise) .then(function (pack) { vm.packages = pack.packages; vm.pagination.totalPages = Math.ceil(pack.total / vm.pagination.pageSize); @@ -224,6 +220,24 @@ vm.loading = false; //set back to null so it can be re-created canceler = null; + }) + .catch(function (err) { + canceler = null; + + if (err) { + // If an abort happened, ignore it since it happened because of a new search + if (err.xhrStatus === 'abort') { + return; + } + + // Otherwise, show the error + if (err.errorMsg) { + notificationsService.error(err.errorMsg); + return; + } + } + + console.error(err); }); }); diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/views/repo.html b/src/Umbraco.Web.UI.Client/src/views/packages/views/repo.html index f7e976de1ec5..1c3e3ec5d82c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/views/repo.html +++ b/src/Umbraco.Web.UI.Client/src/views/packages/views/repo.html @@ -17,7 +17,7 @@ localize="placeholder" placeholder="@packager_packageSearch" ng-model="vm.searchQuery" - ng-change="vm.search()" + ng-on-input="vm.search()" no-dirty-check /> From 29ae87ec6129387cba4a0c81c3402a85ccefc502 Mon Sep 17 00:00:00 2001 From: Mole Date: Thu, 13 Oct 2022 08:17:02 +0200 Subject: [PATCH 06/33] V10: Fix request accessor memory leak (#13152) * Dispose OnChange event registration when disposing the notification handler * Ensure that the ApplicationUrl is only initialized once Since notifications handlers are transient,_hasAppUrl and _isInit defaults to false on every request causing it to always be called. * Make notification handler and EnsureApplicationUrl internal --- ...ationUrlRequestBeginNotificationHandler.cs | 26 ++++++++++++++ .../AspNetCore/AspNetCoreRequestAccessor.cs | 35 +++++++++++++------ .../UmbracoBuilderExtensions.cs | 1 + 3 files changed, 51 insertions(+), 11 deletions(-) create mode 100644 src/Umbraco.Web.Common/AspNetCore/ApplicationUrlRequestBeginNotificationHandler.cs diff --git a/src/Umbraco.Web.Common/AspNetCore/ApplicationUrlRequestBeginNotificationHandler.cs b/src/Umbraco.Web.Common/AspNetCore/ApplicationUrlRequestBeginNotificationHandler.cs new file mode 100644 index 000000000000..0472d315923a --- /dev/null +++ b/src/Umbraco.Web.Common/AspNetCore/ApplicationUrlRequestBeginNotificationHandler.cs @@ -0,0 +1,26 @@ +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Notifications; +using Umbraco.Cms.Core.Web; + +namespace Umbraco.Cms.Web.Common.AspNetCore; + +/// +/// Notification handler which will listen to the , and ensure that +/// the applicationUrl is set on the first request. +/// +internal class ApplicationUrlRequestBeginNotificationHandler : INotificationHandler +{ + private readonly IRequestAccessor _requestAccessor; + + public ApplicationUrlRequestBeginNotificationHandler(IRequestAccessor requestAccessor) => + _requestAccessor = requestAccessor; + + public void Handle(UmbracoRequestBeginNotification notification) + { + // If someone has replaced the AspNetCoreRequestAccessor we'll do nothing and assume they handle it themselves. + if (_requestAccessor is AspNetCoreRequestAccessor accessor) + { + accessor.EnsureApplicationUrl(); + } + } +} diff --git a/src/Umbraco.Web.Common/AspNetCore/AspNetCoreRequestAccessor.cs b/src/Umbraco.Web.Common/AspNetCore/AspNetCoreRequestAccessor.cs index 38d67ff2f08e..de47999835c4 100644 --- a/src/Umbraco.Web.Common/AspNetCore/AspNetCoreRequestAccessor.cs +++ b/src/Umbraco.Web.Common/AspNetCore/AspNetCoreRequestAccessor.cs @@ -9,7 +9,7 @@ namespace Umbraco.Cms.Web.Common.AspNetCore; -public class AspNetCoreRequestAccessor : IRequestAccessor, INotificationHandler +public class AspNetCoreRequestAccessor : IRequestAccessor, INotificationHandler, IDisposable { private readonly ISet _applicationUrls = new HashSet(); private readonly IHttpContextAccessor _httpContextAccessor; @@ -18,6 +18,7 @@ public class AspNetCoreRequestAccessor : IRequestAccessor, INotificationHandler< private object _initLocker = new(); private bool _isInit; private WebRoutingSettings _webRoutingSettings; + private readonly IDisposable? _onChangeDisposable; /// /// Initializes a new instance of the class. @@ -28,20 +29,19 @@ public AspNetCoreRequestAccessor( { _httpContextAccessor = httpContextAccessor; _webRoutingSettings = webRoutingSettings.CurrentValue; - webRoutingSettings.OnChange(x => _webRoutingSettings = x); + _onChangeDisposable = webRoutingSettings.OnChange(x => _webRoutingSettings = x); } /// - /// This just initializes the application URL on first request attempt - /// TODO: This doesn't belong here, the GetApplicationUrl doesn't belong to IRequestAccessor - /// this should be part of middleware not a lazy init based on an INotification + /// + /// This is now a NoOp, and is no longer used, instead ApplicationUrlRequestBeginNotificationHandler is used + /// /// + [Obsolete("This is no longer used, AspNetCoreRequestAccessor will no longer implement INotificationHandler in V12, see ApplicationUrlRequestBeginNotificationHandler instead.")] public void Handle(UmbracoRequestBeginNotification notification) - => LazyInitializer.EnsureInitialized(ref _hasAppUrl, ref _isInit, ref _initLocker, () => - { - GetApplicationUrl(); - return true; - }); + { + // NoOP + } /// public string GetRequestValue(string name) => GetFormValue(name) ?? GetQueryStringValue(name); @@ -54,6 +54,17 @@ public void Handle(UmbracoRequestBeginNotification notification) ? new Uri(_httpContextAccessor.HttpContext.Request.GetEncodedUrl()) : null; + /// + /// Ensure that the ApplicationUrl is set on the first request, this is using a LazyInitializer, so the code will only be run the first time + /// + /// TODO: This doesn't belong here, the GetApplicationUrl doesn't belong to IRequestAccessor + internal void EnsureApplicationUrl() => + LazyInitializer.EnsureInitialized(ref _hasAppUrl, ref _isInit, ref _initLocker, () => + { + GetApplicationUrl(); + return true; + }); + public Uri? GetApplicationUrl() { // Fixme: This causes problems with site swap on azure because azure pre-warms a site by calling into `localhost` and when it does that @@ -63,7 +74,7 @@ public void Handle(UmbracoRequestBeginNotification notification) // see U4-10626 - in some cases we want to reset the application url // (this is a simplified version of what was in 7.x) // note: should this be optional? is it expensive? - if (!(_webRoutingSettings.UmbracoApplicationUrl is null)) + if (_webRoutingSettings.UmbracoApplicationUrl is not null) { return new Uri(_webRoutingSettings.UmbracoApplicationUrl); } @@ -96,4 +107,6 @@ public void Handle(UmbracoRequestBeginNotification notification) return request.Form[name]; } + + public void Dispose() => _onChangeDisposable?.Dispose(); } diff --git a/src/Umbraco.Web.Common/DependencyInjection/UmbracoBuilderExtensions.cs b/src/Umbraco.Web.Common/DependencyInjection/UmbracoBuilderExtensions.cs index 40b84a0987e3..d454e5d6c56e 100644 --- a/src/Umbraco.Web.Common/DependencyInjection/UmbracoBuilderExtensions.cs +++ b/src/Umbraco.Web.Common/DependencyInjection/UmbracoBuilderExtensions.cs @@ -298,6 +298,7 @@ public static IUmbracoBuilder AddWebComponents(this IUmbracoBuilder builder) // AspNetCore specific services builder.Services.AddUnique(); builder.AddNotificationHandler(); + builder.AddNotificationHandler(); // Password hasher builder.Services.AddUnique(); From 9f6d5e954340ca737294450b6355390647d07693 Mon Sep 17 00:00:00 2001 From: Mole Date: Thu, 13 Oct 2022 08:24:50 +0200 Subject: [PATCH 07/33] Add missing ForceLeft and ForceRight (#13190) --- .../Models/Blocks/BlockGridLayoutItem.cs | 6 ++++++ .../ValueConverters/BlockGridPropertyValueConverter.cs | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutItem.cs b/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutItem.cs index 30494b03f7d3..9014e2789a97 100644 --- a/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutItem.cs +++ b/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutItem.cs @@ -25,6 +25,12 @@ public class BlockGridLayoutItem : IBlockLayoutItem [JsonProperty("rowSpan", NullValueHandling = NullValueHandling.Ignore)] public int? RowSpan { get; set; } + [JsonProperty("forceLeft")] + public bool ForceLeft { get; set; } + + [JsonProperty("forceRight")] + public bool ForceRight { get; set; } + [JsonProperty("areas", NullValueHandling = NullValueHandling.Ignore)] public BlockGridLayoutAreaItem[] Areas { get; set; } = Array.Empty(); } diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockGridPropertyValueConverter.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockGridPropertyValueConverter.cs index ae330870fac9..6cd2d4bd3820 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockGridPropertyValueConverter.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockGridPropertyValueConverter.cs @@ -49,6 +49,8 @@ public override bool IsConverter(IPublishedPropertyType propertyType) blockItem.RowSpan = layoutItem.RowSpan!.Value; blockItem.ColumnSpan = layoutItem.ColumnSpan!.Value; + blockItem.ForceLeft = layoutItem.ForceLeft; + blockItem.ForceRight = layoutItem.ForceRight; blockItem.AreaGridColumns = blockConfig.AreaGridColumns; blockItem.GridColumns = configuration.GridColumns; blockItem.Areas = layoutItem.Areas.Select(area => From 0b3a06ff0da01e0730ae81c7206f9b428a6a744f Mon Sep 17 00:00:00 2001 From: Mole Date: Thu, 13 Oct 2022 08:17:02 +0200 Subject: [PATCH 08/33] V10: Fix request accessor memory leak (#13152) * Dispose OnChange event registration when disposing the notification handler * Ensure that the ApplicationUrl is only initialized once Since notifications handlers are transient,_hasAppUrl and _isInit defaults to false on every request causing it to always be called. * Make notification handler and EnsureApplicationUrl internal --- ...ationUrlRequestBeginNotificationHandler.cs | 26 ++++++++++++++ .../AspNetCore/AspNetCoreRequestAccessor.cs | 35 +++++++++++++------ .../UmbracoBuilderExtensions.cs | 1 + 3 files changed, 51 insertions(+), 11 deletions(-) create mode 100644 src/Umbraco.Web.Common/AspNetCore/ApplicationUrlRequestBeginNotificationHandler.cs diff --git a/src/Umbraco.Web.Common/AspNetCore/ApplicationUrlRequestBeginNotificationHandler.cs b/src/Umbraco.Web.Common/AspNetCore/ApplicationUrlRequestBeginNotificationHandler.cs new file mode 100644 index 000000000000..0472d315923a --- /dev/null +++ b/src/Umbraco.Web.Common/AspNetCore/ApplicationUrlRequestBeginNotificationHandler.cs @@ -0,0 +1,26 @@ +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Notifications; +using Umbraco.Cms.Core.Web; + +namespace Umbraco.Cms.Web.Common.AspNetCore; + +/// +/// Notification handler which will listen to the , and ensure that +/// the applicationUrl is set on the first request. +/// +internal class ApplicationUrlRequestBeginNotificationHandler : INotificationHandler +{ + private readonly IRequestAccessor _requestAccessor; + + public ApplicationUrlRequestBeginNotificationHandler(IRequestAccessor requestAccessor) => + _requestAccessor = requestAccessor; + + public void Handle(UmbracoRequestBeginNotification notification) + { + // If someone has replaced the AspNetCoreRequestAccessor we'll do nothing and assume they handle it themselves. + if (_requestAccessor is AspNetCoreRequestAccessor accessor) + { + accessor.EnsureApplicationUrl(); + } + } +} diff --git a/src/Umbraco.Web.Common/AspNetCore/AspNetCoreRequestAccessor.cs b/src/Umbraco.Web.Common/AspNetCore/AspNetCoreRequestAccessor.cs index 38d67ff2f08e..de47999835c4 100644 --- a/src/Umbraco.Web.Common/AspNetCore/AspNetCoreRequestAccessor.cs +++ b/src/Umbraco.Web.Common/AspNetCore/AspNetCoreRequestAccessor.cs @@ -9,7 +9,7 @@ namespace Umbraco.Cms.Web.Common.AspNetCore; -public class AspNetCoreRequestAccessor : IRequestAccessor, INotificationHandler +public class AspNetCoreRequestAccessor : IRequestAccessor, INotificationHandler, IDisposable { private readonly ISet _applicationUrls = new HashSet(); private readonly IHttpContextAccessor _httpContextAccessor; @@ -18,6 +18,7 @@ public class AspNetCoreRequestAccessor : IRequestAccessor, INotificationHandler< private object _initLocker = new(); private bool _isInit; private WebRoutingSettings _webRoutingSettings; + private readonly IDisposable? _onChangeDisposable; /// /// Initializes a new instance of the class. @@ -28,20 +29,19 @@ public AspNetCoreRequestAccessor( { _httpContextAccessor = httpContextAccessor; _webRoutingSettings = webRoutingSettings.CurrentValue; - webRoutingSettings.OnChange(x => _webRoutingSettings = x); + _onChangeDisposable = webRoutingSettings.OnChange(x => _webRoutingSettings = x); } /// - /// This just initializes the application URL on first request attempt - /// TODO: This doesn't belong here, the GetApplicationUrl doesn't belong to IRequestAccessor - /// this should be part of middleware not a lazy init based on an INotification + /// + /// This is now a NoOp, and is no longer used, instead ApplicationUrlRequestBeginNotificationHandler is used + /// /// + [Obsolete("This is no longer used, AspNetCoreRequestAccessor will no longer implement INotificationHandler in V12, see ApplicationUrlRequestBeginNotificationHandler instead.")] public void Handle(UmbracoRequestBeginNotification notification) - => LazyInitializer.EnsureInitialized(ref _hasAppUrl, ref _isInit, ref _initLocker, () => - { - GetApplicationUrl(); - return true; - }); + { + // NoOP + } /// public string GetRequestValue(string name) => GetFormValue(name) ?? GetQueryStringValue(name); @@ -54,6 +54,17 @@ public void Handle(UmbracoRequestBeginNotification notification) ? new Uri(_httpContextAccessor.HttpContext.Request.GetEncodedUrl()) : null; + /// + /// Ensure that the ApplicationUrl is set on the first request, this is using a LazyInitializer, so the code will only be run the first time + /// + /// TODO: This doesn't belong here, the GetApplicationUrl doesn't belong to IRequestAccessor + internal void EnsureApplicationUrl() => + LazyInitializer.EnsureInitialized(ref _hasAppUrl, ref _isInit, ref _initLocker, () => + { + GetApplicationUrl(); + return true; + }); + public Uri? GetApplicationUrl() { // Fixme: This causes problems with site swap on azure because azure pre-warms a site by calling into `localhost` and when it does that @@ -63,7 +74,7 @@ public void Handle(UmbracoRequestBeginNotification notification) // see U4-10626 - in some cases we want to reset the application url // (this is a simplified version of what was in 7.x) // note: should this be optional? is it expensive? - if (!(_webRoutingSettings.UmbracoApplicationUrl is null)) + if (_webRoutingSettings.UmbracoApplicationUrl is not null) { return new Uri(_webRoutingSettings.UmbracoApplicationUrl); } @@ -96,4 +107,6 @@ public void Handle(UmbracoRequestBeginNotification notification) return request.Form[name]; } + + public void Dispose() => _onChangeDisposable?.Dispose(); } diff --git a/src/Umbraco.Web.Common/DependencyInjection/UmbracoBuilderExtensions.cs b/src/Umbraco.Web.Common/DependencyInjection/UmbracoBuilderExtensions.cs index 40b84a0987e3..d454e5d6c56e 100644 --- a/src/Umbraco.Web.Common/DependencyInjection/UmbracoBuilderExtensions.cs +++ b/src/Umbraco.Web.Common/DependencyInjection/UmbracoBuilderExtensions.cs @@ -298,6 +298,7 @@ public static IUmbracoBuilder AddWebComponents(this IUmbracoBuilder builder) // AspNetCore specific services builder.Services.AddUnique(); builder.AddNotificationHandler(); + builder.AddNotificationHandler(); // Password hasher builder.Services.AddUnique(); From 213dd7114daf4318f7da6489e5a9bce22acd225a Mon Sep 17 00:00:00 2001 From: Mole Date: Thu, 13 Oct 2022 08:24:50 +0200 Subject: [PATCH 09/33] Add missing ForceLeft and ForceRight (#13190) --- .../Models/Blocks/BlockGridLayoutItem.cs | 6 ++++++ .../ValueConverters/BlockGridPropertyValueConverter.cs | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutItem.cs b/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutItem.cs index 30494b03f7d3..9014e2789a97 100644 --- a/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutItem.cs +++ b/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutItem.cs @@ -25,6 +25,12 @@ public class BlockGridLayoutItem : IBlockLayoutItem [JsonProperty("rowSpan", NullValueHandling = NullValueHandling.Ignore)] public int? RowSpan { get; set; } + [JsonProperty("forceLeft")] + public bool ForceLeft { get; set; } + + [JsonProperty("forceRight")] + public bool ForceRight { get; set; } + [JsonProperty("areas", NullValueHandling = NullValueHandling.Ignore)] public BlockGridLayoutAreaItem[] Areas { get; set; } = Array.Empty(); } diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockGridPropertyValueConverter.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockGridPropertyValueConverter.cs index ae330870fac9..6cd2d4bd3820 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockGridPropertyValueConverter.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockGridPropertyValueConverter.cs @@ -49,6 +49,8 @@ public override bool IsConverter(IPublishedPropertyType propertyType) blockItem.RowSpan = layoutItem.RowSpan!.Value; blockItem.ColumnSpan = layoutItem.ColumnSpan!.Value; + blockItem.ForceLeft = layoutItem.ForceLeft; + blockItem.ForceRight = layoutItem.ForceRight; blockItem.AreaGridColumns = blockConfig.AreaGridColumns; blockItem.GridColumns = configuration.GridColumns; blockItem.Areas = layoutItem.Areas.Select(area => From 63af4c487c7e6e3179fcb11e2607133c8ea2eebf Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Date: Mon, 10 Oct 2022 16:15:53 +0200 Subject: [PATCH 10/33] Pass the node property to umb-property & umb-property-editor (#13151) Co-authored-by: Zeegaan --- .../src/views/components/content/umb-tabbed-content.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/components/content/umb-tabbed-content.html b/src/Umbraco.Web.UI.Client/src/views/components/content/umb-tabbed-content.html index f161c76ee0c1..8215c6669123 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/content/umb-tabbed-content.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/content/umb-tabbed-content.html @@ -11,17 +11,19 @@ data-element="property-{{property.alias}}" ng-repeat="property in tab.properties track by property.alias" property="property" + node="contentNodeModel" show-inherit="contentNodeModel.variants.length > 1 && property.variation !== 'CultureAndSegment'" inherits-from="defaultVariant.displayName"> - + From 76b54c4b63f2a6e498a49c4ed8c84e1aff07dd1a Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Date: Tue, 11 Oct 2022 15:57:01 +0200 Subject: [PATCH 11/33] V10: 13099 fix validation error (#13170) * Add validation error message to Viewpicker * Add help-inline class to make validation-text red Co-authored-by: Zeegaan --- .../views/dataTypes/views/datatype.settings.html | 8 ++++---- .../macros/views/macro.settings.controller.js | 8 ++++---- .../src/views/macros/views/settings.html | 15 ++++++++++----- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/dataTypes/views/datatype.settings.html b/src/Umbraco.Web.UI.Client/src/views/dataTypes/views/datatype.settings.html index b4422dc49ee8..f0eb5b535bab 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dataTypes/views/datatype.settings.html +++ b/src/Umbraco.Web.UI.Client/src/views/dataTypes/views/datatype.settings.html @@ -8,9 +8,9 @@ -
@@ -23,7 +23,7 @@ ng-click="vm.openPropertyEditorPicker()"> -
+
Required diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/views/macro.settings.controller.js b/src/Umbraco.Web.UI.Client/src/views/macros/views/macro.settings.controller.js index 5f633a6e4b7f..fd7889a7a66e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/macros/views/macro.settings.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/macros/views/macro.settings.controller.js @@ -14,11 +14,11 @@ function MacrosSettingsController($scope, editorService, localizationService) { //vm.removeMacroView = removeMacroView; $scope.model.openViewPicker = openViewPicker; $scope.model.removeMacroView = removeMacroView; - var labels = {}; - + vm.macroPartialViewPickerProperty = { alias : "macroPartialViewPickerProperty", description: "", label: "Macro partial view", validation: {mandatory : true}} localizationService.localizeMany(["macro_selectViewFile"]).then(function(data) { labels.selectViewFile = data[0]; + vm.macroPartialViewPickerProperty.description = data[0]; }); function openViewPicker() { @@ -45,7 +45,7 @@ function MacrosSettingsController($scope, editorService, localizationService) { name: $scope.model.macro.view }; - //$scope.model.submit($scope.model); + //$scope.model.submit($scope.model); editorService.close(); }, @@ -63,7 +63,7 @@ function MacrosSettingsController($scope, editorService, localizationService) { } function init() { - + } init(); diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/views/settings.html b/src/Umbraco.Web.UI.Client/src/views/macros/views/settings.html index c152c33193c5..9b7906165497 100644 --- a/src/Umbraco.Web.UI.Client/src/views/macros/views/settings.html +++ b/src/Umbraco.Web.UI.Client/src/views/macros/views/settings.html @@ -5,10 +5,9 @@
- - - + + - + - +
+ + Required + +
+ +
From ab8d94b4666dae923e6eeef5bad7e1d11eb1cd58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Thu, 13 Oct 2022 08:41:31 +0200 Subject: [PATCH 12/33] move clear:both; to the flexbox example (#13194) --- .../src/views/propertyeditors/blockgrid/blockgridui.less | 6 +----- .../blockgrid/umbraco-blockgridlayout-flexbox.css | 5 +++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/blockgridui.less b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/blockgridui.less index f23632389c9e..78b78525404a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/blockgridui.less +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/blockgridui.less @@ -633,8 +633,6 @@ umb-block-grid-block { border-radius: @baseBorderRadius; box-sizing: border-box; - clear: both;// needed for layouts using float. - &:hover { border-color: transparent; > button { @@ -651,7 +649,6 @@ umb-block-grid-block { > button { position: relative; display: flex; - //width: 100%; align-items: center; justify-content: center; @@ -687,7 +684,7 @@ umb-block-grid-block { &.umb-block-grid__clipboard-button { margin-left: 0; padding: 5px 12px; - font-size: 18px;// Align with block action buttons. + font-size: 18px; border-top-left-radius: 0; border-bottom-left-radius: 0; @@ -739,7 +736,6 @@ umb-block-grid-block { > button { position: relative; display: flex; - //width: 100%; align-items: center; justify-content: center; diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/umbraco-blockgridlayout-flexbox.css b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/umbraco-blockgridlayout-flexbox.css index 94974a911197..962126b9690e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/umbraco-blockgridlayout-flexbox.css +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/umbraco-blockgridlayout-flexbox.css @@ -33,4 +33,9 @@ .umb-block-grid__area { --umb-block-grid__area-calc: calc(var(--umb-block-grid--area-column-span) / var(--umb-block-grid--area-grid-columns, 1)); width: calc(var(--umb-block-grid__area-calc) * 100%); +} + + +.umb-block-grid__actions { + clear: both; } \ No newline at end of file From ff75fcd36e900d7ffd5f183147398f1c3058d3d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Thu, 13 Oct 2022 08:42:49 +0200 Subject: [PATCH 13/33] remove pointer-events from Image, to make drag n' drop work on firefox. (#13193) --- .../umbBlockGridDemoImageBlock.html | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Umbraco.Cms.StaticAssets/wwwroot/App_Plugins/Umbraco.BlockGridEditor.DefaultCustomViews/umbBlockGridDemoImageBlock.html b/src/Umbraco.Cms.StaticAssets/wwwroot/App_Plugins/Umbraco.BlockGridEditor.DefaultCustomViews/umbBlockGridDemoImageBlock.html index 521d7c9b09dc..e02ae35c852b 100644 --- a/src/Umbraco.Cms.StaticAssets/wwwroot/App_Plugins/Umbraco.BlockGridEditor.DefaultCustomViews/umbBlockGridDemoImageBlock.html +++ b/src/Umbraco.Cms.StaticAssets/wwwroot/App_Plugins/Umbraco.BlockGridEditor.DefaultCustomViews/umbBlockGridDemoImageBlock.html @@ -35,7 +35,6 @@ color: #2152A3;// TODO: Set right colors: } img { - pointer-events: none; object-fit: cover; height: 100%; width: 100%; From a0931d2042a76cb6fc2d3b3bc248b44430301736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Thu, 13 Oct 2022 08:43:43 +0200 Subject: [PATCH 14/33] area permission min-max inputs width increase (#13195) --- .../prevalue/umb-block-grid-area-allowance-editor.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-allowance-editor.less b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-allowance-editor.less index 11907dfcb029..9389906facde 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-allowance-editor.less +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-allowance-editor.less @@ -20,7 +20,7 @@ margin: 0 3px; } input { - width: 40px; + width: 60px; } } From cdc994dd8ee16f539e0115c514f8b1168f48fd10 Mon Sep 17 00:00:00 2001 From: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com> Date: Thu, 13 Oct 2022 08:59:53 +0200 Subject: [PATCH 15/33] Fix tags with CSV storage type (#13188) * Fixing null check as default(NRT) is null => default(configuration?.Delimiter) is also null and we were counting on it being the same as default(char) * Adding tests to check cases with multiple tags (or tag made of comma separated values) --- .../Models/PropertyTagsExtensions.cs | 2 +- .../Services/ContentServiceTagsTests.cs | 73 +++++++++++++++++++ 2 files changed, 74 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Models/PropertyTagsExtensions.cs b/src/Umbraco.Core/Models/PropertyTagsExtensions.cs index 9ad98d66c0ac..d36baed60401 100644 --- a/src/Umbraco.Core/Models/PropertyTagsExtensions.cs +++ b/src/Umbraco.Core/Models/PropertyTagsExtensions.cs @@ -33,7 +33,7 @@ public static class PropertyTagsExtensions : dataTypeService.GetDataType(property.PropertyType.DataTypeId)?.Configuration; TagConfiguration? configuration = ConfigurationEditor.ConfigurationAs(configurationObject); - if (configuration?.Delimiter == default && configuration?.Delimiter is not null) + if (configuration is not null && configuration.Delimiter == default) { configuration.Delimiter = tagAttribute.Delimiter; } diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTagsTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTagsTests.cs index 25e7aa10097e..9179b6cd69fb 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTagsTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTagsTests.cs @@ -638,6 +638,9 @@ public void Create_Tag_Data_Bulk_Publish_Operation() var dataType = DataTypeService.GetDataType(1041); dataType.Configuration = new TagConfiguration { Group = "test", StorageType = TagsStorageType.Csv }; + // updating the data type with the new configuration + DataTypeService.Save(dataType); + var template = TemplateBuilder.CreateTextPageTemplate(); FileService.SaveTemplate(template); @@ -822,6 +825,76 @@ public void Can_Remove_Tag_Data_To_Published_Content() } } + [Test] + public void Does_Not_Save_Multiple_Tags_As_One_When_CSV_Storage() + { + // Arrange + // set configuration + var dataType = DataTypeService.GetDataType(1041); + dataType.Configuration = new TagConfiguration { Group = "test", StorageType = TagsStorageType.Csv }; + + // updating the data type with the new configuration + DataTypeService.Save(dataType); + + var template = TemplateBuilder.CreateTextPageTemplate(); + FileService.SaveTemplate(template); + + var contentType = ContentTypeBuilder.CreateSimpleContentType("umbMandatory", "Mandatory Doc Type", + mandatoryProperties: true, defaultTemplateId: template.Id); + CreateAndAddTagsPropertyType(contentType); + + ContentTypeService.Save(contentType); + + IContent content = ContentBuilder.CreateSimpleContent(contentType, "Tagged content"); + content.AssignTags(PropertyEditorCollection, DataTypeService, Serializer, "tags", + new[] { "hello,world,tags", "new"}); + + ContentService.SaveAndPublish(content); + + // Act + content = ContentService.GetById(content.Id); + var savedTags = content.Properties["tags"].GetTagsValue(PropertyEditorCollection, DataTypeService, Serializer) + .ToArray(); + + // Assert + Assert.AreEqual(4, savedTags.Length); + } + + [Test] + public void Can_Save_Tag_With_Comma_Separated_Values_As_One_When_JSON_Storage() + { + // Arrange + // set configuration + var dataType = DataTypeService.GetDataType(1041); + dataType.Configuration = new TagConfiguration { Group = "test", StorageType = TagsStorageType.Json }; + + // updating the data type with the new configuration + DataTypeService.Save(dataType); + + var template = TemplateBuilder.CreateTextPageTemplate(); + FileService.SaveTemplate(template); + + var contentType = ContentTypeBuilder.CreateSimpleContentType("umbMandatory", "Mandatory Doc Type", + mandatoryProperties: true, defaultTemplateId: template.Id); + CreateAndAddTagsPropertyType(contentType); + + ContentTypeService.Save(contentType); + + IContent content = ContentBuilder.CreateSimpleContent(contentType, "Tagged content"); + content.AssignTags(PropertyEditorCollection, DataTypeService, Serializer, "tags", + new[] { "hello,world,tags", "new"}); + + ContentService.SaveAndPublish(content); + + // Act + content = ContentService.GetById(content.Id); + var savedTags = content.Properties["tags"].GetTagsValue(PropertyEditorCollection, DataTypeService, Serializer) + .ToArray(); + + // Assert + Assert.AreEqual(2, savedTags.Length); + } + private PropertyType CreateAndAddTagsPropertyType(ContentType contentType, ContentVariation variations = ContentVariation.Nothing) { From 0fe2c225cb8fc0dde74dd9a511b05b66c21c6430 Mon Sep 17 00:00:00 2001 From: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com> Date: Thu, 13 Oct 2022 08:59:53 +0200 Subject: [PATCH 16/33] Fix tags with CSV storage type (#13188) * Fixing null check as default(NRT) is null => default(configuration?.Delimiter) is also null and we were counting on it being the same as default(char) * Adding tests to check cases with multiple tags (or tag made of comma separated values) --- .../Models/PropertyTagsExtensions.cs | 2 +- .../Services/ContentServiceTagsTests.cs | 73 +++++++++++++++++++ 2 files changed, 74 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Models/PropertyTagsExtensions.cs b/src/Umbraco.Core/Models/PropertyTagsExtensions.cs index 9ad98d66c0ac..d36baed60401 100644 --- a/src/Umbraco.Core/Models/PropertyTagsExtensions.cs +++ b/src/Umbraco.Core/Models/PropertyTagsExtensions.cs @@ -33,7 +33,7 @@ public static class PropertyTagsExtensions : dataTypeService.GetDataType(property.PropertyType.DataTypeId)?.Configuration; TagConfiguration? configuration = ConfigurationEditor.ConfigurationAs(configurationObject); - if (configuration?.Delimiter == default && configuration?.Delimiter is not null) + if (configuration is not null && configuration.Delimiter == default) { configuration.Delimiter = tagAttribute.Delimiter; } diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTagsTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTagsTests.cs index 25e7aa10097e..9179b6cd69fb 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTagsTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTagsTests.cs @@ -638,6 +638,9 @@ public void Create_Tag_Data_Bulk_Publish_Operation() var dataType = DataTypeService.GetDataType(1041); dataType.Configuration = new TagConfiguration { Group = "test", StorageType = TagsStorageType.Csv }; + // updating the data type with the new configuration + DataTypeService.Save(dataType); + var template = TemplateBuilder.CreateTextPageTemplate(); FileService.SaveTemplate(template); @@ -822,6 +825,76 @@ public void Can_Remove_Tag_Data_To_Published_Content() } } + [Test] + public void Does_Not_Save_Multiple_Tags_As_One_When_CSV_Storage() + { + // Arrange + // set configuration + var dataType = DataTypeService.GetDataType(1041); + dataType.Configuration = new TagConfiguration { Group = "test", StorageType = TagsStorageType.Csv }; + + // updating the data type with the new configuration + DataTypeService.Save(dataType); + + var template = TemplateBuilder.CreateTextPageTemplate(); + FileService.SaveTemplate(template); + + var contentType = ContentTypeBuilder.CreateSimpleContentType("umbMandatory", "Mandatory Doc Type", + mandatoryProperties: true, defaultTemplateId: template.Id); + CreateAndAddTagsPropertyType(contentType); + + ContentTypeService.Save(contentType); + + IContent content = ContentBuilder.CreateSimpleContent(contentType, "Tagged content"); + content.AssignTags(PropertyEditorCollection, DataTypeService, Serializer, "tags", + new[] { "hello,world,tags", "new"}); + + ContentService.SaveAndPublish(content); + + // Act + content = ContentService.GetById(content.Id); + var savedTags = content.Properties["tags"].GetTagsValue(PropertyEditorCollection, DataTypeService, Serializer) + .ToArray(); + + // Assert + Assert.AreEqual(4, savedTags.Length); + } + + [Test] + public void Can_Save_Tag_With_Comma_Separated_Values_As_One_When_JSON_Storage() + { + // Arrange + // set configuration + var dataType = DataTypeService.GetDataType(1041); + dataType.Configuration = new TagConfiguration { Group = "test", StorageType = TagsStorageType.Json }; + + // updating the data type with the new configuration + DataTypeService.Save(dataType); + + var template = TemplateBuilder.CreateTextPageTemplate(); + FileService.SaveTemplate(template); + + var contentType = ContentTypeBuilder.CreateSimpleContentType("umbMandatory", "Mandatory Doc Type", + mandatoryProperties: true, defaultTemplateId: template.Id); + CreateAndAddTagsPropertyType(contentType); + + ContentTypeService.Save(contentType); + + IContent content = ContentBuilder.CreateSimpleContent(contentType, "Tagged content"); + content.AssignTags(PropertyEditorCollection, DataTypeService, Serializer, "tags", + new[] { "hello,world,tags", "new"}); + + ContentService.SaveAndPublish(content); + + // Act + content = ContentService.GetById(content.Id); + var savedTags = content.Properties["tags"].GetTagsValue(PropertyEditorCollection, DataTypeService, Serializer) + .ToArray(); + + // Assert + Assert.AreEqual(2, savedTags.Length); + } + private PropertyType CreateAndAddTagsPropertyType(ContentType contentType, ContentVariation variations = ContentVariation.Nothing) { From 0a925fd3ba2f0f4656bddb523fcc10a44561122c Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Thu, 13 Oct 2022 10:02:27 +0200 Subject: [PATCH 17/33] Add documentation for default block grid partial views in the rendering extension methods (#13184) --- .../Extensions/BlockGridTemplateExtensions.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/Umbraco.Web.Common/Extensions/BlockGridTemplateExtensions.cs b/src/Umbraco.Web.Common/Extensions/BlockGridTemplateExtensions.cs index c8afbf0e68ea..ee0375da4f1c 100644 --- a/src/Umbraco.Web.Common/Extensions/BlockGridTemplateExtensions.cs +++ b/src/Umbraco.Web.Common/Extensions/BlockGridTemplateExtensions.cs @@ -17,6 +17,19 @@ public static class BlockGridTemplateExtensions #region Async + /// + /// Renders a block grid model into a grid layout + /// + /// + /// By default this method uses a set of built-in partial views for rendering the blocks and areas in the grid model. + /// These partial views are embedded in the static assets (Umbraco.Cms.StaticAssets), so they won't show up in the + /// Views folder on your local disk. + /// + /// If you need to tweak the grid rendering output, you can copy the partial views from GitHub to your local disk. + /// The partial views are found in "/src/Umbraco.Cms.StaticAssets/Views/Partials/blockgrid/" on GitHub and should + /// be copied to "Views/Partials/BlockGrid/" on your local disk. + /// + /// public static async Task GetBlockGridHtmlAsync(this IHtmlHelper html, BlockGridModel? model, string template = DefaultTemplate) { if (model?.Count == 0) @@ -27,9 +40,11 @@ public static async Task GetBlockGridHtmlAsync(this IHtmlHelper ht return await html.PartialAsync(DefaultFolderTemplate(template), model); } + /// public static async Task GetBlockGridHtmlAsync(this IHtmlHelper html, IPublishedProperty property, string template = DefaultTemplate) => await GetBlockGridHtmlAsync(html, property.GetValue() as BlockGridModel, template); + /// public static async Task GetBlockGridHtmlAsync(this IHtmlHelper html, IPublishedContent contentItem, string propertyAlias) => await GetBlockGridHtmlAsync(html, contentItem, propertyAlias, DefaultTemplate); @@ -49,6 +64,7 @@ public static async Task GetBlockGridItemAreasHtmlAsync(this IHtml #region Sync + /// public static IHtmlContent GetBlockGridHtml(this IHtmlHelper html, BlockGridModel? model, string template = DefaultTemplate) { if (model?.Count == 0) @@ -59,9 +75,11 @@ public static IHtmlContent GetBlockGridHtml(this IHtmlHelper html, BlockGridMode return html.Partial(DefaultFolderTemplate(template), model); } + /// public static IHtmlContent GetBlockGridHtml(this IHtmlHelper html, IPublishedProperty property, string template = DefaultTemplate) => GetBlockGridHtml(html, property.GetValue() as BlockGridModel, template); + /// public static IHtmlContent GetBlockGridHtml(this IHtmlHelper html, IPublishedContent contentItem, string propertyAlias) => GetBlockGridHtml(html, contentItem, propertyAlias, DefaultTemplate); From 2fa61fe811ef3fd1411cc96bb017588e4394fb44 Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Date: Thu, 13 Oct 2022 10:29:50 +0200 Subject: [PATCH 18/33] Add data-element to umb property so we can find it (#13199) Co-authored-by: Zeegaan --- .../src/views/components/property/umb-property.html | 6 +++--- .../src/views/macros/views/settings.html | 1 + .../tests/DefaultConfig/Settings/macro.spec.ts | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/components/property/umb-property.html b/src/Umbraco.Web.UI.Client/src/views/components/property/umb-property.html index 8d0087b395f3..f00ba725b251 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/property/umb-property.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/property/umb-property.html @@ -9,7 +9,7 @@
- + @@ -41,11 +41,11 @@ {{ vm.property.culture }} - + - + {{ vm.property.segment }} Default diff --git a/src/Umbraco.Web.UI.Client/src/views/macros/views/settings.html b/src/Umbraco.Web.UI.Client/src/views/macros/views/settings.html index 9b7906165497..0975da878ab8 100644 --- a/src/Umbraco.Web.UI.Client/src/views/macros/views/settings.html +++ b/src/Umbraco.Web.UI.Client/src/views/macros/views/settings.html @@ -21,6 +21,7 @@ diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.overlay.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.overlay.html index cc324f70d52f..58ca11b7165a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.overlay.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.overlay.html @@ -26,9 +26,9 @@
- +
- +
@@ -36,7 +36,7 @@
- + Overwrite how this block appears in the BackOffice UI. Pick a .html file containing your presentation. @@ -50,7 +50,7 @@
-
@@ -60,7 +60,7 @@
- +
@@ -71,7 +71,7 @@
-
@@ -81,9 +81,9 @@
- +
- @@ -107,12 +107,12 @@
- +
-
@@ -124,7 +124,7 @@
- +
@@ -137,7 +137,7 @@
-
@@ -157,9 +157,10 @@
- +
@@ -171,9 +172,10 @@
- +
@@ -185,7 +187,7 @@
- +
@@ -196,7 +198,7 @@
-
@@ -218,9 +220,13 @@
- +
- + +
From 37424a63ec2bd420bf35a99b7cc07374147f9577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Mon, 17 Oct 2022 13:55:22 +0200 Subject: [PATCH 22/33] make Area fit within block row (#13221) --- .../umbBlockGridDemoImageBlock.html | 1 - .../src/views/propertyeditors/blockgrid/blockgridui.less | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Cms.StaticAssets/wwwroot/App_Plugins/Umbraco.BlockGridEditor.DefaultCustomViews/umbBlockGridDemoImageBlock.html b/src/Umbraco.Cms.StaticAssets/wwwroot/App_Plugins/Umbraco.BlockGridEditor.DefaultCustomViews/umbBlockGridDemoImageBlock.html index e02ae35c852b..c9da7ab143aa 100644 --- a/src/Umbraco.Cms.StaticAssets/wwwroot/App_Plugins/Umbraco.BlockGridEditor.DefaultCustomViews/umbBlockGridDemoImageBlock.html +++ b/src/Umbraco.Cms.StaticAssets/wwwroot/App_Plugins/Umbraco.BlockGridEditor.DefaultCustomViews/umbBlockGridDemoImageBlock.html @@ -19,7 +19,6 @@ justify-content: center; width: 100%; height: 100%; - min-height: 100%; cursor: pointer; color: black; background-color: transparent; diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/blockgridui.less b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/blockgridui.less index 78b78525404a..41628aca5e50 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/blockgridui.less +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/blockgridui.less @@ -279,7 +279,8 @@ ng-form.ng-invalid > .umb-block-grid__block:not(.--active) > .umb-block-grid__bl .umb-block-grid__block--view { height: 100%; width: 100%; - display: block; + display: flex; + flex-direction: column; } .umb-block-grid__block--context { From 8d8e4e0b24ab2012854d671b5f666e6e8feed2a9 Mon Sep 17 00:00:00 2001 From: Matt Darby Date: Mon, 17 Oct 2022 13:02:25 +0100 Subject: [PATCH 23/33] 10.3.0-RC: Change grid area input to number + change generic label (#13203) Co-authored-by: Bjarne Fyrstenborg --- .../prevalue/blockgrid.blockconfiguration.overlay.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.overlay.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.overlay.html index 29b3f4b53f78..4b05e4ad43c3 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.overlay.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.overlay.html @@ -260,12 +260,12 @@
- + Define how many layout columns that will be available for areas. If not defined, the number of layout columns defined for the entire layout will be used.
- +
From 96bf197642dd71cb8c46d5da130574ccb0b79ddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Mon, 17 Oct 2022 14:35:59 +0200 Subject: [PATCH 24/33] move below center, to make room (#13222) --- .../blockgrid/prevalue/umb-block-grid-area-editor.less | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.less b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.less index d4a1487b408f..bf66c3466140 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.less +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.less @@ -163,9 +163,10 @@ Grid part: .umb-block-grid-area-editor__scale-label { position: absolute; display: block; - left: 100%; - margin-left: 6px; + right: 0; + top: 100%; margin-top: 6px; + transform: translateX(50%); z-index: 2; background-color: white; From 2993f1bb6d022a4b99172d6bd50ddf5b8698c8bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 18 Oct 2022 08:21:54 +0200 Subject: [PATCH 25/33] highlight areas in dragging-mode for modern browsers (#13224) --- .../blockgrid/blockgridui.less | 35 +++++++++++++++---- .../umbblockgridentries.component.js | 1 + 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/blockgridui.less b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/blockgridui.less index 41628aca5e50..6cfdb05482fe 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/blockgridui.less +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/blockgridui.less @@ -234,26 +234,29 @@ ng-form.ng-invalid-val-server-match-content > .umb-block-grid__block:not(.--acti &:not(.--hovering-area):focus, &:not(.--hovering-area):focus-within, &.--active { + + /** Avoid displaying hover when dragging-mode */ + --umb-block-grid--block_ui-opacity: calc(1 - var(--umb-block-grid--dragging-mode, 0)); > .umb-block-grid__block--context { - opacity: 1; + opacity: var(--umb-block-grid--block_ui-opacity); } &:not(.--scale-mode) { > .umb-block-grid__block--actions { - opacity: 1; + opacity: var(--umb-block-grid--block_ui-opacity); } > umb-block-grid-block > umb-block-grid-entries > .umb-block-grid__layout-container > .umb-block-grid__area-actions { - opacity: 1; + opacity: var(--umb-block-grid--block_ui-opacity); } } > .umb-block-grid__scale-handler { - opacity: 1; + opacity: var(--umb-block-grid--block_ui-opacity); } > .umb-block-grid__force-left, > .umb-block-grid__force-right { - opacity: 1; + opacity: var(--umb-block-grid--block_ui-opacity); } } @@ -584,6 +587,9 @@ umb-block-grid-block { top: 0px; position: absolute; z-index: 1; + + /** Avoid showing inline-create in dragging-mode */ + opacity: calc(1 - var(--umb-block-grid--dragging-mode, 0)); } .umb-block-grid__block--inline-create-button.--above { left: 0; @@ -776,7 +782,8 @@ umb-block-grid-block { background: transparent; border-radius: 3px; - border: @blueDark solid 1px; + border: solid 1px; + border-color: rgba(@blueDark, .5); border-radius: 3px; height: 100%; @@ -862,9 +869,25 @@ umb-block-grid-block { transition: opacity 240ms; } .umb-block-grid__area.--highlight::after { + /** Avoid displaying highlight when in dragging-mode */ + opacity: calc(1 - var(--umb-block-grid--dragging-mode, 0)); + border-color: @blueDark; + box-shadow: 0 0 0 1px rgba(255, 255, 255, .7), inset 0 0 0 1px rgba(255, 255, 255, .7); +} +.umb-block-grid__area:has( .umb-block-grid__layout-item-placeholder )::after { opacity: 1; border-color: @blueDark; box-shadow: 0 0 0 1px rgba(255, 255, 255, .7), inset 0 0 0 1px rgba(255, 255, 255, .7); + + /* Moved back to edge for this case */ + top: 0; + bottom: 0; + + animation: umb-block-grid__area-after__border-pulse 400ms ease-in-out alternate infinite; + @keyframes umb-block-grid__area-after__border-pulse { + 0% { border-color: rgba(@blueDark, 1); } + 100% { border-color: rgba(@blueDark, 0.66); } + } } .umb-block-grid__scalebox-backdrop { diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/umbblockgridentries.component.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/umbblockgridentries.component.js index c105b98fcbeb..c1e2c43619c5 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/umbblockgridentries.component.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/umbblockgridentries.component.js @@ -619,6 +619,7 @@ } window.removeEventListener('drag', _onDragMove); window.removeEventListener('dragover', _onDragMove); + document.documentElement.style.setProperty("--umb-block-grid--dragging-mode", 0); if(ghostElIndicateForceLeft) { ghostEl.removeChild(ghostElIndicateForceLeft); From 733f0b8e0988a4d5001ad776d6743c9023a4d04f Mon Sep 17 00:00:00 2001 From: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com> Date: Tue, 18 Oct 2022 08:22:27 +0200 Subject: [PATCH 26/33] Collect new .xml language files from different sources (#13212) * Collecting new language files from different sources * Apply suggestions from review * Adding TODO for merging the language files locations to one when packages are not concerned --- .../LocalizedTextServiceFileSources.cs | 23 +++++++++---- ...lizedTextServiceSupplementaryFileSource.cs | 15 ++++++++- .../UmbracoBuilder.Services.cs | 7 ++++ .../UmbracoBuilder.LocalizedText.cs | 33 ++++++++++++------- 4 files changed, 59 insertions(+), 19 deletions(-) diff --git a/src/Umbraco.Core/Services/LocalizedTextServiceFileSources.cs b/src/Umbraco.Core/Services/LocalizedTextServiceFileSources.cs index 26a2e9fb60ca..ea75f369afa1 100644 --- a/src/Umbraco.Core/Services/LocalizedTextServiceFileSources.cs +++ b/src/Umbraco.Core/Services/LocalizedTextServiceFileSources.cs @@ -1,4 +1,5 @@ using System.Globalization; +using System.Text.RegularExpressions; using System.Xml; using System.Xml.Linq; using Microsoft.Extensions.FileProviders; @@ -166,7 +167,7 @@ public LocalizedTextServiceFileSources(ILogger } /// - /// returns all xml sources for all culture files found in the folder + /// Returns all xml sources for all culture files found in the folder. /// /// public IDictionary> GetXmlSources() => _xmlSources.Value; @@ -179,7 +180,15 @@ private IEnumerable GetLanguageFiles() { result.AddRange( new PhysicalDirectoryContents(_fileSourceFolder.FullName) - .Where(x => !x.IsDirectory && x.Name.EndsWith(".xml"))); + .Where(x => !x.IsDirectory && !x.Name.Contains("user") && x.Name.EndsWith(".xml"))); // Filter out *.user.xml + } + + if (_supplementFileSources is not null) + { + // Get only the .xml files and filter out the user defined language files (*.user.xml) that overwrite the default + result.AddRange(_supplementFileSources + .Where(x => !x.FileInfo.Name.Contains("user") && x.FileInfo.Name.EndsWith(".xml")) + .Select(x => x.FileInfo)); } if (_directoryContents.Exists) @@ -236,8 +245,8 @@ private void MergeSupplementaryFiles(CultureInfo culture, XDocument xMasterDoc) // now load in supplementary IEnumerable found = _supplementFileSources.Where(x => { - var extension = Path.GetExtension(x.File.FullName); - var fileCultureName = Path.GetFileNameWithoutExtension(x.File.FullName).Replace("_", "-") + var extension = Path.GetExtension(x.FileInfo.Name); + var fileCultureName = Path.GetFileNameWithoutExtension(x.FileInfo.Name).Replace("_", "-") .Replace(".user", string.Empty); return extension.InvariantEquals(".xml") && ( fileCultureName.InvariantEquals(culture.Name) @@ -246,16 +255,16 @@ private void MergeSupplementaryFiles(CultureInfo culture, XDocument xMasterDoc) foreach (LocalizedTextServiceSupplementaryFileSource supplementaryFile in found) { - using (FileStream fs = supplementaryFile.File.OpenRead()) + using (Stream stream = supplementaryFile.FileInfo.CreateReadStream()) { XDocument xChildDoc; try { - xChildDoc = XDocument.Load(fs); + xChildDoc = XDocument.Load(stream); } catch (Exception ex) { - _logger.LogError(ex, "Could not load file into XML {File}", supplementaryFile.File.FullName); + _logger.LogError(ex, "Could not load file into XML {File}", supplementaryFile.FileInfo.Name); continue; } diff --git a/src/Umbraco.Core/Services/LocalizedTextServiceSupplementaryFileSource.cs b/src/Umbraco.Core/Services/LocalizedTextServiceSupplementaryFileSource.cs index cff9a55234b9..3ada83dc3c27 100644 --- a/src/Umbraco.Core/Services/LocalizedTextServiceSupplementaryFileSource.cs +++ b/src/Umbraco.Core/Services/LocalizedTextServiceSupplementaryFileSource.cs @@ -1,14 +1,27 @@ +using Microsoft.Extensions.FileProviders; +using Microsoft.Extensions.FileProviders.Physical; + namespace Umbraco.Cms.Core.Services; public class LocalizedTextServiceSupplementaryFileSource { + [Obsolete("Use other ctor. Will be removed in Umbraco 12")] public LocalizedTextServiceSupplementaryFileSource(FileInfo file, bool overwriteCoreKeys) + : this(new PhysicalFileInfo(file), overwriteCoreKeys) { - File = file ?? throw new ArgumentNullException("file"); + } + + public LocalizedTextServiceSupplementaryFileSource(IFileInfo file, bool overwriteCoreKeys) + { + FileInfo = file ?? throw new ArgumentNullException(nameof(file)); + File = file is PhysicalFileInfo ? new FileInfo(file.PhysicalPath) : null!; OverwriteCoreKeys = overwriteCoreKeys; } + [Obsolete("Use FileInfo instead. Will be removed in Umbraco 12")] public FileInfo File { get; } + public IFileInfo FileInfo { get; } + public bool OverwriteCoreKeys { get; } } diff --git a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs index dd5b77abec5f..c9208b5bdc78 100644 --- a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs +++ b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs @@ -102,7 +102,14 @@ private static LocalizedTextServiceFileSources CreateLocalizedTextServiceFileSou IServiceProvider container) { IHostingEnvironment hostingEnvironment = container.GetRequiredService(); + + // TODO: (for >= v13) Rethink whether all language files (.xml and .user.xml) should be located in ~/config/lang + // instead of ~/umbraco/config/lang and ~/config/lang. + // Currently when extending Umbraco, a new language file that the backoffice will be available in, should be placed + // in ~/umbraco/config/lang, while 'user' translation files for overrides are in ~/config/lang (according to our docs). + // Such change will be breaking and we would need to document this clearly. var subPath = WebPath.Combine(Constants.SystemDirectories.Umbraco, "config", "lang"); + var mainLangFolder = new DirectoryInfo(hostingEnvironment.MapPathContentRoot(subPath)); return new LocalizedTextServiceFileSources( diff --git a/src/Umbraco.Web.BackOffice/DependencyInjection/UmbracoBuilder.LocalizedText.cs b/src/Umbraco.Web.BackOffice/DependencyInjection/UmbracoBuilder.LocalizedText.cs index 54e25240e0e7..60a946a553d0 100644 --- a/src/Umbraco.Web.BackOffice/DependencyInjection/UmbracoBuilder.LocalizedText.cs +++ b/src/Umbraco.Web.BackOffice/DependencyInjection/UmbracoBuilder.LocalizedText.cs @@ -1,6 +1,8 @@ +using System.IO; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.FileProviders; +using Umbraco.Cms.Core.Configuration.Models; using Umbraco.Cms.Core.DependencyInjection; using Umbraco.Cms.Core.Routing; using Umbraco.Cms.Core.Services; @@ -42,20 +44,30 @@ private static IEnumerable GetSuppl // gets all langs files in /app_plugins real or virtual locations IEnumerable pluginLangFileSources = GetPluginLanguageFileSources(webFileProvider, Cms.Core.Constants.SystemDirectories.AppPlugins, false); - // user defined langs that overwrite the default, these should not be used by plugin creators + // user defined language files that overwrite the default, these should not be used by plugin creators var userConfigLangFolder = Cms.Core.Constants.SystemDirectories.Config .TrimStart(Cms.Core.Constants.CharArrays.Tilde); - IEnumerable userLangFileSources = contentFileProvider.GetDirectoryContents(userConfigLangFolder) - .Where(x => x.IsDirectory && x.Name.InvariantEquals("lang")) - .Select(x => new DirectoryInfo(x.PhysicalPath)) - .SelectMany(x => x.GetFiles("*.user.xml", SearchOption.TopDirectoryOnly)) - .Select(x => new LocalizedTextServiceSupplementaryFileSource(x, true)); + var configLangFileSources = new List(); + + foreach (IFileInfo langFileSource in contentFileProvider.GetDirectoryContents(userConfigLangFolder)) + { + if (langFileSource.IsDirectory && langFileSource.Name.InvariantEquals("lang")) + { + foreach (IFileInfo langFile in contentFileProvider.GetDirectoryContents($"{userConfigLangFolder}/{langFileSource.Name}")) + { + if (langFile.Name.InvariantEndsWith(".xml") && langFile.PhysicalPath is not null) + { + configLangFileSources.Add(new LocalizedTextServiceSupplementaryFileSource(langFile, true)); + } + } + } + } return localPluginFileSources .Concat(pluginLangFileSources) - .Concat(userLangFileSources); + .Concat(configLangFileSources); } @@ -83,13 +95,12 @@ private static IEnumerable GetPlugi foreach (var langFolder in GetLangFolderPaths(fileProvider, pluginFolderPath)) { // request all the files out of the path, these will have physicalPath set. - IEnumerable localizationFiles = fileProvider + IEnumerable localizationFiles = fileProvider .GetDirectoryContents(langFolder) .Where(x => !string.IsNullOrEmpty(x.PhysicalPath)) - .Where(x => x.Name.InvariantEndsWith(".xml")) - .Select(x => new FileInfo(x.PhysicalPath)); + .Where(x => x.Name.InvariantEndsWith(".xml")); - foreach (FileInfo file in localizationFiles) + foreach (IFileInfo file in localizationFiles) { yield return new LocalizedTextServiceSupplementaryFileSource(file, overwriteCoreKeys); } From 5e9601114032f382ccdaef5f05c31d04192be78b Mon Sep 17 00:00:00 2001 From: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com> Date: Tue, 18 Oct 2022 08:22:27 +0200 Subject: [PATCH 27/33] Collect new .xml language files from different sources (#13212) * Collecting new language files from different sources * Apply suggestions from review * Adding TODO for merging the language files locations to one when packages are not concerned --- .../LocalizedTextServiceFileSources.cs | 23 +++++++++---- ...lizedTextServiceSupplementaryFileSource.cs | 15 ++++++++- .../UmbracoBuilder.Services.cs | 7 ++++ .../UmbracoBuilder.LocalizedText.cs | 33 ++++++++++++------- 4 files changed, 59 insertions(+), 19 deletions(-) diff --git a/src/Umbraco.Core/Services/LocalizedTextServiceFileSources.cs b/src/Umbraco.Core/Services/LocalizedTextServiceFileSources.cs index 26a2e9fb60ca..ea75f369afa1 100644 --- a/src/Umbraco.Core/Services/LocalizedTextServiceFileSources.cs +++ b/src/Umbraco.Core/Services/LocalizedTextServiceFileSources.cs @@ -1,4 +1,5 @@ using System.Globalization; +using System.Text.RegularExpressions; using System.Xml; using System.Xml.Linq; using Microsoft.Extensions.FileProviders; @@ -166,7 +167,7 @@ public LocalizedTextServiceFileSources(ILogger } /// - /// returns all xml sources for all culture files found in the folder + /// Returns all xml sources for all culture files found in the folder. /// /// public IDictionary> GetXmlSources() => _xmlSources.Value; @@ -179,7 +180,15 @@ private IEnumerable GetLanguageFiles() { result.AddRange( new PhysicalDirectoryContents(_fileSourceFolder.FullName) - .Where(x => !x.IsDirectory && x.Name.EndsWith(".xml"))); + .Where(x => !x.IsDirectory && !x.Name.Contains("user") && x.Name.EndsWith(".xml"))); // Filter out *.user.xml + } + + if (_supplementFileSources is not null) + { + // Get only the .xml files and filter out the user defined language files (*.user.xml) that overwrite the default + result.AddRange(_supplementFileSources + .Where(x => !x.FileInfo.Name.Contains("user") && x.FileInfo.Name.EndsWith(".xml")) + .Select(x => x.FileInfo)); } if (_directoryContents.Exists) @@ -236,8 +245,8 @@ private void MergeSupplementaryFiles(CultureInfo culture, XDocument xMasterDoc) // now load in supplementary IEnumerable found = _supplementFileSources.Where(x => { - var extension = Path.GetExtension(x.File.FullName); - var fileCultureName = Path.GetFileNameWithoutExtension(x.File.FullName).Replace("_", "-") + var extension = Path.GetExtension(x.FileInfo.Name); + var fileCultureName = Path.GetFileNameWithoutExtension(x.FileInfo.Name).Replace("_", "-") .Replace(".user", string.Empty); return extension.InvariantEquals(".xml") && ( fileCultureName.InvariantEquals(culture.Name) @@ -246,16 +255,16 @@ private void MergeSupplementaryFiles(CultureInfo culture, XDocument xMasterDoc) foreach (LocalizedTextServiceSupplementaryFileSource supplementaryFile in found) { - using (FileStream fs = supplementaryFile.File.OpenRead()) + using (Stream stream = supplementaryFile.FileInfo.CreateReadStream()) { XDocument xChildDoc; try { - xChildDoc = XDocument.Load(fs); + xChildDoc = XDocument.Load(stream); } catch (Exception ex) { - _logger.LogError(ex, "Could not load file into XML {File}", supplementaryFile.File.FullName); + _logger.LogError(ex, "Could not load file into XML {File}", supplementaryFile.FileInfo.Name); continue; } diff --git a/src/Umbraco.Core/Services/LocalizedTextServiceSupplementaryFileSource.cs b/src/Umbraco.Core/Services/LocalizedTextServiceSupplementaryFileSource.cs index cff9a55234b9..3ada83dc3c27 100644 --- a/src/Umbraco.Core/Services/LocalizedTextServiceSupplementaryFileSource.cs +++ b/src/Umbraco.Core/Services/LocalizedTextServiceSupplementaryFileSource.cs @@ -1,14 +1,27 @@ +using Microsoft.Extensions.FileProviders; +using Microsoft.Extensions.FileProviders.Physical; + namespace Umbraco.Cms.Core.Services; public class LocalizedTextServiceSupplementaryFileSource { + [Obsolete("Use other ctor. Will be removed in Umbraco 12")] public LocalizedTextServiceSupplementaryFileSource(FileInfo file, bool overwriteCoreKeys) + : this(new PhysicalFileInfo(file), overwriteCoreKeys) { - File = file ?? throw new ArgumentNullException("file"); + } + + public LocalizedTextServiceSupplementaryFileSource(IFileInfo file, bool overwriteCoreKeys) + { + FileInfo = file ?? throw new ArgumentNullException(nameof(file)); + File = file is PhysicalFileInfo ? new FileInfo(file.PhysicalPath) : null!; OverwriteCoreKeys = overwriteCoreKeys; } + [Obsolete("Use FileInfo instead. Will be removed in Umbraco 12")] public FileInfo File { get; } + public IFileInfo FileInfo { get; } + public bool OverwriteCoreKeys { get; } } diff --git a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs index dd5b77abec5f..c9208b5bdc78 100644 --- a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs +++ b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs @@ -102,7 +102,14 @@ private static LocalizedTextServiceFileSources CreateLocalizedTextServiceFileSou IServiceProvider container) { IHostingEnvironment hostingEnvironment = container.GetRequiredService(); + + // TODO: (for >= v13) Rethink whether all language files (.xml and .user.xml) should be located in ~/config/lang + // instead of ~/umbraco/config/lang and ~/config/lang. + // Currently when extending Umbraco, a new language file that the backoffice will be available in, should be placed + // in ~/umbraco/config/lang, while 'user' translation files for overrides are in ~/config/lang (according to our docs). + // Such change will be breaking and we would need to document this clearly. var subPath = WebPath.Combine(Constants.SystemDirectories.Umbraco, "config", "lang"); + var mainLangFolder = new DirectoryInfo(hostingEnvironment.MapPathContentRoot(subPath)); return new LocalizedTextServiceFileSources( diff --git a/src/Umbraco.Web.BackOffice/DependencyInjection/UmbracoBuilder.LocalizedText.cs b/src/Umbraco.Web.BackOffice/DependencyInjection/UmbracoBuilder.LocalizedText.cs index 54e25240e0e7..60a946a553d0 100644 --- a/src/Umbraco.Web.BackOffice/DependencyInjection/UmbracoBuilder.LocalizedText.cs +++ b/src/Umbraco.Web.BackOffice/DependencyInjection/UmbracoBuilder.LocalizedText.cs @@ -1,6 +1,8 @@ +using System.IO; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.FileProviders; +using Umbraco.Cms.Core.Configuration.Models; using Umbraco.Cms.Core.DependencyInjection; using Umbraco.Cms.Core.Routing; using Umbraco.Cms.Core.Services; @@ -42,20 +44,30 @@ private static IEnumerable GetSuppl // gets all langs files in /app_plugins real or virtual locations IEnumerable pluginLangFileSources = GetPluginLanguageFileSources(webFileProvider, Cms.Core.Constants.SystemDirectories.AppPlugins, false); - // user defined langs that overwrite the default, these should not be used by plugin creators + // user defined language files that overwrite the default, these should not be used by plugin creators var userConfigLangFolder = Cms.Core.Constants.SystemDirectories.Config .TrimStart(Cms.Core.Constants.CharArrays.Tilde); - IEnumerable userLangFileSources = contentFileProvider.GetDirectoryContents(userConfigLangFolder) - .Where(x => x.IsDirectory && x.Name.InvariantEquals("lang")) - .Select(x => new DirectoryInfo(x.PhysicalPath)) - .SelectMany(x => x.GetFiles("*.user.xml", SearchOption.TopDirectoryOnly)) - .Select(x => new LocalizedTextServiceSupplementaryFileSource(x, true)); + var configLangFileSources = new List(); + + foreach (IFileInfo langFileSource in contentFileProvider.GetDirectoryContents(userConfigLangFolder)) + { + if (langFileSource.IsDirectory && langFileSource.Name.InvariantEquals("lang")) + { + foreach (IFileInfo langFile in contentFileProvider.GetDirectoryContents($"{userConfigLangFolder}/{langFileSource.Name}")) + { + if (langFile.Name.InvariantEndsWith(".xml") && langFile.PhysicalPath is not null) + { + configLangFileSources.Add(new LocalizedTextServiceSupplementaryFileSource(langFile, true)); + } + } + } + } return localPluginFileSources .Concat(pluginLangFileSources) - .Concat(userLangFileSources); + .Concat(configLangFileSources); } @@ -83,13 +95,12 @@ private static IEnumerable GetPlugi foreach (var langFolder in GetLangFolderPaths(fileProvider, pluginFolderPath)) { // request all the files out of the path, these will have physicalPath set. - IEnumerable localizationFiles = fileProvider + IEnumerable localizationFiles = fileProvider .GetDirectoryContents(langFolder) .Where(x => !string.IsNullOrEmpty(x.PhysicalPath)) - .Where(x => x.Name.InvariantEndsWith(".xml")) - .Select(x => new FileInfo(x.PhysicalPath)); + .Where(x => x.Name.InvariantEndsWith(".xml")); - foreach (FileInfo file in localizationFiles) + foreach (IFileInfo file in localizationFiles) { yield return new LocalizedTextServiceSupplementaryFileSource(file, overwriteCoreKeys); } From af468b6f2812b25656a254a0ec5b2031ea956fa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 18 Oct 2022 12:47:08 +0200 Subject: [PATCH 28/33] Resync editors if content model changed (#13230) --- .../src/common/directives/components/content/edit.controller.js | 2 +- .../components/content/umbvariantcontenteditors.directive.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js index ae9f0121cae8..872aad3f53e7 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js @@ -232,6 +232,7 @@ appendRuntimeData(); init(); + startWatches($scope.content); syncTreeNode($scope.content, $scope.content.path, true); @@ -565,7 +566,6 @@ $scope.page.loading = true; loadContent().then(function () { - startWatches($scope.content); $scope.page.loading = false; }); } diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js index 71bf151b89e2..7ed5e4120f13 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js @@ -64,6 +64,8 @@ setActiveVariant(); } else if (changes.segment && !changes.segment.isFirstChange() && changes.segment.currentValue !== changes.segment.previousValue) { setActiveVariant(); + } else if (changes.content) { + setActiveVariant(); } } From 4e9aa8dac22742829c424abe5066b7fdb127510c Mon Sep 17 00:00:00 2001 From: Mole Date: Tue, 18 Oct 2022 12:53:32 +0200 Subject: [PATCH 29/33] Disable BlockGridEditor (#13229) * Disable BlockGridEditor * Fix typeloader test * Update src/Umbraco.Core/Models/Blocks/BlockGridItem.cs Co-authored-by: Kenn Jacobsen * Apply suggestions from code review Co-authored-by: Kenn Jacobsen Co-authored-by: Kenn Jacobsen --- src/Umbraco.Core/Constants-PropertyEditors.cs | 2 ++ .../Models/Blocks/BlockGridArea.cs | 2 ++ .../Models/Blocks/BlockGridItem.cs | 6 +++--- .../Models/Blocks/BlockGridModel.cs | 2 ++ .../Blocks/BlockGridEditorDataConverter.cs | 2 ++ .../Models/Blocks/BlockGridLayoutAreaItem.cs | 4 +++- .../Models/Blocks/BlockGridLayoutItem.cs | 2 ++ .../BlockGridPropertyEditor.cs | 19 ++++++++++++------- .../BlockGridPropertyEditorBase.cs | 6 +++++- .../Extensions/BlockGridTemplateExtensions.cs | 2 ++ .../Umbraco.Core/Composing/TypeLoaderTests.cs | 3 ++- 11 files changed, 37 insertions(+), 13 deletions(-) diff --git a/src/Umbraco.Core/Constants-PropertyEditors.cs b/src/Umbraco.Core/Constants-PropertyEditors.cs index a42f2d198e7e..d86faa6fdd4f 100644 --- a/src/Umbraco.Core/Constants-PropertyEditors.cs +++ b/src/Umbraco.Core/Constants-PropertyEditors.cs @@ -1,3 +1,4 @@ +using System.ComponentModel; using Umbraco.Cms.Core.PropertyEditors; namespace Umbraco.Cms.Core; @@ -43,6 +44,7 @@ public static class Aliases /// /// Block Grid. /// + [EditorBrowsable(EditorBrowsableState.Never)] // TODO: Remove this for V11/V10.4 public const string BlockGrid = "Umbraco.BlockGrid"; /// diff --git a/src/Umbraco.Core/Models/Blocks/BlockGridArea.cs b/src/Umbraco.Core/Models/Blocks/BlockGridArea.cs index 8cc2e5231b67..3a9f86a606cb 100644 --- a/src/Umbraco.Core/Models/Blocks/BlockGridArea.cs +++ b/src/Umbraco.Core/Models/Blocks/BlockGridArea.cs @@ -1,11 +1,13 @@ // Copyright (c) Umbraco. // See LICENSE for more details. +using System.ComponentModel; using System.Runtime.Serialization; namespace Umbraco.Cms.Core.Models.Blocks; [DataContract(Name = "area", Namespace = "")] +[EditorBrowsable(EditorBrowsableState.Never)] // TODO: Remove this for V11/V10.4 public class BlockGridArea : BlockModelCollection { /// diff --git a/src/Umbraco.Core/Models/Blocks/BlockGridItem.cs b/src/Umbraco.Core/Models/Blocks/BlockGridItem.cs index 59021f5e3876..86e0c4087472 100644 --- a/src/Umbraco.Core/Models/Blocks/BlockGridItem.cs +++ b/src/Umbraco.Core/Models/Blocks/BlockGridItem.cs @@ -1,6 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. +using System.ComponentModel; using System.Runtime.Serialization; using Umbraco.Cms.Core.Models.PublishedContent; @@ -9,8 +10,9 @@ namespace Umbraco.Cms.Core.Models.Blocks /// /// Represents a layout item for the Block Grid editor. /// - /// + /// [DataContract(Name = "block", Namespace = "")] + [EditorBrowsable(EditorBrowsableState.Never)] // TODO: Remove this for V11/V10.4 public class BlockGridItem : IBlockReference { /// @@ -116,7 +118,6 @@ public BlockGridItem(Udi contentUdi, IPublishedElement content, Udi settingsUdi, /// Represents a layout item with a generic content type for the Block List editor. /// /// The type of the content. - /// public class BlockGridItem : BlockGridItem where T : IPublishedElement { @@ -149,7 +150,6 @@ public BlockGridItem(Udi contentUdi, T content, Udi settingsUdi, IPublishedEleme /// /// The type of the content. /// The type of the settings. - /// public class BlockGridItem : BlockGridItem where TContent : IPublishedElement where TSettings : IPublishedElement diff --git a/src/Umbraco.Core/Models/Blocks/BlockGridModel.cs b/src/Umbraco.Core/Models/Blocks/BlockGridModel.cs index 5d645a17c9b2..20c41c47449d 100644 --- a/src/Umbraco.Core/Models/Blocks/BlockGridModel.cs +++ b/src/Umbraco.Core/Models/Blocks/BlockGridModel.cs @@ -2,6 +2,7 @@ // See LICENSE for more details. using System.Collections.ObjectModel; +using System.ComponentModel; using System.Runtime.Serialization; namespace Umbraco.Cms.Core.Models.Blocks; @@ -11,6 +12,7 @@ namespace Umbraco.Cms.Core.Models.Blocks; /// /// [DataContract(Name = "blockgrid", Namespace = "")] +[EditorBrowsable(EditorBrowsableState.Never)] // TODO: Remove this for V11/V10.4 public class BlockGridModel : BlockModelCollection { /// diff --git a/src/Umbraco.Infrastructure/Models/Blocks/BlockGridEditorDataConverter.cs b/src/Umbraco.Infrastructure/Models/Blocks/BlockGridEditorDataConverter.cs index b5200c9f244d..016046abff03 100644 --- a/src/Umbraco.Infrastructure/Models/Blocks/BlockGridEditorDataConverter.cs +++ b/src/Umbraco.Infrastructure/Models/Blocks/BlockGridEditorDataConverter.cs @@ -1,6 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. +using System.ComponentModel; using Newtonsoft.Json.Linq; using Umbraco.Cms.Core.Serialization; @@ -9,6 +10,7 @@ namespace Umbraco.Cms.Core.Models.Blocks; /// /// Data converter for the block grid property editor /// +[EditorBrowsable(EditorBrowsableState.Never)] // TODO: Remove this for V11/V10.4 public class BlockGridEditorDataConverter : BlockEditorDataConverter { private readonly IJsonSerializer _jsonSerializer; diff --git a/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutAreaItem.cs b/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutAreaItem.cs index 3a4d1ba135fb..473482f0284f 100644 --- a/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutAreaItem.cs +++ b/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutAreaItem.cs @@ -1,7 +1,9 @@ -using Newtonsoft.Json; +using System.ComponentModel; +using Newtonsoft.Json; namespace Umbraco.Cms.Core.Models.Blocks; +[EditorBrowsable(EditorBrowsableState.Never)] // TODO: Remove this for V11/V10.4 public class BlockGridLayoutAreaItem { [JsonProperty("key", NullValueHandling = NullValueHandling.Ignore)] diff --git a/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutItem.cs b/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutItem.cs index 9014e2789a97..c06942822e21 100644 --- a/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutItem.cs +++ b/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutItem.cs @@ -1,6 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. +using System.ComponentModel; using Newtonsoft.Json; using Umbraco.Cms.Infrastructure.Serialization; @@ -9,6 +10,7 @@ namespace Umbraco.Cms.Core.Models.Blocks; /// /// Used for deserializing the block grid layout /// +[EditorBrowsable(EditorBrowsableState.Never)] // TODO: Remove this for V11/V10.4 public class BlockGridLayoutItem : IBlockLayoutItem { [JsonProperty("contentUdi", Required = Required.Always)] diff --git a/src/Umbraco.Infrastructure/PropertyEditors/BlockGridPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/BlockGridPropertyEditor.cs index 8881ce82a953..0b465499f8ee 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/BlockGridPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/BlockGridPropertyEditor.cs @@ -1,6 +1,8 @@ // Copyright (c) Umbraco. // See LICENSE for more details. +using System.ComponentModel; +using Umbraco.Cms.Core.Composing; using Umbraco.Cms.Core.IO; namespace Umbraco.Cms.Core.PropertyEditors; @@ -8,13 +10,16 @@ namespace Umbraco.Cms.Core.PropertyEditors; /// /// Represents a block list property editor. /// -[DataEditor( - Constants.PropertyEditors.Aliases.BlockGrid, - "Block Grid", - "blockgrid", - ValueType = ValueTypes.Json, - Group = Constants.PropertyEditors.Groups.RichContent, - Icon = "icon-layout")] +// TODO: Re-add this DataEditor attribute to re-enable the BlockGridEditor for V11/V10.4 +// [DataEditor( +// Constants.PropertyEditors.Aliases.BlockGrid, +// "Block Grid", +// "blockgrid", +// ValueType = ValueTypes.Json, +// Group = Constants.PropertyEditors.Groups.RichContent, +// Icon = "icon-layout")] +[HideFromTypeFinder] +[EditorBrowsable(EditorBrowsableState.Never)] public class BlockGridPropertyEditor : BlockGridPropertyEditorBase { private readonly IIOHelper _ioHelper; diff --git a/src/Umbraco.Infrastructure/PropertyEditors/BlockGridPropertyEditorBase.cs b/src/Umbraco.Infrastructure/PropertyEditors/BlockGridPropertyEditorBase.cs index 42a5931a2b60..138c3b7320b7 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/BlockGridPropertyEditorBase.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/BlockGridPropertyEditorBase.cs @@ -1,8 +1,10 @@ // Copyright (c) Umbraco. // See LICENSE for more details. +using System.ComponentModel; using System.ComponentModel.DataAnnotations; using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.Composing; using Umbraco.Cms.Core.IO; using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Models.Blocks; @@ -16,7 +18,9 @@ namespace Umbraco.Cms.Core.PropertyEditors; /// /// Abstract base class for block grid based editors. -/// +// /// +[HideFromTypeFinder] +[EditorBrowsable(EditorBrowsableState.Never)] public abstract class BlockGridPropertyEditorBase : DataEditor { protected BlockGridPropertyEditorBase(IDataValueEditorFactory dataValueEditorFactory) diff --git a/src/Umbraco.Web.Common/Extensions/BlockGridTemplateExtensions.cs b/src/Umbraco.Web.Common/Extensions/BlockGridTemplateExtensions.cs index ee0375da4f1c..ed40a3076648 100644 --- a/src/Umbraco.Web.Common/Extensions/BlockGridTemplateExtensions.cs +++ b/src/Umbraco.Web.Common/Extensions/BlockGridTemplateExtensions.cs @@ -1,6 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. +using System.ComponentModel; using Microsoft.AspNetCore.Html; using Microsoft.AspNetCore.Mvc.Rendering; using Umbraco.Cms.Core.Models.Blocks; @@ -8,6 +9,7 @@ namespace Umbraco.Extensions; +[EditorBrowsable(EditorBrowsableState.Never)] public static class BlockGridTemplateExtensions { public const string DefaultFolder = "blockgrid/"; diff --git a/tests/Umbraco.Tests.UnitTests/Umbraco.Core/Composing/TypeLoaderTests.cs b/tests/Umbraco.Tests.UnitTests/Umbraco.Core/Composing/TypeLoaderTests.cs index af6dbb1f1c07..4d098b5992c1 100644 --- a/tests/Umbraco.Tests.UnitTests/Umbraco.Core/Composing/TypeLoaderTests.cs +++ b/tests/Umbraco.Tests.UnitTests/Umbraco.Core/Composing/TypeLoaderTests.cs @@ -174,7 +174,8 @@ public void Resolves_Types() public void GetDataEditors() { var types = _typeLoader.GetDataEditors(); - Assert.AreEqual(42, types.Count()); + // TODO: Increase this to 42 when BlockGridEditor is re-added + Assert.AreEqual(41, types.Count()); } /// From 629cc631c6b9c02ad216f43d42546762cf3de08f Mon Sep 17 00:00:00 2001 From: Mole Date: Tue, 18 Oct 2022 14:59:08 +0200 Subject: [PATCH 30/33] V10.4: Re-enable block grid editor (#13231) * Revert "Disable BlockGridEditor (#13229)" This reverts commit 4e9aa8dac22742829c424abe5066b7fdb127510c. * Re-do xml comments fix --- src/Umbraco.Core/Constants-PropertyEditors.cs | 2 -- .../Models/Blocks/BlockGridArea.cs | 2 -- .../Models/Blocks/BlockGridItem.cs | 2 -- .../Models/Blocks/BlockGridModel.cs | 2 -- .../Blocks/BlockGridEditorDataConverter.cs | 2 -- .../Models/Blocks/BlockGridLayoutAreaItem.cs | 4 +--- .../Models/Blocks/BlockGridLayoutItem.cs | 2 -- .../BlockGridPropertyEditor.cs | 19 +++++++------------ .../BlockGridPropertyEditorBase.cs | 6 +----- .../Extensions/BlockGridTemplateExtensions.cs | 2 -- .../Umbraco.Core/Composing/TypeLoaderTests.cs | 3 +-- 11 files changed, 10 insertions(+), 36 deletions(-) diff --git a/src/Umbraco.Core/Constants-PropertyEditors.cs b/src/Umbraco.Core/Constants-PropertyEditors.cs index d86faa6fdd4f..a42f2d198e7e 100644 --- a/src/Umbraco.Core/Constants-PropertyEditors.cs +++ b/src/Umbraco.Core/Constants-PropertyEditors.cs @@ -1,4 +1,3 @@ -using System.ComponentModel; using Umbraco.Cms.Core.PropertyEditors; namespace Umbraco.Cms.Core; @@ -44,7 +43,6 @@ public static class Aliases /// /// Block Grid. /// - [EditorBrowsable(EditorBrowsableState.Never)] // TODO: Remove this for V11/V10.4 public const string BlockGrid = "Umbraco.BlockGrid"; /// diff --git a/src/Umbraco.Core/Models/Blocks/BlockGridArea.cs b/src/Umbraco.Core/Models/Blocks/BlockGridArea.cs index 3a9f86a606cb..8cc2e5231b67 100644 --- a/src/Umbraco.Core/Models/Blocks/BlockGridArea.cs +++ b/src/Umbraco.Core/Models/Blocks/BlockGridArea.cs @@ -1,13 +1,11 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using System.ComponentModel; using System.Runtime.Serialization; namespace Umbraco.Cms.Core.Models.Blocks; [DataContract(Name = "area", Namespace = "")] -[EditorBrowsable(EditorBrowsableState.Never)] // TODO: Remove this for V11/V10.4 public class BlockGridArea : BlockModelCollection { /// diff --git a/src/Umbraco.Core/Models/Blocks/BlockGridItem.cs b/src/Umbraco.Core/Models/Blocks/BlockGridItem.cs index 86e0c4087472..097882c5ab39 100644 --- a/src/Umbraco.Core/Models/Blocks/BlockGridItem.cs +++ b/src/Umbraco.Core/Models/Blocks/BlockGridItem.cs @@ -1,7 +1,6 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using System.ComponentModel; using System.Runtime.Serialization; using Umbraco.Cms.Core.Models.PublishedContent; @@ -12,7 +11,6 @@ namespace Umbraco.Cms.Core.Models.Blocks /// /// [DataContract(Name = "block", Namespace = "")] - [EditorBrowsable(EditorBrowsableState.Never)] // TODO: Remove this for V11/V10.4 public class BlockGridItem : IBlockReference { /// diff --git a/src/Umbraco.Core/Models/Blocks/BlockGridModel.cs b/src/Umbraco.Core/Models/Blocks/BlockGridModel.cs index 20c41c47449d..5d645a17c9b2 100644 --- a/src/Umbraco.Core/Models/Blocks/BlockGridModel.cs +++ b/src/Umbraco.Core/Models/Blocks/BlockGridModel.cs @@ -2,7 +2,6 @@ // See LICENSE for more details. using System.Collections.ObjectModel; -using System.ComponentModel; using System.Runtime.Serialization; namespace Umbraco.Cms.Core.Models.Blocks; @@ -12,7 +11,6 @@ namespace Umbraco.Cms.Core.Models.Blocks; /// /// [DataContract(Name = "blockgrid", Namespace = "")] -[EditorBrowsable(EditorBrowsableState.Never)] // TODO: Remove this for V11/V10.4 public class BlockGridModel : BlockModelCollection { /// diff --git a/src/Umbraco.Infrastructure/Models/Blocks/BlockGridEditorDataConverter.cs b/src/Umbraco.Infrastructure/Models/Blocks/BlockGridEditorDataConverter.cs index 016046abff03..b5200c9f244d 100644 --- a/src/Umbraco.Infrastructure/Models/Blocks/BlockGridEditorDataConverter.cs +++ b/src/Umbraco.Infrastructure/Models/Blocks/BlockGridEditorDataConverter.cs @@ -1,7 +1,6 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using System.ComponentModel; using Newtonsoft.Json.Linq; using Umbraco.Cms.Core.Serialization; @@ -10,7 +9,6 @@ namespace Umbraco.Cms.Core.Models.Blocks; /// /// Data converter for the block grid property editor /// -[EditorBrowsable(EditorBrowsableState.Never)] // TODO: Remove this for V11/V10.4 public class BlockGridEditorDataConverter : BlockEditorDataConverter { private readonly IJsonSerializer _jsonSerializer; diff --git a/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutAreaItem.cs b/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutAreaItem.cs index 473482f0284f..3a4d1ba135fb 100644 --- a/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutAreaItem.cs +++ b/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutAreaItem.cs @@ -1,9 +1,7 @@ -using System.ComponentModel; -using Newtonsoft.Json; +using Newtonsoft.Json; namespace Umbraco.Cms.Core.Models.Blocks; -[EditorBrowsable(EditorBrowsableState.Never)] // TODO: Remove this for V11/V10.4 public class BlockGridLayoutAreaItem { [JsonProperty("key", NullValueHandling = NullValueHandling.Ignore)] diff --git a/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutItem.cs b/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutItem.cs index c06942822e21..9014e2789a97 100644 --- a/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutItem.cs +++ b/src/Umbraco.Infrastructure/Models/Blocks/BlockGridLayoutItem.cs @@ -1,7 +1,6 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using System.ComponentModel; using Newtonsoft.Json; using Umbraco.Cms.Infrastructure.Serialization; @@ -10,7 +9,6 @@ namespace Umbraco.Cms.Core.Models.Blocks; /// /// Used for deserializing the block grid layout /// -[EditorBrowsable(EditorBrowsableState.Never)] // TODO: Remove this for V11/V10.4 public class BlockGridLayoutItem : IBlockLayoutItem { [JsonProperty("contentUdi", Required = Required.Always)] diff --git a/src/Umbraco.Infrastructure/PropertyEditors/BlockGridPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/BlockGridPropertyEditor.cs index 0b465499f8ee..8881ce82a953 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/BlockGridPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/BlockGridPropertyEditor.cs @@ -1,8 +1,6 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using System.ComponentModel; -using Umbraco.Cms.Core.Composing; using Umbraco.Cms.Core.IO; namespace Umbraco.Cms.Core.PropertyEditors; @@ -10,16 +8,13 @@ namespace Umbraco.Cms.Core.PropertyEditors; /// /// Represents a block list property editor. /// -// TODO: Re-add this DataEditor attribute to re-enable the BlockGridEditor for V11/V10.4 -// [DataEditor( -// Constants.PropertyEditors.Aliases.BlockGrid, -// "Block Grid", -// "blockgrid", -// ValueType = ValueTypes.Json, -// Group = Constants.PropertyEditors.Groups.RichContent, -// Icon = "icon-layout")] -[HideFromTypeFinder] -[EditorBrowsable(EditorBrowsableState.Never)] +[DataEditor( + Constants.PropertyEditors.Aliases.BlockGrid, + "Block Grid", + "blockgrid", + ValueType = ValueTypes.Json, + Group = Constants.PropertyEditors.Groups.RichContent, + Icon = "icon-layout")] public class BlockGridPropertyEditor : BlockGridPropertyEditorBase { private readonly IIOHelper _ioHelper; diff --git a/src/Umbraco.Infrastructure/PropertyEditors/BlockGridPropertyEditorBase.cs b/src/Umbraco.Infrastructure/PropertyEditors/BlockGridPropertyEditorBase.cs index 138c3b7320b7..42a5931a2b60 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/BlockGridPropertyEditorBase.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/BlockGridPropertyEditorBase.cs @@ -1,10 +1,8 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using System.ComponentModel; using System.ComponentModel.DataAnnotations; using Microsoft.Extensions.Logging; -using Umbraco.Cms.Core.Composing; using Umbraco.Cms.Core.IO; using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Models.Blocks; @@ -18,9 +16,7 @@ namespace Umbraco.Cms.Core.PropertyEditors; /// /// Abstract base class for block grid based editors. -// /// -[HideFromTypeFinder] -[EditorBrowsable(EditorBrowsableState.Never)] +/// public abstract class BlockGridPropertyEditorBase : DataEditor { protected BlockGridPropertyEditorBase(IDataValueEditorFactory dataValueEditorFactory) diff --git a/src/Umbraco.Web.Common/Extensions/BlockGridTemplateExtensions.cs b/src/Umbraco.Web.Common/Extensions/BlockGridTemplateExtensions.cs index ed40a3076648..ee0375da4f1c 100644 --- a/src/Umbraco.Web.Common/Extensions/BlockGridTemplateExtensions.cs +++ b/src/Umbraco.Web.Common/Extensions/BlockGridTemplateExtensions.cs @@ -1,7 +1,6 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using System.ComponentModel; using Microsoft.AspNetCore.Html; using Microsoft.AspNetCore.Mvc.Rendering; using Umbraco.Cms.Core.Models.Blocks; @@ -9,7 +8,6 @@ namespace Umbraco.Extensions; -[EditorBrowsable(EditorBrowsableState.Never)] public static class BlockGridTemplateExtensions { public const string DefaultFolder = "blockgrid/"; diff --git a/tests/Umbraco.Tests.UnitTests/Umbraco.Core/Composing/TypeLoaderTests.cs b/tests/Umbraco.Tests.UnitTests/Umbraco.Core/Composing/TypeLoaderTests.cs index 4d098b5992c1..af6dbb1f1c07 100644 --- a/tests/Umbraco.Tests.UnitTests/Umbraco.Core/Composing/TypeLoaderTests.cs +++ b/tests/Umbraco.Tests.UnitTests/Umbraco.Core/Composing/TypeLoaderTests.cs @@ -174,8 +174,7 @@ public void Resolves_Types() public void GetDataEditors() { var types = _typeLoader.GetDataEditors(); - // TODO: Increase this to 42 when BlockGridEditor is re-added - Assert.AreEqual(41, types.Count()); + Assert.AreEqual(42, types.Count()); } /// From bc3efd65887c0e3331784f65d6380750609106f8 Mon Sep 17 00:00:00 2001 From: Nikolaj Date: Wed, 19 Oct 2022 08:53:52 +0200 Subject: [PATCH 31/33] Fix nullable reference error --- .../Services/LocalizedTextServiceSupplementaryFileSource.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Services/LocalizedTextServiceSupplementaryFileSource.cs b/src/Umbraco.Core/Services/LocalizedTextServiceSupplementaryFileSource.cs index 3ada83dc3c27..4f89eac5ff86 100644 --- a/src/Umbraco.Core/Services/LocalizedTextServiceSupplementaryFileSource.cs +++ b/src/Umbraco.Core/Services/LocalizedTextServiceSupplementaryFileSource.cs @@ -14,7 +14,7 @@ public LocalizedTextServiceSupplementaryFileSource(FileInfo file, bool overwrite public LocalizedTextServiceSupplementaryFileSource(IFileInfo file, bool overwriteCoreKeys) { FileInfo = file ?? throw new ArgumentNullException(nameof(file)); - File = file is PhysicalFileInfo ? new FileInfo(file.PhysicalPath) : null!; + File = file is PhysicalFileInfo && file.PhysicalPath is not null ? new FileInfo(file.PhysicalPath) : null!; OverwriteCoreKeys = overwriteCoreKeys; } From ee8f890c5a3ba9c2309e85db26027f92f268e48c Mon Sep 17 00:00:00 2001 From: Nikolaj Date: Wed, 19 Oct 2022 09:14:11 +0200 Subject: [PATCH 32/33] Fix acceptance test package.json and package-lock.json --- .../package-lock.json | 853 +----------------- .../Umbraco.Tests.AcceptanceTest/package.json | 11 +- 2 files changed, 9 insertions(+), 855 deletions(-) diff --git a/tests/Umbraco.Tests.AcceptanceTest/package-lock.json b/tests/Umbraco.Tests.AcceptanceTest/package-lock.json index d9d26331d67d..6fdc8663c425 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/package-lock.json +++ b/tests/Umbraco.Tests.AcceptanceTest/package-lock.json @@ -1,852 +1,7 @@ { "name": "acceptancetest", - "lockfileVersion": 2, "requires": true, - "packages": { - "": { - "name": "acceptancetest", - "hasInstallScript": true, - "dependencies": { - "@umbraco/json-models-builders": "^1.0.0", - "@umbraco/playwright-testhelpers": "^1.0.3", - "camelize": "^1.0.0", - "dotenv": "^16.0.2", - "faker": "^4.1.0", - "form-data": "^4.0.0", - "node-fetch": "^2.6.7", - "xhr2": "^0.2.1" - }, - "devDependencies": { - "@playwright/test": "^1.19.2", - "del": "^6.0.0", - "ncp": "^2.0.0", - "prompt": "^1.2.0", - "tslib": "^2.4.0", - "typescript": "^4.8.3" - } - }, - "node_modules/@colors/colors": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", - "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", - "dev": true, - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@playwright/test": { - "version": "1.26.0", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.26.0.tgz", - "integrity": "sha512-D24pu1k/gQw3Lhbpc38G5bXlBjGDrH5A52MsrH12wz6ohGDeQ+aZg/JFSEsT/B3G8zlJe/EU4EkJK74hpqsjEg==", - "dev": true, - "dependencies": { - "@types/node": "*", - "playwright-core": "1.26.0" - }, - "bin": { - "playwright": "cli.js" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/@types/node": { - "version": "14.17.33", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.33.tgz", - "integrity": "sha512-noEeJ06zbn3lOh4gqe2v7NMGS33jrulfNqYFDjjEbhpDEHR5VTxgYNQSBqBlJIsBJW3uEYDgD6kvMnrrhGzq8g==", - "dev": true - }, - "node_modules/@umbraco/json-models-builders": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@umbraco/json-models-builders/-/json-models-builders-1.0.0.tgz", - "integrity": "sha512-UuJmA2S0xFuW2IT004K8U5Ek2sK9DJ0VZysPoeqdCN/aqk0Xi+EIBILFgk5xuSSSQDPUrWS7rjgnv6fawkFceg==", - "dependencies": { - "camelize": "^1.0.0", - "faker": "^4.1.0" - } - }, - "node_modules/@umbraco/playwright-testhelpers": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-1.0.3.tgz", - "integrity": "sha512-PmUnIaoKitxAC4JWSiPEOPg74Ypt6DNLjUQEATV0n9yVbw5aFQhql+KrdN4F30gFNr1c6Gw6I5iDXzNmq5/zfg==", - "dependencies": { - "@umbraco/json-models-builders": "^1.0.0", - "camelize": "^1.0.0", - "faker": "^4.1.0", - "form-data": "^4.0.0", - "node-fetch": "^2.6.7", - "xhr2": "^0.2.1" - } - }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/async": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.3.tgz", - "integrity": "sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==", - "dev": true - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/camelize": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz", - "integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=" - }, - "node_modules/clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/colors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha512-pFGrxThWcWQ2MsAz6RtgeWe4NK2kUE1WfsrvvlctdII745EW9I0yflqhe7++M5LEc7bV2c/9/5zc8sFcpL0Drw==", - "dev": true, - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/cycle": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", - "integrity": "sha512-TVF6svNzeQCOpjCqsy0/CSy8VgObG3wXusJ73xW2GbG5rGx7lC8zxDSURicsXI2UsGdi2L0QNRCi745/wUDvsA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/del": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz", - "integrity": "sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==", - "dev": true, - "dependencies": { - "globby": "^11.0.1", - "graceful-fs": "^4.2.4", - "is-glob": "^4.0.1", - "is-path-cwd": "^2.2.0", - "is-path-inside": "^3.0.2", - "p-map": "^4.0.0", - "rimraf": "^3.0.2", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/dotenv": { - "version": "16.0.2", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.2.tgz", - "integrity": "sha512-JvpYKUmzQhYoIFgK2MOnF3bciIZoItIIoryihy0rIA+H4Jy0FmgyKYAHCTN98P5ybGSJcIFbh6QKeJdtZd1qhA==", - "engines": { - "node": ">=12" - } - }, - "node_modules/eyes": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", - "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==", - "dev": true, - "engines": { - "node": "> 0.1.90" - } - }, - "node_modules/faker": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/faker/-/faker-4.1.0.tgz", - "integrity": "sha1-HkW7vsxndLPBlfrSg1EJxtdIzD8=" - }, - "node_modules/fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true - }, - "node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-path-cwd": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", - "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", - "dev": true - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime-db": { - "version": "1.51.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", - "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.34", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", - "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", - "dependencies": { - "mime-db": "1.51.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true - }, - "node_modules/ncp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", - "integrity": "sha512-zIdGUrPRFTUELUvr3Gmc7KZ2Sw/h1PiVM0Af/oHB6zgnV1ikqSfRk+TOufi79aHYCW3NiOXmr1BP5nWbzojLaA==", - "dev": true, - "bin": { - "ncp": "bin/ncp" - } - }, - "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "dev": true, - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/playwright-core": { - "version": "1.26.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.26.0.tgz", - "integrity": "sha512-p8huU8eU4gD3VkJd3DA1nA7R3XA6rFvFL+1RYS96cSljCF2yJE9CWEHTPF4LqX8KN9MoWCrAfVKP5381X3CZqg==", - "dev": true, - "bin": { - "playwright": "cli.js" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/prompt": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/prompt/-/prompt-1.3.0.tgz", - "integrity": "sha512-ZkaRWtaLBZl7KKAKndKYUL8WqNT+cQHKRZnT4RYYms48jQkFw3rrBL+/N5K/KtdEveHkxs982MX2BkDKub2ZMg==", - "dev": true, - "dependencies": { - "@colors/colors": "1.5.0", - "async": "3.2.3", - "read": "1.0.x", - "revalidator": "0.1.x", - "winston": "2.x" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/read": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", - "integrity": "sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ==", - "dev": true, - "dependencies": { - "mute-stream": "~0.0.4" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/revalidator": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/revalidator/-/revalidator-0.1.8.tgz", - "integrity": "sha512-xcBILK2pA9oh4SiinPEZfhP8HfrB/ha+a2fTMyl7Om2WjlDVrOQy99N2MXXlUHqGJz4qEu2duXxHJjDWuK/0xg==", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", - "dev": true - }, - "node_modules/typescript": { - "version": "4.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz", - "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/winston": { - "version": "2.4.6", - "resolved": "https://registry.npmjs.org/winston/-/winston-2.4.6.tgz", - "integrity": "sha512-J5Zu4p0tojLde8mIOyDSsmLmcP8I3Z6wtwpTDHx1+hGcdhxcJaAmG4CFtagkb+NiN1M9Ek4b42pzMWqfc9jm8w==", - "dev": true, - "dependencies": { - "async": "^3.2.3", - "colors": "1.0.x", - "cycle": "1.0.x", - "eyes": "0.1.x", - "isstream": "0.1.x", - "stack-trace": "0.0.x" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/xhr2": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.2.1.tgz", - "integrity": "sha512-sID0rrVCqkVNUn8t6xuv9+6FViXjUVXq8H5rWOH2rz9fDNQEd4g0EA2XlcEdJXRz5BMEn4O1pJFdT+z4YHhoWw==", - "engines": { - "node": ">= 6" - } - } - }, + "lockfileVersion": 1, "dependencies": { "@colors/colors": { "version": "1.5.0", @@ -906,9 +61,9 @@ } }, "@umbraco/playwright-testhelpers": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-1.0.3.tgz", - "integrity": "sha512-PmUnIaoKitxAC4JWSiPEOPg74Ypt6DNLjUQEATV0n9yVbw5aFQhql+KrdN4F30gFNr1c6Gw6I5iDXzNmq5/zfg==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-1.0.10.tgz", + "integrity": "sha512-4NTuMbbNWGcawZIuYnDdPUGN4W2F9iw0EvsyJ2Pr5rYj8Rg1PCu2MXW77r27fGhfr31PYDEL6RSL9zp8SyxfJg==", "requires": { "@umbraco/json-models-builders": "^1.0.0", "camelize": "^1.0.0", diff --git a/tests/Umbraco.Tests.AcceptanceTest/package.json b/tests/Umbraco.Tests.AcceptanceTest/package.json index 7f4fd2a503b5..55da15670c1f 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/package.json +++ b/tests/Umbraco.Tests.AcceptanceTest/package.json @@ -11,21 +11,20 @@ }, "devDependencies": { "@playwright/test": "^1.19.2", + "typescript": "^4.8.3", + "tslib": "^2.4.0", "del": "^6.0.0", "ncp": "^2.0.0", - "prompt": "^1.2.0", - "tslib": "^2.4.0", - "typescript": "^4.8.3", - "wait-on": "^6.0.1" + "prompt": "^1.2.0" }, "dependencies": { "@umbraco/json-models-builders": "^1.0.0", "@umbraco/playwright-testhelpers": "^1.0.10", "camelize": "^1.0.0", - "dotenv": "^16.0.2", "faker": "^4.1.0", "form-data": "^4.0.0", "node-fetch": "^2.6.7", - "xhr2": "^0.2.1" + "xhr2": "^0.2.1", + "dotenv": "^16.0.2" } } From 56c43cf56b3f6d60d8ce699a4397680bf97d86bd Mon Sep 17 00:00:00 2001 From: Nikolaj Date: Wed, 19 Oct 2022 09:31:14 +0200 Subject: [PATCH 33/33] Re-add wait-on --- .../package-lock.json | 98 +++++++++++++++++++ .../Umbraco.Tests.AcceptanceTest/package.json | 3 +- 2 files changed, 100 insertions(+), 1 deletion(-) diff --git a/tests/Umbraco.Tests.AcceptanceTest/package-lock.json b/tests/Umbraco.Tests.AcceptanceTest/package-lock.json index 6fdc8663c425..6b49c07dc6e1 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/package-lock.json +++ b/tests/Umbraco.Tests.AcceptanceTest/package-lock.json @@ -9,6 +9,21 @@ "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", "dev": true }, + "@hapi/hoek": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", + "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", + "dev": true + }, + "@hapi/topo": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", + "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", + "dev": true, + "requires": { + "@hapi/hoek": "^9.0.0" + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -45,6 +60,27 @@ "playwright-core": "1.26.0" } }, + "@sideway/address": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz", + "integrity": "sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==", + "dev": true, + "requires": { + "@hapi/hoek": "^9.0.0" + } + }, + "@sideway/formula": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.0.tgz", + "integrity": "sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg==", + "dev": true + }, + "@sideway/pinpoint": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", + "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", + "dev": true + }, "@types/node": { "version": "14.17.33", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.33.tgz", @@ -100,6 +136,15 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, + "axios": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", + "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", + "dev": true, + "requires": { + "follow-redirects": "^1.14.7" + } + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -239,6 +284,12 @@ "to-regex-range": "^5.0.1" } }, + "follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "dev": true + }, "form-data": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", @@ -365,6 +416,25 @@ "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", "dev": true }, + "joi": { + "version": "17.6.3", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.6.3.tgz", + "integrity": "sha512-YlQsIaS9MHYekzf1Qe11LjTkNzx9qhYluK3172z38RxYoAUf82XMX1p1DG1H4Wtk2ED/vPdSn9OggqtDu+aTow==", + "dev": true, + "requires": { + "@hapi/hoek": "^9.0.0", + "@hapi/topo": "^5.0.0", + "@sideway/address": "^4.1.3", + "@sideway/formula": "^3.0.0", + "@sideway/pinpoint": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, "merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -403,6 +473,12 @@ "brace-expansion": "^1.1.7" } }, + "minimist": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "dev": true + }, "mute-stream": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", @@ -523,6 +599,15 @@ "queue-microtask": "^1.2.2" } }, + "rxjs": { + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", + "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", + "dev": true, + "requires": { + "tslib": "^2.1.0" + } + }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -561,6 +646,19 @@ "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==", "dev": true }, + "wait-on": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-6.0.1.tgz", + "integrity": "sha512-zht+KASY3usTY5u2LgaNqn/Cd8MukxLGjdcZxT2ns5QzDmTFc4XoWBgC+C/na+sMRZTuVygQoMYwdcVjHnYIVw==", + "dev": true, + "requires": { + "axios": "^0.25.0", + "joi": "^17.6.0", + "lodash": "^4.17.21", + "minimist": "^1.2.5", + "rxjs": "^7.5.4" + } + }, "webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", diff --git a/tests/Umbraco.Tests.AcceptanceTest/package.json b/tests/Umbraco.Tests.AcceptanceTest/package.json index 55da15670c1f..86f4839c47d3 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/package.json +++ b/tests/Umbraco.Tests.AcceptanceTest/package.json @@ -15,7 +15,8 @@ "tslib": "^2.4.0", "del": "^6.0.0", "ncp": "^2.0.0", - "prompt": "^1.2.0" + "prompt": "^1.2.0", + "wait-on": "^6.0.1" }, "dependencies": { "@umbraco/json-models-builders": "^1.0.0",