Removed web UI related code
This commit is contained in:
parent
2f5feb0f76
commit
e24116681f
75
Elsa.sln
75
Elsa.sln
|
|
@ -13,8 +13,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "solution", "solution", "{71
|
|||
.gitignore = .gitignore
|
||||
Nuget.Config = Nuget.Config
|
||||
README.md = README.md
|
||||
gulpfile.js = gulpfile.js
|
||||
package.json = package.json
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elsa.Abstractions", "src\core\Elsa.Abstractions\Elsa.Abstractions.csproj", "{3130C574-557C-4DA2-933E-AED7A9EBE48A}"
|
||||
|
|
@ -27,24 +25,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elsa.Runtime.Abstractions",
|
|||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{35F44BE9-13D0-417C-A01A-F0787BEE6DC3}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Web", "Web", "{B33F1927-FF0A-4826-80C6-F480E9C43892}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Web.Management", "src\web\modules\Elsa.Web.Management\Elsa.Web.Management.csproj", "{A00D0A17-CD30-49DF-908E-85744FA55A1A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Web.Components", "src\web\modules\Elsa.Web.Components\Elsa.Web.Components.csproj", "{71687B0E-37D1-4AEB-A620-1F884CAC4C8E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Persistence.FileSystem", "src\core\Elsa.Persistence.FileSystem\Elsa.Persistence.FileSystem.csproj", "{1579117E-229F-4E48-812B-7A235A4DB7E5}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Web.Abstractions", "src\web\modules\Elsa.Web.Abstractions\Elsa.Web.Abstractions.csproj", "{E04F98D6-F6B3-475F-BCAA-F0D586EE3965}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Activities.Primitives", "src\activities\Elsa.Activities.Primitives\Elsa.Activities.Primitives.csproj", "{E7DE9E53-2CF0-4F45-BF82-C470A19F0CF7}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Activities.Console", "src\activities\Elsa.Activities.Console\Elsa.Activities.Console.csproj", "{B98B80CB-D3A3-437C-A61C-ED82C8C77B2F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Activities.Console.Web", "src\web\modules\Elsa.Activities.Console.Web\Elsa.Activities.Console.Web.csproj", "{444A7B77-ECB1-4D3B-A0F2-B9A41C6E8ACD}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Activities.Primitives.Web", "src\web\modules\Elsa.Activities.Primitives.Web\Elsa.Activities.Primitives.Web.csproj", "{B588D068-1ADE-4DB3-84BB-D8BA95897FAC}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{C55090FE-8506-4FDA-928F-5ACBB9CBE019}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Activities.Http", "src\activities\Elsa.Activities.Http\Elsa.Activities.Http.csproj", "{1D63E1B4-2386-4BEC-9090-C3F3CBF25703}"
|
||||
|
|
@ -53,22 +39,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Activities", "Activities",
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleHost.Web", "src\samples\SampleHost.Web\SampleHost.Web.csproj", "{05D06E92-E52D-4186-9382-C27D293AE4D1}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Activities.Http.Web", "src\web\modules\Elsa.Activities.Http.Web\Elsa.Activities.Http.Web.csproj", "{F4EC0B11-8E24-43C8-983B-38B7321FC4F9}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Web.BootstrapTheme", "src\web\themes\Elsa.Web.BootstrapTheme\Elsa.Web.BootstrapTheme.csproj", "{B5E36E84-1978-43C7-8859-F5184C9A657C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleDashboard.Web", "src\samples\SampleDashboard.Web\SampleDashboard.Web.csproj", "{27BD3AE7-8D3B-4D19-A8E3-4DC6922C2213}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Persistence.InMemory", "src\core\Elsa.Persistence.InMemory\Elsa.Persistence.InMemory.csproj", "{089E23E7-0B8D-4BB6-949D-EB669C116D9E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Activities.Email", "src\activities\Elsa.Activities.Email\Elsa.Activities.Email.csproj", "{D20FCB88-9DCA-49EA-9CC2-5B94DD935D30}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Activities.Email.Web", "src\web\modules\Elsa.Activities.Email.Web\Elsa.Activities.Email.Web.csproj", "{6B5E8D2F-3C4A-407A-B78C-DF4C3B32FF92}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Activities.Cron", "src\activities\Elsa.Activities.Cron\Elsa.Activities.Cron.csproj", "{E4B71DC4-3E73-49C3-9B4E-CA13909F222D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Activities.Cron.Web", "src\web\modules\Elsa.Activities.Cron.Web\Elsa.Activities.Cron.Web.csproj", "{FE6ECF63-D3FC-44EA-8405-C2A73F7C00C8}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Runtime.Hosting", "src\core\Elsa.Runtime.Hosting\Elsa.Runtime.Hosting.csproj", "{4728D287-E4F4-4219-8066-924B53E6E17C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloWorldProgram", "src\samples\HelloWorldProgram\HelloWorldProgram.csproj", "{92750B10-8DAF-4E4F-8999-33304034EDF4}"
|
||||
|
|
@ -105,22 +81,10 @@ Global
|
|||
{792362BF-D26D-46E9-8970-E5668941AA75}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{792362BF-D26D-46E9-8970-E5668941AA75}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{792362BF-D26D-46E9-8970-E5668941AA75}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A00D0A17-CD30-49DF-908E-85744FA55A1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A00D0A17-CD30-49DF-908E-85744FA55A1A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A00D0A17-CD30-49DF-908E-85744FA55A1A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A00D0A17-CD30-49DF-908E-85744FA55A1A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{71687B0E-37D1-4AEB-A620-1F884CAC4C8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{71687B0E-37D1-4AEB-A620-1F884CAC4C8E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{71687B0E-37D1-4AEB-A620-1F884CAC4C8E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{71687B0E-37D1-4AEB-A620-1F884CAC4C8E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1579117E-229F-4E48-812B-7A235A4DB7E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1579117E-229F-4E48-812B-7A235A4DB7E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1579117E-229F-4E48-812B-7A235A4DB7E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1579117E-229F-4E48-812B-7A235A4DB7E5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E04F98D6-F6B3-475F-BCAA-F0D586EE3965}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E04F98D6-F6B3-475F-BCAA-F0D586EE3965}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E04F98D6-F6B3-475F-BCAA-F0D586EE3965}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E04F98D6-F6B3-475F-BCAA-F0D586EE3965}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E7DE9E53-2CF0-4F45-BF82-C470A19F0CF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E7DE9E53-2CF0-4F45-BF82-C470A19F0CF7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E7DE9E53-2CF0-4F45-BF82-C470A19F0CF7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
|
@ -129,14 +93,6 @@ Global
|
|||
{B98B80CB-D3A3-437C-A61C-ED82C8C77B2F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B98B80CB-D3A3-437C-A61C-ED82C8C77B2F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B98B80CB-D3A3-437C-A61C-ED82C8C77B2F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{444A7B77-ECB1-4D3B-A0F2-B9A41C6E8ACD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{444A7B77-ECB1-4D3B-A0F2-B9A41C6E8ACD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{444A7B77-ECB1-4D3B-A0F2-B9A41C6E8ACD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{444A7B77-ECB1-4D3B-A0F2-B9A41C6E8ACD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B588D068-1ADE-4DB3-84BB-D8BA95897FAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B588D068-1ADE-4DB3-84BB-D8BA95897FAC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B588D068-1ADE-4DB3-84BB-D8BA95897FAC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B588D068-1ADE-4DB3-84BB-D8BA95897FAC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1D63E1B4-2386-4BEC-9090-C3F3CBF25703}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1D63E1B4-2386-4BEC-9090-C3F3CBF25703}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1D63E1B4-2386-4BEC-9090-C3F3CBF25703}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
|
@ -145,18 +101,6 @@ Global
|
|||
{05D06E92-E52D-4186-9382-C27D293AE4D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{05D06E92-E52D-4186-9382-C27D293AE4D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{05D06E92-E52D-4186-9382-C27D293AE4D1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F4EC0B11-8E24-43C8-983B-38B7321FC4F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F4EC0B11-8E24-43C8-983B-38B7321FC4F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F4EC0B11-8E24-43C8-983B-38B7321FC4F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F4EC0B11-8E24-43C8-983B-38B7321FC4F9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B5E36E84-1978-43C7-8859-F5184C9A657C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B5E36E84-1978-43C7-8859-F5184C9A657C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B5E36E84-1978-43C7-8859-F5184C9A657C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B5E36E84-1978-43C7-8859-F5184C9A657C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{27BD3AE7-8D3B-4D19-A8E3-4DC6922C2213}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{27BD3AE7-8D3B-4D19-A8E3-4DC6922C2213}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{27BD3AE7-8D3B-4D19-A8E3-4DC6922C2213}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{27BD3AE7-8D3B-4D19-A8E3-4DC6922C2213}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{089E23E7-0B8D-4BB6-949D-EB669C116D9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{089E23E7-0B8D-4BB6-949D-EB669C116D9E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{089E23E7-0B8D-4BB6-949D-EB669C116D9E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
|
@ -165,18 +109,10 @@ Global
|
|||
{D20FCB88-9DCA-49EA-9CC2-5B94DD935D30}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D20FCB88-9DCA-49EA-9CC2-5B94DD935D30}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D20FCB88-9DCA-49EA-9CC2-5B94DD935D30}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6B5E8D2F-3C4A-407A-B78C-DF4C3B32FF92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6B5E8D2F-3C4A-407A-B78C-DF4C3B32FF92}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6B5E8D2F-3C4A-407A-B78C-DF4C3B32FF92}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6B5E8D2F-3C4A-407A-B78C-DF4C3B32FF92}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E4B71DC4-3E73-49C3-9B4E-CA13909F222D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E4B71DC4-3E73-49C3-9B4E-CA13909F222D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E4B71DC4-3E73-49C3-9B4E-CA13909F222D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E4B71DC4-3E73-49C3-9B4E-CA13909F222D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FE6ECF63-D3FC-44EA-8405-C2A73F7C00C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FE6ECF63-D3FC-44EA-8405-C2A73F7C00C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FE6ECF63-D3FC-44EA-8405-C2A73F7C00C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FE6ECF63-D3FC-44EA-8405-C2A73F7C00C8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4728D287-E4F4-4219-8066-924B53E6E17C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4728D287-E4F4-4219-8066-924B53E6E17C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4728D287-E4F4-4219-8066-924B53E6E17C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
|
@ -208,7 +144,6 @@ Global
|
|||
{3C1DCAA2-D77E-4F96-9899-DA8E0E0C757F} = {35F44BE9-13D0-417C-A01A-F0787BEE6DC3}
|
||||
{792362BF-D26D-46E9-8970-E5668941AA75} = {35F44BE9-13D0-417C-A01A-F0787BEE6DC3}
|
||||
{35F44BE9-13D0-417C-A01A-F0787BEE6DC3} = {DA71CDAA-8DD3-4D5F-9FBD-8E4B37A2D925}
|
||||
{B33F1927-FF0A-4826-80C6-F480E9C43892} = {DA71CDAA-8DD3-4D5F-9FBD-8E4B37A2D925}
|
||||
{1579117E-229F-4E48-812B-7A235A4DB7E5} = {35F44BE9-13D0-417C-A01A-F0787BEE6DC3}
|
||||
{C55090FE-8506-4FDA-928F-5ACBB9CBE019} = {DA71CDAA-8DD3-4D5F-9FBD-8E4B37A2D925}
|
||||
{B43B546E-23F3-46E8-ACB7-D04F05CDA180} = {DA71CDAA-8DD3-4D5F-9FBD-8E4B37A2D925}
|
||||
|
|
@ -216,11 +151,6 @@ Global
|
|||
{1D63E1B4-2386-4BEC-9090-C3F3CBF25703} = {B43B546E-23F3-46E8-ACB7-D04F05CDA180}
|
||||
{E7DE9E53-2CF0-4F45-BF82-C470A19F0CF7} = {B43B546E-23F3-46E8-ACB7-D04F05CDA180}
|
||||
{05D06E92-E52D-4186-9382-C27D293AE4D1} = {C55090FE-8506-4FDA-928F-5ACBB9CBE019}
|
||||
{71687B0E-37D1-4AEB-A620-1F884CAC4C8E} = {B33F1927-FF0A-4826-80C6-F480E9C43892}
|
||||
{A00D0A17-CD30-49DF-908E-85744FA55A1A} = {B33F1927-FF0A-4826-80C6-F480E9C43892}
|
||||
{E04F98D6-F6B3-475F-BCAA-F0D586EE3965} = {B33F1927-FF0A-4826-80C6-F480E9C43892}
|
||||
{B5E36E84-1978-43C7-8859-F5184C9A657C} = {B33F1927-FF0A-4826-80C6-F480E9C43892}
|
||||
{27BD3AE7-8D3B-4D19-A8E3-4DC6922C2213} = {C55090FE-8506-4FDA-928F-5ACBB9CBE019}
|
||||
{089E23E7-0B8D-4BB6-949D-EB669C116D9E} = {35F44BE9-13D0-417C-A01A-F0787BEE6DC3}
|
||||
{D20FCB88-9DCA-49EA-9CC2-5B94DD935D30} = {B43B546E-23F3-46E8-ACB7-D04F05CDA180}
|
||||
{E4B71DC4-3E73-49C3-9B4E-CA13909F222D} = {B43B546E-23F3-46E8-ACB7-D04F05CDA180}
|
||||
|
|
@ -229,11 +159,6 @@ Global
|
|||
{B22D8641-A012-4942-BC93-EF2451B91959} = {C55090FE-8506-4FDA-928F-5ACBB9CBE019}
|
||||
{A031678D-93D2-435A-9532-D5509C09278B} = {C55090FE-8506-4FDA-928F-5ACBB9CBE019}
|
||||
{B539D4D3-4E3B-423D-AEC8-E63912D08C81} = {C55090FE-8506-4FDA-928F-5ACBB9CBE019}
|
||||
{444A7B77-ECB1-4D3B-A0F2-B9A41C6E8ACD} = {B43B546E-23F3-46E8-ACB7-D04F05CDA180}
|
||||
{FE6ECF63-D3FC-44EA-8405-C2A73F7C00C8} = {B43B546E-23F3-46E8-ACB7-D04F05CDA180}
|
||||
{6B5E8D2F-3C4A-407A-B78C-DF4C3B32FF92} = {B43B546E-23F3-46E8-ACB7-D04F05CDA180}
|
||||
{F4EC0B11-8E24-43C8-983B-38B7321FC4F9} = {B43B546E-23F3-46E8-ACB7-D04F05CDA180}
|
||||
{B588D068-1ADE-4DB3-84BB-D8BA95897FAC} = {B43B546E-23F3-46E8-ACB7-D04F05CDA180}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {8B0975FD-7050-48B0-88C5-48C33378E158}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
theme: jekyll-theme-architect
|
||||
277
gulpfile.js
277
gulpfile.js
|
|
@ -1,277 +0,0 @@
|
|||
var fs = require("file-system"),
|
||||
glob = require("glob"),
|
||||
path = require("path-posix"),
|
||||
merge = require("merge-stream"),
|
||||
gulp = require("gulp"),
|
||||
gulpif = require("gulp-if"),
|
||||
print = require("gulp-print"),
|
||||
debug = require("gulp-debug"),
|
||||
newer = require("gulp-newer"),
|
||||
plumber = require("gulp-plumber"),
|
||||
sourcemaps = require("gulp-sourcemaps"),
|
||||
less = require("gulp-less"),
|
||||
scss = require("gulp-sass"),
|
||||
cssnano = require("gulp-cssnano"),
|
||||
typescript = require("gulp-typescript"),
|
||||
uglify = require("gulp-uglify"),
|
||||
rename = require("gulp-rename"),
|
||||
concat = require("gulp-concat"),
|
||||
header = require("gulp-header"),
|
||||
eol = require("gulp-eol");
|
||||
|
||||
// For compat with older versions of Node.js.
|
||||
require("es6-promise").polyfill();
|
||||
|
||||
// To suppress memory leak warning from gulp.watch().
|
||||
require("events").EventEmitter.prototype._maxListeners = 100;
|
||||
|
||||
/*
|
||||
** GULP TASKS
|
||||
*/
|
||||
|
||||
// Incremental build (each asset group is built only if one or more inputs are newer than the output).
|
||||
gulp.task("build", function () {
|
||||
var assetGroupTasks = getAssetGroups().map(function (assetGroup) {
|
||||
var doRebuild = false;
|
||||
return createAssetGroupTask(assetGroup, doRebuild);
|
||||
});
|
||||
return merge(assetGroupTasks);
|
||||
});
|
||||
|
||||
// Full rebuild (all assets groups are built regardless of timestamps).
|
||||
gulp.task("rebuild", function () {
|
||||
var assetGroupTasks = getAssetGroups().map(function (assetGroup) {
|
||||
var doRebuild = true;
|
||||
return createAssetGroupTask(assetGroup, doRebuild);
|
||||
});
|
||||
return merge(assetGroupTasks);
|
||||
});
|
||||
|
||||
// Continuous watch (each asset group is built whenever one of its inputs changes).
|
||||
gulp.task("watch", function () {
|
||||
var pathWin32 = require("path");
|
||||
getAssetGroups().forEach(function (assetGroup) {
|
||||
var watchPaths = assetGroup.inputPaths.concat(assetGroup.watchPaths);
|
||||
var inputWatcher;
|
||||
function createWatcher() {
|
||||
inputWatcher = gulp.watch(watchPaths, function (event) {
|
||||
var isConcat = path.basename(assetGroup.outputFileName, path.extname(assetGroup.outputFileName)) !== "@";
|
||||
if (isConcat)
|
||||
console.log("Asset file '" + event.path + "' was " + event.type + ", rebuilding asset group with output '" + assetGroup.outputPath + "'.");
|
||||
else
|
||||
console.log("Asset file '" + event.path + "' was " + event.type + ", rebuilding asset group.");
|
||||
var doRebuild = true;
|
||||
var task = createAssetGroupTask(assetGroup, doRebuild);
|
||||
});
|
||||
}
|
||||
createWatcher();
|
||||
gulp.watch(assetGroup.manifestPath, function (event) {
|
||||
console.log("Asset manifest file '" + event.path + "' was " + event.type + ", restarting watcher.");
|
||||
inputWatcher.remove();
|
||||
inputWatcher.end();
|
||||
createWatcher();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
/*
|
||||
** ASSET GROUPS
|
||||
*/
|
||||
|
||||
function getAssetGroups() {
|
||||
var assetManifestPaths = glob.sync("./src/web/*/*/assets.json", {});
|
||||
var assetGroups = [];
|
||||
assetManifestPaths.forEach(function (assetManifestPath) {
|
||||
var assetManifest = require("./" + assetManifestPath);
|
||||
assetManifest.forEach(function (assetGroup) {
|
||||
resolveAssetGroupPaths(assetGroup, assetManifestPath);
|
||||
assetGroups.push(assetGroup);
|
||||
});
|
||||
});
|
||||
return assetGroups;
|
||||
}
|
||||
|
||||
function resolveAssetGroupPaths(assetGroup, assetManifestPath) {
|
||||
assetGroup.manifestPath = assetManifestPath;
|
||||
assetGroup.basePath = path.dirname(assetManifestPath);
|
||||
assetGroup.inputPaths = assetGroup.inputs.map(function (inputPath) {
|
||||
return path.resolve(path.join(assetGroup.basePath, inputPath));
|
||||
});
|
||||
assetGroup.watchPaths = [];
|
||||
if (!!assetGroup.watch) {
|
||||
assetGroup.watchPaths = assetGroup.watch.map(function (watchPath) {
|
||||
return path.resolve(path.join(assetGroup.basePath, watchPath));
|
||||
});
|
||||
}
|
||||
assetGroup.outputPath = path.resolve(path.join(assetGroup.basePath, assetGroup.output));
|
||||
assetGroup.outputDir = path.dirname(assetGroup.outputPath);
|
||||
assetGroup.outputFileName = path.basename(assetGroup.output);
|
||||
// Uncomment to copy assets to wwwroot
|
||||
//assetGroup.webroot = path.join("./src/OrchardCore.Cms.Web/wwwroot/", path.basename(assetGroup.basePath), path.dirname(assetGroup.output));
|
||||
}
|
||||
|
||||
function createAssetGroupTask(assetGroup, doRebuild) {
|
||||
var outputExt = path.extname(assetGroup.output).toLowerCase();
|
||||
var doConcat = path.basename(assetGroup.outputFileName, outputExt) !== "@";
|
||||
if (doConcat && !doRebuild) {
|
||||
// Force a rebuild of this asset group is the asset manifest file itself is newer than the output.
|
||||
var assetManifestStats = fs.statSync(assetGroup.manifestPath);
|
||||
var outputStats = fs.existsSync(assetGroup.outputPath) ? fs.statSync(assetGroup.outputPath) : null;
|
||||
doRebuild = !outputStats || assetManifestStats.mtime > outputStats.mtime;
|
||||
}
|
||||
switch (outputExt) {
|
||||
case ".css":
|
||||
return buildCssPipeline(assetGroup, doConcat, doRebuild);
|
||||
case ".js":
|
||||
return buildJsPipeline(assetGroup, doConcat, doRebuild);
|
||||
}
|
||||
|
||||
if(assetGroup.copy === true){
|
||||
return buildCopyPipeline(assetGroup, doRebuild);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** PROCESSING PIPELINES
|
||||
*/
|
||||
|
||||
function buildCssPipeline(assetGroup, doConcat, doRebuild) {
|
||||
assetGroup.inputPaths.forEach(function (inputPath) {
|
||||
var ext = path.extname(inputPath).toLowerCase();
|
||||
if (ext !== ".scss" && ext !== ".less" && ext !== ".css")
|
||||
throw "Input file '" + inputPath + "' is not of a valid type for output file '" + assetGroup.outputPath + "'.";
|
||||
});
|
||||
var generateSourceMaps = assetGroup.hasOwnProperty("generateSourceMaps") ? assetGroup.generateSourceMaps : true;
|
||||
var containsLessOrScss = assetGroup.inputPaths.some(function (inputPath) {
|
||||
var ext = path.extname(inputPath).toLowerCase();
|
||||
return ext === ".less" || ext === ".scss";
|
||||
});
|
||||
// Source maps are useless if neither concatenating nor transforming.
|
||||
if ((!doConcat || assetGroup.inputPaths.length < 2) && !containsLessOrScss)
|
||||
generateSourceMaps = false;
|
||||
|
||||
var minifiedStream = gulp.src(assetGroup.inputPaths) // Minified output, source mapping completely disabled.
|
||||
.pipe(gulpif(!doRebuild,
|
||||
gulpif(doConcat,
|
||||
newer(assetGroup.outputPath),
|
||||
newer({
|
||||
dest: assetGroup.outputDir,
|
||||
ext: ".css"
|
||||
}))))
|
||||
.pipe(plumber())
|
||||
.pipe(gulpif("*.less", less()))
|
||||
.pipe(gulpif("*.scss", scss({
|
||||
precision: 10,
|
||||
|
||||
})))
|
||||
.pipe(gulpif(doConcat, concat(assetGroup.outputFileName)))
|
||||
.pipe(cssnano({
|
||||
autoprefixer: { browsers: ["last 2 versions"] },
|
||||
discardComments: { removeAll: true },
|
||||
discardUnused: false,
|
||||
mergeIdents: false,
|
||||
reduceIdents: false,
|
||||
zindex: false
|
||||
}))
|
||||
.pipe(rename({
|
||||
suffix: ".min"
|
||||
}))
|
||||
.pipe(eol())
|
||||
.pipe(gulp.dest(assetGroup.outputDir))
|
||||
// Uncomment to copy assets to wwwroot
|
||||
//.pipe(gulp.dest(assetGroup.webroot));
|
||||
var devStream = gulp.src(assetGroup.inputPaths) // Non-minified output, with source mapping
|
||||
.pipe(gulpif(!doRebuild,
|
||||
gulpif(doConcat,
|
||||
newer(assetGroup.outputPath),
|
||||
newer({
|
||||
dest: assetGroup.outputDir,
|
||||
ext: ".css"
|
||||
}))))
|
||||
.pipe(plumber())
|
||||
.pipe(gulpif(generateSourceMaps, sourcemaps.init()))
|
||||
.pipe(gulpif("*.less", less()))
|
||||
.pipe(gulpif("*.scss", scss({
|
||||
precision: 10
|
||||
})))
|
||||
.pipe(gulpif(doConcat, concat(assetGroup.outputFileName)))
|
||||
.pipe(header(
|
||||
"/*\n" +
|
||||
"** NOTE: This file is generated by Gulp and should not be edited directly!\n" +
|
||||
"** Any changes made directly to this file will be overwritten next time its asset group is processed by Gulp.\n" +
|
||||
"*/\n\n"))
|
||||
.pipe(gulpif(generateSourceMaps, sourcemaps.write()))
|
||||
.pipe(eol())
|
||||
.pipe(gulp.dest(assetGroup.outputDir))
|
||||
// Uncomment to copy assets to wwwroot
|
||||
//.pipe(gulp.dest(assetGroup.webroot));
|
||||
return merge([minifiedStream, devStream]);
|
||||
}
|
||||
|
||||
function buildJsPipeline(assetGroup, doConcat, doRebuild) {
|
||||
assetGroup.inputPaths.forEach(function (inputPath) {
|
||||
var ext = path.extname(inputPath).toLowerCase();
|
||||
if (ext !== ".ts" && ext !== ".js")
|
||||
throw "Input file '" + inputPath + "' is not of a valid type for output file '" + assetGroup.outputPath + "'.";
|
||||
});
|
||||
var generateSourceMaps = assetGroup.hasOwnProperty("generateSourceMaps") ? assetGroup.generateSourceMaps : true;
|
||||
// Source maps are useless if neither concatenating nor transforming.
|
||||
if ((!doConcat || assetGroup.inputPaths.length < 2) && !assetGroup.inputPaths.some(function (inputPath) { return path.extname(inputPath).toLowerCase() === ".ts"; }))
|
||||
generateSourceMaps = false;
|
||||
|
||||
console.log(assetGroup.inputPaths);
|
||||
return gulp.src(assetGroup.inputPaths)
|
||||
.pipe(gulpif(!doRebuild,
|
||||
gulpif(doConcat,
|
||||
newer(assetGroup.outputPath),
|
||||
newer({
|
||||
dest: assetGroup.outputDir,
|
||||
ext: ".js"
|
||||
}))))
|
||||
.pipe(plumber())
|
||||
.pipe(gulpif(generateSourceMaps, sourcemaps.init()))
|
||||
.pipe(gulpif("*.ts", typescript({
|
||||
declaration: false,
|
||||
noImplicitAny: true,
|
||||
noEmitOnError: true,
|
||||
lib: [
|
||||
"dom",
|
||||
"es5",
|
||||
"scripthost",
|
||||
"es2015.iterable"
|
||||
],
|
||||
target: "es5",
|
||||
})))
|
||||
.pipe(gulpif(doConcat, concat(assetGroup.outputFileName)))
|
||||
.pipe(header(
|
||||
"/*\n" +
|
||||
"** NOTE: This file is generated by Gulp and should not be edited directly!\n" +
|
||||
"** Any changes made directly to this file will be overwritten next time its asset group is processed by Gulp.\n" +
|
||||
"*/\n\n"))
|
||||
.pipe(gulpif(generateSourceMaps, sourcemaps.write()))
|
||||
.pipe(gulp.dest(assetGroup.outputDir))
|
||||
// Uncomment to copy assets to wwwroot
|
||||
//.pipe(gulp.dest(assetGroup.webroot))
|
||||
.pipe(uglify())
|
||||
.pipe(rename({
|
||||
suffix: ".min"
|
||||
}))
|
||||
.pipe(eol())
|
||||
.pipe(gulp.dest(assetGroup.outputDir))
|
||||
// Uncomment to copy assets to wwwroot
|
||||
//.pipe(gulp.dest(assetGroup.webroot));
|
||||
}
|
||||
|
||||
function buildCopyPipeline(assetGroup, doRebuild) {
|
||||
var stream = gulp.src(assetGroup.inputPaths);
|
||||
|
||||
if(!doRebuild) {
|
||||
stream = stream.pipe(newer(assetGroup.outputDir))
|
||||
}
|
||||
|
||||
stream = stream.pipe(gulp.dest(assetGroup.outputDir));
|
||||
// Uncomment to copy assets to wwwroot
|
||||
//.pipe(gulp.dest(assetGroup.webroot));
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
// Taken from https://stackoverflow.com/a/38577379/690374
|
||||
|
||||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
const child_process = require('child_process')
|
||||
|
||||
const root = process.cwd()
|
||||
npm_install_recursive(root)
|
||||
|
||||
// Since this script is intended to be run as a "preinstall" command,
|
||||
// it will do `npm install` automatically inside the root folder in the end.
|
||||
console.log('===================================================================')
|
||||
console.log(`Performing "npm install" inside root folder`)
|
||||
console.log('===================================================================')
|
||||
|
||||
// Recurses into a folder
|
||||
function npm_install_recursive(folder)
|
||||
{
|
||||
const has_package_json = fs.existsSync(path.join(folder, 'package.json'))
|
||||
|
||||
// If there is `package.json` in this folder then perform `npm install`.
|
||||
//
|
||||
// Since this script is intended to be run as a "preinstall" command,
|
||||
// skip the root folder, because it will be `npm install`ed in the end.
|
||||
// Hence the `folder !== root` condition.
|
||||
//
|
||||
if (has_package_json)
|
||||
{
|
||||
console.log('===================================================================')
|
||||
console.log(`Performing "npm install" inside ${folder === root ? 'root folder' : './' + path.relative(root, folder)}`)
|
||||
console.log('===================================================================')
|
||||
|
||||
npm_install(folder)
|
||||
}
|
||||
|
||||
// Recurse into subfolders
|
||||
for (let subfolder of subfolders(folder))
|
||||
{
|
||||
npm_install_recursive(subfolder)
|
||||
}
|
||||
}
|
||||
|
||||
// Performs `npm install`
|
||||
function npm_install(where)
|
||||
{
|
||||
child_process.execSync('npm install', { cwd: where, env: process.env, stdio: 'inherit' })
|
||||
}
|
||||
|
||||
// Lists subfolders in a folder
|
||||
function subfolders(folder)
|
||||
{
|
||||
return fs.readdirSync(folder)
|
||||
.filter(subfolder => fs.statSync(path.join(folder, subfolder)).isDirectory())
|
||||
.filter(subfolder => subfolder !== 'node_modules' && subfolder[0] !== '.')
|
||||
.map(subfolder => path.join(folder, subfolder))
|
||||
}
|
||||
9782
package-lock.json
generated
9782
package-lock.json
generated
File diff suppressed because it is too large
Load diff
38
package.json
38
package.json
|
|
@ -1,38 +0,0 @@
|
|||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"gulp": "gulp"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.1.2",
|
||||
"@babel/polyfill": "^7.0.0",
|
||||
"@babel/preset-env": "^7.1.0",
|
||||
"babel-preset-es2015": "^7.0.0-beta.3",
|
||||
"browserify": "^16.2.3",
|
||||
"es6-promise": "4.2.4",
|
||||
"file-system": "2.2.2",
|
||||
"glob": "7.1.2",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-babel": "^8.0.0",
|
||||
"gulp-cli": "1.4.0",
|
||||
"gulp-concat": "2.6.1",
|
||||
"gulp-cssnano": "2.1.3",
|
||||
"gulp-debug": "3.2.0",
|
||||
"gulp-eol": "0.2.0",
|
||||
"gulp-header": "2.0.5",
|
||||
"gulp-if": "2.0.2",
|
||||
"gulp-less": "4.0.0",
|
||||
"gulp-newer": "1.4.0",
|
||||
"gulp-plumber": "1.2.0",
|
||||
"gulp-print": "5.0.0",
|
||||
"gulp-rename": "1.2.2",
|
||||
"gulp-sass": "4.0.1",
|
||||
"gulp-sourcemaps": "2.6.4",
|
||||
"gulp-typescript": "3.2.2",
|
||||
"gulp-uglify": "3.0.0",
|
||||
"merge-stream": "1.0.1",
|
||||
"path-posix": "1.0.0",
|
||||
"typescript": "2.5.3"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
|
|
@ -2,7 +2,6 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using Elsa.Attributes;
|
||||
using Elsa.Models;
|
||||
using Elsa.Web.DataAnnotations;
|
||||
|
||||
namespace Elsa.Activities.Http.Activities
|
||||
{
|
||||
|
|
@ -27,7 +26,6 @@ namespace Elsa.Activities.Http.Activities
|
|||
[Display(Description = "The HTTP method that triggers this activity.")]
|
||||
[Required]
|
||||
[UIHint("Dropdown")]
|
||||
[Options(null, "GET", "POST", "PUT", "DELETE", "HEAD")]
|
||||
public string Method { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
<ProjectReference Include="..\..\core\Elsa.Core\Elsa.Core.csproj" />
|
||||
<ProjectReference Include="..\..\core\Elsa.Persistence.Abstractions\Elsa.Persistence.Abstractions.csproj" />
|
||||
<ProjectReference Include="..\..\core\Elsa.Runtime.Abstractions\Elsa.Runtime.Abstractions.csproj" />
|
||||
<ProjectReference Include="..\..\web\modules\Elsa.Web.Abstractions\Elsa.Web.Abstractions.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Elsa.Persistence.Abstractions\Elsa.Persistence.Abstractions.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
using Microsoft.AspNetCore;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
|
||||
namespace SampleDashboard.Web
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
CreateWebHostBuilder(args).Build().Run();
|
||||
}
|
||||
|
||||
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
|
||||
WebHost.CreateDefaultBuilder<Startup>(args);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "https://localhost:44397",
|
||||
"sslPort": 44397
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"Elsa.Dashboard.Web": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "https://localhost:44397",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
<Authors>Sipke Schoorstra</Authors>
|
||||
<Description>Elsa is a set of workflowing libraries and tools to enable super-fast workflowing capabilities in any .NET Core application.</Description>
|
||||
<Copyright>2019</Copyright>
|
||||
<PackageProjectUrl>https://github.com/sfmskywalker/Elsa</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/sfmskywalker/Elsa</RepositoryUrl>
|
||||
<RepositoryType>GitHub</RepositoryType>
|
||||
<PackageTags>elsa, workflows, orchard</PackageTags>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="OrchardCore.Application.Cms.Targets" Version="1.0.0-beta3-71567" />
|
||||
<PackageReference Include="OrchardCore.Resources" Version="1.0.0-beta3-71567" />
|
||||
<PackageReference Include="OrchardCore.Settings" Version="1.0.0-beta3-71567" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Remove="ClientApp\node_modules\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\core\Elsa.Persistence.FileSystem\Elsa.Persistence.FileSystem.csproj" />
|
||||
<ProjectReference Include="..\..\web\modules\Elsa.Activities.Console.Web\Elsa.Activities.Console.Web.csproj" />
|
||||
<ProjectReference Include="..\..\web\modules\Elsa.Activities.Cron.Web\Elsa.Activities.Cron.Web.csproj" />
|
||||
<ProjectReference Include="..\..\web\modules\Elsa.Activities.Email.Web\Elsa.Activities.Email.Web.csproj" />
|
||||
<ProjectReference Include="..\..\web\modules\Elsa.Activities.Http.Web\Elsa.Activities.Http.Web.csproj" />
|
||||
<ProjectReference Include="..\..\web\modules\Elsa.Activities.Primitives.Web\Elsa.Activities.Primitives.Web.csproj" />
|
||||
<ProjectReference Include="..\..\web\modules\Elsa.Web.Components\Elsa.Web.Components.csproj" />
|
||||
<ProjectReference Include="..\..\web\modules\Elsa.Web.Management\Elsa.Web.Management.csproj" />
|
||||
<ProjectReference Include="..\..\web\themes\Elsa.Web.BootstrapTheme\Elsa.Web.BootstrapTheme.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
using Elsa.Persistence.FileSystem.Extensions;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace SampleDashboard.Web
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
private IConfiguration Configuration { get; }
|
||||
|
||||
public Startup(IConfiguration configuration)
|
||||
{
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services
|
||||
.AddOrchardCms(orchard =>
|
||||
{
|
||||
orchard.ConfigureServices(tenant =>
|
||||
{
|
||||
tenant
|
||||
.AddFileSystemWorkflowDefinitionStoreProvider(Configuration.GetSection("Workflows:FileSystem"))
|
||||
.AddFileSystemWorkflowInstanceStoreProvider(Configuration.GetSection("Workflows:FileSystem"));
|
||||
});
|
||||
});
|
||||
|
||||
// TODO: Temporarily disabled until I figured out why it's broken.
|
||||
// services
|
||||
// .AddRouting(options => options.LowercaseUrls = true)
|
||||
// .AddOrchardCoreTheming();
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
|
||||
{
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
}
|
||||
|
||||
app.UseOrchardCore();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"System": "Information",
|
||||
"Microsoft": "Information"
|
||||
}
|
||||
},
|
||||
"Workflows": {
|
||||
"FileSystem":
|
||||
{
|
||||
"Directory": "C:\\Workflows",
|
||||
"Format": "YAML"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"Default": {
|
||||
"State": "Running",
|
||||
"RequestUrlHost": null,
|
||||
"RequestUrlPrefix": null,
|
||||
"CurrentTheme" : "Elsa.Web.BootstrapTheme",
|
||||
"Features": [
|
||||
"Elsa.Web.BootstrapTheme",
|
||||
"Elsa.Web.Management",
|
||||
"Elsa.Web.Components",
|
||||
"Elsa.Activities.Primitives.Web",
|
||||
"Elsa.Activities.Console.Web",
|
||||
"Elsa.Activities.Http.Web"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
using Elsa.Activities.Console.Activities;
|
||||
using Elsa.Web.Drivers;
|
||||
|
||||
namespace Elsa.Activities.Console.Web.Drivers
|
||||
{
|
||||
public class ReadLineDisplay : ActivityDisplayDriver<ReadLine>
|
||||
{
|
||||
public ReadLineDisplay(IActivityDesignerStore designerStore) : base(designerStore)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
using Elsa.Activities.Console.Activities;
|
||||
using Elsa.Activities.Console.Web.ViewModels;
|
||||
using Elsa.Expressions;
|
||||
using Elsa.Web.Drivers;
|
||||
|
||||
namespace Elsa.Activities.Console.Web.Drivers
|
||||
{
|
||||
public class WriteLineDisplay : ActivityDisplayDriver<WriteLine, WriteLineViewModel>
|
||||
{
|
||||
protected override void EditActivity(WriteLine activity, WriteLineViewModel model)
|
||||
{
|
||||
model.TextExpression = activity.TextExpression.Expression;
|
||||
}
|
||||
|
||||
protected override void UpdateActivity(WriteLineViewModel model, WriteLine activity)
|
||||
{
|
||||
activity.TextExpression = new WorkflowExpression<string>(activity.TextExpression.Syntax, model.TextExpression);
|
||||
}
|
||||
|
||||
public WriteLineDisplay(IActivityDesignerStore designerStore) : base(designerStore)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<PackageVersion>1.0.0</PackageVersion>
|
||||
<Authors>Sipke Schoorstra</Authors>
|
||||
<Description>Elsa is a set of workflowing libraries and tools to enable super-fast workflowing capabilities in any .NET Core application.</Description>
|
||||
<Copyright>2019</Copyright>
|
||||
<PackageProjectUrl>https://github.com/sfmskywalker/Elsa</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/sfmskywalker/Elsa</RepositoryUrl>
|
||||
<RepositoryType>GitHub</RepositoryType>
|
||||
<PackageTags>elsa, workflows, orchard</PackageTags>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\activities\Elsa.Activities.Console\Elsa.Activities.Console.csproj" />
|
||||
<ProjectReference Include="..\Elsa.Web.Abstractions\Elsa.Web.Abstractions.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
|
||||
<PackageReference Include="OrchardCore.Module.Targets" Version="1.0.0-beta3-71567" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="Views\WriteLine.Edit.cshtml" />
|
||||
<Content Include="Views\_ViewImports.cshtml" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
using OrchardCore.Modules.Manifest;
|
||||
|
||||
[assembly: Module(
|
||||
Name = "Console Activities",
|
||||
Category = "Elsa Workflows",
|
||||
Description = "Provides a set of primitive activities."
|
||||
)]
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
using Elsa.Activities.Console.Extensions;
|
||||
using Elsa.Activities.Console.Web.Drivers;
|
||||
using Elsa.Web.Extensions;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using OrchardCore.Modules;
|
||||
|
||||
namespace Elsa.Activities.Console.Web
|
||||
{
|
||||
public class Startup : StartupBase
|
||||
{
|
||||
public override void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services
|
||||
.AddConsoleDesigners()
|
||||
.AddActivityDisplay<ReadLineDisplay>()
|
||||
.AddActivityDisplay<WriteLineDisplay>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
namespace Elsa.Activities.Console.Web.ViewModels
|
||||
{
|
||||
public class WriteLineViewModel
|
||||
{
|
||||
public string TextExpression { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
@model WriteLineViewModel
|
||||
<div class="form-group">
|
||||
<label asp-for="TextExpression">@T["Text Expression"]</label>
|
||||
<input asp-for="TextExpression" class="form-control"/>
|
||||
</div>
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
@using Elsa.Activities.Console.Activities
|
||||
@using Elsa.Activities.Console.Web.ViewModels
|
||||
@using Elsa.Web.ViewModels
|
||||
@inherits OrchardCore.DisplayManagement.Razor.RazorPage<TModel>
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
using Elsa.Activities.Cron.Activities;
|
||||
using Elsa.Activities.Cron.Web.ViewModels;
|
||||
using Elsa.Web.Components.ViewModels;
|
||||
using Elsa.Web.Drivers;
|
||||
|
||||
namespace Elsa.Activities.Cron.Web.Display
|
||||
{
|
||||
public class CronTriggerDisplay : ActivityDisplayDriver<CronTrigger, CronTriggerViewModel>
|
||||
{
|
||||
protected override void EditActivity(CronTrigger activity, CronTriggerViewModel model)
|
||||
{
|
||||
model.CronExpression = new ExpressionViewModel(activity.CronExpression);
|
||||
}
|
||||
|
||||
protected override void UpdateActivity(CronTriggerViewModel model, CronTrigger activity)
|
||||
{
|
||||
activity.CronExpression = model.CronExpression.ToWorkflowExpression<string>();
|
||||
}
|
||||
|
||||
public CronTriggerDisplay(IActivityDesignerStore designerStore) : base(designerStore)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<PackageVersion>1.0.0</PackageVersion>
|
||||
<Authors>Sipke Schoorstra</Authors>
|
||||
<Description>Elsa is a set of workflowing libraries and tools to enable super-fast workflowing capabilities in any .NET Core application.</Description>
|
||||
<Copyright>2019</Copyright>
|
||||
<PackageProjectUrl>https://github.com/sfmskywalker/Elsa</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/sfmskywalker/Elsa</RepositoryUrl>
|
||||
<RepositoryType>GitHub</RepositoryType>
|
||||
<PackageTags>elsa, workflows, orchard</PackageTags>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\activities\Elsa.Activities.Cron\Elsa.Activities.Cron.csproj" />
|
||||
<ProjectReference Include="..\Elsa.Web.Abstractions\Elsa.Web.Abstractions.csproj" />
|
||||
<ProjectReference Include="..\Elsa.Web.Components\Elsa.Web.Components.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
|
||||
<PackageReference Include="OrchardCore.Module.Targets" Version="1.0.0-beta3-71567" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
using OrchardCore.Modules.Manifest;
|
||||
|
||||
[assembly: Module(
|
||||
Name = "Cron Activities",
|
||||
Category = "Elsa Workflows",
|
||||
Description = "Provides a Cron Trigger activity."
|
||||
)]
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
using Elsa.Activities.Cron.Extensions;
|
||||
using Elsa.Activities.Cron.Web.Display;
|
||||
using Elsa.Web.Extensions;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using OrchardCore.Modules;
|
||||
|
||||
namespace Elsa.Activities.Cron.Web
|
||||
{
|
||||
public class Startup : StartupBase
|
||||
{
|
||||
public override void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services
|
||||
.AddCronDesigners()
|
||||
.AddActivityDisplay<CronTriggerDisplay>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
using Elsa.Web.Components.ViewModels;
|
||||
|
||||
namespace Elsa.Activities.Cron.Web.ViewModels
|
||||
{
|
||||
public class CronTriggerViewModel
|
||||
{
|
||||
public ExpressionViewModel CronExpression { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
@model CronTriggerViewModel
|
||||
<div class="form-group">
|
||||
<label asp-for="CronExpression">@T["Cron Expression"]</label>
|
||||
<vc:expression-editor model="@Model.CronExpression" prefix="@Html.NameFor(m => m.CronExpression)"></vc:expression-editor>
|
||||
<span asp-validation-for="CronExpression" class="text-danger"></span>
|
||||
<small class="form-text text-muted">@T["Enter a crontab expression. See https://crontab.guru/."]</small>
|
||||
</div>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
@using Elsa.Web.ViewModels
|
||||
@using Elsa.Activities.Cron.Web.ViewModels
|
||||
@using Elsa.Activities.Cron.Activities
|
||||
@using OrchardCore.Mvc.Core.Utilities
|
||||
@inherits OrchardCore.DisplayManagement.Razor.RazorPage<TModel>
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@addTagHelper *, Elsa.Web.Components
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
using Elsa.Activities.Email.Activities;
|
||||
using Elsa.Activities.Email.Web.ViewModels;
|
||||
using Elsa.Web.Components.ViewModels;
|
||||
using Elsa.Web.Drivers;
|
||||
|
||||
namespace Elsa.Activities.Email.Web.Display
|
||||
{
|
||||
public class SendEmailDisplay : ActivityDisplayDriver<SendEmail, SendEmailViewModel>
|
||||
{
|
||||
protected override void EditActivity(SendEmail activity, SendEmailViewModel model)
|
||||
{
|
||||
model.From = new ExpressionViewModel(activity.From);
|
||||
model.To = new ExpressionViewModel(activity.To);
|
||||
model.Subject = new ExpressionViewModel(activity.Subject);
|
||||
model.Body = new ExpressionViewModel(activity.Body);
|
||||
}
|
||||
|
||||
protected override void UpdateActivity(SendEmailViewModel model, SendEmail activity)
|
||||
{
|
||||
activity.From = model.From.ToWorkflowExpression<string>();
|
||||
activity.To = model.To.ToWorkflowExpression<string>();
|
||||
activity.Subject = model.Subject.ToWorkflowExpression<string>();
|
||||
activity.Body = model.Body.ToWorkflowExpression<string>();
|
||||
}
|
||||
|
||||
public SendEmailDisplay(IActivityDesignerStore designerStore) : base(designerStore)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<PackageVersion>1.0.0</PackageVersion>
|
||||
<Authors>Sipke Schoorstra</Authors>
|
||||
<Description>Elsa is a set of workflowing libraries and tools to enable super-fast workflowing capabilities in any .NET Core application.</Description>
|
||||
<Copyright>2019</Copyright>
|
||||
<PackageProjectUrl>https://github.com/sfmskywalker/Elsa</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/sfmskywalker/Elsa</RepositoryUrl>
|
||||
<RepositoryType>GitHub</RepositoryType>
|
||||
<PackageTags>elsa, workflows, orchard</PackageTags>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\activities\Elsa.Activities.Email\Elsa.Activities.Email.csproj" />
|
||||
<ProjectReference Include="..\Elsa.Web.Abstractions\Elsa.Web.Abstractions.csproj" />
|
||||
<ProjectReference Include="..\Elsa.Web.Components\Elsa.Web.Components.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
|
||||
<PackageReference Include="OrchardCore.Module.Targets" Version="1.0.0-beta3-71567" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
using OrchardCore.Modules.Manifest;
|
||||
|
||||
[assembly: Module(
|
||||
Name = "Email Activities",
|
||||
Category = "Elsa Workflows",
|
||||
Description = "Provides a Send Email activity."
|
||||
)]
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
using Elsa.Activities.Email.Extensions;
|
||||
using Elsa.Activities.Email.Web.Display;
|
||||
using Elsa.Web.Extensions;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using OrchardCore.Modules;
|
||||
|
||||
namespace Elsa.Activities.Email.Web
|
||||
{
|
||||
public class Startup : StartupBase
|
||||
{
|
||||
public override void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services
|
||||
.AddEmailDesigners()
|
||||
.AddActivityDisplay<SendEmailDisplay>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
using Elsa.Web.Components.ViewModels;
|
||||
|
||||
namespace Elsa.Activities.Email.Web.ViewModels
|
||||
{
|
||||
public class SendEmailViewModel
|
||||
{
|
||||
public ExpressionViewModel From { get; set; }
|
||||
public ExpressionViewModel To { get; set; }
|
||||
public ExpressionViewModel Subject { get; set; }
|
||||
public ExpressionViewModel Body { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
@model SendEmailViewModel
|
||||
<div class="form-group">
|
||||
<label asp-for="From">@T["From"]</label>
|
||||
<vc:expression-editor model="@Model.From" prefix="@Html.NameFor(m => m.From)"></vc:expression-editor>
|
||||
<span asp-validation-for="From" class="text-danger"></span>
|
||||
<small class="form-text text-muted">@T["The sender's email address."]</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="To">@T["To"]</label>
|
||||
<vc:expression-editor model="@Model.To" prefix="@Html.NameFor(m => m.To)"></vc:expression-editor>
|
||||
<span asp-validation-for="To" class="text-danger"></span>
|
||||
<small class="form-text text-muted">@T["The recipient's email address."]</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Subject">@T["Subject"]</label>
|
||||
<vc:expression-editor model="@Model.Subject" prefix="@Html.NameFor(m => m.Subject)"></vc:expression-editor>
|
||||
<span asp-validation-for="Subject" class="text-danger"></span>
|
||||
<small class="form-text text-muted">@T["The subject of the email message."]</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Body">@T["Body"]</label>
|
||||
<vc:expression-editor model="@Model.Body" prefix="@Html.NameFor(m => m.Body)"></vc:expression-editor>
|
||||
<span asp-validation-for="Body" class="text-danger"></span>
|
||||
<small class="form-text text-muted">@T["The message to send."]</small>
|
||||
</div>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
@using Elsa.Web.ViewModels
|
||||
@using Elsa.Activities.Email.Activities
|
||||
@using Elsa.Activities.Email.Web.ViewModels
|
||||
@using OrchardCore.Mvc.Core.Utilities
|
||||
@inherits OrchardCore.DisplayManagement.Razor.RazorPage<TModel>
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@addTagHelper *, Elsa.Web.Components
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Elsa.Activities.Http.Activities;
|
||||
using Elsa.Activities.Http.Web.ViewModels;
|
||||
using Elsa.Web.Components.ViewModels;
|
||||
using Elsa.Web.Drivers;
|
||||
|
||||
namespace Elsa.Activities.Http.Web.Display
|
||||
{
|
||||
public class HttpRequestActionDisplay : ActivityDisplayDriver<HttpRequestAction, HttpRequestActionViewModel>
|
||||
{
|
||||
protected override void EditActivity(HttpRequestAction activity, HttpRequestActionViewModel model)
|
||||
{
|
||||
model.Method = activity.Method;
|
||||
model.Body = new ExpressionViewModel(activity.Body);
|
||||
model.Url = new ExpressionViewModel(activity.Url);
|
||||
model.RequestHeaders = new ExpressionViewModel(activity.RequestHeaders);
|
||||
model.ContentType = new ExpressionViewModel(activity.ContentType);
|
||||
model.SupportedStatusCodes = string.Join(", ", activity.SupportedStatusCodes);
|
||||
}
|
||||
|
||||
protected override void UpdateActivity(HttpRequestActionViewModel model, HttpRequestAction activity)
|
||||
{
|
||||
activity.Method = model.Method;
|
||||
activity.Body = model.Body.ToWorkflowExpression<string>();
|
||||
activity.Url = model.Url.ToWorkflowExpression<string>();
|
||||
activity.RequestHeaders = model.RequestHeaders.ToWorkflowExpression<string>();
|
||||
activity.ContentType = model.ContentType.ToWorkflowExpression<string>();
|
||||
activity.SupportedStatusCodes = new HashSet<int>(model.SupportedStatusCodes
|
||||
.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries)
|
||||
.Select(x => x.Trim())
|
||||
.Where(x => !string.IsNullOrWhiteSpace(x))
|
||||
.Select(int.Parse));
|
||||
}
|
||||
|
||||
public HttpRequestActionDisplay(IActivityDesignerStore designerStore) : base(designerStore)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
using Elsa.Activities.Http.Activities;
|
||||
using Elsa.Activities.Http.Web.ViewModels;
|
||||
using Elsa.Web.Drivers;
|
||||
|
||||
namespace Elsa.Activities.Http.Web.Display
|
||||
{
|
||||
public class HttpRequestTriggerDisplay : ActivityDisplayDriver<HttpRequestTrigger, HttpRequestTriggerViewModel>
|
||||
{
|
||||
protected override void EditActivity(HttpRequestTrigger activity, HttpRequestTriggerViewModel model)
|
||||
{
|
||||
model.Path = activity.Path;
|
||||
model.Method = activity.Method;
|
||||
model.ReadContent = activity.ReadContent;
|
||||
}
|
||||
|
||||
protected override void UpdateActivity(HttpRequestTriggerViewModel model, HttpRequestTrigger activity)
|
||||
{
|
||||
activity.Path = model.Path;
|
||||
activity.Method = model.Method;
|
||||
activity.ReadContent = model.ReadContent;
|
||||
}
|
||||
|
||||
public HttpRequestTriggerDisplay(IActivityDesignerStore designerStore) : base(designerStore)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
using System.Net;
|
||||
using Elsa.Activities.Http.Activities;
|
||||
using Elsa.Activities.Http.Web.ViewModels;
|
||||
using Elsa.Web.Components.ViewModels;
|
||||
using Elsa.Web.Drivers;
|
||||
|
||||
namespace Elsa.Activities.Http.Web.Display
|
||||
{
|
||||
public class HttpResponseActionDisplay : ActivityDisplayDriver<HttpResponseAction, HttpResponseActionViewModel>
|
||||
{
|
||||
protected override void EditActivity(HttpResponseAction activity, HttpResponseActionViewModel model)
|
||||
{
|
||||
model.StatusCode = (int)activity.StatusCode;
|
||||
model.Body = new ExpressionViewModel(activity.Body);
|
||||
model.ResponseHeaders = new ExpressionViewModel(activity.ResponseHeaders);
|
||||
model.ContentType = new ExpressionViewModel(activity.ContentType);
|
||||
}
|
||||
|
||||
protected override void UpdateActivity(HttpResponseActionViewModel model, HttpResponseAction activity)
|
||||
{
|
||||
activity.StatusCode = (HttpStatusCode)model.StatusCode;
|
||||
activity.Body = model.Body.ToWorkflowExpression<string>();
|
||||
activity.ResponseHeaders = model.ResponseHeaders.ToWorkflowExpression<string>();
|
||||
activity.ContentType = model.ContentType.ToWorkflowExpression<string>();
|
||||
}
|
||||
|
||||
public HttpResponseActionDisplay(IActivityDesignerStore designerStore) : base(designerStore)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<PackageVersion>1.0.0</PackageVersion>
|
||||
<Authors>Sipke Schoorstra</Authors>
|
||||
<Description>Elsa is a set of workflowing libraries and tools to enable super-fast workflowing capabilities in any .NET Core application.</Description>
|
||||
<Copyright>2019</Copyright>
|
||||
<PackageProjectUrl>https://github.com/sfmskywalker/Elsa</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/sfmskywalker/Elsa</RepositoryUrl>
|
||||
<RepositoryType>GitHub</RepositoryType>
|
||||
<PackageTags>elsa, workflows, orchard</PackageTags>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\activities\Elsa.Activities.Http\Elsa.Activities.Http.csproj" />
|
||||
<ProjectReference Include="..\Elsa.Web.Abstractions\Elsa.Web.Abstractions.csproj" />
|
||||
<ProjectReference Include="..\Elsa.Web.Components\Elsa.Web.Components.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
|
||||
<PackageReference Include="OrchardCore.Module.Targets" Version="1.0.0-beta3-71567" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
using OrchardCore.Modules.Manifest;
|
||||
|
||||
[assembly: Module(
|
||||
Name = "HTTP Activities",
|
||||
Category = "Elsa Workflows",
|
||||
Description = "Provides a set of HTTP activities."
|
||||
)]
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
using Elsa.Activities.Http.Extensions;
|
||||
using Elsa.Activities.Http.Web.Display;
|
||||
using Elsa.Web.Extensions;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using OrchardCore.Modules;
|
||||
|
||||
namespace Elsa.Activities.Http.Web
|
||||
{
|
||||
public class Startup : StartupBase
|
||||
{
|
||||
public override void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services
|
||||
.AddHttpDesigners()
|
||||
.AddActivityDisplay<HttpRequestTriggerDisplay>()
|
||||
.AddActivityDisplay<HttpRequestActionDisplay>()
|
||||
.AddActivityDisplay<HttpResponseActionDisplay>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using Elsa.Web.Components.ViewModels;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
|
||||
namespace Elsa.Activities.Http.Web.ViewModels
|
||||
{
|
||||
public class HttpRequestActionViewModel
|
||||
{
|
||||
public ExpressionViewModel Url { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Method { get; set; }
|
||||
|
||||
public ExpressionViewModel Body { get; set; }
|
||||
|
||||
public ExpressionViewModel ContentType { get; set; }
|
||||
public ExpressionViewModel RequestHeaders { get; set; }
|
||||
|
||||
[Required]
|
||||
public string SupportedStatusCodes { get; set; }
|
||||
|
||||
public ICollection<SelectListItem> GetAvailableHttpMethods()
|
||||
{
|
||||
var availableHttpMethods = new[] { "GET", "POST", "PUT", "DELETE", "OPTIONS" };
|
||||
return availableHttpMethods.Select(x => new SelectListItem { Text = x, Value = x }).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
|
||||
namespace Elsa.Activities.Http.Web.ViewModels
|
||||
{
|
||||
public class HttpRequestTriggerViewModel
|
||||
{
|
||||
[Required]
|
||||
public Uri Path { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Method { get; set; }
|
||||
|
||||
public bool ReadContent { get; set; }
|
||||
|
||||
public ICollection<SelectListItem> GetAvailableHttpMethods()
|
||||
{
|
||||
var availableHttpMethods = new[] { "GET", "POST", "PUT", "DELETE", "OPTIONS" };
|
||||
return availableHttpMethods.Select(x => new SelectListItem { Text = x, Value = x }).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
using Elsa.Core.Expressions;
|
||||
using Elsa.Expressions;
|
||||
using Elsa.Web.Components.ViewModels;
|
||||
|
||||
namespace Elsa.Activities.Http.Web.ViewModels
|
||||
{
|
||||
public class HttpResponseActionViewModel
|
||||
{
|
||||
public HttpResponseActionViewModel()
|
||||
{
|
||||
StatusCode = 200;
|
||||
ContentType = new ExpressionViewModel("application/json", PlainTextEvaluator.SyntaxName);
|
||||
}
|
||||
|
||||
public int StatusCode { get; set; }
|
||||
public ExpressionViewModel Body { get; set; }
|
||||
public ExpressionViewModel ContentType { get; set; }
|
||||
public ExpressionViewModel ResponseHeaders { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
@model HttpRequestActionViewModel
|
||||
<div class="form-group">
|
||||
<label asp-for="Url">@T["Url"]</label>
|
||||
<vc:expression-editor model="@Model.Url" prefix="@Html.NameFor(m => m.Url)"></vc:expression-editor>
|
||||
<span asp-validation-for="Url" class="text-danger"></span>
|
||||
<small class="form-text text-muted">@T["The relative path that will trigger this activity. Example: '/webhooks/my'"]</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Method">@T["Method"]</label>
|
||||
<select class="form-control" asp-for="Method" asp-items="Model.GetAvailableHttpMethods()"></select>
|
||||
<span asp-validation-for="Method" class="text-danger"></span>
|
||||
<small class="form-text text-muted">@T["The HTTP method to use for the request."]</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Body">@T["Body"]</label>
|
||||
<vc:expression-editor model="@Model.Body" prefix="@Html.NameFor(m => m.Body)"></vc:expression-editor>
|
||||
<span asp-validation-for="Body" class="text-danger"></span>
|
||||
<small class="form-text text-muted">@T["The HTTP request body to send along with the request."]</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ContentType">@T["Content Type"]</label>
|
||||
<vc:expression-editor model="@Model.ContentType" prefix="@Html.NameFor(m => m.ContentType)"></vc:expression-editor>
|
||||
<span asp-validation-for="ContentType" class="text-danger"></span>
|
||||
<small class="form-text text-muted">@T["The Content-Type header send along with the request."]</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="RequestHeaders">@T["Request Headers"]</label>
|
||||
<vc:expression-editor model="@Model.RequestHeaders" prefix="@Html.NameFor(m => m.RequestHeaders)"></vc:expression-editor>
|
||||
<span asp-validation-for="RequestHeaders" class="text-danger"></span>
|
||||
<small class="form-text text-muted">@T["Any additional headers to send along with the request, one per line. For example: my-header-one=foo\r\nmy-header-two=bar"]</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="SupportedStatusCodes">@T["Handle Status Codes"]</label>
|
||||
<input asp-for="SupportedStatusCodes" class="form-control"/>
|
||||
<span asp-validation-for="SupportedStatusCodes" class="text-danger"></span>
|
||||
<small class="form-text text-muted">@T["A comma-separated list of HTTP status codes to handle. These will be used to emit the activity's endpoints."]</small>
|
||||
</div>
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
@model HttpRequestTriggerViewModel
|
||||
<div class="form-group">
|
||||
<label asp-for="Path">@T["Path"]</label>
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon3">@Url.GetBaseUrl()</span>
|
||||
</div>
|
||||
<input asp-for="Path" class="form-control"/>
|
||||
</div>
|
||||
<span asp-validation-for="Path" class="text-danger"></span>
|
||||
<small class="form-text text-muted">@T["The relative path that will trigger this activity. Example: '/webhooks/my'"]</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Method">@T["Method"]</label>
|
||||
<select class="form-control" asp-for="Method" asp-items="Model.GetAvailableHttpMethods()"></select>
|
||||
<span asp-validation-for="Method" class="text-danger"></span>
|
||||
<small class="form-text text-muted">@T["The HTTP method to match."]</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input"/>
|
||||
<label class="custom-control-label">@T["Include nonce"]</label>
|
||||
</div>
|
||||
<small class="form-text text-muted">@T["Check to generate a nonce that needs to be included when invoking the URL."]</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input asp-for="ReadContent" type="checkbox" class="custom-control-input"/>
|
||||
<label asp-for="ReadContent" class="custom-control-label">@T["Read content"]</label>
|
||||
</div>
|
||||
<small class="form-text text-muted">@T["Check to read the request body. If the content type represents a form, the body is parsed as a collection of key/value pairs. Otherwise the body is stored as a raw string"]</small>
|
||||
</div>
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
@model HttpResponseActionViewModel
|
||||
<div class="form-group">
|
||||
<label asp-for="StatusCode">@T["HTTP Status Code"]</label>
|
||||
<input asp-for="StatusCode" class="form-control" type="number" min="0" max="999"/>
|
||||
<span asp-validation-for="StatusCode" class="text-danger"></span>
|
||||
<small class="form-text text-muted">@T["The HTTP status code to return."]</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Body">@T["Body"]</label>
|
||||
<vc:expression-editor model="@Model.Body" prefix="@Html.NameFor(m => m.Body)"></vc:expression-editor>
|
||||
<span asp-validation-for="Body" class="text-danger"></span>
|
||||
<small class="form-text text-muted">@T["The HTTP request body to send along with the response."]</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ContentType">@T["Content Type"]</label>
|
||||
<vc:expression-editor model="@Model.ContentType" prefix="@Html.NameFor(m => m.ContentType)"></vc:expression-editor>
|
||||
<span asp-validation-for="ContentType" class="text-danger"></span>
|
||||
<small class="form-text text-muted">@T["The Content-Type header value to return."]</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ResponseHeaders">@T["Response Headers"]</label>
|
||||
<vc:expression-editor model="@Model.ResponseHeaders" prefix="@Html.NameFor(m => m.ResponseHeaders)"></vc:expression-editor>
|
||||
<span asp-validation-for="ResponseHeaders" class="text-danger"></span>
|
||||
<small class="form-text text-muted">@T["Any additional header to return, one per line. For example: my-header-one=foo\r\nmy-header-two=bar"]</small>
|
||||
</div>
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
@using Elsa.Activities.Http.Web.ViewModels
|
||||
@using Elsa.Web.ViewModels
|
||||
@using Elsa.Web.Shapes
|
||||
@using Elsa.Activities.Http.Activities
|
||||
@using OrchardCore.Mvc.Core.Utilities
|
||||
@inherits OrchardCore.DisplayManagement.Razor.RazorPage<TModel>
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@addTagHelper *, Elsa.Web.Components
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
using Elsa.Activities.Primitives.Activities;
|
||||
using Elsa.Web.Drivers;
|
||||
|
||||
namespace Elsa.Activities.Primitives.Web.Drivers
|
||||
{
|
||||
public class ForEachDisplay : ActivityDisplayDriver<ForEach>
|
||||
{
|
||||
public ForEachDisplay(IActivityDesignerStore designerStore) : base(designerStore)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Elsa.Activities.Primitives.Activities;
|
||||
using Elsa.Activities.Primitives.Web.ViewModels;
|
||||
using Elsa.Web.Drivers;
|
||||
using Enumerable = System.Linq.Enumerable;
|
||||
|
||||
namespace Elsa.Activities.Primitives.Web.Drivers
|
||||
{
|
||||
public class ForkDisplay : ActivityDisplayDriver<Fork, ForkViewModel>
|
||||
{
|
||||
protected override void EditActivity(Fork activity, ForkViewModel model)
|
||||
{
|
||||
model.Forks = string.Join(", ", activity.Forks ?? Enumerable.Empty<string>());
|
||||
}
|
||||
|
||||
protected override void UpdateActivity(ForkViewModel model, Fork activity)
|
||||
{
|
||||
activity.Forks = !string.IsNullOrWhiteSpace(model.Forks)
|
||||
? (IList<string>) model.Forks
|
||||
.Split(new[] { "," }, StringSplitOptions.None)
|
||||
.Select(x => x.Trim())
|
||||
.Where(x => !string.IsNullOrWhiteSpace(x))
|
||||
.ToList()
|
||||
: new string[0];
|
||||
}
|
||||
|
||||
public ForkDisplay(IActivityDesignerStore designerStore) : base(designerStore)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
using Elsa.Activities.Primitives.Activities;
|
||||
using Elsa.Activities.Primitives.Web.ViewModels;
|
||||
using Elsa.Web.Components.ViewModels;
|
||||
using Elsa.Web.Drivers;
|
||||
|
||||
namespace Elsa.Activities.Primitives.Web.Drivers
|
||||
{
|
||||
public class IfElseDisplay : ActivityDisplayDriver<IfElse, IfElseViewModel>
|
||||
{
|
||||
protected override void EditActivity(IfElse activity, IfElseViewModel model)
|
||||
{
|
||||
model.ConditionExpression = new ExpressionViewModel(activity.ConditionExpression);
|
||||
}
|
||||
|
||||
protected override void UpdateActivity(IfElseViewModel model, IfElse activity)
|
||||
{
|
||||
activity.ConditionExpression = model.ConditionExpression.ToWorkflowExpression<bool>();
|
||||
}
|
||||
|
||||
public IfElseDisplay(IActivityDesignerStore designerStore) : base(designerStore)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
using Elsa.Activities.Primitives.Activities;
|
||||
using Elsa.Activities.Primitives.Web.ViewModels;
|
||||
using Elsa.Web.Drivers;
|
||||
|
||||
namespace Elsa.Activities.Primitives.Web.Drivers
|
||||
{
|
||||
public class JoinDisplay : ActivityDisplayDriver<Join, JoinViewModel>
|
||||
{
|
||||
protected override void EditActivity(Join activity, JoinViewModel model)
|
||||
{
|
||||
model.Mode = activity.Mode;
|
||||
}
|
||||
|
||||
protected override void UpdateActivity(JoinViewModel model, Join activity)
|
||||
{
|
||||
activity.Mode = model.Mode;
|
||||
}
|
||||
|
||||
public JoinDisplay(IActivityDesignerStore designerStore) : base(designerStore)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
using Elsa.Activities.Primitives.Activities;
|
||||
using Elsa.Activities.Primitives.Web.ViewModels;
|
||||
using Elsa.Web.Components.ViewModels;
|
||||
using Elsa.Web.Drivers;
|
||||
|
||||
namespace Elsa.Activities.Primitives.Web.Drivers
|
||||
{
|
||||
public class SetVariableDisplay : ActivityDisplayDriver<SetVariable, SetVariableViewModel>
|
||||
{
|
||||
protected override void EditActivity(SetVariable activity, SetVariableViewModel model)
|
||||
{
|
||||
model.VariableName = activity.VariableName;
|
||||
model.ValueExpression = new ExpressionViewModel(activity.ValueExpression);
|
||||
}
|
||||
|
||||
protected override void UpdateActivity(SetVariableViewModel model, SetVariable activity)
|
||||
{
|
||||
activity.VariableName = model.VariableName;
|
||||
activity.ValueExpression = model.ValueExpression.ToWorkflowExpression<object>();
|
||||
}
|
||||
|
||||
public SetVariableDisplay(IActivityDesignerStore designerStore) : base(designerStore)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
using Elsa.Activities;
|
||||
using Elsa.Core.Activities;
|
||||
using Elsa.Web.Drivers;
|
||||
|
||||
namespace Elsa.Activities.Primitives.Web.Drivers
|
||||
{
|
||||
public class UnknownActivityDisplay : ActivityDisplayDriver<UnknownActivity>
|
||||
{
|
||||
public UnknownActivityDisplay(IActivityDesignerStore designerStore) : base(designerStore)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<PackageVersion>1.0.0</PackageVersion>
|
||||
<Authors>Sipke Schoorstra</Authors>
|
||||
<Description>Elsa is a set of workflowing libraries and tools to enable super-fast workflowing capabilities in any .NET Core application.</Description>
|
||||
<Copyright>2019</Copyright>
|
||||
<PackageProjectUrl>https://github.com/sfmskywalker/Elsa</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/sfmskywalker/Elsa</RepositoryUrl>
|
||||
<RepositoryType>GitHub</RepositoryType>
|
||||
<PackageTags>elsa, workflows, orchard</PackageTags>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
|
||||
<PackageReference Include="OrchardCore.Module.Targets" Version="1.0.0-beta3-71567" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\activities\Elsa.Activities.Primitives\Elsa.Activities.Primitives.csproj" />
|
||||
<ProjectReference Include="..\Elsa.Web.Abstractions\Elsa.Web.Abstractions.csproj" />
|
||||
<ProjectReference Include="..\Elsa.Web.Components\Elsa.Web.Components.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="Views\_ViewImports.cshtml" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
using OrchardCore.Modules.Manifest;
|
||||
|
||||
[assembly: Module(
|
||||
Name = "Primitive Activities",
|
||||
Category = "Elsa Workflows",
|
||||
Description = "Provides a set of primitive activities."
|
||||
)]
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
using Elsa.Activities.Primitives.Extensions;
|
||||
using Elsa.Activities.Primitives.Web.Drivers;
|
||||
using Elsa.Web.Extensions;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using OrchardCore.Modules;
|
||||
|
||||
namespace Elsa.Activities.Primitives.Web
|
||||
{
|
||||
public class Startup : StartupBase
|
||||
{
|
||||
public override void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services
|
||||
.AddPrimitiveWorkflowDescriptors()
|
||||
.AddActivityDisplay<IfElseDisplay>()
|
||||
.AddActivityDisplay<ForEachDisplay>()
|
||||
.AddActivityDisplay<ForkDisplay>()
|
||||
.AddActivityDisplay<JoinDisplay>()
|
||||
.AddActivityDisplay<SetVariableDisplay>()
|
||||
.AddActivityDisplay<UnknownActivityDisplay>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Elsa.Activities.Primitives.Web.ViewModels
|
||||
{
|
||||
public class ForkViewModel
|
||||
{
|
||||
[Required]
|
||||
public string Forks { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
using Elsa.Web.Components.ViewModels;
|
||||
|
||||
namespace Elsa.Activities.Primitives.Web.ViewModels
|
||||
{
|
||||
public class IfElseViewModel
|
||||
{
|
||||
public ExpressionViewModel ConditionExpression { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
using Elsa.Activities.Primitives.Activities;
|
||||
|
||||
namespace Elsa.Activities.Primitives.Web.ViewModels
|
||||
{
|
||||
public class JoinViewModel
|
||||
{
|
||||
public Join.JoinMode Mode { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using Elsa.Web.Components.ViewModels;
|
||||
|
||||
namespace Elsa.Activities.Primitives.Web.ViewModels
|
||||
{
|
||||
public class SetVariableViewModel
|
||||
{
|
||||
[Required]
|
||||
public string VariableName { get; set; }
|
||||
public ExpressionViewModel ValueExpression { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
@model Elsa.Activities.Primitives.Web.ViewModels.ForkViewModel
|
||||
<div class="form-group">
|
||||
<label asp-for="Forks">@T["Forks"]</label>
|
||||
<input asp-for="Forks" class="form-control"/>
|
||||
<span asp-validation-for="Forks" class="text-danger"></span>
|
||||
<small class="form-text text-muted">@T["A comma-separated list for fork names."]</small>
|
||||
</div>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
@model IfElseViewModel
|
||||
<div class="form-group">
|
||||
<label asp-for="ConditionExpression">@T["Expression"]</label>
|
||||
<vc:expression-editor model="@Model.ConditionExpression" prefix="@Html.NameFor(m => m.ConditionExpression)"></vc:expression-editor>
|
||||
<span asp-validation-for="ConditionExpression" class="text-danger"></span>
|
||||
<small class="form-text text-muted">@T["Enter an expression that evaluates to a boolean value."]</small>
|
||||
</div>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
@model JoinViewModel
|
||||
<div class="form-group">
|
||||
<label asp-for="Mode">@T["Mode"]</label>
|
||||
<select asp-for="Mode" asp-items="@Html.GetEnumSelectList(Model.Mode.GetType())" class="form-control"></select>
|
||||
<span asp-validation-for="Mode" class="text-danger"></span>
|
||||
<small class="form-text text-muted">@T["Controls whether the Join task should wait for <strong>all</strong> or <strong>any</strong> inbound transitions to be completed."]</small>
|
||||
</div>
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
@model SetVariableViewModel
|
||||
<div class="form-group">
|
||||
<label asp-for="VariableName">@T["Variable Name"]</label>
|
||||
<input asp-for="VariableName" class="form-control"/>
|
||||
<span asp-validation-for="VariableName" class="text-danger"></span>
|
||||
<small class="form-text text-muted">@T["The name of the variable to set."]</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ValueExpression">@T["Value"]</label>
|
||||
<vc:expression-editor model="@Model.ValueExpression" prefix="@Html.NameFor(m => m.ValueExpression)"></vc:expression-editor>
|
||||
<span asp-validation-for="ValueExpression" class="text-danger"></span>
|
||||
<small class="form-text text-muted">@T["Enter an expression that evaluates to the value to use for the variable to set."]</small>
|
||||
</div>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
@using Elsa.Web.ViewModels
|
||||
@using Elsa.Activities.Primitives.Web.ViewModels
|
||||
@using Elsa.Activities.Primitives.Activities
|
||||
@inherits OrchardCore.DisplayManagement.Razor.RazorPage<TModel>
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@addTagHelper *, Elsa.Web.Components
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace Elsa.Web.DataAnnotations
|
||||
{
|
||||
public class OptionsAttribute : Attribute
|
||||
{
|
||||
public OptionsAttribute(string optionLabel, params string[] options)
|
||||
{
|
||||
OptionLabel = optionLabel;
|
||||
Options = options;
|
||||
}
|
||||
|
||||
public string OptionLabel { get; }
|
||||
public string[] Options { get; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,106 +0,0 @@
|
|||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Elsa.Extensions;
|
||||
using Elsa.Web.ViewModels;
|
||||
using OrchardCore.DisplayManagement.Handlers;
|
||||
using OrchardCore.DisplayManagement.ModelBinding;
|
||||
using OrchardCore.DisplayManagement.Views;
|
||||
|
||||
namespace Elsa.Web.Drivers
|
||||
{
|
||||
/// <summary>
|
||||
/// Base class for activity drivers.
|
||||
/// </summary>
|
||||
public abstract class ActivityDisplayDriver<TActivity> : DisplayDriver<IActivity, TActivity> where TActivity : class, IActivity
|
||||
{
|
||||
public IActivityDesignerStore DesignerStore { get; }
|
||||
|
||||
public ActivityDisplayDriver(IActivityDesignerStore designerStore)
|
||||
{
|
||||
DesignerStore = designerStore;
|
||||
}
|
||||
|
||||
public override async Task<IDisplayResult> DisplayAsync(TActivity model, IUpdateModel updater)
|
||||
{
|
||||
var designer = await DesignerStore.GetByTypeNameAsync(model.TypeName, CancellationToken.None);
|
||||
|
||||
return Combine(
|
||||
Shape(GetDesignShapeType(model), new ActivityShapeModel<TActivity>(model, designer)).Location("Design", "Content"),
|
||||
Shape(GetCardShapeType(model), new ActivityShapeModel<TActivity>(model, designer)).Location("Card", "Content")
|
||||
);
|
||||
}
|
||||
|
||||
protected string GetDesignShapeType(IActivity activity) => $"{activity.TypeName}_Design";
|
||||
protected string GetCardShapeType(IActivity activity) => $"{activity.TypeName}_Card";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Base class for activity drivers using a strongly typed view model.
|
||||
/// </summary>
|
||||
public abstract class ActivityDisplayDriver<TActivity, TEditViewModel> : ActivityDisplayDriver<TActivity>
|
||||
where TActivity : class, IActivity
|
||||
where TEditViewModel : class, new()
|
||||
{
|
||||
protected ActivityDisplayDriver(IActivityDesignerStore designerStore) : base(designerStore)
|
||||
{
|
||||
}
|
||||
|
||||
public override IDisplayResult Edit(TActivity model)
|
||||
{
|
||||
var result = Initialize(
|
||||
GetEditorShapeType(model),
|
||||
(Func<TEditViewModel, Task>) (viewModel => EditActivityAsync(model, viewModel)))
|
||||
.Location("Content");
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public override async Task<IDisplayResult> UpdateAsync(TActivity model, IUpdateModel updater)
|
||||
{
|
||||
var viewModel = new TEditViewModel();
|
||||
|
||||
if (await updater.TryUpdateModelAsync(viewModel, Prefix))
|
||||
await UpdateActivityAsync(viewModel, model);
|
||||
|
||||
return Edit(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Edit the view model before it's used in the editor.
|
||||
/// </summary>
|
||||
protected virtual Task EditActivityAsync(TActivity activity, TEditViewModel model)
|
||||
{
|
||||
EditActivity(activity, model);
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Edit the view model before it's used in the editor.
|
||||
/// </summary>
|
||||
protected virtual void EditActivity(TActivity activity, TEditViewModel model)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the activity when the view model is validated.
|
||||
/// </summary>
|
||||
protected virtual Task UpdateActivityAsync(TEditViewModel model, TActivity activity)
|
||||
{
|
||||
UpdateActivity(model, activity);
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the activity when the view model is validated.
|
||||
/// </summary>
|
||||
protected virtual void UpdateActivity(TEditViewModel model, TActivity activity)
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual string GetEditorShapeType(TActivity activity) => $"{activity.TypeName}_Edit";
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<RootNamespace>Elsa.Web</RootNamespace>
|
||||
<PackageVersion>1.0.0</PackageVersion>
|
||||
<Authors>Sipke Schoorstra</Authors>
|
||||
<Description>Elsa is a set of workflowing libraries and tools to enable super-fast workflowing capabilities in any .NET Core application.</Description>
|
||||
<Copyright>2019</Copyright>
|
||||
<PackageProjectUrl>https://github.com/sfmskywalker/Elsa</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/sfmskywalker/Elsa</RepositoryUrl>
|
||||
<RepositoryType>GitHub</RepositoryType>
|
||||
<PackageTags>elsa, workflows, orchard</PackageTags>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="OrchardCore.DisplayManagement" Version="1.0.0-beta3-71567" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\core\Elsa.Abstractions\Elsa.Abstractions.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
using System;
|
||||
using Elsa.Web.Models;
|
||||
|
||||
namespace Elsa.Web.Extensions
|
||||
{
|
||||
public static class ActivityExtensions
|
||||
{
|
||||
public static ActivityDesignerMetadata GetDesignerMetadata(this IActivity activity)
|
||||
{
|
||||
return activity.Metadata.CustomFields.GetValue("Designer", StringComparison.OrdinalIgnoreCase)?.ToObject<ActivityDesignerMetadata>() ?? new ActivityDesignerMetadata();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
using Microsoft.Extensions.DependencyInjection;
|
||||
using OrchardCore.DisplayManagement.Handlers;
|
||||
|
||||
namespace Elsa.Web.Extensions
|
||||
{
|
||||
public static class ServiceCollectionExtensions
|
||||
{
|
||||
public static IServiceCollection AddActivityDisplay<TDisplayDriver>(this IServiceCollection services)
|
||||
where TDisplayDriver : class, IDisplayDriver<IActivity>
|
||||
{
|
||||
return services
|
||||
.AddScoped<IDisplayDriver<IActivity>, TDisplayDriver>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
namespace Elsa.Web.Models
|
||||
{
|
||||
public class ActivityDesignerMetadata
|
||||
{
|
||||
public int X { get; set; }
|
||||
public int Y { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
using OrchardCore.DisplayManagement;
|
||||
|
||||
namespace Elsa.Web.Services
|
||||
{
|
||||
public interface IActivityDisplayManager : IDisplayManager<IActivity>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Elsa.Web.Shapes;
|
||||
using OrchardCore.DisplayManagement;
|
||||
using OrchardCore.DisplayManagement.ModelBinding;
|
||||
using OrchardCore.DisplayManagement.Views;
|
||||
|
||||
namespace Elsa.Web.Services
|
||||
{
|
||||
public interface IActivityShapeFactory
|
||||
{
|
||||
Task<ActivityWrapper> BuildDesignShapeAsync(IActivity activity, CancellationToken cancellationToken);
|
||||
Task<ActivityCard> BuildCardShapeAsync(IActivity activity, CancellationToken cancellationToken);
|
||||
Task<ActivityEditor> BuildEditShapeAsync(IActivity activity, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
using Elsa.Models;
|
||||
|
||||
namespace Elsa.Web.Shapes
|
||||
{
|
||||
public class ActivityCard : ActivityShape
|
||||
{
|
||||
public ActivityCard(IActivity activity, ActivityDescriptor activityDescriptor, ActivityDesignerDescriptor activityDesignerDescriptor)
|
||||
: base(activity, activityDescriptor, activityDesignerDescriptor, "Activity_Card")
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
using Elsa.Models;
|
||||
|
||||
namespace Elsa.Web.Shapes
|
||||
{
|
||||
public class ActivityDesign : ActivityShape
|
||||
{
|
||||
public ActivityDesign(IActivity activity, ActivityDescriptor activityDescriptor, ActivityDesignerDescriptor activityDesignerDescriptor)
|
||||
: base(activity, activityDescriptor, activityDesignerDescriptor, "Activity_Design")
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Elsa.Models;
|
||||
|
||||
namespace Elsa.Web.Shapes
|
||||
{
|
||||
public class ActivityEditor : ActivityShape
|
||||
{
|
||||
public IEnumerable<ActivityPropertyEditor> PropertyEditorShapes { get; }
|
||||
|
||||
public ActivityEditor(IActivity activity,
|
||||
ActivityDescriptor activityDescriptor,
|
||||
ActivityDesignerDescriptor activityDesignerDescriptor,
|
||||
IEnumerable<ActivityPropertyEditor> propertyEditorShapes) : base(activity, activityDescriptor, activityDesignerDescriptor, "Activity_Editor")
|
||||
{
|
||||
PropertyEditorShapes = propertyEditorShapes.ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
using System.Reflection;
|
||||
using OrchardCore.DisplayManagement.Views;
|
||||
|
||||
namespace Elsa.Web.Shapes
|
||||
{
|
||||
public class ActivityPropertyEditor : ShapeViewModel
|
||||
{
|
||||
public ActivityPropertyEditor(PropertyInfo propertyInfo, object propertyValue) : base("ActivityProperty_Editor")
|
||||
{
|
||||
PropertyInfo = propertyInfo;
|
||||
PropertyValue = propertyValue;
|
||||
}
|
||||
|
||||
public PropertyInfo PropertyInfo { get; }
|
||||
public object PropertyValue { get; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
using Elsa.Models;
|
||||
using OrchardCore.DisplayManagement.Views;
|
||||
|
||||
namespace Elsa.Web.Shapes
|
||||
{
|
||||
public class ActivityShape : ShapeViewModel
|
||||
{
|
||||
protected ActivityShape(IActivity activity, ActivityDescriptor activityDescriptor, ActivityDesignerDescriptor activityDesignerDescriptor, string shapeType) : base(shapeType)
|
||||
{
|
||||
Activity = activity;
|
||||
ActivityDescriptor = activityDescriptor;
|
||||
ActivityDesignerDescriptor = activityDesignerDescriptor;
|
||||
}
|
||||
|
||||
public IActivity Activity { get; }
|
||||
public ActivityDescriptor ActivityDescriptor { get; }
|
||||
public ActivityDesignerDescriptor ActivityDesignerDescriptor { get; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
using Elsa.Models;
|
||||
using Elsa.Web.Extensions;
|
||||
using Elsa.Web.Models;
|
||||
using OrchardCore.DisplayManagement;
|
||||
|
||||
namespace Elsa.Web.Shapes
|
||||
{
|
||||
public class ActivityWrapper : ActivityShape
|
||||
{
|
||||
public ActivityWrapper(
|
||||
IActivity activity,
|
||||
ActivityDescriptor activityDescriptor,
|
||||
ActivityDesignerDescriptor activityDesignerDescriptor,
|
||||
IShape content) : base(activity, activityDescriptor, activityDesignerDescriptor, "Activity_Wrapper")
|
||||
{
|
||||
Content = content;
|
||||
ActivityDesignerMetadata = activity.GetDesignerMetadata();
|
||||
LogEntries = new List<LogEntry>();
|
||||
BlockingActivities = new List<IActivity>();
|
||||
}
|
||||
|
||||
public ActivityDesignerMetadata ActivityDesignerMetadata { get; }
|
||||
public ICollection<LogEntry> LogEntries { get; set; }
|
||||
public IShape Content { get; }
|
||||
public ICollection<IActivity> BlockingActivities { get; set; }
|
||||
public bool HasExecuted { get; set; }
|
||||
public bool HasFaulted { get; set; }
|
||||
public bool IsBlocking { get; set; }
|
||||
public bool WorkflowIsDefinition { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
using Elsa.Models;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using OrchardCore.DisplayManagement.Views;
|
||||
|
||||
namespace Elsa.Web.ViewModels
|
||||
{
|
||||
public class ActivityShapeModel<TActivity> : ShapeViewModel where TActivity : IActivity
|
||||
{
|
||||
public ActivityShapeModel(TActivity activity, ActivityDesignerDescriptor designer)
|
||||
{
|
||||
Activity = activity;
|
||||
Designer = designer;
|
||||
}
|
||||
|
||||
public TActivity Activity { get; }
|
||||
public ActivityDesignerDescriptor Designer { get; }
|
||||
|
||||
public LocalizedString DisplayText => string.IsNullOrWhiteSpace(Activity.Metadata.Title)
|
||||
? Designer.DisplayName
|
||||
: new LocalizedString(Activity.Metadata.Title, Activity.Metadata.Title);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
{
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@types/bootstrap": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/bootstrap/-/bootstrap-4.1.2.tgz",
|
||||
"integrity": "sha512-BiC/IxqyLS68UFp71t2Px80ql/FpaUKSy469aa6HTDFRkv/FvdzRZjF6ifDql/VKSLyin5AZa/yARLetMFM4rQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/jquery": "*",
|
||||
"popper.js": "^1.14.1"
|
||||
}
|
||||
},
|
||||
"@types/jquery": {
|
||||
"version": "3.3.22",
|
||||
"resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.3.22.tgz",
|
||||
"integrity": "sha512-a4JDcIhJhHYnoWCkG3xT2CZxXZeA92JeREESorg0DMQ3ZsjuKF48h7XK4l5Gl2GRa/ItGRpKMT0pyK88yRgqXQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/sizzle": "*"
|
||||
}
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "10.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.2.tgz",
|
||||
"integrity": "sha512-53ElVDSnZeFUUFIYzI8WLQ25IhWzb6vbddNp8UHlXQyU0ET2RhV5zg0NfubzU7iNMh5bBXb0htCzfvrSVNgzaQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/sizzle": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.2.tgz",
|
||||
"integrity": "sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg==",
|
||||
"dev": true
|
||||
},
|
||||
"decode-html": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/decode-html/-/decode-html-2.0.0.tgz",
|
||||
"integrity": "sha1-fQqIfORCgOYJeKcH67f4CB/WHqo="
|
||||
},
|
||||
"jsplumb": {
|
||||
"version": "2.8.3",
|
||||
"resolved": "https://registry.npmjs.org/jsplumb/-/jsplumb-2.8.3.tgz",
|
||||
"integrity": "sha512-x3UOKt0e0uWY9UaLteY6KnlqXGU/mF4Es5IHCSyKwtYjI4TtIvoiwYdq4ytS1I6aLTwW8g77fmNYyOmACtMAVg=="
|
||||
},
|
||||
"popper.js": {
|
||||
"version": "1.14.4",
|
||||
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.4.tgz",
|
||||
"integrity": "sha1-juwdj/AqWjoVLdQ0FKFce3n9abY=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"devDependencies": {
|
||||
"@types/jquery": "^3.3.22",
|
||||
"@types/node": "^10.12.2",
|
||||
"@types/bootstrap": "^4.1.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"decode-html": "^2.0.0",
|
||||
"jsplumb": "^2.8.3"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,180 +0,0 @@
|
|||
///<reference path='../../node_modules/@types/jquery/index.d.ts' />
|
||||
declare var jsPlumb: jsPlumbInstance;
|
||||
|
||||
interface jsPlumbInstance {
|
||||
setRenderMode(renderMode: string): string;
|
||||
bind(event: string, callback: (connection: any, e: any) => void): void;
|
||||
unbind(event?: string): void;
|
||||
ready(callback: () => void): void;
|
||||
importDefaults(defaults: any): void;
|
||||
Defaults: Defaults;
|
||||
restoreDefaults(): void;
|
||||
addClass(el: any, clazz: string): void;
|
||||
addEndpoint(ep: any, source: EndpointOptions, sourceOptions?: SourceOptions): any;
|
||||
removeClass(el: any, clazz: string): void;
|
||||
hasClass(el: any, clazz: string): void;
|
||||
draggable(el: any, options?: DragOptions): jsPlumbInstance;
|
||||
draggable(ids: string[], options?: DragOptions): jsPlumbInstance;
|
||||
connect(connection: ConnectParams, referenceParams?: ConnectParams): Connection;
|
||||
makeSource(el: any, options: SourceOptions): void;
|
||||
makeTarget(el: any, options: TargetOptions): void;
|
||||
repaintEverything(): void;
|
||||
detachEveryConnection(): void;
|
||||
detachAllConnections(el: string): void;
|
||||
removeAllEndpoints(el: string, recurse?: boolean): jsPlumbInstance;
|
||||
removeAllEndpoints(el: Element, recurse?: boolean): jsPlumbInstance;
|
||||
select(params: SelectParams): Connections;
|
||||
getConnections(options?: any, flat?: any): any[];
|
||||
deleteEndpoint(uuid: string, doNotRepaintAfterwards?: boolean): jsPlumbInstance;
|
||||
deleteEndpoint(endpoint: Endpoint, doNotRepaintAfterwards?: boolean): jsPlumbInstance;
|
||||
deleteConnection(connection: Connection): jsPlumbInstance;
|
||||
remove(element: any): jsPlumbInstance;
|
||||
repaint(el: string): jsPlumbInstance;
|
||||
repaint(el: Element): jsPlumbInstance;
|
||||
getInstance(): jsPlumbInstance;
|
||||
getInstance(defaults: Defaults): jsPlumbInstance;
|
||||
getInstanceIndex(): number;
|
||||
registerConnectionType(name: string, type: ConnectionType): jsPlumbInstance;
|
||||
batch(func: Function): jsPlumbInstance;
|
||||
getSelector(sel: string): any;
|
||||
getEndpoint(uuid: string): Endpoint;
|
||||
|
||||
SVG: string;
|
||||
CANVAS: string;
|
||||
VML: string;
|
||||
}
|
||||
|
||||
interface Defaults {
|
||||
Anchor?: string;
|
||||
Endpoint?: any[];
|
||||
PaintStyle?: PaintStyle;
|
||||
HoverPaintStyle?: PaintStyle;
|
||||
EndpointStyles?: EndpointOptions;
|
||||
ConnectionsDetachable?: boolean;
|
||||
ReattachConnections?: boolean;
|
||||
ConnectionOverlays?: any[][];
|
||||
Container?: any; // string(selector or id) or element
|
||||
DragOptions?: DragOptions;
|
||||
}
|
||||
|
||||
interface ConnectionType {
|
||||
connector: string,
|
||||
paintStyle: PaintStyle,
|
||||
hoverPaintStyle: PaintStyle,
|
||||
overlays: Array<string>
|
||||
}
|
||||
|
||||
interface PaintStyle {
|
||||
fill?: string;
|
||||
radius?: number;
|
||||
stroke?: string;
|
||||
strokeWidth?: number;
|
||||
joinstyle?: string;
|
||||
outlineStroke?: string;
|
||||
outlineWidth?: number;
|
||||
}
|
||||
|
||||
interface Overlay {
|
||||
setLabel(label: string): void;
|
||||
}
|
||||
|
||||
interface ArrowOverlay extends Overlay {
|
||||
location: number;
|
||||
id: string;
|
||||
length: number;
|
||||
foldback: number;
|
||||
}
|
||||
|
||||
interface LabelOverlay extends Overlay {
|
||||
label: string;
|
||||
id: string;
|
||||
location: number;
|
||||
}
|
||||
|
||||
interface Connections {
|
||||
detach(): void;
|
||||
length: number;
|
||||
}
|
||||
|
||||
interface ConnectParams {
|
||||
source?: any; // string, element or endpoint
|
||||
target?: any; // string, element or endpoint
|
||||
detachable?: boolean;
|
||||
deleteEndpointsOnDetach?: boolean;
|
||||
endPoint?: string;
|
||||
anchor?: string;
|
||||
anchors?: any[];
|
||||
label?: string;
|
||||
uuids?: Array<string>;
|
||||
editable?: boolean;
|
||||
}
|
||||
|
||||
interface DragOptions {
|
||||
scope?: string;
|
||||
cursor?: string;
|
||||
zIndex?: number;
|
||||
grid?: Array<number>;
|
||||
containment?: boolean;
|
||||
start?: (params: any) => void;
|
||||
stop?: (params: any) => void;
|
||||
}
|
||||
|
||||
interface SourceOptions {
|
||||
parent?: string;
|
||||
endpoint?: string;
|
||||
anchor?: string;
|
||||
connector?: any[];
|
||||
connectorStyle?: PaintStyle;
|
||||
uuid?: string;
|
||||
overlays?: Array<any>;
|
||||
}
|
||||
|
||||
interface TargetOptions {
|
||||
isTarget?: boolean;
|
||||
maxConnections?: number;
|
||||
uniqueEndpoint?: boolean;
|
||||
deleteEndpointsOnDetach?: boolean;
|
||||
endpoint?: any;
|
||||
dropOptions?: DropOptions;
|
||||
anchor?: any;
|
||||
}
|
||||
|
||||
interface EndpointOptions {
|
||||
endpoint?: string;
|
||||
anchor?: string;
|
||||
paintStyle?: PaintStyle;
|
||||
isSource?: boolean;
|
||||
connector?: Array<any>;
|
||||
connectorStyle?: PaintStyle;
|
||||
hoverPaintStyle?: PaintStyle;
|
||||
connectorHoverStyle?: PaintStyle;
|
||||
dragOptions?: DragOptions;
|
||||
overlays?: Array<any>;
|
||||
connectorOverlays?: Array<any>;
|
||||
uuid?: string;
|
||||
parameters?: any;
|
||||
}
|
||||
|
||||
interface DropOptions {
|
||||
hoverClass: string;
|
||||
}
|
||||
|
||||
interface SelectParams {
|
||||
scope?: string;
|
||||
source: string;
|
||||
target: string;
|
||||
}
|
||||
|
||||
interface Connection {
|
||||
setDetachable(detachable: boolean): void;
|
||||
setParameter<T>(name: string, value: T): void;
|
||||
endpoints: Endpoint[];
|
||||
getOverlay(name: string): Overlay;
|
||||
getParameters(): any;
|
||||
sourceId: string;
|
||||
targetId: string;
|
||||
}
|
||||
|
||||
interface Endpoint {
|
||||
getParameters(): any;
|
||||
}
|
||||
|
|
@ -1,128 +0,0 @@
|
|||
declare namespace Popper {
|
||||
type Position = 'top' | 'right' | 'bottom' | 'left';
|
||||
|
||||
type Placement = 'auto-start'
|
||||
| 'auto'
|
||||
| 'auto-end'
|
||||
| 'top-start'
|
||||
| 'top'
|
||||
| 'top-end'
|
||||
| 'right-start'
|
||||
| 'right'
|
||||
| 'right-end'
|
||||
| 'bottom-end'
|
||||
| 'bottom'
|
||||
| 'bottom-start'
|
||||
| 'left-end'
|
||||
| 'left'
|
||||
| 'left-start';
|
||||
|
||||
type Boundary = 'scrollParent' | 'viewport' | 'window';
|
||||
|
||||
type ModifierFn = (data: Data, options: Object) => Data;
|
||||
|
||||
interface BaseModifier {
|
||||
order?: number;
|
||||
enabled?: boolean;
|
||||
fn?: ModifierFn;
|
||||
}
|
||||
|
||||
interface Modifiers {
|
||||
shift?: BaseModifier;
|
||||
offset?: BaseModifier & {
|
||||
offset?: number | string,
|
||||
};
|
||||
preventOverflow?: BaseModifier & {
|
||||
priority?: Position[],
|
||||
padding?: number,
|
||||
boundariesElement?: Boundary | Element,
|
||||
escapeWithReference?: boolean
|
||||
};
|
||||
keepTogether?: BaseModifier;
|
||||
arrow?: BaseModifier & {
|
||||
element?: string | Element,
|
||||
};
|
||||
flip?: BaseModifier & {
|
||||
behavior?: 'flip' | 'clockwise' | 'counterclockwise' | Position[],
|
||||
padding?: number,
|
||||
boundariesElement?: Boundary | Element,
|
||||
};
|
||||
inner?: BaseModifier;
|
||||
hide?: BaseModifier;
|
||||
applyStyle?: BaseModifier & {
|
||||
onLoad?: Function,
|
||||
gpuAcceleration?: boolean,
|
||||
};
|
||||
computeStyle?: BaseModifier & {
|
||||
gpuAcceleration?: boolean;
|
||||
x?: 'bottom' | 'top',
|
||||
y?: 'left' | 'right'
|
||||
};
|
||||
|
||||
[name: string]: (BaseModifier & Record<string, any>) | undefined;
|
||||
}
|
||||
|
||||
interface Offset {
|
||||
top: number;
|
||||
left: number;
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
|
||||
interface Data {
|
||||
instance: Popper;
|
||||
placement: Placement;
|
||||
originalPlacement: Placement;
|
||||
flipped: boolean;
|
||||
hide: boolean;
|
||||
arrowElement: Element;
|
||||
styles: CSSStyleDeclaration;
|
||||
boundaries: Object;
|
||||
offsets: {
|
||||
popper: Offset,
|
||||
reference: Offset,
|
||||
arrow: {
|
||||
top: number,
|
||||
left: number,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
interface PopperOptions {
|
||||
placement?: Placement;
|
||||
eventsEnabled?: boolean;
|
||||
modifiers?: Modifiers;
|
||||
removeOnDestroy?: boolean;
|
||||
|
||||
onCreate?(data: Data): void;
|
||||
|
||||
onUpdate?(data: Data): void;
|
||||
}
|
||||
|
||||
interface ReferenceObject {
|
||||
clientHeight: number;
|
||||
clientWidth: number;
|
||||
|
||||
getBoundingClientRect(): ClientRect;
|
||||
}
|
||||
}
|
||||
|
||||
declare class Popper {
|
||||
static modifiers: (Popper.BaseModifier & { name: string })[];
|
||||
static placements: Popper.Placement[];
|
||||
static Defaults: Popper.PopperOptions;
|
||||
|
||||
options: Popper.PopperOptions;
|
||||
|
||||
constructor(reference: Element | Popper.ReferenceObject, popper: Element, options?: Popper.PopperOptions);
|
||||
|
||||
destroy(): void;
|
||||
|
||||
update(): void;
|
||||
|
||||
scheduleUpdate(): void;
|
||||
|
||||
enableEventListeners(): void;
|
||||
|
||||
disableEventListeners(): void;
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
module decode {
|
||||
const entities: any = {
|
||||
'amp': '&',
|
||||
'apos': '\'',
|
||||
'lt': '<',
|
||||
'gt': '>',
|
||||
'quot': '"',
|
||||
'nbsp': '\xa0'
|
||||
};
|
||||
|
||||
const entityPattern: RegExp = /&([a-z]+);/ig;
|
||||
|
||||
export function decodeHTMLEntities(text: string): string {
|
||||
return text.replace(entityPattern, function (match, entity) {
|
||||
entity = entity.toLowerCase();
|
||||
if (entities.hasOwnProperty(entity)) {
|
||||
return entities[entity];
|
||||
}
|
||||
return match;
|
||||
});
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
namespace Elsa {
|
||||
export interface ActivityDescriptor {
|
||||
name: string;
|
||||
displayText: string;
|
||||
description: string;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,84 +0,0 @@
|
|||
///<reference path='../../node_modules/@types/jquery/index.d.ts' />
|
||||
///<reference path='../../node_modules/@types/bootstrap/index.d.ts' />
|
||||
///<reference path="activity.ts"/>
|
||||
|
||||
namespace Elsa {
|
||||
|
||||
export class ActivityEditor {
|
||||
private containerElement: JQuery<HTMLElement>;
|
||||
private titleElement: JQuery<HTMLElement>;
|
||||
private contentElement: JQuery<HTMLElement>;
|
||||
private formElement: JQuery<HTMLFormElement>;
|
||||
private activityName: string;
|
||||
private deferred: JQuery.Deferred<any>;
|
||||
private saveButtonElement: JQuery<HTMLElement>;
|
||||
|
||||
constructor(container: HTMLElement) {
|
||||
this.containerElement = $(container);
|
||||
this.titleElement = this.containerElement.find('.modal-title');
|
||||
this.saveButtonElement = this.containerElement.find('.save-button');
|
||||
this.contentElement = this.containerElement.find('.modal-body');
|
||||
this.formElement = <JQuery<HTMLFormElement>>this.containerElement.find('form');
|
||||
|
||||
this.formElement.on('submit', this.onFormSubmit);
|
||||
}
|
||||
|
||||
public show = () => this.containerElement.modal('show');
|
||||
public hide = () => this.containerElement.modal('hide');
|
||||
|
||||
public display = (activityName: string, activity: IActivity): JQuery.Promise<any> => {
|
||||
this.activityName = activityName;
|
||||
this.deferred = jQuery.Deferred<any>();
|
||||
const isNew = activity == null;
|
||||
const action = isNew ? 'create' : 'edit';
|
||||
const saveButtonText = isNew ? 'Add' : 'Save';
|
||||
const activityJson: string = activity == null ? null : JSON.stringify(activity);
|
||||
|
||||
this.saveButtonElement.text(saveButtonText);
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: `/activity/${action}/${activityName}`,
|
||||
data: activityJson,
|
||||
contentType: 'application/json',
|
||||
dataType: 'html'
|
||||
}).done(this.displayActivity);
|
||||
|
||||
return this.deferred.promise();
|
||||
};
|
||||
|
||||
private displayActivity = (data: any) => {
|
||||
const html = <string>data;
|
||||
this.contentElement.html(html);
|
||||
};
|
||||
|
||||
public get title(): string {
|
||||
return this.titleElement.text();
|
||||
}
|
||||
|
||||
public set title(value: string) {
|
||||
this.titleElement.text(value);
|
||||
}
|
||||
|
||||
private onFormSubmit = (e: JQuery.Event) => {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: `/activity/update/${this.activityName}`,
|
||||
data: this.formElement.serialize(),
|
||||
dataType: 'html'
|
||||
}).done((data: any, textStatus: JQuery.Ajax.SuccessTextStatus, xhr: any) => {
|
||||
const activityElement: JQuery = $(data);
|
||||
|
||||
if (activityElement.is('.activity-editor-fields')) {
|
||||
this.displayActivity(data);
|
||||
}
|
||||
else {
|
||||
this.deferred.resolve(data);
|
||||
this.hide();
|
||||
}
|
||||
});
|
||||
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
///<reference path="activity.ts"/>
|
||||
namespace Elsa {
|
||||
export interface ActivityInfo {
|
||||
activityElement: HTMLElement;
|
||||
activityName: string;
|
||||
activityDisplayText: string;
|
||||
activity: IActivity;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
namespace Elsa {
|
||||
export interface IActivityMetadata {
|
||||
customFields: any;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
///<reference path='../../node_modules/@types/jquery/index.d.ts' />
|
||||
///<reference path='../../node_modules/@types/bootstrap/index.d.ts' />
|
||||
///<reference path="selected-activity-info.ts"/>
|
||||
|
||||
namespace Elsa {
|
||||
export class ActivityPicker {
|
||||
|
||||
private readonly container: JQuery<HTMLElement>;
|
||||
|
||||
constructor(containerElement: HTMLElement) {
|
||||
this.container = $(containerElement);
|
||||
this.container.find('a[data-activity-name]').on('click', this.onSelectActivityClick);
|
||||
|
||||
this.container.find('.activity-picker-categories').on('click', '.nav-link', e => {
|
||||
this.applyFilter($(e.target).attr('href').substr(1), null);
|
||||
});
|
||||
|
||||
this.container.find('.modal-activities input[type=search]').on('keyup', e => {
|
||||
this.applyFilter(null, <string>$(e.target).val());
|
||||
});
|
||||
|
||||
this.container.on('show.bs.modal', (event) => {
|
||||
const button = $(event.relatedTarget); // Button that triggered the modal.
|
||||
const title = button.data('picker-title');
|
||||
const trigger = button.data('activity-trigger');
|
||||
const modal = this.container;
|
||||
modal.find('[href="#all"]').click();
|
||||
modal.find('.modal-title').text(title);
|
||||
modal.data('activity-trigger', trigger);
|
||||
this.applyFilter(null, null);
|
||||
})
|
||||
}
|
||||
|
||||
public show = () => this.container.modal('show');
|
||||
public hide = () => this.container.modal('hide');
|
||||
|
||||
public addEventListener = (eventName: string, listener: EventListenerOrEventListenerObject): void => {
|
||||
return this.container[0].addEventListener(eventName, listener);
|
||||
};
|
||||
|
||||
private onSelectActivityClick = (e: JQuery.Event): void => {
|
||||
debugger;
|
||||
e.preventDefault();
|
||||
|
||||
const selectedActivityInfo: SelectedActivityInfo = {
|
||||
activityName: $(e.target).data('activity-name'),
|
||||
activityDisplayText: $(e.target).data('activity-display-text')
|
||||
};
|
||||
const event = new CustomEvent('activity-selected', {detail: selectedActivityInfo});
|
||||
this.container[0].dispatchEvent(event);
|
||||
};
|
||||
|
||||
private applyFilter = (category: string, q: string) => {
|
||||
const trigger = this.container.data('activity-trigger');
|
||||
category = category || $('.activity-picker-categories .nav-link.active').attr('href').substr(1);
|
||||
q = q || <string>this.container.find('input[type=search]').val();
|
||||
|
||||
const $cards = $('.activity.card').show();
|
||||
|
||||
// Remove activities whose type doesn't match the configured activity type.
|
||||
$cards.filter((i, el) => {
|
||||
return $(el).data('activity-trigger') != trigger;
|
||||
}).hide();
|
||||
|
||||
if (q.length > 0) {
|
||||
// Remove activities whose title doesn't match the query.
|
||||
$cards.filter((i, el) => {
|
||||
return $(el).find('.card-title').text().toLowerCase().indexOf(q.toLowerCase()) < 0 && q && q.length > 0;
|
||||
}).hide();
|
||||
} else {
|
||||
// Remove activities whose category doesn't match the selected one.
|
||||
$cards.filter((i, el) => {
|
||||
return $(el).data('category').toLowerCase() != category.toLowerCase() && category.toLowerCase() != 'all';
|
||||
}).hide();
|
||||
}
|
||||
|
||||
// Show or hide categories based on whether there are any available activities.
|
||||
$('.activity-picker-categories [data-category]').each((i, el) => {
|
||||
const categoryListItem = $(el);
|
||||
const category = categoryListItem.data('category');
|
||||
|
||||
// Count number of activities within this category and for the specified activity type (Trigger or Action).
|
||||
const activityCount = $(`.activity.card[data-category='${category}'][data-activity-trigger='${trigger}']`).length;
|
||||
activityCount == 0 ? categoryListItem.hide() : categoryListItem.show();
|
||||
});
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
///<reference path="activity-metadata.ts"/>
|
||||
|
||||
namespace Elsa {
|
||||
export interface IActivity {
|
||||
id: string;
|
||||
metadata: IActivityMetadata;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
///<reference path="source-endpoint.ts"/>
|
||||
///<reference path="target-endpoint.ts"/>
|
||||
namespace Elsa {
|
||||
export interface IConnection {
|
||||
source: ISourceEndpoint;
|
||||
target: ITargetEndpoint;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
///<reference path="source-endpoint.ts"/>
|
||||
///<reference path="target-endpoint.ts"/>
|
||||
namespace Elsa {
|
||||
export interface LogEntry {
|
||||
activityId: string;
|
||||
timestamp: Date;
|
||||
faulted: boolean;
|
||||
message: string;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
namespace Elsa {
|
||||
export interface SelectedActivityInfo {
|
||||
activityName: string;
|
||||
activityDisplayText: string;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
namespace Elsa {
|
||||
export interface ISourceEndpoint {
|
||||
name: string;
|
||||
activityId: string;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
namespace Elsa {
|
||||
export interface ITargetEndpoint {
|
||||
activityId: string;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue