浏览代码

17.4.0 release

David Benson 3 年之前
父节点
当前提交
4748b7195b

+ 9 - 1
ChangeLog

@@ -1,3 +1,11 @@
+31-MAR-2022: 17.4.0
+
+- Disables text selection in OneDrive inline picker
+- [jira cloud] Fixes re-indexing of old diagrams
+- Fixes NPE for OneDrive file in LinkDialog https://github.com/jgraph/drawio/issues/2721
+- Fixes modal sync status in embed with sketch theme
+- GAE API SDK update to 1.9.95
+
 30-MAR-2022: 17.3.0
 
 - [conf cloud] Enables RT on all domains
@@ -27,7 +35,7 @@
 
 24-MAR-2022: 17.2.2
 
-- Adds Shift+Alt for floating connections https://github.com/jgraph/drawio/issues/DID-4550
+- Adds Shift+Alt for floating connections [DID-4550]
 
 23-MAR-2022: 17.2.1
 

+ 1 - 1
VERSION

@@ -1 +1 @@
-17.3.0
+17.4.0

文件差异内容过多而无法显示
+ 482 - 482
src/main/webapp/js/app.min.js


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

@@ -114,7 +114,7 @@ if (!mxIsElectron && location.protocol !== 'http:')
 					'worker-src https://ac.draw.io/service-worker.js;';
 			console.log('ac.draw.io:', ac_draw_io);
 
-			var aj_draw_io = csp.replace(/%script-src%/g, 'https://connect-cdn.atl-paas.net').
+			var aj_draw_io = csp.replace(/%script-src%/g, 'https://aui-cdn.atlassian.com https://cdnjs.cloudflare.com https://connect-cdn.atl-paas.net').
 					replace(/%frame-src%/g, 'blob:').
 					replace(/%style-src%/g, 'https://aui-cdn.atlassian.com https://*.atlassian.net').
 					replace(/%connect-src%/g, 'https://api.atlassian.com https://api.media.atlassian.com').

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

@@ -5484,7 +5484,7 @@ var LinkDialog = function(editorUi, initialValue, btnLabel, fn, showPages, showN
 			{
 				linkInput.value = files.value[0].webUrl;
 				linkInput.focus();
-			});
+			}, true);
 		});
 	}
 	

+ 32 - 32
src/main/webapp/js/diagramly/EditorUi.js

@@ -5768,46 +5768,45 @@
 		var tags = this.addCheckbox(div, mxResources.get('tags'), true);
 		var lightbox = this.addCheckbox(div, mxResources.get('lightbox'), true);
 
-		// Writes to dummy div if disabled
-		var c = (EditorUi.enableHtmlEditOption) ? div : div.cloneNode();
-		var editSection = this.addEditButton(c, lightbox);
-		var edit = editSection.getEditInput();
-		edit.style.marginBottom = '16px';
-		var h = 430;
+		var editSection = null;
+		var h = 380;
 
-		if (!EditorUi.enableHtmlEditOption)
-		{
-			h -= 50;
-		}
-		
-		mxEvent.addListener(lightbox, 'change', function()
+		if (EditorUi.enableHtmlEditOption)
 		{
-			if (lightbox.checked)
-			{
-				edit.removeAttribute('disabled');
-			}
-			else
-			{
-				edit.setAttribute('disabled', 'disabled');
-			}
-			
-			if (edit.checked && lightbox.checked)
-			{
-				editSection.getEditSelect().removeAttribute('disabled');
-			}
-			else
+			editSection = this.addEditButton(div, lightbox);
+			var edit = editSection.getEditInput();
+			edit.style.marginBottom = '16px';
+			h += 50;
+
+			mxEvent.addListener(lightbox, 'change', function()
 			{
-				editSection.getEditSelect().setAttribute('disabled', 'disabled');
-			}
-		});
-		
+				if (lightbox.checked)
+				{
+					edit.removeAttribute('disabled');
+				}
+				else
+				{
+					edit.setAttribute('disabled', 'disabled');
+				}
+				
+				if (edit.checked && lightbox.checked)
+				{
+					editSection.getEditSelect().removeAttribute('disabled');
+				}
+				else
+				{
+					editSection.getEditSelect().setAttribute('disabled', 'disabled');
+				}
+			});
+		}
+
 		var dlg = new CustomDialog(this, div, mxUtils.bind(this, function()
 		{
 			fn((publicUrlRadio.checked) ? publicUrl : null, zoom.checked, zoomInput.value, linkSection.getTarget(),
 				linkSection.getColor(), fit.checked, allPages.checked, layers.checked, tags.checked,
-				lightbox.checked, (EditorUi.enableHtmlEditOption) ? editSection.getLink() : null);
+				lightbox.checked, (editSection != null) ? editSection.getLink() : null);
 		}), null, btnLabel, helpLink);
