@node-red/editor-client 3.1.0-beta.4 → 3.1.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node-red/editor-client",
3
- "version": "3.1.0-beta.4",
3
+ "version": "3.1.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
package/public/red/about CHANGED
@@ -1,4 +1,38 @@
1
- #### 3.1.0-beta.4: Beta Release
1
+ #### 3.1.0: Milestone Release
2
+
3
+ Editor
4
+
5
+ - Default filter to All Catalogues and show nodes for small lists (#4318) @knolleary
6
+ - Better distinguish between ctrl and meta keys on mac (#4310) @knolleary
7
+ - Ensure junction appears when filtering quick-add list (#4297) @knolleary
8
+ - Update message catalogs for JSONata Expression editor (#4287) @kazuhitoyokoi
9
+ - Add tooltip to relevance sort button in user settings UI (#4288) @kazuhitoyokoi
10
+ - Capture workspace dirty state when quick-adding junction (#4283) @knolleary
11
+ - Add docs for $clone function (#4284) @knolleary
12
+
13
+ Runtime
14
+
15
+ - Dependency updates (#4317) @knolleary
16
+ - Ensure storage/util.writeFile handles concurrent write attempts (#4316) @knolleary
17
+ - Migrate http -> https for nodered.org (#4313) @Rotzbua
18
+ - Add Node 20 to GH Action test matrix (#4305) @Rotzbua
19
+ - Handle group-scoped nodes inside subflow (#4301) @knolleary
20
+ - Handle non-url-safe chars in context api (#4298) @knolleary
21
+ - Fix git pull operation in project feature (#4290) @kazuhitoyokoi
22
+ - Change linefeed codes in Korean message catalogs (#4286) @kazuhitoyokoi
23
+ - Fix file permissions of message catalogs (#4285) @kazuhitoyokoi
24
+ - Update tour (#4278) @knolleary
25
+
26
+ Nodes
27
+
28
+ - File: Fix handling in file nodes when number is specified as file name (#4267) @kazuhitoyokoi
29
+ - Function: Adding function timeout to settings file (#4265) (#4309) @knolleary
30
+ - Function: Fix function setup tab layout (#4299) @knolleary
31
+ - HTTP Request: Handle 204 in httprequest JSON (#4262) @sammachin
32
+ - JSON: Fix test cases of JSON node (#4275) @kazuhitoyokoi
33
+ - MQTT: Remove unnecessary check for clientid if autoUnsub set (#4302) @knolleary
34
+
35
+ ##### 3.1.0-beta.4: Beta Release
2
36
 
3
37
  Editor
4
38
 
@@ -28,7 +62,7 @@
28
62
  - Fix delay node flush issue (#4203) @dceejay
29
63
  - Update status and catch node labels in group mode (#4207) @Steve-Mcl
30
64
 
31
- #### 3.1.0-beta.3: Beta Release
65
+ ##### 3.1.0-beta.3: Beta Release
32
66
 
33
67
  Editor
34
68
 
@@ -63,7 +97,7 @@ Nodes
63
97
  - MQTT: Option to disable MQTT topic unsubscribe on disconnect (#4078) @flying7eleven
64
98
 
65
99
 
66
- #### 3.1.0-beta.2: Beta Release
100
+ ##### 3.1.0-beta.2: Beta Release
67
101
 
68
102
  Editor
69
103
 
@@ -113,7 +147,7 @@ Nodes
113
147
  - File Out: Fix extra newline append for multipart file write (#3915) @dceejay
114
148
  - Add validators for complete and link call nodes (#4056) @kazuhitoyokoi
115
149
 
116
- #### 3.1.0-beta.1: Beta Release
150
+ ##### 3.1.0-beta.1: Beta Release
117
151
 
118
152
  Editor
119
153
 
package/public/red/red.js CHANGED
@@ -822,7 +822,7 @@ var RED = (function() {
822
822
  }
823
823
  menuOptions.push({id:"menu-item-help",
824
824
  label: RED.settings.theme("menu.menu-item-help.label",RED._("menu.label.help")),
825
- href: RED.settings.theme("menu.menu-item-help.url","http://nodered.org/docs")
825
+ href: RED.settings.theme("menu.menu-item-help.url","https://nodered.org/docs")
826
826
  });
827
827
  menuOptions.push({id:"menu-item-node-red-version", label:"v"+RED.settings.version, onselect: "core:show-about" });
828
828
 
@@ -4493,8 +4493,8 @@ RED.nodes = (function() {
4493
4493
 
4494
4494
  if (node && node._def.onremove) {
4495
4495
  // Deprecated: never documented but used by some early nodes
4496
- console.log("Deprecated API warning: node type ",node.type," has an onremove function - should be oneditremove - please report");
4497
- node._def.onremove.call(n);
4496
+ console.log("Deprecated API warning: node type ",node.type," has an onremove function - should be oneditdelete - please report");
4497
+ node._def.onremove.call(node);
4498
4498
  }
4499
4499
  return {links:removedLinks,nodes:removedNodes};
4500
4500
  }
@@ -17426,9 +17426,10 @@ RED.diagnostics = (function () {
17426
17426
  }
17427
17427
  if (localNode && remoteNode && typeof localNode[d] === "string") {
17428
17428
  if (/\n/.test(localNode[d]) || /\n/.test(remoteNode[d])) {
17429
- $('<button class="red-ui-button red-ui-button-small red-ui-diff-text-diff-button"><i class="fa fa-file-o"> <i class="fa fa-caret-left"></i> <i class="fa fa-caret-right"></i> <i class="fa fa-file-o"></i></button>').on("click", function() {
17429
+ var textDiff = $('<button class="red-ui-button red-ui-button-small red-ui-diff-text-diff-button"><i class="fa fa-file-o"> <i class="fa fa-caret-left"></i> <i class="fa fa-caret-right"></i> <i class="fa fa-file-o"></i></button>').on("click", function() {
17430
17430
  showTextDiff(localNode[d],remoteNode[d]);
17431
17431
  }).appendTo(propertyNameCell);
17432
+ RED.popover.tooltip(textDiff, RED._("diff.compareChanges"));
17432
17433
  }
17433
17434
  }
17434
17435
 
@@ -20824,11 +20825,21 @@ RED.view = (function() {
20824
20825
  return api
20825
20826
  })()
20826
20827
 
20828
+ const isMac = RED.utils.getBrowserInfo().os === 'mac'
20829
+ // 'Control' is the main modifier key for mouse actions. On Windows,
20830
+ // that is the standard Ctrl key. On Mac that is the Cmd key.
20831
+ function isControlPressed (event) {
20832
+ return (isMac && event.metaKey) || (!isMac && event.ctrlKey)
20833
+ }
20827
20834
 
20828
20835
  function init() {
20829
20836
 
20830
20837
  chart = $("#red-ui-workspace-chart");
20831
20838
  chart.on('contextmenu', function(evt) {
20839
+ if (RED.view.DEBUG) {
20840
+ console.warn("contextmenu", { mouse_mode, event: d3.event });
20841
+ }
20842
+ mouse_mode = RED.state.DEFAULT
20832
20843
  evt.preventDefault()
20833
20844
  evt.stopPropagation()
20834
20845
  RED.contextMenu.show({
@@ -21712,7 +21723,7 @@ RED.view = (function() {
21712
21723
  lasso = null;
21713
21724
  }
21714
21725
  if (d3.event.touches || d3.event.button === 0) {
21715
- if ((mouse_mode === 0 || mouse_mode === RED.state.QUICK_JOINING) && (d3.event.metaKey || d3.event.ctrlKey) && !(d3.event.altKey || d3.event.shiftKey)) {
21726
+ if ((mouse_mode === 0 || mouse_mode === RED.state.QUICK_JOINING) && isControlPressed(d3.event) && !(d3.event.altKey || d3.event.shiftKey)) {
21716
21727
  // Trigger quick add dialog
21717
21728
  d3.event.stopPropagation();
21718
21729
  clearSelection();
@@ -21722,7 +21733,7 @@ RED.view = (function() {
21722
21733
  clickedGroup = clickedGroup || RED.nodes.group(drag_lines[0].node.g)
21723
21734
  }
21724
21735
  showQuickAddDialog({ position: point, group: clickedGroup });
21725
- } else if (mouse_mode === 0 && !(d3.event.metaKey || d3.event.ctrlKey)) {
21736
+ } else if (mouse_mode === 0 && !isControlPressed(d3.event)) {
21726
21737
  // CTRL not being held
21727
21738
  if (!d3.event.altKey) {
21728
21739
  // ALT not held (shift is allowed) Trigger lasso
@@ -21920,6 +21931,7 @@ RED.view = (function() {
21920
21931
  }
21921
21932
  historyEvent = {
21922
21933
  t:'add',
21934
+ dirty: RED.nodes.dirty(),
21923
21935
  junctions:[nn]
21924
21936
  }
21925
21937
  } else {
@@ -24061,7 +24073,7 @@ RED.view = (function() {
24061
24073
  d3.event.preventDefault()
24062
24074
  document.getSelection().removeAllRanges()
24063
24075
  if (d.type != "subflow") {
24064
- if (/^subflow:/.test(d.type) && (d3.event.ctrlKey || d3.event.metaKey)) {
24076
+ if (/^subflow:/.test(d.type) && isControlPressed(d3.event)) {
24065
24077
  RED.workspaces.show(d.type.substring(8));
24066
24078
  } else {
24067
24079
  RED.editor.edit(d);
@@ -24225,12 +24237,12 @@ RED.view = (function() {
24225
24237
  d.type !== 'junction'
24226
24238
  lastClickNode = mousedown_node;
24227
24239
 
24228
- if (d.selected && (d3.event.ctrlKey||d3.event.metaKey)) {
24240
+ if (d.selected && isControlPressed(d3.event)) {
24229
24241
  mousedown_node.selected = false;
24230
24242
  movingSet.remove(mousedown_node);
24231
24243
  } else {
24232
24244
  if (d3.event.shiftKey) {
24233
- if (!(d3.event.ctrlKey||d3.event.metaKey)) {
24245
+ if (!isControlPressed(d3.event)) {
24234
24246
  clearSelection();
24235
24247
  }
24236
24248
  var clickPosition = (d3.event.offsetX/scaleFactor - mousedown_node.x)
@@ -24399,10 +24411,10 @@ RED.view = (function() {
24399
24411
  }
24400
24412
  mousedown_link = d;
24401
24413
 
24402
- if (!(d3.event.metaKey || d3.event.ctrlKey)) {
24414
+ if (!isControlPressed(d3.event)) {
24403
24415
  clearSelection();
24404
24416
  }
24405
- if (d3.event.metaKey || d3.event.ctrlKey) {
24417
+ if (isControlPressed(d3.event)) {
24406
24418
  if (!selectedLinks.has(mousedown_link)) {
24407
24419
  selectedLinks.add(mousedown_link);
24408
24420
  } else {
@@ -24417,7 +24429,7 @@ RED.view = (function() {
24417
24429
  redraw();
24418
24430
  focusView();
24419
24431
  d3.event.stopPropagation();
24420
- if (!mousedown_link.link && movingSet.length() === 0 && (d3.event.touches || d3.event.button === 0) && selectedLinks.length() === 1 && selectedLinks.has(mousedown_link) && (d3.event.metaKey || d3.event.ctrlKey)) {
24432
+ if (!mousedown_link.link && movingSet.length() === 0 && (d3.event.touches || d3.event.button === 0) && selectedLinks.length() === 1 && selectedLinks.has(mousedown_link) && isControlPressed(d3.event)) {
24421
24433
  d3.select(this).classed("red-ui-flow-link-splice",true);
24422
24434
  var point = d3.mouse(this);
24423
24435
  var clickedGroup = getGroupAt(point[0],point[1]);
@@ -24498,7 +24510,7 @@ RED.view = (function() {
24498
24510
  );
24499
24511
  lastClickNode = g;
24500
24512
 
24501
- if (g.selected && (d3.event.ctrlKey||d3.event.metaKey)) {
24513
+ if (g.selected && isControlPressed(d3.event)) {
24502
24514
  selectedGroups.remove(g);
24503
24515
  d3.event.stopPropagation();
24504
24516
  } else {
@@ -32139,11 +32151,11 @@ RED.sidebar.context = (function() {
32139
32151
  var obj = $(propRow.children()[0]);
32140
32152
  obj.text(k);
32141
32153
  var tools = $('<span class="button-group"></span>');
32142
-
32154
+ const urlSafeK = encodeURIComponent(k)
32143
32155
  var refreshItem = $('<button class="red-ui-button red-ui-button-small"><i class="fa fa-refresh"></i></button>').appendTo(tools).on("click", function(e) {
32144
32156
  e.preventDefault();
32145
32157
  e.stopPropagation();
32146
- $.getJSON(baseUrl+"/"+k+"?store="+v.store, function(data) {
32158
+ $.getJSON(baseUrl+"/"+urlSafeK+"?store="+v.store, function(data) {
32147
32159
  if (data.msg !== payload || data.format !== format) {
32148
32160
  payload = data.msg;
32149
32161
  format = data.format;
@@ -32179,11 +32191,12 @@ RED.sidebar.context = (function() {
32179
32191
  $('<button class="red-ui-button primary" data-i18n="common.label.delete"></button>').appendTo(bg).on("click", function(e) {
32180
32192
  e.preventDefault();
32181
32193
  popover.close();
32194
+ const urlSafeK = encodeURIComponent(k)
32182
32195
  $.ajax({
32183
- url: baseUrl+"/"+k+"?store="+v.store,
32196
+ url: baseUrl+"/"+urlSafeK+"?store="+v.store,
32184
32197
  type: "DELETE"
32185
32198
  }).done(function(data,textStatus,xhr) {
32186
- $.getJSON(baseUrl+"/"+k+"?store="+v.store, function(data) {
32199
+ $.getJSON(baseUrl+"/"+urlSafeK+"?store="+v.store, function(data) {
32187
32200
  if (data.format === 'undefined') {
32188
32201
  propRow.remove();
32189
32202
  if (container.children().length === 0) {
@@ -32747,6 +32760,7 @@ RED.palette.editor = (function() {
32747
32760
  // if there is only 1 catalog, hide the select
32748
32761
  if (catalogEntries.length > 1) {
32749
32762
  catalogSelection.prepend(`<option value="all">${RED._('palette.editor.allCatalogs')}</option>`)
32763
+ catalogSelection.val('all')
32750
32764
  catalogSelection.removeAttr('disabled') // permit the user to select a catalog
32751
32765
  }
32752
32766
  // refresh the searchInput counter and trigger a change
@@ -32776,7 +32790,7 @@ RED.palette.editor = (function() {
32776
32790
  function refreshFilteredItems() {
32777
32791
  packageList.editableList('empty');
32778
32792
  var currentFilter = searchInput.searchBox('value').trim();
32779
- if (currentFilter === ""){
32793
+ if (currentFilter === "" && loadedList.length > 20){
32780
32794
  packageList.editableList('addItem',{count:loadedList.length})
32781
32795
  return;
32782
32796
  }
@@ -33146,7 +33160,7 @@ RED.palette.editor = (function() {
33146
33160
  delay: 300,
33147
33161
  change: function() {
33148
33162
  var searchTerm = $(this).val().trim().toLowerCase();
33149
- if (searchTerm.length > 0) {
33163
+ if (searchTerm.length > 0 || loadedList.length < 20) {
33150
33164
  filteredList = loadedList.filter(function(m) {
33151
33165
  return (m.index.indexOf(searchTerm) > -1);
33152
33166
  }).map(function(f) { return {info:f}});
@@ -33170,6 +33184,7 @@ RED.palette.editor = (function() {
33170
33184
  const sortRelevance = $('<a href="#" class="red-ui-palette-editor-install-sort-option red-ui-sidebar-header-button-toggle selected"><i class="fa fa-sort-amount-desc"></i></a>').appendTo(sortGroup);
33171
33185
  const sortAZ = $('<a href="#" class="red-ui-palette-editor-install-sort-option red-ui-sidebar-header-button-toggle"><i class="fa fa-sort-alpha-asc"></i></a>').appendTo(sortGroup);
33172
33186
  const sortRecent = $('<a href="#" class="red-ui-palette-editor-install-sort-option red-ui-sidebar-header-button-toggle"><i class="fa fa-calendar"></i></a>').appendTo(sortGroup);
33187
+ RED.popover.tooltip(sortRelevance,RED._("palette.editor.sortRelevance"));
33173
33188
  RED.popover.tooltip(sortAZ,RED._("palette.editor.sortAZ"));
33174
33189
  RED.popover.tooltip(sortRecent,RED._("palette.editor.sortRecent"));
33175
33190
 
@@ -35881,7 +35896,7 @@ RED.editor = (function() {
35881
35896
  }
35882
35897
 
35883
35898
  $('<div class="form-row">'+
35884
- '<label for="node-input-show-label-btn" data-i18n="editor.label"></label>'+
35899
+ '<label for="node-input-show-label" data-i18n="editor.label"></label>'+
35885
35900
  '<span style="margin-right: 2px;"/>'+
35886
35901
  '<input type="checkbox" id="node-input-show-label"/>'+
35887
35902
  '</div>').appendTo(dialogForm);
@@ -45766,6 +45781,7 @@ RED.actionList = (function() {
45766
45781
  items.push({type:t,def: def, label:getTypeLabel(t,def)});
45767
45782
  }
45768
45783
  });
45784
+ items.push({ type: 'junction', def: { inputs:1, outputs: 1, label: 'junction', type: 'junction'}, label: 'junction' })
45769
45785
  items.sort(sortTypeLabels);
45770
45786
 
45771
45787
  var commonCount = 0;