@node-red/editor-client 4.1.7 → 4.1.8

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.
@@ -1288,6 +1288,8 @@
1288
1288
  "toggle-show-tips": "Basculer l'affichage des astuces",
1289
1289
  "show-about": "Afficher la description de Node-RED",
1290
1290
  "show-welcome-tour": "Afficher la visite de bienvenue",
1291
+ "show-first-tab": "Afficher le premier onglet",
1292
+ "show-last-tab": "Afficher le dernier onglet",
1291
1293
  "show-next-tab": "Afficher l'onglet suivant",
1292
1294
  "show-previous-tab": "Afficher l'onglet précédent",
1293
1295
  "add-flow": "Ajouter un flux",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node-red/editor-client",
3
- "version": "4.1.7",
3
+ "version": "4.1.8",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
package/public/red/about CHANGED
@@ -1,3 +1,15 @@
1
+ #### 4.1.8: Maintenance Release
2
+
3
+ - Add badges to func node tabs with code in (#5585) @knolleary
4
+ - Fix typo in French link node description (#5530) @LPe7
5
+ - Encode branch name in delete request (#5584) @knolleary
6
+ - Introduce `show-first-tab` and `show-last-tab` actions (#5583) @GogoVega
7
+ - Fix "connected to ..." log string in tcp in/out nodes using TLS (#5484) @marcows
8
+ - TreeList: Fix arrow navigation through filtered TreeList (#5431) @piotrbogun
9
+ - Update tar dependency (#5582) @knolleary
10
+ - Allow Node-RED section of help sidebar to be hidden (#5581) @knolleary
11
+ - Allow theme plugin to override settings and add menu options (#5580) @knolleary
12
+
1
13
  #### 4.1.7: Maintenance Release
2
14
 
3
15
  - Do not block touch events on ports (#5527) @knolleary
package/public/red/red.js CHANGED
@@ -12100,8 +12100,9 @@ RED.utils = (function() {
12100
12100
  evt.preventDefault();
12101
12101
  evt.stopPropagation();
12102
12102
  if (focussed.children && Array.isArray(focussed.children) && focussed.children.length > 0 && focussed.treeList.container.hasClass("expanded")) {
12103
- target = focussed.children[0];
12104
- } else {
12103
+ target = that._getFirstVisibleChild(focussed);
12104
+ }
12105
+ if (!target) {
12105
12106
  target = that._getNextSibling(focussed);
12106
12107
  while (!target && focussed.parent) {
12107
12108
  focussed = focussed.parent;
@@ -12156,12 +12157,31 @@ RED.utils = (function() {
12156
12157
  this.data(this.options.data);
12157
12158
  }
12158
12159
  },
12160
+ _isItemVisible: function(item) {
12161
+ return item.treeList && item.treeList.container && item.treeList.container.parent().css('display') !== 'none';
12162
+ },
12163
+ _getFirstVisibleChild: function(item) {
12164
+ if (!item.children || !Array.isArray(item.children)) {
12165
+ return null;
12166
+ }
12167
+ for (var i = 0; i < item.children.length; i++) {
12168
+ if (this._isItemVisible(item.children[i])) {
12169
+ return item.children[i];
12170
+ }
12171
+ }
12172
+ return null;
12173
+ },
12159
12174
  _getLastDescendant: function(item) {
12160
12175
  // Gets the last visible descendant of the item
12161
12176
  if (!item.children || !item.treeList.container.hasClass("expanded") || item.children.length === 0) {
12162
12177
  return item;
12163
12178
  }
12164
- return this._getLastDescendant(item.children[item.children.length-1]);
12179
+ for (var i = item.children.length - 1; i >= 0; i--) {
12180
+ if (this._isItemVisible(item.children[i])) {
12181
+ return this._getLastDescendant(item.children[i]);
12182
+ }
12183
+ }
12184
+ return item;
12165
12185
  },
12166
12186
  _getPreviousSibling: function(item) {
12167
12187
  var candidates;
@@ -12171,11 +12191,12 @@ RED.utils = (function() {
12171
12191
  candidates = item.parent.children;
12172
12192
  }
12173
12193
  var index = candidates.indexOf(item);
12174
- if (index === 0) {
12175
- return null;
12176
- } else {
12177
- return candidates[index-1];
12194
+ for (var i = index - 1; i >= 0; i--) {
12195
+ if (this._isItemVisible(candidates[i])) {
12196
+ return candidates[i];
12197
+ }
12178
12198
  }
12199
+ return null;
12179
12200
  },
12180
12201
  _getNextSibling: function(item) {
12181
12202
  var candidates;
@@ -12185,11 +12206,12 @@ RED.utils = (function() {
12185
12206
  candidates = item.parent.children;
12186
12207
  }
12187
12208
  var index = candidates.indexOf(item);
12188
- if (index === candidates.length - 1) {
12189
- return null;
12190
- } else {
12191
- return candidates[index+1];
12209
+ for (var i = index + 1; i < candidates.length; i++) {
12210
+ if (this._isItemVisible(candidates[i])) {
12211
+ return candidates[i];
12212
+ }
12192
12213
  }
12214
+ return null;
12193
12215
  },
12194
12216
  _addChildren: function(container,parent,children,depth,onCompleteChildren) {
12195
12217
  var that = this;
@@ -15075,6 +15097,20 @@ RED.tabs = (function() {
15075
15097
  }
15076
15098
  }
15077
15099
 
15100
+ function activateFirstTab() {
15101
+ const first = ul.find("li.red-ui-tab:not(.hide-tab)").first();
15102
+ if (first.length > 0) {
15103
+ activateTab(first.find("a"));
15104
+ }
15105
+ }
15106
+
15107
+ function activateLastTab() {
15108
+ const last = ul.find("li.red-ui-tab:not(.hide-tab)").last();
15109
+ if (last.length > 0) {
15110
+ activateTab(last.find("a"));
15111
+ }
15112
+ }
15113
+
15078
15114
  function findPreviousVisibleTab(li) {
15079
15115
  if (!li) {
15080
15116
  li = ul.find("li.active");
@@ -15433,6 +15469,8 @@ RED.tabs = (function() {
15433
15469
  },
15434
15470
  removeTab: removeTab,
15435
15471
  activateTab: activateTab,
15472
+ firstTab: activateFirstTab,
15473
+ lastTab: activateLastTab,
15436
15474
  nextTab: activateNextTab,
15437
15475
  previousTab: activatePreviousTab,
15438
15476
  resize: updateTabWidths,
@@ -22288,6 +22326,20 @@ RED.workspaces = (function() {
22288
22326
  workspaceIndex = 0
22289
22327
  })
22290
22328
 
22329
+ RED.actions.add("core:show-first-tab", function () {
22330
+ const oldActive = activeWorkspace;
22331
+ workspace_tabs.firstTab();
22332
+ if (oldActive !== activeWorkspace) {
22333
+ addToViewStack(oldActive);
22334
+ }
22335
+ });
22336
+ RED.actions.add("core:show-last-tab", function () {
22337
+ const oldActive = activeWorkspace;
22338
+ workspace_tabs.lastTab();
22339
+ if (oldActive !== activeWorkspace) {
22340
+ addToViewStack(oldActive);
22341
+ }
22342
+ });
22291
22343
  RED.actions.add("core:show-next-tab",function() {
22292
22344
  var oldActive = activeWorkspace;
22293
22345
  workspace_tabs.nextTab();
@@ -34254,24 +34306,25 @@ RED.sidebar.help = (function() {
34254
34306
  }
34255
34307
 
34256
34308
  function refreshHelpIndex() {
34257
- var modules = RED.nodes.registry.getModuleList();
34258
- var moduleNames = Object.keys(modules);
34309
+ const modules = RED.nodes.registry.getModuleList();
34310
+ const moduleNames = Object.keys(modules);
34259
34311
  moduleNames.sort();
34260
34312
 
34261
- var nodeHelp = {
34313
+ const nodeHelp = {
34262
34314
  label: RED._("sidebar.help.nodeHelp"),
34263
34315
  children: [],
34264
34316
  expanded: true
34265
34317
  };
34266
- var tours = RED.tourGuide.list().map(function (item) {
34318
+ const tours = RED.tourGuide.list().map(function (item) {
34267
34319
  return {
34268
34320
  icon: "fa fa-play-circle-o",
34269
34321
  label: item.label,
34270
34322
  tour: item.path,
34271
34323
  };
34272
34324
  });
34273
- var helpData = [
34274
- {
34325
+ const helpData = []
34326
+ if (RED.settings.theme("help.node-red") !== false) {
34327
+ helpData.push({
34275
34328
  label: "Node-RED",
34276
34329
  children: [
34277
34330
  {
@@ -34285,9 +34338,11 @@ RED.sidebar.help = (function() {
34285
34338
  }
34286
34339
 
34287
34340
  ]
34288
- },
34289
- nodeHelp
34290
- ];
34341
+ })
34342
+ }
34343
+
34344
+ helpData.push(nodeHelp)
34345
+
34291
34346
  var subflows = RED.nodes.registry.getNodeTypes().filter(function(t) {return /subflow/.test(t)});
34292
34347
  if (subflows.length > 0) {
34293
34348
  nodeHelp.children.push({
@@ -56593,7 +56648,7 @@ RED.projects.settings = (function() {
56593
56648
  text: RED._("sidebar.project.projectSettings.deleteBranch"),
56594
56649
  click: function() {
56595
56650
  notification.close();
56596
- var url = "projects/"+activeProject.name+"/branches/"+entry.name;
56651
+ var url = "projects/"+activeProject.name+"/branches/"+encodeURIComponent(entry.name);
56597
56652
  var options = {
56598
56653
  url: url,
56599
56654
  type: "DELETE",