diff --git a/Gruntfile.js b/Gruntfile.js index e11caabbc..6a8a4002f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -181,9 +181,10 @@ module.exports = function(grunt) { vendor: { files: { "packages/node_modules/@node-red/editor-client/public/vendor/vendor.js": [ - "packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-1.11.3.min.js", + "packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-3.3.1.min.js", + "packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-migrate-3.0.1.min.js", "packages/node_modules/@node-red/editor-client/src/vendor/bootstrap/js/bootstrap.min.js", - "packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-ui-1.10.3.custom.min.js", + "packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-ui.min.js", "packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery.ui.touch-punch.min.js", "packages/node_modules/@node-red/editor-client/src/vendor/marked/marked.min.js", "packages/node_modules/@node-red/editor-client/src/vendor/d3/d3.v3.min.js", @@ -354,7 +355,7 @@ module.exports = function(grunt) { 'ace/**', //'bootstrap/css/**', 'bootstrap/img/**', - 'jquery/css/**', + 'jquery/css/base/**', 'font-awesome/**' ], expand: true, diff --git a/packages/node_modules/@node-red/editor-client/src/js/comms.js b/packages/node_modules/@node-red/editor-client/src/js/comms.js index ea128424b..75a018a56 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/comms.js +++ b/packages/node_modules/@node-red/editor-client/src/js/comms.js @@ -143,7 +143,7 @@ RED.comms = (function() { } else { var msg = RED._("notification.errors.lostConnectionReconnect",{time: connectCountdown})+' '+ RED._("notification.errors.lostConnectionTry")+''; errornotification.update(msg,{silent:true}); - $(errornotification).find("a").click(function(e) { + $(errornotification).find("a").on("click", function(e) { e.preventDefault(); errornotification.update(RED._("notification.errors.lostConnection"),{silent:true}); clearInterval(connectCountdownTimer); diff --git a/packages/node_modules/@node-red/editor-client/src/js/settings.js b/packages/node_modules/@node-red/editor-client/src/js/settings.js index faf80c083..1be00f851 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/settings.js +++ b/packages/node_modules/@node-red/editor-client/src/js/settings.js @@ -131,6 +131,12 @@ RED.settings = (function () { RED.settings.remove("auth-tokens"); } console.log("Node-RED: " + data.version); + console.group("Versions"); + console.log("jQuery",$().jquery) + console.log("jQuery UI",$.ui.version); + console.log("ACE",ace.version); + console.log("D3",d3.version); + console.groupEnd(); loadUserSettings(done); }, error: function(jqXHR,textStatus,errorThrown) { diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js b/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js index ac14e2689..07eb2c414 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js @@ -53,7 +53,7 @@ RED.clipboard = (function() { element.setAttribute('download', "flows.json"); element.style.display = 'none'; document.body.appendChild(element); - element.click(); + element.trigger("click"); document.body.removeChild(element); $( this ).dialog( "close" ); } @@ -369,7 +369,7 @@ RED.clipboard = (function() { currentPopoverError = null; } if (tab.id === "clipboard-dialog-import-tab-clipboard") { - $("#clipboard-import").focus(); + $("#clipboard-import").trigger("focus"); } else { libraryBrowser.focus(); } @@ -388,12 +388,12 @@ RED.clipboard = (function() { tabs.activateTab("clipboard-dialog-import-tab-"+mode); if (mode === 'clipboard') { setTimeout(function() { - $("#clipboard-import").focus(); + $("#clipboard-import").trigger("focus"); },100) } - $("#clipboard-dialog-tab-library-name").keyup(validateExportFilename); + $("#clipboard-dialog-tab-library-name").on("keyup", validateExportFilename); $("#clipboard-dialog-tab-library-name").on('paste',function() { setTimeout(validateExportFilename,10)}); $("#clipboard-dialog-export").button("enable"); @@ -416,10 +416,10 @@ RED.clipboard = (function() { $("#clipboard-dialog-export").hide(); $("#clipboard-dialog-download").hide(); $("#clipboard-dialog-ok").button("disable"); - $("#clipboard-import").keyup(validateImport); + $("#clipboard-import").on("keyup", validateImport); $("#clipboard-import").on('paste',function() { setTimeout(validateImport,10)}); - $("#import-tab > a").click(function(evt) { + $("#import-tab > a").on("click", function(evt) { evt.preventDefault(); if ($(this).hasClass('disabled') || $(this).hasClass('selected')) { return; @@ -428,7 +428,7 @@ RED.clipboard = (function() { $(this).addClass('selected'); }); - $("#import-file-upload").change(function() { + $("#import-file-upload").on("change", function() { var fileReader = new FileReader(); fileReader.onload = function () { $("#clipboard-import").val(fileReader.result); @@ -436,9 +436,9 @@ RED.clipboard = (function() { }; fileReader.readAsText($(this).prop('files')[0]); }) - $("#import-file-upload-btn").click(function(evt) { + $("#import-file-upload-btn").on("click", function(evt) { evt.preventDefault(); - $("#import-file-upload").click(); + $("#import-file-upload").trigger("click"); }) dialog.dialog("option","title",RED._("clipboard.importNodes")).dialog("open"); @@ -489,7 +489,7 @@ RED.clipboard = (function() { tabs.activateTab("clipboard-dialog-export-tab-"+mode); - $("#clipboard-dialog-tab-library-name").keyup(validateExportFilename); + $("#clipboard-dialog-tab-library-name").on("keyup", validateExportFilename); $("#clipboard-dialog-tab-library-name").on('paste',function() { setTimeout(validateExportFilename,10)}); $("#clipboard-dialog-export").button("enable"); @@ -509,10 +509,10 @@ RED.clipboard = (function() { dialogContainer.i18n(); var format = RED.settings.flowFilePretty ? "export-format-full" : "export-format-mini"; - $("#export-format-group > a").click(function(evt) { + $("#export-format-group > a").on("click", function(evt) { evt.preventDefault(); if ($(this).hasClass('disabled') || $(this).hasClass('selected')) { - $("#clipboard-export").focus(); + $("#clipboard-export").trigger("focus"); return; } $(this).parent().children().removeClass('selected'); @@ -531,11 +531,11 @@ RED.clipboard = (function() { $("#clipboard-export").val(flow); setTimeout(function() { $("#clipboard-export").scrollTop(0); },50); - $("#clipboard-export").focus(); + $("#clipboard-export").trigger("focus"); } }); - $("#export-range-group > a").click(function(evt) { + $("#export-range-group > a").on("click", function(evt) { evt.preventDefault(); if ($(this).hasClass('disabled') || $(this).hasClass('selected')) { return; @@ -581,7 +581,7 @@ RED.clipboard = (function() { } $("#clipboard-export").val(flow); setTimeout(function() { $("#clipboard-export").scrollTop(0); },50); - $("#clipboard-export").focus(); + $("#clipboard-export").trigger("focus"); }) $("#clipboard-dialog-ok").hide(); @@ -589,24 +589,24 @@ RED.clipboard = (function() { $("#clipboard-dialog-export").hide(); var selection = RED.workspaces.selection(); if (selection.length > 0) { - $("#export-range-selected").click(); + $("#export-range-selected").trigger("click"); } else { selection = RED.view.selection(); if (selection.nodes) { - $("#export-range-selected").click(); + $("#export-range-selected").trigger("click"); } else { $("#export-range-selected").addClass('disabled').removeClass('selected'); - $("#export-range-flow").click(); + $("#export-range-flow").trigger("click"); } } if (format === "export-format-full") { - $("#export-format-full").click(); + $("#export-format-full").trigger("click"); } else { - $("#export-format-mini").click(); + $("#export-format-mini").trigger("click"); } dialog.dialog("option","title",RED._("clipboard.exportNodes")).dialog( "open" ); - $("#clipboard-export").focus(); + $("#clipboard-export").trigger("focus"); $("#clipboard-dialog-cancel").show(); $("#clipboard-dialog-export").show(); $("#clipboard-dialog-download").show(); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/checkboxSet.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/checkboxSet.js index be7d2d4cd..157c1e495 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/checkboxSet.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/checkboxSet.js @@ -38,7 +38,7 @@ this.options[0].show(); } - this.element.change(function() { + this.element.on("change", function() { if (this.checked) { that.options[0].hide(); that.options[1].show(); @@ -53,7 +53,7 @@ child.checkboxSet('state',isChecked,false,true); }) }) - this.uiElement.click(function(e) { + this.uiElement.on("click", function(e) { e.stopPropagation(); // state returns null for a partial state. Clicking on that should // result in false. diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js index ee29a6a35..ddede026b 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js @@ -77,7 +77,7 @@ } $(' '+addLabel+'') .appendTo(this.topContainer) - .click(function(evt) { + .on("click", function(evt) { evt.preventDefault(); that.addItem({}); }); @@ -260,7 +260,7 @@ var deleteButton = $('',{href:"#",class:"red-ui-editableList-item-remove editor-button editor-button-small"}).appendTo(li); $('',{class:"fa fa-remove"}).appendTo(deleteButton); li.addClass("red-ui-editableList-item-removable"); - deleteButton.click(function(evt) { + deleteButton.on("click", function(evt) { evt.preventDefault(); var data = row.data('data'); li.addClass("red-ui-editableList-item-deleting") diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js index adac42463..6e88aeade 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js @@ -92,7 +92,7 @@ RED.menu = (function() { menuItems[opt.id] = opt; if (opt.onselect) { - link.click(function(e) { + link.on("click", function(e) { e.preventDefault(); if ($(this).parent().hasClass("disabled")) { return; @@ -125,7 +125,7 @@ RED.menu = (function() { link.attr("target","_blank").attr("href",opt.href); } else if (!opt.options) { item.addClass("disabled"); - link.click(function(event) { + link.on("click", function(event) { event.preventDefault(); }); } diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/popover.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/popover.js index 50aa5eb83..e3a10664c 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/popover.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/popover.js @@ -162,7 +162,7 @@ RED.popover = (function() { } }); } else if (trigger === 'click') { - target.click(function(e) { + target.on("click", function(e) { e.preventDefault(); e.stopPropagation(); active = !active; diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/searchBox.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/searchBox.js index 1c6aad8d2..8f98862c7 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/searchBox.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/searchBox.js @@ -44,7 +44,7 @@ e.preventDefault(); that.element.val(""); that._change("",true); - that.element.focus(); + that.element.trigger("focus"); }); this.resultCount = $('',{class:"red-ui-searchBox-resultCount hide"}).appendTo(this.uiContainer); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/stack.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/stack.js index d31753a31..0cb410b29 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/stack.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/stack.js @@ -39,8 +39,8 @@ RED.stack = (function() { } } if (options.fill && options.singleExpanded) { - $(window).resize(resizeStack); - $(window).focus(resizeStack); + $(window).on("resize", resizeStack); + $(window).on("focus", resizeStack); } return { add: function(entry) { @@ -57,7 +57,7 @@ RED.stack = (function() { } entry.content = $('
').appendTo(entry.contentWrap); if (entry.collapsible !== false) { - header.click(function() { + header.on("click", function() { if (options.singleExpanded) { if (!entry.isExpanded()) { for (var i=0;i
').appendTo(wrapper); - addButton.find('a').click(function(evt) { + addButton.find('a').on("click", function(evt) { evt.preventDefault(); if (typeof options.addButton === 'function') { options.addButton(); @@ -73,7 +73,7 @@ RED.tabs = (function() { if (options.searchButton) { wrapper.addClass("red-ui-tabs-search"); var searchButton = $('').appendTo(wrapper); - searchButton.find('a').click(function(evt) { + searchButton.find('a').on("click", function(evt) { evt.preventDefault(); if (typeof options.searchButton === 'function') { options.searchButton() @@ -96,7 +96,7 @@ RED.tabs = (function() { if (options.scrollable) { wrapper.addClass("red-ui-tabs-scrollable"); scrollContainer.addClass("red-ui-tabs-scroll-container"); - scrollContainer.scroll(updateScroll); + scrollContainer.on("scroll",updateScroll); scrollLeft = $('
').appendTo(wrapper).find("a"); scrollLeft.on('mousedown',function(evt) { scrollEventHandler(evt,'-=150') }).on('click',function(evt){ evt.preventDefault();}); scrollRight = $('
').appendTo(wrapper).find("a"); @@ -113,7 +113,7 @@ RED.tabs = (function() { if (options.menu !== false) { var selectButton = $('').appendTo(collapsedButtonsRow); selectButton.addClass("red-ui-tab-link-button-menu") - selectButton.click(function(evt) { + selectButton.on("click", function(evt) { evt.stopPropagation(); evt.preventDefault(); if (!collapsibleMenu) { @@ -348,7 +348,7 @@ RED.tabs = (function() { } var tabs = ul.find("li.red-ui-tab"); var width = wrapper.width(); - var tabCount = tabs.size(); + var tabCount = tabs.length; var tabWidth; if (options.collapsible) { @@ -434,7 +434,7 @@ RED.tabs = (function() { var li = ul.find("a[href='#"+id+"']").parent(); if (li.hasClass("active")) { var tab = li.prev(); - if (tab.size() === 0) { + if (tab.length === 0) { tab = li.next(); } activateTab(tab.find("a")); @@ -509,7 +509,7 @@ RED.tabs = (function() { } else { $('',{class:defaultTabIcon}).appendTo(pinnedLink); } - pinnedLink.click(function(evt) { + pinnedLink.on("click", function(evt) { evt.preventDefault(); activateTab(tab.id); }); @@ -543,7 +543,7 @@ RED.tabs = (function() { options.onadd(tab); } link.attr("title",tab.label); - if (ul.find("li.red-ui-tab").size() == 1) { + if (ul.find("li.red-ui-tab").length == 1) { activateTab(link); } if (options.onreorder) { @@ -634,7 +634,7 @@ RED.tabs = (function() { previousTab: activatePreviousTab, resize: updateTabWidths, count: function() { - return ul.find("li.red-ui-tab").size(); + return ul.find("li.red-ui-tab").length; }, contains: function(id) { return ul.find("a[href='#"+id+"']").length > 0; diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js index 0b21ca146..30137b3e7 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js @@ -262,7 +262,7 @@ $('').appendTo(label); // $('').appendTo(label); - label.click(function(e) { + label.on("click", function(e) { if (container.hasClass("expanded")) { if (item.hasOwnProperty('selected') || label.hasClass("selected")) { item.treeList.collapse(); @@ -285,7 +285,7 @@ that._trigger("select",e,item); }) } else { - label.click(function(e) { + label.on("click", function(e) { that._topList.find(".selected").removeClass("selected"); label.addClass("selected"); that._trigger("select",e,item) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js index accfff6dd..2de2c4f47 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js @@ -159,11 +159,11 @@ that.uiSelect.css("margin"+d,m); that.input.css("margin"+d,0); }); - + ["type","placeholder"].forEach(function(d) { var m = that.element.attr(d); that.input.attr(d,m); - }); + }); this.uiSelect.addClass("red-ui-typedInput-container"); @@ -199,7 +199,7 @@ that.element.val(that.value()); that.element.trigger('change',that.propertyType,that.value()); }) - this.selectTrigger.click(function(event) { + this.selectTrigger.on("click", function(event) { event.preventDefault(); that._showTypeMenu(); }); @@ -218,7 +218,7 @@ RED.popover.tooltip(this.optionSelectLabel,function() { return that.optionValue; }); - this.optionSelectTrigger.click(function(event) { + this.optionSelectTrigger.on("click", function(event) { event.preventDefault(); that._showOptionSelectMenu(); }).on('keydown', function(evt) { @@ -241,9 +241,9 @@ _showTypeMenu: function() { if (this.typeList.length > 1) { this._showMenu(this.menu,this.selectTrigger); - this.menu.find("[value='"+this.propertyType+"']").focus(); + this.menu.find("[value='"+this.propertyType+"']").trigger("focus"); } else { - this.input.focus(); + this.input.trigger("focus"); } }, _showOptionSelectMenu: function() { @@ -257,7 +257,7 @@ if (selectedOption.length === 0) { selectedOption = this.optionMenu.children(":first"); } - selectedOption.focus(); + selectedOption.trigger("focus"); } }, @@ -265,11 +265,11 @@ $(document).off("mousedown.close-property-select"); menu.hide(); if (this.elementDiv.is(":visible")) { - this.input.focus(); + this.input.trigger("focus"); } else if (this.optionSelectTrigger.is(":visible")){ - this.optionSelectTrigger.focus(); + this.optionSelectTrigger.trigger("focus"); } else { - this.selectTrigger.focus(); + this.selectTrigger.trigger("focus"); } }, _createMenu: function(opts,callback) { @@ -298,7 +298,7 @@ op.text(opt.value); } - op.click(function(event) { + op.on("click", function(event) { event.preventDefault(); callback(opt.value); that._hideMenu(menu); @@ -312,10 +312,10 @@ menu.on('keydown', function(evt) { if (evt.keyCode === 40) { // DOWN - $(this).children(":focus").next().focus(); + $(this).children(":focus").next().trigger("focus"); } else if (evt.keyCode === 38) { // UP - $(this).children(":focus").prev().focus(); + $(this).children(":focus").prev().trigger("focus"); } else if (evt.keyCode === 27) { that._hideMenu(menu); } diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js b/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js index 96363e21b..5fe8be1e3 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js @@ -93,7 +93,7 @@ RED.deploy = (function() { '').prependTo(".header-toolbar"); } - $('#btn-deploy').click(function(event) { + $('#btn-deploy').on("click", function(event) { event.preventDefault(); save(); }); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js b/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js index bef2ffc69..e73dc7ec1 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js @@ -133,7 +133,7 @@ RED.diff = (function() { $('').appendTo(originalNodeDiv); $('').text(RED._("diff.flowProperties")).appendTo(originalNodeDiv); - row.click(function(evt) { + row.on("click", function(evt) { evt.preventDefault(); $(this).parent().toggleClass('collapsed'); }); @@ -182,7 +182,7 @@ RED.diff = (function() { } }); } - titleRow.click(function(evt) { + titleRow.on("click", function(evt) { // if (titleRow.parent().find(".node-diff-node-entry:not(.hide)").length > 0) { titleRow.parent().toggleClass('collapsed'); if ($(this).parent().hasClass('collapsed')) { @@ -704,7 +704,7 @@ RED.diff = (function() { } // Node row createNodeConflictRadioBoxes(node,div,localNodeDiv,remoteNodeDiv,false,!conflicted,selectState,CurrentDiff); - row.click(function(evt) { + row.on("click", function(evt) { $(this).parent().toggleClass('collapsed'); if($(this).siblings('.node-diff-node-entry-properties').length === 0) { @@ -979,7 +979,7 @@ RED.diff = (function() { } if (localNode && remoteNode && typeof localNode[d] === "string") { if (/\n/.test(localNode[d]) || /\n/.test(remoteNode[d])) { - $('').click(function() { + $('').on("click", function() { showTextDiff(localNode[d],remoteNode[d]); }).appendTo(propertyNameCell); } @@ -1029,10 +1029,10 @@ RED.diff = (function() { refreshConflictHeader(diff); } - var localSelectDiv = $('