-		this.showDialog(dlg.container, 340, 430, true, true);
+		this.showDialog(dlg.container, 340, h, true, true);
 		copyRadio.focus();
 	};
 	
@@ -12812,6 +12811,7 @@
 						if (data.title != null && this.buttonContainer != null)
 						{
 							var tmp = document.createElement('span');
+							tmp.style.marginLeft = '4px';
 							mxUtils.write(tmp, data.title);
 							
 							if (this.embedFilenameSpan != null)

+ 10 - 17
src/main/webapp/js/diagramly/Minimal.js

@@ -2310,16 +2310,16 @@ EditorUi.initMinimalTheme = function()
 				}
 			});
 					
-			// Connects the status bar to the editor status and
-			// moves status to bell icon tooltip for trivial messages
-			if (urlParams['embed'] != '1')
+			// Connects the status bar to the editor status and moves
+			// status to bell icon title for frequent common messages
+			menubar.style.visibility = (menubar.clientWidth < 14) ? 'hidden' : '';
+
+			ui.editor.addListener('statusChanged', mxUtils.bind(this, function()
 			{
-				menubar.style.visibility = (menubar.clientWidth < 14) ? 'hidden' : '';
+				ui.setStatusText(ui.editor.getStatus());
 
-				ui.editor.addListener('statusChanged', mxUtils.bind(this, function()
+				if (urlParams['embed'] != '1')
 				{
-					ui.setStatusText(ui.editor.getStatus());
-		
 					if (ui.statusContainer.children.length == 0 ||
 						(ui.statusContainer.children.length == 1 &&
 						typeof ui.statusContainer.firstChild.getAttribute === 'function' &&
@@ -2353,17 +2353,10 @@ EditorUi.initMinimalTheme = function()
 						
 						statusVisible = true;
 					}
+				}
 
-					menubar.style.visibility = (menubar.clientWidth > 12) ? '' : 'hidden';
-				}));
-			}
-			else
-			{
-				ui.editor.addListener('statusChanged', mxUtils.bind(this, function()
-				{
-					menubar.style.visibility = (menubar.clientWidth > 16) ? '' : 'hidden';
-				}));
-			}
+				menubar.style.visibility = (menubar.clientWidth > 12) ? '' : 'hidden';
+			}));
 			
 			elt = addMenu('diagram', null, Editor.menuImage);
 			elt.style.boxShadow = 'none';

+ 17 - 11
src/main/webapp/js/diagramly/OneDriveClient.js

@@ -397,7 +397,6 @@ OneDriveClient.prototype.authenticateStep2 = function(state, success, error, fai
 	}
 };
 
-
 OneDriveClient.prototype.getAccountTypeAndEndpoint = function(success, error)
 {
 	this.get(this.baseUrl + '/me/drive/root', mxUtils.bind(this, function(req)
@@ -1290,7 +1289,7 @@ OneDriveClient.prototype.pickLibrary = function(fn)
 	});
 };
 
