@node-red/editor-client 3.0.0 → 3.0.1
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/package.json +1 -1
- package/public/red/about +14 -0
- package/public/red/red.js +33 -26
- package/public/red/red.min.js +2 -2
package/package.json
CHANGED
package/public/red/about
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
#### 3.0.1: Maintenance Release
|
|
2
|
+
|
|
3
|
+
Editor
|
|
4
|
+
|
|
5
|
+
- Allow codeEditor theme to be set even if `codeEditor` is not set in settings.js (#3794) @Steve-Mcl
|
|
6
|
+
- Sys info (diagnostics report) amendments (#3793) @Steve-Mcl
|
|
7
|
+
- Allow `mode` and `title` to be omitted in `options` argument for `createEditor` (#3791) @Steve-Mcl
|
|
8
|
+
- Fix focus issues (#3789) @Steve-Mcl
|
|
9
|
+
- Ensure all typedInput buttons have button type set (#3788) @knolleary
|
|
10
|
+
- Do not flag hasUsers=false nodes as unused in search (#3787) @knolleary
|
|
11
|
+
- Properly position quick-add dialog in all cases (#3786) @knolleary
|
|
12
|
+
- Ensure quick-add dialog does not obscure ghost node when shifted (#3785) @knolleary
|
|
13
|
+
- Remove use of Object.hasOwn (#3784) @knolleary
|
|
14
|
+
|
|
1
15
|
#### 3.0.0: Milestone Release
|
|
2
16
|
|
|
3
17
|
Editor
|
package/public/red/red.js
CHANGED
|
@@ -857,7 +857,7 @@ var RED = (function() {
|
|
|
857
857
|
$('<div id="red-ui-header-shade" class="hide"></div>').appendTo(header);
|
|
858
858
|
$('<div id="red-ui-main-container" class="red-ui-sidebar-closed hide">'+
|
|
859
859
|
'<div id="red-ui-workspace"></div>'+
|
|
860
|
-
'<div id="red-ui-editor-stack"></div>'+
|
|
860
|
+
'<div id="red-ui-editor-stack" tabindex="-1"></div>'+
|
|
861
861
|
'<div id="red-ui-palette"></div>'+
|
|
862
862
|
'<div id="red-ui-sidebar"></div>'+
|
|
863
863
|
'<div id="red-ui-sidebar-separator"></div>'+
|
|
@@ -13841,10 +13841,10 @@ RED.stack = (function() {
|
|
|
13841
13841
|
optEl.append(generateSpans(srcMatch));
|
|
13842
13842
|
optEl.appendTo(element);
|
|
13843
13843
|
}
|
|
13844
|
-
matches.push({
|
|
13845
|
-
value: optVal,
|
|
13846
|
-
label: element,
|
|
13847
|
-
i: (valMatch.found ? valMatch.index : srcMatch.index)
|
|
13844
|
+
matches.push({
|
|
13845
|
+
value: optVal,
|
|
13846
|
+
label: element,
|
|
13847
|
+
i: (valMatch.found ? valMatch.index : srcMatch.index)
|
|
13848
13848
|
});
|
|
13849
13849
|
}
|
|
13850
13850
|
})
|
|
@@ -14252,7 +14252,7 @@ RED.stack = (function() {
|
|
|
14252
14252
|
this.options.types = this.options.types||Object.keys(allOptions);
|
|
14253
14253
|
}
|
|
14254
14254
|
|
|
14255
|
-
this.selectTrigger = $('<button class="red-ui-typedInput-type-select" tabindex="0"></button>').prependTo(this.uiSelect);
|
|
14255
|
+
this.selectTrigger = $('<button type="button" class="red-ui-typedInput-type-select" tabindex="0"></button>').prependTo(this.uiSelect);
|
|
14256
14256
|
$('<i class="red-ui-typedInput-icon fa fa-caret-down"></i>').toggle(this.options.types.length > 1).appendTo(this.selectTrigger);
|
|
14257
14257
|
|
|
14258
14258
|
this.selectLabel = $('<span class="red-ui-typedInput-type-label"></span>').appendTo(this.selectTrigger);
|
|
@@ -14321,7 +14321,7 @@ RED.stack = (function() {
|
|
|
14321
14321
|
})
|
|
14322
14322
|
|
|
14323
14323
|
// explicitly set optionSelectTrigger display to inline-block otherwise jQ sets it to 'inline'
|
|
14324
|
-
this.optionSelectTrigger = $('<button tabindex="0" class="red-ui-typedInput-option-trigger" style="display:inline-block"><span class="red-ui-typedInput-option-caret"><i class="red-ui-typedInput-icon fa fa-caret-down"></i></span></button>').appendTo(this.uiSelect);
|
|
14324
|
+
this.optionSelectTrigger = $('<button type="button" tabindex="0" class="red-ui-typedInput-option-trigger" style="display:inline-block"><span class="red-ui-typedInput-option-caret"><i class="red-ui-typedInput-icon fa fa-caret-down"></i></span></button>').appendTo(this.uiSelect);
|
|
14325
14325
|
this.optionSelectLabel = $('<span class="red-ui-typedInput-option-label"></span>').prependTo(this.optionSelectTrigger);
|
|
14326
14326
|
// RED.popover.tooltip(this.optionSelectLabel,function() {
|
|
14327
14327
|
// return that.optionValue;
|
|
@@ -14342,7 +14342,7 @@ RED.stack = (function() {
|
|
|
14342
14342
|
that.uiSelect.addClass('red-ui-typedInput-focus');
|
|
14343
14343
|
});
|
|
14344
14344
|
|
|
14345
|
-
this.optionExpandButton = $('<button tabindex="0" class="red-ui-typedInput-option-expand" style="display:inline-block"></button>').appendTo(this.uiSelect);
|
|
14345
|
+
this.optionExpandButton = $('<button type="button" tabindex="0" class="red-ui-typedInput-option-expand" style="display:inline-block"></button>').appendTo(this.uiSelect);
|
|
14346
14346
|
this.optionExpandButtonIcon = $('<i class="red-ui-typedInput-icon fa fa-ellipsis-h"></i>').appendTo(this.optionExpandButton);
|
|
14347
14347
|
|
|
14348
14348
|
this.type(this.typeField.val() || this.options.default||this.typeList[0].value);
|
|
@@ -20761,12 +20761,15 @@ RED.view = (function() {
|
|
|
20761
20761
|
RED.view.redraw();
|
|
20762
20762
|
}
|
|
20763
20763
|
|
|
20764
|
+
// `point` is the place in the workspace the mouse has clicked.
|
|
20765
|
+
// This takes into account scrolling and scaling of the workspace.
|
|
20764
20766
|
var ox = point[0];
|
|
20765
20767
|
var oy = point[1];
|
|
20766
20768
|
|
|
20769
|
+
// Need to map that to browser location to position the pop-up
|
|
20767
20770
|
const offset = $("#red-ui-workspace-chart").offset()
|
|
20768
|
-
var clientX = ox + offset.left - $("#red-ui-workspace-chart").scrollLeft()
|
|
20769
|
-
var clientY = oy + offset.top - $("#red-ui-workspace-chart").scrollTop()
|
|
20771
|
+
var clientX = (ox * scaleFactor) + offset.left - $("#red-ui-workspace-chart").scrollLeft()
|
|
20772
|
+
var clientY = (oy * scaleFactor) + offset.top - $("#red-ui-workspace-chart").scrollTop()
|
|
20770
20773
|
|
|
20771
20774
|
if (RED.settings.get("editor").view['view-snap-grid']) {
|
|
20772
20775
|
// eventLayer.append("circle").attr("cx",point[0]).attr("cy",point[1]).attr("r","2").attr('fill','red')
|
|
@@ -24596,7 +24599,7 @@ RED.view = (function() {
|
|
|
24596
24599
|
if (d._def.button) {
|
|
24597
24600
|
var buttonEnabled = isButtonEnabled(d);
|
|
24598
24601
|
this.__buttonGroup__.classList.toggle("red-ui-flow-node-button-disabled", !buttonEnabled);
|
|
24599
|
-
if (RED.runtime &&
|
|
24602
|
+
if (RED.runtime && RED.runtime.started !== undefined) {
|
|
24600
24603
|
this.__buttonGroup__.classList.toggle("red-ui-flow-node-button-stopped", !RED.runtime.started);
|
|
24601
24604
|
}
|
|
24602
24605
|
|
|
@@ -33369,6 +33372,10 @@ RED.editor = (function() {
|
|
|
33369
33372
|
if (editing_node) {
|
|
33370
33373
|
RED.sidebar.info.refresh(editing_node);
|
|
33371
33374
|
RED.sidebar.help.show(editing_node.type, false);
|
|
33375
|
+
//ensure focused element is NOT body (for keyboard scope to operate correctly)
|
|
33376
|
+
if (document.activeElement.tagName === 'BODY') {
|
|
33377
|
+
$('#red-ui-editor-stack').trigger('focus')
|
|
33378
|
+
}
|
|
33372
33379
|
}
|
|
33373
33380
|
}
|
|
33374
33381
|
}
|
|
@@ -39099,7 +39106,7 @@ RED.editor.codeEditor.monaco = (function() {
|
|
|
39099
39106
|
|
|
39100
39107
|
|
|
39101
39108
|
if(!options.stateId && options.stateId !== false) {
|
|
39102
|
-
options.stateId = RED.editor.generateViewStateId("monaco", options, (options.mode || options.title).split("/").pop());
|
|
39109
|
+
options.stateId = RED.editor.generateViewStateId("monaco", options, (options.mode || options.title || "").split("/").pop());
|
|
39103
39110
|
}
|
|
39104
39111
|
var el = options.element || $("#"+options.id)[0];
|
|
39105
39112
|
var toolbarRow = $("<div>").appendTo(el);
|
|
@@ -42951,7 +42958,7 @@ RED.search = (function() {
|
|
|
42951
42958
|
}
|
|
42952
42959
|
if (flags.hasOwnProperty("unused")) {
|
|
42953
42960
|
var isUnused = (node.node.type === 'subflow' && node.node.instances.length === 0) ||
|
|
42954
|
-
(isConfigNode && node.node.users.length === 0)
|
|
42961
|
+
(isConfigNode && node.node.users.length === 0 && node.node._def.hasUsers !== false)
|
|
42955
42962
|
if (flags.unused !== isUnused) {
|
|
42956
42963
|
continue;
|
|
42957
42964
|
}
|
|
@@ -43302,7 +43309,7 @@ RED.search = (function() {
|
|
|
43302
43309
|
$(previousActiveElement).trigger("focus");
|
|
43303
43310
|
}
|
|
43304
43311
|
previousActiveElement = null;
|
|
43305
|
-
}
|
|
43312
|
+
}
|
|
43306
43313
|
if(!keepSearchToolbar) {
|
|
43307
43314
|
clearActiveSearch();
|
|
43308
43315
|
}
|
|
@@ -43394,7 +43401,7 @@ RED.search = (function() {
|
|
|
43394
43401
|
$("#red-ui-sidebar-shade").on('mousedown',hide);
|
|
43395
43402
|
|
|
43396
43403
|
$("#red-ui-view-searchtools-close").on("click", function close() {
|
|
43397
|
-
clearActiveSearch();
|
|
43404
|
+
clearActiveSearch();
|
|
43398
43405
|
updateSearchToolbar();
|
|
43399
43406
|
});
|
|
43400
43407
|
$("#red-ui-view-searchtools-close").trigger("click");
|
|
@@ -43474,14 +43481,10 @@ RED.search = (function() {
|
|
|
43474
43481
|
const canRemoveFromGroup = hasSelection && !!selection.nodes[0].g
|
|
43475
43482
|
const offset = $("#red-ui-workspace-chart").offset()
|
|
43476
43483
|
|
|
43477
|
-
|
|
43478
|
-
|
|
43479
|
-
|
|
43480
|
-
|
|
43481
|
-
const gridSize = RED.view.gridSize()
|
|
43482
|
-
addX = gridSize * Math.floor(addX / gridSize)
|
|
43483
|
-
addY = gridSize * Math.floor(addY / gridSize)
|
|
43484
|
-
}
|
|
43484
|
+
// addX/addY must be the position in the workspace accounting for both scroll and scale
|
|
43485
|
+
// The +5 is because we display the contextMenu -5,-5 to actual click position
|
|
43486
|
+
let addX = (options.x + 5 - offset.left + $("#red-ui-workspace-chart").scrollLeft()) / RED.view.scale()
|
|
43487
|
+
let addY = (options.y + 5 - offset.top + $("#red-ui-workspace-chart").scrollTop()) / RED.view.scale()
|
|
43485
43488
|
|
|
43486
43489
|
const menuItems = [
|
|
43487
43490
|
{ onselect: 'core:show-action-list', onpostselect: function () { } },
|
|
@@ -43497,6 +43500,10 @@ RED.search = (function() {
|
|
|
43497
43500
|
splice: isSingleLink ? selection.links[0] : undefined,
|
|
43498
43501
|
// spliceMultiple: isMultipleLinks
|
|
43499
43502
|
})
|
|
43503
|
+
},
|
|
43504
|
+
onpostselect: function() {
|
|
43505
|
+
// ensure quick add dialog search input has focus
|
|
43506
|
+
$('#red-ui-type-search-input').trigger('focus')
|
|
43500
43507
|
}
|
|
43501
43508
|
},
|
|
43502
43509
|
(hasLinks) ? { // has least 1 wire selected
|
|
@@ -43574,7 +43581,7 @@ RED.search = (function() {
|
|
|
43574
43581
|
($(window).width() -MENU_WIDTH)) {
|
|
43575
43582
|
direction = "left";
|
|
43576
43583
|
}
|
|
43577
|
-
|
|
43584
|
+
|
|
43578
43585
|
menu = RED.menu.init({
|
|
43579
43586
|
direction: direction,
|
|
43580
43587
|
onpreselect: function() {
|
|
@@ -44134,8 +44141,8 @@ RED.actionList = (function() {
|
|
|
44134
44141
|
moveCallback = opts.move;
|
|
44135
44142
|
RED.events.emit("type-search:open");
|
|
44136
44143
|
//shade.show();
|
|
44137
|
-
if ($("#red-ui-main-container").height() - opts.y -
|
|
44138
|
-
opts.y = opts.y -
|
|
44144
|
+
if ($("#red-ui-main-container").height() - opts.y - 195 < 0) {
|
|
44145
|
+
opts.y = opts.y - 275;
|
|
44139
44146
|
}
|
|
44140
44147
|
dialog.css({left:opts.x+"px",top:opts.y+"px"}).show();
|
|
44141
44148
|
searchResultsDiv.slideDown(300);
|