Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
858 changes: 425 additions & 433 deletions src/TestSite.14/packages.lock.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import type { ManifestDashboard } from "@umbraco-cms/backoffice/extension-regist
const dashboards: Array<ManifestDashboard> = [
{
type: 'dashboard',
name: 'timedashboard',
name: 'organiserdashboard',
alias: 'umbraco.community.backofficeorganiser',
elementName: 'timedashboard-dashboard',
elementName: 'organiserdashboard-dashboard',
js: () => import("./organiser.dashboard.ts"),
weight: -10,
meta: {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using jcdcdev.Umbraco.Core.Extensions;
using jcdcdev.Umbraco.Core.Web.Models.Manifests;
using Umbraco.Cms.Core.Manifest;
using Umbraco.Cms.Infrastructure.Manifest;

namespace Umbraco.Community.BackOfficeOrganiser.Composing;

public class BackOfficeOrganiserPackageManifestReader : IPackageManifestReader
{
public async Task<IEnumerable<PackageManifest>> ReadPackageManifestsAsync()

Check warning on line 10 in src/Umbraco.Community.BackOfficeOrganiser/Composing/BackOfficeOrganiserPackageManifestReader.cs

View workflow job for this annotation

GitHub Actions / release

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 10 in src/Umbraco.Community.BackOfficeOrganiser/Composing/BackOfficeOrganiserPackageManifestReader.cs

View workflow job for this annotation

GitHub Actions / release

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 10 in src/Umbraco.Community.BackOfficeOrganiser/Composing/BackOfficeOrganiserPackageManifestReader.cs

View workflow job for this annotation

GitHub Actions / build

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 10 in src/Umbraco.Community.BackOfficeOrganiser/Composing/BackOfficeOrganiserPackageManifestReader.cs

View workflow job for this annotation

GitHub Actions / build

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 10 in src/Umbraco.Community.BackOfficeOrganiser/Composing/BackOfficeOrganiserPackageManifestReader.cs

View workflow job for this annotation

GitHub Actions / release

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 10 in src/Umbraco.Community.BackOfficeOrganiser/Composing/BackOfficeOrganiserPackageManifestReader.cs

View workflow job for this annotation

GitHub Actions / release

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
{
var extensions = new List<IManifest>();
var packageManifest = new PackageManifest
{
Name = Constants.PackageName,
Version = EnvironmentExtensions.CurrentAssemblyVersion().ToSemVer()?.ToString() ?? "0.1.0",
AllowPublicAccess = false,
AllowTelemetry = false,
Extensions = []
};

extensions.Add(new EntryPointManifest
{
Name = "backoffice-organiser.entrypoint",
Alias = "backoffice-organiser.entrypoint",
Js = "/App_Plugins/Umbraco.Community.BackOfficeOrganiser/dist/index.js"
});

packageManifest.Extensions = extensions.OfType<object>().ToArray();
return [packageManifest];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Notifications;
using Umbraco.Cms.Infrastructure.Manifest;
using Umbraco.Community.BackOfficeOrganiser.Models;
using Umbraco.Community.BackOfficeOrganiser.Organisers.ContentTypes;
using Umbraco.Community.BackOfficeOrganiser.Organisers.DataTypes;
Expand Down Expand Up @@ -34,5 +35,7 @@ public void Compose(IUmbracoBuilder builder)
builder.AddNotificationAsyncHandler<MediaTypeSavedNotification, BackofficeOrganiserNotificationHandler>();
builder.AddNotificationAsyncHandler<MemberTypeSavedNotification, BackofficeOrganiserNotificationHandler>();
builder.AddNotificationAsyncHandler<ContentTypeSavedNotification, BackofficeOrganiserNotificationHandler>();

builder.Services.AddSingleton<IPackageManifestReader, BackOfficeOrganiserPackageManifestReader>();
}
}
6 changes: 6 additions & 0 deletions src/Umbraco.Community.BackOfficeOrganiser/Constants.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Umbraco.Community.BackOfficeOrganiser;

public class Constants
{
public const string PackageName = "Umbraco.Community.BackOfficeOrganiser";
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class DefaultContentTypeOrganiseAction : IContentTypeOrganiseAction

public async Task MoveAsync(IContentType contentType, IContentTypeService contentTypeService)
{
var folderKey = Constants.System.RootKey;
var folderKey = global::Umbraco.Cms.Core.Constants.System.RootKey;
var folderName = string.Empty;
var isComposition = contentTypeService.GetComposedOf(contentType.Id).Any();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
if (folder.IsNullOrWhiteSpace())
{
_logger.LogWarning("Failed to determine folder name. {DataType} will be considered Custom", dataType.Name);
await dataTypeService.MoveAsync(dataType, parentFolder.Key, Constants.Security.SuperUserKey);
await dataTypeService.MoveAsync(dataType, parentFolder.Key, global::Umbraco.Cms.Core.Constants.Security.SuperUserKey);
return;
}

var dataTypeFolder = dataTypeService.GetOrCreateFolder(folder, parentFolder.Id);
await dataTypeService.MoveAsync(dataType, dataTypeFolder.Key, Constants.Security.SuperUserKey);
await dataTypeService.MoveAsync(dataType, dataTypeFolder.Key, global::Umbraco.Cms.Core.Constants.Security.SuperUserKey);
}

private static string ResolveDataTypeFolderName(IDataType dataType)
Expand All @@ -55,53 +55,53 @@
{
var folder = dataType.EditorAlias switch
{
Constants.PropertyEditors.Aliases.BlockList => "Block List",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.BlockList => "Block List",

Constants.PropertyEditors.Aliases.NestedContent => "Nested Content",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.NestedContent => "Nested Content",

Constants.PropertyEditors.Aliases.BlockGrid => "Grid",
Constants.PropertyEditors.Aliases.Grid => "Grid",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.BlockGrid => "Grid",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.Grid => "Grid",

Constants.PropertyEditors.Aliases.ImageCropper => "Image Cropper",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.ImageCropper => "Image Cropper",

Constants.PropertyEditors.Aliases.ListView => "List View",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.ListView => "List View",

Constants.PropertyEditors.Aliases.Boolean => "Checkbox",
Constants.PropertyEditors.Aliases.UploadField => "Upload",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.Boolean => "Checkbox",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.UploadField => "Upload",

Constants.PropertyEditors.Aliases.Tags => "Tags",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.Tags => "Tags",

Constants.PropertyEditors.Aliases.CheckBoxList => "List",
Constants.PropertyEditors.Aliases.DropDownListFlexible => "List",
Constants.PropertyEditors.Aliases.RadioButtonList => "List",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.CheckBoxList => "List",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.DropDownListFlexible => "List",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.RadioButtonList => "List",

Constants.PropertyEditors.Aliases.ColorPickerEyeDropper => "Picker",
Constants.PropertyEditors.Aliases.ColorPicker => "Picker",
Constants.PropertyEditors.Aliases.ContentPicker => "Picker",
Constants.PropertyEditors.Aliases.MultipleMediaPicker => "Picker",
Constants.PropertyEditors.Aliases.MemberPicker => "Picker",
Constants.PropertyEditors.Aliases.MemberGroupPicker => "Picker",
Constants.PropertyEditors.Aliases.MultiNodeTreePicker => "Picker",
Constants.PropertyEditors.Aliases.MediaPicker3 => "Picker",
Constants.PropertyEditors.Aliases.UserPicker => "Picker",
Constants.PropertyEditors.Aliases.MultiUrlPicker => "Picker",
Constants.PropertyEditors.Aliases.PickerRelations => "Picker",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.ColorPickerEyeDropper => "Picker",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.ColorPicker => "Picker",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.ContentPicker => "Picker",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.MultipleMediaPicker => "Picker",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.MemberPicker => "Picker",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.MemberGroupPicker => "Picker",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.MultiNodeTreePicker => "Picker",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.MediaPicker3 => "Picker",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.UserPicker => "Picker",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.MultiUrlPicker => "Picker",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.PickerRelations => "Picker",

Constants.PropertyEditors.Aliases.Decimal => "Number",
Constants.PropertyEditors.Aliases.Slider => "Number",
Constants.PropertyEditors.Aliases.Integer => "Number",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.Decimal => "Number",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.Slider => "Number",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.Integer => "Number",

Constants.PropertyEditors.Aliases.DateTime => "Date",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.DateTime => "Date",

Constants.PropertyEditors.Aliases.MultipleTextstring => "Text",
Constants.PropertyEditors.Aliases.TextBox => "Text",
Constants.PropertyEditors.Aliases.TextArea => "Text",
Constants.PropertyEditors.Aliases.EmailAddress => "Text",
Constants.PropertyEditors.Aliases.Label => "Text",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.MultipleTextstring => "Text",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.TextBox => "Text",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.TextArea => "Text",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.EmailAddress => "Text",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.Label => "Text",

Constants.PropertyEditors.Aliases.TinyMce => "Rich Text",
Constants.PropertyEditors.Aliases.RichText => "Rich Text",
Constants.PropertyEditors.Aliases.MarkdownEditor => "Rich Text",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.TinyMce => "Rich Text",

Check warning on line 102 in src/Umbraco.Community.BackOfficeOrganiser/Organisers/DataTypes/DefaultDataTypeOrganiseAction.cs

View workflow job for this annotation

GitHub Actions / release

'Constants.PropertyEditors.Aliases.TinyMce' is obsolete: 'Please use RichText constant instead, scheduled for removal in v16'

Check warning on line 102 in src/Umbraco.Community.BackOfficeOrganiser/Organisers/DataTypes/DefaultDataTypeOrganiseAction.cs

View workflow job for this annotation

GitHub Actions / release

'Constants.PropertyEditors.Aliases.TinyMce' is obsolete: 'Please use RichText constant instead, scheduled for removal in v16'

Check warning on line 102 in src/Umbraco.Community.BackOfficeOrganiser/Organisers/DataTypes/DefaultDataTypeOrganiseAction.cs

View workflow job for this annotation

GitHub Actions / build

'Constants.PropertyEditors.Aliases.TinyMce' is obsolete: 'Please use RichText constant instead, scheduled for removal in v16'

Check warning on line 102 in src/Umbraco.Community.BackOfficeOrganiser/Organisers/DataTypes/DefaultDataTypeOrganiseAction.cs

View workflow job for this annotation

GitHub Actions / build

'Constants.PropertyEditors.Aliases.TinyMce' is obsolete: 'Please use RichText constant instead, scheduled for removal in v16'

Check warning on line 102 in src/Umbraco.Community.BackOfficeOrganiser/Organisers/DataTypes/DefaultDataTypeOrganiseAction.cs

View workflow job for this annotation

GitHub Actions / release

'Constants.PropertyEditors.Aliases.TinyMce' is obsolete: 'Please use RichText constant instead, scheduled for removal in v16'

Check warning on line 102 in src/Umbraco.Community.BackOfficeOrganiser/Organisers/DataTypes/DefaultDataTypeOrganiseAction.cs

View workflow job for this annotation

GitHub Actions / release

'Constants.PropertyEditors.Aliases.TinyMce' is obsolete: 'Please use RichText constant instead, scheduled for removal in v16'
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.RichText => "Rich Text",
global::Umbraco.Cms.Core.Constants.PropertyEditors.Aliases.MarkdownEditor => "Rich Text",

_ => ResolveDataTypeFolderName(dataType)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public class DefaultMediaTypeOrganiseAction : IMediaTypeOrganiseAction

public async Task MoveAsync(IMediaType mediaType, IMediaTypeService mediaTypeService)
{
var folderKey = Constants.System.RootKey;
var parentId = Constants.System.Root;
var folderKey = global::Umbraco.Cms.Core.Constants.System.RootKey;
var parentId = global::Umbraco.Cms.Core.Constants.System.Root;
var folderName = string.Empty;

if (mediaType.IsInternal())
Expand All @@ -22,13 +22,13 @@ public async Task MoveAsync(IMediaType mediaType, IMediaTypeService mediaTypeSer
folderKey = parent.Key;
folderName = mediaType.Alias switch
{
Constants.Conventions.MediaTypes.File => string.Empty,
Constants.Conventions.MediaTypes.Folder => string.Empty,
Constants.Conventions.MediaTypes.VideoAlias => "Video",
Constants.Conventions.MediaTypes.AudioAlias => "Audio",
Constants.Conventions.MediaTypes.ArticleAlias => "Text File",
Constants.Conventions.MediaTypes.VectorGraphicsAlias => "Image",
Constants.Conventions.MediaTypes.Image => "Image",
global::Umbraco.Cms.Core.Constants.Conventions.MediaTypes.File => string.Empty,
global::Umbraco.Cms.Core.Constants.Conventions.MediaTypes.Folder => string.Empty,
global::Umbraco.Cms.Core.Constants.Conventions.MediaTypes.VideoAlias => "Video",
global::Umbraco.Cms.Core.Constants.Conventions.MediaTypes.AudioAlias => "Audio",
global::Umbraco.Cms.Core.Constants.Conventions.MediaTypes.ArticleAlias => "Text File",
global::Umbraco.Cms.Core.Constants.Conventions.MediaTypes.VectorGraphicsAlias => "Image",
global::Umbraco.Cms.Core.Constants.Conventions.MediaTypes.Image => "Image",
_ => folderName
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class DefaultMemberTypeOrganiseAction : IMemberTypeOrganiseAction

public async Task MoveAsync(IMemberType memberType, IMemberTypeService memberTypeService)
{
var folderKey = Constants.System.RootKey;
var folderKey = global::Umbraco.Cms.Core.Constants.System.RootKey;
var folderName = string.Empty;

if (memberType.CompositionIds().Any())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="jcdcdev.Umbraco.Core" Version="[14.0.0,15.0.0)"/>
<PackageReference Include="jcdcdev.Umbraco.Core" Version="[14.0.2,15.0.0)"/>
<PackageReference Include="Umbraco.Cms.Core" Version="[14.0.0,15.0.0)"/>
<PackageReference Include="Umbraco.Cms.Infrastructure" Version="[14.0.0,15.0.0)"/>
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/Umbraco.Community.BackOfficeOrganiser/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"net8.0": {
"jcdcdev.Umbraco.Core": {
"type": "Direct",
"requested": "[14.0.0, 15.0.0)",
"resolved": "14.0.0",
"contentHash": "hVpG+ORjK76sgvfk8rqH39n/wANAc7nuCQsM+iJlfNufyXvfXtxaLz8B+9egZ+GudW75aI6lEkXtDevUykl/SQ==",
"requested": "[14.0.2, 15.0.0)",
"resolved": "14.0.2",
"contentHash": "I8geaR2UxMW3dGTf7/e47TQpLvhGB8ZUcMpGH60wDV5gx1Y3zsOUTC+UHgJ4jH4QLV4uXbnMSiJin92lbxnBWA==",
"dependencies": {
"Umbraco.Cms.Web.Common": "[14.0.0, 15.0.0)"
}
Expand Down

This file was deleted.

Loading