diff --git a/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json b/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json index 1c50476a7..e618c18a0 100644 --- a/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json +++ b/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json @@ -424,6 +424,8 @@ "updated": "updated", "install": "install", "installed": "installed", + "conflict": "conflict", + "conflictTip": "
This module cannot be installed as it includes a
node type that has already been installed
Conflicts with __module__
セーフモードでフローを停止しました
フローを変更し、再起動するために変更をデプロイできます
", @@ -160,8 +161,10 @@ "subflow_plural": "__count__ 個のサブフロー", "selectNodes": "上のテキストを選択し、クリップボードへコピーしてください", "pasteNodes": "JSON形式のフローデータを貼り付けてください", + "selectFile": "読み込むファイルを選択してください", "importNodes": "フローをクリップボートから読み込み", "exportNodes": "フローをクリップボードへ書き出し", + "download": "ダウンロード", "importUnrecognised": "認識できない型が読み込まれました:", "importUnrecognised_plural": "認識できない型が読み込まれました:", "nodesExported": "クリップボードへフローを書き出しました", @@ -510,7 +513,8 @@ "empty": "データが存在しません", "node": "Node", "flow": "Flow", - "global": "Global" + "global": "Global", + "deleteConfirm": "データを削除しても良いですか?" }, "palette": { "name": "パレットの管理", diff --git a/packages/node_modules/@node-red/editor-client/src/js/nodes.js b/packages/node_modules/@node-red/editor-client/src/js/nodes.js index c4b8e2b34..c24d95bc0 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/nodes.js +++ b/packages/node_modules/@node-red/editor-client/src/js/nodes.js @@ -955,11 +955,11 @@ RED.nodes = (function() { def = registry.getNodeType(n.type); if (!def || def.category != "config") { var node = { - x:n.x, - y:n.y, + x:parseFloat(n.x || 0), + y:parseFloat(n.y || 0), z:n.z, type:0, - wires:n.wires, + wires:n.wires||[], inputLabels: n.inputLabels, outputLabels: n.outputLabels, icon: n.icon, diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js index 9dfc1282c..626abcf76 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js @@ -1612,6 +1612,7 @@ RED.editor = (function() { $("#node-config-dialog-user-count").find("span").text(RED._("editor.nodesUse", {count:editing_config_node.users.length})).parent().show(); } trayBody.i18n(); + trayFooter.i18n(); finishedBuilding = true; done(); }); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js b/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js index 12febdcf2..c8f4e3d7d 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js @@ -321,7 +321,7 @@ RED.palette.editor = (function() { var catalogueLoadStart; var catalogueLoadErrors = false; - var activeSort = sortModulesAZ; + var activeSort = sortModulesRelevance; function handleCatalogResponse(err,catalog,index,v) { catalogueLoadStatus.push(err||v); @@ -333,6 +333,9 @@ RED.palette.editor = (function() { if (m.keywords) { m.index = m.index.concat(m.keywords); } + if (m.types) { + m.index = m.index.concat(m.types); + } if (m.updated_at) { m.timestamp = new Date(m.updated_at).getTime(); } else { @@ -413,6 +416,17 @@ RED.palette.editor = (function() { packageList.editableList('addItem',{start:10,more:filteredList.length-10}) } } + function sortModulesRelevance(A,B) { + var currentFilter = searchInput.searchBox('value').trim(); + if (currentFilter === "") { + return sortModulesAZ(A,B); + } + var i = A.info.index.indexOf(currentFilter) - B.info.index.indexOf(currentFilter); + if (i === 0) { + return sortModulesAZ(A,B); + } + return i; + } function sortModulesAZ(A,B) { return A.info.id.localeCompare(B.info.id); } @@ -747,32 +761,29 @@ RED.palette.editor = (function() { $('').text(RED._("palette.editor.sort")+' ').appendTo(toolBar); var sortGroup = $('').appendTo(toolBar); - var sortAZ = $('').appendTo(sortGroup); - var sortRecent = $('').appendTo(sortGroup); + var sortRelevance = $('').appendTo(sortGroup); + var sortAZ = $('').appendTo(sortGroup); + var sortRecent = $('').appendTo(sortGroup); - sortAZ.click(function(e) { - e.preventDefault(); - if ($(this).hasClass("selected")) { - return; - } - $(this).addClass("selected"); - sortRecent.removeClass("selected"); - activeSort = sortModulesAZ; - refreshFilteredItems(); + + var sortOpts = [ + {button: sortRelevance, func: sortModulesRelevance}, + {button: sortAZ, func: sortModulesAZ}, + {button: sortRecent, func: sortModulesRecent} + ] + sortOpts.forEach(function(opt) { + opt.button.click(function(e) { + e.preventDefault(); + if ($(this).hasClass("selected")) { + return; + } + $(".palette-editor-install-sort-option").removeClass("selected"); + $(this).addClass("selected"); + activeSort = opt.func; + refreshFilteredItems(); + }); }); - sortRecent.click(function(e) { - e.preventDefault(); - if ($(this).hasClass("selected")) { - return; - } - $(this).addClass("selected"); - sortAZ.removeClass("selected"); - activeSort = sortModulesRecent; - refreshFilteredItems(); - }); - - var refreshSpan = $('').appendTo(toolBar); var refreshButton = $('').appendTo(refreshSpan); refreshButton.click(function(e) { @@ -814,10 +825,23 @@ RED.palette.editor = (function() { $('').attr('href',entry.url).appendTo(titleRow); var descRow = $('').appendTo(headerRow); $('