Fix to Webhook Activity Editor
Fix to Webhook Activity Editor - Path is readonly
This commit is contained in:
parent
57461a4e94
commit
418fbc72cf
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@ namespace Elsa.Metadata
|
|||
float order = 0,
|
||||
object? defaultValue = default,
|
||||
string? defaultSyntax = "Literal",
|
||||
IEnumerable<string>? supportedSyntaxes = default)
|
||||
IEnumerable<string>? 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<string>();
|
||||
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<string> SupportedSyntaxes { get; set; } = new List<string>();
|
||||
public bool IsReadonly { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
<elsa-property-editor propertyDescriptor={propertyDescriptor}
|
||||
|
|
|
|||
|
|
@ -26,11 +26,11 @@ export class ElsaSingleLineProperty {
|
|||
this.currentValue = e.detail;
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
render() {
|
||||
const propertyDescriptor = this.propertyDescriptor;
|
||||
const propertyModel = this.propertyModel;
|
||||
const propertyName = propertyDescriptor.name;
|
||||
const readonly = propertyDescriptor.isReadonly;
|
||||
const fieldId = propertyName;
|
||||
const fieldName = propertyName;
|
||||
let value = this.currentValue;
|
||||
|
|
@ -46,7 +46,7 @@ export class ElsaSingleLineProperty {
|
|||
onDefaultSyntaxValueChanged={e => this.onDefaultSyntaxValueChanged(e)}
|
||||
editor-height="2.75em"
|
||||
single-line={true}>
|
||||
<input type="text" id={fieldId} name={fieldName} value={value} onChange={e => 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"/>
|
||||
<input type="text" id={fieldId} name={fieldName} value={value} readonly={readonly} onChange={e => 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"/>
|
||||
</elsa-property-editor>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -271,7 +271,8 @@ export interface ActivityPropertyDescriptor {
|
|||
category?: string;
|
||||
defaultValue?: any;
|
||||
defaultSyntax?: string;
|
||||
supportedSyntaxes: Array<string>
|
||||
supportedSyntaxes: Array<string>;
|
||||
isReadonly: boolean;
|
||||
}
|
||||
|
||||
export interface PagedList<T> {
|
||||
|
|
|
|||
Loading…
Reference in a new issue