@node-red/editor-client 3.1.7 → 3.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.
- package/package.json +1 -1
- package/public/red/about +9 -0
- package/public/red/red.js +47 -8
- package/public/red/red.min.js +3 -3
package/package.json
CHANGED
package/public/red/about
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
#### 3.1.8: Maintenance Release
|
|
2
|
+
|
|
3
|
+
- Add validation and error handling on subflow instance properties (#4632) @knolleary
|
|
4
|
+
- Hide import/export context menu if disabled in theme (#4633) @knolleary
|
|
5
|
+
- Show change indicator on subflow tabs (#4631) @knolleary
|
|
6
|
+
- Bump dependencies (#4630) @knolleary
|
|
7
|
+
- Reset workspace index when clearing nodes (#4619) @knolleary
|
|
8
|
+
- Remove typo in global config (#4613) @kazuhitoyokoi
|
|
9
|
+
|
|
1
10
|
#### 3.1.7: Maintenance Release
|
|
2
11
|
|
|
3
12
|
- Add Japanese translation for v3.1.6 (#4603) @kazuhitoyokoi
|
package/public/red/red.js
CHANGED
|
@@ -4264,12 +4264,16 @@ RED.nodes = (function() {
|
|
|
4264
4264
|
* @param {String} z tab id
|
|
4265
4265
|
*/
|
|
4266
4266
|
checkTabState: function (z) {
|
|
4267
|
-
const ws = workspaces[z]
|
|
4267
|
+
const ws = workspaces[z] || subflows[z]
|
|
4268
4268
|
if (ws) {
|
|
4269
4269
|
const contentsChanged = tabDirtyMap[z].size > 0 || tabDeletedNodesMap[z].size > 0
|
|
4270
4270
|
if (Boolean(ws.contentsChanged) !== contentsChanged) {
|
|
4271
4271
|
ws.contentsChanged = contentsChanged
|
|
4272
|
-
|
|
4272
|
+
if (ws.type === 'tab') {
|
|
4273
|
+
RED.events.emit("flows:change", ws);
|
|
4274
|
+
} else {
|
|
4275
|
+
RED.events.emit("subflows:change", ws);
|
|
4276
|
+
}
|
|
4273
4277
|
}
|
|
4274
4278
|
}
|
|
4275
4279
|
}
|
|
@@ -4742,7 +4746,22 @@ RED.nodes = (function() {
|
|
|
4742
4746
|
RED.nodes.registerType("subflow:"+sf.id, {
|
|
4743
4747
|
defaults:{
|
|
4744
4748
|
name:{value:""},
|
|
4745
|
-
env:{value:[]
|
|
4749
|
+
env:{value:[], validate: function(value) {
|
|
4750
|
+
const errors = []
|
|
4751
|
+
if (value) {
|
|
4752
|
+
value.forEach(env => {
|
|
4753
|
+
const r = RED.utils.validateTypedProperty(env.value, env.type)
|
|
4754
|
+
if (r !== true) {
|
|
4755
|
+
errors.push(env.name+': '+r)
|
|
4756
|
+
}
|
|
4757
|
+
})
|
|
4758
|
+
}
|
|
4759
|
+
if (errors.length === 0) {
|
|
4760
|
+
return true
|
|
4761
|
+
} else {
|
|
4762
|
+
return errors
|
|
4763
|
+
}
|
|
4764
|
+
}}
|
|
4746
4765
|
},
|
|
4747
4766
|
icon: function() { return sf.icon||"subflow.svg" },
|
|
4748
4767
|
category: sf.category || "subflows",
|
|
@@ -20068,6 +20087,11 @@ RED.workspaces = (function() {
|
|
|
20068
20087
|
createWorkspaceTabs();
|
|
20069
20088
|
RED.events.on("sidebar:resize",workspace_tabs.resize);
|
|
20070
20089
|
|
|
20090
|
+
RED.events.on("workspace:clear", () => {
|
|
20091
|
+
// Reset the index used to generate new flow names
|
|
20092
|
+
workspaceIndex = 0
|
|
20093
|
+
})
|
|
20094
|
+
|
|
20071
20095
|
RED.actions.add("core:show-next-tab",function() {
|
|
20072
20096
|
var oldActive = activeWorkspace;
|
|
20073
20097
|
workspace_tabs.nextTab();
|
|
@@ -20234,6 +20258,9 @@ RED.workspaces = (function() {
|
|
|
20234
20258
|
RED.events.on("flows:change", (ws) => {
|
|
20235
20259
|
$("#red-ui-tab-"+(ws.id.replace(".","-"))).toggleClass('red-ui-workspace-changed',!!(ws.contentsChanged || ws.changed || ws.added));
|
|
20236
20260
|
})
|
|
20261
|
+
RED.events.on("subflows:change", (ws) => {
|
|
20262
|
+
$("#red-ui-tab-"+(ws.id.replace(".","-"))).toggleClass('red-ui-workspace-changed',!!(ws.contentsChanged || ws.changed || ws.added));
|
|
20263
|
+
})
|
|
20237
20264
|
|
|
20238
20265
|
hideWorkspace();
|
|
20239
20266
|
}
|
|
@@ -45179,10 +45206,16 @@ RED.search = (function() {
|
|
|
45179
45206
|
onselect: 'core:split-wire-with-link-nodes',
|
|
45180
45207
|
disabled: !canEdit || !hasLinks
|
|
45181
45208
|
},
|
|
45182
|
-
null
|
|
45183
|
-
{ onselect: 'core:show-import-dialog', label: RED._('common.label.import')},
|
|
45184
|
-
{ onselect: 'core:show-examples-import-dialog', label: RED._('menu.label.importExample') }
|
|
45209
|
+
null
|
|
45185
45210
|
)
|
|
45211
|
+
if (RED.settings.theme("menu.menu-item-import-library", true)) {
|
|
45212
|
+
insertOptions.push(
|
|
45213
|
+
{ onselect: 'core:show-import-dialog', label: RED._('common.label.import')},
|
|
45214
|
+
{ onselect: 'core:show-examples-import-dialog', label: RED._('menu.label.importExample') }
|
|
45215
|
+
)
|
|
45216
|
+
}
|
|
45217
|
+
|
|
45218
|
+
|
|
45186
45219
|
if (hasSelection && canEdit) {
|
|
45187
45220
|
const nodeOptions = []
|
|
45188
45221
|
if (!hasMultipleSelection && !isGroup) {
|
|
@@ -45255,8 +45288,14 @@ RED.search = (function() {
|
|
|
45255
45288
|
{ onselect: 'core:paste-from-internal-clipboard', label: RED._("keyboard.pasteNode"), disabled: !canEdit || !RED.view.clipboard() },
|
|
45256
45289
|
{ onselect: 'core:delete-selection', label: RED._('keyboard.deleteSelected'), disabled: !canEdit || !canDelete },
|
|
45257
45290
|
{ onselect: 'core:delete-selection-and-reconnect', label: RED._('keyboard.deleteReconnect'), disabled: !canEdit || !canDelete },
|
|
45258
|
-
|
|
45259
|
-
|
|
45291
|
+
)
|
|
45292
|
+
if (RED.settings.theme("menu.menu-item-export-library", true)) {
|
|
45293
|
+
menuItems.push(
|
|
45294
|
+
{ onselect: 'core:show-export-dialog', label: RED._("menu.label.export") }
|
|
45295
|
+
)
|
|
45296
|
+
}
|
|
45297
|
+
menuItems.push(
|
|
45298
|
+
{ onselect: 'core:select-all-nodes', label: RED._("keyboard.selectAll") }
|
|
45260
45299
|
)
|
|
45261
45300
|
}
|
|
45262
45301
|
|