Skip to content

Commit

Permalink
Merge branch 'main' into ns/#15363
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek authored Feb 24, 2024
2 parents c812c17 + 09ef3a8 commit 066bd85
Show file tree
Hide file tree
Showing 198 changed files with 2,332 additions and 2,207 deletions.
2 changes: 1 addition & 1 deletion src/OrchardCore.Build/Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<PackageManagement Include="Serilog.AspNetCore" Version="7.0.0" />
<PackageManagement Include="Shortcodes" Version="1.3.3" />
<PackageManagement Include="SixLabors.ImageSharp.Web" Version="3.1.0" />
<PackageManagement Include="StackExchange.Redis" Version="2.7.17" />
<PackageManagement Include="StackExchange.Redis" Version="2.7.20" />
<PackageManagement Include="StyleCop.Analyzers" Version="1.1.118" />
<PackageManagement Include="System.Linq.Async" Version="6.0.1" />
<PackageManagement Include="xunit" Version="2.7.0" />
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "orchardcore.admindashboard",
"version": "1.0.0",
"dependencies": {
"bootstrap": "5.3.2"
"bootstrap": "5.3.3"
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
using System.Text.Json;
using System.Text.Json.Nodes;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
using OrchardCore.AdminMenu.Services;
using OrchardCore.Deployment;
using OrchardCore.Json;

namespace OrchardCore.AdminMenu.Deployment
{
Expand All @@ -14,15 +12,10 @@ public class AdminMenuDeploymentSource : IDeploymentSource
private readonly IAdminMenuService _adminMenuService;
private readonly JsonSerializerOptions _serializationOptions;

public AdminMenuDeploymentSource(IAdminMenuService adminMenuService, IOptions<JsonDerivedTypesOptions> derivedTypesOptions)
public AdminMenuDeploymentSource(IAdminMenuService adminMenuService, IOptions<JsonSerializerOptions> serializationOptions)
{
_adminMenuService = adminMenuService;

// The recipe step contains polymorphic types which need to be resolved
_serializationOptions = new()
{
TypeInfoResolver = new PolymorphicJsonTypeInfoResolver(derivedTypesOptions.Value)
};
_serializationOptions = serializationOptions.Value;
}

public async Task ProcessDeploymentStepAsync(DeploymentStep step, DeploymentPlanResult result)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
using System.Linq;
using System.Text.Json;
using System.Text.Json.Nodes;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
using OrchardCore.AdminMenu.Services;
using OrchardCore.Json;
using OrchardCore.Recipes.Models;
using OrchardCore.Recipes.Services;

Expand All @@ -20,15 +18,14 @@ public class AdminMenuStep : IRecipeStepHandler
private readonly IAdminMenuService _adminMenuService;
private readonly JsonSerializerOptions _serializationOptions;

public AdminMenuStep(IAdminMenuService adminMenuService, IOptions<JsonDerivedTypesOptions> derivedTypesOptions)
public AdminMenuStep(
IAdminMenuService adminMenuService,
IOptions<JsonSerializerOptions> serializationOptions)
{
_adminMenuService = adminMenuService;

// The recipe step contains polymorphic types (menu items) which need to be resolved
_serializationOptions = new()
{
TypeInfoResolver = new PolymorphicJsonTypeInfoResolver(derivedTypesOptions.Value)
};
_serializationOptions = serializationOptions.Value;
}

public async Task ExecuteAsync(RecipeExecutionContext context)
Expand All @@ -38,7 +35,7 @@ public async Task ExecuteAsync(RecipeExecutionContext context)
return;
}

var model = context.Step.ToObject<AdminMenuStepModel>();
var model = context.Step.ToObject<AdminMenuStepModel>(_serializationOptions);

foreach (var token in model.Data.Cast<JsonObject>())
{
Expand Down
14 changes: 7 additions & 7 deletions src/OrchardCore.Modules/OrchardCore.AdminMenu/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.AdminMenu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "orchardcore.adminmenu",
"version": "1.0.0",
"dependencies": {
"bootstrap": "5.3.2",
"bootstrap": "5.3.3",
"fontawesome-iconpicker": "3.2.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using GraphQL;
using GraphQL.DataLoader;
using GraphQL.Execution;
Expand All @@ -14,7 +15,6 @@
using OrchardCore.Modules;
using OrchardCore.Navigation;
using OrchardCore.Security.Permissions;
using System;

namespace OrchardCore.Apis.GraphQL
{
Expand Down
14 changes: 7 additions & 7 deletions src/OrchardCore.Modules/OrchardCore.AuditTrail/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"description": "A diff module for OrchardCore.",
"dependencies": {
"bootstrap": "5.3.2",
"bootstrap": "5.3.3",
"diff": "5.1.0",
"react": "^16.14.0",
"react-diff-viewer": "^3.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class AutoroutePartHandler : ContentPartHandler<AutoroutePart>
private readonly ITagCache _tagCache;
private readonly ISession _session;
private readonly IServiceProvider _serviceProvider;

protected readonly IStringLocalizer S;

private IContentManager _contentManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ public class Migrations : DataMigration
private readonly IContentDefinitionManager _contentDefinitionManager;
private readonly ShellDescriptor _shellDescriptor;

public Migrations(IContentDefinitionManager contentDefinitionManager, ShellDescriptor shellDescriptor)
public Migrations(
IContentDefinitionManager contentDefinitionManager,
ShellDescriptor shellDescriptor)
{
_contentDefinitionManager = contentDefinitionManager;
_shellDescriptor = shellDescriptor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ public override IDisplayResult Edit(ContentPartFieldDefinition partFieldDefiniti
model.TextPlaceholder = settings.TextPlaceholder;
model.DefaultUrl = settings.DefaultUrl;
model.DefaultText = settings.DefaultText;
})
.Location("Content");
}).Location("Content");
}

public override async Task<IDisplayResult> UpdateAsync(ContentPartFieldDefinition partFieldDefinition, UpdatePartFieldEditorContext context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,19 @@ public class ListValueOption

[JsonPropertyName("value")]
public string Value { get; set; }

public ListValueOption()
{
}

public ListValueOption(string name) : this(name, name)
{
}

public ListValueOption(string name, string value)
{
Name = name;
Value = value;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ public override IDisplayResult Edit(ContentPartFieldDefinition partFieldDefiniti
model.Hint = settings.Hint;
model.Required = settings.Required;
model.DefaultValue = settings.DefaultValue;
})
.Location("Content");
}).Location("Content");
}

