diff --git a/.idea/.idea.blocktrust.CredentialWorkflow/.idea/inspectionProfiles/Project_Default.xml b/.idea/.idea.blocktrust.CredentialWorkflow/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..463ce50
--- /dev/null
+++ b/.idea/.idea.blocktrust.CredentialWorkflow/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/config/applicationhost.config b/.idea/config/applicationhost.config
new file mode 100644
index 0000000..4ef560c
--- /dev/null
+++ b/.idea/config/applicationhost.config
@@ -0,0 +1,1019 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Blocktrust.CredentialWorkflow.Web/Components/Features/Triggers/FormTrigger.razor b/Blocktrust.CredentialWorkflow.Web/Components/Features/Triggers/FormTrigger.razor
index cf80aa1..34c76d8 100644
--- a/Blocktrust.CredentialWorkflow.Web/Components/Features/Triggers/FormTrigger.razor
+++ b/Blocktrust.CredentialWorkflow.Web/Components/Features/Triggers/FormTrigger.razor
@@ -1,15 +1,8 @@
@using Blocktrust.CredentialWorkflow.Core.Domain.ProcessFlow.Triggers
-@using System.Text.RegularExpressions
+@using Blocktrust.CredentialWorkflow.Web.Services
@namespace Blocktrust.CredentialWorkflow.Web.Components.Features.Triggers
- @if (showToast)
- {
-
- @toastMessage
-
- }
-
@@ -25,44 +18,39 @@
@FormUrl
-
Form Fields
All fields are required by default
-
- @foreach (var param in Parameters)
+ @foreach (var param in fields)
{
-
+
@if (param.IsEditing)
{
+ @bind="param.Name"
+ @bind:event="oninput"
+ @onchange="async () => await HandleFieldChange(param)"/>
-
-
-
-
+
}
else
{
@@ -76,35 +64,27 @@
edit
}
-
@if (param.IsEditing)
{
}
else
@@ -113,12 +93,6 @@
{
@param.Description
}
- @if (param.AllowedValues?.Any() == true)
- {
-
- Allowed values: @string.Join(", ", param.AllowedValues)
-
- }
@if (!string.IsNullOrEmpty(param.DefaultValue))
{
@@ -126,34 +100,16 @@
}
}
-
- @if (!string.IsNullOrEmpty(param.ValidationError))
- {
-
@param.ValidationError
- }
}
-
-
-
- @if (Parameters.Any(p => !p.IsEditing && !string.IsNullOrEmpty(p.Name)))
- {
-
- }
@@ -161,39 +117,43 @@
[Parameter] public TriggerInputForm TriggerInput { get; set; } = null!;
[Parameter] public EventCallback OnChange { get; set; }
[Parameter] public Guid WorkflowId { get; set; }
-
[Inject] private NavigationManager NavigationManager { get; set; } = default!;
- [Inject] private IJSRuntime JSRuntime { get; set; } = default!;
-
- private string? toastMessage;
- private bool showToast;
- private List