diff --git a/src/Umbraco.Cms.Persistence.EFCore.SqlServer/SqlServerMigrationProvider.cs b/src/Umbraco.Cms.Persistence.EFCore.SqlServer/SqlServerMigrationProvider.cs index bac08556a3..823a9e737f 100644 --- a/src/Umbraco.Cms.Persistence.EFCore.SqlServer/SqlServerMigrationProvider.cs +++ b/src/Umbraco.Cms.Persistence.EFCore.SqlServer/SqlServerMigrationProvider.cs @@ -1,4 +1,5 @@ using Microsoft.EntityFrameworkCore; +using Umbraco.Cms.Core; using Umbraco.Cms.Persistence.EFCore.Migrations; using Umbraco.Extensions; @@ -10,7 +11,7 @@ public class SqlServerMigrationProvider : IMigrationProvider public SqlServerMigrationProvider(IDbContextFactory dbContextFactory) => _dbContextFactory = dbContextFactory; - public string ProviderName => "Microsoft.Data.SqlClient"; + public string ProviderName => Constants.ProviderNames.SQLServer; public async Task MigrateAsync(EFCoreMigration migration) { diff --git a/src/Umbraco.Cms.Persistence.EFCore.SqlServer/SqlServerMigrationProviderSetup.cs b/src/Umbraco.Cms.Persistence.EFCore.SqlServer/SqlServerMigrationProviderSetup.cs index 6b161fc47f..2d561e9f5a 100644 --- a/src/Umbraco.Cms.Persistence.EFCore.SqlServer/SqlServerMigrationProviderSetup.cs +++ b/src/Umbraco.Cms.Persistence.EFCore.SqlServer/SqlServerMigrationProviderSetup.cs @@ -1,11 +1,12 @@ using Microsoft.EntityFrameworkCore; +using Umbraco.Cms.Core; using Umbraco.Cms.Persistence.EFCore.Migrations; namespace Umbraco.Cms.Persistence.EFCore.SqlServer; public class SqlServerMigrationProviderSetup : IMigrationProviderSetup { - public string ProviderName => "Microsoft.Data.SqlClient"; + public string ProviderName => Constants.ProviderNames.SQLServer; public void Setup(DbContextOptionsBuilder builder, string? connectionString) { diff --git a/src/Umbraco.Cms.Persistence.EFCore.Sqlite/SqliteMigrationProvider.cs b/src/Umbraco.Cms.Persistence.EFCore.Sqlite/SqliteMigrationProvider.cs index 05d4024bb3..468f52021f 100644 --- a/src/Umbraco.Cms.Persistence.EFCore.Sqlite/SqliteMigrationProvider.cs +++ b/src/Umbraco.Cms.Persistence.EFCore.Sqlite/SqliteMigrationProvider.cs @@ -1,4 +1,5 @@ using Microsoft.EntityFrameworkCore; +using Umbraco.Cms.Core; using Umbraco.Cms.Persistence.EFCore.Migrations; using Umbraco.Extensions; @@ -11,7 +12,7 @@ public class SqliteMigrationProvider : IMigrationProvider public SqliteMigrationProvider(IDbContextFactory dbContextFactory) => _dbContextFactory = dbContextFactory; - public string ProviderName => "Microsoft.Data.Sqlite"; + public string ProviderName => Constants.ProviderNames.SQLLite; public async Task MigrateAsync(EFCoreMigration migration) { diff --git a/src/Umbraco.Cms.Persistence.EFCore.Sqlite/SqliteMigrationProviderSetup.cs b/src/Umbraco.Cms.Persistence.EFCore.Sqlite/SqliteMigrationProviderSetup.cs index 4cba457768..3a1b97e76c 100644 --- a/src/Umbraco.Cms.Persistence.EFCore.Sqlite/SqliteMigrationProviderSetup.cs +++ b/src/Umbraco.Cms.Persistence.EFCore.Sqlite/SqliteMigrationProviderSetup.cs @@ -1,11 +1,12 @@ using Microsoft.EntityFrameworkCore; +using Umbraco.Cms.Core; using Umbraco.Cms.Persistence.EFCore.Migrations; namespace Umbraco.Cms.Persistence.EFCore.Sqlite; public class SqliteMigrationProviderSetup : IMigrationProviderSetup { - public string ProviderName => "Microsoft.Data.Sqlite"; + public string ProviderName => Constants.ProviderNames.SQLLite; public void Setup(DbContextOptionsBuilder builder, string? connectionString) { diff --git a/src/Umbraco.Cms.Persistence.EFCore/Composition/UmbracoEFCoreComposer.cs b/src/Umbraco.Cms.Persistence.EFCore/Composition/UmbracoEFCoreComposer.cs index 8b8627df47..1b751c558b 100644 --- a/src/Umbraco.Cms.Persistence.EFCore/Composition/UmbracoEFCoreComposer.cs +++ b/src/Umbraco.Cms.Persistence.EFCore/Composition/UmbracoEFCoreComposer.cs @@ -20,7 +20,7 @@ public class UmbracoEFCoreComposer : IComposer builder.AddNotificationAsyncHandler(); builder.AddNotificationAsyncHandler(); - builder.Services.AddUmbracoEFCoreContext((options, connectionString, providerName) => + builder.Services.AddUmbracoDbContext((options) => { // Register the entity sets needed by OpenIddict. options.UseOpenIddict(); diff --git a/src/Umbraco.Cms.Persistence.EFCore/Extensions/UmbracoEFCoreServiceCollectionExtensions.cs b/src/Umbraco.Cms.Persistence.EFCore/Extensions/UmbracoEFCoreServiceCollectionExtensions.cs index ded5be40fd..d901088064 100644 --- a/src/Umbraco.Cms.Persistence.EFCore/Extensions/UmbracoEFCoreServiceCollectionExtensions.cs +++ b/src/Umbraco.Cms.Persistence.EFCore/Extensions/UmbracoEFCoreServiceCollectionExtensions.cs @@ -1,7 +1,9 @@ +using System; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.Options; +using Serilog; using Umbraco.Cms.Core; using Umbraco.Cms.Core.Configuration.Models; using Umbraco.Cms.Core.DistributedLocking; @@ -16,6 +18,7 @@ public static class UmbracoEFCoreServiceCollectionExtensions { public delegate void DefaultEFCoreOptionsAction(DbContextOptionsBuilder options, string? providerName, string? connectionString); + [Obsolete("Use AddUmbracoDbContext(this IServiceCollection services, Action? optionsAction = null) instead.")] public static IServiceCollection AddUmbracoEFCoreContext(this IServiceCollection services, DefaultEFCoreOptionsAction? defaultEFCoreOptionsAction = null) where T : DbContext { @@ -24,7 +27,7 @@ public static class UmbracoEFCoreServiceCollectionExtensions sp => { SetupDbContext(defaultEFCoreOptionsAction, sp, optionsBuilder); - return new UmbracoPooledDbContextFactory(sp.GetRequiredService(),optionsBuilder.Options); + return new UmbracoPooledDbContextFactory(sp.GetRequiredService(), optionsBuilder.Options); }); services.AddPooledDbContextFactory((provider, builder) => SetupDbContext(defaultEFCoreOptionsAction, provider, builder)); services.AddTransient(services => services.GetRequiredService>().CreateDbContext()); @@ -38,6 +41,7 @@ public static class UmbracoEFCoreServiceCollectionExtensions return services; } + [Obsolete("Use AddUmbracoDbContext(this IServiceCollection services, Action? optionsAction = null) instead.")] public static IServiceCollection AddUmbracoEFCoreContext(this IServiceCollection services, string connectionString, string providerName, DefaultEFCoreOptionsAction? defaultEFCoreOptionsAction = null) where T : DbContext { @@ -52,8 +56,8 @@ public static class UmbracoEFCoreServiceCollectionExtensions services.TryAddSingleton>( sp => { - SetupDbContext(defaultEFCoreOptionsAction, sp, optionsBuilder); - return new UmbracoPooledDbContextFactory(sp.GetRequiredService(),optionsBuilder.Options); + defaultEFCoreOptionsAction?.Invoke(optionsBuilder, providerName, connectionString); + return new UmbracoPooledDbContextFactory(sp.GetRequiredService(), optionsBuilder.Options); }); services.AddPooledDbContextFactory(options => defaultEFCoreOptionsAction?.Invoke(options, providerName, connectionString)); services.AddTransient(services => services.GetRequiredService>().CreateDbContext()); @@ -67,12 +71,117 @@ public static class UmbracoEFCoreServiceCollectionExtensions return services; } + /// + /// Adds a EFCore DbContext with all the services needed to integrate with Umbraco scopes. + /// + /// + /// + /// + /// + public static IServiceCollection AddUmbracoDbContext(this IServiceCollection services, Action? optionsAction = null) + where T : DbContext + { + return AddUmbracoDbContext(services, (IServiceProvider _, DbContextOptionsBuilder options) => + { + optionsAction?.Invoke(options); + }); + } + + /// + /// Adds a EFCore DbContext with all the services needed to integrate with Umbraco scopes. + /// + /// + /// + /// + /// + public static IServiceCollection AddUmbracoDbContext(this IServiceCollection services, Action? optionsAction = null) + where T : DbContext + { + optionsAction ??= (sp, options) => { }; + + var optionsBuilder = new DbContextOptionsBuilder(); + + services.TryAddSingleton>(sp => + { + optionsAction.Invoke(sp, optionsBuilder); + return new UmbracoPooledDbContextFactory(sp.GetRequiredService(), optionsBuilder.Options); + }); + services.AddPooledDbContextFactory(optionsAction); + services.AddTransient(services => services.GetRequiredService>().CreateDbContext()); + + services.AddUnique, AmbientEFCoreScopeStack>(); + services.AddUnique, EFCoreScopeAccessor>(); + services.AddUnique, EFCoreScopeProvider>(); + services.AddSingleton>(); + services.AddSingleton>(); + + return services; + } + + /// + /// Sets the database provider. I.E UseSqlite or UseSqlServer based on the provider name. + /// + /// + /// + /// + /// + /// + /// Only supports the databases normally supported in Umbraco. + /// + public static void UseDatabaseProvider(this DbContextOptionsBuilder builder, string providerName, string connectionString) + { + switch (providerName) + { + case Constants.ProviderNames.SQLServer: + builder.UseSqlServer(connectionString); + break; + case Constants.ProviderNames.SQLLite: + builder.UseSqlite(connectionString); + break; + default: + throw new InvalidDataException($"The provider {providerName} is not supported. Manually add the add the UseXXX statement to the options. I.E UseNpgsql()"); + } + } + + /// + /// Sets the database provider to use based on the Umbraco connection string. + /// + /// + /// + public static void UseUmbracoDatabaseProvider(this DbContextOptionsBuilder builder, IServiceProvider serviceProvider) + { + ConnectionStrings connectionStrings = serviceProvider.GetRequiredService>().CurrentValue; + + // Replace data directory + string? dataDirectory = AppDomain.CurrentDomain.GetData(Constants.System.DataDirectoryName)?.ToString(); + if (string.IsNullOrEmpty(dataDirectory) is false) + { + connectionStrings.ConnectionString = connectionStrings.ConnectionString?.Replace(Constants.System.DataDirectoryPlaceholder, dataDirectory); + } + + if (string.IsNullOrEmpty(connectionStrings.ProviderName)) + { + Log.Warning("No database provider was set. ProviderName is null"); + return; + } + + if (string.IsNullOrEmpty(connectionStrings.ConnectionString)) + { + Log.Warning("No database provider was set. Connection string is null"); + return; + } + + builder.UseDatabaseProvider(connectionStrings.ProviderName, connectionStrings.ConnectionString); + } + + [Obsolete] private static void SetupDbContext(DefaultEFCoreOptionsAction? defaultEFCoreOptionsAction, IServiceProvider provider, DbContextOptionsBuilder builder) { ConnectionStrings connectionStrings = GetConnectionStringAndProviderName(provider); defaultEFCoreOptionsAction?.Invoke(builder, connectionStrings.ConnectionString, connectionStrings.ProviderName); } + [Obsolete] private static ConnectionStrings GetConnectionStringAndProviderName(IServiceProvider serviceProvider) { ConnectionStrings connectionStrings = serviceProvider.GetRequiredService>().CurrentValue; diff --git a/src/Umbraco.Cms.Persistence.EFCore/UmbracoDbContext.cs b/src/Umbraco.Cms.Persistence.EFCore/UmbracoDbContext.cs index 042cf2a52f..60e519de4c 100644 --- a/src/Umbraco.Cms.Persistence.EFCore/UmbracoDbContext.cs +++ b/src/Umbraco.Cms.Persistence.EFCore/UmbracoDbContext.cs @@ -3,7 +3,6 @@ using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Cms.Core; using Umbraco.Cms.Core.Configuration.Models; using Umbraco.Cms.Core.DependencyInjection; using Umbraco.Cms.Persistence.EFCore.Migrations; @@ -77,7 +76,7 @@ public class UmbracoDbContext : DbContext foreach (IMutableEntityType entity in modelBuilder.Model.GetEntityTypes()) { - entity.SetTableName(Constants.DatabaseSchema.TableNamePrefix + entity.GetTableName()); + entity.SetTableName(Core.Constants.DatabaseSchema.TableNamePrefix + entity.GetTableName()); } } } diff --git a/src/Umbraco.Core/Constants-ProviderNames.cs b/src/Umbraco.Core/Constants-ProviderNames.cs new file mode 100644 index 0000000000..67f376612c --- /dev/null +++ b/src/Umbraco.Core/Constants-ProviderNames.cs @@ -0,0 +1,11 @@ +namespace Umbraco.Cms.Core; + +public static partial class Constants +{ + public static class ProviderNames + { + public const string SQLLite = "Microsoft.Data.Sqlite"; + + public const string SQLServer = "Microsoft.Data.SqlClient"; + } +} diff --git a/src/Umbraco.Core/PublishedCache/IPublishedSnapshotService.cs b/src/Umbraco.Core/PublishedCache/IPublishedSnapshotService.cs index 5bd5ff23cc..8e661aa758 100644 --- a/src/Umbraco.Core/PublishedCache/IPublishedSnapshotService.cs +++ b/src/Umbraco.Core/PublishedCache/IPublishedSnapshotService.cs @@ -125,4 +125,8 @@ public interface IPublishedSnapshotService : IDisposable /// Cleans up unused snapshots /// Task CollectAsync(); + + void ResetLocalDb() + { + } } diff --git a/src/Umbraco.Core/Security/ContentPermissions.cs b/src/Umbraco.Core/Security/ContentPermissions.cs index d43e527a62..6c70326699 100644 --- a/src/Umbraco.Core/Security/ContentPermissions.cs +++ b/src/Umbraco.Core/Security/ContentPermissions.cs @@ -165,12 +165,7 @@ public class ContentPermissions throw new ArgumentNullException(nameof(user)); } - if (permissionsToCheck == null) - { - permissionsToCheck = Array.Empty(); - } - - bool? hasPathAccess = null; + bool hasPathAccess; entity = null; if (nodeId == Constants.System.Root) @@ -181,19 +176,17 @@ public class ContentPermissions { hasPathAccess = user.HasContentBinAccess(_entityService, _appCaches); } - - if (hasPathAccess.HasValue) + else { - return hasPathAccess.Value ? ContentAccess.Granted : ContentAccess.Denied; - } + entity = _entityService.Get(nodeId, UmbracoObjectTypes.Document); - entity = _entityService.Get(nodeId, UmbracoObjectTypes.Document); - if (entity == null) - { - return ContentAccess.NotFound; - } + if (entity == null) + { + return ContentAccess.NotFound; + } - hasPathAccess = user.HasContentPathAccess(entity, _entityService, _appCaches); + hasPathAccess = user.HasContentPathAccess(entity, _entityService, _appCaches); + } if (hasPathAccess == false) { @@ -206,7 +199,8 @@ public class ContentPermissions } // get the implicit/inherited permissions for the user for this path - return CheckPermissionsPath(entity.Path, user, permissionsToCheck) + // if there is no entity for this id, than just use the id as the path (i.e. -1 or -20) + return CheckPermissionsPath(entity?.Path ?? nodeId.ToString(), user, permissionsToCheck) ? ContentAccess.Granted : ContentAccess.Denied; } @@ -230,12 +224,7 @@ public class ContentPermissions throw new ArgumentNullException(nameof(user)); } - if (permissionsToCheck == null) - { - permissionsToCheck = Array.Empty(); - } - - bool? hasPathAccess = null; + bool hasPathAccess; contentItem = null; if (nodeId == Constants.System.Root) @@ -246,19 +235,17 @@ public class ContentPermissions { hasPathAccess = user.HasContentBinAccess(_entityService, _appCaches); } - - if (hasPathAccess.HasValue) + else { - return hasPathAccess.Value ? ContentAccess.Granted : ContentAccess.Denied; - } + contentItem = _contentService.GetById(nodeId); - contentItem = _contentService.GetById(nodeId); - if (contentItem == null) - { - return ContentAccess.NotFound; - } + if (contentItem == null) + { + return ContentAccess.NotFound; + } - hasPathAccess = user.HasPathAccess(contentItem, _entityService, _appCaches); + hasPathAccess = user.HasPathAccess(contentItem, _entityService, _appCaches); + } if (hasPathAccess == false) { @@ -271,7 +258,8 @@ public class ContentPermissions } // get the implicit/inherited permissions for the user for this path - return CheckPermissionsPath(contentItem.Path, user, permissionsToCheck) + // if there is no content item for this id, than just use the id as the path (i.e. -1 or -20) + return CheckPermissionsPath(contentItem?.Path ?? nodeId.ToString(), user, permissionsToCheck) ? ContentAccess.Granted : ContentAccess.Denied; } @@ -283,8 +271,7 @@ public class ContentPermissions permissionsToCheck = Array.Empty(); } - // get the implicit/inherited permissions for the user for this path, - // if there is no content item for this id, than just use the id as the path (i.e. -1 or -20) + // get the implicit/inherited permissions for the user for this path EntityPermissionSet permission = _userService.GetPermissionsForPath(user, path); var allowed = true; diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_12_0_0/ResetCache.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_12_0_0/ResetCache.cs index b55b4c4ca7..0e41ad89ca 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_12_0_0/ResetCache.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_12_0_0/ResetCache.cs @@ -1,22 +1,34 @@ -using IHostingEnvironment = Umbraco.Cms.Core.Hosting.IHostingEnvironment; +using Microsoft.Extensions.DependencyInjection; +using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Cms.Core.PublishedCache; +using IHostingEnvironment = Umbraco.Cms.Core.Hosting.IHostingEnvironment; namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_12_0_0; public class ResetCache : MigrationBase { private readonly IHostingEnvironment _hostingEnvironment; + private readonly IPublishedSnapshotService _publishedSnapshotService; + [Obsolete("Use ctor with all params - This will be removed in Umbraco 14.")] public ResetCache(IMigrationContext context, IHostingEnvironment hostingEnvironment) - : base(context) => + : this(context, hostingEnvironment, StaticServiceProvider.Instance.GetRequiredService()) + { + } + + public ResetCache(IMigrationContext context, IHostingEnvironment hostingEnvironment, IPublishedSnapshotService publishedSnapshotService) + : base(context) + { _hostingEnvironment = hostingEnvironment; + _publishedSnapshotService = publishedSnapshotService; + } protected override void Migrate() { RebuildCache = true; var distCacheFolderAbsolutePath = Path.Combine(_hostingEnvironment.LocalTempPath, "DistCache"); - var nuCacheFolderAbsolutePath = Path.Combine(_hostingEnvironment.LocalTempPath, "NuCache"); DeleteAllFilesInFolder(distCacheFolderAbsolutePath); - DeleteAllFilesInFolder(nuCacheFolderAbsolutePath); + _publishedSnapshotService.ResetLocalDb(); } private void DeleteAllFilesInFolder(string path) diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/AccessDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/AccessDto.cs index 354083dfa8..0821232826 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/AccessDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/AccessDto.cs @@ -37,5 +37,5 @@ internal class AccessDto [ResultColumn] [Reference(ReferenceType.Many, ReferenceMemberName = "AccessId")] - public List Rules { get; set; } = null!; + public List Rules { get; set; } = new(); } diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs index 3e92a4ae7f..59aa92bb82 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs @@ -1385,10 +1385,15 @@ AND umbracoNode.id <> @id", } // Now bulk update the umbracoDocument table - foreach (IGrouping> editValue in editedDocument.GroupBy(x => x.Value)) + // we need to do this in batches as the WhereIn Npoco method translates to all the nodeIds being passed in as parameters when using the SqlClient provider + // this results in to many parameters (>2100) being passed to the client when there are a lot of documents being normalized + foreach (IGrouping> groupByValue in editedDocument.GroupBy(x => x.Value)) { - Database.Execute(Sql().Update(u => u.Set(x => x.Edited, editValue.Key)) - .WhereIn(x => x.NodeId, editValue.Select(x => x.Key))); + foreach (IEnumerable> batch in groupByValue.InGroupsOf(2000)) + { + Database.Execute(Sql().Update(u => u.Set(x => x.Edited, groupByValue.Key)) + .WhereIn(x => x.NodeId, batch.Select(x => x.Key))); + } } } diff --git a/src/Umbraco.PublishedCache.NuCache/PublishedSnapshotService.cs b/src/Umbraco.PublishedCache.NuCache/PublishedSnapshotService.cs index 68b50cfd91..a7f8c42823 100644 --- a/src/Umbraco.PublishedCache.NuCache/PublishedSnapshotService.cs +++ b/src/Umbraco.PublishedCache.NuCache/PublishedSnapshotService.cs @@ -70,6 +70,8 @@ internal class PublishedSnapshotService : IPublishedSnapshotService private long _mediaGen; private ContentStore _mediaStore = null!; + private string LocalFilePath => Path.Combine(_hostingEnvironment.LocalTempPath, "NuCache"); + public PublishedSnapshotService( PublishedSnapshotServiceOptions options, ISyncBootStateAccessor syncBootStateAccessor, @@ -475,6 +477,22 @@ internal class PublishedSnapshotService : IPublishedSnapshotService return GetUid(_mediaStore, id); } + + public void ResetLocalDb() + { + _logger.LogInformation( + "Resetting NuCache local db"); + var path = LocalFilePath; + if (Directory.Exists(path) is false) + { + return; + } + + MainDomRelease(); + Directory.Delete(path, true); + MainDomRegister(); + } + /// /// Lazily populates the stores only when they are first requested /// @@ -603,7 +621,7 @@ internal class PublishedSnapshotService : IPublishedSnapshotService /// private void MainDomRegister() { - var path = GetLocalFilesPath(); + var path = GetAndEnsureLocalFilesPathExists(); var localContentDbPath = Path.Combine(path, "NuCache.Content.db"); var localMediaDbPath = Path.Combine(path, "NuCache.Media.db"); @@ -652,9 +670,9 @@ internal class PublishedSnapshotService : IPublishedSnapshotService } } - private string GetLocalFilesPath() + private string GetAndEnsureLocalFilesPathExists() { - var path = Path.Combine(_hostingEnvironment.LocalTempPath, "NuCache"); + var path = LocalFilePath; if (!Directory.Exists(path)) { diff --git a/src/Umbraco.Web.BackOffice/Controllers/ContentController.cs b/src/Umbraco.Web.BackOffice/Controllers/ContentController.cs index d8c306bff4..83063f156f 100644 --- a/src/Umbraco.Web.BackOffice/Controllers/ContentController.cs +++ b/src/Umbraco.Web.BackOffice/Controllers/ContentController.cs @@ -819,6 +819,7 @@ public class ContentController : ContentControllerBase return pagedResult; } + /// /// Creates a blueprint from a content item /// @@ -1117,7 +1118,7 @@ public class ContentController : ContentControllerBase AddDomainWarnings(publishStatus.Content, successfulCultures, globalNotifications); AddPublishStatusNotifications(new[] { publishStatus }, globalNotifications, notifications, successfulCultures); } - break; + break; case ContentSaveAction.PublishWithDescendants: case ContentSaveAction.PublishWithDescendantsNew: { @@ -1134,7 +1135,7 @@ public class ContentController : ContentControllerBase AddDomainWarnings(publishStatus, successfulCultures, globalNotifications); AddPublishStatusNotifications(publishStatus, globalNotifications, notifications, successfulCultures); } - break; + break; case ContentSaveAction.PublishWithDescendantsForce: case ContentSaveAction.PublishWithDescendantsForceNew: { @@ -1150,7 +1151,7 @@ public class ContentController : ContentControllerBase var publishStatus = PublishBranchInternal(contentItem, true, cultureForInvariantErrors, out wasCancelled, out var successfulCultures).ToList(); AddPublishStatusNotifications(publishStatus, globalNotifications, notifications, successfulCultures); } - break; + break; default: throw new ArgumentOutOfRangeException(); } @@ -2804,7 +2805,7 @@ public class ContentController : ContentControllerBase } } } - break; + break; case PublishResultType.SuccessPublish: { // TODO: Here we should have messaging for when there are release dates specified like https://github.com/umbraco/Umbraco-CMS/pull/3507 @@ -2832,7 +2833,7 @@ public class ContentController : ContentControllerBase } } } - break; + break; case PublishResultType.FailedPublishPathNotPublished: { //TODO: This doesn't take into account variations with the successfulCultures param @@ -2841,14 +2842,14 @@ public class ContentController : ContentControllerBase _localizedTextService.Localize(null, "publish"), _localizedTextService.Localize("publish", "contentPublishedFailedByParent", new[] { names }).Trim()); } - break; + break; case PublishResultType.FailedPublishCancelledByEvent: { //TODO: This doesn't take into account variations with the successfulCultures param var names = string.Join(", ", status.Select(x => $"'{x.Content?.Name}'")); AddCancelMessage(display, "publish", "contentPublishedFailedByEvent", new[] { names }); } - break; + break; case PublishResultType.FailedPublishAwaitingRelease: { //TODO: This doesn't take into account variations with the successfulCultures param @@ -2857,7 +2858,7 @@ public class ContentController : ContentControllerBase _localizedTextService.Localize(null, "publish"), _localizedTextService.Localize("publish", "contentPublishedFailedAwaitingRelease", new[] { names }).Trim()); } - break; + break; case PublishResultType.FailedPublishHasExpired: { //TODO: This doesn't take into account variations with the successfulCultures param @@ -2866,7 +2867,7 @@ public class ContentController : ContentControllerBase _localizedTextService.Localize(null, "publish"), _localizedTextService.Localize("publish", "contentPublishedFailedExpired", new[] { names }).Trim()); } - break; + break; case PublishResultType.FailedPublishIsTrashed: { //TODO: This doesn't take into account variations with the successfulCultures param @@ -2875,7 +2876,7 @@ public class ContentController : ContentControllerBase _localizedTextService.Localize(null, "publish"), _localizedTextService.Localize("publish", "contentPublishedFailedIsTrashed", new[] { names }).Trim()); } - break; + break; case PublishResultType.FailedPublishContentInvalid: { if (successfulCultures == null) @@ -2899,7 +2900,7 @@ public class ContentController : ContentControllerBase } } } - break; + break; case PublishResultType.FailedPublishMandatoryCultureMissing: display.AddWarningNotification( _localizedTextService.Localize(null, "publish"), diff --git a/src/Umbraco.Web.BackOffice/Controllers/ContentControllerBase.cs b/src/Umbraco.Web.BackOffice/Controllers/ContentControllerBase.cs index e97d7dd055..d70d262d39 100644 --- a/src/Umbraco.Web.BackOffice/Controllers/ContentControllerBase.cs +++ b/src/Umbraco.Web.BackOffice/Controllers/ContentControllerBase.cs @@ -78,7 +78,6 @@ public abstract class ContentControllerBase : BackOfficeNotificationsController ModelState.AddModelError("id", $"content with id: {id} was not found"); NotFoundObjectResult errorResponse = NotFound(ModelState); - return errorResponse; } diff --git a/src/Umbraco.Web.BackOffice/Filters/ContentSaveValidationAttribute.cs b/src/Umbraco.Web.BackOffice/Filters/ContentSaveValidationAttribute.cs index 003b6676fe..100d089451 100644 --- a/src/Umbraco.Web.BackOffice/Filters/ContentSaveValidationAttribute.cs +++ b/src/Umbraco.Web.BackOffice/Filters/ContentSaveValidationAttribute.cs @@ -188,7 +188,7 @@ internal sealed class ContentSaveValidationAttribute : TypeFilterAttribute break; case ContentSaveAction.Schedule: permissionToCheck.Add(ActionUpdate.ActionLetter); - permissionToCheck.Add(ActionToPublish.ActionLetter); + permissionToCheck.Add(ActionPublish.ActionLetter); contentToCheck = contentItem.PersistedContent; contentIdToCheck = contentToCheck?.Id ?? default; break; @@ -277,6 +277,7 @@ internal sealed class ContentSaveValidationAttribute : TypeFilterAttribute if (!authorizationResult.Succeeded) { + actionContext.Result = new ForbidResult(); return false; } diff --git a/src/Umbraco.Web.UI.Client/package-lock.json b/src/Umbraco.Web.UI.Client/package-lock.json index ddcc167622..af945e479c 100644 --- a/src/Umbraco.Web.UI.Client/package-lock.json +++ b/src/Umbraco.Web.UI.Client/package-lock.json @@ -7,6 +7,8 @@ "name": "ui", "dependencies": { "@microsoft/signalr": "7.0.12", + "@umbraco-ui/uui": "1.5.0", + "@umbraco-ui/uui-css": "1.5.0", "ace-builds": "1.31.0", "angular": "1.8.3", "angular-animate": "1.8.3", @@ -2077,6 +2079,19 @@ "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", "dev": true }, + "node_modules/@lit-labs/ssr-dom-shim": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.1.2.tgz", + "integrity": "sha512-jnOD+/+dSrfTWYfSXBXlo5l5f0q1UuJo3tkbMDCYA2lKUYq79jaxqtGEvnRoh049nt1vdo1+45RinipU6FGY2g==" + }, + "node_modules/@lit/reactive-element": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.6.3.tgz", + "integrity": "sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ==", + "dependencies": { + "@lit-labs/ssr-dom-shim": "^1.0.0" + } + }, "node_modules/@microsoft/signalr": { "version": "7.0.12", "resolved": "https://registry.npmjs.org/@microsoft/signalr/-/signalr-7.0.12.tgz", @@ -2229,6 +2244,841 @@ "dev": true, "optional": true }, + "node_modules/@types/trusted-types": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.5.tgz", + "integrity": "sha512-I3pkr8j/6tmQtKV/ZzHtuaqYSQvyjGRKH4go60Rr0IDLlFxuRT5V32uvB1mecM5G1EVAUyF/4r4QZ1GHgz+mxA==" + }, + "node_modules/@umbraco-ui/uui": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui/-/uui-1.5.0.tgz", + "integrity": "sha512-V9pAdCsiaBy+Vq23sZd9JJCk+TX6xMsclJtTUWhwCq8/YUh6KNERbdoVfMYGUZ1yyJ/g+yddQsWlYOxHNp8msw==", + "dependencies": { + "@umbraco-ui/uui-action-bar": "1.5.0", + "@umbraco-ui/uui-avatar": "1.5.0", + "@umbraco-ui/uui-avatar-group": "1.5.0", + "@umbraco-ui/uui-badge": "1.5.0", + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-boolean-input": "1.5.0", + "@umbraco-ui/uui-box": "1.5.0", + "@umbraco-ui/uui-breadcrumbs": "1.5.0", + "@umbraco-ui/uui-button": "1.5.0", + "@umbraco-ui/uui-button-group": "1.5.0", + "@umbraco-ui/uui-button-inline-create": "1.5.0", + "@umbraco-ui/uui-card": "1.5.0", + "@umbraco-ui/uui-card-content-node": "1.5.0", + "@umbraco-ui/uui-card-media": "1.5.0", + "@umbraco-ui/uui-card-user": "1.5.0", + "@umbraco-ui/uui-caret": "1.5.0", + "@umbraco-ui/uui-checkbox": "1.5.0", + "@umbraco-ui/uui-color-area": "1.5.0", + "@umbraco-ui/uui-color-picker": "1.5.0", + "@umbraco-ui/uui-color-slider": "1.5.0", + "@umbraco-ui/uui-color-swatch": "1.5.0", + "@umbraco-ui/uui-color-swatches": "1.5.0", + "@umbraco-ui/uui-combobox": "1.5.0", + "@umbraco-ui/uui-combobox-list": "1.5.0", + "@umbraco-ui/uui-css": "1.5.0", + "@umbraco-ui/uui-dialog": "1.5.0", + "@umbraco-ui/uui-dialog-layout": "1.5.0", + "@umbraco-ui/uui-file-dropzone": "1.5.0", + "@umbraco-ui/uui-file-preview": "1.5.0", + "@umbraco-ui/uui-form": "1.5.0", + "@umbraco-ui/uui-form-layout-item": "1.5.0", + "@umbraco-ui/uui-form-validation-message": "1.5.0", + "@umbraco-ui/uui-icon": "1.5.0", + "@umbraco-ui/uui-icon-registry": "1.5.0", + "@umbraco-ui/uui-icon-registry-essential": "1.5.0", + "@umbraco-ui/uui-input": "1.5.0", + "@umbraco-ui/uui-input-file": "1.5.0", + "@umbraco-ui/uui-input-lock": "1.5.0", + "@umbraco-ui/uui-input-password": "1.5.0", + "@umbraco-ui/uui-keyboard-shortcut": "1.5.0", + "@umbraco-ui/uui-label": "1.5.0", + "@umbraco-ui/uui-loader": "1.5.0", + "@umbraco-ui/uui-loader-bar": "1.5.0", + "@umbraco-ui/uui-loader-circle": "1.5.0", + "@umbraco-ui/uui-menu-item": "1.5.0", + "@umbraco-ui/uui-modal": "1.5.0", + "@umbraco-ui/uui-pagination": "1.5.0", + "@umbraco-ui/uui-popover": "1.5.0", + "@umbraco-ui/uui-popover-container": "1.5.0", + "@umbraco-ui/uui-progress-bar": "1.5.0", + "@umbraco-ui/uui-radio": "1.5.0", + "@umbraco-ui/uui-range-slider": "1.5.0", + "@umbraco-ui/uui-ref": "1.5.0", + "@umbraco-ui/uui-ref-list": "1.5.0", + "@umbraco-ui/uui-ref-node": "1.5.0", + "@umbraco-ui/uui-ref-node-data-type": "1.5.0", + "@umbraco-ui/uui-ref-node-document-type": "1.5.0", + "@umbraco-ui/uui-ref-node-form": "1.5.0", + "@umbraco-ui/uui-ref-node-member": "1.5.0", + "@umbraco-ui/uui-ref-node-package": "1.5.0", + "@umbraco-ui/uui-ref-node-user": "1.5.0", + "@umbraco-ui/uui-scroll-container": "1.5.0", + "@umbraco-ui/uui-select": "1.5.0", + "@umbraco-ui/uui-slider": "1.5.0", + "@umbraco-ui/uui-symbol-expand": "1.5.0", + "@umbraco-ui/uui-symbol-file": "1.5.0", + "@umbraco-ui/uui-symbol-file-dropzone": "1.5.0", + "@umbraco-ui/uui-symbol-file-thumbnail": "1.5.0", + "@umbraco-ui/uui-symbol-folder": "1.5.0", + "@umbraco-ui/uui-symbol-lock": "1.5.0", + "@umbraco-ui/uui-symbol-more": "1.5.0", + "@umbraco-ui/uui-symbol-sort": "1.5.0", + "@umbraco-ui/uui-table": "1.5.0", + "@umbraco-ui/uui-tabs": "1.5.0", + "@umbraco-ui/uui-tag": "1.5.0", + "@umbraco-ui/uui-textarea": "1.5.0", + "@umbraco-ui/uui-toast-notification": "1.5.0", + "@umbraco-ui/uui-toast-notification-container": "1.5.0", + "@umbraco-ui/uui-toast-notification-layout": "1.5.0", + "@umbraco-ui/uui-toggle": "1.5.0", + "@umbraco-ui/uui-visually-hidden": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-action-bar": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-action-bar/-/uui-action-bar-1.5.0.tgz", + "integrity": "sha512-2B4ONNRTEtoKjnBo8mtvQo2Y9WW7LDSx6q85UuA+YEWfMOgZ0hr0lFepPg+qq/q90/8ZIoItoxRo16UFrPVaHQ==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-button-group": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-avatar": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-avatar/-/uui-avatar-1.5.0.tgz", + "integrity": "sha512-Iw4MQ2IMfJq590ydA6d2WXJ3gC7wO1vpA6tZj3T772B81LBZR31ftoMn3ho4cpavV5Nv4LvBnGhc2YajbsVn5A==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-avatar-group": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-avatar-group/-/uui-avatar-group-1.5.0.tgz", + "integrity": "sha512-hlmqOGLQIN8uJMoLgT+RPHFWIxi8Ridhp/MrKgEjuNF6sTu4bCQyN28XuC9JD+4vBcSjU4a893QGvckalQxZiA==", + "dependencies": { + "@umbraco-ui/uui-avatar": "1.5.0", + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-badge": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-badge/-/uui-badge-1.5.0.tgz", + "integrity": "sha512-6azqqcqRzVHXYz/JfAody6kDZQG3hiBTiCS8EEYY9GcFNqh8BvFLX4yK9R6zz5BVrjgT3qkmPpE2iIpqV6J58A==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-base": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-base/-/uui-base-1.5.0.tgz", + "integrity": "sha512-HzKRvbf/aPA1y8l9ZLTvF5Up7W6jX8UwqVUr1B8lwckI6tgxOEFPqLya+U4papqZDh4wz/lysXSDESeVfUy8cw==", + "dependencies": { + "lit": "^2.3.1" + } + }, + "node_modules/@umbraco-ui/uui-boolean-input": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-boolean-input/-/uui-boolean-input-1.5.0.tgz", + "integrity": "sha512-uhIPzi7n3Z4Li3n688Q8v3725apwasZvPntm7kMdtssXay6hUHOcor+hkpPavGXRVxZGg+9gIYRM6sQWp853cA==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-box": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-box/-/uui-box-1.5.0.tgz", + "integrity": "sha512-uTHBvwzS9pRu0MVfN74+bux6lK0m1AmY/7xor9ez9/uzDyIK096D9jSLTQkfDyngIhqnV6kFLbG7PqcfQURFJQ==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-css": "1.4.0" + } + }, + "node_modules/@umbraco-ui/uui-box/node_modules/@umbraco-ui/uui-css": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-css/-/uui-css-1.4.0.tgz", + "integrity": "sha512-HBCFPuXJijeZbjnjdqmg3oqOGB3RmpQKT/s/Uy0TSJfaQGfz0e73o2eRghYHWF2rdqHw6brKFrZTZHBVvCE/xA==", + "dependencies": { + "lit": "^2.2.2" + } + }, + "node_modules/@umbraco-ui/uui-breadcrumbs": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-breadcrumbs/-/uui-breadcrumbs-1.5.0.tgz", + "integrity": "sha512-mXuzt5o4NZ1E/HVTLYq+TklX9VQSH5zce+Ef1t2EgUE3EFQH0fwcdCRBC9SpklueNj46ngGHmVhyfv8ekne1Wg==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-button": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-button/-/uui-button-1.5.0.tgz", + "integrity": "sha512-ujicvfqUAN0JtBcgj8OG1YcyDaArTBdP5LvNsyYB8s0dePgcws71XzJ1mbHbXhuA386ioNue04yGDL+gSFlJ/A==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-icon-registry-essential": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-button-group": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-button-group/-/uui-button-group-1.5.0.tgz", + "integrity": "sha512-8yhFdfg7p1B8MM2fIxIlc0Mmhnx46scdGhqeRhvaQ2/dcdpVTI1j1hI2JyOM18TUhJeot4olLqwatlXxlFFT+A==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-button-inline-create": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-button-inline-create/-/uui-button-inline-create-1.5.0.tgz", + "integrity": "sha512-J60vRf7nzQyRYKj+qYhMQR6LrQH6PyTrxyqyfDOVGzcWKzsTuRahxuVOIOzrs489cznwRYwL11jtK32MlrSjGQ==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-card": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-card/-/uui-card-1.5.0.tgz", + "integrity": "sha512-RgpnQca3rpjMG/3DAmmrExI7gmNNHBNYwfjRqgCd/3QkBwRrtT/+jdppVsGRxxW5xAN90sJ/eLP7i3F5EfWlSA==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-card-content-node": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-card-content-node/-/uui-card-content-node-1.5.0.tgz", + "integrity": "sha512-aYGeTsppWT0KS9orrqkl9DF2v5l3gSGhBJZqIPiHVBOzczYIcgLWJbdAkaCgpwh1Zacbv3tnB/76965fd4EwPw==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-card": "1.5.0", + "@umbraco-ui/uui-icon": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-card-media": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-card-media/-/uui-card-media-1.5.0.tgz", + "integrity": "sha512-0KktT0IExh06W7QP1FMNqU+tpUL1qDwWeeA19PbZPXwHg15hbSW15a+Hc4aiwqlHYHOPT2gxXoiVc7jqWlMcSQ==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-card": "1.5.0", + "@umbraco-ui/uui-symbol-file": "1.5.0", + "@umbraco-ui/uui-symbol-folder": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-card-user": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-card-user/-/uui-card-user-1.5.0.tgz", + "integrity": "sha512-xJjfkRHkt2xim1o+IvEPQiTpIQR+Z9+69096ssuGb3EkxyyUsDmH3aZZH6/+LKdtKR+7mPZVJub9TTWB4VRnwQ==", + "dependencies": { + "@umbraco-ui/uui-avatar": "1.5.0", + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-card": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-caret": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-caret/-/uui-caret-1.5.0.tgz", + "integrity": "sha512-4Apw4TMALEydo5o31gsIyICuPVyKvG/oySNup+5psU3apS0JDQ1RXCgGVDFoFxt5xzM+iJ6/J8ZOOILMVNFM6Q==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-checkbox": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-checkbox/-/uui-checkbox-1.5.0.tgz", + "integrity": "sha512-Kve+XAIkSFG9kowbZI1MpDEKihpMTtD9q36pcHiVENqxL1+Tydy60yjy3tHV8o6uamJ8qjR6ZlvLttRwLId9tQ==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-boolean-input": "1.5.0", + "@umbraco-ui/uui-icon-registry-essential": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-color-area": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-color-area/-/uui-color-area-1.5.0.tgz", + "integrity": "sha512-FF6PrUCBo2nOg5iLbD+iB8aa3Vh+skIfqjFsPD80qLE0sKQ/53juZCnCbvvp7Z0YmIqwBlWP7xGEzJBGfS6OlA==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "colord": "^2.9.3" + } + }, + "node_modules/@umbraco-ui/uui-color-picker": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-color-picker/-/uui-color-picker-1.5.0.tgz", + "integrity": "sha512-y/IwXhtaQJWNjwnZtYTvv47+bsmUYJzFLtXqxGckcUmyJQvoZ6DDxslTSv1B9J3QTXU0zpakqpxPszlNNHUygw==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "colord": "^2.9.3" + } + }, + "node_modules/@umbraco-ui/uui-color-slider": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-color-slider/-/uui-color-slider-1.5.0.tgz", + "integrity": "sha512-nkUpUxfD7VlayBHirM56xKqi1h0Opg7Q2suzxEC4KLDVLO1+L0KzsDORn1tfeantSG0PahBMbuve1XOoOwCrAA==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-color-swatch": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-color-swatch/-/uui-color-swatch-1.5.0.tgz", + "integrity": "sha512-UDqlGmJIMGyn7C23q33v8dkJoISmIAL0XZNTiPkEhwGjKRlxkbexmGd4L4vFt+nhJDRrN86JoZ64BRTHVN8V7A==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-icon-registry-essential": "1.5.0", + "colord": "^2.9.3" + } + }, + "node_modules/@umbraco-ui/uui-color-swatches": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-color-swatches/-/uui-color-swatches-1.5.0.tgz", + "integrity": "sha512-SvTKINbckKvqkkS4XnQfpELkW2x47CUa4PsnXqioXNIWP5sBJb9Kydiu0N1+lV57fAkteqNp+YY8mFxn3a6iPA==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-color-swatch": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-combobox": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-combobox/-/uui-combobox-1.5.0.tgz", + "integrity": "sha512-SoK4+yR0dJViXZinZ7iqowl6tvWPTTPSOBVE7FfOqOAgFoccOE/nQqjeNjSM0co80OKXqHUsh+kX/HwLjdyNEA==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-button": "1.5.0", + "@umbraco-ui/uui-combobox-list": "1.5.0", + "@umbraco-ui/uui-icon": "1.5.0", + "@umbraco-ui/uui-scroll-container": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-combobox-list": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-combobox-list/-/uui-combobox-list-1.5.0.tgz", + "integrity": "sha512-5cVlhnst3p6eEHFqn6O8LMswx3wdwpzlfAghleQJW+ZUIVo7ZPXznZz7+6yvnVWxnI7+xxFebHgC0KFxGMUVvg==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-css": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-css/-/uui-css-1.5.0.tgz", + "integrity": "sha512-jBSJg8KTWDG7DOVzz7A+UpMxMNHtddcLgt9k25vC4H+84xl+TN51RFTqF8C0JCZdWFK0eKWYlJsGqVrDfoVCcg==", + "dependencies": { + "lit": "^2.2.2" + } + }, + "node_modules/@umbraco-ui/uui-dialog": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-dialog/-/uui-dialog-1.5.0.tgz", + "integrity": "sha512-m6J5i+eiLdNApryIY1KW/4kyunAuTpkcWBjQmxyESmlDIqRGdW0lqaahQvcZSZHto03jleUdH5wYTLNgKIb/rw==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-css": "1.4.0" + } + }, + "node_modules/@umbraco-ui/uui-dialog-layout": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-dialog-layout/-/uui-dialog-layout-1.5.0.tgz", + "integrity": "sha512-vfZ3FMzYccGBVvSSXvCeoHYX+VU8QppXtFR2OGDZwU0b8BOKtfKTP/2VLPEWCG4vJYKPmqZESo3N9bZXWDkWSg==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-dialog/node_modules/@umbraco-ui/uui-css": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-css/-/uui-css-1.4.0.tgz", + "integrity": "sha512-HBCFPuXJijeZbjnjdqmg3oqOGB3RmpQKT/s/Uy0TSJfaQGfz0e73o2eRghYHWF2rdqHw6brKFrZTZHBVvCE/xA==", + "dependencies": { + "lit": "^2.2.2" + } + }, + "node_modules/@umbraco-ui/uui-file-dropzone": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-file-dropzone/-/uui-file-dropzone-1.5.0.tgz", + "integrity": "sha512-3rkTWidY4k2fyktRxfsMVTSvF+EIguv9p1Fga7v4DCNkplCp6OyJnwWby5F//+NvTHphaGchxZirOWMLgLyDog==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-symbol-file-dropzone": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-file-preview": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-file-preview/-/uui-file-preview-1.5.0.tgz", + "integrity": "sha512-Re+R8uZSD3t3jUgZvzG/DfQtihss7aw+rG41IAjmRO9wBZuUAsowfgCd2OJnuOYJXeaqOYYl+QQr7pmR2a/HNQ==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-symbol-file": "1.5.0", + "@umbraco-ui/uui-symbol-file-thumbnail": "1.5.0", + "@umbraco-ui/uui-symbol-folder": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-form": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-form/-/uui-form-1.5.0.tgz", + "integrity": "sha512-rbXFZzAg93/fzvNkxHavUr62DnSeWuVghd9CK9lhe6A9ER9cfjOcGn/INTYK3HHPBalay9IOq+WV1xxC5H6zyg==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-form-layout-item": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-form-layout-item/-/uui-form-layout-item-1.5.0.tgz", + "integrity": "sha512-owla3DWo1deVUEG0JzC7pE70h6Ll6lmbR+B+utbMdEgM6shEMdokpPioeCaXb8v7On9Whz+zJGAGBAYl/oyjug==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-form-validation-message": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-form-validation-message": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-form-validation-message/-/uui-form-validation-message-1.5.0.tgz", + "integrity": "sha512-wuWCzttkUlEctqdJi9qzSzT8h10WvoK3+5usYB9V8NpdPYzOmbXU5RDYpoTWS0nPO56C6rlRlt3TH1khIQtPJA==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-icon": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-icon/-/uui-icon-1.5.0.tgz", + "integrity": "sha512-8Sz6PaYTC8KDCKj5ed+xnlnuh9/NOs0tQGPOma1bnVxGJN8LNjl+cJSLp+iU1m3Qq50H0TG+0K/dS3WUExjbZw==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-icon-registry": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-icon-registry/-/uui-icon-registry-1.5.0.tgz", + "integrity": "sha512-ei+HnaCKFjcCYjHYC0hqncY2vDfbgRkWhftOnrhqVZPJkE4omWDmVsLSGg/vm88ar1QleDmVj+CAa4J9T+uVeg==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-icon": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-icon-registry-essential": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-icon-registry-essential/-/uui-icon-registry-essential-1.5.0.tgz", + "integrity": "sha512-nxNEQDI4SNBXnI2/Ov60vcdzKFyRCInwZDFNAKyt31F1yTNM0EM0ne5yV4AqM6YPOKVoWzqFcLz2rx64X+oLvQ==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-icon-registry": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-input": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-input/-/uui-input-1.5.0.tgz", + "integrity": "sha512-TlbSIRh2Z7xJxW0GEPENd369W1hHgr9Y8IIRE5RDllXzZc8yho4QXPJSDFQTiHMf41LIkOTfIkrQst5047FiXg==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-input-file": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-input-file/-/uui-input-file-1.5.0.tgz", + "integrity": "sha512-8h/qGED5KE7sb/YE7dHapZxcWXGm0qCPJft8AGOu/ZK/WdOUV1WHynLjV4yGVZgY9PVZGc+GQTzvdgwxxpltQw==", + "dependencies": { + "@umbraco-ui/uui-action-bar": "1.5.0", + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-button": "1.5.0", + "@umbraco-ui/uui-file-dropzone": "1.5.0", + "@umbraco-ui/uui-icon": "1.5.0", + "@umbraco-ui/uui-icon-registry-essential": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-input-lock": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-input-lock/-/uui-input-lock-1.5.0.tgz", + "integrity": "sha512-KBhZLLD+5qyibbcp0AiJo7V4e/+GiKouGz/rCk6/3vxEKpe8CtWekcHhjrdlsHcOluQeBcb1Pdqng0wC9UTO5Q==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-button": "1.5.0", + "@umbraco-ui/uui-icon": "1.5.0", + "@umbraco-ui/uui-input": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-input-password": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-input-password/-/uui-input-password-1.5.0.tgz", + "integrity": "sha512-8wvQ/10jfufU0QWhK3gBVo5V/fzk4AuX8wPuieKZDY9Jnwkr7ugZ11DOJtaV3Az/4a0nrfF3TQ2gbBC7zHx2JA==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-icon-registry-essential": "1.5.0", + "@umbraco-ui/uui-input": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-keyboard-shortcut": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-keyboard-shortcut/-/uui-keyboard-shortcut-1.5.0.tgz", + "integrity": "sha512-KVTMHl6X0T4cUA3bUgM06xzwCN3VD5W3tZloF0i6e3PTHhkyCE5tKD/2Hizm56OGb+ifaI/oN3L1m7vEPC8IHw==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-label": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-label/-/uui-label-1.5.0.tgz", + "integrity": "sha512-Sc6XuMEyivBEQDfMOA6JT7nW5H4/eD6dzUtUNabOwzCG5GUpvTMfRccpdjmzOvl9VCGNWtE9ikqCBZWexWA6YA==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-loader": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-loader/-/uui-loader-1.5.0.tgz", + "integrity": "sha512-lhl1KqRbM5NTp08fvxgzOsbHFz04z8/WjaOar6lqNnL0R+CcFtVWQrv69Opht9Sj1NdHESmHEVnX0yodod2LhQ==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-loader-bar": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-loader-bar/-/uui-loader-bar-1.5.0.tgz", + "integrity": "sha512-qUcVXi4i+ClozPc0Vfw7g90CLAQVj04F71xtatxDY5nhSWDEMEI6b/pXtN/B9TklkqfgE1mf/gRziFrpbVjLhA==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-loader-circle": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-loader-circle/-/uui-loader-circle-1.5.0.tgz", + "integrity": "sha512-059/DJDYbgOmr/LPXbiDaTkBcInmzUUu/YDtQt/SkZPCO33uuB7TDc+++cMgFYskdXBpqesNvVfZOUd4P6zJyA==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-menu-item": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-menu-item/-/uui-menu-item-1.5.0.tgz", + "integrity": "sha512-rmKuTz0Xgf0LyQRqs3tr2Z4O6oaNCd7UmI8kEbluk4yKpk5MU38BlFY9p39fpiEVUuzjcg9pBjrEyxrC/H9xjA==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-loader-bar": "1.5.0", + "@umbraco-ui/uui-symbol-expand": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-modal": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-modal/-/uui-modal-1.5.0.tgz", + "integrity": "sha512-q9g4rA8OYCPlOmZMES/O17NiAu18wtMxNHMuT6dADP2tuULE+TKT6A8vqC7aq8JkWOTAXRAFvTjTmcvm6L2pvg==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-pagination": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-pagination/-/uui-pagination-1.5.0.tgz", + "integrity": "sha512-I3gCWbyLRFvi5fAlezQZarvj7FuEZ7NVZbbKJxqEhbo1bwOxDMXlDNxIIrxSg3R8YAuDNP9Pbdw+rnQwupuOMQ==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-button": "1.5.0", + "@umbraco-ui/uui-button-group": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-popover": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-popover/-/uui-popover-1.5.0.tgz", + "integrity": "sha512-Ab8UL4UGxTUn6hYbTqPrMtyGpQr3Xw1E/PVKG3+j+UrNw1Ro5piKgh0TahwxLnrsXWOPXfy53oaXNYsMGenndA==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-popover-container": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-popover-container/-/uui-popover-container-1.5.0.tgz", + "integrity": "sha512-issjf86TwvwLA6sJOs5pLRMFY+WBc4oeTZiJMz5mhZ5C5UoRmU65L6RP/0UnzZ4ZGY2Gpdh2YatNnZ7hVMg5ig==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-progress-bar": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-progress-bar/-/uui-progress-bar-1.5.0.tgz", + "integrity": "sha512-B/v7VsBBwo19Y+4NBRllt7Ls+WLQfx6vY57rfO8MQG7zxGznxpTSIYvd3wxdRuDsFQeVwwoYjF1/YBJ7iWUnEQ==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-radio": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-radio/-/uui-radio-1.5.0.tgz", + "integrity": "sha512-3e52VZHcgHB/17eLTmiZwdm7ENgfX6AF4Dw+8H2x8jdRjyvt8lbykCq+6xewAZFsLAu7vTOEKtd2RhQFI2+hwg==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-range-slider": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-range-slider/-/uui-range-slider-1.5.0.tgz", + "integrity": "sha512-oHmIoF+KrHDWiOKonIWq7n94C6CzStBXrleS6iwCgWY++ayaHKCPlCuQIYp3BmGjnMQn8Ou0r2x/RuBPuraLVQ==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-ref": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-ref/-/uui-ref-1.5.0.tgz", + "integrity": "sha512-wba/OP6b/mG5kp4bUgBBcBAAy3RWTbokVyjb52FR7nyqNMnIE/UBdgi0XeBx4j6lZeEbr5k5ZOGQ1knEHbPWyQ==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-ref-list": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-ref-list/-/uui-ref-list-1.5.0.tgz", + "integrity": "sha512-sxs3hC97zDuFaV8mvXLAbqqtWk0kqDdHY9ORt9CxacdT36nQS58Sw60/plCryqoyp7P2cUZVtlEeff53OKOTCQ==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-ref-node": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-ref-node/-/uui-ref-node-1.5.0.tgz", + "integrity": "sha512-bjmMgrIW+/4bmUXwMwFFaPrg2MeTxXssb6EpbBItJ+s0QhTEcTNyAD/DK3RlSMRE5VPO11sRwgCr06aIhklx0Q==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-icon": "1.5.0", + "@umbraco-ui/uui-ref": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-ref-node-data-type": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-ref-node-data-type/-/uui-ref-node-data-type-1.5.0.tgz", + "integrity": "sha512-k14MI3cRELOmAwmtFeBzgCFw4+uin0JSqf85ZaqNkXSAmg+4I0ayUI6PGz+Jw66yGHvw3YNeUMKPmLO8l6M79A==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-ref-node": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-ref-node-document-type": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-ref-node-document-type/-/uui-ref-node-document-type-1.5.0.tgz", + "integrity": "sha512-ouytDUaSls7Hsd0WaDy4wgfKMLpxlxx16WWyHlzX5lMyhkR+S3olyNZcgDRtz9xIQV+dVE3iDsUeQcNAigCdaw==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-ref-node": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-ref-node-form": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-ref-node-form/-/uui-ref-node-form-1.5.0.tgz", + "integrity": "sha512-D86A1+ScVGTer2kci6Y9X4ZAhCnm4kxUi7bCFH7dn7oi/Fq8fhs3PBuA7mr1FrZgrPvXVdW+Qa7ldxxU58NIWA==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-ref-node": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-ref-node-member": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-ref-node-member/-/uui-ref-node-member-1.5.0.tgz", + "integrity": "sha512-/UPmUNk6KP2unKnJKjr1qGkdPlFGTRj3K7H/mczCY7IbtzEccdEswWJCdUy/doIkAKbDdaqKe3/9HBoA3JtWPw==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-ref-node": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-ref-node-package": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-ref-node-package/-/uui-ref-node-package-1.5.0.tgz", + "integrity": "sha512-XkET8XKb3XxmjlIDrmtwm9o0QsaG81bcpUBEBA/wUC0OcJNrjTKyv6ciAVDP7HaW6XpN8XwsRbqdcrYwM8lXDQ==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-ref-node": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-ref-node-user": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-ref-node-user/-/uui-ref-node-user-1.5.0.tgz", + "integrity": "sha512-9TrIr1JWw3cIkWfQrdv9iLRIqm/dd10d6uZEWaGJ/MuxyCywqMg/LSApV/NLapB4HXhIG4pGCiXvUa8OVW99ew==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-ref-node": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-scroll-container": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-scroll-container/-/uui-scroll-container-1.5.0.tgz", + "integrity": "sha512-Xj5jnmCEDyRENmWtuPI1QYEMzrmi/9/LaajkPEIZEYVu2owI940F0viS5X+X/FvKehSxoSt9ainCwkLphgzNiw==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-select": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-select/-/uui-select-1.5.0.tgz", + "integrity": "sha512-lcMiIM6WxF5YraIXAqSpujx3OJzq6Snfik0BUypTWbUZdKVQTgLPh3A6We9PdD6K64AX2Zk4eH8yhQ+5GNImzQ==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-slider": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-slider/-/uui-slider-1.5.0.tgz", + "integrity": "sha512-Mp6xz7C7GbAuQ1Totd2WLzvS56ekx4l31mAvUvor0GqrUF/hHxwfrGZOAWoBqoTdKQAFKbZVSM782a+cwNv3hg==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-symbol-expand": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-symbol-expand/-/uui-symbol-expand-1.5.0.tgz", + "integrity": "sha512-ZCuGAJT2qFs4wQ6Z+g/qV3obv/SbriMnaIOGy6XTTAuMlh2+aNAwm33Je0wYKCTwHNUmnl427wTMEkQcMziD4g==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-symbol-file": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-symbol-file/-/uui-symbol-file-1.5.0.tgz", + "integrity": "sha512-ClB/lT/ebyUBmPqExB2ZinMOo/bCMEgjGxjkXy2THX4lOLUqvjDNEKLq99MAREKSh/mmGq7iB3Z/hd9/EDu75Q==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-symbol-file-dropzone": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-symbol-file-dropzone/-/uui-symbol-file-dropzone-1.5.0.tgz", + "integrity": "sha512-0YL88rFFI5SOzzORtm1VtMihN4if7r0CIRe5Q3Sv0WwHjrMfIM08DeONCgN2j+ZoKgnTvt9KpE1OGigshouRug==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-symbol-file-thumbnail": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-symbol-file-thumbnail/-/uui-symbol-file-thumbnail-1.5.0.tgz", + "integrity": "sha512-/qkf6AdAIsRmUfsBdtFkFk5wPWw6JvSVHvgk/UvZulHHb2F8TamPSJfb6voh86Vq8DzVIcy3ZbqatxH7LZBY1g==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-symbol-folder": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-symbol-folder/-/uui-symbol-folder-1.5.0.tgz", + "integrity": "sha512-Sxt4n5IBT+XIqu2nJxP4RnhourwC+1X5bD40YgUBmqZJ9KV//tox4zo2elU19WCeRZFkklZGfn2smLY1FD0OGg==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-symbol-lock": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-symbol-lock/-/uui-symbol-lock-1.5.0.tgz", + "integrity": "sha512-EH7tEPCB+PTyjWbW+bdekk4M5hcjvYYpCKTnl3Pdpzh0mrxHPt9xa8908JB0tG8n0m0EcP+L7k8pthUmkgpK7A==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-symbol-more": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-symbol-more/-/uui-symbol-more-1.5.0.tgz", + "integrity": "sha512-EuhU4kle4swMFZnsguWPz77rOtrk0IQcXuEA60fjzFGJCwsg7yyu9Ns209IEUsYh5ktstj8pXKT8+ZDila5umg==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-symbol-sort": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-symbol-sort/-/uui-symbol-sort-1.5.0.tgz", + "integrity": "sha512-/cifoZXuZbDmuZFPD0rr95Gpuy18DnboOYb/Ir6G3PANJ0fWOhzykHUrdx18ItLzhhwfE3dcZk4EWcGrEkfnfg==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-table": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-table/-/uui-table-1.5.0.tgz", + "integrity": "sha512-tjhpEzBYCQdgieoXcIgcOjROrScF0Ifutz/6gmpcdrXYbgZ+YkWX7dSLAeQj3fzGebaPbNYzGOmGZA9/opZ1rg==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-tabs": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-tabs/-/uui-tabs-1.5.0.tgz", + "integrity": "sha512-0D5NLufis9Tzc5Vr+fl8Z0wABHyz1Tep76Qnx0nXyYzAZvdNq2IxThHbGqA1cb+FjVJSKdfp6ONfiPc/SIVAzA==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-button": "1.5.0", + "@umbraco-ui/uui-popover-container": "1.5.0", + "@umbraco-ui/uui-symbol-more": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-tag": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-tag/-/uui-tag-1.5.0.tgz", + "integrity": "sha512-OZGitHjdn4coj1x7F7zfeIx5M9NhGd8+CqpD915V9Qm8YlTQxFLq1M8tqjIxaYAB5EcHXuyzRpSUCrt/WUvipA==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-textarea": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-textarea/-/uui-textarea-1.5.0.tgz", + "integrity": "sha512-+zDqbYKYfaiG0IXEaQatUaWsD4umtkTtbCMnqVPMhxwneVoE9d69ejat2zLFUI/ERm3nKMyq/NRfxzXJgzlDng==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-toast-notification": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-toast-notification/-/uui-toast-notification-1.5.0.tgz", + "integrity": "sha512-cFjz4/uZudR3yuSqK5gqzAio55ZOOxQAOc8bC5keS0HXL84JcDwrEP4/Nz7X/uUNUqauYZG/iBUirAvqfv7Osw==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-button": "1.5.0", + "@umbraco-ui/uui-css": "1.4.0", + "@umbraco-ui/uui-icon": "1.5.0", + "@umbraco-ui/uui-icon-registry-essential": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-toast-notification-container": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-toast-notification-container/-/uui-toast-notification-container-1.5.0.tgz", + "integrity": "sha512-AB4kwgocUeDwkxiCYNH0AOMEtExDS6sEq9sk2i8AGDAEjprAB3m0HM9AlrA+T0V1GtSuv+Q1DEuCyxnVbuK0WQ==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-toast-notification": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-toast-notification-layout": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-toast-notification-layout/-/uui-toast-notification-layout-1.5.0.tgz", + "integrity": "sha512-rM7cGCdMolhsndfZT9zGAPI9P3bl1lNpjDhWI124Mgx+KS8t2Q2h9O+7FGqFnjCTJOQES1pdQ+enl2NxCuEkNg==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-css": "1.4.0" + } + }, + "node_modules/@umbraco-ui/uui-toast-notification-layout/node_modules/@umbraco-ui/uui-css": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-css/-/uui-css-1.4.0.tgz", + "integrity": "sha512-HBCFPuXJijeZbjnjdqmg3oqOGB3RmpQKT/s/Uy0TSJfaQGfz0e73o2eRghYHWF2rdqHw6brKFrZTZHBVvCE/xA==", + "dependencies": { + "lit": "^2.2.2" + } + }, + "node_modules/@umbraco-ui/uui-toast-notification/node_modules/@umbraco-ui/uui-css": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-css/-/uui-css-1.4.0.tgz", + "integrity": "sha512-HBCFPuXJijeZbjnjdqmg3oqOGB3RmpQKT/s/Uy0TSJfaQGfz0e73o2eRghYHWF2rdqHw6brKFrZTZHBVvCE/xA==", + "dependencies": { + "lit": "^2.2.2" + } + }, + "node_modules/@umbraco-ui/uui-toggle": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-toggle/-/uui-toggle-1.5.0.tgz", + "integrity": "sha512-vsJSpBSmlrLzspCa1dGQGYXfc6RwTGTzSlNQdnzzP7qefVRP4GlOaqYV0TJhHMcYdbai+iEkrLznzJQvM9JFLA==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0", + "@umbraco-ui/uui-boolean-input": "1.5.0" + } + }, + "node_modules/@umbraco-ui/uui-visually-hidden": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@umbraco-ui/uui-visually-hidden/-/uui-visually-hidden-1.5.0.tgz", + "integrity": "sha512-3Imqxp8+hvirakPogqzvRlU+uhshpGRdrEMU7phCS5VGzDEl8NL1BhxR31EQAw7DspwbD5non3ZwbTwLYydfCg==", + "dependencies": { + "@umbraco-ui/uui-base": "1.5.0" + } + }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", @@ -4222,8 +5072,7 @@ "node_modules/colord": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", - "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==", - "dev": true + "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==" }, "node_modules/colornames": { "version": "1.1.1", @@ -10898,6 +11747,34 @@ "node": ">=10" } }, + "node_modules/lit": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/lit/-/lit-2.8.0.tgz", + "integrity": "sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA==", + "dependencies": { + "@lit/reactive-element": "^1.6.0", + "lit-element": "^3.3.0", + "lit-html": "^2.8.0" + } + }, + "node_modules/lit-element": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.3.3.tgz", + "integrity": "sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA==", + "dependencies": { + "@lit-labs/ssr-dom-shim": "^1.1.0", + "@lit/reactive-element": "^1.3.0", + "lit-html": "^2.8.0" + } + }, + "node_modules/lit-html": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.8.0.tgz", + "integrity": "sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q==", + "dependencies": { + "@types/trusted-types": "^2.0.2" + } + }, "node_modules/load-json-file": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", diff --git a/src/Umbraco.Web.UI.Client/package.json b/src/Umbraco.Web.UI.Client/package.json index 5d12153e62..e754922631 100644 --- a/src/Umbraco.Web.UI.Client/package.json +++ b/src/Umbraco.Web.UI.Client/package.json @@ -19,6 +19,8 @@ }, "dependencies": { "@microsoft/signalr": "7.0.12", + "@umbraco-ui/uui": "1.5.0", + "@umbraco-ui/uui-css": "1.5.0", "ace-builds": "1.31.0", "angular": "1.8.3", "angular-animate": "1.8.3", 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 3099bc561c..1e455aea5f 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 @@ -35,15 +35,18 @@ $scope.activeApp = null; //initializes any watches - function startWatches(content) { + var watchers = []; - $scope.$watchGroup(['culture', 'segment'], + function startWatches(content) { + clearWatchers(); + + watchers.push($scope.$watchGroup(['culture', 'segment'], function (value, oldValue) { createPreviewButton($scope.content, value[0], value[1]); - }); + })); //watch for changes to isNew, set the page.isNew accordingly and load the breadcrumb if we can - $scope.$watch('isNew', function (newVal, oldVal) { + watchers.push($scope.$watch('isNew', function (newVal, oldVal) { $scope.page.isNew = Object.toBoolean(newVal); @@ -59,8 +62,12 @@ }); } } - }); + })); + } + function clearWatchers () { + watchers.forEach(w => w()); + watchers = []; } //this initializes the editor with the data which will be called more than once if the data is re-loaded @@ -109,6 +116,7 @@ bindEvents(); resetVariantFlags(); + startWatches($scope.content); } function loadBreadcrumb() { @@ -241,7 +249,6 @@ appendRuntimeData(); init(); - startWatches($scope.content); syncTreeNode($scope.content, $scope.content.path, true); @@ -265,7 +272,6 @@ appendRuntimeData(); init(); - startWatches($scope.content); resetLastListPageNumber($scope.content); @@ -346,7 +352,10 @@ labelKey: "buttons_saveAndPreview" }; - const activeVariant = content.variants?.find((variant) => content.documentType?.variations === "Nothing" || variant.compositeId === compositeId); + let activeVariant = content.variants?.find((variant) => content.documentType?.variations === "Nothing" || variant.compositeId === compositeId); + /* if we can't find the active variant and there is only one variant available, we will use that. + this happens if we have a node that can vary by culture but there is only one language available. */ + activeVariant = !activeVariant && content.variants.length === 1 ? content.variants[0] : activeVariant; $scope.previewSubButtons = activeVariant?.additionalPreviewUrls?.map((additionalPreviewUrl) => { return { diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Persistence.EFCore/DbContext/CustomDbContextTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Persistence.EFCore/DbContext/CustomDbContextTests.cs new file mode 100644 index 0000000000..bfa3adb92b --- /dev/null +++ b/tests/Umbraco.Tests.Integration/Umbraco.Persistence.EFCore/DbContext/CustomDbContextTests.cs @@ -0,0 +1,101 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using NUnit.Framework; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; + +namespace Umbraco.Cms.Tests.Integration.Umbraco.Persistence.EFCore.DbContext; + +[TestFixture] +[UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest, Logger = UmbracoTestOptions.Logger.Console)] +public class CustomDbContextUmbracoProviderTests : UmbracoIntegrationTest +{ + [Test] + public void Can_Register_Custom_DbContext_And_Resolve() + { + var dbContext = Services.GetRequiredService(); + + Assert.IsNotNull(dbContext); + Assert.IsNotEmpty(dbContext.Database.GetConnectionString()); + } + + protected override void CustomTestSetup(IUmbracoBuilder builder) + { + builder.Services.AddUmbracoDbContext((serviceProvider, options) => + { + options.UseUmbracoDatabaseProvider(serviceProvider); + }); + } + + internal class CustomDbContext : Microsoft.EntityFrameworkCore.DbContext + { + public CustomDbContext(DbContextOptions options) + : base(options) + { + } + } +} + + +[TestFixture] +[UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest, Logger = UmbracoTestOptions.Logger.Console)] +public class CustomDbContextCustomSqliteProviderTests : UmbracoIntegrationTest +{ + [Test] + public void Can_Register_Custom_DbContext_And_Resolve() + { + var dbContext = Services.GetRequiredService(); + + Assert.IsNotNull(dbContext); + Assert.IsNotEmpty(dbContext.Database.GetConnectionString()); + } + + protected override void CustomTestSetup(IUmbracoBuilder builder) + { + builder.Services.AddUmbracoDbContext((serviceProvider, options) => + { + options.UseSqlite("Data Source=:memory:;Version=3;New=True;"); + }); + } + + internal class CustomDbContext : Microsoft.EntityFrameworkCore.DbContext + { + public CustomDbContext(DbContextOptions options) + : base(options) + { + } + } +} + +[Obsolete] +[TestFixture] +[UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest, Logger = UmbracoTestOptions.Logger.Console)] +public class CustomDbContextLegacyExtensionProviderTests : UmbracoIntegrationTest +{ + [Test] + public void Can_Register_Custom_DbContext_And_Resolve() + { + var dbContext = Services.GetRequiredService(); + + Assert.IsNotNull(dbContext); + Assert.IsNotEmpty(dbContext.Database.GetConnectionString()); + } + + protected override void CustomTestSetup(IUmbracoBuilder builder) + { + builder.Services.AddUmbracoEFCoreContext("Data Source=:memory:;Version=3;New=True;", "Microsoft.Data.Sqlite", (options, connectionString, providerName) => + { + options.UseSqlite(connectionString); + }); + } + + internal class CustomDbContext : Microsoft.EntityFrameworkCore.DbContext + { + public CustomDbContext(DbContextOptions options) + : base(options) + { + } + } +} + diff --git a/version.json b/version.json index e4ab52430e..01fadfd808 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json", - "version": "13.0.0-rc1", + "version": "13.0.0-rc2", "assemblyVersion": { "precision": "build" },