public override async Task<IDisplayResult> UpdateAsync(ContentPartFieldDefinition partFieldDefinition, UpdatePartFieldEditorContext context)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using Fluid;
using Microsoft.Extensions.DependencyInjection;
using OrchardCore.ContentFields.Drivers;
Expand All @@ -15,7 +16,6 @@
using OrchardCore.Data.Migration;
using OrchardCore.Indexing;
using OrchardCore.Modules;
using System;

namespace OrchardCore.ContentFields
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "orchardcore.contentfields",
"version": "1.0.0",
"dependencies": {
"bootstrap": "5.3.2"
"bootstrap": "5.3.3"
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using System;
using System.Globalization;
using Fluid;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Builder;
Expand All @@ -23,8 +25,6 @@
using OrchardCore.Security.Permissions;
using OrchardCore.Settings;
using OrchardCore.Sitemaps.Builders;
using System;
using System.Globalization;

namespace OrchardCore.ContentLocalization
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ public class AuditTrailContentEventDisplayDriver : AuditTrailEventSectionDisplay
private readonly IAuditTrailManager _auditTrailManager;
private readonly ISession _session;

public AuditTrailContentEventDisplayDriver(IAuditTrailManager auditTrailManager, ISession session)
public AuditTrailContentEventDisplayDriver(
IAuditTrailManager auditTrailManager,
ISession session)
{
_auditTrailManager = auditTrailManager;
_session = session;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ public class DownloadController : Controller

public DownloadController(
IAuthorizationService authorizationService,
IContentManager contentManager
)
IContentManager contentManager)
{
_authorizationService = authorizationService;
_contentManager = contentManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public class BuildDisplayFilter : ILiquidFilter
private readonly IContentItemDisplayManager _contentItemDisplayManager;
private readonly IUpdateModelAccessor _updateModelAccessor;

public BuildDisplayFilter(IContentItemRecursionHelper<BuildDisplayFilter> buildDisplayRecursionHelper,
public BuildDisplayFilter(
IContentItemRecursionHelper<BuildDisplayFilter> buildDisplayRecursionHelper,
IContentItemDisplayManager contentItemDisplayManager,
IUpdateModelAccessor updateModelAccessor)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ public class FullTextFilter : ILiquidFilter
private readonly IContentManager _contentManager;
private readonly IContentItemRecursionHelper<FullTextFilter> _fullTextRecursionHelper;

public FullTextFilter(IContentManager contentManager, IContentItemRecursionHelper<FullTextFilter> fullTextRecursionHelper)
public FullTextFilter(
IContentManager contentManager,
IContentItemRecursionHelper<FullTextFilter> fullTextRecursionHelper)
{
_contentManager = contentManager;
_fullTextRecursionHelper = fullTextRecursionHelper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public Task ExecuteAsync(RecipeExecutionContext context)
}

// Otherwise, the import of content items is deferred after all migrations are completed,
// this prevents e.g. a content handler to trigger a workflow before worflows migrations.
// this prevents e.g. a content handler to trigger a workflow before workflows migrations.
ShellScope.AddDeferredTask(scope =>
{
var contentManager = scope.ServiceProvider.GetRequiredService<IContentManager>();
Expand Down
Loading

0 comments on commit 066bd85

Please sign in to comment.