Skip to content

Commit

Permalink
Bump 4.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ecarriou committed Dec 29, 2019
1 parent a12f23d commit c96b253
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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*)
Expand Down
2 changes: 1 addition & 1 deletion ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -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*)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion src/merges/cordova/cache.js
Original file line number Diff line number Diff line change
@@ -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 => {
Expand Down
2 changes: 1 addition & 1 deletion src/merges/web/cache.js
Original file line number Diff line number Diff line change
@@ -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 => {
Expand Down
6 changes: 3 additions & 3 deletions src/systems/classes/Designer-class.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"type": "string",
"readOnly": false,
"mandatory": false,
"default": "4.3.0"
"default": "4.4.0"
},
"runWindow": {
"type": "object",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -180,7 +180,7 @@
"_id": "designer",
"debugWindow": null,
"runWindow": null,
"version": "4.3.0"
"version": "4.4.0"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/systems/classes/Dialog-class.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down
2 changes: 1 addition & 1 deletion src/systems/classes/HTML-class.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
},
"menu-action-version.html": {
"_id": "menu-action-version.html",
"source": "<a>v4.3.0</a>"
"source": "<a>v4.4.0</a>"
},
"menu-header-behavior.html": {
"_id": "menu-header-behavior.html",
Expand Down
4 changes: 2 additions & 2 deletions src/systems/core/diagram.json
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@
"type": "string",
"readOnly": false,
"mandatory": false,
"default": "4.3.0"
"default": "4.4.0"
},
"runWindow": {
"type": "object",
Expand Down Expand Up @@ -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 = '<?xml version=\"1.0\" encoding=\"utf-8\" ?><!DOCTYPE svg>' + $('#designer-diagram').html();\n fileNameToSaveAs = this.require('factory').system().name() + '.svg';\n } else {\n textToWrite = '<?xml version=\"1.0\" encoding=\"utf-8\" ?><!DOCTYPE svg>' + $('#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 = '<?xml version=\"1.0\" encoding=\"utf-8\" ?><!DOCTYPE svg>' + $('#designer-diagram').html();\n fileNameToSaveAs = this.require('factory').system().name() + '.svg';\n } else {\n textToWrite = '<?xml version=\"1.0\" encoding=\"utf-8\" ?><!DOCTYPE svg>' + $('#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
},
Expand Down
2 changes: 1 addition & 1 deletion src/systems/core/editor-behavior.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@
"type": "string",
"readOnly": false,
"mandatory": false,
"default": "4.3.0"
"default": "4.4.0"
},
"runWindow": {
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion src/systems/core/editor-component.json
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@
"type": "string",
"readOnly": false,
"mandatory": false,
"default": "4.3.0"
"default": "4.4.0"
},
"runWindow": {
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion src/systems/core/editor-model.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@
"type": "string",
"readOnly": false,
"mandatory": false,
"default": "4.3.0"
"default": "4.4.0"
},
"runWindow": {
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion src/systems/core/editor-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@
"type": "string",
"readOnly": false,
"mandatory": false,
"default": "4.3.0"
"default": "4.4.0"
},
"runWindow": {
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion src/systems/core/editor-system.json
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@
"type": "string",
"readOnly": false,
"mandatory": false,
"default": "4.3.0"
"default": "4.4.0"
},
"runWindow": {
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion src/systems/core/editor-type.json
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@
"type": "string",
"readOnly": false,
"mandatory": false,
"default": "4.3.0"
"default": "4.4.0"
},
"runWindow": {
"type": "object",
Expand Down
4 changes: 2 additions & 2 deletions src/systems/core/system-designer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "system-designer",
"master": true,
"version": "4.3.0",
"version": "4.4.0",
"description": "A Designer for Systems",
"schemas": {
"104ad1f48518376": {
Expand Down Expand Up @@ -494,7 +494,7 @@
"type": "string",
"readOnly": false,
"mandatory": false,
"default": "4.3.0"
"default": "4.4.0"
},
"runWindow": {
"type": "object",
Expand Down

0 comments on commit c96b253

Please sign in to comment.