feat: support parallel legacy and sandbox extensions

This commit is contained in:
Meik
2026-07-13 15:09:21 +02:00
parent b8ad580ae5
commit 58dcc9f943
89 changed files with 10102 additions and 123 deletions

View File

@@ -0,0 +1,83 @@
(function (w) {
'use strict';
var icons = 'c4it-f4sd-icons';
w.mx = w.mx || {};
w.mx.workspacesConfig = w.mx.workspacesConfig || {};
w.mx.workspacesConfig.modules = w.mx.workspacesConfig.modules || {};
w.mx.workspacesConfig.modules.add = w.mx.workspacesConfig.modules.add || function (name, config) {
w.mx.workspacesConfig.modules[name] = config;
};
w.mx.workspacesConfig.modules.add('mx.C4IT.F4SD', {
name: 'mx.C4IT.F4SD',
config: ['$mdIconProvider', function ($mdIconProvider) {
$mdIconProvider.iconSet(icons, 'workspaces/C4IT_F4SD/F4SDIcons.svg');
w.mx = w.mx || {};
w.mx.components = w.mx.components || {};
w.mx.components.Icons = w.mx.components.Icons || {};
w.mx.components.Icons.unshift({
'id': icons,
'name': 'C4IT F4SD Icons',
'icons': [{
'SVG': true,
'id': icons + ':icon-f4sd',
'name': 'F4SD Icon',
'keywords': ['c4it', 'custom', 'f4sd']
}, {
'SVG': true,
'id': icons + ':icon-f4sd-coloured',
'name': 'F4SD Icon (coloured)',
'keywords': ['c4it', 'custom', 'f4sd']
}
]
});
}
]
});
})(window);
(function (w) {
'use strict';
angular.module("mx.C4IT.F4SD").controller("mx.C4IT.F4SD.Actions.callF4SD", ["mx.shell.Config", "mx.SolutionBuilderAgent.Http", "mx.shell.NotificationService", "mx.internationalization", function (shellConfig, $http, notificationService, i18n) {
var vm = this;
this.restHost = shellConfig.settings.restHosts.default;
this.messageF4SDOpened = i18n.get('c4it.f4sd.action-open-called') || 'F4SD is beeing opened...';
this.execute = function (conf, para) {
// called from context menu grid || in dialog
var eoid = conf[0]['Sys-ObjectId'] || conf[0].ID;
// get action parameters
try {
vm.controllerParams = new URLSearchParams(para.controllerParams);
} catch (error) {
console.log(error);
notificationService.error("Action config parameters format exception");
return;
}
// get f4sd url
const uri = new URL("/api/c4itf4sdwebapi/getdirectlinkf4sd/", vm.restHost);
uri.searchParams.append("type", vm.controllerParams.get("type") || para.name);
uri.searchParams.append("eoid", eoid);
$http.get(uri.pathname + uri.search).then(function (n) {
try {
const F4SDUrl = new URL(n);
if (F4SDUrl.protocol == "f4sdsend:" && F4SDUrl.pathname == "//localhost/") {
if (vm.controllerParams.has("showNotification") && vm.controllerParams.get("showNotification") == 1)
notificationService.info(vm.messageF4SDOpened);
window.location.href = n;
}
} catch (error) {
console.log(error); // => TypeError, "Failed to construct URL: Invalid URL"
notificationService.error("Service not available");
}
}, function errorCallback(response) {
console.log(response);
notificationService.error("Service not available");
});
};
}
]);
})(window);

View File

@@ -0,0 +1,21 @@
<svg aria-hidden="true" style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<symbol id="icon-f4sd-coloured" viewBox="0 0 56.69 56.69">
<title>F4SD Icon (coloured)</title>
<rect fill="#fff" width="56.69" height="56.69" rx="8.15"/>
<path fill="#1d4b99" d="M46.06,34.3a1.77,1.77,0,0,0-.88,2.34A17.81,17.81,0,0,1,46.7,44a1.77,1.77,0,0,0,3.54,0,21.25,21.25,0,0,0-1.84-8.78A1.77,1.77,0,0,0,46.06,34.3Z"/>
<path fill="#1d4b99" d="M33.66,26.57a1.77,1.77,0,0,0,2.2-1.16,1.82,1.82,0,0,0-1.17-2.24,22.72,22.72,0,0,0-6.34-.92A21.75,21.75,0,0,0,6.63,44a1.77,1.77,0,1,0,3.54,0A18.21,18.21,0,0,1,28.41,25.79,18.64,18.64,0,0,1,33.66,26.57Z"/>
<path fill="#1d4b99" d="M42.17,27.18,25.87,39.3a5.53,5.53,0,0,0-1.78,1.48,5.29,5.29,0,0,0,4.61,8.44,5.17,5.17,0,0,0,3.54-1.81,5.47,5.47,0,0,0,1-1.63L42.7,27.71a.42.42,0,0,0-.28-.53A.36.36,0,0,0,42.17,27.18ZM28.35,46.35a2.27,2.27,0,0,1-2.45-2.08v-.05A2.31,2.31,0,0,1,28,41.74h0a2.37,2.37,0,0,1,2.48,2.16,2.31,2.31,0,0,1-2.15,2.45Z"/>
<path fill="#1d4b99" d="M48.08,3.54H8.61A5,5,0,0,0,3.54,8.36v2.27H53.15V8.36A5,5,0,0,0,48.08,3.54Z"/>
<rect fill="#1d4b99" x="3.65" y="13.75" width="49.43" height="2.48"/>
</symbol>
<symbol id="icon-f4sd" viewBox="0 0 56.69 56.69">
<title>F4SD Icon</title>
<path d="M46.06,34.3a1.77,1.77,0,0,0-.88,2.34A17.81,17.81,0,0,1,46.7,44a1.77,1.77,0,0,0,3.54,0,21.25,21.25,0,0,0-1.84-8.78A1.77,1.77,0,0,0,46.06,34.3Z"/>
<path d="M33.66,26.57a1.77,1.77,0,0,0,2.2-1.16,1.82,1.82,0,0,0-1.17-2.24,22.72,22.72,0,0,0-6.34-.92A21.75,21.75,0,0,0,6.63,44a1.77,1.77,0,1,0,3.54,0A18.21,18.21,0,0,1,28.41,25.79,18.64,18.64,0,0,1,33.66,26.57Z"/>
<path d="M42.17,27.18,25.87,39.3a5.53,5.53,0,0,0-1.78,1.48,5.29,5.29,0,0,0,4.61,8.44,5.17,5.17,0,0,0,3.54-1.81,5.47,5.47,0,0,0,1-1.63L42.7,27.71a.42.42,0,0,0-.28-.53A.36.36,0,0,0,42.17,27.18ZM28.35,46.35a2.27,2.27,0,0,1-2.45-2.08v-.05A2.31,2.31,0,0,1,28,41.74h0a2.37,2.37,0,0,1,2.48,2.16,2.31,2.31,0,0,1-2.15,2.45Z"/>
<path d="M48.08,3.54H8.61A5,5,0,0,0,3.54,8.36v2.27H53.15V8.36A5,5,0,0,0,48.08,3.54Z"/>
<rect x="3.65" y="13.75" width="49.43" height="2.48"/>
</symbol>
</defs>
</svg>

View File

@@ -0,0 +1,7 @@
{
"description": "C4IT - F4SD - M42 ESM Integration",
"version": "1.0.1",
"resources": [
"F4SD.min.js"
]
}