@node-red/editor-client 2.1.3 → 2.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/locales/en-US/editor.json +6 -1
- package/locales/ja/editor.json +37 -5
- package/locales/zh-CN/editor.json +1 -1
- package/package.json +1 -1
- package/public/red/about +34 -0
- package/public/red/red.js +159 -77
- package/public/red/red.min.js +3 -1
- package/public/red/style.min.css +1 -1
- package/public/red/tours/first-flow.js +28 -7
- package/public/red/tours/welcome.js +116 -38
- package/public/vendor/ace/mode-jsonata.js +1 -1
- package/public/vendor/vendor.js +1 -1
package/public/red/red.js
CHANGED
|
@@ -681,7 +681,7 @@ var RED = (function() {
|
|
|
681
681
|
{id:"menu-item-projects-settings",label:RED._("menu.label.projects-settings"),disabled:false,onselect:"core:show-project-settings"}
|
|
682
682
|
]});
|
|
683
683
|
}
|
|
684
|
-
menuOptions.push({id:"menu-item-edit-menu", label:"
|
|
684
|
+
menuOptions.push({id:"menu-item-edit-menu", label:RED._("menu.label.edit"), options: [
|
|
685
685
|
{id: "menu-item-edit-undo", label:RED._("keyboard.undoChange"), disabled: true, onselect: "core:undo"},
|
|
686
686
|
{id: "menu-item-edit-redo", label:RED._("keyboard.redoChange"), disabled: true, onselect: "core:redo"},
|
|
687
687
|
null,
|
|
@@ -1172,6 +1172,8 @@ RED.i18n = (function() {
|
|
|
1172
1172
|
defaultNS: "editor",
|
|
1173
1173
|
fallbackLng: ['en-US'],
|
|
1174
1174
|
returnObjects: true,
|
|
1175
|
+
keySeparator: ".",
|
|
1176
|
+
nsSeparator: ":",
|
|
1175
1177
|
interpolation: {
|
|
1176
1178
|
unescapeSuffix: 'HTML',
|
|
1177
1179
|
escapeValue: false,
|
|
@@ -4392,7 +4394,6 @@ RED.nodes = (function() {
|
|
|
4392
4394
|
var removedGroups = [];
|
|
4393
4395
|
if (ws) {
|
|
4394
4396
|
delete workspaces[id];
|
|
4395
|
-
allNodes.removeTab(id);
|
|
4396
4397
|
delete linkTabMap[id];
|
|
4397
4398
|
workspacesOrder.splice(workspacesOrder.indexOf(id),1);
|
|
4398
4399
|
var i;
|
|
@@ -4430,6 +4431,7 @@ RED.nodes = (function() {
|
|
|
4430
4431
|
for (i=removedGroups.length-1; i>=0; i--) {
|
|
4431
4432
|
removeGroup(removedGroups[i]);
|
|
4432
4433
|
}
|
|
4434
|
+
allNodes.removeTab(id);
|
|
4433
4435
|
RED.events.emit('flows:remove',ws);
|
|
4434
4436
|
}
|
|
4435
4437
|
return {nodes:removedNodes,links:removedLinks, groups: removedGroups};
|
|
@@ -4684,6 +4686,11 @@ RED.nodes = (function() {
|
|
|
4684
4686
|
// Until we know how that can happen, add a filter here to remove them
|
|
4685
4687
|
node.nodes = node.nodes.filter(function(n) { return !!n }).map(function(n) { return n.id });
|
|
4686
4688
|
}
|
|
4689
|
+
if (n.type === "tab" || n.type === "group") {
|
|
4690
|
+
if (node.env && node.env.length === 0) {
|
|
4691
|
+
delete node.env;
|
|
4692
|
+
}
|
|
4693
|
+
}
|
|
4687
4694
|
if (n._def.category != "config") {
|
|
4688
4695
|
node.x = n.x;
|
|
4689
4696
|
node.y = n.y;
|
|
@@ -7926,6 +7933,8 @@ RED.utils = (function() {
|
|
|
7926
7933
|
result = $('<span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-meta"></span>').text('function');
|
|
7927
7934
|
} else if (value.hasOwnProperty('type') && (value.type === 'number' || value.type === 'bigint')) {
|
|
7928
7935
|
result = $('<span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-number"></span>').text(value.data);
|
|
7936
|
+
} else if (value.hasOwnProperty('type') && value.type === 'regexp') {
|
|
7937
|
+
result = $('<span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-string"></span>').text(value.data);
|
|
7929
7938
|
} else {
|
|
7930
7939
|
result = $('<span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-meta">object</span>');
|
|
7931
7940
|
}
|
|
@@ -8224,6 +8233,8 @@ RED.utils = (function() {
|
|
|
8224
8233
|
$('<span class="red-ui-debug-msg-type-null">undefined</span>').appendTo(entryObj);
|
|
8225
8234
|
} else if (obj.__enc__ && (obj.type === 'number' || obj.type === 'bigint')) {
|
|
8226
8235
|
e = $('<span class="red-ui-debug-msg-type-number red-ui-debug-msg-object-header"></span>').text(obj.data).appendTo(entryObj);
|
|
8236
|
+
} else if (typeHint === "regexp" || (obj.__enc__ && obj.type === 'regexp')) {
|
|
8237
|
+
e = $('<span class="red-ui-debug-msg-type-string red-ui-debug-msg-object-header"></span>').text((typeof obj === "string")?obj:obj.data).appendTo(entryObj);
|
|
8227
8238
|
} else if (typeHint === "function" || (obj.__enc__ && obj.type === 'function')) {
|
|
8228
8239
|
e = $('<span class="red-ui-debug-msg-type-meta red-ui-debug-msg-object-header"></span>').text("function").appendTo(entryObj);
|
|
8229
8240
|
} else if (typeHint === "internal" || (obj.__enc__ && obj.type === 'internal')) {
|
|
@@ -9937,7 +9948,7 @@ RED.utils = (function() {
|
|
|
9937
9948
|
if (child.depth !== parent.depth+1) {
|
|
9938
9949
|
child.depth = parent.depth+1;
|
|
9939
9950
|
// var labelPaddingWidth = ((child.gutter ? child.gutter[0].offsetWidth + 2 : 0) + (child.depth * 20));
|
|
9940
|
-
var labelPaddingWidth = ((child.gutter?child.gutter.width()+2:0)+(child.depth*20));
|
|
9951
|
+
var labelPaddingWidth = (((child.gutter&&!child.gutter.hasClass("red-ui-treeList-gutter-float"))?child.gutter.width()+2:0)+(child.depth*20));
|
|
9941
9952
|
child.treeList.labelPadding.width(labelPaddingWidth+'px');
|
|
9942
9953
|
if (child.element) {
|
|
9943
9954
|
$(child.element).css({
|
|
@@ -10159,8 +10170,9 @@ RED.utils = (function() {
|
|
|
10159
10170
|
}).appendTo(label)
|
|
10160
10171
|
|
|
10161
10172
|
}
|
|
10162
|
-
|
|
10163
|
-
var labelPaddingWidth = (item.gutter
|
|
10173
|
+
|
|
10174
|
+
var labelPaddingWidth = ((item.gutter&&!item.gutter.hasClass("red-ui-treeList-gutter-float"))?item.gutter.width()+2:0)+(depth*20);
|
|
10175
|
+
|
|
10164
10176
|
item.treeList.labelPadding = $('<span>').css({
|
|
10165
10177
|
display: "inline-block",
|
|
10166
10178
|
"flex-shrink": 0,
|
|
@@ -12084,6 +12096,8 @@ RED.tabs = (function() {
|
|
|
12084
12096
|
menuOptions = options.menu()
|
|
12085
12097
|
} else if (Array.isArray(options.menu)) {
|
|
12086
12098
|
menuOptions = options.menu;
|
|
12099
|
+
} else if (typeof options.menu === 'function') {
|
|
12100
|
+
menuOptions = options.menu();
|
|
12087
12101
|
}
|
|
12088
12102
|
menu = RED.menu.init({options: menuOptions});
|
|
12089
12103
|
menu.attr("id",options.id+"-menu");
|
|
@@ -12776,15 +12790,18 @@ RED.tabs = (function() {
|
|
|
12776
12790
|
event.preventDefault();
|
|
12777
12791
|
removeTab(tab.id);
|
|
12778
12792
|
});
|
|
12793
|
+
RED.popover.tooltip(closeLink,RED._("workspace.hideFlow"));
|
|
12779
12794
|
}
|
|
12780
12795
|
if (tab.hideable) {
|
|
12781
12796
|
li.addClass("red-ui-tabs-closeable")
|
|
12782
|
-
var closeLink = $("<a/>",{href:"#",class:"red-ui-tab-close"}).appendTo(li);
|
|
12783
|
-
closeLink.append('<i class="fa fa-
|
|
12797
|
+
var closeLink = $("<a/>",{href:"#",class:"red-ui-tab-close red-ui-tab-hide"}).appendTo(li);
|
|
12798
|
+
closeLink.append('<i class="fa fa-eye" />');
|
|
12799
|
+
closeLink.append('<i class="fa fa-eye-slash" />');
|
|
12784
12800
|
closeLink.on("click",function(event) {
|
|
12785
12801
|
event.preventDefault();
|
|
12786
12802
|
hideTab(tab.id);
|
|
12787
12803
|
});
|
|
12804
|
+
RED.popover.tooltip(closeLink,RED._("workspace.hideFlow"));
|
|
12788
12805
|
}
|
|
12789
12806
|
|
|
12790
12807
|
var badges = $('<span class="red-ui-tabs-badges"></span>').appendTo(li);
|
|
@@ -12793,7 +12810,8 @@ RED.tabs = (function() {
|
|
|
12793
12810
|
$('<i class="red-ui-tabs-badge-selected fa fa-check-circle"></i>').appendTo(badges);
|
|
12794
12811
|
}
|
|
12795
12812
|
|
|
12796
|
-
link.attr("title",tab.label);
|
|
12813
|
+
// link.attr("title",tab.label);
|
|
12814
|
+
RED.popover.tooltip(link,function() { return tab.label})
|
|
12797
12815
|
|
|
12798
12816
|
if (options.onadd) {
|
|
12799
12817
|
options.onadd(tab);
|
|
@@ -12912,7 +12930,6 @@ RED.tabs = (function() {
|
|
|
12912
12930
|
renameTab: function(id,label) {
|
|
12913
12931
|
tabs[id].label = label;
|
|
12914
12932
|
var tab = ul.find("a[href='#"+id+"']");
|
|
12915
|
-
tab.attr("title",label);
|
|
12916
12933
|
tab.find("span.red-ui-text-bidi-aware").text(label).attr('dir', RED.text.bidi.resolveBaseTextDir(label));
|
|
12917
12934
|
updateTabWidths();
|
|
12918
12935
|
},
|
|
@@ -13716,7 +13733,7 @@ RED.stack = (function() {
|
|
|
13716
13733
|
this.optionExpandButton = $('<button tabindex="0" class="red-ui-typedInput-option-expand" style="display:inline-block"></button>').appendTo(this.uiSelect);
|
|
13717
13734
|
this.optionExpandButtonIcon = $('<i class="red-ui-typedInput-icon fa fa-ellipsis-h"></i>').appendTo(this.optionExpandButton);
|
|
13718
13735
|
|
|
13719
|
-
this.type(this.options.default||this.typeList[0].value);
|
|
13736
|
+
this.type(this.typeField.val() || this.options.default||this.typeList[0].value);
|
|
13720
13737
|
this.typeChanged = !!this.options.default;
|
|
13721
13738
|
}catch(err) {
|
|
13722
13739
|
console.log(err.stack);
|
|
@@ -13965,6 +13982,7 @@ RED.stack = (function() {
|
|
|
13965
13982
|
var that = this;
|
|
13966
13983
|
var currentType = this.type();
|
|
13967
13984
|
this.typeMap = {};
|
|
13985
|
+
var firstCall = (this.typeList === undefined);
|
|
13968
13986
|
this.typeList = types.map(function(opt) {
|
|
13969
13987
|
var result;
|
|
13970
13988
|
if (typeof opt === 'string') {
|
|
@@ -13989,10 +14007,14 @@ RED.stack = (function() {
|
|
|
13989
14007
|
}
|
|
13990
14008
|
this.menu = this._createMenu(this.typeList,{},function(v) { that.type(v) });
|
|
13991
14009
|
if (currentType && !this.typeMap.hasOwnProperty(currentType)) {
|
|
13992
|
-
|
|
14010
|
+
if (!firstCall) {
|
|
14011
|
+
this.type(this.typeList[0].value);
|
|
14012
|
+
}
|
|
13993
14013
|
} else {
|
|
13994
14014
|
this.propertyType = null;
|
|
13995
|
-
|
|
14015
|
+
if (!firstCall) {
|
|
14016
|
+
this.type(currentType);
|
|
14017
|
+
}
|
|
13996
14018
|
}
|
|
13997
14019
|
if (this.typeList.length === 1 && !this.typeList[0].icon && (!this.typeList[0].label || this.typeList[0].showLabel === false)) {
|
|
13998
14020
|
this.selectTrigger.hide()
|
|
@@ -14544,7 +14566,7 @@ RED.stack = (function() {
|
|
|
14544
14566
|
* value: String : the value to insert if selected
|
|
14545
14567
|
* label: String|DOM Element : the label to display in the dropdown.
|
|
14546
14568
|
* }
|
|
14547
|
-
*
|
|
14569
|
+
*
|
|
14548
14570
|
*/
|
|
14549
14571
|
|
|
14550
14572
|
$.widget( "nodered.autoComplete", {
|
|
@@ -14585,7 +14607,7 @@ RED.stack = (function() {
|
|
|
14585
14607
|
maxHeight: 200,
|
|
14586
14608
|
class: "red-ui-autoComplete-container",
|
|
14587
14609
|
options: completions,
|
|
14588
|
-
onselect: (opt) => { this.element.val(opt.value); this.element.focus() },
|
|
14610
|
+
onselect: (opt) => { this.element.val(opt.value); this.element.focus(); this.element.trigger("change") },
|
|
14589
14611
|
onclose: () => { this.completionMenuShown = false; delete this.menu; this.element.focus()}
|
|
14590
14612
|
});
|
|
14591
14613
|
this.menu.show({
|
|
@@ -15762,6 +15784,8 @@ RED.deploy = (function() {
|
|
|
15762
15784
|
color: "#DDAA99",
|
|
15763
15785
|
defaults:{name:{value:""}}
|
|
15764
15786
|
}
|
|
15787
|
+
} else if (node.type === "group") {
|
|
15788
|
+
def = RED.group.def;
|
|
15765
15789
|
} else {
|
|
15766
15790
|
def = {};
|
|
15767
15791
|
}
|
|
@@ -15971,16 +15995,15 @@ RED.deploy = (function() {
|
|
|
15971
15995
|
}
|
|
15972
15996
|
}
|
|
15973
15997
|
|
|
15974
|
-
|
|
15975
15998
|
if (node.hasOwnProperty('x')) {
|
|
15976
15999
|
if (localNode) {
|
|
15977
|
-
if (localNode.x !== node.x || localNode.y !== node.y) {
|
|
16000
|
+
if (localNode.x !== node.x || localNode.y !== node.y || localNode.w !== node.w || localNode.h !== node.h ) {
|
|
15978
16001
|
localChanged = true;
|
|
15979
16002
|
localChanges++;
|
|
15980
16003
|
}
|
|
15981
16004
|
}
|
|
15982
16005
|
if (remoteNode) {
|
|
15983
|
-
if (remoteNode.x !== node.x || remoteNode.y !== node.y) {
|
|
16006
|
+
if (remoteNode.x !== node.x || remoteNode.y !== node.y|| remoteNode.w !== node.w || remoteNode.h !== node.h) {
|
|
15984
16007
|
remoteChanged = true;
|
|
15985
16008
|
remoteChanges++;
|
|
15986
16009
|
}
|
|
@@ -15998,7 +16021,12 @@ RED.deploy = (function() {
|
|
|
15998
16021
|
localCell.addClass("red-ui-diff-status-"+(localChanged?"changed":"unchanged"));
|
|
15999
16022
|
$('<span class="red-ui-diff-status">'+(localChanged?'<i class="fa fa-square"></i>':'')+'</span>').appendTo(localCell);
|
|
16000
16023
|
element = $('<span class="red-ui-diff-list-element"></span>').appendTo(localCell);
|
|
16001
|
-
|
|
16024
|
+
var localPosition = {x:localNode.x,y:localNode.y};
|
|
16025
|
+
if (localNode.hasOwnProperty('w')) {
|
|
16026
|
+
localPosition.w = localNode.w;
|
|
16027
|
+
localPosition.h = localNode.h;
|
|
16028
|
+
}
|
|
16029
|
+
propertyElements['local.position'] = RED.utils.createObjectElement(localPosition,
|
|
16002
16030
|
{
|
|
16003
16031
|
path: "position",
|
|
16004
16032
|
exposeApi: true,
|
|
@@ -16019,7 +16047,12 @@ RED.deploy = (function() {
|
|
|
16019
16047
|
if (remoteNode) {
|
|
16020
16048
|
$('<span class="red-ui-diff-status">'+(remoteChanged?'<i class="fa fa-square"></i>':'')+'</span>').appendTo(remoteCell);
|
|
16021
16049
|
element = $('<span class="red-ui-diff-list-element"></span>').appendTo(remoteCell);
|
|
16022
|
-
|
|
16050
|
+
var remotePosition = {x:remoteNode.x,y:remoteNode.y};
|
|
16051
|
+
if (remoteNode.hasOwnProperty('w')) {
|
|
16052
|
+
remotePosition.w = remoteNode.w;
|
|
16053
|
+
remotePosition.h = remoteNode.h;
|
|
16054
|
+
}
|
|
16055
|
+
propertyElements['remote.position'] = RED.utils.createObjectElement(remotePosition,
|
|
16023
16056
|
{
|
|
16024
16057
|
path: "position",
|
|
16025
16058
|
exposeApi: true,
|
|
@@ -16091,11 +16124,11 @@ RED.deploy = (function() {
|
|
|
16091
16124
|
}
|
|
16092
16125
|
}
|
|
16093
16126
|
}
|
|
16094
|
-
var properties = Object.keys(node).filter(function(p) { return p!='inputLabels'&&p!='outputLabels'&&p!='z'&&p!='wires'&&p!=='x'&&p!=='y'&&p!=='id'&&p!=='type'&&(!def.defaults||!def.defaults.hasOwnProperty(p))});
|
|
16127
|
+
var properties = Object.keys(node).filter(function(p) { return p!='inputLabels'&&p!='outputLabels'&&p!='z'&&p!='wires'&&p!=='x'&&p!=='y'&&p!=='w'&&p!=='h'&&p!=='id'&&p!=='type'&&(!def.defaults||!def.defaults.hasOwnProperty(p))});
|
|
16095
16128
|
if (def.defaults) {
|
|
16096
16129
|
properties = properties.concat(Object.keys(def.defaults));
|
|
16097
16130
|
}
|
|
16098
|
-
if (node.type !== 'tab') {
|
|
16131
|
+
if (node.type !== 'tab' && node.type !== "group") {
|
|
16099
16132
|
properties = properties.concat(['inputLabels','outputLabels']);
|
|
16100
16133
|
}
|
|
16101
16134
|
if ( ((localNode && localNode.hasOwnProperty('icon')) || (remoteNode && remoteNode.hasOwnProperty('icon'))) &&
|
|
@@ -18348,55 +18381,64 @@ RED.workspaces = (function() {
|
|
|
18348
18381
|
scrollable: true,
|
|
18349
18382
|
addButton: "core:add-flow",
|
|
18350
18383
|
addButtonCaption: RED._("workspace.addFlow"),
|
|
18351
|
-
menu:
|
|
18352
|
-
|
|
18353
|
-
|
|
18354
|
-
|
|
18355
|
-
|
|
18356
|
-
|
|
18357
|
-
|
|
18358
|
-
|
|
18359
|
-
|
|
18360
|
-
|
|
18361
|
-
|
|
18362
|
-
|
|
18363
|
-
|
|
18364
|
-
|
|
18365
|
-
|
|
18366
|
-
|
|
18367
|
-
|
|
18368
|
-
|
|
18369
|
-
|
|
18370
|
-
|
|
18371
|
-
|
|
18372
|
-
|
|
18373
|
-
|
|
18374
|
-
|
|
18375
|
-
|
|
18376
|
-
|
|
18377
|
-
|
|
18378
|
-
|
|
18379
|
-
|
|
18380
|
-
|
|
18381
|
-
|
|
18382
|
-
|
|
18383
|
-
|
|
18384
|
-
|
|
18385
|
-
|
|
18386
|
-
|
|
18387
|
-
|
|
18388
|
-
|
|
18389
|
-
|
|
18390
|
-
|
|
18391
|
-
|
|
18392
|
-
|
|
18393
|
-
|
|
18394
|
-
|
|
18395
|
-
|
|
18396
|
-
|
|
18397
|
-
|
|
18384
|
+
menu: function() {
|
|
18385
|
+
var menuItems = [
|
|
18386
|
+
{
|
|
18387
|
+
id:"red-ui-tabs-menu-option-search-flows",
|
|
18388
|
+
label: RED._("workspace.listFlows"),
|
|
18389
|
+
onselect: "core:list-flows"
|
|
18390
|
+
},
|
|
18391
|
+
{
|
|
18392
|
+
id:"red-ui-tabs-menu-option-search-subflows",
|
|
18393
|
+
label: RED._("workspace.listSubflows"),
|
|
18394
|
+
onselect: "core:list-subflows"
|
|
18395
|
+
},
|
|
18396
|
+
null,
|
|
18397
|
+
{
|
|
18398
|
+
id:"red-ui-tabs-menu-option-add-flow",
|
|
18399
|
+
label: RED._("workspace.addFlow"),
|
|
18400
|
+
onselect: "core:add-flow"
|
|
18401
|
+
},
|
|
18402
|
+
{
|
|
18403
|
+
id:"red-ui-tabs-menu-option-add-flow-right",
|
|
18404
|
+
label: RED._("workspace.addFlowToRight"),
|
|
18405
|
+
onselect: "core:add-flow-to-right"
|
|
18406
|
+
},
|
|
18407
|
+
null,
|
|
18408
|
+
{
|
|
18409
|
+
id:"red-ui-tabs-menu-option-add-hide-flows",
|
|
18410
|
+
label: RED._("workspace.hideFlow"),
|
|
18411
|
+
onselect: "core:hide-flow"
|
|
18412
|
+
},
|
|
18413
|
+
{
|
|
18414
|
+
id:"red-ui-tabs-menu-option-add-hide-other-flows",
|
|
18415
|
+
label: RED._("workspace.hideOtherFlows"),
|
|
18416
|
+
onselect: "core:hide-other-flows"
|
|
18417
|
+
},
|
|
18418
|
+
{
|
|
18419
|
+
id:"red-ui-tabs-menu-option-add-show-all-flows",
|
|
18420
|
+
label: RED._("workspace.showAllFlows"),
|
|
18421
|
+
onselect: "core:show-all-flows"
|
|
18422
|
+
},
|
|
18423
|
+
{
|
|
18424
|
+
id:"red-ui-tabs-menu-option-add-hide-all-flows",
|
|
18425
|
+
label: RED._("workspace.hideAllFlows"),
|
|
18426
|
+
onselect: "core:hide-all-flows"
|
|
18427
|
+
},
|
|
18428
|
+
{
|
|
18429
|
+
id:"red-ui-tabs-menu-option-add-show-last-flow",
|
|
18430
|
+
label: RED._("workspace.showLastHiddenFlow"),
|
|
18431
|
+
onselect: "core:show-last-hidden-flow"
|
|
18432
|
+
}
|
|
18433
|
+
]
|
|
18434
|
+
if (hideStack.length > 0) {
|
|
18435
|
+
menuItems.unshift({
|
|
18436
|
+
label: RED._("workspace.hiddenFlows",{count: hideStack.length}),
|
|
18437
|
+
onselect: "core:list-hidden-flows"
|
|
18438
|
+
})
|
|
18398
18439
|
}
|
|
18399
|
-
|
|
18440
|
+
return menuItems;
|
|
18441
|
+
}
|
|
18400
18442
|
});
|
|
18401
18443
|
workspaceTabCount = 0;
|
|
18402
18444
|
}
|
|
@@ -18536,7 +18578,9 @@ RED.workspaces = (function() {
|
|
|
18536
18578
|
}
|
|
18537
18579
|
}
|
|
18538
18580
|
})
|
|
18539
|
-
|
|
18581
|
+
RED.actions.add("core:list-hidden-flows",function() {
|
|
18582
|
+
RED.actions.invoke("core:search","is:hidden ");
|
|
18583
|
+
})
|
|
18540
18584
|
RED.actions.add("core:list-flows",function() {
|
|
18541
18585
|
RED.actions.invoke("core:search","type:tab ");
|
|
18542
18586
|
})
|
|
@@ -18580,7 +18624,7 @@ RED.workspaces = (function() {
|
|
|
18580
18624
|
var changes = { disabled: workspace.disabled };
|
|
18581
18625
|
workspace.disabled = disabled;
|
|
18582
18626
|
$("#red-ui-tab-"+(workspace.id.replace(".","-"))).toggleClass('red-ui-workspace-disabled',!!workspace.disabled);
|
|
18583
|
-
if (id || activeWorkspace) {
|
|
18627
|
+
if (!id || (id === activeWorkspace)) {
|
|
18584
18628
|
$("#red-ui-workspace").toggleClass("red-ui-workspace-disabled",!!workspace.disabled);
|
|
18585
18629
|
}
|
|
18586
18630
|
var historyEvent = {
|
|
@@ -18666,6 +18710,9 @@ RED.workspaces = (function() {
|
|
|
18666
18710
|
RED.settings.setLocal("hiddenTabs",JSON.stringify(hiddenTabs));
|
|
18667
18711
|
}
|
|
18668
18712
|
},
|
|
18713
|
+
isHidden: function(id) {
|
|
18714
|
+
return hideStack.includes(id)
|
|
18715
|
+
},
|
|
18669
18716
|
show: function(id,skipStack,unhideOnly) {
|
|
18670
18717
|
if (!workspace_tabs.contains(id)) {
|
|
18671
18718
|
var sf = RED.nodes.subflow(id);
|
|
@@ -22438,7 +22485,11 @@ RED.view = (function() {
|
|
|
22438
22485
|
nodeEl = document.getElementById(d.id);
|
|
22439
22486
|
}
|
|
22440
22487
|
if (nodeEl) {
|
|
22441
|
-
|
|
22488
|
+
// Do not show node status if:
|
|
22489
|
+
// - global flag set
|
|
22490
|
+
// - node has no status
|
|
22491
|
+
// - node is disabled
|
|
22492
|
+
if (!showStatus || !d.status || d.d === true) {
|
|
22442
22493
|
nodeEl.__statusGroup__.style.display = "none";
|
|
22443
22494
|
} else {
|
|
22444
22495
|
nodeEl.__statusGroup__.style.display = "inline";
|
|
@@ -23184,6 +23235,9 @@ RED.view = (function() {
|
|
|
23184
23235
|
n.selected = true;
|
|
23185
23236
|
n.dirty = true;
|
|
23186
23237
|
movingSet.add(n);
|
|
23238
|
+
if (targets.length === 1) {
|
|
23239
|
+
RED.view.reveal(n.id);
|
|
23240
|
+
}
|
|
23187
23241
|
});
|
|
23188
23242
|
updateSelection();
|
|
23189
23243
|
redraw();
|
|
@@ -23792,6 +23846,7 @@ RED.view = (function() {
|
|
|
23792
23846
|
delete node.d;
|
|
23793
23847
|
}
|
|
23794
23848
|
node.dirty = true;
|
|
23849
|
+
node.dirtyStatus = true;
|
|
23795
23850
|
node.changed = true;
|
|
23796
23851
|
RED.events.emit("nodes:change",node);
|
|
23797
23852
|
}
|
|
@@ -26954,6 +27009,7 @@ RED.sidebar.info = (function() {
|
|
|
26954
27009
|
n.d = true;
|
|
26955
27010
|
}
|
|
26956
27011
|
n.dirty = true;
|
|
27012
|
+
n.dirtyStatus = true;
|
|
26957
27013
|
n.changed = true;
|
|
26958
27014
|
RED.events.emit("nodes:change",n);
|
|
26959
27015
|
groupHistoryEvent.events.push(historyEvent);
|
|
@@ -26982,6 +27038,7 @@ RED.sidebar.info = (function() {
|
|
|
26982
27038
|
n.d = true;
|
|
26983
27039
|
}
|
|
26984
27040
|
n.dirty = true;
|
|
27041
|
+
n.dirtyStatus = true;
|
|
26985
27042
|
n.changed = true;
|
|
26986
27043
|
RED.events.emit("nodes:change",n);
|
|
26987
27044
|
RED.history.push(historyEvent);
|
|
@@ -27051,6 +27108,7 @@ RED.sidebar.info = (function() {
|
|
|
27051
27108
|
{label:RED._("sidebar.info.search.invalidNodes"), value: "is:invalid"},
|
|
27052
27109
|
{label:RED._("sidebar.info.search.uknownNodes"), value: "type:unknown"},
|
|
27053
27110
|
{label:RED._("sidebar.info.search.unusedSubflows"), value:"is:subflow is:unused"},
|
|
27111
|
+
{label:RED._("sidebar.info.search.hiddenFlows"), value:"is:hidden"},
|
|
27054
27112
|
]
|
|
27055
27113
|
});
|
|
27056
27114
|
|
|
@@ -27342,7 +27400,7 @@ RED.sidebar.info = (function() {
|
|
|
27342
27400
|
}
|
|
27343
27401
|
}
|
|
27344
27402
|
function getGutter(n) {
|
|
27345
|
-
var span = $("<span>",{class:"red-ui-info-outline-gutter"});
|
|
27403
|
+
var span = $("<span>",{class:"red-ui-info-outline-gutter red-ui-treeList-gutter-float"});
|
|
27346
27404
|
var revealButton = $('<button type="button" class="red-ui-info-outline-item-control-reveal red-ui-button red-ui-button-small"><i class="fa fa-search"></i></button>').appendTo(span).on("click",function(evt) {
|
|
27347
27405
|
evt.preventDefault();
|
|
27348
27406
|
evt.stopPropagation();
|
|
@@ -27843,7 +27901,7 @@ RED.sidebar.help = (function() {
|
|
|
27843
27901
|
var currentVersionParts = RED.settings.version.split(".");
|
|
27844
27902
|
var tourVersionParts = tour.version.split(".");
|
|
27845
27903
|
if (tourVersionParts[0] === currentVersionParts[0] && tourVersionParts[1] === currentVersionParts[1]) {
|
|
27846
|
-
tourHeader = '<div><button type="button" onclick="RED.actions.invoke(\'core:show-welcome-tour\')" class="red-ui-button">
|
|
27904
|
+
tourHeader = '<div><button type="button" onclick="RED.actions.invoke(\'core:show-welcome-tour\')" class="red-ui-button">' + RED._("tourGuide.takeATour") + '</button></div>';
|
|
27847
27905
|
}
|
|
27848
27906
|
}
|
|
27849
27907
|
var aboutHeader = '<div style="text-align:center;">'+tourHeader+'</div>'
|
|
@@ -30624,7 +30682,16 @@ RED.editor = (function() {
|
|
|
30624
30682
|
delete cn.__label__;
|
|
30625
30683
|
});
|
|
30626
30684
|
|
|
30627
|
-
|
|
30685
|
+
var label = type;
|
|
30686
|
+
if (typeof node_def.paletteLabel !== "undefined") {
|
|
30687
|
+
try {
|
|
30688
|
+
label = RED.utils.sanitize((typeof node_def.paletteLabel === "function" ? node_def.paletteLabel.call(node_def) : node_def.paletteLabel)||type);
|
|
30689
|
+
} catch(err) {
|
|
30690
|
+
console.log("Definition error: "+type+".paletteLabel",err);
|
|
30691
|
+
}
|
|
30692
|
+
}
|
|
30693
|
+
|
|
30694
|
+
select.append('<option value="_ADD_"'+(value===""?" selected":"")+'>'+RED._("editor.addNewType", {type:label})+'</option>');
|
|
30628
30695
|
window.setTimeout(function() { select.trigger("change");},50);
|
|
30629
30696
|
}
|
|
30630
30697
|
}
|
|
@@ -32463,8 +32530,12 @@ RED.editor = (function() {
|
|
|
32463
32530
|
});
|
|
32464
32531
|
}
|
|
32465
32532
|
if (!isSameObj(old_env, new_env)) {
|
|
32466
|
-
node.env = new_env;
|
|
32467
32533
|
editState.changes.env = node.env;
|
|
32534
|
+
if (new_env.length === 0) {
|
|
32535
|
+
delete node.env;
|
|
32536
|
+
} else {
|
|
32537
|
+
node.env = new_env;
|
|
32538
|
+
}
|
|
32468
32539
|
editState.changed = true;
|
|
32469
32540
|
}
|
|
32470
32541
|
}
|
|
@@ -40131,6 +40202,7 @@ RED.search = (function() {
|
|
|
40131
40202
|
val = extractFlag(val,"unused",flags);
|
|
40132
40203
|
val = extractFlag(val,"config",flags);
|
|
40133
40204
|
val = extractFlag(val,"subflow",flags);
|
|
40205
|
+
val = extractFlag(val,"hidden",flags);
|
|
40134
40206
|
// uses:<node-id>
|
|
40135
40207
|
val = extractValue(val,"uses",flags);
|
|
40136
40208
|
|
|
@@ -40176,7 +40248,15 @@ RED.search = (function() {
|
|
|
40176
40248
|
continue;
|
|
40177
40249
|
}
|
|
40178
40250
|
}
|
|
40179
|
-
|
|
40251
|
+
if (flags.hasOwnProperty("hidden")) {
|
|
40252
|
+
// Only tabs can be hidden
|
|
40253
|
+
if (node.node.type !== 'tab') {
|
|
40254
|
+
continue
|
|
40255
|
+
}
|
|
40256
|
+
if (!RED.workspaces.isHidden(node.node.id)) {
|
|
40257
|
+
continue
|
|
40258
|
+
}
|
|
40259
|
+
}
|
|
40180
40260
|
if (flags.hasOwnProperty("unused")) {
|
|
40181
40261
|
var isUnused = (node.node.type === 'subflow' && node.node.instances.length === 0) ||
|
|
40182
40262
|
(isConfigNode && node.node.users.length === 0)
|
|
@@ -49940,6 +50020,8 @@ RED.touch.radialMenu = (function() {
|
|
|
49940
50020
|
if (step.fallback) {
|
|
49941
50021
|
focus.one("mouseenter", function(evt) {
|
|
49942
50022
|
setTimeout(function() {
|
|
50023
|
+
var pos = targetElement[0].getBoundingClientRect();
|
|
50024
|
+
var dimension = Math.max(50, Math.max(pos.width,pos.height)*1.5);
|
|
49943
50025
|
focus.css({
|
|
49944
50026
|
width: (4*dimension)+"px",
|
|
49945
50027
|
height: (4*dimension)+"px"
|