mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Compare commits
47 Commits
right-clic
...
CSV-fix-n-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b60fd36c6e | ||
|
|
4467c0df31 | ||
|
|
ab1e38dde8 | ||
|
|
dd0d1e700e | ||
|
|
51ebb2579f | ||
|
|
d1d3b805f6 | ||
|
|
a6e247326b | ||
|
|
823b7e2989 | ||
|
|
5f40dc37a2 | ||
|
|
5e5c05f0c6 | ||
|
|
ab1340d213 | ||
|
|
cc5a0a436c | ||
|
|
125b37e98f | ||
|
|
f8ad75329d | ||
|
|
78327716a4 | ||
|
|
5393fa81b9 | ||
|
|
d2e84925f7 | ||
|
|
2ea10206fa | ||
|
|
1f5588b803 | ||
|
|
202102ebf7 | ||
|
|
71714733ad | ||
|
|
ad0a08ea0e | ||
|
|
5e592427e9 | ||
|
|
643541eebd | ||
|
|
13885493ac | ||
|
|
75c9353cbd | ||
|
|
01d9affe61 | ||
|
|
3ad95bec3c | ||
|
|
418b3ee7d6 | ||
|
|
0000f2a34d | ||
|
|
fc5a5f1b73 | ||
|
|
226ab406b2 | ||
|
|
9eaf5d82b6 | ||
|
|
e3d6d242ac | ||
|
|
53184715bc | ||
|
|
1844633ff1 | ||
|
|
7d7682b34e | ||
|
|
83655a749c | ||
|
|
b9444e8197 | ||
|
|
5ff70b2a36 | ||
|
|
4ed559af95 | ||
|
|
ce529a9b9f | ||
|
|
31e472145c | ||
|
|
1664428429 | ||
|
|
1780cb9b91 | ||
|
|
6c0d6c5425 | ||
|
|
326f346936 |
39
CHANGELOG.md
39
CHANGELOG.md
@@ -1,3 +1,42 @@
|
||||
#### 3.0.0-beta.3: Beta Release
|
||||
|
||||
Editor
|
||||
|
||||
- Add Right-Click content menu (#3678) @knolleary
|
||||
- Fix disable junction (#3671) @HiroyasuNishiyama
|
||||
- Add Japanese translations for v2.2.3 (#3672) @kazuhitoyokoi
|
||||
- Reset mouse state when switching tabs (#3643) @knolleary
|
||||
- Fix uncorrect fix of junction to subflow conversion (#3666) @HiroyasuNishiyama
|
||||
- Fix undoing junction to subflow (#3653) @HiroyasuNishiyama
|
||||
- Fix conversion of junction to subflow (#3652) @HiroyasuNishiyama
|
||||
- Fix to include junction to exported nodes (#3650) @HiroyasuNishiyama
|
||||
- Fix z-index value for shade to cover nodes in palette (#3649) @kazuhitoyokoi
|
||||
- Fix to extend escaped subflow category characters (#3647) @HiroyasuNishiyama
|
||||
- Fix to sanitize tab name (#3646) @HiroyasuNishiyama
|
||||
- Fix selector placement (#3644) @bonanitech
|
||||
- Add Japanese translations for v3.0-beta.2 (#3622) @kazuhitoyokoi
|
||||
- Fix new folder menu of save to library dialog (#3633) @HiroyasuNishiyama
|
||||
- Fix layer of palette node (#3638) @HiroyasuNishiyama
|
||||
- Fix to place a node dragged from palette within the workspace (#3637) @HiroyasuNishiyama
|
||||
- Fix typo in CSS (#3628) @bonanitech
|
||||
- Use the correct variable for the gutter text color (#3615) @bonanitech
|
||||
|
||||
|
||||
Runtime
|
||||
|
||||
- Support loading node modules from `nodesdir` (#3676) @Steve-Mcl
|
||||
- fix buffer parse error message of evaluateNodeProperty (#3624) @HiroyasuNishiyama
|
||||
|
||||
Nodes
|
||||
|
||||
- File: Further simplify file node filename entry UX (v3) (#3677) @Steve-Mcl
|
||||
- Function: Fix initial cursor position of init/finalize tab of function node (#3674) @HiroyasuNishiyama
|
||||
- Function: Fix ESM module loading in Function node (#3645) @knolleary
|
||||
- Inject: Fix JSONata evaluation of inject button (#3632) @HiroyasuNishiyama
|
||||
- TCP: Dont delete TCP socket twice (#3630) @Steve-Mcl
|
||||
- MQTT Node: define noproxy variable (#3626) @Steve-Mcl
|
||||
- Debug: i18n debug sidebar node label (#3623) @HiroyasuNishiyama
|
||||
|
||||
#### 3.0.0-beta.2: Beta Release
|
||||
|
||||
**Migration from 2.x**
|
||||
|
||||
14
package.json
14
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-red",
|
||||
"version": "3.0.0-beta.2",
|
||||
"version": "3.0.0-beta.3",
|
||||
"description": "Low-code programming for event-driven applications",
|
||||
"homepage": "http://nodered.org",
|
||||
"license": "Apache-2.0",
|
||||
@@ -49,7 +49,7 @@
|
||||
"hash-sum": "2.0.0",
|
||||
"hpagent": "1.0.0",
|
||||
"https-proxy-agent": "5.0.1",
|
||||
"i18next": "21.8.2",
|
||||
"i18next": "21.8.10",
|
||||
"iconv-lite": "0.6.3",
|
||||
"is-utf8": "0.2.1",
|
||||
"js-yaml": "4.1.0",
|
||||
@@ -62,7 +62,7 @@
|
||||
"moment": "2.29.3",
|
||||
"moment-timezone": "0.5.34",
|
||||
"mqtt": "4.3.7",
|
||||
"multer": "1.4.4",
|
||||
"multer": "1.4.5-lts.1",
|
||||
"mustache": "4.2.0",
|
||||
"node-red-admin": "^3.0.0",
|
||||
"node-watch": "0.7.3",
|
||||
@@ -76,7 +76,7 @@
|
||||
"semver": "7.3.7",
|
||||
"tar": "6.1.11",
|
||||
"tough-cookie": "4.0.0",
|
||||
"uglify-js": "3.15.5",
|
||||
"uglify-js": "3.16.0",
|
||||
"uuid": "8.3.2",
|
||||
"ws": "7.5.6",
|
||||
"xml2js": "0.4.23"
|
||||
@@ -105,16 +105,16 @@
|
||||
"grunt-sass": "~3.1.0",
|
||||
"grunt-simple-mocha": "~0.4.1",
|
||||
"grunt-simple-nyc": "^3.0.1",
|
||||
"i18next-http-backend": "1.4.0",
|
||||
"i18next-http-backend": "1.4.1",
|
||||
"jquery-i18next": "1.2.1",
|
||||
"jsdoc-nr-template": "github:node-red/jsdoc-nr-template",
|
||||
"marked": "4.0.15",
|
||||
"marked": "4.0.17",
|
||||
"minami": "1.2.3",
|
||||
"mocha": "9.2.2",
|
||||
"node-red-node-test-helper": "^0.2.7",
|
||||
"nodemon": "2.0.16",
|
||||
"proxy": "^1.0.2",
|
||||
"sass": "1.51.0",
|
||||
"sass": "1.52.3",
|
||||
"should": "13.2.3",
|
||||
"sinon": "11.1.2",
|
||||
"stoppable": "^1.1.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@node-red/editor-api",
|
||||
"version": "3.0.0-beta.2",
|
||||
"version": "3.0.0-beta.3",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./lib/index.js",
|
||||
"repository": {
|
||||
@@ -16,8 +16,8 @@
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"@node-red/util": "3.0.0-beta.2",
|
||||
"@node-red/editor-client": "3.0.0-beta.2",
|
||||
"@node-red/util": "3.0.0-beta.3",
|
||||
"@node-red/editor-client": "3.0.0-beta.3",
|
||||
"bcryptjs": "2.4.3",
|
||||
"body-parser": "1.20.0",
|
||||
"clone": "2.1.2",
|
||||
@@ -26,7 +26,7 @@
|
||||
"express": "4.18.1",
|
||||
"memorystore": "1.6.7",
|
||||
"mime": "3.0.0",
|
||||
"multer": "1.4.4",
|
||||
"multer": "1.4.5-lts.1",
|
||||
"mustache": "4.2.0",
|
||||
"oauth2orize": "1.11.1",
|
||||
"passport-http-bearer": "1.0.1",
|
||||
|
||||
@@ -1187,5 +1187,11 @@
|
||||
"missing-config": "__prop__: missing configuration node",
|
||||
"validation-error": "__prop__: validation error: __node__, __id__: __error__"
|
||||
}
|
||||
},
|
||||
"contextMenu": {
|
||||
"insert": "Insert",
|
||||
"node": "Node",
|
||||
"junction": "Junction",
|
||||
"linkNodes": "Link Nodes"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1188,6 +1188,12 @@
|
||||
"validation-error": "__prop__: チェックエラー: __node__, __id__: __error__"
|
||||
}
|
||||
},
|
||||
"contextMenu": {
|
||||
"insert": "挿入",
|
||||
"node": "ノード",
|
||||
"junction": "分岐点",
|
||||
"linkNodes": "Linkノード"
|
||||
},
|
||||
"action-list": {
|
||||
"toggle-show-tips": "ヒント表示切替",
|
||||
"show-about": "Node-REDの説明を表示",
|
||||
@@ -1302,7 +1308,7 @@
|
||||
"search": "検索",
|
||||
"search-previous": "前を検索",
|
||||
"search-next": "次を検索",
|
||||
"show-action-list": "アクション一覧を表示",
|
||||
"show-action-list": "動作一覧を表示",
|
||||
"confirm-edit-tray": "編集を完了",
|
||||
"cancel-edit-tray": "編集をキャンセル",
|
||||
"show-remote-diff": "リモートとの変更差分を表示",
|
||||
@@ -1324,6 +1330,11 @@
|
||||
"zoom-out": "ズームアウト",
|
||||
"zoom-reset": "ズームリセット",
|
||||
"toggle-navigator": "ナビゲータ表示切替",
|
||||
"show-system-info": "システムインフォメーション"
|
||||
"show-system-info": "システム情報",
|
||||
"split-wires-with-junctions": "分岐点によりワイヤーを分割",
|
||||
"new-project": "新しいプロジェクト",
|
||||
"open-project": "プロジェクトを開く",
|
||||
"show-project-settings": "プロジェクト設定を表示",
|
||||
"show-version-control-tab": "バージョンコントロールタブを表示"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@node-red/editor-client",
|
||||
"version": "3.0.0-beta.2",
|
||||
"version": "3.0.0-beta.3",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@@ -133,6 +133,8 @@ RED.menu = (function() {
|
||||
if (opt.options) {
|
||||
item.addClass("red-ui-menu-dropdown-submenu"+(opt.direction!=='right'?" pull-left":""));
|
||||
var submenu = $('<ul id="'+opt.id+'-submenu" class="red-ui-menu-dropdown"></ul>').appendTo(item);
|
||||
var hasIcons = false
|
||||
var hasSubmenus = false
|
||||
|
||||
for (var i=0;i<opt.options.length;i++) {
|
||||
|
||||
@@ -144,6 +146,8 @@ RED.menu = (function() {
|
||||
opt.options[i].onpostselect = opt.onpostselect
|
||||
}
|
||||
opt.options[i].direction = opt.direction
|
||||
hasIcons = hasIcons || (opt.options[i].icon);
|
||||
hasSubmenus = hasSubmenus || (opt.options[i].options);
|
||||
}
|
||||
|
||||
var li = createMenuItem(opt.options[i]);
|
||||
@@ -151,6 +155,14 @@ RED.menu = (function() {
|
||||
li.appendTo(submenu);
|
||||
}
|
||||
}
|
||||
if (!hasIcons) {
|
||||
submenu.addClass("red-ui-menu-dropdown-noicons")
|
||||
}
|
||||
if (hasSubmenus) {
|
||||
submenu.addClass("red-ui-menu-dropdown-submenus")
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (opt.disabled) {
|
||||
item.addClass("disabled");
|
||||
@@ -191,6 +203,8 @@ RED.menu = (function() {
|
||||
}
|
||||
|
||||
var lastAddedSeparator = false;
|
||||
var hasSubmenus = false;
|
||||
var hasIcons = false;
|
||||
for (var i=0;i<options.options.length;i++) {
|
||||
var opt = options.options[i];
|
||||
if (opt) {
|
||||
@@ -203,6 +217,8 @@ RED.menu = (function() {
|
||||
opt.direction = options.direction || 'left'
|
||||
}
|
||||
if (opt !== null || !lastAddedSeparator) {
|
||||
hasIcons = hasIcons || (opt && opt.icon);
|
||||
hasSubmenus = hasSubmenus || (opt && opt.options);
|
||||
var li = createMenuItem(opt);
|
||||
if (li) {
|
||||
li.appendTo(topMenu);
|
||||
@@ -210,7 +226,12 @@ RED.menu = (function() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasIcons) {
|
||||
topMenu.addClass("red-ui-menu-dropdown-noicons")
|
||||
}
|
||||
if (hasSubmenus) {
|
||||
topMenu.addClass("red-ui-menu-dropdown-submenus")
|
||||
}
|
||||
return topMenu;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
* - multi : boolean - if true, .selected will return an array of results
|
||||
* otherwise, returns the first selected item
|
||||
* - sortable: boolean/string - TODO: see editableList
|
||||
* - selectable: boolean - default true - whether individual items can be selected
|
||||
* - rootSortable: boolean - if 'sortable' is set, then setting this to
|
||||
* false, prevents items being sorted to the
|
||||
* top level of the tree
|
||||
@@ -118,6 +119,7 @@
|
||||
switch(evt.keyCode) {
|
||||
case 32: // SPACE
|
||||
case 13: // ENTER
|
||||
if (!that.options.selectable) { return }
|
||||
if (evt.altKey || evt.ctrlKey || evt.metaKey || evt.shiftKey) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -48,10 +48,10 @@ RED.contextMenu = (function() {
|
||||
const menuItems = [
|
||||
{ onselect: 'core:show-action-list', onpostselect: function() {} },
|
||||
{
|
||||
label: 'Insert',
|
||||
label: RED._("contextMenu.insert"),
|
||||
options: [
|
||||
{
|
||||
label: 'Node',
|
||||
label: RED._("contextMenu.node"),
|
||||
onselect: function() {
|
||||
RED.view.showQuickAddDialog({
|
||||
position: [ options.x - offset.left, options.y - offset.top ],
|
||||
@@ -62,12 +62,12 @@ RED.contextMenu = (function() {
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Junction',
|
||||
label: RED._("contextMenu.junction"),
|
||||
onselect: 'core:split-wires-with-junctions',
|
||||
disabled: hasSelection || !hasLinks
|
||||
},
|
||||
{
|
||||
label: 'Link Nodes',
|
||||
label: RED._("contextMenu.linkNodes"),
|
||||
onselect: 'core:split-wire-with-link-nodes',
|
||||
disabled: hasSelection || !hasLinks
|
||||
}
|
||||
@@ -170,6 +170,7 @@ RED.contextMenu = (function() {
|
||||
}
|
||||
|
||||
return {
|
||||
show: show
|
||||
show: show,
|
||||
hide: disposeMenu
|
||||
}
|
||||
})()
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
const MONACO = "monaco";
|
||||
const ACE = "ace";
|
||||
const defaultEditor = ACE;
|
||||
const defaultEditor = MONACO;
|
||||
const DEFAULT_SETTINGS = { lib: defaultEditor, options: {} };
|
||||
var selectedCodeEditor = null;
|
||||
var initialised = false;
|
||||
|
||||
@@ -534,6 +534,7 @@
|
||||
var container = $("#red-ui-editor-type-json-tab-ui-container").css({"height":"100%"});
|
||||
var filterDepth = Infinity;
|
||||
var list = $('<div class="red-ui-debug-msg-payload red-ui-editor-type-json-editor">').appendTo(container).treeList({
|
||||
selectable: false,
|
||||
rootSortable: false,
|
||||
sortable: ".red-ui-editor-type-json-editor-item-handle",
|
||||
}).on("treelistchangeparent", function(event, evt) {
|
||||
|
||||
@@ -37,8 +37,7 @@
|
||||
if (!node._def.defaults || !node._def.defaults.hasOwnProperty("icon")) {
|
||||
var icon = $("#red-ui-editor-node-icon").val()||"";
|
||||
if (!this.isDefaultIcon) {
|
||||
if ((icon !== node.icon) &&
|
||||
(icon !== "")) {
|
||||
if ((node.icon && icon !== node.icon) || (!node.icon && icon !== "")) {
|
||||
editState.changes.icon = node.icon;
|
||||
node.icon = icon;
|
||||
editState.changed = true;
|
||||
|
||||
@@ -979,13 +979,14 @@ RED.view.tools = (function() {
|
||||
* - it uses `<paletteLabel> <N>` - where N is the next available integer that
|
||||
* doesn't clash with any existing nodes of that type
|
||||
* @param {Object} node The node to set the name of - if not provided, uses current selection
|
||||
* @param {{ renameBlank: boolean, renameClash: boolean, generateHistory: boolean }} options Possible options are `renameBlank`, `renameClash` and `generateHistory`
|
||||
*/
|
||||
function generateNodeNames(node, options) {
|
||||
options = options || {
|
||||
options = Object.assign({
|
||||
renameBlank: true,
|
||||
renameClash: true,
|
||||
generateHistory: true
|
||||
}
|
||||
}, options)
|
||||
let nodes = node;
|
||||
if (node) {
|
||||
if (!Array.isArray(node)) {
|
||||
|
||||
@@ -988,6 +988,7 @@ RED.view = (function() {
|
||||
if (RED.view.DEBUG) {
|
||||
console.warn("canvasMouseDown", { mouse_mode, point: d3.mouse(this), event: d3.event });
|
||||
}
|
||||
RED.contextMenu.hide();
|
||||
if (mouse_mode === RED.state.SELECTING_NODE) {
|
||||
d3.event.stopPropagation();
|
||||
return;
|
||||
@@ -1071,8 +1072,8 @@ RED.view = (function() {
|
||||
var oy = point[1];
|
||||
|
||||
const offset = $("#red-ui-workspace-chart").offset()
|
||||
var clientX = ox + offset.left
|
||||
var clientY = oy + offset.top
|
||||
var clientX = ox + offset.left - $("#red-ui-workspace-chart").scrollLeft()
|
||||
var clientY = oy + offset.top - $("#red-ui-workspace-chart").scrollTop()
|
||||
|
||||
if (RED.settings.get("editor").view['view-snap-grid']) {
|
||||
// eventLayer.append("circle").attr("cx",point[0]).attr("cy",point[1]).attr("r","2").attr('fill','red')
|
||||
@@ -1779,6 +1780,9 @@ RED.view = (function() {
|
||||
}
|
||||
var i;
|
||||
var historyEvent;
|
||||
if (d3.event.button === 2) {
|
||||
return
|
||||
}
|
||||
if (mouse_mode === RED.state.PANNING) {
|
||||
resetMouseVars();
|
||||
return
|
||||
@@ -2903,6 +2907,7 @@ RED.view = (function() {
|
||||
|
||||
function portMouseDown(d,portType,portIndex, evt) {
|
||||
if (RED.view.DEBUG) { console.warn("portMouseDown", mouse_mode,d,portType,portIndex); }
|
||||
RED.contextMenu.hide();
|
||||
evt = evt || d3.event;
|
||||
if (evt === 1) {
|
||||
return;
|
||||
@@ -3411,6 +3416,7 @@ RED.view = (function() {
|
||||
function nodeMouseDown(d) {
|
||||
if (RED.view.DEBUG) { console.warn("nodeMouseDown", mouse_mode,d); }
|
||||
focusView();
|
||||
RED.contextMenu.hide();
|
||||
if (d3.event.button === 1) {
|
||||
return;
|
||||
}
|
||||
@@ -3793,6 +3799,7 @@ RED.view = (function() {
|
||||
if (RED.view.DEBUG) {
|
||||
console.warn("linkMouseDown", { mouse_mode, point: d3.mouse(this), event: d3.event });
|
||||
}
|
||||
RED.contextMenu.hide();
|
||||
if (mouse_mode === RED.state.SELECTING_NODE) {
|
||||
d3.event.stopPropagation();
|
||||
return;
|
||||
@@ -3852,6 +3859,9 @@ RED.view = (function() {
|
||||
}
|
||||
|
||||
function groupMouseUp(g) {
|
||||
if (RED.view.DEBUG) {
|
||||
console.warn("groupMouseUp", { mouse_mode, event: d3.event });
|
||||
}
|
||||
if (dblClickPrimed && mousedown_group == g && clickElapsed > 0 && clickElapsed < dblClickInterval) {
|
||||
mouse_mode = RED.state.DEFAULT;
|
||||
RED.editor.editGroup(g);
|
||||
@@ -3867,6 +3877,10 @@ RED.view = (function() {
|
||||
// return
|
||||
// }
|
||||
|
||||
if (RED.view.DEBUG) {
|
||||
console.warn("groupMouseDown", { mouse_mode, point: mouse, event: d3.event });
|
||||
}
|
||||
RED.contextMenu.hide();
|
||||
focusView();
|
||||
if (d3.event.button === 1) {
|
||||
return;
|
||||
@@ -5858,6 +5872,7 @@ RED.view = (function() {
|
||||
* @private
|
||||
*/
|
||||
function createNode(type, x, y, z) {
|
||||
const wasDirty = RED.nodes.dirty()
|
||||
var m = /^subflow:(.+)$/.exec(type);
|
||||
var activeSubflow = z ? RED.nodes.subflow(z) : null;
|
||||
if (activeSubflow && m) {
|
||||
@@ -5916,7 +5931,7 @@ RED.view = (function() {
|
||||
var historyEvent = {
|
||||
t: "add",
|
||||
nodes: [nn.id],
|
||||
dirty: RED.nodes.dirty()
|
||||
dirty: wasDirty
|
||||
}
|
||||
if (activeSubflow) {
|
||||
var subflowRefresh = RED.subflow.refresh(true);
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
& > li > a,
|
||||
& > li > a:focus {
|
||||
display: block;
|
||||
padding: 4px 20px 4px 12px;
|
||||
padding: 4px 12px 4px 32px;
|
||||
clear: both;
|
||||
font-weight: normal;
|
||||
line-height: 20px;
|
||||
@@ -58,6 +58,18 @@
|
||||
& > li.pull-left > a:focus {
|
||||
padding: 4px 12px 4px 32px;
|
||||
}
|
||||
&.red-ui-menu-dropdown-noicons > li > a,
|
||||
&.red-ui-menu-dropdown-noicons > li > a:focus {
|
||||
padding: 4px 12px 4px 12px;
|
||||
}
|
||||
|
||||
&.red-ui-menu-dropdown-submenus > li > a,
|
||||
&.red-ui-menu-dropdown-submenus > li > a:focus {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
& > .active > a,
|
||||
& > .active > a:hover,
|
||||
& > .active > a:focus {
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
}
|
||||
.red-ui-search-results-container {
|
||||
display: none;
|
||||
height: 150px;
|
||||
height: 195px;
|
||||
.red-ui-editableList-container {
|
||||
border: 1px dashed $primary-border-color;
|
||||
border-top: 1px solid $secondary-border-color;
|
||||
|
||||
@@ -37,7 +37,7 @@ ul.red-ui-sidebar-node-config-list {
|
||||
}
|
||||
.red-ui-palette-node {
|
||||
overflow: hidden;
|
||||
|
||||
cursor: default;
|
||||
&.selected {
|
||||
border-color: transparent;
|
||||
box-shadow: 0 0 0 2px $node-selected-color;
|
||||
@@ -58,7 +58,7 @@ ul.red-ui-sidebar-node-config-list {
|
||||
.red-ui-palette-icon-container {
|
||||
font-size: 12px;
|
||||
line-height: 30px;
|
||||
background-color: $node-icon-background-color;
|
||||
background-color: $node-port-background;
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
a {
|
||||
@@ -68,6 +68,7 @@ ul.red-ui-sidebar-node-config-list {
|
||||
left: 0;
|
||||
right: 0;
|
||||
color: $node-port-label-color;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
background: $node-port-background-hover;
|
||||
|
||||
BIN
packages/node_modules/@node-red/editor-client/src/tours/images/context-menu.png
vendored
Normal file
BIN
packages/node_modules/@node-red/editor-client/src/tours/images/context-menu.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
@@ -1,15 +1,30 @@
|
||||
export default {
|
||||
version: "3.0.0-beta.1",
|
||||
version: "3.0.0-beta.3",
|
||||
steps: [
|
||||
{
|
||||
titleIcon: "fa fa-map-o",
|
||||
title: {
|
||||
"en-US": "Welcome to Node-RED 3.0 Beta 1!",
|
||||
"ja": "Node-RED 3.0 ベータ1へようこそ!"
|
||||
"en-US": "Welcome to Node-RED 3.0 Beta 3!",
|
||||
"ja": "Node-RED 3.0 ベータ3へようこそ!"
|
||||
},
|
||||
description: {
|
||||
"en-US": "<p>This is the first Beta release of Node-RED 3.0. It contains just about everything we have planned for the final release.</p><p>Let's take a moment to discover the new features in this release.</p>",
|
||||
"ja": "<p>これはNode-RED 3.0の最初のベータリリースです。これには、最終リリースで計画しているほぼ全ての機能が含まれています。</p><p>本リリースの新機能を見つけてみましょう。</p>"
|
||||
"en-US": "<p>This is the final beta release of Node-RED 3.0.</p><p>Let's take a moment to discover the new features in this release.</p>",
|
||||
"ja": "<p>これはNode-RED 3.0の最後のベータリリースです。</p><p>本リリースの新機能を見つけてみましょう。</p>"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: {
|
||||
"en-US": "Context Menu",
|
||||
"ja": "コンテキストメニュー"
|
||||
},
|
||||
image: 'images/context-menu.png',
|
||||
description: {
|
||||
"en-US": `<p>The editor now has its own context menu when you
|
||||
right-click in the workspace.</p>
|
||||
<p>This makes many of the built-in actions much easier
|
||||
to access.</p>`,
|
||||
"ja": `<p>ワークスペースで右クリックすると、エディタに独自のコンテキストメニューが表示されるようになりました。</p>
|
||||
<p>これによって多くの組み込み動作を、より簡単に利用できます。</p>`
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -19,12 +34,13 @@ export default {
|
||||
},
|
||||
image: 'images/junction-slice.gif',
|
||||
description: {
|
||||
"en-US": `<p>To make it easier to route wires around your flows, it is now possible to
|
||||
add junction nodes that give you more control.</p>
|
||||
<p>Junctions can be added to wires by holding the Shift key, then click and drag with
|
||||
the right-hand mouse button across the wires.</p>`,
|
||||
"en-US": `<p>To make it easier to route wires around your flows,
|
||||
it is now possible to add junction nodes that give
|
||||
you more control.</p>
|
||||
<p>Junctions can be added to wires by holding both the Alt key and the Shift key
|
||||
then click and drag the mouse across the wires.</p>`,
|
||||
"ja": `<p>フローのワイヤーの経路をより制御しやすくするために、分岐点ノードを追加できるようになりました。</p>
|
||||
<p>シフトキーを押しながら、マウスの右ボタンをクリックし、ワイヤーを横切るようにドラッグすることで、分岐点を追加できます。</p>`
|
||||
<p>Altキーとシフトキーを押しながらマウスをクリックし、ワイヤーを横切るようにドラッグすることで、分岐点を追加できます。</p>`
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
.inject-time-row {
|
||||
padding-left: 110px;
|
||||
}
|
||||
.inject-time-row select {
|
||||
.inject-time-row:not(#inject-time-row-interval) select {
|
||||
margin: 3px 0;
|
||||
}
|
||||
.inject-time-days label {
|
||||
|
||||
@@ -558,7 +558,7 @@
|
||||
onadd: function() {
|
||||
if (this.name === '_DEFAULT_') {
|
||||
this.name = ''
|
||||
RED.actions.invoke("core:generate-node-names", this)
|
||||
RED.actions.invoke("core:generate-node-names", this, {generateHistory: false})
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
function onAdd() {
|
||||
if (this.name === '_DEFAULT_') {
|
||||
this.name = ''
|
||||
RED.actions.invoke("core:generate-node-names", this)
|
||||
RED.actions.invoke("core:generate-node-names", this, {generateHistory: false})
|
||||
}
|
||||
for (var i=0;i<this.links.length;i++) {
|
||||
var n = RED.nodes.node(this.links[i]);
|
||||
|
||||
@@ -639,7 +639,7 @@
|
||||
onadd: function() {
|
||||
if (this.name === '_DEFAULT_') {
|
||||
this.name = ''
|
||||
RED.actions.invoke("core:generate-node-names", this)
|
||||
RED.actions.invoke("core:generate-node-names", this, {generateHistory: false})
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -44,6 +44,14 @@ module.exports = function(RED) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function parseEnv(key) {
|
||||
var match = /^env\.(.+)/.exec(key);
|
||||
if (match) {
|
||||
return match[1];
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom Mustache Context capable to collect message property and node
|
||||
* flow and global context
|
||||
@@ -74,6 +82,11 @@ module.exports = function(RED) {
|
||||
return value;
|
||||
}
|
||||
|
||||
// try env
|
||||
if (parseEnv(name)) {
|
||||
return this.cachedContextTokens[name];
|
||||
}
|
||||
|
||||
// try flow/global context:
|
||||
var context = parseContext(name);
|
||||
if (context) {
|
||||
@@ -156,6 +169,17 @@ module.exports = function(RED) {
|
||||
var tokens = extractTokens(mustache.parse(template));
|
||||
var resolvedTokens = {};
|
||||
tokens.forEach(function(name) {
|
||||
var env_name = parseEnv(name);
|
||||
if (env_name) {
|
||||
var promise = new Promise((resolve, reject) => {
|
||||
var val = RED.util.evaluateNodeProperty(env_name, 'env', node)
|
||||
resolvedTokens[name] = val;
|
||||
resolve();
|
||||
});
|
||||
promises.push(promise);
|
||||
return;
|
||||
}
|
||||
|
||||
var context = parseContext(name);
|
||||
if (context) {
|
||||
var type = context.type;
|
||||
|
||||
@@ -89,6 +89,9 @@ module.exports = function(RED) {
|
||||
else if (msg.payload[s][t].toString().indexOf(node.sep) !== -1) { // add quotes if any "commas"
|
||||
msg.payload[s][t] = node.quo + msg.payload[s][t].toString() + node.quo;
|
||||
}
|
||||
else if (msg.payload[s][t].toString().indexOf("\n") !== -1) { // add quotes if any "\n"
|
||||
msg.payload[s][t] = node.quo + msg.payload[s][t].toString() + node.quo;
|
||||
}
|
||||
}
|
||||
ou += msg.payload[s].join(node.sep) + node.ret;
|
||||
}
|
||||
@@ -112,7 +115,7 @@ module.exports = function(RED) {
|
||||
q = q.replace(/"/g, '""');
|
||||
ou += node.quo + q + node.quo + node.sep;
|
||||
}
|
||||
else if (q.indexOf(node.sep) !== -1) { // add quotes if any "commas"
|
||||
else if (q.indexOf(node.sep) !== -1 || p.indexOf("\n") !== -1) { // add quotes if any "commas" or "\n"
|
||||
ou += node.quo + q + node.quo + node.sep;
|
||||
}
|
||||
else { ou += q + node.sep; } // otherwise just add
|
||||
@@ -134,7 +137,7 @@ module.exports = function(RED) {
|
||||
p = p.replace(/"/g, '""');
|
||||
ou += node.quo + p + node.quo + node.sep;
|
||||
}
|
||||
else if (p.indexOf(node.sep) !== -1) { // add quotes if any "commas"
|
||||
else if (p.indexOf(node.sep) !== -1 || p.indexOf("\n") !== -1) { // add quotes if any "commas" or "\n"
|
||||
ou += node.quo + p + node.quo + node.sep;
|
||||
}
|
||||
else { ou += p + node.sep; } // otherwise just add
|
||||
|
||||
@@ -314,11 +314,13 @@ module.exports = function(RED) {
|
||||
if (err) {
|
||||
return done(err);
|
||||
}
|
||||
msgInfo.send({payload: result});
|
||||
msgInfo.msg.payload = result;
|
||||
msgInfo.send(msgInfo.msg);
|
||||
done();
|
||||
});
|
||||
} else {
|
||||
msgInfo.send({payload: result});
|
||||
msgInfo.msg.payload = result;
|
||||
msgInfo.send(msgInfo.msg);
|
||||
done();
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -928,6 +928,7 @@
|
||||
"write": "write file",
|
||||
"read": "read file",
|
||||
"filename": "ファイル名",
|
||||
"path": "パス",
|
||||
"action": "動作",
|
||||
"addnewline": "メッセージの入力のたびに改行を追加",
|
||||
"createdir": "ディレクトリが存在しない場合は作成",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@node-red/nodes",
|
||||
"version": "3.0.0-beta.2",
|
||||
"version": "3.0.0-beta.3",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -36,7 +36,7 @@
|
||||
"js-yaml": "4.1.0",
|
||||
"media-typer": "1.1.0",
|
||||
"mqtt": "4.3.7",
|
||||
"multer": "1.4.4",
|
||||
"multer": "1.4.5-lts.1",
|
||||
"mustache": "4.2.0",
|
||||
"node-watch": "0.7.3",
|
||||
"on-headers": "1.0.2",
|
||||
|
||||
@@ -359,6 +359,7 @@ function loadNodeSet(node) {
|
||||
try {
|
||||
var loadPromise = null;
|
||||
var r = require(node.file);
|
||||
r = r.__esModule ? r.default : r
|
||||
if (typeof r === "function") {
|
||||
|
||||
var red = registryUtil.createNodeApi(node);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@node-red/registry",
|
||||
"version": "3.0.0-beta.2",
|
||||
"version": "3.0.0-beta.3",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./lib/index.js",
|
||||
"repository": {
|
||||
@@ -16,11 +16,11 @@
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"@node-red/util": "3.0.0-beta.2",
|
||||
"@node-red/util": "3.0.0-beta.3",
|
||||
"clone": "2.1.2",
|
||||
"fs-extra": "10.1.0",
|
||||
"semver": "7.3.7",
|
||||
"tar": "6.1.11",
|
||||
"uglify-js": "3.15.5"
|
||||
"uglify-js": "3.16.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ var api = module.exports = {
|
||||
safeSettings.context = runtime.nodes.listContextStores();
|
||||
if (runtime.settings.editorTheme && runtime.settings.editorTheme.codeEditor) {
|
||||
safeSettings.codeEditor = runtime.settings.editorTheme.codeEditor || {};
|
||||
safeSettings.codeEditor.lib = safeSettings.codeEditor.lib || "ace";
|
||||
safeSettings.codeEditor.lib = safeSettings.codeEditor.lib || "monaco";
|
||||
safeSettings.codeEditor.options = safeSettings.codeEditor.options || {};
|
||||
}
|
||||
safeSettings.libraries = runtime.library.getLibraries();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@node-red/runtime",
|
||||
"version": "3.0.0-beta.2",
|
||||
"version": "3.0.0-beta.3",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./lib/index.js",
|
||||
"repository": {
|
||||
@@ -16,8 +16,8 @@
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"@node-red/registry": "3.0.0-beta.2",
|
||||
"@node-red/util": "3.0.0-beta.2",
|
||||
"@node-red/registry": "3.0.0-beta.3",
|
||||
"@node-red/util": "3.0.0-beta.3",
|
||||
"async-mutex": "0.3.2",
|
||||
"clone": "2.1.2",
|
||||
"express": "4.18.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@node-red/util",
|
||||
"version": "3.0.0-beta.2",
|
||||
"version": "3.0.0-beta.3",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -16,7 +16,7 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"fs-extra": "10.1.0",
|
||||
"i18next": "21.8.2",
|
||||
"i18next": "21.8.10",
|
||||
"json-stringify-safe": "5.0.1",
|
||||
"jsonata": "1.8.6",
|
||||
"lodash.clonedeep": "^4.5.0",
|
||||
|
||||
10
packages/node_modules/node-red/package.json
vendored
10
packages/node_modules/node-red/package.json
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-red",
|
||||
"version": "3.0.0-beta.2",
|
||||
"version": "3.0.0-beta.3",
|
||||
"description": "Low-code programming for event-driven applications",
|
||||
"homepage": "http://nodered.org",
|
||||
"license": "Apache-2.0",
|
||||
@@ -31,10 +31,10 @@
|
||||
"flow"
|
||||
],
|
||||
"dependencies": {
|
||||
"@node-red/editor-api": "3.0.0-beta.2",
|
||||
"@node-red/runtime": "3.0.0-beta.2",
|
||||
"@node-red/util": "3.0.0-beta.2",
|
||||
"@node-red/nodes": "3.0.0-beta.2",
|
||||
"@node-red/editor-api": "3.0.0-beta.3",
|
||||
"@node-red/runtime": "3.0.0-beta.3",
|
||||
"@node-red/util": "3.0.0-beta.3",
|
||||
"@node-red/nodes": "3.0.0-beta.3",
|
||||
"basic-auth": "2.0.1",
|
||||
"bcryptjs": "2.4.3",
|
||||
"express": "4.18.1",
|
||||
|
||||
2
packages/node_modules/node-red/settings.js
vendored
2
packages/node_modules/node-red/settings.js
vendored
@@ -401,7 +401,7 @@ module.exports = {
|
||||
* packages/node_modules/@node-red/editor-client/src/vendor/monaco/dist/theme
|
||||
* e.g. "tomorrow-night", "upstream-sunburst", "github", "my-theme"
|
||||
*/
|
||||
theme: "vs",
|
||||
// theme: "vs",
|
||||
/** other overrides can be set e.g. fontSize, fontFamily, fontLigatures etc.
|
||||
* for the full list, see https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.IStandaloneEditorConstructionOptions.html
|
||||
*/
|
||||
|
||||
@@ -144,6 +144,28 @@ describe('template node', function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe('env var', function() {
|
||||
before(function() {
|
||||
process.env.TEST = 'xyzzy';
|
||||
})
|
||||
after(function() {
|
||||
delete process.env.TEST;
|
||||
})
|
||||
|
||||
it('should modify payload from env variable', function(done) {
|
||||
var flow = [{id:"n1",z:"t1", type:"template", field:"payload", template:"payload={{env.TEST}}",wires:[["n2"]]},{id:"n2",z:"t1",type:"helper"}];
|
||||
helper.load(templateNode, flow, function() {
|
||||
var n1 = helper.getNode("n1");
|
||||
var n2 = helper.getNode("n2");
|
||||
n2.on("input", function(msg) {
|
||||
msg.should.have.property('payload', 'payload=xyzzy');
|
||||
done();
|
||||
});
|
||||
n1.receive({payload:"foo",topic: "bar"});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('should modify payload from flow context', function(done) {
|
||||
var flow = [{id:"n1",z:"t1", type:"template", field:"payload", template:"payload={{flow.value}}",wires:[["n2"]]},{id:"n2",z:"t1",type:"helper"}];
|
||||
helper.load(templateNode, flow, function() {
|
||||
|
||||
@@ -693,19 +693,19 @@ describe('CSV node', function() {
|
||||
describe('json object to csv', function() {
|
||||
|
||||
it('should convert a simple object back to a csv', function(done) {
|
||||
var flow = [ { id:"n1", type:"csv", temp:"a,b,c,,e", wires:[["n2"]] },
|
||||
var flow = [ { id:"n1", type:"csv", temp:"a,b,c,,e,f", wires:[["n2"]] },
|
||||
{id:"n2", type:"helper"} ];
|
||||
helper.load(csvNode, flow, function() {
|
||||
var n1 = helper.getNode("n1");
|
||||
var n2 = helper.getNode("n2");
|
||||
n2.on("input", function(msg) {
|
||||
try {
|
||||
msg.should.have.property('payload', '4,foo,true,,0\n');
|
||||
msg.should.have.property('payload', '4,foo,true,,0,"Hello\nWorld"\n');
|
||||
done();
|
||||
}
|
||||
catch(e) { done(e); }
|
||||
});
|
||||
var testJson = { e:0, d:1, b:"foo", c:true, a:4 };
|
||||
var testJson = { e:0, d:1, b:"foo", c:true, a:4, f:"Hello\nWorld" };
|
||||
n1.emit("input", {payload:testJson});
|
||||
});
|
||||
});
|
||||
@@ -777,7 +777,7 @@ describe('CSV node', function() {
|
||||
}
|
||||
catch(e) { done(e); }
|
||||
});
|
||||
var testJson = [{ d: 1, b: 3, c: 2, a: 4 },{d:4,a:1,c:3,b:2}];
|
||||
var testJson = [{ d:1, b:3, c:2, a:4 },{d:4, a:1, c:3, b:2}];
|
||||
n1.emit("input", {payload:testJson});
|
||||
});
|
||||
});
|
||||
@@ -790,12 +790,12 @@ describe('CSV node', function() {
|
||||
var n2 = helper.getNode("n2");
|
||||
n2.on("input", function(msg) {
|
||||
try {
|
||||
msg.should.have.property('payload', 'a,b,c,d\n4,3,2,1\n1,2,3,4\n');
|
||||
msg.should.have.property('payload', 'a,b,c,d\n4,3,2,1\n1,2,3,"a\nb"\n');
|
||||
done();
|
||||
}
|
||||
catch(e) { done(e); }
|
||||
});
|
||||
var testJson = [{ d: 1, b: 3, c: 2, a: 4 },{d:4,a:1,c:3,b:2}];
|
||||
var testJson = [{ d:1, b:3, c:2, a:4 },{d:"a\nb", a:1, c:3, b:2}];
|
||||
n1.emit("input", {payload:testJson});
|
||||
});
|
||||
});
|
||||
@@ -826,12 +826,12 @@ describe('CSV node', function() {
|
||||
var n2 = helper.getNode("n2");
|
||||
n2.on("input", function(msg) {
|
||||
try {
|
||||
msg.should.have.property('payload', 'd,b,c,a\n1,3,2,4\n4,2,3,1\n');
|
||||
msg.should.have.property('payload', 'd,b,c,a\n1,3,2,4\n4,"f\ng",3,1\n');
|
||||
done();
|
||||
}
|
||||
catch(e) { done(e); }
|
||||
});
|
||||
var testJson = [{ d: 1, b: 3, c: 2, a: 4 },{d:4,a:1,c:3,b:2}];
|
||||
var testJson = [{ d: 1, b: 3, c: 2, a: 4 },{d:4,a:1,c:3,b:"f\ng"}];
|
||||
n1.emit("input", {payload:testJson});
|
||||
});
|
||||
});
|
||||
@@ -844,12 +844,12 @@ describe('CSV node', function() {
|
||||
var n2 = helper.getNode("n2");
|
||||
n2.on("input", function(msg) {
|
||||
try {
|
||||
msg.should.have.property('payload', ',0,1,foo,"ba""r","di,ng"\n');
|
||||
msg.should.have.property('payload', ',0,1,foo,"ba""r","di,ng","fa\nba"\n');
|
||||
done();
|
||||
}
|
||||
catch(e) { done(e); }
|
||||
});
|
||||
var testJson = ["",0,1,"foo",'ba"r','di,ng'];
|
||||
var testJson = ["",0,1,"foo",'ba"r','di,ng',"fa\nba"];
|
||||
n1.emit("input", {payload:testJson});
|
||||
});
|
||||
});
|
||||
@@ -898,12 +898,12 @@ describe('CSV node', function() {
|
||||
var n2 = helper.getNode("n2");
|
||||
n2.on("input", function(msg) {
|
||||
try {
|
||||
msg.should.have.property('payload', 'col1,col2,col3,col4\r\nH1,H2,H3,H4\r\nA,B,,\r\nA,,C,\r\nA,,,D\r\n');
|
||||
msg.should.have.property('payload', 'col1,col2,col3,col4\r\nH1,H2,H3,H4\r\nA,B,,\r\nA,,C,\r\nA,,,"D\nE"\r\n');
|
||||
done();
|
||||
}
|
||||
catch(e) { done(e); }
|
||||
});
|
||||
var testJson = [{"col1":"H1","col2":"H2","col3":"H3","col4":"H4"},{"col1":"A","col2":"B"},{"col1":"A","col3":"C"},{"col1":"A","col4":"D"}];
|
||||
var testJson = [{"col1":"H1","col2":"H2","col3":"H3","col4":"H4"},{"col1":"A","col2":"B"},{"col1":"A","col3":"C"},{"col1":"A","col4":"D\nE"}];
|
||||
n1.emit("input", {payload:testJson});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user