-OneDriveClient.prototype.createInlinePicker = function(fn, foldersOnly)
+OneDriveClient.prototype.createInlinePicker = function(fn, foldersOnly, acceptAllFiles)
 {
 	return mxUtils.bind(this, function()
 	{
@@ -1306,16 +1305,23 @@ OneDriveClient.prototype.createInlinePicker = function(fn, foldersOnly)
 			{
 				if (foldersOnly && typeof item.folder == 'object')
 				{
-					fn({
-						value: [item]
-					});
-					return;
+					fn({value: [item]});
 				}
 				else if (!item.folder)
 				{
-					fn(OneDriveFile.prototype.getIdOf(item));
-					return;
+					var id = OneDriveFile.prototype.getIdOf(item);
+
+					this.executeRequest(this.getItemURL(id), mxUtils.bind(this, function(req)
+					{
+						if (req.getStatus() >= 200 && req.getStatus() <= 299)
+						{
+							var meta = JSON.parse(req.getText());
+							fn(id, {value: [meta]});
+						}
+					}), null);
 				}
+
+				return;
 			}
 			
 			return mxResources.get('invalidSel', null, 'Invalid selection');
@@ -1354,7 +1360,7 @@ OneDriveClient.prototype.createInlinePicker = function(fn, foldersOnly)
 		mxUtils.bind(this, function(err)
 		{
 			this.ui.showError(mxResources.get('error'), err);
-		}), foldersOnly); 
+		}), foldersOnly, null, null, null, null, acceptAllFiles); 
 	});
 };
 
@@ -1439,7 +1445,7 @@ OneDriveClient.prototype.pickFolder = function(fn, direct)
 /**
  * Checks if the client is authorized and calls the next step.
  */
-OneDriveClient.prototype.pickFile = function(fn)
+OneDriveClient.prototype.pickFile = function(fn, acceptAllFiles)
 {
 	fn = (fn != null) ? fn : mxUtils.bind(this, function(id)
 	{
@@ -1451,7 +1457,7 @@ OneDriveClient.prototype.pickFile = function(fn)
 		this.ui.showError(mxResources.get('error'), e && e.message? e.message : e);
 	});
 	
-	var odOpenDlg = this.inlinePicker? this.createInlinePicker(fn) :
+	var odOpenDlg = this.inlinePicker? this.createInlinePicker(fn, null, acceptAllFiles) :
 							mxUtils.bind(this, function()
 	{
 		OneDrive.open(

文件差异内容过多而无法显示
+ 80 - 80
src/main/webapp/js/integrate.min.js


+ 7 - 2
src/main/webapp/js/onedrive/mxODPicker.js

@@ -1,4 +1,5 @@
-function mxODPicker(container, previewFn, getODFilesList, getODFileInfo, getRecentList, addToRecent, pickedFileCallback, errorFn, foldersOnly, backFn, withSubmitBtn, withThumbnail, initFolderPath)
+function mxODPicker(container, previewFn, getODFilesList, getODFileInfo, getRecentList, addToRecent, pickedFileCallback,
+	errorFn, foldersOnly, backFn, withSubmitBtn, withThumbnail, initFolderPath, acceptAllFiles)
 {
 	var previewHtml = '';
 	
@@ -76,6 +77,7 @@ function mxODPicker(container, previewFn, getODFilesList, getODFileInfo, getRece
 	var isDarkMode = window.Editor != null && Editor.isDarkMode != null && Editor.isDarkMode();
 	
 	var css = 
+		'.odCatsList *, .odFilesSec * { user-select: none; }' +
 		'.odCatsList {' +
 		'	box-sizing: border-box;' + 
 		'	position:absolute;' + 
@@ -598,7 +600,10 @@ function mxODPicker(container, previewFn, getODFilesList, getODFileInfo, getRece
 							selectedFile = item2;
 							selectedDriveId = driveId;
 							
-							previewFn(selectedFile);
+							if (!acceptAllFiles)
+							{
+								previewFn(selectedFile);
+							}
 						}
 					});
 				})(item, row);

文件差异内容过多而无法显示
+ 626 - 626
src/main/webapp/js/viewer-static.min.js


文件差异内容过多而无法显示
+ 626 - 626
src/main/webapp/js/viewer.min.js


文件差异内容过多而无法显示
+ 1 - 1
src/main/webapp/mxgraph/mxClient.js


+ 1 - 1
src/main/webapp/plugins/cConf-1-4-8.js

@@ -1357,7 +1357,7 @@ Draw.loadPlugin(function(ui)
 
 	EmbedFile.prototype.isRealtimeSupported = function()
 	{
-		return true;
+		return urlParams['lockdown'] != '1';
 	};
 	
 	/**

文件差异内容过多而无法显示
+ 1 - 1
src/main/webapp/service-worker.js


文件差异内容过多而无法显示
+ 1 - 1
src/main/webapp/service-worker.js.map