diff --git a/.gitignore b/.gitignore index 49647ee..39a91ef 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ F4SDHelper/bin/ F4SDHelper/obj/ F4SDM42WebApi/bin/ F4SDM42WebApi/obj/ +artifacts/ diff --git a/F4SDM42WebApi/BuildM42Package.ps1 b/F4SDM42WebApi/BuildM42Package.ps1 new file mode 100644 index 0000000..dab584d --- /dev/null +++ b/F4SDM42WebApi/BuildM42Package.ps1 @@ -0,0 +1,73 @@ +param( + [Parameter(Mandatory = $true)] + [string]$TemplateDir, + + [Parameter(Mandatory = $true)] + [string]$AssembliesDir, + + [Parameter(Mandatory = $true)] + [string]$OutputRoot, + + [Parameter(Mandatory = $true)] + [string]$PackageName, + + [Parameter(Mandatory = $true)] + [string]$PackageVersion +) + +$ErrorActionPreference = 'Stop' + +function Normalize-FullPath { + param([string]$Path) + return [System.IO.Path]::GetFullPath($Path) +} + +function Normalize-TextFileLineEndings { + param([string]$Path) + + $content = [System.IO.File]::ReadAllText($Path) + $content = [regex]::Replace($content, '(?false 6673a25d-33d6-4072-91d9-abed4be1a966 C4ITF4SD*.* + 1.4.0.4 + true diff --git a/F4SDM42WebApi/M42SandboxedExtension.targets b/F4SDM42WebApi/M42SandboxedExtension.targets index 56bd181..6d03102 100644 --- a/F4SDM42WebApi/M42SandboxedExtension.targets +++ b/F4SDM42WebApi/M42SandboxedExtension.targets @@ -1,9 +1,13 @@ - $(MSBuildProjectDirectory)\BasePackage\Assemblies\ - $(MSBuildProjectDirectory)\Root\InstalledPackages\Assemblies\$(M42ExtensionId)\ + $(MSBuildProjectDirectory)\BasePackage\Assemblies + $(MSBuildProjectDirectory)\Root\InstalledPackages\Assemblies\$(M42ExtensionId) $(MSBuildProjectName)*.* win-x64;linux-x64 + C4IT - F4SD M42 ESM Integration Configuration Package + $(MSBuildProjectDirectory)\..\PackageTemplate + $(MSBuildProjectDirectory)\..\artifacts + $(MSBuildProjectDirectory)\BuildM42Package.ps1 - - + + + + + + + + + + diff --git a/PackageTemplate/Files/WM/workspaces/C4IT_F4SD/F4SD.min.js b/PackageTemplate/Files/WM/workspaces/C4IT_F4SD/F4SD.min.js new file mode 100644 index 0000000..e67f356 --- /dev/null +++ b/PackageTemplate/Files/WM/workspaces/C4IT_F4SD/F4SD.min.js @@ -0,0 +1,3 @@ +/*v1.0.0 (2024-10-29)*/var w;!function(o){"use strict";var e="c4it-f4sd-icons";o.mx=o.mx||{},o.mx.workspacesConfig=o.mx.workspacesConfig||{},o.mx.workspacesConfig.modules=o.mx.workspacesConfig.modules||{},o.mx.workspacesConfig.modules.add=o.mx.workspacesConfig.modules.add||function(e,n){o.mx.workspacesConfig.modules[e]=n},o.mx.workspacesConfig.modules.add("mx.C4IT.F4SD",{name:"mx.C4IT.F4SD",config:["$mdIconProvider",function(n){n.iconSet(e,"workspaces/C4IT_F4SD/F4SDIcons.svg"),o.mx=o.mx||{},o.mx.components=o.mx.components||{},o.mx.components.Icons=o.mx.components.Icons||{},o.mx.components.Icons.unshift({id:e,name:"C4IT F4SD Icons",icons:[{SVG:!0,id:e+":icon-f4sd",name:"F4SD Icon",keywords:["c4it","custom","f4sd"]},{SVG:!0,id:e+":icon-f4sd-coloured",name:"F4SD Icon (coloured)",keywords:["c4it","custom","f4sd"]}]})}]})} +(window),window,angular.module("mx.C4IT.F4SD").controller("mx.C4IT.F4SD.Actions.callF4SD",["mx.shell.Config","mx.SolutionBuilderAgent.Http","mx.shell.NotificationService","mx.internationalization",function(o,e,n,s){var t=this;this.restHost=o.settings.restHosts.default,this.messageF4SDOpened=s.get("c4it.f4sd.action-open-called")||"F4SD is beeing opened...",this.execute=function(o,s){var c=o[0]["Sys-ObjectId"]||o[0].ID;try{t.controllerParams=new URLSearchParams(s.controllerParams)}catch(a){console.log(a),n.error("Action config parameters format exception");return} +let i=new URL("/api/c4itf4sdwebapi/getdirectlinkf4sd/",t.restHost);i.searchParams.append("type",t.controllerParams.get("type")||s.name),i.searchParams.append("eoid",c),e.get(i.pathname+i.search).then(function(o){try{let e=new URL(o);"f4sdsend:"==e.protocol&&(t.controllerParams.has("showNotification")&&1==t.controllerParams.get("showNotification")&&n.info(t.messageF4SDOpened),window.location.href=o)}catch(s){console.log(s),n.error("Service not available")}},function o(e){console.log(e),n.error("Service not available")})}}]); \ No newline at end of file diff --git a/PackageTemplate/Files/WM/workspaces/C4IT_F4SD/F4SDIcons.svg b/PackageTemplate/Files/WM/workspaces/C4IT_F4SD/F4SDIcons.svg new file mode 100644 index 0000000..194f4bd --- /dev/null +++ b/PackageTemplate/Files/WM/workspaces/C4IT_F4SD/F4SDIcons.svg @@ -0,0 +1,21 @@ + \ No newline at end of file diff --git a/PackageTemplate/Files/WM/workspaces/C4IT_F4SD/workspace.json b/PackageTemplate/Files/WM/workspaces/C4IT_F4SD/workspace.json new file mode 100644 index 0000000..816b055 --- /dev/null +++ b/PackageTemplate/Files/WM/workspaces/C4IT_F4SD/workspace.json @@ -0,0 +1,7 @@ +{ + "description": "C4IT - F4SD - M42 ESM Integration", + "version": "1.0.0", + "resources": [ + "F4SD.min.js" + ] +} \ No newline at end of file diff --git a/PackageTemplate/install.xml b/PackageTemplate/install.xml new file mode 100644 index 0000000..8ca8906 --- /dev/null +++ b/PackageTemplate/install.xml @@ -0,0 +1,45 @@ + + +