Browse Source

18.0.2 release

David Benson 3 years ago
parent
commit
96f0e69647

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+07-MAY-2022: 18.0.2
+
+- Handles Element fields in object cloning [DND-477]
+- Fixes lost changes for preview while editing
+- Forbids use of form tags in labels
+- Fixes CSS issues in print dialog for lightbox
+
 05-MAY-2022: 18.0.1
 
 - Adds support for windows line break in CSV files

+ 1 - 1
VERSION

@@ -1 +1 @@
-18.0.1
+18.0.2

+ 8 - 0
src/main/webapp/electron.js

@@ -1853,6 +1853,11 @@ function unwatchFile(path)
 	fs.unwatchFile(path);
 }
 
+function getCurDir()
+{
+	return __dirname;
+}
+
 ipcMain.on("rendererReq", async (event, args) => 
 {
 	try
@@ -1924,6 +1929,9 @@ ipcMain.on("rendererReq", async (event, args) =>
 		case 'unwatchFile':	
 			ret = await unwatchFile(args.path);
 			break;
+		case 'getCurDir':
+			ret = await getCurDir();
+			break;
 		};
 
 		event.reply('mainResp', {success: true, data: ret, reqId: args.reqId});

File diff suppressed because it is too large
+ 80 - 80
src/main/webapp/js/app.min.js


+ 6 - 0
src/main/webapp/js/diagramly/DrawioFile.js

@@ -944,6 +944,12 @@ DrawioFile.prototype.createData = function()
  */
 DrawioFile.prototype.updateFileData = function()
 {
+	// Sends pending local changes and updates own pages
+	if (this.sync != null)
+	{
+		this.sync.sendLocalChanges();
+	}
+
 	this.setData(this.createData());
 	
 	if (this.sync != null)

+ 1 - 1
src/main/webapp/js/diagramly/Editor.js

@@ -8105,7 +8105,7 @@
 		adjustRadio.setAttribute('checked', 'checked');
 		
 		var spanFitRadio = document.createElement('div');
-		spanFitRadio.style.cssText = 'display:inline-block;height:100%;vertical-align:top;padding-top:2px;';
+		spanFitRadio.style.cssText = 'display:inline-block;vertical-align:top;padding-top:2px;';
 		spanFitRadio.appendChild(fitRadio);
 		fitSection.appendChild(spanFitRadio);
 		

+ 47 - 32
src/main/webapp/js/diagramly/ElectronApp.js

@@ -105,43 +105,58 @@ mxStencilRegistry.allowEval = false;
 
 		if (plugins != null && plugins.length > 0)
 		{
-			for (var i = 0; i < plugins.length; i++)
+			// Workaround for body not defined if plugins are used in dev mode
+			if (urlParams['dev'] == '1')
 			{
-				try
+				EditorUi.debug('App.main', 'Skipped plugins', plugins);
+			}
+			else
+			{
+				for (var i = 0; i < plugins.length; i++)
 				{
-					if (plugins[i].startsWith('/plugins/'))
+					try
 					{
-						plugins[i] = '.' + plugins[i];
-					}
-					else if (plugins[i].startsWith('plugins/'))
-					{
-						plugins[i] = './' + plugins[i];
+						if (plugins[i].startsWith('/plugins/'))
+						{
+							plugins[i] = '.' + plugins[i];
+						}
+						else if (plugins[i].startsWith('plugins/'))
+						{
+							plugins[i] = './' + plugins[i];
+						}
+						//Support old plugins added using file:// workaround
+						else if (!plugins[i].startsWith('file://'))
+						{
+							let appFolder = await requestSync('getAppDataFolder');
+							
+							let pluginsFile = await requestSync({
+								action: 'checkFileExists',
+								pathParts: [appFolder, '/plugins', plugins[i]]
+							});
+							
+							if (pluginsFile.exists)
+							{
+								plugins[i] = 'file://' + pluginsFile.path;
+							}
+							else
+							{
+								continue; //skip not found files
+							}
+						}
+
+						try
+						{
+							mxscript(plugins[i]);
+						}
+						catch (e)
+						{
+							// ignore
+						}
 					}
-					//Support old plugins added using file:// workaround
-					else if (!plugins[i].startsWith('file://'))
+					catch (e)
 					{
-						let appFolder = await requestSync('getAppDataFolder');
-						
-			        	let pluginsFile = await requestSync({
-							action: 'checkFileExists',
-							pathParts: [appFolder, '/plugins', plugins[i]]
-						});
-			        	
-			        	if (pluginsFile.exists)
-			        	{
-			        		plugins[i] = 'file://' + pluginsFile.path;
-			        	}
-			        	else
-		        		{
-			        		continue; //skip not found files
-		        		}
+						// ignore
 					}
-						
-					mxscript(plugins[i]);
-				}
-				catch (e)
-				{
-					// ignore
 				}
 			}
 		}
@@ -159,7 +174,7 @@ mxStencilRegistry.allowEval = false;
 			break;
 		}
 
-		mxmeta(null, 'default-src \'self\'; connect-src \'self\' https://*.draw.io https://fonts.googleapis.com https://fonts.gstatic.com; img-src * data:; media-src *; font-src *; style-src \'self\' \'unsafe-inline\' https://fonts.googleapis.com', 'Content-Security-Policy');
+		mxmeta(null, 'default-src \'self\'; connect-src \'self\' https://fonts.googleapis.com https://fonts.gstatic.com; img-src * data:; media-src *; font-src *; style-src \'self\' \'unsafe-inline\' https://fonts.googleapis.com', 'Content-Security-Policy');
 
 		//Disable web plugins loading
 		urlParams['plugins'] = '0';

+ 1 - 1
src/main/webapp/js/diagramly/GraphViewer.js

@@ -2235,7 +2235,7 @@ GraphViewer.initCss = function()
 			'height:1px;}',
 			'table.mxPopupMenu tr {	font-size:4pt;}',
 			// Modified to only apply to the print dialog
-			'.geDialog { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;',
+			'.geDialog, .geDialog table { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;',
 			'font-size:10pt;',
 			'border:none;',
 			'margin:0px;}',

File diff suppressed because it is too large
+ 80 - 80
src/main/webapp/js/integrate.min.js


+ 1 - 1
src/main/webapp/js/jscolor/jscolor.js

@@ -834,7 +834,7 @@ var mxJSColor = {
 		function dispatchImmediateChange() {
 			if (THIS.onImmediateChange) {
 				if (typeof THIS.onImmediateChange === 'string') {
-					eval(THIS.onImmediateChange);
+					// eval(THIS.onImmediateChange); // Blocked by CSP
 				} else {
 					THIS.onImmediateChange(THIS);
 				}

File diff suppressed because it is too large
+ 81 - 81
src/main/webapp/js/viewer-static.min.js


File diff suppressed because it is too large
+ 81 - 81
src/main/webapp/js/viewer.min.js


File diff suppressed because it is too large
+ 66 - 66
src/main/webapp/mxgraph/mxClient.js


File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/service-worker.js


File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/service-worker.js.map