13.7.5 release

This commit is contained in:
Gaudenz Alder 2020-09-23 12:58:20 +02:00
parent c9cac46f6a
commit 21108c70c7
15 changed files with 1527 additions and 1482 deletions

View file

@ -1,3 +1,7 @@
23-SEP-2020: 13.7.5
- Removes document.write for modern browsers
22-SEP-2020: 13.7.4
- Appends splash dialog libs to configured libs

View file

@ -1 +1 @@
13.7.4
13.7.5

View file

@ -144,13 +144,16 @@
*/
function mxscript(src, onLoad, id, dataAppKey, noWrite)
{
if (onLoad != null || noWrite)
var defer = onLoad == null && !noWrite;
if ((urlParams['dev'] != '1' && typeof document.createElement('canvas').getContext === "function") ||
onLoad != null || noWrite)
{
var s = document.createElement('script');
s.setAttribute('type', 'text/javascript');
s.setAttribute('defer', 'true');
s.setAttribute('src', src);
var r = false;
if (id != null)
{
s.setAttribute('id', id);
@ -163,6 +166,8 @@
if (onLoad != null)
{
var r = false;
s.onload = s.onreadystatechange = function()
{
if (!r && (!this.readyState || this.readyState == 'complete'))
@ -418,7 +423,17 @@ if (navigator.userAgent != null && navigator.userAgent.toLowerCase().
}
else
{
App.main();
if (urlParams['dev'] != '1' && typeof document.createElement('canvas').getContext === "function")
{
window.addEventListener('load', function()
{
App.main();
});
}
else
{
App.main();
}
}
</script>
</body>

File diff suppressed because one or more lines are too long

View file

@ -568,8 +568,9 @@ App.main = function(callback, createUi)
{
var content = mxUtils.getTextContent(scripts[0]);
if (CryptoJS.MD5(content).toString() != '5bf9ec4131db137e247634de78c4ec47')
if (CryptoJS.MD5(content).toString() != '9544a60fcc10609bee5e70a56ad52599')
{
console.log('Updated MD5:', CryptoJS.MD5(content).toString());
alert('[Dev] Script change requires update of CSP');
}
}

View file

@ -16,10 +16,11 @@ if (!mxIsElectron && location.protocol !== 'http:')
'https://apis.google.com https://*.pusher.com https://code.jquery.com ' +
// Bootstrap script in index.html (checked for changes in App.main
// in dev mode to avoid deployment without updating this SHA)
'\'sha256-JqdgAC+ydIDMtmQclZEqgbw94J4IeABIfXAxwEJGDJs=\' ' +
'\'sha256-+CrvFhadGyk1VjhHM/t3R88LNSEKManW3TGSZi9fmHQ=\' ' +
// App.main script in index.html
'\'sha256-4Dg3/NrB8tLC7TUSCbrtUDWD/J6bSLka01GHn+qtNZ0=\'; ' +
'connect-src %connect-src% \'self\' https://*.draw.io https://*.diagrams.net https://*.googleapis.com wss://*.pusher.com https://*.pusher.com ' +
'\'sha256-dIEi9UhRQPcyoE9/RPfkIPLe2mSS8oQzwabGMLAZzGE=\'; ' +
'connect-src %connect-src% \'self\' https://*.draw.io https://*.diagrams.net ' +
'https://*.googleapis.com wss://*.pusher.com https://*.pusher.com ' +
'https://api.github.com https://raw.githubusercontent.com https://gitlab.com ' +
'https://graph.microsoft.com https://*.sharepoint.com https://*.1drv.com ' +
'https://*.google.com https://fonts.gstatic.com https://fonts.googleapis.com; ' +

View file

@ -513,6 +513,11 @@
'#\n' +
'# styles: -\n' +
'#\n' +
'## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n' +
'## that will replace a placeholder in a style.\n' +
'#\n' +
'# vars: -\n' +
'#\n' +
'## Optional column name that contains a reference to a named label in labels.\n' +
'## Default is the current label.\n' +
'#\n' +

View file

@ -11824,6 +11824,7 @@
var lookups = {};
// Default values
var vars = null;
var style = null;
var styles = null;
var stylename = null;
@ -11937,6 +11938,10 @@
{
styles = JSON.parse(value);
}
else if (key == 'vars' && value.length > 0 && value != '-')
{
vars = JSON.parse(value);
}
else if (key == 'identity' && value.length > 0 && value != '-')
{
identity = value;
@ -12109,7 +12114,7 @@
}
graph.setAttributeForCell(newCell, 'placeholders', '1');
newCell.style = graph.replacePlaceholders(newCell, newCell.style);
newCell.style = graph.replacePlaceholders(newCell, newCell.style, vars);
if (exists)
{
@ -12185,7 +12190,7 @@
if (parent != null)
{
parent.style = graph.replacePlaceholders(parent, parentstyle);
parent.style = graph.replacePlaceholders(parent, parentstyle, vars);
graph.addCell(cell, parent);
}
else
@ -12249,7 +12254,7 @@
var placeholders = ((edge.placeholders == 'target') ==
!edge.invert) ? ref : realCell;
var style = (edge.style != null) ?
graph.replacePlaceholders(placeholders, edge.style) :
graph.replacePlaceholders(placeholders, edge.style, vars) :
graph.createCurrentEdgeStyle();
var edgeCell = graph.insertEdge(null, null, label || '', (edge.invert) ?

View file

@ -3746,7 +3746,7 @@ LucidImporter = {};
//'TimelineBlock' : cs,
//'TimelineMilestoneBlock' : cs,
//'TimelineIntervalBlock' : cs,
'MinimalTextBlock' : 'strokeColor=none',
'MinimalTextBlock' : 'strokeColor=none;fillColor=none',
//Freehand
'FreehandBlock' : cs
};

View file

@ -354,43 +354,58 @@
return false;
};
/**
*
*/
Sidebar.prototype.showEntries = function(stc, remember, force)
Sidebar.prototype.showEntries = function(entries, remember, force)
{
this.libs = [];
var all = [];
if(stc != null && (force || stc.length > 0))
if (remember)
{
this.libs.push(stc);
mxSettings.setLibraries(entries);
mxSettings.save();
}
if (entries != null && (force || entries.length > 0))
{
all.push(entries);
}
else
{
if(urlParams['libs'] != null && urlParams['libs'].length > 0)
var done = false;
if (urlParams['libs'] != null && urlParams['libs'].length > 0)
{
this.libs.push(decodeURIComponent(urlParams['libs']));
all.push(decodeURIComponent(urlParams['libs']));
done = this.editorUi.getServiceName() == 'draw.io';
}
if(mxSettings != null && mxSettings.settings != null)
// Libs parameter overrides configuration for online app so that
// links can be created to show just the specifies libraries
if (!done)
{
this.libs.push(mxSettings.getLibraries());
}
else
{
this.libs.push(this.defaultEntries);
if (mxSettings != null && mxSettings.settings != null)
{
all.push(mxSettings.getLibraries());
}
else
{
all.push(this.defaultEntries);
}
}
}
this.libs = this.libs.join(';');
var tmp = this.libs.split(';');
// Merges array of semicolon separated strings into a single array
var temp = all.join(';').split(';');
// Maps library names via the alias table
for (var i = 0; i < tmp.length; i++)
// Resolves aliases and creates lookup
var visible = {};
for (var i = 0; i < temp.length; i++)
{
tmp[i] = this.libAliases[tmp[i]] || tmp[i];
visible[this.libAliases[temp[i]] || temp[i]] = true;
}
for (var i = 0; i < this.configuration.length; i++)
@ -400,7 +415,7 @@
{
this.showPalettes(this.configuration[i].prefix || '',
this.configuration[i].libs || [this.configuration[i].id],
mxUtils.indexOf(tmp, this.configuration[i].id) >= 0);
visible[this.configuration[i].id] == true);
}
}
@ -423,17 +438,11 @@
libs.push(entry.id + '.' + k);
}
this.showPalettes('', libs, mxUtils.indexOf(tmp, entry.id) >= 0);
this.showPalettes('', libs, visible[entry.id]);
}
}
}
}
if (remember)
{
mxSettings.setLibraries(stc);
mxSettings.save();
}
};
/**

View file

@ -911,9 +911,9 @@ SMShopping:"shape=mxgraph.sitemap.shopping;strokeColor=#000000;fillColor=#E6E6E6
SMSettings:"shape=mxgraph.sitemap.settings;strokeColor=#000000;fillColor=#E6E6E6",SMSitemap:"shape=mxgraph.sitemap.sitemap;strokeColor=#000000;fillColor=#E6E6E6",SMSuccess:"shape=mxgraph.sitemap.success;strokeColor=#000000;fillColor=#E6E6E6",SMVideo:"shape=mxgraph.sitemap.video;strokeColor=#000000;fillColor=#E6E6E6",SMAudio:"shape=mxgraph.sitemap.audio;strokeColor=#000000;fillColor=#E6E6E6",SMBlog:"shape=mxgraph.sitemap.blog;strokeColor=#000000;fillColor=#E6E6E6",SMCalendar:"shape=mxgraph.sitemap.calendar;strokeColor=#000000;fillColor=#E6E6E6",
SMChart:"shape=mxgraph.sitemap.chart;strokeColor=#000000;fillColor=#E6E6E6",SMCloud:"shape=mxgraph.sitemap.cloud;strokeColor=#000000;fillColor=#E6E6E6",SMDocument:"shape=mxgraph.sitemap.document;strokeColor=#000000;fillColor=#E6E6E6",SMDownload:"shape=mxgraph.sitemap.download;strokeColor=#000000;fillColor=#E6E6E6",SMError:"shape=mxgraph.sitemap.error;strokeColor=#000000;fillColor=#E6E6E6",SMForm:"shape=mxgraph.sitemap.form;strokeColor=#000000;fillColor=#E6E6E6",SMGame:"shape=mxgraph.sitemap.game;strokeColor=#000000;fillColor=#E6E6E6",
SMJobs:"shape=mxgraph.sitemap.jobs;strokeColor=#000000;fillColor=#E6E6E6",SMLucid:"shape=mxgraph.sitemap.home;strokeColor=#000000;fillColor=#E6E6E6",SMNewspress:"shape=mxgraph.sitemap.news;strokeColor=#000000;fillColor=#E6E6E6",SMPhoto:"shape=mxgraph.sitemap.photo;strokeColor=#000000;fillColor=#E6E6E6",SMPortfolio:"shape=mxgraph.sitemap.portfolio;strokeColor=#000000;fillColor=#E6E6E6",SMPricing:"shape=mxgraph.sitemap.pricing;strokeColor=#000000;fillColor=#E6E6E6",SMProfile:"shape=mxgraph.sitemap.profile;strokeColor=#000000;fillColor=#E6E6E6",
SMSlideshow:"shape=mxgraph.sitemap.slideshow;strokeColor=#000000;fillColor=#E6E6E6",SMUpload:"shape=mxgraph.sitemap.upload;strokeColor=#000000;fillColor=#E6E6E6",SVGPathBlock2:"mxCompositeShape",PresentationFrameBlock:"mxCompositeShape",MinimalTextBlock:"strokeColor=none",FreehandBlock:"mxCompositeShape"},md=RegExp("{{(date{.*}|[^%^{^}]+)}}","g");Qb.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};Qb.prototype.getX=function(a){return Math.round(100*this.nurbsValues[4*(a+1)])/100};
Qb.prototype.getY=function(a){return Math.round(100*this.nurbsValues[4*(a+1)+1])/100};LucidImporter.importState=function(a,b){function d(a){if(a.Properties)for(var b in a.Properties)"Stencil-"==b.substr(0,8)&&Kd(b.substr(8),a.Properties[b]);for(var d in a.Pages)n.push(a.Pages[d]);n.sort(function(a,b){return a.Properties.Order<b.Properties.Order?-1:a.Properties.Order>b.Properties.Order?1:0})}LucidImporter.stencilsMap={};LucidImporter.imgSrcRepl=b;var k=['<?xml version="1.0" encoding="UTF-8"?>',"<mxfile>"],
n=[];null!=a.state&&"1"==urlParams.dev&&null!=window.console&&console.log(JSON.stringify(JSON.parse(a.state),null,2));null!=a.state?d(JSON.parse(a.state)):null==a.Page&&null!=a.Pages?d(a):n.push(a);for(var c=qa(),f=new mxCodec,w=0;w<n.length;w++){k.push("<diagram");null!=n[w].Properties&&null!=n[w].Properties.Title&&k.push(' name="'+mxUtils.htmlEntities(n[w].Properties.Title)+'"');k.push(' id="'+w+'"');Gb(c,n[w],!0);var e=f.encode(c.getModel());c.getModel().clear();k.push(">"+Graph.compress(mxUtils.getXml(e))+
SMSlideshow:"shape=mxgraph.sitemap.slideshow;strokeColor=#000000;fillColor=#E6E6E6",SMUpload:"shape=mxgraph.sitemap.upload;strokeColor=#000000;fillColor=#E6E6E6",SVGPathBlock2:"mxCompositeShape",PresentationFrameBlock:"mxCompositeShape",MinimalTextBlock:"strokeColor=none;fillColor=none",FreehandBlock:"mxCompositeShape"},md=RegExp("{{(date{.*}|[^%^{^}]+)}}","g");Qb.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};Qb.prototype.getX=function(a){return Math.round(100*this.nurbsValues[4*
(a+1)])/100};Qb.prototype.getY=function(a){return Math.round(100*this.nurbsValues[4*(a+1)+1])/100};LucidImporter.importState=function(a,b){function d(a){if(a.Properties)for(var b in a.Properties)"Stencil-"==b.substr(0,8)&&Kd(b.substr(8),a.Properties[b]);for(var d in a.Pages)n.push(a.Pages[d]);n.sort(function(a,b){return a.Properties.Order<b.Properties.Order?-1:a.Properties.Order>b.Properties.Order?1:0})}LucidImporter.stencilsMap={};LucidImporter.imgSrcRepl=b;var k=['<?xml version="1.0" encoding="UTF-8"?>',
"<mxfile>"],n=[];null!=a.state&&"1"==urlParams.dev&&null!=window.console&&console.log(JSON.stringify(JSON.parse(a.state),null,2));null!=a.state?d(JSON.parse(a.state)):null==a.Page&&null!=a.Pages?d(a):n.push(a);for(var c=qa(),f=new mxCodec,w=0;w<n.length;w++){k.push("<diagram");null!=n[w].Properties&&null!=n[w].Properties.Title&&k.push(' name="'+mxUtils.htmlEntities(n[w].Properties.Title)+'"');k.push(' id="'+w+'"');Gb(c,n[w],!0);var e=f.encode(c.getModel());c.getModel().clear();k.push(">"+Graph.compress(mxUtils.getXml(e))+
"</diagram>")}k.push("</mxfile>");LucidImporter.imgSrcRepl=null;return k.join("")}})();function VsdxExport(f){function g(a,b){var d={"[Content_Types].xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='png' ContentType='image/png'/><Default Extension='jpg' ContentType='image/jpeg'/><Default Extension='jpeg' ContentType='image/jpeg'/><Default Extension='svg' ContentType='image/svg+xml'/><Default Extension='bmp' ContentType='image/bmp'/><Default Extension='gif' ContentType='image/gif'/><Default Extension='emf' ContentType='image/x-emf' /><Default Extension='rels' ContentType='application/vnd.openxmlformats-package.relationships+xml' /><Default Extension='xml' ContentType='application/xml' /><Override PartName='/docProps/app.xml' ContentType='application/vnd.openxmlformats-officedocument.extended-properties+xml' /><Override PartName='/docProps/core.xml' ContentType='application/vnd.openxmlformats-package.core-properties+xml' /><Override PartName='/docProps/custom.xml' ContentType='application/vnd.openxmlformats-officedocument.custom-properties+xml' /><Override PartName='/visio/document.xml' ContentType='application/vnd.ms-visio.drawing.main+xml' /><Override PartName='/visio/masters/masters.xml' ContentType='application/vnd.ms-visio.masters+xml' /><Override PartName='/visio/masters/master1.xml' ContentType='application/vnd.ms-visio.master+xml'/><Override PartName='/visio/pages/page1.xml' ContentType='application/vnd.ms-visio.page+xml' /><Override PartName='/visio/pages/pages.xml' ContentType='application/vnd.ms-visio.pages+xml' /><Override PartName='/visio/windows.xml' ContentType='application/vnd.ms-visio.windows+xml' /></Types>",
"_rels/.rels":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships'><Relationship Id='rId1' Type='http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties' Target='docProps/core.xml' /><Relationship Id='rId2' Type='http://schemas.microsoft.com/visio/2010/relationships/document' Target='visio/document.xml' /><Relationship Id='rId3' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties' Target='docProps/custom.xml' /><Relationship Id='rId4' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties' Target='docProps/app.xml' /></Relationships>",
"docProps/app.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns=\'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties\' xmlns:vt=\'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\'><Application>Microsoft Visio</Application><AppVersion>15.0000</AppVersion><Template /><Manager /><Company /><HyperlinkBase /></Properties>',"docProps/core.xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><cp:coreProperties xmlns:cp='http://schemas.openxmlformats.org/package/2006/metadata/core-properties' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:dcterms='http://purl.org/dc/terms/' xmlns:dcmitype='http://purl.org/dc/dcmitype/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><dc:title /><dc:subject /><dc:creator /><cp:keywords /><dc:description /><cp:category /><dc:language>en-US</dc:language></cp:coreProperties>",

View file

@ -2778,7 +2778,7 @@ Graph.prototype.createLayersDialog = function()
/**
* Private helper method.
*/
Graph.prototype.replacePlaceholders = function(cell, str)
Graph.prototype.replacePlaceholders = function(cell, str, vars)
{
var result = [];
@ -2827,6 +2827,11 @@ Graph.prototype.replacePlaceholders = function(cell, str)
{
tmp = this.getGlobalVariable(name);
}
if (tmp == null && vars != null)
{
tmp = vars[name];
}
}
result.push(str.substring(last, match.index) + ((tmp != null) ? tmp : val));

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -6,11 +6,11 @@ if (workbox)
workbox.precaching.precacheAndRoute([
{
"url": "js/app.min.js",
"revision": "d38d8c6197bf84fc384e3d8fab9927db"
"revision": "ed5326d7c9733e1c1530bf7a685239c9"
},
{
"url": "js/extensions.min.js",
"revision": "b87d013e7a5e514e686d9999aaea23fa"
"revision": "dec4ff0126fb9fcca53cddac9b70c1df"
},
{
"url": "js/shapes.min.js",
@ -22,7 +22,7 @@ if (workbox)
},
{
"url": "index.html",
"revision": "9583ae237911326eaba0006e795c4b0b"
"revision": "11792102adc802b2687afc6d78554df6"
},
{
"url": "open.html",