From 2dbd050e6472e156ff9175b52ab2239552559fad Mon Sep 17 00:00:00 2001 From: Matt Date: Fri, 6 Jun 2025 00:44:10 +0100 Subject: [PATCH] Revert ChecklistItem back from Record to Class and remove left over RadioListActivity. Update Nuget packages. --- src/apps/Elsa.Server.Web/RadioListActivity.cs | 42 ------------------- .../Shared/UIHints/CheckList/CheckListItem.cs | 9 +++- 2 files changed, 8 insertions(+), 43 deletions(-) delete mode 100644 src/apps/Elsa.Server.Web/RadioListActivity.cs diff --git a/src/apps/Elsa.Server.Web/RadioListActivity.cs b/src/apps/Elsa.Server.Web/RadioListActivity.cs deleted file mode 100644 index 2e7a38208..000000000 --- a/src/apps/Elsa.Server.Web/RadioListActivity.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System.Runtime.CompilerServices; -using Elsa.Workflows; -using Elsa.Workflows.Attributes; -using Elsa.Workflows.UIHints; -using Elsa.Workflows.Models; - -// ReSharper disable once CheckNamespace -namespace Elsa.Server.Web; - -/// -/// Executes C# code. -/// -[Activity("Elsa", "TESTS", "Tests Radio List Functionality", DisplayName = "TEST")] -public class TestRadioList : CodeActivity -{ - /// - public TestRadioList([CallerFilePath] string? source = null, [CallerLineNumber] int? line = null) : base(source, line) - { - } - - /// - public TestRadioList(string script, [CallerFilePath] string? source = null, [CallerLineNumber] int? line = null) : this(source, line) - { - } - - /// - /// The script to run. - /// - [Input( - Description = "Choose to download one file or entire folder", - DefaultValue = "File", - Options = new[] { "File", "Folder" }, - UIHint = InputUIHints.RadioList - )] - public Input SelectedRadioOption { get; set; } = default!; - - /// - protected override async ValueTask ExecuteAsync(ActivityExecutionContext context) - { - - } -} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Shared/UIHints/CheckList/CheckListItem.cs b/src/clients/Elsa.Api.Client/Shared/UIHints/CheckList/CheckListItem.cs index 62d5e6bf5..abeeee9a2 100644 --- a/src/clients/Elsa.Api.Client/Shared/UIHints/CheckList/CheckListItem.cs +++ b/src/clients/Elsa.Api.Client/Shared/UIHints/CheckList/CheckListItem.cs @@ -3,4 +3,11 @@ namespace Elsa.Api.Client.Shared.UIHints.CheckList; /// /// Represents an item in a . /// -public record CheckListItem(string Text, string Value, bool IsChecked); \ No newline at end of file +public class CheckListItem +{ +#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. + public string Text { get; set; } + public string Value { get; set; } +#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. + public bool IsChecked { get; set; } +} \ No newline at end of file