diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index cfb2d2ff..b3414446 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -12,7 +12,7 @@ Give a concrete example of what you want to see in System Designer.
Give the following informations related to your problem:
-- System Designer version number: (ex: *v4.3.0*)
+- System Designer version number: (ex: *v4.4.0*)
- System Designer platform: (ex: *macOS*)
- Your OS version: (ex: *macOS 10.14.4*)
- If use on a phone, please give the model: (ex: *iPhone XS*)
diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md
index e73aa60f..a0395cb8 100644
--- a/ISSUE_TEMPLATE.md
+++ b/ISSUE_TEMPLATE.md
@@ -1,6 +1,6 @@
For issues give the following informations related to your issue:
-- System Designer version number: (ex: *v4.3.0*)
+- System Designer version number: (ex: *v4.4.0*)
- System Designer platform: (ex: *macOS*)
- Your OS version: (ex: *macOS 10.14.4*)
- If use on a phone, please give the model: (ex: *iPhone XS*)
diff --git a/package.json b/package.json
index 6f8d25f8..eb9798b7 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "system-designer",
- "version": "4.3.0",
+ "version": "4.4.0",
"description": "System Designer, an IDE for designing systems",
"homepage": "https://designfirst.io/systemdesigner/",
"keywords": [
diff --git a/src/merges/cordova/cache.js b/src/merges/cordova/cache.js
index da8a6d61..38a4e617 100644
--- a/src/merges/cordova/cache.js
+++ b/src/merges/cordova/cache.js
@@ -1,7 +1,7 @@
// System Designer - Copyright 2020 Erwan Carriou
// Licensed under the Apache License, Version 2.0 (the "License")
-const version = 'v4.3.0';
+const version = 'v4.4.0';
const clearCaches = () => {
return caches.keys().then(keys => {
diff --git a/src/merges/web/cache.js b/src/merges/web/cache.js
index 155294d3..d53c2743 100644
--- a/src/merges/web/cache.js
+++ b/src/merges/web/cache.js
@@ -1,7 +1,7 @@
// System Designer - Copyright 2020 Erwan Carriou
// Licensed under the Apache License, Version 2.0 (the "License")
-const version = 'v4.3.0';
+const version = 'v4.4.0';
const clearCaches = () => {
return caches.keys().then(keys => {
diff --git a/src/systems/classes/Designer-class.json b/src/systems/classes/Designer-class.json
index 035dd59d..3078478d 100644
--- a/src/systems/classes/Designer-class.json
+++ b/src/systems/classes/Designer-class.json
@@ -34,7 +34,7 @@
"type": "string",
"readOnly": false,
"mandatory": false,
- "default": "4.3.0"
+ "default": "4.4.0"
},
"runWindow": {
"type": "object",
@@ -148,7 +148,7 @@
"_id": "g1043310ce91f287",
"component": "Designer",
"state": "saveAs",
- "action": "function saveAs(data, fileName) {\n var textToWrite = null,\n textFileAsBlob = null,\n fileNameToSaveAs = null,\n downloadLink = null,\n message = this.require('message');\n \n textToWrite = JSON.stringify(data);\n fileNameToSaveAs = fileName;\n \n if (!this.isElectron()) {\n \n textFileAsBlob = new Blob([textToWrite], {\n type: 'text/plain'\n });\n \n if (navigator.msSaveBlob) {\n navigator.msSaveBlob(textFileAsBlob, fileNameToSaveAs);\n } else {\n downloadLink = document.createElement('a');\n downloadLink.download = fileNameToSaveAs;\n downloadLink.innerHTML = 'Download File';\n if (window.URL != null) {\n downloadLink.href = window.URL.createObjectURL(textFileAsBlob);\n } else {\n downloadLink.href = window.URL.createObjectURL(textFileAsBlob);\n downloadLink.onclick = function (event) {\n document.body.removeChild(event.target);\n };\n downloadLink.style.display = 'none';\n document.body.appendChild(downloadLink);\n }\n \n downloadLink.click();\n }\n \n message.success('Exportation is done.');\n } else {\n var {dialog} = require(\"electron\").remote;\n var fs = require('fs');\n var savePath = dialog.showSaveDialog({\n 'defaultPath': '~/' + fileNameToSaveAs\n });\n\n if (savePath) {\n fs.writeFile(savePath, textToWrite, function(err) {\n if (err) {\n message.danger('Exportation failed.');\n } else {\n message.success('Exportation is done.');\n }\n });\n }\n }\n}"
+ "action": "function saveAs(data, fileName) {\n var textToWrite = null,\n textFileAsBlob = null,\n fileNameToSaveAs = null,\n downloadLink = null,\n message = this.require('message');\n \n textToWrite = JSON.stringify(data);\n fileNameToSaveAs = fileName;\n \n if (!this.isElectron()) {\n \n textFileAsBlob = new Blob([textToWrite], {\n type: 'text/plain'\n });\n \n if (navigator.msSaveBlob) {\n navigator.msSaveBlob(textFileAsBlob, fileNameToSaveAs);\n } else {\n downloadLink = document.createElement('a');\n downloadLink.download = fileNameToSaveAs;\n downloadLink.innerHTML = 'Download File';\n if (window.URL != null) {\n downloadLink.href = window.URL.createObjectURL(textFileAsBlob);\n } else {\n downloadLink.href = window.URL.createObjectURL(textFileAsBlob);\n downloadLink.onclick = function (event) {\n document.body.removeChild(event.target);\n };\n downloadLink.style.display = 'none';\n document.body.appendChild(downloadLink);\n }\n \n downloadLink.click();\n }\n \n message.success('Exportation is done.');\n } else {\n var {dialog} = require(\"electron\").remote;\n var fs = require('fs');\n\n dialog.showSaveDialog({\n 'defaultPath': '~/' + fileNameToSaveAs\n }).then(function(ret) {\n var savePath = ret.filePath; \n if (savePath) {\n fs.writeFile(savePath, textToWrite, function(err) {\n if (err) {\n message.danger('Exportation failed.');\n } else {\n message.success('Exportation is done.');\n }\n });\n }\n });\n }\n}"
},
"u16f78106f713bd5": {
"_id": "u16f78106f713bd5",
@@ -180,7 +180,7 @@
"_id": "designer",
"debugWindow": null,
"runWindow": null,
- "version": "4.3.0"
+ "version": "4.4.0"
}
}
},
diff --git a/src/systems/classes/Dialog-class.json b/src/systems/classes/Dialog-class.json
index 0847b5a8..8c3c813f 100644
--- a/src/systems/classes/Dialog-class.json
+++ b/src/systems/classes/Dialog-class.json
@@ -830,7 +830,7 @@
"_id": "b1f8331ef3b19fb8",
"component": "DialogExport",
"state": "ok",
- "action": "function ok() { \n var message = this.require('message');\n // code inspired from the blog post\n // https://thiscouldbebetter.wordpress.com/2012/12/18/loading-editing-and-saving-a-text-file-in-html5-using-javascrip/\n if (this.require('factory').system()) {\n var system = null,\n textToWrite = null,\n textFileAsBlob = null,\n fileNameToSaveAs = null,\n downloadLink = null;\n\n system = this.require('db').collections().System.find({\n '_id': this.require('factory').system().id()\n })[0];\n system = JSON.parse(JSON.stringify(system));\n\n switch (true) {\n case $('#designer-dialog-export-json').prop('checked'):\n textToWrite = this.require('export').toJSON($('#designer-dialog-export-isMaster').prop('checked'));\n fileNameToSaveAs = this.require('factory').system().name() + '.json';\n break;\n case $('#designer-dialog-export-javascript').prop('checked'):\n textToWrite = this.require('export').toJavaScript($('#designer-dialog-export-options-log-level-select').val());\n fileNameToSaveAs = this.require('factory').system().name() + '.js';\n break;\n case $('#designer-dialog-export-html').prop('checked'):\n textToWrite = this.require('export').toHTML($('#designer-dialog-export-options-log-level-select').val());\n fileNameToSaveAs = this.require('factory').system().name() + '.html';\n break;\n case $('#designer-dialog-export-node').prop('checked'):\n textToWrite = this.require('export').toNode($('#designer-dialog-export-options-log-level-select').val());\n fileNameToSaveAs = this.require('factory').system().name() + '.js';\n break;\n case $('#designer-dialog-export-graphviz').prop('checked'):\n textToWrite = this.require('export').toGraphviz($('#designer-dialog-export-options-diagram-type-select').val());\n fileNameToSaveAs = this.require('factory').system().name() + '.gv';\n break;\n default:\n break;\n }\n\n if (!this.require('designer').isElectron()) {\n\n textFileAsBlob = new Blob([textToWrite], {\n type: 'application/octet-stream'\n });\n\n if (navigator.msSaveBlob) {\n navigator.msSaveBlob(textFileAsBlob, fileNameToSaveAs);\n } else {\n downloadLink = document.createElement('a');\n document.body.appendChild(downloadLink);\n downloadLink.style.display = 'none';\n \n downloadLink.download = fileNameToSaveAs;\n downloadLink.href = window.URL.createObjectURL(textFileAsBlob);\n \n downloadLink.click();\n window.URL.revokeObjectURL(downloadLink.href);\n }\n\n this.hide();\n } else {\n this.hide();\n\n var { dialog } = require('electron').remote;\n var fs = require('fs');\n var savePath = dialog.showSaveDialog({\n 'defaultPath': '~/' + fileNameToSaveAs\n });\n if (savePath) {\n fs.writeFile(savePath, textToWrite, function (err) {\n if (err) {\n message.danger('Exportation failed.');\n } else {\n message.success('Exportation is done.');\n }\n });\n }\n }\n } else {\n message.warning('There is no system to export.');\n }\n}",
+ "action": "function ok() { \n var message = this.require('message');\n // code inspired from the blog post\n // https://thiscouldbebetter.wordpress.com/2012/12/18/loading-editing-and-saving-a-text-file-in-html5-using-javascrip/\n if (this.require('factory').system()) {\n var system = null,\n textToWrite = null,\n textFileAsBlob = null,\n fileNameToSaveAs = null,\n downloadLink = null;\n\n system = this.require('db').collections().System.find({\n '_id': this.require('factory').system().id()\n })[0];\n system = JSON.parse(JSON.stringify(system));\n\n switch (true) {\n case $('#designer-dialog-export-json').prop('checked'):\n textToWrite = this.require('export').toJSON($('#designer-dialog-export-isMaster').prop('checked'));\n fileNameToSaveAs = this.require('factory').system().name() + '.json';\n break;\n case $('#designer-dialog-export-javascript').prop('checked'):\n textToWrite = this.require('export').toJavaScript($('#designer-dialog-export-options-log-level-select').val());\n fileNameToSaveAs = this.require('factory').system().name() + '.js';\n break;\n case $('#designer-dialog-export-html').prop('checked'):\n textToWrite = this.require('export').toHTML($('#designer-dialog-export-options-log-level-select').val());\n fileNameToSaveAs = this.require('factory').system().name() + '.html';\n break;\n case $('#designer-dialog-export-node').prop('checked'):\n textToWrite = this.require('export').toNode($('#designer-dialog-export-options-log-level-select').val());\n fileNameToSaveAs = this.require('factory').system().name() + '.js';\n break;\n case $('#designer-dialog-export-graphviz').prop('checked'):\n textToWrite = this.require('export').toGraphviz($('#designer-dialog-export-options-diagram-type-select').val());\n fileNameToSaveAs = this.require('factory').system().name() + '.gv';\n break;\n default:\n break;\n }\n\n if (!this.require('designer').isElectron()) {\n\n textFileAsBlob = new Blob([textToWrite], {\n type: 'application/octet-stream'\n });\n\n if (navigator.msSaveBlob) {\n navigator.msSaveBlob(textFileAsBlob, fileNameToSaveAs);\n } else {\n downloadLink = document.createElement('a');\n document.body.appendChild(downloadLink);\n downloadLink.style.display = 'none';\n \n downloadLink.download = fileNameToSaveAs;\n downloadLink.href = window.URL.createObjectURL(textFileAsBlob);\n \n downloadLink.click();\n window.URL.revokeObjectURL(downloadLink.href);\n }\n\n this.hide();\n } else {\n this.hide();\n\n var { dialog } = require('electron').remote;\n var fs = require('fs');\n\n dialog.showSaveDialog({\n 'defaultPath': '~/' + fileNameToSaveAs\n }).then(function(ret) {\n var savePath = ret.filePath; \n if (savePath) {\n fs.writeFile(savePath, textToWrite, function(err) {\n if (err) {\n message.danger('Exportation failed.');\n } else {\n message.success('Exportation is done.');\n }\n });\n }\n });\n }\n } else {\n message.warning('There is no system to export.');\n }\n}",
"useCoreAPI": false,
"core": false
},
diff --git a/src/systems/classes/HTML-class.json b/src/systems/classes/HTML-class.json
index 0a00388e..75b60e38 100644
--- a/src/systems/classes/HTML-class.json
+++ b/src/systems/classes/HTML-class.json
@@ -62,7 +62,7 @@
},
"menu-action-version.html": {
"_id": "menu-action-version.html",
- "source": "v4.3.0"
+ "source": "v4.4.0"
},
"menu-header-behavior.html": {
"_id": "menu-header-behavior.html",
diff --git a/src/systems/core/diagram.json b/src/systems/core/diagram.json
index 3429fbd7..c3d71ced 100644
--- a/src/systems/core/diagram.json
+++ b/src/systems/core/diagram.json
@@ -434,7 +434,7 @@
"type": "string",
"readOnly": false,
"mandatory": false,
- "default": "4.3.0"
+ "default": "4.4.0"
},
"runWindow": {
"type": "object",
@@ -725,7 +725,7 @@
"_id": "r1484a1f32d17210",
"component": "q16e321bb2c15a27",
"state": "click",
- "action": "function click() { \n $('#designer-toolbar-item-export-diagram').tooltip('hide');\n if ($('#designer-dialog').children().length) {\n $('#' + $(\"#designer-dialog\").children()[0].id).removeClass('fade').modal('hide');\n }\n \n var message = this.require('message');\n var data = this.require('viz').data();\n\n // code inspired from the blog post\n // https://thiscouldbebetter.wordpress.com/2012/12/18/loading-editing-and-saving-a-text-file-in-html5-using-javascrip/\n if (this.require('factory').system() || data) {\n var system = null,\n textToWrite = null,\n textFileAsBlob = null,\n fileNameToSaveAs = null,\n downloadLink = null;\n \n if (this.require('factory').system()) {\n system = this.require('db').collections().System.find({\n '_id': this.require('factory').system().id()\n })[0];\n system = JSON.parse(JSON.stringify(system));\n textToWrite = '' + $('#designer-diagram').html();\n fileNameToSaveAs = this.require('factory').system().name() + '.svg';\n } else {\n textToWrite = '' + $('#designer-diagram').html();\n fileNameToSaveAs = 'diagram.svg';\n }\n\n if (!this.require('designer').isElectron()) {\n\n textFileAsBlob = new Blob([textToWrite], {\n type: 'application/octet-stream'\n });\n\n if (navigator.msSaveBlob) {\n navigator.msSaveBlob(textFileAsBlob, fileNameToSaveAs);\n } else {\n downloadLink = document.createElement('a');\n document.body.appendChild(downloadLink);\n downloadLink.style.display = 'none';\n downloadLink.download = fileNameToSaveAs;\n\n if (window.URL != null) {\n downloadLink.href = window.URL.createObjectURL(textFileAsBlob);\n } else {\n downloadLink.href = window.URL.createObjectURL(textFileAsBlob);\n }\n downloadLink.click();\n window.URL.revokeObjectURL(downloadLink.href);\n }\n message.success('Exportation is done.');\n } else {\n var { dialog } = require('electron').remote;\n var fs = require('fs');\n var savePath = dialog.showSaveDialog({\n 'defaultPath': '~/' + fileNameToSaveAs\n });\n if (savePath) {\n fs.writeFile(savePath, textToWrite, function (err) {\n if (err) {\n message.danger('Exportation failed.');\n } else {\n message.success('Exportation is done.');\n }\n });\n }\n }\n } else {\n message.warning('There is no diagram.');\n }\n}",
+ "action": "function click() { \n $('#designer-toolbar-item-export-diagram').tooltip('hide');\n if ($('#designer-dialog').children().length) {\n $('#' + $(\"#designer-dialog\").children()[0].id).removeClass('fade').modal('hide');\n }\n \n var message = this.require('message');\n var data = this.require('viz').data();\n\n // code inspired from the blog post\n // https://thiscouldbebetter.wordpress.com/2012/12/18/loading-editing-and-saving-a-text-file-in-html5-using-javascrip/\n if (this.require('factory').system() || data) {\n var system = null,\n textToWrite = null,\n textFileAsBlob = null,\n fileNameToSaveAs = null,\n downloadLink = null;\n \n if (this.require('factory').system()) {\n system = this.require('db').collections().System.find({\n '_id': this.require('factory').system().id()\n })[0];\n system = JSON.parse(JSON.stringify(system));\n textToWrite = '' + $('#designer-diagram').html();\n fileNameToSaveAs = this.require('factory').system().name() + '.svg';\n } else {\n textToWrite = '' + $('#designer-diagram').html();\n fileNameToSaveAs = 'diagram.svg';\n }\n\n if (!this.require('designer').isElectron()) {\n\n textFileAsBlob = new Blob([textToWrite], {\n type: 'application/octet-stream'\n });\n\n if (navigator.msSaveBlob) {\n navigator.msSaveBlob(textFileAsBlob, fileNameToSaveAs);\n } else {\n downloadLink = document.createElement('a');\n document.body.appendChild(downloadLink);\n downloadLink.style.display = 'none';\n downloadLink.download = fileNameToSaveAs;\n\n if (window.URL != null) {\n downloadLink.href = window.URL.createObjectURL(textFileAsBlob);\n } else {\n downloadLink.href = window.URL.createObjectURL(textFileAsBlob);\n }\n downloadLink.click();\n window.URL.revokeObjectURL(downloadLink.href);\n }\n message.success('Exportation is done.');\n } else {\n var { dialog } = require('electron').remote;\n var fs = require('fs');\n dialog.showSaveDialog({\n 'defaultPath': '~/' + fileNameToSaveAs\n }).then(function(ret) {\n var savePath = ret.filePath; \n if (savePath) {\n fs.writeFile(savePath, textToWrite, function(err) {\n if (err) {\n message.danger('Exportation failed.');\n } else {\n message.success('Exportation is done.');\n }\n });\n }\n });\n }\n } else {\n message.warning('There is no diagram.');\n }\n}",
"useCoreAPI": false,
"core": false
},
diff --git a/src/systems/core/editor-behavior.json b/src/systems/core/editor-behavior.json
index f741d98d..fa5728f5 100644
--- a/src/systems/core/editor-behavior.json
+++ b/src/systems/core/editor-behavior.json
@@ -426,7 +426,7 @@
"type": "string",
"readOnly": false,
"mandatory": false,
- "default": "4.3.0"
+ "default": "4.4.0"
},
"runWindow": {
"type": "object",
diff --git a/src/systems/core/editor-component.json b/src/systems/core/editor-component.json
index 8bbb1c1f..fa579469 100644
--- a/src/systems/core/editor-component.json
+++ b/src/systems/core/editor-component.json
@@ -425,7 +425,7 @@
"type": "string",
"readOnly": false,
"mandatory": false,
- "default": "4.3.0"
+ "default": "4.4.0"
},
"runWindow": {
"type": "object",
diff --git a/src/systems/core/editor-model.json b/src/systems/core/editor-model.json
index 09e25d93..118878cb 100644
--- a/src/systems/core/editor-model.json
+++ b/src/systems/core/editor-model.json
@@ -426,7 +426,7 @@
"type": "string",
"readOnly": false,
"mandatory": false,
- "default": "4.3.0"
+ "default": "4.4.0"
},
"runWindow": {
"type": "object",
diff --git a/src/systems/core/editor-schema.json b/src/systems/core/editor-schema.json
index 91f16e92..01a3b9e8 100644
--- a/src/systems/core/editor-schema.json
+++ b/src/systems/core/editor-schema.json
@@ -425,7 +425,7 @@
"type": "string",
"readOnly": false,
"mandatory": false,
- "default": "4.3.0"
+ "default": "4.4.0"
},
"runWindow": {
"type": "object",
diff --git a/src/systems/core/editor-system.json b/src/systems/core/editor-system.json
index e6b31eab..e74f8153 100644
--- a/src/systems/core/editor-system.json
+++ b/src/systems/core/editor-system.json
@@ -381,7 +381,7 @@
"type": "string",
"readOnly": false,
"mandatory": false,
- "default": "4.3.0"
+ "default": "4.4.0"
},
"runWindow": {
"type": "object",
diff --git a/src/systems/core/editor-type.json b/src/systems/core/editor-type.json
index d2e82c78..6d49704b 100644
--- a/src/systems/core/editor-type.json
+++ b/src/systems/core/editor-type.json
@@ -425,7 +425,7 @@
"type": "string",
"readOnly": false,
"mandatory": false,
- "default": "4.3.0"
+ "default": "4.4.0"
},
"runWindow": {
"type": "object",
diff --git a/src/systems/core/system-designer.json b/src/systems/core/system-designer.json
index c5fa746c..e40eddd2 100644
--- a/src/systems/core/system-designer.json
+++ b/src/systems/core/system-designer.json
@@ -1,7 +1,7 @@
{
"name": "system-designer",
"master": true,
- "version": "4.3.0",
+ "version": "4.4.0",
"description": "A Designer for Systems",
"schemas": {
"104ad1f48518376": {
@@ -494,7 +494,7 @@
"type": "string",
"readOnly": false,
"mandatory": false,
- "default": "4.3.0"
+ "default": "4.4.0"
},
"runWindow": {
"type": "object",