diff --git a/src/activities/webhooks/Elsa.Activities.Webhooks/ActivityTypes/WebhookActivityTypeProvider.cs b/src/activities/webhooks/Elsa.Activities.Webhooks/ActivityTypes/WebhookActivityTypeProvider.cs index b39d91b75..c6748a573 100644 --- a/src/activities/webhooks/Elsa.Activities.Webhooks/ActivityTypes/WebhookActivityTypeProvider.cs +++ b/src/activities/webhooks/Elsa.Activities.Webhooks/ActivityTypes/WebhookActivityTypeProvider.cs @@ -70,7 +70,8 @@ namespace Elsa.Activities.Webhooks.ActivityTypes 0, webhook.Path, SyntaxNames.Literal, - new[] { SyntaxNames.Literal } + new[] { SyntaxNames.Literal }, + true ), new ActivityInputDescriptor( nameof(HttpEndpoint.Methods), diff --git a/src/core/Elsa.Abstractions/Metadata/ActivityInputDescriptor.cs b/src/core/Elsa.Abstractions/Metadata/ActivityInputDescriptor.cs index 6d0542b64..5a19b7ab8 100644 --- a/src/core/Elsa.Abstractions/Metadata/ActivityInputDescriptor.cs +++ b/src/core/Elsa.Abstractions/Metadata/ActivityInputDescriptor.cs @@ -21,7 +21,8 @@ namespace Elsa.Metadata float order = 0, object? defaultValue = default, string? defaultSyntax = "Literal", - IEnumerable? supportedSyntaxes = default) + IEnumerable? supportedSyntaxes = default, + bool isReadonly = false) { Name = name; Type = type; @@ -34,6 +35,7 @@ namespace Elsa.Metadata DefaultValue = defaultValue; DefaultSyntax = defaultSyntax; SupportedSyntaxes = supportedSyntaxes?.ToList() ?? new List(); + IsReadonly = isReadonly; } public string Name { get; set; } = default!; @@ -47,5 +49,6 @@ namespace Elsa.Metadata public object? DefaultValue { get; set; } public string? DefaultSyntax { get; set; } public IList SupportedSyntaxes { get; set; } = new List(); + public bool IsReadonly { get; set; } } } \ No newline at end of file diff --git a/src/designer/elsa-workflows-studio/src/components/editors/properties/elsa-check-list-property/elsa-check-list-property.tsx b/src/designer/elsa-workflows-studio/src/components/editors/properties/elsa-check-list-property/elsa-check-list-property.tsx index 486b022a9..2c17c409d 100644 --- a/src/designer/elsa-workflows-studio/src/components/editors/properties/elsa-check-list-property/elsa-check-list-property.tsx +++ b/src/designer/elsa-workflows-studio/src/components/editors/properties/elsa-check-list-property/elsa-check-list-property.tsx @@ -23,6 +23,7 @@ export class ElsaCheckListProperty { } onCheckChanged(e: Event) { + debugger const checkbox = (e.target as HTMLInputElement); const checked = checkbox.checked; const value = checkbox.value; @@ -46,7 +47,6 @@ export class ElsaCheckListProperty { } render() { - const propertyDescriptor = this.propertyDescriptor; const propertyModel = this.propertyModel; const fieldId = propertyDescriptor.name; diff --git a/src/designer/elsa-workflows-studio/src/components/editors/properties/elsa-checkbox-property/elsa-checkbox-property.tsx b/src/designer/elsa-workflows-studio/src/components/editors/properties/elsa-checkbox-property/elsa-checkbox-property.tsx index f3841c587..9aea69fa3 100644 --- a/src/designer/elsa-workflows-studio/src/components/editors/properties/elsa-checkbox-property/elsa-checkbox-property.tsx +++ b/src/designer/elsa-workflows-studio/src/components/editors/properties/elsa-checkbox-property/elsa-checkbox-property.tsx @@ -33,7 +33,7 @@ export class ElsaCheckBoxProperty { const fieldId = propertyName; const fieldName = propertyName; const fieldLabel = propertyDescriptor.label || propertyName; - const isChecked = this.isChecked; + let isChecked = this.isChecked; return ( this.onDefaultSyntaxValueChanged(e)} editor-height="2.75em" single-line={true}> - this.onChange(e)} class="focus:elsa-ring-blue-500 focus:elsa-border-blue-500 elsa-block elsa-w-full elsa-min-w-0 elsa-rounded-md sm:elsa-text-sm elsa-border-gray-300"/> + this.onChange(e)} class="focus:elsa-ring-blue-500 focus:elsa-border-blue-500 elsa-block elsa-w-full elsa-min-w-0 elsa-rounded-md sm:elsa-text-sm elsa-border-gray-300"/> ); } diff --git a/src/designer/elsa-workflows-studio/src/models/domain.ts b/src/designer/elsa-workflows-studio/src/models/domain.ts index 976b6644b..ea175e988 100644 --- a/src/designer/elsa-workflows-studio/src/models/domain.ts +++ b/src/designer/elsa-workflows-studio/src/models/domain.ts @@ -271,7 +271,8 @@ export interface ActivityPropertyDescriptor { category?: string; defaultValue?: any; defaultSyntax?: string; - supportedSyntaxes: Array + supportedSyntaxes: Array; + isReadonly: boolean; } export interface PagedList {