@node-red/editor-client 2.1.2 → 2.1.3
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 +16 -0
- package/public/red/red.js +70 -58
- package/public/red/red.min.js +1 -1
- package/public/red/style.min.css +1 -1
package/package.json
CHANGED
package/public/red/about
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
#### 2.1.3: Maintenance Release
|
|
2
|
+
|
|
3
|
+
Runtime
|
|
4
|
+
|
|
5
|
+
- Update gen-publish script to update 'next' tag for main releases
|
|
6
|
+
- Add environment variable to enable/disable tours (#3221) @hardillb
|
|
7
|
+
- Fix loading non-default language files leaving runtime in wrong locale (#3225) @knolleary
|
|
8
|
+
|
|
9
|
+
Editor
|
|
10
|
+
|
|
11
|
+
- Refresh editor settings whenever a node is added or enabled (#3227) @knolleary
|
|
12
|
+
- Revert spinner css change that made it shrink in some cases (#3229) @knolleary
|
|
13
|
+
- Fix import notification message when importing config nodes (#3224) @knolleary
|
|
14
|
+
- Handle changing types of TypedInput repeatedly (#3223) @knolleary
|
|
15
|
+
|
|
16
|
+
|
|
1
17
|
#### 2.1.2: Maintenance Release
|
|
2
18
|
|
|
3
19
|
|
package/public/red/red.js
CHANGED
|
@@ -566,31 +566,33 @@ var RED = (function() {
|
|
|
566
566
|
var typeList;
|
|
567
567
|
var info;
|
|
568
568
|
if (topic == "notification/node/added") {
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
569
|
+
RED.settings.refreshSettings(function(err, data) {
|
|
570
|
+
var addedTypes = [];
|
|
571
|
+
msg.forEach(function(m) {
|
|
572
|
+
var id = m.id;
|
|
573
|
+
RED.nodes.addNodeSet(m);
|
|
574
|
+
addedTypes = addedTypes.concat(m.types);
|
|
575
|
+
RED.i18n.loadNodeCatalog(id, function() {
|
|
576
|
+
var lang = localStorage.getItem("editor-language")||RED.i18n.detectLanguage();
|
|
577
|
+
$.ajax({
|
|
578
|
+
headers: {
|
|
579
|
+
"Accept":"text/html",
|
|
580
|
+
"Accept-Language": lang
|
|
581
|
+
},
|
|
582
|
+
cache: false,
|
|
583
|
+
url: 'nodes/'+id,
|
|
584
|
+
success: function(data) {
|
|
585
|
+
appendNodeConfig(data);
|
|
586
|
+
}
|
|
587
|
+
});
|
|
586
588
|
});
|
|
587
589
|
});
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
590
|
+
if (addedTypes.length) {
|
|
591
|
+
typeList = "<ul><li>"+addedTypes.map(RED.utils.sanitize).join("</li><li>")+"</li></ul>";
|
|
592
|
+
RED.notify(RED._("palette.event.nodeAdded", {count:addedTypes.length})+typeList,"success");
|
|
593
|
+
}
|
|
594
|
+
loadIconList();
|
|
595
|
+
})
|
|
594
596
|
} else if (topic == "notification/node/removed") {
|
|
595
597
|
for (i=0;i<msg.length;i++) {
|
|
596
598
|
m = msg[i];
|
|
@@ -603,27 +605,29 @@ var RED = (function() {
|
|
|
603
605
|
loadIconList();
|
|
604
606
|
} else if (topic == "notification/node/enabled") {
|
|
605
607
|
if (msg.types) {
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
608
|
+
RED.settings.refreshSettings(function(err, data) {
|
|
609
|
+
info = RED.nodes.getNodeSet(msg.id);
|
|
610
|
+
if (info.added) {
|
|
611
|
+
RED.nodes.enableNodeSet(msg.id);
|
|
612
|
+
typeList = "<ul><li>"+msg.types.map(RED.utils.sanitize).join("</li><li>")+"</li></ul>";
|
|
613
|
+
RED.notify(RED._("palette.event.nodeEnabled", {count:msg.types.length})+typeList,"success");
|
|
614
|
+
} else {
|
|
615
|
+
var lang = localStorage.getItem("editor-language")||RED.i18n.detectLanguage();
|
|
616
|
+
$.ajax({
|
|
617
|
+
headers: {
|
|
618
|
+
"Accept":"text/html",
|
|
619
|
+
"Accept-Language": lang
|
|
620
|
+
},
|
|
621
|
+
cache: false,
|
|
622
|
+
url: 'nodes/'+msg.id,
|
|
623
|
+
success: function(data) {
|
|
624
|
+
appendNodeConfig(data);
|
|
625
|
+
typeList = "<ul><li>"+msg.types.map(RED.utils.sanitize).join("</li><li>")+"</li></ul>";
|
|
626
|
+
RED.notify(RED._("palette.event.nodeAdded", {count:msg.types.length})+typeList,"success");
|
|
627
|
+
}
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
});
|
|
627
631
|
}
|
|
628
632
|
} else if (topic == "notification/node/disabled") {
|
|
629
633
|
if (msg.types) {
|
|
@@ -1408,7 +1412,7 @@ RED.settings = (function () {
|
|
|
1408
1412
|
load(done);
|
|
1409
1413
|
}
|
|
1410
1414
|
|
|
1411
|
-
var
|
|
1415
|
+
var refreshSettings = function(done) {
|
|
1412
1416
|
$.ajax({
|
|
1413
1417
|
headers: {
|
|
1414
1418
|
"Accept": "application/json"
|
|
@@ -1418,6 +1422,23 @@ RED.settings = (function () {
|
|
|
1418
1422
|
url: 'settings',
|
|
1419
1423
|
success: function (data) {
|
|
1420
1424
|
setProperties(data);
|
|
1425
|
+
done(null, data);
|
|
1426
|
+
},
|
|
1427
|
+
error: function(jqXHR,textStatus,errorThrown) {
|
|
1428
|
+
if (jqXHR.status === 401) {
|
|
1429
|
+
if (/[?&]access_token=(.*?)(?:$|&)/.test(window.location.search)) {
|
|
1430
|
+
window.location.search = "";
|
|
1431
|
+
}
|
|
1432
|
+
RED.user.login(function() { refreshSettings(done); });
|
|
1433
|
+
} else {
|
|
1434
|
+
console.log("Unexpected error loading settings:",jqXHR.status,textStatus);
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1437
|
+
});
|
|
1438
|
+
}
|
|
1439
|
+
var load = function(done) {
|
|
1440
|
+
refreshSettings(function(err, data) {
|
|
1441
|
+
if (!err) {
|
|
1421
1442
|
if (!RED.settings.user || RED.settings.user.anonymous) {
|
|
1422
1443
|
RED.settings.remove("auth-tokens");
|
|
1423
1444
|
}
|
|
@@ -1430,18 +1451,8 @@ RED.settings = (function () {
|
|
|
1430
1451
|
console.log("D3",d3.version);
|
|
1431
1452
|
console.groupEnd();
|
|
1432
1453
|
loadUserSettings(done);
|
|
1433
|
-
},
|
|
1434
|
-
error: function(jqXHR,textStatus,errorThrown) {
|
|
1435
|
-
if (jqXHR.status === 401) {
|
|
1436
|
-
if (/[?&]access_token=(.*?)(?:$|&)/.test(window.location.search)) {
|
|
1437
|
-
window.location.search = "";
|
|
1438
|
-
}
|
|
1439
|
-
RED.user.login(function() { load(done); });
|
|
1440
|
-
} else {
|
|
1441
|
-
console.log("Unexpected error loading settings:",jqXHR.status,textStatus);
|
|
1442
|
-
}
|
|
1443
1454
|
}
|
|
1444
|
-
})
|
|
1455
|
+
})
|
|
1445
1456
|
};
|
|
1446
1457
|
|
|
1447
1458
|
function loadUserSettings(done) {
|
|
@@ -1517,6 +1528,7 @@ RED.settings = (function () {
|
|
|
1517
1528
|
init: init,
|
|
1518
1529
|
load: load,
|
|
1519
1530
|
loadUserSettings: loadUserSettings,
|
|
1531
|
+
refreshSettings: refreshSettings,
|
|
1520
1532
|
set: set,
|
|
1521
1533
|
get: get,
|
|
1522
1534
|
remove: remove,
|
|
@@ -14071,7 +14083,7 @@ RED.stack = (function() {
|
|
|
14071
14083
|
var previousType = this.typeMap[this.propertyType];
|
|
14072
14084
|
previousValue = this.input.val();
|
|
14073
14085
|
|
|
14074
|
-
if (this.typeChanged) {
|
|
14086
|
+
if (previousType && this.typeChanged) {
|
|
14075
14087
|
if (this.options.debug) { console.log(this.identifier,"typeChanged",{previousType,previousValue}) }
|
|
14076
14088
|
if (previousType.options && opt.hasValue !== true) {
|
|
14077
14089
|
this.oldValues[previousType.value] = previousValue;
|
|
@@ -23708,7 +23720,7 @@ RED.view = (function() {
|
|
|
23708
23720
|
counts.push(RED._("clipboard.group",{count:newGroupCount}));
|
|
23709
23721
|
}
|
|
23710
23722
|
if (newConfigNodeCount > 0) {
|
|
23711
|
-
counts.push(RED._("clipboard.configNode",{count:
|
|
23723
|
+
counts.push(RED._("clipboard.configNode",{count:newConfigNodeCount}));
|
|
23712
23724
|
}
|
|
23713
23725
|
if (new_subflows.length > 0) {
|
|
23714
23726
|
counts.push(RED._("clipboard.subflow",{count:new_subflows.length}));
|