mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Compare commits
311 Commits
2.1.2
...
fontawesom
Author | SHA1 | Date | |
---|---|---|---|
|
fd2462135b | ||
|
3649f10600 | ||
|
a0acc89fcb | ||
|
64d1a82920 | ||
|
2396e28479 | ||
|
db1ad0df63 | ||
|
3c0b74005b | ||
|
93ff667df1 | ||
|
99d824a999 | ||
|
97d2b5df15 | ||
|
6a5c50ff77 | ||
|
c948573c2d | ||
|
5233bc501c | ||
|
ad96c6f838 | ||
|
0e92f68b4a | ||
|
08295eb807 | ||
|
fce4f0c116 | ||
|
94e8fce40a | ||
|
c75bebfc90 | ||
|
3e102ef760 | ||
|
c07eddbd97 | ||
|
0533c08438 | ||
|
5f0ea85f47 | ||
|
6c7c1202ed | ||
|
669aa769c2 | ||
|
fcf2994015 | ||
|
bee21ddc9e | ||
|
263e68e677 | ||
|
2b958f5724 | ||
|
95f7177ef4 | ||
|
006324b78e | ||
|
efd8c1229d | ||
|
0f1aea3e0d | ||
|
6a41cbebc9 | ||
|
fba95e6a42 | ||
|
bffb91f196 | ||
|
4573b65639 | ||
|
3d8505385a | ||
|
95d3a8cc22 | ||
|
99c053f86b | ||
|
f2dde705ef | ||
|
be11fda814 | ||
|
0261105c52 | ||
|
264047dc0c | ||
|
4d84926ed2 | ||
|
da3211fee6 | ||
|
1388b03cf2 | ||
|
b3f1401ab4 | ||
|
e5e3832809 | ||
|
2eff7da171 | ||
|
e9622bcfe8 | ||
|
63ebadc526 | ||
|
fe47b07229 | ||
|
dc73997be3 | ||
|
62315fd478 | ||
|
fb81121bd3 | ||
|
5293563a6a | ||
|
2e1e61dabe | ||
|
280d63fde7 | ||
|
c6104195f6 | ||
|
e55cbb3e3d | ||
|
56b85e4194 | ||
|
6431c43d0e | ||
|
a62107fbd1 | ||
|
7959d18248 | ||
|
2f66915a9f | ||
|
a508177e21 | ||
|
b7bae18849 | ||
|
fbde247c72 | ||
|
3a69af9034 | ||
|
5c87a6cb76 | ||
|
9c6bb434e8 | ||
|
d1bd303dfa | ||
|
3813c32454 | ||
|
3b00a692ee | ||
|
3304ebe9d3 | ||
|
513120cbfe | ||
|
b06049d5a3 | ||
|
0f50355deb | ||
|
bd6e35fea2 | ||
|
a4fd63cd44 | ||
|
fdc4219b68 | ||
|
5b428bb8e6 | ||
|
c948ff88a5 | ||
|
9b9a0d7060 | ||
|
16578e3677 | ||
|
be7f84bc67 | ||
|
033d26f2cb | ||
|
4c0826b1c4 | ||
|
c4cc204c94 | ||
|
3747db18b1 | ||
|
4173625fca | ||
|
0e7863a6fb | ||
|
207ba00ad2 | ||
|
87c89586a5 | ||
|
1cea1ced82 | ||
|
08732bac0f | ||
|
283e8d3c08 | ||
|
42a7165596 | ||
|
aa3f5001d5 | ||
|
56580c4005 | ||
|
ba304c9651 | ||
|
703c5adba7 | ||
|
8b85f6e0a6 | ||
|
c136d22382 | ||
|
42358419ad | ||
|
ab2ced5c37 | ||
|
faf31be0dc | ||
|
ff4c67d068 | ||
|
10b133db02 | ||
|
f0bf607b43 | ||
|
8948ca5323 | ||
|
9c3be51fe9 | ||
|
2da9161f29 | ||
|
983dad5b53 | ||
|
8b23d341b4 | ||
|
0ad60013aa | ||
|
289815e128 | ||
|
f7ee83f1b9 | ||
|
f67aafa8d3 | ||
|
4e5ddd57bf | ||
|
e0d4ecf835 | ||
|
81a461115b | ||
|
d679b02658 | ||
|
5effcdb024 | ||
|
211a5eb2bb | ||
|
c4465ba58d | ||
|
7903c53876 | ||
|
dbefe6a560 | ||
|
8b1f412255 | ||
|
a2e0074061 | ||
|
5fc920087b | ||
|
085233ab9b | ||
|
6657b2629f | ||
|
310a279aaf | ||
|
58f3a76da7 | ||
|
a2c9458b1b | ||
|
75bcd9e8d5 | ||
|
977e7ef395 | ||
|
eb1b8b577f | ||
|
28f91685ce | ||
|
81a4fe59d9 | ||
|
e7189ab81f | ||
|
346db89e66 | ||
|
f786c7f144 | ||
|
51f45293b8 | ||
|
943b103001 | ||
|
f055d42277 | ||
|
fb7a2a8d5d | ||
|
1e5ed2a2e3 | ||
|
e1467dfe23 | ||
|
c480f96d30 | ||
|
cf613aafb2 | ||
|
20dbf7c5f4 | ||
|
47c912c25b | ||
|
48fb1a8127 | ||
|
6c1b55db16 | ||
|
df70c8a800 | ||
|
82ae2e7118 | ||
|
0cf9b5f3df | ||
|
036a825892 | ||
|
8b43b31c64 | ||
|
3abef972a7 | ||
|
30b00741b5 | ||
|
f86e743cce | ||
|
cb96fb735e | ||
|
459a52d31d | ||
|
44ef9a13d6 | ||
|
0bb3652a63 | ||
|
6a82d683a9 | ||
|
fad708e8de | ||
|
c6a38b8355 | ||
|
ee84eb666b | ||
|
6d2793cac6 | ||
|
86d518fc2e | ||
|
25dba1a6d5 | ||
|
af949c62c2 | ||
|
ea20342d76 | ||
|
7732d52583 | ||
|
c801bc5e6b | ||
|
ea43729063 | ||
|
e26bae8027 | ||
|
555f155cad | ||
|
f8c47f59bc | ||
|
f3997128b9 | ||
|
154a4e23dd | ||
|
52e4e0e569 | ||
|
30f2b96c68 | ||
|
58c94b7773 | ||
|
83203d5f5d | ||
|
f77d161643 | ||
|
6580b139c0 | ||
|
2743c7c6ac | ||
|
062f76214e | ||
|
ce98ed98a2 | ||
|
dce9d93f6c | ||
|
f7e35a6cbe | ||
|
931335220f | ||
|
3ce35a8a4b | ||
|
9ac4e5cf6a | ||
|
bd77d7eec3 | ||
|
b5e48aa509 | ||
|
b14c42b6a4 | ||
|
ba794ba58c | ||
|
b00282590d | ||
|
44616c6872 | ||
|
aaa2b4c3db | ||
|
8974d8e4df | ||
|
699063cbb0 | ||
|
e76000b713 | ||
|
332b372e31 | ||
|
cb3fcb7bfa | ||
|
bef641609e | ||
|
24b52f09df | ||
|
942b17b807 | ||
|
cf19d7f3ad | ||
|
ebd62a4112 | ||
|
9af7357ca4 | ||
|
0dbc35c252 | ||
|
c9f03f1ac5 | ||
|
02bd292b8c | ||
|
e5f1029d0c | ||
|
cae247160f | ||
|
6692b1992c | ||
|
0937837b7f | ||
|
828888490a | ||
|
91cb6ba73b | ||
|
4ee4d32b2e | ||
|
8df630a2f5 | ||
|
2cad42870e | ||
|
43651135f3 | ||
|
6ae42eb787 | ||
|
ecaf866613 | ||
|
5ea3329b36 | ||
|
7bb7149f4c | ||
|
5856d043ca | ||
|
7cd3e49f04 | ||
|
173e75175e | ||
|
800006dd76 | ||
|
a824b6910a | ||
|
dcea382b38 | ||
|
d9f976baea | ||
|
1fa13efe19 | ||
|
33af5cd7c6 | ||
|
7cb8f97ef1 | ||
|
bf965a9cde | ||
|
17ffff685a | ||
|
ae76271cff | ||
|
8f3a96d615 | ||
|
30e750dfe5 | ||
|
682dff7c6f | ||
|
85415eb8a8 | ||
|
68a80b9244 | ||
|
c331da7323 | ||
|
04ffa06221 | ||
|
1f0690c6ec | ||
|
711467abcd | ||
|
9439cd0e3d | ||
|
314c19650d | ||
|
ed6afcd802 | ||
|
082d4fe8e1 | ||
|
cd23b44506 | ||
|
46b6b024b9 | ||
|
cb88cc35e5 | ||
|
75c0c44809 | ||
|
a091b82ba9 | ||
|
a3b8f022e6 | ||
|
279fcb7c51 | ||
|
49a9376073 | ||
|
96840ede56 | ||
|
7e7f481f99 | ||
|
3edbf52bc6 | ||
|
fba6e801fc | ||
|
720a163273 | ||
|
a9b12e5172 | ||
|
6ac0c0a367 | ||
|
300402d253 | ||
|
0d9bfae503 | ||
|
bfe0d3b8a3 | ||
|
5fdd9c0546 | ||
|
b6570a16b8 | ||
|
8e2d3ea16f | ||
|
bc2c81f058 | ||
|
3e0f080ea7 | ||
|
679e07189d | ||
|
a38ebef100 | ||
|
b8ad6475e1 | ||
|
0f0cb3ac6d | ||
|
d3efb9d7cc | ||
|
84a237d3f5 | ||
|
e6de52eede | ||
|
98aee964d7 | ||
|
570e5442e0 | ||
|
b77a2dc353 | ||
|
87af31de20 | ||
|
cfe201dbe1 | ||
|
6ccdab35e0 | ||
|
55b9f36b45 | ||
|
fbcb1130c9 | ||
|
d4f7a6d2bc | ||
|
8a19f71abe | ||
|
fb153757b5 | ||
|
4f175fc93e | ||
|
2d4ca7cec0 | ||
|
bf0ea89969 | ||
|
073f0c2a20 | ||
|
ba83be9062 | ||
|
2e7188ea4f | ||
|
5a012182d9 | ||
|
b55a8ef62a | ||
|
36f099d68b |
2929
CHANGELOG.md
2929
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
@@ -38,12 +38,9 @@ If you want to raise a pull-request with a new feature, or a refactoring
|
||||
of existing code, it may well get rejected if you haven't discussed it on
|
||||
the [forum](https://discourse.nodered.org) first.
|
||||
|
||||
All contributors need to sign the JS Foundation's Contributor License Agreement.
|
||||
It is an online process and quick to do. You can read the details of the agreement
|
||||
here: https://cla.js.foundation/node-red/node-red.
|
||||
|
||||
If you raise a pull-request without having signed the CLA, you will be prompted
|
||||
to do so automatically.
|
||||
All contributors need to sign the OpenJS Foundation's Contributor License Agreement.
|
||||
It is an online process and quick to do. If you raise a pull-request without
|
||||
having signed the CLA, you will be prompted to do so automatically.
|
||||
|
||||
|
||||
### Code Branches
|
||||
|
10
README.md
10
README.md
@@ -56,13 +56,13 @@ This project adheres to the [Contributor Covenant 1.4](http://contributor-covena
|
||||
|
||||
## Authors
|
||||
|
||||
Node-RED is a project of the [OpenJS Foundation](https://openjsf.org).
|
||||
Node-RED is a project of the [OpenJS Foundation](http://openjsf.org).
|
||||
|
||||
It was created by [IBM Emerging Technology](https://www.ibm.com/blogs/emerging-technology/).
|
||||
|
||||
* Nick O'Leary [@knolleary](http://twitter.com/knolleary)
|
||||
* Dave Conway-Jones [@ceejay](http://twitter.com/ceejay)
|
||||
It is maintained by:
|
||||
|
||||
* Nick O'Leary [@knolleary](http://twitter.com/knolleary)
|
||||
* Dave Conway-Jones [@ceejay](http://twitter.com/ceejay)
|
||||
* And many others...
|
||||
|
||||
|
||||
## Copyright and license
|
||||
|
56
package.json
56
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-red",
|
||||
"version": "2.1.2",
|
||||
"version": "2.2.2",
|
||||
"description": "Low-code programming for event-driven applications",
|
||||
"homepage": "http://nodered.org",
|
||||
"license": "Apache-2.0",
|
||||
@@ -26,65 +26,65 @@
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"acorn": "8.5.0",
|
||||
"acorn": "8.7.0",
|
||||
"acorn-walk": "8.2.0",
|
||||
"ajv": "8.6.3",
|
||||
"ajv": "8.10.0",
|
||||
"async-mutex": "0.3.2",
|
||||
"basic-auth": "2.0.1",
|
||||
"bcryptjs": "2.4.3",
|
||||
"body-parser": "1.19.0",
|
||||
"body-parser": "1.19.1",
|
||||
"cheerio": "1.0.0-rc.10",
|
||||
"clone": "2.1.2",
|
||||
"content-type": "1.0.4",
|
||||
"cookie": "0.4.1",
|
||||
"cookie-parser": "1.4.5",
|
||||
"cookie": "0.4.2",
|
||||
"cookie-parser": "1.4.6",
|
||||
"cors": "2.8.5",
|
||||
"cronosjs": "1.7.1",
|
||||
"denque": "2.0.1",
|
||||
"express": "4.17.1",
|
||||
"express": "4.17.2",
|
||||
"express-session": "1.17.2",
|
||||
"form-data": "4.0.0",
|
||||
"fs-extra": "10.0.0",
|
||||
"fs.notify": "0.0.4",
|
||||
"got": "11.8.2",
|
||||
"got": "11.8.3",
|
||||
"hash-sum": "2.0.0",
|
||||
"hpagent": "0.1.2",
|
||||
"https-proxy-agent": "5.0.0",
|
||||
"i18next": "21.3.1",
|
||||
"i18next": "21.6.11",
|
||||
"iconv-lite": "0.6.3",
|
||||
"is-utf8": "0.2.1",
|
||||
"js-yaml": "3.14.1",
|
||||
"json-stringify-safe": "5.0.1",
|
||||
"jsonata": "1.8.5",
|
||||
"jsonata": "1.8.6",
|
||||
"lodash.clonedeep": "^4.5.0",
|
||||
"media-typer": "1.1.0",
|
||||
"memorystore": "1.6.6",
|
||||
"mime": "2.5.2",
|
||||
"moment-timezone": "0.5.33",
|
||||
"mqtt": "4.2.8",
|
||||
"multer": "1.4.3",
|
||||
"memorystore": "1.6.7",
|
||||
"mime": "3.0.0",
|
||||
"moment-timezone": "0.5.34",
|
||||
"mqtt": "4.3.5",
|
||||
"multer": "1.4.4",
|
||||
"mustache": "4.2.0",
|
||||
"node-red-admin": "^2.2.1",
|
||||
"node-red-admin": "^2.2.3",
|
||||
"nopt": "5.0.0",
|
||||
"oauth2orize": "1.11.0",
|
||||
"oauth2orize": "1.11.1",
|
||||
"on-headers": "1.0.2",
|
||||
"passport": "0.5.0",
|
||||
"passport": "0.5.2",
|
||||
"passport-http-bearer": "1.0.1",
|
||||
"passport-oauth2-client-password": "0.1.2",
|
||||
"raw-body": "2.4.1",
|
||||
"raw-body": "2.4.3",
|
||||
"semver": "7.3.5",
|
||||
"tar": "6.1.11",
|
||||
"tough-cookie": "4.0.0",
|
||||
"uglify-js": "3.14.2",
|
||||
"uglify-js": "3.15.1",
|
||||
"uuid": "8.3.2",
|
||||
"ws": "7.5.1",
|
||||
"ws": "7.5.6",
|
||||
"xml2js": "0.4.23"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"bcrypt": "5.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"dompurify": "2.3.3",
|
||||
"dompurify": "2.3.5",
|
||||
"grunt": "1.4.1",
|
||||
"grunt-chmod": "~1.1.1",
|
||||
"grunt-cli": "~1.4.3",
|
||||
@@ -104,20 +104,20 @@
|
||||
"grunt-sass": "~3.1.0",
|
||||
"grunt-simple-mocha": "~0.4.1",
|
||||
"grunt-simple-nyc": "^3.0.1",
|
||||
"i18next-http-backend": "1.3.1",
|
||||
"i18next-http-backend": "1.3.2",
|
||||
"jquery-i18next": "1.2.1",
|
||||
"jsdoc-nr-template": "github:node-red/jsdoc-nr-template",
|
||||
"marked": "3.0.7",
|
||||
"marked": "4.0.12",
|
||||
"minami": "1.2.3",
|
||||
"mocha": "9.1.2",
|
||||
"mocha": "9.2.0",
|
||||
"node-red-node-test-helper": "^0.2.7",
|
||||
"nodemon": "2.0.13",
|
||||
"nodemon": "2.0.15",
|
||||
"proxy": "^1.0.2",
|
||||
"sass": "1.43.2",
|
||||
"sass": "1.49.7",
|
||||
"should": "13.2.3",
|
||||
"sinon": "11.1.2",
|
||||
"stoppable": "^1.1.0",
|
||||
"supertest": "6.1.6"
|
||||
"supertest": "6.2.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
Copyright JS Foundation and other contributors, http://js.foundation
|
||||
Copyright OpenJS Foundation and other contributors, https://openjsf.org/
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
|
@@ -141,7 +141,7 @@ function completeVerify(profile,done) {
|
||||
Users.authenticate(profile).then(function(user) {
|
||||
if (user) {
|
||||
Tokens.create(user.username,"node-red-editor",user.permissions).then(function(tokens) {
|
||||
log.audit({event: "auth.login",username:user.username,scope:user.permissions});
|
||||
log.audit({event: "auth.login",user,username:user.username,scope:user.permissions});
|
||||
user.tokens = tokens;
|
||||
done(null,user);
|
||||
});
|
||||
|
@@ -93,7 +93,7 @@ var passwordTokenExchange = function(client, username, password, scope, done) {
|
||||
return logEntry.user !== username;
|
||||
});
|
||||
Tokens.create(username,client.id,scope).then(function(tokens) {
|
||||
log.audit({event: "auth.login",username:username,client:client.id,scope:scope});
|
||||
log.audit({event: "auth.login",user,username:username,client:client.id,scope:scope});
|
||||
done(null,tokens.accessToken,null,{expires_in:tokens.expires_in});
|
||||
});
|
||||
} else {
|
||||
@@ -146,7 +146,7 @@ function authenticateUserToken(req) {
|
||||
} else {
|
||||
reject();
|
||||
}
|
||||
});
|
||||
}).catch(reject);
|
||||
} else {
|
||||
reject();
|
||||
}
|
||||
@@ -163,6 +163,9 @@ TokensStrategy.prototype.authenticate = function(req) {
|
||||
authenticateUserToken(req).then(user => {
|
||||
this.success(user,{scope:user.permissions});
|
||||
}).catch(err => {
|
||||
if (err) {
|
||||
log.trace("token authentication failure: "+err.stack?err.stack:err)
|
||||
}
|
||||
this.fail(401);
|
||||
});
|
||||
}
|
||||
|
@@ -48,9 +48,10 @@ module.exports = {
|
||||
var prevLang = i18n.i.language;
|
||||
// Trigger a load from disk of the language if it is not the default
|
||||
i18n.i.changeLanguage(lang, function(){
|
||||
var catalog = loadResource(lang, namespace);
|
||||
res.json(catalog||{});
|
||||
i18n.i.changeLanguage(prevLang, function() {
|
||||
var catalog = loadResource(lang, namespace);
|
||||
res.json(catalog||{});
|
||||
});
|
||||
});
|
||||
i18n.i.changeLanguage(prevLang);
|
||||
}
|
||||
}
|
||||
|
@@ -122,6 +122,7 @@ module.exports = {
|
||||
}
|
||||
|
||||
if (req.body.active) {
|
||||
opts.clearContext = req.body.hasOwnProperty('clearContext')?req.body.clearContext:true
|
||||
runtimeAPI.projects.setActiveProject(opts).then(function() {
|
||||
listProjects(req,res);
|
||||
}).catch(function(err) {
|
||||
|
@@ -228,6 +228,11 @@ module.exports = {
|
||||
if (theme.theme) {
|
||||
themeSettings.theme = theme.theme;
|
||||
}
|
||||
|
||||
if (theme.hasOwnProperty("tours")) {
|
||||
themeSettings.tours = theme.tours;
|
||||
}
|
||||
|
||||
return themeApp;
|
||||
},
|
||||
context: async function() {
|
||||
|
@@ -90,6 +90,8 @@ function init(settings,_server,storage,runtimeAPI) {
|
||||
auth.getToken,
|
||||
auth.errorHandler
|
||||
);
|
||||
} else if (settings.adminAuth.tokens) {
|
||||
adminApp.use(passport.initialize());
|
||||
}
|
||||
adminApp.post("/auth/revoke",auth.needsPermission(""),auth.revoke,apiUtil.errorHandler);
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@node-red/editor-api",
|
||||
"version": "2.1.2",
|
||||
"version": "2.2.2",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./lib/index.js",
|
||||
"repository": {
|
||||
@@ -16,23 +16,23 @@
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"@node-red/util": "2.1.2",
|
||||
"@node-red/editor-client": "2.1.2",
|
||||
"@node-red/util": "2.2.2",
|
||||
"@node-red/editor-client": "2.2.2",
|
||||
"bcryptjs": "2.4.3",
|
||||
"body-parser": "1.19.0",
|
||||
"body-parser": "1.19.1",
|
||||
"clone": "2.1.2",
|
||||
"cors": "2.8.5",
|
||||
"express-session": "1.17.2",
|
||||
"express": "4.17.1",
|
||||
"memorystore": "1.6.6",
|
||||
"mime": "2.5.2",
|
||||
"multer": "1.4.3",
|
||||
"express": "4.17.2",
|
||||
"memorystore": "1.6.7",
|
||||
"mime": "3.0.0",
|
||||
"multer": "1.4.4",
|
||||
"mustache": "4.2.0",
|
||||
"oauth2orize": "1.11.0",
|
||||
"oauth2orize": "1.11.1",
|
||||
"passport-http-bearer": "1.0.1",
|
||||
"passport-oauth2-client-password": "0.1.2",
|
||||
"passport": "0.5.0",
|
||||
"ws": "7.5.1"
|
||||
"passport": "0.5.2",
|
||||
"ws": "7.5.6"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"bcrypt": "5.0.1"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
Copyright JS Foundation and other contributors, http://js.foundation
|
||||
Copyright OpenJS Foundation and other contributors, https://openjsf.org/
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
|
@@ -634,14 +634,7 @@
|
||||
"empty": "leer",
|
||||
"globalConfig": "Globale Konfigurations-Nodes",
|
||||
"triggerAction": "Auslösen",
|
||||
"find": "Suche im Arbeitsbereich",
|
||||
"search": {
|
||||
"configNodes": "Konfigurations-Nodes",
|
||||
"unusedConfigNodes": "Unbenutzte Konfigurations-Nodes",
|
||||
"invalidNodes": "Ungültige Nodes",
|
||||
"uknownNodes": "Unbekannte Nodes",
|
||||
"unusedSubflows": "Unbenutzte Subflows"
|
||||
}
|
||||
"find": "Suche im Arbeitsbereich"
|
||||
},
|
||||
"help": {
|
||||
"name": "Hilfe",
|
||||
@@ -863,7 +856,14 @@
|
||||
},
|
||||
"search": {
|
||||
"empty": "Keine Übereinstimmungen gefunden",
|
||||
"addNode": "Node hinzufügen ..."
|
||||
"addNode": "Node hinzufügen ...",
|
||||
"options": {
|
||||
"configNodes": "Konfigurations-Nodes",
|
||||
"unusedConfigNodes": "Unbenutzte Konfigurations-Nodes",
|
||||
"invalidNodes": "Ungültige Nodes",
|
||||
"uknownNodes": "Unbekannte Nodes",
|
||||
"unusedSubflows": "Unbenutzte Subflows"
|
||||
}
|
||||
},
|
||||
"expressionEditor": {
|
||||
"functions": "Funktionen",
|
||||
|
@@ -59,6 +59,8 @@
|
||||
"hideOtherFlows": "Hide other flows",
|
||||
"showAllFlows": "Show all flows",
|
||||
"hideAllFlows": "Hide all flows",
|
||||
"hiddenFlows": "List __count__ hidden flow",
|
||||
"hiddenFlows_plural": "List __count__ hidden flows",
|
||||
"showLastHiddenFlow": "Show last hidden flow",
|
||||
"listFlows": "List flows",
|
||||
"listSubflows": "List subflows",
|
||||
@@ -73,6 +75,8 @@
|
||||
"view": {
|
||||
"view": "View",
|
||||
"grid": "Grid",
|
||||
"storeZoom": "Restore zoom level on load",
|
||||
"storePosition": "Restore scroll position on load",
|
||||
"showGrid": "Show grid",
|
||||
"snapGrid": "Snap to grid",
|
||||
"gridSize": "Grid size",
|
||||
@@ -90,6 +94,7 @@
|
||||
"palette": {
|
||||
"show": "Show palette"
|
||||
},
|
||||
"edit": "Edit",
|
||||
"settings": "Settings",
|
||||
"userSettings": "User Settings",
|
||||
"nodes": "Nodes",
|
||||
@@ -144,7 +149,11 @@
|
||||
"toggle-navigator": "Toggle navigator",
|
||||
"zoom-out": "Zoom out",
|
||||
"zoom-reset": "Reset zoom",
|
||||
"zoom-in": "Zoom in"
|
||||
"zoom-in": "Zoom in",
|
||||
"search-flows": "Search flows",
|
||||
"search-prev": "Previous",
|
||||
"search-next": "Next",
|
||||
"search-counter": "\"__term__\" __result__ of __count__"
|
||||
},
|
||||
"user": {
|
||||
"loggedInAs": "Logged in as __name__",
|
||||
@@ -492,7 +501,8 @@
|
||||
"redoChange": "Redo",
|
||||
"searchBox": "Open search box",
|
||||
"managePalette": "Manage palette",
|
||||
"actionList":"Action list"
|
||||
"actionList": "Action list",
|
||||
"splitWiresWithLinks": "Split selection with Link nodes"
|
||||
},
|
||||
"library": {
|
||||
"library": "Library",
|
||||
@@ -662,14 +672,7 @@
|
||||
"empty": "empty",
|
||||
"globalConfig": "Global Configuration Nodes",
|
||||
"triggerAction": "Trigger action",
|
||||
"find": "Find in workspace",
|
||||
"search": {
|
||||
"configNodes": "Configuration nodes",
|
||||
"unusedConfigNodes": "Unused configuration nodes",
|
||||
"invalidNodes": "Invalid nodes",
|
||||
"uknownNodes": "Unknown nodes",
|
||||
"unusedSubflows": "Unused subflows"
|
||||
}
|
||||
"find": "Find in workspace"
|
||||
},
|
||||
"help": {
|
||||
"name": "Help",
|
||||
@@ -890,8 +893,19 @@
|
||||
"addTitle": "add an item"
|
||||
},
|
||||
"search": {
|
||||
"history": "Search history",
|
||||
"clear": "clear all",
|
||||
"empty": "No matches found",
|
||||
"addNode": "add a node..."
|
||||
"addNode": "add a node...",
|
||||
"options": {
|
||||
"configNodes": "Configuration nodes",
|
||||
"unusedConfigNodes": "Unused configuration nodes",
|
||||
"invalidNodes": "Invalid nodes",
|
||||
"uknownNodes": "Unknown nodes",
|
||||
"unusedSubflows": "Unused subflows",
|
||||
"hiddenFlows": "Hidden flows",
|
||||
"modifiedNodes": "Modified nodes and flows"
|
||||
}
|
||||
},
|
||||
"expressionEditor": {
|
||||
"functions": "Functions",
|
||||
@@ -1087,7 +1101,8 @@
|
||||
"not-git": "Not a git repository",
|
||||
"no-resource": "Repository not found",
|
||||
"cant-get-ssh-key-path": "Error! Can't get selected SSH key path.",
|
||||
"unexpected_error": "unexpected_error"
|
||||
"unexpected_error": "unexpected_error",
|
||||
"clearContext": "Clear context when switching projects"
|
||||
},
|
||||
"delete": {
|
||||
"confirm": "Are you sure you want to delete this project?"
|
||||
@@ -1135,6 +1150,7 @@
|
||||
"defaultValue": "Default value"
|
||||
},
|
||||
"tourGuide": {
|
||||
"takeATour": "Take a tour",
|
||||
"start": "Start",
|
||||
"next": "Next"
|
||||
},
|
||||
|
@@ -54,7 +54,16 @@
|
||||
"delete": "本当に '__label__' を削除しますか?",
|
||||
"dropFlowHere": "ここにフローをドロップしてください",
|
||||
"addFlow": "フローの追加",
|
||||
"addFlowToRight": "右側にフローを追加",
|
||||
"hideFlow": "フローを非表示",
|
||||
"hideOtherFlows": "他のフローを非表示",
|
||||
"showAllFlows": "全てのフローを表示",
|
||||
"hideAllFlows": "全てのフローを非表示",
|
||||
"hiddenFlows": "__count__ 個の非表示のフロー一覧",
|
||||
"hiddenFlows_plural": "__count__ 個の非表示のフロー一覧",
|
||||
"showLastHiddenFlow": "最後に非表示にしたフローを表示",
|
||||
"listFlows": "フロー一覧",
|
||||
"listSubflows": "サブフロー一覧",
|
||||
"status": "状態",
|
||||
"enabled": "有効",
|
||||
"disabled": "無効",
|
||||
@@ -66,6 +75,8 @@
|
||||
"view": {
|
||||
"view": "表示",
|
||||
"grid": "グリッド",
|
||||
"storeZoom": "読み込み時に拡大/縮小のレベルを復元",
|
||||
"storePosition": "読み込み時にスクロール位置を復元",
|
||||
"showGrid": "グリッドを表示",
|
||||
"snapGrid": "ノードの配置を補助",
|
||||
"gridSize": "グリッドの大きさ",
|
||||
@@ -83,6 +94,7 @@
|
||||
"palette": {
|
||||
"show": "パレットを表示"
|
||||
},
|
||||
"edit": "編集",
|
||||
"settings": "設定",
|
||||
"userSettings": "ユーザ設定",
|
||||
"nodes": "ノード",
|
||||
@@ -105,6 +117,7 @@
|
||||
"editPalette": "パレットの管理",
|
||||
"other": "その他",
|
||||
"showTips": "ヒントを表示",
|
||||
"showWelcomeTours": "新バージョンのガイドツアーを表示",
|
||||
"help": "Node-REDウェブサイト",
|
||||
"projects": "プロジェクト",
|
||||
"projects-new": "新規",
|
||||
@@ -116,7 +129,20 @@
|
||||
"groupSelection": "選択部分をグループ化",
|
||||
"ungroupSelection": "選択部分をグループ解除",
|
||||
"groupMergeSelection": "選択部分をマージ",
|
||||
"groupRemoveSelection": "グループから削除"
|
||||
"groupRemoveSelection": "グループから削除",
|
||||
"arrange": "配置",
|
||||
"alignLeft": "左揃え",
|
||||
"alignCenter": "左右中央揃え",
|
||||
"alignRight": "右揃え",
|
||||
"alignTop": "上揃え",
|
||||
"alignMiddle": "上下中央揃え",
|
||||
"alignBottom": "下揃え",
|
||||
"distributeHorizontally": "左右に整列",
|
||||
"distributeVertically": "上下に整列",
|
||||
"moveToBack": "最背面へ移動",
|
||||
"moveToFront": "最前面へ移動",
|
||||
"moveBackwards": "背面へ移動",
|
||||
"moveForwards": "前面へ移動"
|
||||
}
|
||||
},
|
||||
"actions": {
|
||||
@@ -451,7 +477,8 @@
|
||||
"global": "グローバル",
|
||||
"workspace": "ワークスペース",
|
||||
"selectAll": "全てのノードを選択",
|
||||
"selectAllConnected": "接続された全てのノードを選択",
|
||||
"selectNone": "選択を外す",
|
||||
"selectAllConnected": "接続されたノードを選択",
|
||||
"addRemoveNode": "ノードの選択、選択解除",
|
||||
"editSelected": "選択したノードを編集",
|
||||
"deleteSelected": "選択したノードや接続を削除",
|
||||
@@ -461,10 +488,13 @@
|
||||
"moveNode": "選択したノードを移動(移動量大)",
|
||||
"toggleSidebar": "サイドバーの表示/非表示",
|
||||
"togglePalette": "パレットの表示/非表示",
|
||||
"copyNode": "選択したノードをコピー",
|
||||
"cutNode": "選択したノードを切り取り",
|
||||
"copyNode": "ノードをコピー",
|
||||
"cutNode": "ノードを切り取り",
|
||||
"pasteNode": "ノードを貼り付け",
|
||||
"copyGroupStyle": "グループ様式をコピー",
|
||||
"pasteGroupStyle": "グループ様式を貼り付け",
|
||||
"undoChange": "変更操作を戻す",
|
||||
"redoChange": "変更操作をやり直し",
|
||||
"searchBox": "ノードを検索",
|
||||
"managePalette": "パレットの管理",
|
||||
"actionList": "動作一覧"
|
||||
@@ -519,7 +549,8 @@
|
||||
"nodeEnabled_plural": "ノードを有効化しました:",
|
||||
"nodeDisabled": "ノードを無効化しました:",
|
||||
"nodeDisabled_plural": "ノードを無効化しました:",
|
||||
"nodeUpgraded": "ノードモジュール __module__ をバージョン __version__ へ更新しました"
|
||||
"nodeUpgraded": "ノードモジュール __module__ をバージョン __version__ へ更新しました",
|
||||
"unknownNodeRegistered": "ノードの読み込みエラー: <ul><li>__type__<br>__error__</li></ul>"
|
||||
},
|
||||
"editor": {
|
||||
"title": "パレットの管理",
|
||||
@@ -636,14 +667,7 @@
|
||||
"empty": "空",
|
||||
"globalConfig": "グローバル設定ノード",
|
||||
"triggerAction": "アクションを実行",
|
||||
"find": "ワークスペース内を検索",
|
||||
"search": {
|
||||
"configNodes": "設定ノード",
|
||||
"unusedConfigNodes": "未使用の設定ノード",
|
||||
"invalidNodes": "不正なノード",
|
||||
"uknownNodes": "未知のノード",
|
||||
"unusedSubflows": "未使用のサブフロー"
|
||||
}
|
||||
"find": "ワークスペース内を検索"
|
||||
},
|
||||
"help": {
|
||||
"name": "ヘルプ",
|
||||
@@ -864,8 +888,18 @@
|
||||
"addTitle": "要素を追加"
|
||||
},
|
||||
"search": {
|
||||
"history": "検索履歴",
|
||||
"clear": "全て削除",
|
||||
"empty": "一致したものが見つかりませんでした",
|
||||
"addNode": "ノードを追加..."
|
||||
"addNode": "ノードを追加...",
|
||||
"options": {
|
||||
"configNodes": "設定ノード",
|
||||
"unusedConfigNodes": "未使用の設定ノード",
|
||||
"invalidNodes": "不正なノード",
|
||||
"uknownNodes": "未知のノード",
|
||||
"unusedSubflows": "未使用のサブフロー",
|
||||
"hiddenFlows": "非表示のフロー"
|
||||
}
|
||||
},
|
||||
"expressionEditor": {
|
||||
"functions": "関数",
|
||||
@@ -1061,7 +1095,8 @@
|
||||
"not-git": "Gitリポジトリではありません",
|
||||
"no-resource": "リポジトリが見つかりません",
|
||||
"cant-get-ssh-key-path": "エラー! 選択したSSHキーのパスを取得できません。",
|
||||
"unexpected_error": "予期しないエラー"
|
||||
"unexpected_error": "予期しないエラー",
|
||||
"clearContext": "プロジェクトを切り替る際にコンテキストを初期化"
|
||||
},
|
||||
"delete": {
|
||||
"confirm": "プロジェクトを削除しても良いですか?"
|
||||
@@ -1108,6 +1143,11 @@
|
||||
"preview": "UIプレビュー",
|
||||
"defaultValue": "デフォルト値"
|
||||
},
|
||||
"tourGuide": {
|
||||
"takeATour": "ツアーを開始",
|
||||
"start": "開始",
|
||||
"next": "次へ"
|
||||
},
|
||||
"languages": {
|
||||
"de": "ドイツ語",
|
||||
"en-US": "英語",
|
||||
@@ -1116,5 +1156,137 @@
|
||||
"ru": "ロシア語",
|
||||
"zh-CN": "中国語(簡体)",
|
||||
"zh-TW": "中国語(繁体)"
|
||||
},
|
||||
"action-list": {
|
||||
"toggle-show-tips": "ヒント表示切替",
|
||||
"show-about": "Node-REDの説明を表示",
|
||||
"show-welcome-tour": "ウェルカムツアー表示",
|
||||
"show-next-tab": "次のタブを表示",
|
||||
"show-previous-tab": "前のタブを表示",
|
||||
"add-flow": "フローを追加",
|
||||
"add-flow-to-right": "フローを右に追加",
|
||||
"edit-flow": "フローを編集",
|
||||
"remove-flow": "フローを削除",
|
||||
"enable-flow": "フローを有効化",
|
||||
"disable-flow": "フローを無効化",
|
||||
"hide-flow": "フローを隠す",
|
||||
"hide-other-flows": "他のフローを非表示",
|
||||
"hide-all-flows": "全てのフローを非表示",
|
||||
"show-all-flows": "全てのフローを表示",
|
||||
"show-last-hidden-flow": "最後に非表示にしたフローを表示",
|
||||
"list-hidden-flows": "非表示フローを表示",
|
||||
"list-flows": "フロー一覧",
|
||||
"list-subflows": "サブフロー一覧",
|
||||
"go-to-previous-location": "前の位置に移動",
|
||||
"go-to-next-location": "次の位置に移動",
|
||||
"copy-selection-to-internal-clipboard": "選択をクリップボードにコピー",
|
||||
"cut-selection-to-internal-clipboard": "選択をクリップボードに切り取り",
|
||||
"paste-from-internal-clipboard": "クリップボードから貼り付け",
|
||||
"detach-selected-nodes": "選択ノードを接続から外す",
|
||||
"delete-selection": "選択を削除",
|
||||
"delete-selection-and-reconnect": "選択を削除し再接続",
|
||||
"edit-selected-node": "選択したノードを編集",
|
||||
"go-to-selection": "選択に移動",
|
||||
"undo": "変更操作を戻す",
|
||||
"redo": "変更操作をやり直し",
|
||||
"select-all-nodes": "全てのノードを選択",
|
||||
"select-none": "ノードを選択",
|
||||
"enable-selected-nodes": "選択ノードを有効化",
|
||||
"disable-selected-nodes": "選択ノードを無効化",
|
||||
"toggle-show-grid": "グリッド表示切替",
|
||||
"toggle-snap-grid": "ノードの配置補助切替",
|
||||
"toggle-status": "ステータス表示切替",
|
||||
"show-selected-node-labels": "選択したノードのラベルを表示",
|
||||
"hide-selected-node-labels": "選択したノードのラベルを非表示",
|
||||
"scroll-view-up": "上スクロール",
|
||||
"scroll-view-right": "右スクロール",
|
||||
"scroll-view-down": "下スクロール",
|
||||
"scroll-view-left": "左スクロール",
|
||||
"step-view-up": "一単位上スクロール",
|
||||
"step-view-right": "一単位右スクロール",
|
||||
"step-view-down": "一単位下スクロール",
|
||||
"step-view-left": "一単位左スクロール",
|
||||
"move-selection-up": "選択を上移動",
|
||||
"move-selection-right": "選択を右移動",
|
||||
"move-selection-down": "選択を下移動",
|
||||
"move-selection-left": "選択を左移動",
|
||||
"move-selection-forwards": "選択を前面に移動",
|
||||
"move-selection-backwards": "選択を背面に移動",
|
||||
"move-selection-to-front": "選択を最前面に移動",
|
||||
"move-selection-to-back": "選択を最背面に移動",
|
||||
"step-selection-up": "選択を一単位上移動",
|
||||
"step-selection-right": "選択を一単位右移動",
|
||||
"step-selection-down": "選択を一単位下移動",
|
||||
"step-selection-left": "選択を一単位左移動",
|
||||
"select-connected-nodes": "接続されたノードを選択",
|
||||
"select-downstream-nodes": "後方に接続されたノードを選択",
|
||||
"select-upstream-nodes": "前方に接続されたノードを選択",
|
||||
"go-to-next-node": "次のノードに移動",
|
||||
"go-to-previous-node": "前のノードに移動",
|
||||
"go-to-next-sibling": "次の兄弟ノードに移動",
|
||||
"go-to-previous-sibling": "前の兄弟ノードに移動",
|
||||
"go-to-nearest-node-on-left": "最も近い左側ノードに移動",
|
||||
"go-to-nearest-node-on-right": "最も近い右側ノードに移動",
|
||||
"go-to-nearest-node-above": "最も近い上側ノードに移動",
|
||||
"go-to-nearest-node-below": "最も近い下側ノードに移動",
|
||||
"align-selection-to-grid": "選択を整列",
|
||||
"align-selection-to-left": "選択を左揃え",
|
||||
"align-selection-to-right": "選択を右揃え",
|
||||
"align-selection-to-top": "選択を上揃え",
|
||||
"align-selection-to-bottom": "選択を下揃え",
|
||||
"align-selection-to-middle": "選択を上下中央揃え",
|
||||
"align-selection-to-center": "選択を左右中央揃え",
|
||||
"distribute-selection-horizontally": "選択を左右に整列",
|
||||
"distribute-selection-vertically": "選択を上下に整列",
|
||||
"wire-series-of-nodes": "ノードを一続きに接続",
|
||||
"wire-node-to-multiple": "ノードを複数に接続",
|
||||
"show-user-settings": "ユーザ設定を表示",
|
||||
"show-help": "ヘルプを表示",
|
||||
"toggle-palette": "パレットの表示切替",
|
||||
"show-event-log": "イベントログを表示",
|
||||
"manage-palette": "パレットの管理",
|
||||
"toggle-sidebar": "サイドバーの表示切替",
|
||||
"show-info-tab": "ノード情報タブの表示",
|
||||
"show-help-tab": "ノードヘルプタブの表示",
|
||||
"show-config-tab": "設定ノードタブの表示",
|
||||
"select-all-config-nodes": "全ての設定ノードを選択",
|
||||
"delete-config-selection": "選択した設定ノードを削除",
|
||||
"show-context-tab": "コンテキストデータタブを表示",
|
||||
"create-subflow": "サブフローを作成",
|
||||
"convert-to-subflow": "選択をサブフローに変換",
|
||||
"group-selection": "選択をグループ化",
|
||||
"ungroup-selection": "選択をグループ解除",
|
||||
"merge-selection-to-group": "選択をグループにマージ",
|
||||
"remove-selection-from-group": "選択をグループから削除",
|
||||
"copy-group-style": "グループのスタイルをコピー",
|
||||
"paste-group-style": "グループのスタイルを貼り付け",
|
||||
"show-export-dialog": "書き出しダイアログを表示",
|
||||
"show-import-dialog": "読み込みダイアログを表示",
|
||||
"show-library-export-dialog": "ライブラリ書き出しダイアログを表示",
|
||||
"show-library-import-dialog": "ライブラリ読み込みダイアログを表示",
|
||||
"show-examples-import-dialog": "サンプル読み込みダイアログを表示",
|
||||
"search": "検索",
|
||||
"show-action-list": "アクション一覧を表示",
|
||||
"confirm-edit-tray": "編集を完了",
|
||||
"cancel-edit-tray": "編集をキャンセル",
|
||||
"show-remote-diff": "リモートとの変更差分を表示",
|
||||
"deploy-flows": "フローをデプロイ",
|
||||
"restart-flows": "フローを再起動",
|
||||
"set-deploy-type-to-full": "デプロイを「全て」に設定",
|
||||
"set-deploy-type-to-modified-flows": "デプロイを「変更したフロー」に設定",
|
||||
"set-deploy-type-to-modified-nodes": "デプロイを「変更したノード」に設定",
|
||||
"show-debug-tab": "デバッグタブを表示",
|
||||
"clear-debug-messages": "デバッグメッセージをクリア",
|
||||
"clear-filtered-debug-messages": "フィルタしたデバッグメッセージをクリア",
|
||||
"activate-selected-debug-nodes": "選択したデバッグノードを有効化",
|
||||
"activate-all-debug-nodes": "全てのデバッグノードを有効化",
|
||||
"activate-all-flow-debug-nodes": "フロー内の全デバッグノードを有効化",
|
||||
"deactivate-selected-debug-nodes": "選択したデバッグノードを無効化",
|
||||
"deactivate-all-debug-nodes": "全てのデバッグノードを無効化",
|
||||
"deactivate-all-flow-debug-nodes": "フロー内の全デバッグノードを無効化",
|
||||
"zoom-in": "ズームイン",
|
||||
"zoom-out": "ズームアウト",
|
||||
"zoom-reset": "ズームリセット",
|
||||
"toggle-navigator": "ナビゲータ表示切替"
|
||||
}
|
||||
}
|
||||
|
@@ -650,14 +650,7 @@
|
||||
"empty": "пусто",
|
||||
"globalConfig": "Глобальные конфиг узлы",
|
||||
"triggerAction": "Вызвать действие",
|
||||
"find": "Найти в рабочей области",
|
||||
"search": {
|
||||
"configNodes": "Узлы конфигурации",
|
||||
"unusedConfigNodes": "Неиспользуемые узлы конфигурации",
|
||||
"invalidNodes": "Недействительные узлы",
|
||||
"uknownNodes": "Неизвестные узлы",
|
||||
"unusedSubflows": "Неиспользуемые подпотоки"
|
||||
}
|
||||
"find": "Найти в рабочей области"
|
||||
},
|
||||
"help": {
|
||||
"name": "Справка",
|
||||
@@ -888,7 +881,14 @@
|
||||
},
|
||||
"search": {
|
||||
"empty": "Ничего не найдено",
|
||||
"addNode": "добавить узел..."
|
||||
"addNode": "добавить узел...",
|
||||
"options": {
|
||||
"configNodes": "Узлы конфигурации",
|
||||
"unusedConfigNodes": "Неиспользуемые узлы конфигурации",
|
||||
"invalidNodes": "Недействительные узлы",
|
||||
"uknownNodes": "Неизвестные узлы",
|
||||
"unusedSubflows": "Неиспользуемые подпотоки"
|
||||
}
|
||||
},
|
||||
"expressionEditor": {
|
||||
"functions": "Функции",
|
||||
|
@@ -225,7 +225,7 @@
|
||||
"compact": "紧凑",
|
||||
"formatted": "已格式化",
|
||||
"copy": "导出到剪贴板",
|
||||
"export": "到处到库",
|
||||
"export": "导出到库",
|
||||
"exportAs": "导出为",
|
||||
"overwrite": "替换",
|
||||
"exists": "<p><b>\"__file__\"</b>已存在</p><p>是否要替换它?</p>"
|
||||
@@ -614,14 +614,7 @@
|
||||
"empty": "空的",
|
||||
"globalConfig": "全局配置节点",
|
||||
"triggerAction": "触发动作",
|
||||
"find": "在工作区中查找",
|
||||
"search": {
|
||||
"configNodes": "配置节点",
|
||||
"unusedConfigNodes": "未使用的配置节点",
|
||||
"invalidNodes": "无效的节点",
|
||||
"uknownNodes": "未知的节点",
|
||||
"unusedSubflows": "未使用的子流程"
|
||||
}
|
||||
"find": "在工作区中查找"
|
||||
},
|
||||
"help": {
|
||||
"name": "帮助",
|
||||
@@ -842,7 +835,14 @@
|
||||
},
|
||||
"search": {
|
||||
"empty": "找不到匹配",
|
||||
"addNode": "添加一个节点..."
|
||||
"addNode": "添加一个节点...",
|
||||
"options": {
|
||||
"configNodes": "配置节点",
|
||||
"unusedConfigNodes": "未使用的配置节点",
|
||||
"invalidNodes": "无效的节点",
|
||||
"uknownNodes": "未知的节点",
|
||||
"unusedSubflows": "未使用的子流程"
|
||||
}
|
||||
},
|
||||
"expressionEditor": {
|
||||
"functions": "功能",
|
||||
|
@@ -614,14 +614,7 @@
|
||||
"empty": "空的",
|
||||
"globalConfig": "全局配置節點",
|
||||
"triggerAction": "觸發動作",
|
||||
"find": "在工作區中查找",
|
||||
"search": {
|
||||
"configNodes": "配置節點",
|
||||
"unusedConfigNodes": "未使用的配置節點",
|
||||
"invalidNodes": "無效的節點",
|
||||
"uknownNodes": "未知的節點",
|
||||
"unusedSubflows": "未使用的子流程"
|
||||
}
|
||||
"find": "在工作區中查找"
|
||||
},
|
||||
"help": {
|
||||
"name": "幫助",
|
||||
@@ -842,7 +835,14 @@
|
||||
},
|
||||
"search": {
|
||||
"empty": "找不到匹配",
|
||||
"addNode": "添加一個節點..."
|
||||
"addNode": "添加一個節點...",
|
||||
"options": {
|
||||
"configNodes": "配置節點",
|
||||
"unusedConfigNodes": "未使用的配置節點",
|
||||
"invalidNodes": "無效的節點",
|
||||
"uknownNodes": "未知的節點",
|
||||
"unusedSubflows": "未使用的子流程"
|
||||
}
|
||||
},
|
||||
"expressionEditor": {
|
||||
"functions": "功能",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@node-red/editor-client",
|
||||
"version": "2.1.2",
|
||||
"version": "2.2.2",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@@ -13,6 +13,11 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
**/
|
||||
|
||||
/**
|
||||
* An API for undo / redo history buffer
|
||||
* @namespace RED.history
|
||||
*/
|
||||
RED.history = (function() {
|
||||
var undoHistory = [];
|
||||
var redoHistory = [];
|
||||
@@ -101,6 +106,23 @@ RED.history = (function() {
|
||||
RED.nodes.removeLink(ev.links[i]);
|
||||
}
|
||||
}
|
||||
if (ev.junctions) {
|
||||
inverseEv.junctions = [];
|
||||
for (i=0;i<ev.junctions.length;i++) {
|
||||
inverseEv.junctions.push(ev.junctions[i]);
|
||||
RED.nodes.removeJunction(ev.junctions[i]);
|
||||
if (ev.junctions[i].g) {
|
||||
var group = RED.nodes.group(ev.junctions[i].g);
|
||||
var index = group.nodes.indexOf(ev.junctions[i]);
|
||||
if (index !== -1) {
|
||||
group.nodes.splice(index,1);
|
||||
RED.group.markDirty(group);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
if (ev.groups) {
|
||||
inverseEv.groups = [];
|
||||
for (i = ev.groups.length - 1;i>=0;i--) {
|
||||
@@ -267,6 +289,21 @@ RED.history = (function() {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ev.junctions) {
|
||||
inverseEv.junctions = [];
|
||||
for (i=0;i<ev.junctions.length;i++) {
|
||||
inverseEv.junctions.push(ev.junctions[i]);
|
||||
RED.nodes.addJunction(ev.junctions[i]);
|
||||
if (ev.junctions[i].g) {
|
||||
group = RED.nodes.group(ev.junctions[i].g);
|
||||
if (group.nodes.indexOf(ev.junctions[i]) === -1) {
|
||||
group.nodes.push(ev.junctions[i]);
|
||||
}
|
||||
RED.group.markDirty(group)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (ev.links) {
|
||||
inverseEv.links = [];
|
||||
for (i=0;i<ev.links.length;i++) {
|
||||
@@ -684,6 +721,13 @@ RED.history = (function() {
|
||||
peek: function() {
|
||||
return undoHistory[undoHistory.length-1];
|
||||
},
|
||||
replace: function(ev) {
|
||||
if (undoHistory.length === 0) {
|
||||
RED.history.push(ev);
|
||||
} else {
|
||||
undoHistory[undoHistory.length-1] = ev;
|
||||
}
|
||||
},
|
||||
clear: function() {
|
||||
undoHistory = [];
|
||||
redoHistory = [];
|
||||
|
@@ -38,6 +38,8 @@ RED.i18n = (function() {
|
||||
defaultNS: "editor",
|
||||
fallbackLng: ['en-US'],
|
||||
returnObjects: true,
|
||||
keySeparator: ".",
|
||||
nsSeparator: ":",
|
||||
interpolation: {
|
||||
unescapeSuffix: 'HTML',
|
||||
escapeValue: false,
|
||||
|
@@ -38,7 +38,9 @@
|
||||
},
|
||||
"red-ui-workspace": {
|
||||
"backspace": "core:delete-selection",
|
||||
"ctrl-backspace": "core:delete-selection-and-reconnect",
|
||||
"delete": "core:delete-selection",
|
||||
"ctrl-delete": "core:delete-selection-and-reconnect",
|
||||
"enter": "core:edit-selected-node",
|
||||
"ctrl-enter": "core:go-to-selection",
|
||||
"ctrl-c": "core:copy-selection-to-internal-clipboard",
|
||||
@@ -88,6 +90,10 @@
|
||||
"alt-a m": "core:align-selection-to-middle",
|
||||
"alt-a c": "core:align-selection-to-center",
|
||||
"alt-a h": "core:distribute-selection-horizontally",
|
||||
"alt-a v": "core:distribute-selection-vertically"
|
||||
"alt-a v": "core:distribute-selection-vertically",
|
||||
"shift-f": "core:search-previous",
|
||||
"f": "core:search-next",
|
||||
"alt-l l": "core:split-wire-with-link-nodes"
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -13,8 +13,16 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
**/
|
||||
|
||||
/**
|
||||
* An Interface to nodes and utility functions for creating/adding/deleting nodes and links
|
||||
* @namespace RED.nodes
|
||||
*/
|
||||
RED.nodes = (function() {
|
||||
|
||||
var PORT_TYPE_INPUT = 1;
|
||||
var PORT_TYPE_OUTPUT = 0;
|
||||
|
||||
var node_defs = {};
|
||||
var linkTabMap = {};
|
||||
|
||||
@@ -30,6 +38,9 @@ RED.nodes = (function() {
|
||||
var groups = {};
|
||||
var groupsByZ = {};
|
||||
|
||||
var junctions = {};
|
||||
var junctionsByZ = {};
|
||||
|
||||
var initialLoad;
|
||||
|
||||
var dirty = false;
|
||||
@@ -597,6 +608,14 @@ RED.nodes = (function() {
|
||||
RED.events.emit('nodes:add',n);
|
||||
}
|
||||
function addLink(l) {
|
||||
if (nodeLinks[l.source.id]) {
|
||||
const isUnique = nodeLinks[l.source.id].out.every(function(link) {
|
||||
return link.sourcePort !== l.sourcePort || link.target.id !== l.target.id
|
||||
})
|
||||
if (!isUnique) {
|
||||
return
|
||||
}
|
||||
}
|
||||
links.push(l);
|
||||
if (l.source) {
|
||||
// Possible the node hasn't been added yet
|
||||
@@ -803,16 +822,23 @@ RED.nodes = (function() {
|
||||
var removedNodes = [];
|
||||
var removedLinks = [];
|
||||
var removedGroups = [];
|
||||
var removedJunctions = [];
|
||||
if (ws) {
|
||||
delete workspaces[id];
|
||||
allNodes.removeTab(id);
|
||||
delete linkTabMap[id];
|
||||
workspacesOrder.splice(workspacesOrder.indexOf(id),1);
|
||||
var i;
|
||||
var node;
|
||||
|
||||
if (allNodes.hasTab(id)) {
|
||||
removedNodes = allNodes.getNodes(id).slice()
|
||||
removedNodes = allNodes.getNodes(id).filter(n => {
|
||||
if (n.type === 'junction') {
|
||||
removedJunctions.push(n)
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
})
|
||||
}
|
||||
for (i in configNodes) {
|
||||
if (configNodes.hasOwnProperty(i)) {
|
||||
@@ -827,6 +853,10 @@ RED.nodes = (function() {
|
||||
var result = removeNode(removedNodes[i].id);
|
||||
removedLinks = removedLinks.concat(result.links);
|
||||
}
|
||||
for (i=0;i<removedJunctions.length;i++) {
|
||||
var result = removeJunction(removedJunctions[i])
|
||||
removedLinks = removedLinks.concat(result.links)
|
||||
}
|
||||
|
||||
// Must get 'removedGroups' in the right order.
|
||||
// - start with the top-most groups
|
||||
@@ -843,9 +873,10 @@ RED.nodes = (function() {
|
||||
for (i=removedGroups.length-1; i>=0; i--) {
|
||||
removeGroup(removedGroups[i]);
|
||||
}
|
||||
allNodes.removeTab(id);
|
||||
RED.events.emit('flows:remove',ws);
|
||||
}
|
||||
return {nodes:removedNodes,links:removedLinks, groups: removedGroups};
|
||||
return {nodes:removedNodes,links:removedLinks, groups: removedGroups, junctions: removedJunctions};
|
||||
}
|
||||
|
||||
function addSubflow(sf, createNewIds) {
|
||||
@@ -1097,7 +1128,12 @@ RED.nodes = (function() {
|
||||
// Until we know how that can happen, add a filter here to remove them
|
||||
node.nodes = node.nodes.filter(function(n) { return !!n }).map(function(n) { return n.id });
|
||||
}
|
||||
if (n._def.category != "config") {
|
||||
if (n.type === "tab" || n.type === "group") {
|
||||
if (node.env && node.env.length === 0) {
|
||||
delete node.env;
|
||||
}
|
||||
}
|
||||
if (n._def.category != "config" || n.type === 'junction') {
|
||||
node.x = n.x;
|
||||
node.y = n.y;
|
||||
if (exportDimensions) {
|
||||
@@ -1360,6 +1396,11 @@ RED.nodes = (function() {
|
||||
nns.push(convertNode(groups[i], opts));
|
||||
}
|
||||
}
|
||||
for (i in junctions) {
|
||||
if (junctions.hasOwnProperty(i)) {
|
||||
nns.push(convertNode(junctions[i], opts));
|
||||
}
|
||||
}
|
||||
for (i in configNodes) {
|
||||
if (configNodes.hasOwnProperty(i)) {
|
||||
nns.push(convertNode(configNodes[i], opts));
|
||||
@@ -1441,6 +1482,7 @@ RED.nodes = (function() {
|
||||
tabs: {},
|
||||
subflows: {},
|
||||
groups: {},
|
||||
junctions: {},
|
||||
configs: {},
|
||||
nodes: {},
|
||||
all: [],
|
||||
@@ -1456,6 +1498,8 @@ RED.nodes = (function() {
|
||||
imported.subflows[n.id] = n;
|
||||
} else if (n.type === "group") {
|
||||
imported.groups[n.id] = n;
|
||||
} else if (n.type === "junction") {
|
||||
imported.junctions[n.id] = n;
|
||||
} else if (n.hasOwnProperty("x") && n.hasOwnProperty("y")) {
|
||||
imported.nodes[n.id] = n;
|
||||
} else {
|
||||
@@ -1464,7 +1508,7 @@ RED.nodes = (function() {
|
||||
var nodeZ = n.z || "__global__";
|
||||
imported.zMap[nodeZ] = imported.zMap[nodeZ] || [];
|
||||
imported.zMap[nodeZ].push(n)
|
||||
if (allNodes.hasNode(n.id) || configNodes[n.id] || workspaces[n.id] || subflows[n.id] || groups[n.id]) {
|
||||
if (allNodes.hasNode(n.id) || configNodes[n.id] || workspaces[n.id] || subflows[n.id] || groups[n.id] || junctions[n.id]) {
|
||||
imported.conflicted[n.id] = n;
|
||||
}
|
||||
})
|
||||
@@ -1630,7 +1674,7 @@ RED.nodes = (function() {
|
||||
if (!options.generateIds) {
|
||||
if (!options.importMap[id]) {
|
||||
// No conflict resolution for this node
|
||||
var existing = allNodes.getNode(id) || configNodes[id] || workspaces[id] || subflows[id] || groups[id];
|
||||
var existing = allNodes.getNode(id) || configNodes[id] || workspaces[id] || subflows[id] || groups[id] || junctions[id];
|
||||
if (existing) {
|
||||
existingNodes.push({existing:existing, imported:n});
|
||||
}
|
||||
@@ -1684,6 +1728,7 @@ RED.nodes = (function() {
|
||||
n.type != "tab" &&
|
||||
n.type != "subflow" &&
|
||||
n.type != "group" &&
|
||||
n.type != 'junction' &&
|
||||
!registry.getNodeType(n.type) &&
|
||||
n.type.substring(0,8) != "subflow:" &&
|
||||
unknownTypes.indexOf(n.type)==-1) {
|
||||
@@ -1756,6 +1801,7 @@ RED.nodes = (function() {
|
||||
var new_nodes = [];
|
||||
var new_links = [];
|
||||
var new_groups = [];
|
||||
var new_junctions = [];
|
||||
var new_group_set = new Set();
|
||||
var nid;
|
||||
var def;
|
||||
@@ -1947,12 +1993,15 @@ RED.nodes = (function() {
|
||||
changed:false,
|
||||
_config:{}
|
||||
}
|
||||
if (n.type !== "group") {
|
||||
if (n.type !== "group" && n.type !== 'junction') {
|
||||
node.wires = n.wires||[];
|
||||
node.inputLabels = n.inputLabels;
|
||||
node.outputLabels = n.outputLabels;
|
||||
node.icon = n.icon;
|
||||
}
|
||||
if (n.type === 'junction') {
|
||||
node.wires = n.wires||[];
|
||||
}
|
||||
if (n.hasOwnProperty('l')) {
|
||||
node.l = n.l;
|
||||
}
|
||||
@@ -2021,6 +2070,15 @@ RED.nodes = (function() {
|
||||
node.outputs = subflow.out.length;
|
||||
node.inputs = subflow.in.length;
|
||||
node.env = n.env;
|
||||
} else if (n.type === 'junction') {
|
||||
node._def = {defaults:{}}
|
||||
node._config.x = node.x
|
||||
node._config.y = node.y
|
||||
node.inputs = 1
|
||||
node.outputs = 1
|
||||
node.w = 0;
|
||||
node.h = 0;
|
||||
|
||||
} else {
|
||||
if (!node._def) {
|
||||
if (node.x && node.y) {
|
||||
@@ -2104,7 +2162,9 @@ RED.nodes = (function() {
|
||||
node_map[n.id] = node;
|
||||
// If an 'unknown' config node, it will not have been caught by the
|
||||
// proper config node handling, so needs adding to new_nodes here
|
||||
if (node.type === "unknown" || node._def.category !== "config") {
|
||||
if (node.type === 'junction') {
|
||||
new_junctions.push(node)
|
||||
} else if (node.type === "unknown" || node._def.category !== "config") {
|
||||
new_nodes.push(node);
|
||||
} else if (node.type === "group") {
|
||||
new_groups.push(node);
|
||||
@@ -2115,8 +2175,12 @@ RED.nodes = (function() {
|
||||
}
|
||||
|
||||
// Remap all wires and config node references
|
||||
for (i=0;i<new_nodes.length;i++) {
|
||||
n = new_nodes[i];
|
||||
for (i=0;i<new_nodes.length+new_junctions.length;i++) {
|
||||
if (i<new_nodes.length) {
|
||||
n = new_nodes[i];
|
||||
} else {
|
||||
n = new_junctions[i - new_nodes.length]
|
||||
}
|
||||
if (n.wires) {
|
||||
for (var w1=0;w1<n.wires.length;w1++) {
|
||||
var wires = (n.wires[w1] instanceof Array)?n.wires[w1]:[n.wires[w1]];
|
||||
@@ -2255,6 +2319,12 @@ RED.nodes = (function() {
|
||||
addGroup(n);
|
||||
}
|
||||
|
||||
for (i=0;i<new_junctions.length;i++) {
|
||||
var junction = new_junctions[i];
|
||||
addJunction(junction);
|
||||
}
|
||||
|
||||
|
||||
// Now the nodes have been fully updated, add them.
|
||||
for (i=0;i<new_nodes.length;i++) {
|
||||
var node = new_nodes[i];
|
||||
@@ -2285,6 +2355,7 @@ RED.nodes = (function() {
|
||||
nodes:new_nodes,
|
||||
links:new_links,
|
||||
groups:new_groups,
|
||||
junctions: new_junctions,
|
||||
workspaces:new_workspaces,
|
||||
subflows:new_subflows,
|
||||
missingWorkspace: missingWorkspace,
|
||||
@@ -2440,6 +2511,30 @@ RED.nodes = (function() {
|
||||
RED.events.emit("groups:remove",group);
|
||||
}
|
||||
|
||||
function addJunction(junction) {
|
||||
junctionsByZ[junction.z] = junctionsByZ[junction.z] || []
|
||||
junctionsByZ[junction.z].push(junction)
|
||||
junctions[junction.id] = junction;
|
||||
if (!nodeLinks[junction.id]) {
|
||||
nodeLinks[junction.id] = {in:[],out:[]};
|
||||
}
|
||||
RED.events.emit("junctions:add", junction)
|
||||
}
|
||||
function removeJunction(junction) {
|
||||
var i = junctionsByZ[junction.z].indexOf(junction)
|
||||
junctionsByZ[junction.z].splice(i, 1)
|
||||
if (junctionsByZ[junction.z].length === 0) {
|
||||
delete junctionsByZ[junction.z]
|
||||
}
|
||||
delete junctions[junction.id]
|
||||
delete nodeLinks[junction.id];
|
||||
RED.events.emit("junctions:remove", junction)
|
||||
|
||||
var removedLinks = links.filter(function(l) { return (l.source === junction) || (l.target === junction); });
|
||||
removedLinks.forEach(removeLink);
|
||||
return { links: removedLinks }
|
||||
}
|
||||
|
||||
function getNodeHelp(type) {
|
||||
var helpContent = "";
|
||||
var helpElement = $("script[data-help-name='"+type+"']");
|
||||
@@ -2453,6 +2548,144 @@ RED.nodes = (function() {
|
||||
return helpContent;
|
||||
}
|
||||
|
||||
function getNodeIslands(nodes) {
|
||||
var selectedNodes = new Set(nodes);
|
||||
// Maps node => island index
|
||||
var nodeToIslandIndex = new Map();
|
||||
// Maps island index => [nodes in island]
|
||||
var islandIndexToNodes = new Map();
|
||||
var internalLinks = new Set();
|
||||
nodes.forEach((node, index) => {
|
||||
nodeToIslandIndex.set(node,index);
|
||||
islandIndexToNodes.set(index, [node]);
|
||||
var inboundLinks = RED.nodes.getNodeLinks(node, PORT_TYPE_INPUT);
|
||||
var outboundLinks = RED.nodes.getNodeLinks(node, PORT_TYPE_OUTPUT);
|
||||
inboundLinks.forEach(l => {
|
||||
if (selectedNodes.has(l.source)) {
|
||||
internalLinks.add(l)
|
||||
}
|
||||
})
|
||||
outboundLinks.forEach(l => {
|
||||
if (selectedNodes.has(l.target)) {
|
||||
internalLinks.add(l)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
internalLinks.forEach(l => {
|
||||
let source = l.source;
|
||||
let target = l.target;
|
||||
if (nodeToIslandIndex.get(source) !== nodeToIslandIndex.get(target)) {
|
||||
let sourceIsland = nodeToIslandIndex.get(source);
|
||||
let islandToMove = nodeToIslandIndex.get(target);
|
||||
let nodesToMove = islandIndexToNodes.get(islandToMove);
|
||||
nodesToMove.forEach(n => {
|
||||
nodeToIslandIndex.set(n,sourceIsland);
|
||||
islandIndexToNodes.get(sourceIsland).push(n);
|
||||
})
|
||||
islandIndexToNodes.delete(islandToMove);
|
||||
}
|
||||
})
|
||||
const result = [];
|
||||
islandIndexToNodes.forEach((nodes,index) => {
|
||||
result.push(nodes);
|
||||
})
|
||||
return result;
|
||||
}
|
||||
|
||||
function detachNodes(nodes) {
|
||||
let allSelectedNodes = [];
|
||||
nodes.forEach(node => {
|
||||
if (node.type === 'group') {
|
||||
let groupNodes = RED.group.getNodes(node,true,true);
|
||||
allSelectedNodes = allSelectedNodes.concat(groupNodes);
|
||||
} else {
|
||||
allSelectedNodes.push(node);
|
||||
}
|
||||
})
|
||||
if (allSelectedNodes.length > 0 ) {
|
||||
const nodeIslands = RED.nodes.getNodeIslands(allSelectedNodes);
|
||||
let removedLinks = [];
|
||||
let newLinks = [];
|
||||
let createdLinkIds = new Set();
|
||||
|
||||
nodeIslands.forEach(nodes => {
|
||||
let selectedNodes = new Set(nodes);
|
||||
let allInboundLinks = [];
|
||||
let allOutboundLinks = [];
|
||||
// Identify links that enter or exit this island of nodes
|
||||
nodes.forEach(node => {
|
||||
var inboundLinks = RED.nodes.getNodeLinks(node, PORT_TYPE_INPUT);
|
||||
var outboundLinks = RED.nodes.getNodeLinks(node, PORT_TYPE_OUTPUT);
|
||||
inboundLinks.forEach(l => {
|
||||
if (!selectedNodes.has(l.source)) {
|
||||
allInboundLinks.push(l)
|
||||
}
|
||||
})
|
||||
outboundLinks.forEach(l => {
|
||||
if (!selectedNodes.has(l.target)) {
|
||||
allOutboundLinks.push(l)
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
// Identify the links to restore
|
||||
allInboundLinks.forEach(inLink => {
|
||||
// For Each inbound link,
|
||||
// - get source node.
|
||||
// - trace through to all outbound links
|
||||
let sourceNode = inLink.source;
|
||||
let targetNodes = new Set();
|
||||
let visited = new Set();
|
||||
let stack = [inLink.target];
|
||||
while (stack.length > 0) {
|
||||
let node = stack.pop(stack);
|
||||
visited.add(node)
|
||||
let links = RED.nodes.getNodeLinks(node, PORT_TYPE_OUTPUT);
|
||||
links.forEach(l => {
|
||||
if (visited.has(l.target)) {
|
||||
return
|
||||
}
|
||||
visited.add(l.target);
|
||||
if (selectedNodes.has(l.target)) {
|
||||
// internal link
|
||||
stack.push(l.target)
|
||||
} else {
|
||||
targetNodes.add(l.target)
|
||||
}
|
||||
})
|
||||
}
|
||||
targetNodes.forEach(target => {
|
||||
let linkId = `${sourceNode.id}[${inLink.sourcePort}] -> ${target.id}`
|
||||
if (!createdLinkIds.has(linkId)) {
|
||||
createdLinkIds.add(linkId);
|
||||
let link = {
|
||||
source: sourceNode,
|
||||
sourcePort: inLink.sourcePort,
|
||||
target: target
|
||||
}
|
||||
let existingLinks = RED.nodes.filterLinks(link)
|
||||
if (existingLinks.length === 0) {
|
||||
newLinks.push(link);
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
// 2. delete all those links
|
||||
allInboundLinks.forEach(l => { RED.nodes.removeLink(l); removedLinks.push(l)})
|
||||
allOutboundLinks.forEach(l => { RED.nodes.removeLink(l); removedLinks.push(l)})
|
||||
})
|
||||
|
||||
newLinks.forEach(l => RED.nodes.addLink(l));
|
||||
return {
|
||||
newLinks,
|
||||
removedLinks
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
init: function() {
|
||||
RED.events.on("registry:node-type-added",function(type) {
|
||||
@@ -2530,11 +2763,10 @@ RED.nodes = (function() {
|
||||
getType: registry.getNodeType,
|
||||
getNodeHelp: getNodeHelp,
|
||||
convertNode: convertNode,
|
||||
|
||||
add: addNode,
|
||||
remove: removeNode,
|
||||
clear: clear,
|
||||
|
||||
detachNodes: detachNodes,
|
||||
moveNodesForwards: moveNodesForwards,
|
||||
moveNodesBackwards: moveNodesBackwards,
|
||||
moveNodesToFront: moveNodesToFront,
|
||||
@@ -2546,7 +2778,20 @@ RED.nodes = (function() {
|
||||
|
||||
addLink: addLink,
|
||||
removeLink: removeLink,
|
||||
|
||||
getNodeLinks: function(id, portType) {
|
||||
if (typeof id !== 'string') {
|
||||
id = id.id;
|
||||
}
|
||||
if (nodeLinks[id]) {
|
||||
if (portType === 1) {
|
||||
// Return cloned arrays so they can be safely modified by caller
|
||||
return [].concat(nodeLinks[id].in)
|
||||
} else {
|
||||
return [].concat(nodeLinks[id].out)
|
||||
}
|
||||
}
|
||||
return [];
|
||||
},
|
||||
addWorkspace: addWorkspace,
|
||||
removeWorkspace: removeWorkspace,
|
||||
getWorkspaceOrder: function() { return workspacesOrder },
|
||||
@@ -2563,6 +2808,11 @@ RED.nodes = (function() {
|
||||
group: function(id) { return groups[id] },
|
||||
groups: function(z) { return groupsByZ[z]?groupsByZ[z].slice():[] },
|
||||
|
||||
addJunction: addJunction,
|
||||
removeJunction: removeJunction,
|
||||
junction: function(id) { return junctions[id] },
|
||||
junctions: function(z) { return junctionsByZ[z]?junctionsByZ[z].slice():[] },
|
||||
|
||||
eachNode: function(cb) {
|
||||
allNodes.eachNode(cb);
|
||||
},
|
||||
@@ -2620,6 +2870,7 @@ RED.nodes = (function() {
|
||||
getAllFlowNodes: getAllFlowNodes,
|
||||
getAllUpstreamNodes: getAllUpstreamNodes,
|
||||
getAllDownstreamNodes: getAllDownstreamNodes,
|
||||
getNodeIslands: getNodeIslands,
|
||||
createExportableNodeSet: createExportableNodeSet,
|
||||
createCompleteNodeSet: createCompleteNodeSet,
|
||||
updateConfigNodeUsers: updateConfigNodeUsers,
|
||||
|
@@ -475,31 +475,33 @@ var RED = (function() {
|
||||
var typeList;
|
||||
var info;
|
||||
if (topic == "notification/node/added") {
|
||||
var addedTypes = [];
|
||||
msg.forEach(function(m) {
|
||||
var id = m.id;
|
||||
RED.nodes.addNodeSet(m);
|
||||
addedTypes = addedTypes.concat(m.types);
|
||||
RED.i18n.loadNodeCatalog(id, function() {
|
||||
var lang = localStorage.getItem("editor-language")||RED.i18n.detectLanguage();
|
||||
$.ajax({
|
||||
headers: {
|
||||
"Accept":"text/html",
|
||||
"Accept-Language": lang
|
||||
},
|
||||
cache: false,
|
||||
url: 'nodes/'+id,
|
||||
success: function(data) {
|
||||
appendNodeConfig(data);
|
||||
}
|
||||
RED.settings.refreshSettings(function(err, data) {
|
||||
var addedTypes = [];
|
||||
msg.forEach(function(m) {
|
||||
var id = m.id;
|
||||
RED.nodes.addNodeSet(m);
|
||||
addedTypes = addedTypes.concat(m.types);
|
||||
RED.i18n.loadNodeCatalog(id, function() {
|
||||
var lang = localStorage.getItem("editor-language")||RED.i18n.detectLanguage();
|
||||
$.ajax({
|
||||
headers: {
|
||||
"Accept":"text/html",
|
||||
"Accept-Language": lang
|
||||
},
|
||||
cache: false,
|
||||
url: 'nodes/'+id,
|
||||
success: function(data) {
|
||||
appendNodeConfig(data);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
if (addedTypes.length) {
|
||||
typeList = "<ul><li>"+addedTypes.map(RED.utils.sanitize).join("</li><li>")+"</li></ul>";
|
||||
RED.notify(RED._("palette.event.nodeAdded", {count:addedTypes.length})+typeList,"success");
|
||||
}
|
||||
loadIconList();
|
||||
if (addedTypes.length) {
|
||||
typeList = "<ul><li>"+addedTypes.map(RED.utils.sanitize).join("</li><li>")+"</li></ul>";
|
||||
RED.notify(RED._("palette.event.nodeAdded", {count:addedTypes.length})+typeList,"success");
|
||||
}
|
||||
loadIconList();
|
||||
})
|
||||
} else if (topic == "notification/node/removed") {
|
||||
for (i=0;i<msg.length;i++) {
|
||||
m = msg[i];
|
||||
@@ -512,27 +514,29 @@ var RED = (function() {
|
||||
loadIconList();
|
||||
} else if (topic == "notification/node/enabled") {
|
||||
if (msg.types) {
|
||||
info = RED.nodes.getNodeSet(msg.id);
|
||||
if (info.added) {
|
||||
RED.nodes.enableNodeSet(msg.id);
|
||||
typeList = "<ul><li>"+msg.types.map(RED.utils.sanitize).join("</li><li>")+"</li></ul>";
|
||||
RED.notify(RED._("palette.event.nodeEnabled", {count:msg.types.length})+typeList,"success");
|
||||
} else {
|
||||
var lang = localStorage.getItem("editor-language")||RED.i18n.detectLanguage();
|
||||
$.ajax({
|
||||
headers: {
|
||||
"Accept":"text/html",
|
||||
"Accept-Language": lang
|
||||
},
|
||||
cache: false,
|
||||
url: 'nodes/'+msg.id,
|
||||
success: function(data) {
|
||||
appendNodeConfig(data);
|
||||
typeList = "<ul><li>"+msg.types.map(RED.utils.sanitize).join("</li><li>")+"</li></ul>";
|
||||
RED.notify(RED._("palette.event.nodeAdded", {count:msg.types.length})+typeList,"success");
|
||||
}
|
||||
});
|
||||
}
|
||||
RED.settings.refreshSettings(function(err, data) {
|
||||
info = RED.nodes.getNodeSet(msg.id);
|
||||
if (info.added) {
|
||||
RED.nodes.enableNodeSet(msg.id);
|
||||
typeList = "<ul><li>"+msg.types.map(RED.utils.sanitize).join("</li><li>")+"</li></ul>";
|
||||
RED.notify(RED._("palette.event.nodeEnabled", {count:msg.types.length})+typeList,"success");
|
||||
} else {
|
||||
var lang = localStorage.getItem("editor-language")||RED.i18n.detectLanguage();
|
||||
$.ajax({
|
||||
headers: {
|
||||
"Accept":"text/html",
|
||||
"Accept-Language": lang
|
||||
},
|
||||
cache: false,
|
||||
url: 'nodes/'+msg.id,
|
||||
success: function(data) {
|
||||
appendNodeConfig(data);
|
||||
typeList = "<ul><li>"+msg.types.map(RED.utils.sanitize).join("</li><li>")+"</li></ul>";
|
||||
RED.notify(RED._("palette.event.nodeAdded", {count:msg.types.length})+typeList,"success");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (topic == "notification/node/disabled") {
|
||||
if (msg.types) {
|
||||
@@ -552,8 +556,7 @@ var RED = (function() {
|
||||
|
||||
$(".red-ui-header-toolbar").show();
|
||||
|
||||
|
||||
RED.sidebar.show(":first");
|
||||
RED.sidebar.show(":first", true);
|
||||
|
||||
setTimeout(function() {
|
||||
loader.end();
|
||||
@@ -586,7 +589,7 @@ var RED = (function() {
|
||||
{id:"menu-item-projects-settings",label:RED._("menu.label.projects-settings"),disabled:false,onselect:"core:show-project-settings"}
|
||||
]});
|
||||
}
|
||||
menuOptions.push({id:"menu-item-edit-menu", label:"Edit", options: [
|
||||
menuOptions.push({id:"menu-item-edit-menu", label:RED._("menu.label.edit"), options: [
|
||||
{id: "menu-item-edit-undo", label:RED._("keyboard.undoChange"), disabled: true, onselect: "core:undo"},
|
||||
{id: "menu-item-edit-redo", label:RED._("keyboard.redoChange"), disabled: true, onselect: "core:redo"},
|
||||
null,
|
||||
@@ -599,7 +602,10 @@ var RED = (function() {
|
||||
null,
|
||||
{id: "menu-item-edit-select-all", label:RED._("keyboard.selectAll"), onselect: "core:select-all-nodes"},
|
||||
{id: "menu-item-edit-select-connected", label:RED._("keyboard.selectAllConnected"), onselect: "core:select-connected-nodes"},
|
||||
{id: "menu-item-edit-select-none", label:RED._("keyboard.selectNone"), onselect: "core:select-none"}
|
||||
{id: "menu-item-edit-select-none", label:RED._("keyboard.selectNone"), onselect: "core:select-none"},
|
||||
null,
|
||||
{id: "menu-item-edit-split-wire-with-links", label:RED._("keyboard.splitWireWithLinks"), onselect: "core:split-wire-with-link-nodes"},
|
||||
|
||||
]});
|
||||
|
||||
menuOptions.push({id:"menu-item-view-menu",label:RED._("menu.label.view.view"),options:[
|
||||
|
@@ -125,7 +125,7 @@ RED.settings = (function () {
|
||||
load(done);
|
||||
}
|
||||
|
||||
var load = function(done) {
|
||||
var refreshSettings = function(done) {
|
||||
$.ajax({
|
||||
headers: {
|
||||
"Accept": "application/json"
|
||||
@@ -135,6 +135,23 @@ RED.settings = (function () {
|
||||
url: 'settings',
|
||||
success: function (data) {
|
||||
setProperties(data);
|
||||
done(null, data);
|
||||
},
|
||||
error: function(jqXHR,textStatus,errorThrown) {
|
||||
if (jqXHR.status === 401) {
|
||||
if (/[?&]access_token=(.*?)(?:$|&)/.test(window.location.search)) {
|
||||
window.location.search = "";
|
||||
}
|
||||
RED.user.login(function() { refreshSettings(done); });
|
||||
} else {
|
||||
console.log("Unexpected error loading settings:",jqXHR.status,textStatus);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
var load = function(done) {
|
||||
refreshSettings(function(err, data) {
|
||||
if (!err) {
|
||||
if (!RED.settings.user || RED.settings.user.anonymous) {
|
||||
RED.settings.remove("auth-tokens");
|
||||
}
|
||||
@@ -147,18 +164,8 @@ RED.settings = (function () {
|
||||
console.log("D3",d3.version);
|
||||
console.groupEnd();
|
||||
loadUserSettings(done);
|
||||
},
|
||||
error: function(jqXHR,textStatus,errorThrown) {
|
||||
if (jqXHR.status === 401) {
|
||||
if (/[?&]access_token=(.*?)(?:$|&)/.test(window.location.search)) {
|
||||
window.location.search = "";
|
||||
}
|
||||
RED.user.login(function() { load(done); });
|
||||
} else {
|
||||
console.log("Unexpected error loading settings:",jqXHR.status,textStatus);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
};
|
||||
|
||||
function loadUserSettings(done) {
|
||||
@@ -234,6 +241,7 @@ RED.settings = (function () {
|
||||
init: init,
|
||||
load: load,
|
||||
loadUserSettings: loadUserSettings,
|
||||
refreshSettings: refreshSettings,
|
||||
set: set,
|
||||
get: get,
|
||||
remove: remove,
|
||||
|
@@ -160,18 +160,19 @@ RED.actionList = (function() {
|
||||
createDialog();
|
||||
}
|
||||
dialog.slideDown(300);
|
||||
searchInput.searchBox('value',v)
|
||||
searchInput.searchBox('value',v);
|
||||
searchResults.editableList('empty');
|
||||
results = [];
|
||||
var actions = RED.actions.list();
|
||||
actions.sort(function(A,B) {
|
||||
return A.id.localeCompare(B.id);
|
||||
var Akey = A.label;
|
||||
var Bkey = B.label;
|
||||
return Akey.localeCompare(Bkey);
|
||||
});
|
||||
actions.forEach(function(action) {
|
||||
action.label = action.id.replace(/:/,": ").replace(/-/g," ").replace(/(^| )./g,function() { return arguments[0].toUpperCase()});
|
||||
action._label = action.label.toLowerCase();
|
||||
searchResults.editableList('addItem',action)
|
||||
})
|
||||
searchResults.editableList('addItem',action);
|
||||
});
|
||||
RED.events.emit("actionList:open");
|
||||
visible = true;
|
||||
}
|
||||
|
@@ -1,33 +1,39 @@
|
||||
RED.actions = (function() {
|
||||
var actions = {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
function addAction(name,handler) {
|
||||
function addAction(name,handler,options) {
|
||||
if (typeof handler !== 'function') {
|
||||
throw new Error("Action handler not a function");
|
||||
}
|
||||
if (actions[name]) {
|
||||
throw new Error("Cannot override existing action");
|
||||
}
|
||||
actions[name] = handler;
|
||||
actions[name] = {
|
||||
handler: handler,
|
||||
options: options,
|
||||
};
|
||||
}
|
||||
function removeAction(name) {
|
||||
delete actions[name];
|
||||
}
|
||||
function getAction(name) {
|
||||
return actions[name];
|
||||
return actions[name].handler;
|
||||
}
|
||||
function invokeAction() {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
var name = args.shift();
|
||||
if (actions.hasOwnProperty(name)) {
|
||||
actions[name].apply(null, args);
|
||||
var handler = actions[name].handler;
|
||||
handler.apply(null, args);
|
||||
}
|
||||
}
|
||||
function listActions() {
|
||||
var result = [];
|
||||
var missing = [];
|
||||
Object.keys(actions).forEach(function(action) {
|
||||
var def = actions[action];
|
||||
var shortcut = RED.keyboard.getShortcut(action);
|
||||
var isUser = false;
|
||||
if (shortcut) {
|
||||
@@ -35,13 +41,38 @@ RED.actions = (function() {
|
||||
} else {
|
||||
isUser = !!RED.keyboard.getUserShortcut(action);
|
||||
}
|
||||
if (!def.label) {
|
||||
var name = action;
|
||||
var options = def.options;
|
||||
var key = options ? options.label : undefined;
|
||||
if (!key) {
|
||||
key = "action-list." +name.replace(/^.*:/,"");
|
||||
}
|
||||
var label = RED._(key);
|
||||
if (label === key) {
|
||||
// no translation. convert `name` to description
|
||||
label = name.replace(/(^.+:([a-z]))|(-([a-z]))/g, function() {
|
||||
if (arguments[5] === 0) {
|
||||
return arguments[2].toUpperCase();
|
||||
} else {
|
||||
return " "+arguments[4].toUpperCase();
|
||||
}
|
||||
});
|
||||
missing.push(key);
|
||||
}
|
||||
def.label = label;
|
||||
}
|
||||
//console.log("; missing:", missing);
|
||||
|
||||
result.push({
|
||||
id:action,
|
||||
scope:shortcut?shortcut.scope:undefined,
|
||||
key:shortcut?shortcut.key:undefined,
|
||||
user:isUser
|
||||
})
|
||||
})
|
||||
user:isUser,
|
||||
label: def.label,
|
||||
options: def.options,
|
||||
});
|
||||
});
|
||||
return result;
|
||||
}
|
||||
return {
|
||||
|
@@ -71,6 +71,7 @@ RED.clipboard = (function() {
|
||||
text: RED._("common.label.cancel"),
|
||||
click: function() {
|
||||
$( this ).dialog( "close" );
|
||||
RED.view.focus();
|
||||
}
|
||||
},
|
||||
{ // red-ui-clipboard-dialog-download
|
||||
@@ -81,6 +82,7 @@ RED.clipboard = (function() {
|
||||
var data = $("#red-ui-clipboard-dialog-export-text").val();
|
||||
downloadData("flows.json", data);
|
||||
$( this ).dialog( "close" );
|
||||
RED.view.focus();
|
||||
}
|
||||
},
|
||||
{ // red-ui-clipboard-dialog-export
|
||||
@@ -95,6 +97,7 @@ RED.clipboard = (function() {
|
||||
$( this ).dialog( "close" );
|
||||
copyText(flowData);
|
||||
RED.notify(RED._("clipboard.nodesExported"),{id:"clipboard"});
|
||||
RED.view.focus();
|
||||
} else {
|
||||
var flowToExport = $("#red-ui-clipboard-dialog-export-text").val();
|
||||
var selectedPath = activeLibraries[activeTab].getSelected();
|
||||
@@ -110,6 +113,7 @@ RED.clipboard = (function() {
|
||||
contentType: "application/json; charset=utf-8"
|
||||
}).done(function() {
|
||||
$(dialog).dialog( "close" );
|
||||
RED.view.focus();
|
||||
RED.notify(RED._("library.exportedToLibrary"),"success");
|
||||
}).fail(function(xhr,textStatus,err) {
|
||||
if (xhr.status === 401) {
|
||||
@@ -171,6 +175,7 @@ RED.clipboard = (function() {
|
||||
}
|
||||
}
|
||||
$( this ).dialog( "close" );
|
||||
RED.view.focus();
|
||||
}
|
||||
},
|
||||
{ // red-ui-clipboard-dialog-import-conflict
|
||||
@@ -203,6 +208,7 @@ RED.clipboard = (function() {
|
||||
// console.table(pendingImportConfig.importNodes.map(function(n) { return {id:n.id,type:n.type,result:importMap[n.id]}}))
|
||||
RED.view.importNodes(newNodes, pendingImportConfig.importOptions);
|
||||
$( this ).dialog( "close" );
|
||||
RED.view.focus();
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -940,7 +946,8 @@ RED.clipboard = (function() {
|
||||
if (truncated) {
|
||||
msg += "_truncated";
|
||||
}
|
||||
$("#red-ui-clipboard-hidden").val(value).focus().select();
|
||||
var clipboardHidden = $('<textarea type="text" id="red-ui-clipboard-hidden" tabIndex="-1">').appendTo(document.body);
|
||||
clipboardHidden.val(value).focus().select();
|
||||
var result = document.execCommand("copy");
|
||||
if (result && element) {
|
||||
var popover = RED.popover.create({
|
||||
@@ -954,14 +961,13 @@ RED.clipboard = (function() {
|
||||
},1000);
|
||||
popover.open();
|
||||
}
|
||||
$("#red-ui-clipboard-hidden").val("");
|
||||
clipboardHidden.remove();
|
||||
if (currentFocus) {
|
||||
$(currentFocus).focus();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
function importNodes(nodesStr,addFlow) {
|
||||
var newNodes = nodesStr;
|
||||
if (typeof nodesStr === 'string') {
|
||||
@@ -981,6 +987,7 @@ RED.clipboard = (function() {
|
||||
try {
|
||||
RED.view.importNodes(newNodes, importOptions);
|
||||
} catch(error) {
|
||||
console.log(error.importConfig)
|
||||
// Thrown for import_conflict
|
||||
confirmImport(error.importConfig, newNodes, importOptions);
|
||||
}
|
||||
@@ -1236,8 +1243,6 @@ RED.clipboard = (function() {
|
||||
init: function() {
|
||||
setupDialogs();
|
||||
|
||||
$('<textarea type="text" id="red-ui-clipboard-hidden" tabIndex="-1">').appendTo("#red-ui-editor");
|
||||
|
||||
RED.actions.add("core:show-export-dialog",showExportNodes);
|
||||
RED.actions.add("core:show-import-dialog",showImportNodes);
|
||||
|
||||
|
@@ -21,7 +21,7 @@
|
||||
* value: String : the value to insert if selected
|
||||
* label: String|DOM Element : the label to display in the dropdown.
|
||||
* }
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
$.widget( "nodered.autoComplete", {
|
||||
@@ -62,7 +62,7 @@
|
||||
maxHeight: 200,
|
||||
class: "red-ui-autoComplete-container",
|
||||
options: completions,
|
||||
onselect: (opt) => { this.element.val(opt.value); this.element.focus() },
|
||||
onselect: (opt) => { this.element.val(opt.value); this.element.focus(); this.element.trigger("change") },
|
||||
onclose: () => { this.completionMenuShown = false; delete this.menu; this.element.focus()}
|
||||
});
|
||||
this.menu.show({
|
||||
|
@@ -350,6 +350,15 @@ RED.popover = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
target.on("remove", function (ev) {
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
if (active) {
|
||||
active = false;
|
||||
setTimeout(closePopup,delay.hide);
|
||||
}
|
||||
});
|
||||
if (trigger === 'hover') {
|
||||
target.on('mouseenter',function(e) {
|
||||
clearTimeout(timer);
|
||||
|
@@ -117,6 +117,8 @@ RED.tabs = (function() {
|
||||
menuOptions = options.menu()
|
||||
} else if (Array.isArray(options.menu)) {
|
||||
menuOptions = options.menu;
|
||||
} else if (typeof options.menu === 'function') {
|
||||
menuOptions = options.menu();
|
||||
}
|
||||
menu = RED.menu.init({options: menuOptions});
|
||||
menu.attr("id",options.id+"-menu");
|
||||
@@ -555,28 +557,24 @@ RED.tabs = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
li.one("transitionend", function(evt) {
|
||||
li.remove();
|
||||
if (tabs[id].pinned) {
|
||||
pinnedTabsCount--;
|
||||
}
|
||||
if (options.onremove) {
|
||||
options.onremove(tabs[id]);
|
||||
}
|
||||
delete tabs[id];
|
||||
updateTabWidths();
|
||||
if (collapsibleMenu) {
|
||||
collapsibleMenu.remove();
|
||||
collapsibleMenu = null;
|
||||
}
|
||||
})
|
||||
li.addClass("hide-tab");
|
||||
li.width(0);
|
||||
li.remove();
|
||||
if (tabs[id].pinned) {
|
||||
pinnedTabsCount--;
|
||||
}
|
||||
if (options.onremove) {
|
||||
options.onremove(tabs[id]);
|
||||
}
|
||||
delete tabs[id];
|
||||
updateTabWidths();
|
||||
if (collapsibleMenu) {
|
||||
collapsibleMenu.remove();
|
||||
collapsibleMenu = null;
|
||||
}
|
||||
}
|
||||
|
||||
function findPreviousVisibleTab(li) {
|
||||
if (!li) {
|
||||
li = ul.find("li.active").parent();
|
||||
li = ul.find("li.active");
|
||||
}
|
||||
var previous = li.prev();
|
||||
while(previous.length > 0 && previous.hasClass("hide-tab")) {
|
||||
@@ -586,9 +584,9 @@ RED.tabs = (function() {
|
||||
}
|
||||
function findNextVisibleTab(li) {
|
||||
if (!li) {
|
||||
li = ul.find("li.active").parent();
|
||||
li = ul.find("li.active");
|
||||
}
|
||||
var next = ul.find("li.active").next();
|
||||
var next = li.next();
|
||||
while(next.length > 0 && next.hasClass("hide-tab")) {
|
||||
next = next.next();
|
||||
}
|
||||
@@ -809,15 +807,18 @@ RED.tabs = (function() {
|
||||
event.preventDefault();
|
||||
removeTab(tab.id);
|
||||
});
|
||||
RED.popover.tooltip(closeLink,RED._("workspace.hideFlow"));
|
||||
}
|
||||
if (tab.hideable) {
|
||||
li.addClass("red-ui-tabs-closeable")
|
||||
var closeLink = $("<a/>",{href:"#",class:"red-ui-tab-close"}).appendTo(li);
|
||||
closeLink.append('<i class="fa fa-times" />');
|
||||
var closeLink = $("<a/>",{href:"#",class:"red-ui-tab-close red-ui-tab-hide"}).appendTo(li);
|
||||
closeLink.append('<i class="fa fa-eye" />');
|
||||
closeLink.append('<i class="fa fa-eye-slash" />');
|
||||
closeLink.on("click",function(event) {
|
||||
event.preventDefault();
|
||||
hideTab(tab.id);
|
||||
});
|
||||
RED.popover.tooltip(closeLink,RED._("workspace.hideFlow"));
|
||||
}
|
||||
|
||||
var badges = $('<span class="red-ui-tabs-badges"></span>').appendTo(li);
|
||||
@@ -826,7 +827,8 @@ RED.tabs = (function() {
|
||||
$('<i class="red-ui-tabs-badge-selected fa fa-check-circle"></i>').appendTo(badges);
|
||||
}
|
||||
|
||||
link.attr("title",tab.label);
|
||||
// link.attr("title",tab.label);
|
||||
RED.popover.tooltip(link,function() { return tab.label})
|
||||
|
||||
if (options.onadd) {
|
||||
options.onadd(tab);
|
||||
@@ -945,7 +947,6 @@ RED.tabs = (function() {
|
||||
renameTab: function(id,label) {
|
||||
tabs[id].label = label;
|
||||
var tab = ul.find("a[href='#"+id+"']");
|
||||
tab.attr("title",label);
|
||||
tab.find("span.red-ui-text-bidi-aware").text(label).attr('dir', RED.text.bidi.resolveBaseTextDir(label));
|
||||
updateTabWidths();
|
||||
},
|
||||
|
@@ -340,7 +340,7 @@
|
||||
if (child.depth !== parent.depth+1) {
|
||||
child.depth = parent.depth+1;
|
||||
// var labelPaddingWidth = ((child.gutter ? child.gutter[0].offsetWidth + 2 : 0) + (child.depth * 20));
|
||||
var labelPaddingWidth = ((child.gutter?child.gutter.width()+2:0)+(child.depth*20));
|
||||
var labelPaddingWidth = (((child.gutter&&!child.gutter.hasClass("red-ui-treeList-gutter-float"))?child.gutter.width()+2:0)+(child.depth*20));
|
||||
child.treeList.labelPadding.width(labelPaddingWidth+'px');
|
||||
if (child.element) {
|
||||
$(child.element).css({
|
||||
@@ -562,8 +562,9 @@
|
||||
}).appendTo(label)
|
||||
|
||||
}
|
||||
// var labelPaddingWidth = (item.gutter?item.gutter.width()+2:0)+(depth*20);
|
||||
var labelPaddingWidth = (item.gutter ? item.gutter[0].offsetWidth + 2 : 0) + (depth * 20)
|
||||
|
||||
var labelPaddingWidth = ((item.gutter&&!item.gutter.hasClass("red-ui-treeList-gutter-float"))?item.gutter.width()+2:0)+(depth*20);
|
||||
|
||||
item.treeList.labelPadding = $('<span>').css({
|
||||
display: "inline-block",
|
||||
"flex-shrink": 0,
|
||||
|
@@ -556,7 +556,7 @@
|
||||
this.optionExpandButton = $('<button tabindex="0" class="red-ui-typedInput-option-expand" style="display:inline-block"></button>').appendTo(this.uiSelect);
|
||||
this.optionExpandButtonIcon = $('<i class="red-ui-typedInput-icon fa fa-ellipsis-h"></i>').appendTo(this.optionExpandButton);
|
||||
|
||||
this.type(this.options.default||this.typeList[0].value);
|
||||
this.type(this.typeField.val() || this.options.default||this.typeList[0].value);
|
||||
this.typeChanged = !!this.options.default;
|
||||
}catch(err) {
|
||||
console.log(err.stack);
|
||||
@@ -805,6 +805,7 @@
|
||||
var that = this;
|
||||
var currentType = this.type();
|
||||
this.typeMap = {};
|
||||
var firstCall = (this.typeList === undefined);
|
||||
this.typeList = types.map(function(opt) {
|
||||
var result;
|
||||
if (typeof opt === 'string') {
|
||||
@@ -829,10 +830,14 @@
|
||||
}
|
||||
this.menu = this._createMenu(this.typeList,{},function(v) { that.type(v) });
|
||||
if (currentType && !this.typeMap.hasOwnProperty(currentType)) {
|
||||
this.type(this.typeList[0].value);
|
||||
if (!firstCall) {
|
||||
this.type(this.typeList[0].value);
|
||||
}
|
||||
} else {
|
||||
this.propertyType = null;
|
||||
this.type(currentType);
|
||||
if (!firstCall) {
|
||||
this.type(currentType);
|
||||
}
|
||||
}
|
||||
if (this.typeList.length === 1 && !this.typeList[0].icon && (!this.typeList[0].label || this.typeList[0].showLabel === false)) {
|
||||
this.selectTrigger.hide()
|
||||
@@ -923,7 +928,7 @@
|
||||
var previousType = this.typeMap[this.propertyType];
|
||||
previousValue = this.input.val();
|
||||
|
||||
if (this.typeChanged) {
|
||||
if (previousType && this.typeChanged) {
|
||||
if (this.options.debug) { console.log(this.identifier,"typeChanged",{previousType,previousValue}) }
|
||||
if (previousType.options && opt.hasValue !== true) {
|
||||
this.oldValues[previousType.value] = previousValue;
|
||||
|
@@ -333,6 +333,19 @@ RED.deploy = (function() {
|
||||
var unknownNodes = [];
|
||||
var invalidNodes = [];
|
||||
|
||||
RED.nodes.eachConfig(function(node) {
|
||||
if (node.valid === undefined) {
|
||||
RED.editor.validateNode(node);
|
||||
}
|
||||
if (!node.valid && !node.d) {
|
||||
invalidNodes.push(getNodeInfo(node));
|
||||
}
|
||||
if (node.type === "unknown") {
|
||||
if (unknownNodes.indexOf(node.name) == -1) {
|
||||
unknownNodes.push(node.name);
|
||||
}
|
||||
}
|
||||
});
|
||||
RED.nodes.eachNode(function(node) {
|
||||
if (!node.valid && !node.d) {
|
||||
invalidNodes.push(getNodeInfo(node));
|
||||
|
@@ -554,6 +554,8 @@ RED.diff = (function() {
|
||||
color: "#DDAA99",
|
||||
defaults:{name:{value:""}}
|
||||
}
|
||||
} else if (node.type === "group") {
|
||||
def = RED.group.def;
|
||||
} else {
|
||||
def = {};
|
||||
}
|
||||
@@ -763,16 +765,15 @@ RED.diff = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (node.hasOwnProperty('x')) {
|
||||
if (localNode) {
|
||||
if (localNode.x !== node.x || localNode.y !== node.y) {
|
||||
if (localNode.x !== node.x || localNode.y !== node.y || localNode.w !== node.w || localNode.h !== node.h ) {
|
||||
localChanged = true;
|
||||
localChanges++;
|
||||
}
|
||||
}
|
||||
if (remoteNode) {
|
||||
if (remoteNode.x !== node.x || remoteNode.y !== node.y) {
|
||||
if (remoteNode.x !== node.x || remoteNode.y !== node.y|| remoteNode.w !== node.w || remoteNode.h !== node.h) {
|
||||
remoteChanged = true;
|
||||
remoteChanges++;
|
||||
}
|
||||
@@ -790,7 +791,12 @@ RED.diff = (function() {
|
||||
localCell.addClass("red-ui-diff-status-"+(localChanged?"changed":"unchanged"));
|
||||
$('<span class="red-ui-diff-status">'+(localChanged?'<i class="fa fa-square"></i>':'')+'</span>').appendTo(localCell);
|
||||
element = $('<span class="red-ui-diff-list-element"></span>').appendTo(localCell);
|
||||
propertyElements['local.position'] = RED.utils.createObjectElement({x:localNode.x,y:localNode.y},
|
||||
var localPosition = {x:localNode.x,y:localNode.y};
|
||||
if (localNode.hasOwnProperty('w')) {
|
||||
localPosition.w = localNode.w;
|
||||
localPosition.h = localNode.h;
|
||||
}
|
||||
propertyElements['local.position'] = RED.utils.createObjectElement(localPosition,
|
||||
{
|
||||
path: "position",
|
||||
exposeApi: true,
|
||||
@@ -811,7 +817,12 @@ RED.diff = (function() {
|
||||
if (remoteNode) {
|
||||
$('<span class="red-ui-diff-status">'+(remoteChanged?'<i class="fa fa-square"></i>':'')+'</span>').appendTo(remoteCell);
|
||||
element = $('<span class="red-ui-diff-list-element"></span>').appendTo(remoteCell);
|
||||
propertyElements['remote.position'] = RED.utils.createObjectElement({x:remoteNode.x,y:remoteNode.y},
|
||||
var remotePosition = {x:remoteNode.x,y:remoteNode.y};
|
||||
if (remoteNode.hasOwnProperty('w')) {
|
||||
remotePosition.w = remoteNode.w;
|
||||
remotePosition.h = remoteNode.h;
|
||||
}
|
||||
propertyElements['remote.position'] = RED.utils.createObjectElement(remotePosition,
|
||||
{
|
||||
path: "position",
|
||||
exposeApi: true,
|
||||
@@ -883,11 +894,11 @@ RED.diff = (function() {
|
||||
}
|
||||
}
|
||||
}
|
||||
var properties = Object.keys(node).filter(function(p) { return p!='inputLabels'&&p!='outputLabels'&&p!='z'&&p!='wires'&&p!=='x'&&p!=='y'&&p!=='id'&&p!=='type'&&(!def.defaults||!def.defaults.hasOwnProperty(p))});
|
||||
var properties = Object.keys(node).filter(function(p) { return p!='inputLabels'&&p!='outputLabels'&&p!='z'&&p!='wires'&&p!=='x'&&p!=='y'&&p!=='w'&&p!=='h'&&p!=='id'&&p!=='type'&&(!def.defaults||!def.defaults.hasOwnProperty(p))});
|
||||
if (def.defaults) {
|
||||
properties = properties.concat(Object.keys(def.defaults));
|
||||
}
|
||||
if (node.type !== 'tab') {
|
||||
if (node.type !== 'tab' && node.type !== "group") {
|
||||
properties = properties.concat(['inputLabels','outputLabels']);
|
||||
}
|
||||
if ( ((localNode && localNode.hasOwnProperty('icon')) || (remoteNode && remoteNode.hasOwnProperty('icon'))) &&
|
||||
|
@@ -744,7 +744,16 @@ RED.editor = (function() {
|
||||
delete cn.__label__;
|
||||
});
|
||||
|
||||
select.append('<option value="_ADD_"'+(value===""?" selected":"")+'>'+RED._("editor.addNewType", {type:type})+'</option>');
|
||||
var label = type;
|
||||
if (typeof node_def.paletteLabel !== "undefined") {
|
||||
try {
|
||||
label = RED.utils.sanitize((typeof node_def.paletteLabel === "function" ? node_def.paletteLabel.call(node_def) : node_def.paletteLabel)||type);
|
||||
} catch(err) {
|
||||
console.log("Definition error: "+type+".paletteLabel",err);
|
||||
}
|
||||
}
|
||||
|
||||
select.append('<option value="_ADD_"'+(value===""?" selected":"")+'>'+RED._("editor.addNewType", {type:label})+'</option>');
|
||||
window.setTimeout(function() { select.trigger("change");},50);
|
||||
}
|
||||
}
|
||||
|
@@ -577,7 +577,7 @@ RED.editor.codeEditor.monaco = (function() {
|
||||
createMonacoCompletionItem("set (flow context)", 'flow.set("${1:name}", ${1:value});','Set a value in flow context',range),
|
||||
createMonacoCompletionItem("get (global context)", 'global.get("${1:name}");','Get a value from global context',range),
|
||||
createMonacoCompletionItem("set (global context)", 'global.set("${1:name}", ${1:value});','Set a value in global context',range),
|
||||
createMonacoCompletionItem("get (env)", 'env.get("${1:name}");','Get env variable value',range),
|
||||
createMonacoCompletionItem("get (env)", 'env.get("${1|NR_NODE_ID,NR_NODE_NAME,NR_NODE_PATH,NR_GROUP_ID,NR_GROUP_NAME,NR_FLOW_ID,NR_FLOW_NAME|}");','Get env variable value',range),
|
||||
createMonacoCompletionItem("cloneMessage (RED.util)", 'RED.util.cloneMessage(${1:msg});',
|
||||
["```typescript",
|
||||
"RED.util.cloneMessage<T extends registry.NodeMessage>(msg: T): T",
|
||||
|
@@ -247,7 +247,7 @@
|
||||
var currentExpression = expressionEditor.getValue();
|
||||
var expr;
|
||||
var usesContext = false;
|
||||
var legacyMode = /(^|[^a-zA-Z0-9_'"])msg([^a-zA-Z0-9_'"]|$)/.test(currentExpression);
|
||||
var legacyMode = /(^|[^a-zA-Z0-9_'".])msg([^a-zA-Z0-9_'"]|$)/.test(currentExpression);
|
||||
$(".red-ui-editor-type-expression-legacy").toggle(legacyMode);
|
||||
try {
|
||||
expr = jsonata(currentExpression);
|
||||
|
@@ -81,7 +81,8 @@
|
||||
clearTimeout: true,
|
||||
setInterval: true,
|
||||
clearInterval: true
|
||||
}
|
||||
},
|
||||
extraLibs: options.extraLibs
|
||||
});
|
||||
if (options.cursor) {
|
||||
expressionEditor.gotoLine(options.cursor.row+1,options.cursor.column,false);
|
||||
|
@@ -35,9 +35,10 @@
|
||||
editState.changed = true;
|
||||
}
|
||||
if (!node._def.defaults || !node._def.defaults.hasOwnProperty("icon")) {
|
||||
var icon = $("#red-ui-editor-node-icon").val()||""
|
||||
var icon = $("#red-ui-editor-node-icon").val()||"";
|
||||
if (!this.isDefaultIcon) {
|
||||
if (icon !== node.icon) {
|
||||
if ((icon !== node.icon) &&
|
||||
(icon !== "")) {
|
||||
editState.changes.icon = node.icon;
|
||||
node.icon = icon;
|
||||
editState.changed = true;
|
||||
@@ -101,14 +102,14 @@
|
||||
if (showLabel) {
|
||||
// Default to show label
|
||||
if (node.l !== false) {
|
||||
editState.changes.l = node.l
|
||||
editState.changes.l = node.l;
|
||||
editState.changed = true;
|
||||
}
|
||||
node.l = false;
|
||||
} else {
|
||||
// Node has showLabel:false (eg link nodes)
|
||||
if (node.hasOwnProperty('l') && node.l) {
|
||||
editState.changes.l = node.l
|
||||
editState.changes.l = node.l;
|
||||
editState.changed = true;
|
||||
}
|
||||
delete node.l;
|
||||
@@ -118,20 +119,20 @@
|
||||
if (showLabel) {
|
||||
// Default to show label
|
||||
if (node.hasOwnProperty('l') && !node.l) {
|
||||
editState.changes.l = node.l
|
||||
editState.changes.l = node.l;
|
||||
editState.changed = true;
|
||||
}
|
||||
delete node.l;
|
||||
} else {
|
||||
if (!node.l) {
|
||||
editState.changes.l = node.l
|
||||
editState.changes.l = node.l;
|
||||
editState.changed = true;
|
||||
}
|
||||
node.l = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
function buildAppearanceForm(container,node) {
|
||||
@@ -164,10 +165,10 @@
|
||||
var categories = RED.palette.getCategories();
|
||||
categories.sort(function(A,B) {
|
||||
return A.label.localeCompare(B.label);
|
||||
})
|
||||
});
|
||||
categories.forEach(function(cat) {
|
||||
categorySelector.append($("<option/>").val(cat.id).text(cat.label));
|
||||
})
|
||||
});
|
||||
categorySelector.append($("<option/>").attr('disabled',true).text("---"));
|
||||
categorySelector.append($("<option/>").val("_custom_").text(RED._("palette.addCategory")));
|
||||
|
||||
@@ -180,7 +181,7 @@
|
||||
$("#subflow-appearance-input-category").width(250);
|
||||
$("#subflow-appearance-input-custom-category").hide();
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
$("#subflow-appearance-input-category").val(node.category||"subflows");
|
||||
var userCount = 0;
|
||||
@@ -204,7 +205,7 @@
|
||||
$("#node-input-show-label").toggleButton({
|
||||
enabledLabel: RED._("editor.show"),
|
||||
disabledLabel: RED._("editor.hide")
|
||||
})
|
||||
});
|
||||
|
||||
if (!node.hasOwnProperty("l")) {
|
||||
// Show label unless def.showLabel set to false
|
||||
@@ -230,7 +231,7 @@
|
||||
"#E9967A", "#F3B567", "#FDD0A2",
|
||||
"#FDF0C2", "#FFAAAA", "#FFCC66",
|
||||
"#FFF0F0", "#FFFFFF"
|
||||
]
|
||||
];
|
||||
|
||||
RED.editor.colorPicker.create({
|
||||
id: "red-ui-editor-node-color",
|
||||
@@ -245,9 +246,9 @@
|
||||
nodeDiv.css('backgroundColor',colour);
|
||||
var borderColor = RED.utils.getDarkerColor(colour);
|
||||
if (borderColor !== colour) {
|
||||
nodeDiv.css('border-color',borderColor)
|
||||
nodeDiv.css('border-color',borderColor);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -264,7 +265,7 @@
|
||||
nodeDiv.css('backgroundColor',colour);
|
||||
var borderColor = RED.utils.getDarkerColor(colour);
|
||||
if (borderColor !== colour) {
|
||||
nodeDiv.css('border-color',borderColor)
|
||||
nodeDiv.css('border-color',borderColor);
|
||||
}
|
||||
|
||||
var iconContainer = $('<div/>',{class:"red-ui-palette-icon-container"}).appendTo(nodeDiv);
|
||||
@@ -292,7 +293,7 @@
|
||||
|
||||
RED.popover.tooltip(iconButton, function() {
|
||||
return $("#red-ui-editor-node-icon").val() || RED._("editor.default");
|
||||
})
|
||||
});
|
||||
$('<input type="hidden" id="red-ui-editor-node-icon">').val(node.icon).appendTo(iconRow);
|
||||
}
|
||||
|
||||
@@ -417,11 +418,11 @@
|
||||
});
|
||||
rows.sort(function(A,B) {
|
||||
return A.i-B.i;
|
||||
})
|
||||
});
|
||||
rows.forEach(function(r,i) {
|
||||
r.r.find("label").text((i+1)+".");
|
||||
r.r.appendTo(outputsDiv);
|
||||
})
|
||||
});
|
||||
if (rows.length === 0) {
|
||||
buildLabelRow("output",i,"").appendTo(outputsDiv);
|
||||
} else {
|
||||
@@ -467,7 +468,7 @@
|
||||
clear.on("click", function(evt) {
|
||||
evt.preventDefault();
|
||||
input.val("");
|
||||
})
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -501,6 +502,12 @@
|
||||
}
|
||||
var v = $(this).val();
|
||||
hasNonBlankLabel = hasNonBlankLabel || v!== "";
|
||||
|
||||
// mark changed output port labels as dirty
|
||||
if (node.type === "subflow" && (!node.outputLabels || node.outputLabels[index] !== v)) {
|
||||
node.out[index].dirty = true;
|
||||
}
|
||||
|
||||
newValue[index] = v;
|
||||
});
|
||||
|
||||
@@ -509,6 +516,12 @@
|
||||
changes.outputLabels = node.outputLabels;
|
||||
node.outputLabels = newValue;
|
||||
changed = true;
|
||||
|
||||
// trigger redraw of dirty port labels
|
||||
if (node.type === "subflow") {
|
||||
RED.view.redraw();
|
||||
}
|
||||
|
||||
}
|
||||
return changed;
|
||||
}
|
||||
|
@@ -55,9 +55,15 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
if (!isSameObj(old_env, new_env)) {
|
||||
node.env = new_env;
|
||||
if (!old_env && new_env.length === 0) {
|
||||
delete node.env;
|
||||
} else if (!isSameObj(old_env, new_env)) {
|
||||
editState.changes.env = node.env;
|
||||
if (new_env.length === 0) {
|
||||
delete node.env;
|
||||
} else {
|
||||
node.env = new_env;
|
||||
}
|
||||
editState.changed = true;
|
||||
}
|
||||
}
|
||||
|
@@ -352,8 +352,10 @@ RED.group = (function() {
|
||||
}
|
||||
if (n.type === 'group') {
|
||||
RED.events.emit("groups:change",n)
|
||||
} else {
|
||||
} else if (n.type !== 'junction') {
|
||||
RED.events.emit("nodes:change",n)
|
||||
} else {
|
||||
RED.events.emit("junctions:change",n)
|
||||
}
|
||||
})
|
||||
RED.nodes.removeGroup(g);
|
||||
@@ -547,8 +549,10 @@ RED.group = (function() {
|
||||
group.h = Math.max(group.h,n.y+n.h/2+25-group.y);
|
||||
if (n.type === 'group') {
|
||||
RED.events.emit("groups:change",n)
|
||||
} else {
|
||||
} else if (n.type !== 'junction') {
|
||||
RED.events.emit("nodes:change",n)
|
||||
} else {
|
||||
RED.events.emit("junctions:change",n)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -583,19 +587,23 @@ RED.group = (function() {
|
||||
}
|
||||
if (n.type === 'group') {
|
||||
RED.events.emit("groups:change",n)
|
||||
} else {
|
||||
} else if (n.type !== 'junction') {
|
||||
RED.events.emit("nodes:change",n)
|
||||
} else {
|
||||
RED.events.emit("junctions:change",n)
|
||||
}
|
||||
}
|
||||
markDirty(group);
|
||||
}
|
||||
|
||||
function getNodes(group,recursive) {
|
||||
function getNodes(group,recursive,excludeGroup) {
|
||||
var nodes = [];
|
||||
group.nodes.forEach(function(n) {
|
||||
nodes.push(n);
|
||||
if (n.type !== 'group' || !excludeGroup) {
|
||||
nodes.push(n);
|
||||
}
|
||||
if (recursive && n.type === 'group') {
|
||||
nodes = nodes.concat(getNodes(n,recursive))
|
||||
nodes = nodes.concat(getNodes(n,recursive,excludeGroup))
|
||||
}
|
||||
})
|
||||
return nodes;
|
||||
|
@@ -49,15 +49,15 @@ RED.keyboard = (function() {
|
||||
"]": 221,
|
||||
"{": 219,// <- QWERTY specific
|
||||
"}": 221 // <- QWERTY specific
|
||||
}
|
||||
};
|
||||
var metaKeyCodes = {
|
||||
16: true,
|
||||
17: true,
|
||||
18: true,
|
||||
91: true,
|
||||
93: true
|
||||
}
|
||||
var actionToKeyMap = {}
|
||||
};
|
||||
var actionToKeyMap = {};
|
||||
var defaultKeyMap = {};
|
||||
|
||||
// FF generates some different keycodes because reasons.
|
||||
@@ -65,7 +65,7 @@ RED.keyboard = (function() {
|
||||
59:186,
|
||||
61:187,
|
||||
173:189
|
||||
}
|
||||
};
|
||||
|
||||
function migrateOldKeymap() {
|
||||
// pre-0.18
|
||||
@@ -80,7 +80,7 @@ RED.keyboard = (function() {
|
||||
}
|
||||
|
||||
function getUserKey(action) {
|
||||
return RED.settings.get('editor.keymap',{})[action]
|
||||
return RED.settings.get('editor.keymap',{})[action];
|
||||
}
|
||||
|
||||
function mergeKeymaps(defaultKeymap, themeKeymap) {
|
||||
@@ -105,7 +105,7 @@ RED.keyboard = (function() {
|
||||
scope:scope,
|
||||
key:key,
|
||||
user:false
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -115,13 +115,13 @@ RED.keyboard = (function() {
|
||||
if (themeKeymap.hasOwnProperty(action)) {
|
||||
if (!themeKeymap[action].key) {
|
||||
// No key for this action - default is no keybinding
|
||||
delete mergedKeymap[action]
|
||||
delete mergedKeymap[action];
|
||||
} else {
|
||||
mergedKeymap[action] = [{
|
||||
scope: themeKeymap[action].scope || "*",
|
||||
key: themeKeymap[action].key,
|
||||
user: false
|
||||
}]
|
||||
}];
|
||||
if (mergedKeymap[action][0].scope === "workspace") {
|
||||
mergedKeymap[action][0].scope = "red-ui-workspace";
|
||||
}
|
||||
@@ -179,7 +179,7 @@ RED.keyboard = (function() {
|
||||
close: function() {
|
||||
RED.menu.refreshShortcuts();
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function revertToDefault(action) {
|
||||
@@ -327,7 +327,7 @@ RED.keyboard = (function() {
|
||||
scope:scope,
|
||||
key:key,
|
||||
user:false
|
||||
}
|
||||
};
|
||||
}
|
||||
if (!ondown) {
|
||||
var userAction = getUserKey(cbdown);
|
||||
@@ -350,7 +350,7 @@ RED.keyboard = (function() {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
keys.push([key,mod])
|
||||
keys.push([key,mod]);
|
||||
}
|
||||
var slot = handlers;
|
||||
for (i=0;i<keys.length;i++) {
|
||||
@@ -373,7 +373,7 @@ RED.keyboard = (function() {
|
||||
//slot[key] = {scope: scope, ondown:cbdown};
|
||||
}
|
||||
slot.handlers = slot.handlers || [];
|
||||
slot.handlers.push({scope:scope,ondown:cbdown})
|
||||
slot.handlers.push({scope:scope,ondown:cbdown});
|
||||
slot.scope = scope;
|
||||
slot.ondown = cbdown;
|
||||
}
|
||||
@@ -390,12 +390,12 @@ RED.keyboard = (function() {
|
||||
if (parsedKey) {
|
||||
keys.push(parsedKey);
|
||||
} else {
|
||||
console.log("Unrecognised key specifier:",key)
|
||||
console.log("Unrecognised key specifier:",key);
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
keys.push([key,mod])
|
||||
keys.push([key,mod]);
|
||||
}
|
||||
var slot = handlers;
|
||||
for (i=0;i<keys.length;i++) {
|
||||
@@ -417,7 +417,7 @@ RED.keyboard = (function() {
|
||||
}
|
||||
if (typeof slot.ondown === "string") {
|
||||
if (typeof modifiers === 'boolean' && modifiers) {
|
||||
actionToKeyMap[slot.ondown] = {user: modifiers}
|
||||
actionToKeyMap[slot.ondown] = {user: modifiers};
|
||||
} else {
|
||||
delete actionToKeyMap[slot.ondown];
|
||||
}
|
||||
@@ -433,11 +433,11 @@ RED.keyboard = (function() {
|
||||
function formatKey(key,plain) {
|
||||
var formattedKey = isMac?key.replace(/ctrl-?/,"⌘"):key;
|
||||
formattedKey = isMac?formattedKey.replace(/alt-?/,"⌥"):key;
|
||||
formattedKey = formattedKey.replace(/shift-?/,"⇧")
|
||||
formattedKey = formattedKey.replace(/left/,"←")
|
||||
formattedKey = formattedKey.replace(/up/,"↑")
|
||||
formattedKey = formattedKey.replace(/right/,"→")
|
||||
formattedKey = formattedKey.replace(/down/,"↓")
|
||||
formattedKey = formattedKey.replace(/shift-?/,"⇧");
|
||||
formattedKey = formattedKey.replace(/left/,"←");
|
||||
formattedKey = formattedKey.replace(/up/,"↑");
|
||||
formattedKey = formattedKey.replace(/right/,"→");
|
||||
formattedKey = formattedKey.replace(/down/,"↓");
|
||||
if (plain) {
|
||||
return formattedKey;
|
||||
}
|
||||
@@ -461,7 +461,6 @@ RED.keyboard = (function() {
|
||||
var container = $(this);
|
||||
var object = container.data('data');
|
||||
|
||||
|
||||
if (!container.hasClass('keyboard-shortcut-entry-expanded')) {
|
||||
endEditShortcut();
|
||||
|
||||
@@ -485,7 +484,7 @@ RED.keyboard = (function() {
|
||||
}
|
||||
$(this).toggleClass("input-error",!valid);
|
||||
okButton.attr("disabled",!valid);
|
||||
})
|
||||
});
|
||||
|
||||
var scopeSelect = $('<select><option value="*" data-i18n="keyboard.global"></option><option value="red-ui-workspace" data-i18n="keyboard.workspace"></option></select>').appendTo(scope);
|
||||
scopeSelect.i18n();
|
||||
@@ -495,7 +494,7 @@ RED.keyboard = (function() {
|
||||
scopeSelect.val(object.scope||'*');
|
||||
scopeSelect.on("change", function() {
|
||||
keyInput.trigger("change");
|
||||
})
|
||||
});
|
||||
|
||||
var div = $('<div class="keyboard-shortcut-edit button-group-vertical"></div>').appendTo(scope);
|
||||
var okButton = $('<button class="red-ui-button red-ui-button-small"><i class="fa fa-check"></i></button>').appendTo(div);
|
||||
@@ -521,10 +520,13 @@ RED.keyboard = (function() {
|
||||
id:object.id,
|
||||
scope:shortcut?shortcut.scope:undefined,
|
||||
key:shortcut?shortcut.key:undefined,
|
||||
user:shortcut?shortcut.user:undefined
|
||||
}
|
||||
user:shortcut?shortcut.user:undefined,
|
||||
|
||||
label: object.label,
|
||||
options: object.options,
|
||||
};
|
||||
buildShortcutRow(container,obj);
|
||||
})
|
||||
});
|
||||
|
||||
keyInput.trigger("focus");
|
||||
}
|
||||
@@ -559,7 +561,7 @@ RED.keyboard = (function() {
|
||||
delete object.scope;
|
||||
} else {
|
||||
keyDiv.parent().removeClass("keyboard-shortcut-entry-unassigned");
|
||||
keyDiv.append(RED.keyboard.formatKey(key))
|
||||
keyDiv.append(RED.keyboard.formatKey(key));
|
||||
$("<span>").text(scope).appendTo(scopeDiv);
|
||||
object.key = key;
|
||||
object.scope = scope;
|
||||
@@ -572,7 +574,7 @@ RED.keyboard = (function() {
|
||||
userKeymap[object.id] = {
|
||||
scope:shortcut.scope,
|
||||
key:shortcut.key
|
||||
}
|
||||
};
|
||||
RED.settings.set('editor.keymap',userKeymap);
|
||||
}
|
||||
}
|
||||
@@ -588,13 +590,7 @@ RED.keyboard = (function() {
|
||||
var item = $('<div class="keyboard-shortcut-entry">').appendTo(container);
|
||||
container.data('data',object);
|
||||
|
||||
var text = object.id.replace(/(^.+:([a-z]))|(-([a-z]))/g,function() {
|
||||
if (arguments[5] === 0) {
|
||||
return arguments[2].toUpperCase();
|
||||
} else {
|
||||
return " "+arguments[4].toUpperCase();
|
||||
}
|
||||
});
|
||||
var text = object.label;
|
||||
var label = $('<div>').addClass("keyboard-shortcut-entry-text").text(text).appendTo(item);
|
||||
|
||||
var user = $('<i class="fa fa-user"></i>').prependTo(label);
|
||||
@@ -629,14 +625,15 @@ RED.keyboard = (function() {
|
||||
pane.find("#red-ui-settings-tab-keyboard-filter").searchBox({
|
||||
delay: 100,
|
||||
change: function() {
|
||||
var filterValue = $(this).val().trim();
|
||||
var filterValue = $(this).val().trim().toLowerCase();
|
||||
if (filterValue === "") {
|
||||
shortcutList.editableList('filter', null);
|
||||
} else {
|
||||
filterValue = filterValue.replace(/\s/g,"");
|
||||
shortcutList.editableList('filter', function(data) {
|
||||
return data.id.toLowerCase().replace(/^.*:/,"").replace("-","").indexOf(filterValue) > -1;
|
||||
})
|
||||
var label = data.label.toLowerCase();
|
||||
return label.indexOf(filterValue) > -1;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -657,9 +654,9 @@ RED.keyboard = (function() {
|
||||
});
|
||||
var shortcuts = RED.actions.list();
|
||||
shortcuts.sort(function(A,B) {
|
||||
var Aid = A.id.replace(/^.*:/,"").replace(/[ -]/g,"").toLowerCase();
|
||||
var Bid = B.id.replace(/^.*:/,"").replace(/[ -]/g,"").toLowerCase();
|
||||
return Aid.localeCompare(Bid);
|
||||
var Akey = A.label;
|
||||
var Bkey = B.label;
|
||||
return Akey.localeCompare(Bkey);
|
||||
});
|
||||
knownShortcuts = new Set();
|
||||
shortcuts.forEach(function(s) {
|
||||
|
@@ -224,14 +224,7 @@ RED.palette = (function() {
|
||||
|
||||
var d = $('<div>',{class:"red-ui-palette-node"}).attr("data-palette-type",nt).data('category',rootCategory);
|
||||
|
||||
var label = nt;///^(.*?)([ -]in|[ -]out)?$/.exec(nt)[1];
|
||||
if (typeof def.paletteLabel !== "undefined") {
|
||||
try {
|
||||
label = (typeof def.paletteLabel === "function" ? def.paletteLabel.call(def) : def.paletteLabel)||"";
|
||||
} catch(err) {
|
||||
console.log("Definition error: "+nt+".paletteLabel",err);
|
||||
}
|
||||
}
|
||||
var label = RED.utils.getPaletteLabel(nt, def);///^(.*?)([ -]in|[ -]out)?$/.exec(nt)[1];
|
||||
|
||||
$('<div/>', {
|
||||
class: "red-ui-palette-label"+(((!def.align && def.inputs !== 0 && def.outputs === 0) || "right" === def.align) ? " red-ui-palette-label-right" : "")
|
||||
|
@@ -1212,6 +1212,9 @@ RED.projects = (function() {
|
||||
}
|
||||
}).appendTo(row);
|
||||
|
||||
row = $('<div class="form-row red-ui-projects-dialog-screen-create-row red-ui-projects-dialog-screen-create-row-open"></div>').hide().appendTo(container);
|
||||
$('<span style="display: flex; align-items: center;"><input style="padding:0; margin: 0 5px 0 0" checked type="checkbox" id="red-ui-projects-dialog-screen-clear-context"> <label for="red-ui-projects-dialog-screen-clear-context" style="padding:0; margin: 0"> <span data-i18n="projects.create.clearContext"></span></label></span>').appendTo(row).i18n();
|
||||
|
||||
row = $('<div class="form-row red-ui-projects-dialog-screen-create-row red-ui-projects-dialog-screen-create-row-empty red-ui-projects-dialog-screen-create-row-clone"></div>').appendTo(container);
|
||||
$('<label for="red-ui-projects-dialog-screen-create-project-name">'+RED._("projects.create.project-name")+'</label>').appendTo(row);
|
||||
|
||||
@@ -1501,7 +1504,8 @@ RED.projects = (function() {
|
||||
};
|
||||
}
|
||||
} else if (projectType === 'open') {
|
||||
return switchProject(selectedProject.name,function(err,data) {
|
||||
var clearContext = $("#red-ui-projects-dialog-screen-clear-context").prop("checked")
|
||||
return switchProject(selectedProject.name, clearContext, function(err,data) {
|
||||
if (err) {
|
||||
if (err.code !== 'credentials_load_failed') {
|
||||
console.log(RED._("projects.create.unexpected_error"),err)
|
||||
@@ -1595,7 +1599,7 @@ RED.projects = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
function switchProject(name,done) {
|
||||
function switchProject(name,clearContext,done) {
|
||||
RED.deploy.setDeployInflight(true);
|
||||
RED.projects.settings.switchProject(name);
|
||||
sendRequest({
|
||||
@@ -1614,7 +1618,7 @@ RED.projects = (function() {
|
||||
'*': done
|
||||
},
|
||||
}
|
||||
},{active:true}).then(function() {
|
||||
},{active:true, clearContext:clearContext}).then(function() {
|
||||
dialog.dialog( "close" );
|
||||
RED.events.emit("project:change", {name:name});
|
||||
}).always(function() {
|
||||
@@ -1687,7 +1691,7 @@ RED.projects = (function() {
|
||||
dialogHeight = 590 - (750 - winHeight);
|
||||
}
|
||||
$(".red-ui-projects-dialog-box").height(dialogHeight);
|
||||
$(".red-ui-projects-dialog-project-list-inner-container").height(Math.max(500,dialogHeight) - 180);
|
||||
$(".red-ui-projects-dialog-project-list-inner-container").height(Math.max(500,dialogHeight) - 210);
|
||||
dialog.dialog('option','title',screen.title||"");
|
||||
dialog.dialog("open");
|
||||
}
|
||||
|
@@ -22,8 +22,11 @@ RED.search = (function() {
|
||||
var selected = -1;
|
||||
var visible = false;
|
||||
|
||||
var searchHistory = [];
|
||||
var index = {};
|
||||
var currentResults = [];
|
||||
var activeResults = [];
|
||||
var currentIndex = 0;
|
||||
var previousActiveElement;
|
||||
|
||||
function indexProperty(node,label,property) {
|
||||
@@ -52,10 +55,22 @@ RED.search = (function() {
|
||||
}
|
||||
l = l||n.label||n.name||n.id||"";
|
||||
|
||||
|
||||
var properties = ['id','type','name','label','info'];
|
||||
if (n._def && n._def.defaults) {
|
||||
properties = properties.concat(Object.keys(n._def.defaults));
|
||||
const node_def = n && n._def;
|
||||
if (node_def) {
|
||||
if (node_def.defaults) {
|
||||
properties = properties.concat(Object.keys(node_def.defaults));
|
||||
}
|
||||
if (n.type !== "group" && node_def.paletteLabel && node_def.paletteLabel !== node_def.type) {
|
||||
try {
|
||||
const label = ("" + (typeof node_def.paletteLabel === "function" ? node_def.paletteLabel.call(node_def) : node_def.paletteLabel)).toLowerCase();
|
||||
if(label && label !== (""+node_def.type).toLowerCase()) {
|
||||
indexProperty(n, l, label);
|
||||
}
|
||||
} catch(err) {
|
||||
console.warn(`error indexing ${l}`, err);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (var i=0;i<properties.length;i++) {
|
||||
if (n.hasOwnProperty(properties[i])) {
|
||||
@@ -105,6 +120,8 @@ RED.search = (function() {
|
||||
val = extractFlag(val,"unused",flags);
|
||||
val = extractFlag(val,"config",flags);
|
||||
val = extractFlag(val,"subflow",flags);
|
||||
val = extractFlag(val,"hidden",flags);
|
||||
val = extractFlag(val,"modified",flags);
|
||||
// uses:<node-id>
|
||||
val = extractValue(val,"uses",flags);
|
||||
|
||||
@@ -150,7 +167,20 @@ RED.search = (function() {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (flags.hasOwnProperty("modified")) {
|
||||
if (!node.node.changed && !node.node.moved) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (flags.hasOwnProperty("hidden")) {
|
||||
// Only tabs can be hidden
|
||||
if (node.node.type !== 'tab') {
|
||||
continue
|
||||
}
|
||||
if (!RED.workspaces.isHidden(node.node.id)) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
if (flags.hasOwnProperty("unused")) {
|
||||
var isUnused = (node.node.type === 'subflow' && node.node.instances.length === 0) ||
|
||||
(isConfigNode && node.node.users.length === 0)
|
||||
@@ -196,6 +226,20 @@ RED.search = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
function populateSearchHistory() {
|
||||
if (searchHistory.length > 0) {
|
||||
searchResults.editableList('addItem',{
|
||||
historyHeader: true
|
||||
});
|
||||
searchHistory.forEach(function(entry) {
|
||||
searchResults.editableList('addItem',{
|
||||
history: true,
|
||||
value: entry
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
function createDialog() {
|
||||
dialog = $("<div>",{id:"red-ui-search",class:"red-ui-search"}).appendTo("#red-ui-main-container");
|
||||
var searchDiv = $("<div>",{class:"red-ui-search-container"}).appendTo(dialog);
|
||||
@@ -204,7 +248,12 @@ RED.search = (function() {
|
||||
change: function() {
|
||||
searchResults.editableList('empty');
|
||||
selected = -1;
|
||||
currentResults = search($(this).val());
|
||||
var value = $(this).val();
|
||||
if (value === "") {
|
||||
populateSearchHistory();
|
||||
return;
|
||||
}
|
||||
currentResults = search(value);
|
||||
if (currentResults.length > 0) {
|
||||
for (i=0;i<Math.min(currentResults.length,25);i++) {
|
||||
searchResults.editableList('addItem',currentResults[i])
|
||||
@@ -220,9 +269,8 @@ RED.search = (function() {
|
||||
} else {
|
||||
searchResults.editableList('addItem',{});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
options: getSearchOptions()
|
||||
});
|
||||
var copySearchContainer = $('<button type="button" class="red-ui-button red-ui-button-small"><i class="fa fa-caret-right"></button>').appendTo(searchDiv).on('click', function(evt) {
|
||||
evt.preventDefault();
|
||||
@@ -276,9 +324,15 @@ RED.search = (function() {
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} if ($(children[selected]).hasClass("red-ui-search-history")) {
|
||||
var object = $(children[selected]).find(".red-ui-editableList-item-content").data('data');
|
||||
if (object) {
|
||||
searchInput.searchBox('value',object.value)
|
||||
}
|
||||
} else if (!$(children[selected]).hasClass("red-ui-search-historyHeader")) {
|
||||
if (currentResults.length > 0) {
|
||||
reveal(currentResults[Math.max(0,selected)].node);
|
||||
currentIndex = Math.max(0,selected);
|
||||
reveal(currentResults[currentIndex].node);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -292,7 +346,32 @@ RED.search = (function() {
|
||||
addItem: function(container,i,object) {
|
||||
var node = object.node;
|
||||
var div;
|
||||
if (object.more) {
|
||||
if (object.historyHeader) {
|
||||
container.parent().addClass("red-ui-search-historyHeader")
|
||||
$('<div>',{class:"red-ui-search-empty"}).text(RED._("search.history")).appendTo(container);
|
||||
$('<button type="button" class="red-ui-button red-ui-button-small"></button>').text(RED._("search.clear")).appendTo(container).on("click", function(evt) {
|
||||
evt.preventDefault();
|
||||
searchHistory = [];
|
||||
searchResults.editableList('empty');
|
||||
});
|
||||
} else if (object.history) {
|
||||
container.parent().addClass("red-ui-search-history")
|
||||
div = $('<a>',{href:'#',class:"red-ui-search-result"}).appendTo(container);
|
||||
div.text(object.value);
|
||||
div.on("click", function(evt) {
|
||||
evt.preventDefault();
|
||||
searchInput.searchBox('value',object.value)
|
||||
searchInput.focus();
|
||||
})
|
||||
$('<button type="button" class="red-ui-button red-ui-button-small"><i class="fa fa-remove"></i></button>').appendTo(container).on("click", function(evt) {
|
||||
evt.preventDefault();
|
||||
var index = searchHistory.indexOf(object.value);
|
||||
searchHistory.splice(index,1);
|
||||
searchResults.editableList('removeItem', object);
|
||||
});
|
||||
|
||||
|
||||
} else if (object.more) {
|
||||
container.parent().addClass("red-ui-search-more")
|
||||
div = $('<a>',{href:'#',class:"red-ui-search-result red-ui-search-empty"}).appendTo(container);
|
||||
div.text(RED._("palette.editor.more",{count:object.more.results.length-object.more.start}));
|
||||
@@ -337,6 +416,7 @@ RED.search = (function() {
|
||||
|
||||
div.on("click", function(evt) {
|
||||
evt.preventDefault();
|
||||
currentIndex = i;
|
||||
reveal(node);
|
||||
});
|
||||
}
|
||||
@@ -347,12 +427,64 @@ RED.search = (function() {
|
||||
}
|
||||
|
||||
function reveal(node) {
|
||||
hide();
|
||||
var searchVal = searchInput.val();
|
||||
var existingIndex = searchHistory.indexOf(searchVal);
|
||||
if (existingIndex > -1) {
|
||||
searchHistory.splice(existingIndex,1);
|
||||
}
|
||||
searchHistory.unshift(searchVal);
|
||||
$("#red-ui-view-searchtools-search").data("term", searchVal);
|
||||
activeResults = Object.assign([], currentResults);
|
||||
hide(null, activeResults.length > 0);
|
||||
RED.view.reveal(node.id);
|
||||
}
|
||||
|
||||
function revealPrev() {
|
||||
if (disabled) {
|
||||
updateSearchToolbar();
|
||||
return;
|
||||
}
|
||||
if (!searchResults || !activeResults.length) {
|
||||
show();
|
||||
return;
|
||||
}
|
||||
if (currentIndex > 0) {
|
||||
currentIndex--;
|
||||
} else {
|
||||
currentIndex = activeResults.length - 1;
|
||||
}
|
||||
const n = activeResults[currentIndex];
|
||||
if (n && n.node && n.node.id) {
|
||||
RED.view.reveal(n.node.id);
|
||||
$("#red-ui-view-searchtools-prev").trigger("focus");
|
||||
}
|
||||
updateSearchToolbar();
|
||||
}
|
||||
function revealNext() {
|
||||
if (disabled) {
|
||||
updateSearchToolbar();
|
||||
return;
|
||||
}
|
||||
if (!searchResults || !activeResults.length) {
|
||||
show();
|
||||
return;
|
||||
}
|
||||
if (currentIndex < activeResults.length - 1) {
|
||||
currentIndex++
|
||||
} else {
|
||||
currentIndex = 0;
|
||||
}
|
||||
const n = activeResults[currentIndex];
|
||||
if (n && n.node && n.node.id) {
|
||||
RED.view.reveal(n.node.id);
|
||||
$("#red-ui-view-searchtools-next").trigger("focus");
|
||||
}
|
||||
updateSearchToolbar();
|
||||
}
|
||||
|
||||
function show(v) {
|
||||
if (disabled) {
|
||||
updateSearchToolbar();
|
||||
return;
|
||||
}
|
||||
if (!visible) {
|
||||
@@ -365,16 +497,21 @@ RED.search = (function() {
|
||||
|
||||
if (dialog === null) {
|
||||
createDialog();
|
||||
} else {
|
||||
searchResults.editableList('empty');
|
||||
}
|
||||
dialog.slideDown(300);
|
||||
searchInput.searchBox('value',v)
|
||||
if (!v || v === "") {
|
||||
populateSearchHistory();
|
||||
}
|
||||
RED.events.emit("search:open");
|
||||
visible = true;
|
||||
}
|
||||
searchInput.trigger("focus");
|
||||
}
|
||||
|
||||
function hide() {
|
||||
function hide(el, keepSearchToolbar) {
|
||||
if (visible) {
|
||||
visible = false;
|
||||
$("#red-ui-header-shade").hide();
|
||||
@@ -388,13 +525,37 @@ RED.search = (function() {
|
||||
});
|
||||
}
|
||||
RED.events.emit("search:close");
|
||||
if (previousActiveElement) {
|
||||
if (previousActiveElement && (!keepSearchToolbar || !activeResults.length)) {
|
||||
$(previousActiveElement).trigger("focus");
|
||||
previousActiveElement = null;
|
||||
}
|
||||
previousActiveElement = null;
|
||||
}
|
||||
if(!keepSearchToolbar) {
|
||||
clearActiveSearch();
|
||||
}
|
||||
updateSearchToolbar();
|
||||
if(keepSearchToolbar && activeResults.length) {
|
||||
$("#red-ui-view-searchtools-next").trigger("focus");
|
||||
}
|
||||
}
|
||||
function updateSearchToolbar() {
|
||||
if (!disabled && currentIndex >= 0 && activeResults && activeResults.length) {
|
||||
let term = $("#red-ui-view-searchtools-search").data("term") || "";
|
||||
if (term.length > 16) {
|
||||
term = term.substring(0, 12) + "..."
|
||||
}
|
||||
const i18nSearchCounterData = {
|
||||
term: term,
|
||||
result: (currentIndex + 1),
|
||||
count: activeResults.length
|
||||
}
|
||||
$("#red-ui-view-searchtools-counter").text(RED._('actions.search-counter', i18nSearchCounterData));
|
||||
$("#view-search-tools > :not(:first-child)").show(); //show other tools
|
||||
} else {
|
||||
clearActiveSearch();
|
||||
$("#view-search-tools > :not(:first-child)").hide(); //hide all but search button
|
||||
}
|
||||
}
|
||||
|
||||
function clearIndex() {
|
||||
index = {};
|
||||
}
|
||||
@@ -416,9 +577,29 @@ RED.search = (function() {
|
||||
addItemToIndex(item);
|
||||
}
|
||||
|
||||
function clearActiveSearch() {
|
||||
activeResults = [];
|
||||
currentIndex = 0;
|
||||
$("#red-ui-view-searchtools-search").data("term", "");
|
||||
}
|
||||
|
||||
function getSearchOptions() {
|
||||
return [
|
||||
{label:RED._("search.options.configNodes"), value:"is:config"},
|
||||
{label:RED._("search.options.unusedConfigNodes"), value:"is:config is:unused"},
|
||||
{label:RED._("search.options.modifiedNodes"), value:"is:modified"},
|
||||
{label:RED._("search.options.invalidNodes"), value: "is:invalid"},
|
||||
{label:RED._("search.options.uknownNodes"), value: "type:unknown"},
|
||||
{label:RED._("search.options.unusedSubflows"), value:"is:subflow is:unused"},
|
||||
{label:RED._("search.options.hiddenFlows"), value:"is:hidden"},
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
function init() {
|
||||
RED.actions.add("core:search",show);
|
||||
RED.actions.add("core:search-previous",revealPrev);
|
||||
RED.actions.add("core:search-next",revealNext);
|
||||
|
||||
RED.events.on("editor:open",function() { disabled = true; });
|
||||
RED.events.on("editor:close",function() { disabled = false; });
|
||||
@@ -429,11 +610,21 @@ RED.search = (function() {
|
||||
|
||||
RED.keyboard.add("red-ui-search","escape",hide);
|
||||
|
||||
RED.keyboard.add("view-search-tools","escape",function() {
|
||||
clearActiveSearch();
|
||||
updateSearchToolbar();
|
||||
});
|
||||
|
||||
$("#red-ui-header-shade").on('mousedown',hide);
|
||||
$("#red-ui-editor-shade").on('mousedown',hide);
|
||||
$("#red-ui-palette-shade").on('mousedown',hide);
|
||||
$("#red-ui-sidebar-shade").on('mousedown',hide);
|
||||
|
||||
$("#red-ui-view-searchtools-close").on("click", function close() {
|
||||
clearActiveSearch();
|
||||
updateSearchToolbar();
|
||||
});
|
||||
$("#red-ui-view-searchtools-close").trigger("click");
|
||||
|
||||
RED.events.on("workspace:clear", clearIndex);
|
||||
|
||||
@@ -459,7 +650,8 @@ RED.search = (function() {
|
||||
init: init,
|
||||
show: show,
|
||||
hide: hide,
|
||||
search: search
|
||||
search: search,
|
||||
getSearchOptions: getSearchOptions
|
||||
};
|
||||
|
||||
})();
|
||||
|
@@ -19,6 +19,15 @@ RED.sidebar = (function() {
|
||||
var sidebar_tabs;
|
||||
var knownTabs = {};
|
||||
|
||||
// We store the current sidebar tab id in localStorage as 'last-sidebar-tab'
|
||||
// This is restored when the editor is reloaded.
|
||||
// We use sidebar_tabs.onchange to update localStorage. However that will
|
||||
// also get triggered when the first tab gets added to the tabs - typically
|
||||
// the 'info' tab. So we use the following variable to store the retrieved
|
||||
// value from localStorage before we start adding the actual tabs
|
||||
var lastSessionSelectedTab = null;
|
||||
|
||||
|
||||
function addTab(title,content,closeable,visible) {
|
||||
var options;
|
||||
if (typeof title === "string") {
|
||||
@@ -194,16 +203,16 @@ RED.sidebar = (function() {
|
||||
RED.events.emit("sidebar:resize");
|
||||
}
|
||||
|
||||
function showSidebar(id) {
|
||||
function showSidebar(id, skipShowSidebar) {
|
||||
if (id === ":first") {
|
||||
id = RED.settings.get("editor.sidebar.order",["info", "help", "version-control", "debug"])[0]
|
||||
id = lastSessionSelectedTab || RED.settings.get("editor.sidebar.order",["info", "help", "version-control", "debug"])[0]
|
||||
}
|
||||
if (id) {
|
||||
if (!containsTab(id) && knownTabs[id]) {
|
||||
sidebar_tabs.addTab(knownTabs[id]);
|
||||
}
|
||||
sidebar_tabs.activateTab(id);
|
||||
if (!RED.menu.isSelected("menu-item-sidebar")) {
|
||||
if (!skipShowSidebar && !RED.menu.isSelected("menu-item-sidebar")) {
|
||||
RED.menu.setSelected("menu-item-sidebar",true);
|
||||
}
|
||||
}
|
||||
@@ -227,6 +236,7 @@ RED.sidebar = (function() {
|
||||
if (tab.toolbar) {
|
||||
$(tab.toolbar).show();
|
||||
}
|
||||
RED.settings.setLocal("last-sidebar-tab", tab.id)
|
||||
},
|
||||
onremove: function(tab) {
|
||||
$(tab.wrapper).hide();
|
||||
@@ -255,7 +265,9 @@ RED.sidebar = (function() {
|
||||
}
|
||||
});
|
||||
RED.popover.tooltip($("#red-ui-sidebar-separator").find(".red-ui-sidebar-control-right"),RED._("keyboard.toggleSidebar"),"core:toggle-sidebar");
|
||||
showSidebar();
|
||||
|
||||
lastSessionSelectedTab = RED.settings.getLocal("last-sidebar-tab")
|
||||
|
||||
RED.sidebar.info.init();
|
||||
RED.sidebar.help.init();
|
||||
RED.sidebar.config.init();
|
||||
|
@@ -27,5 +27,8 @@ RED.state = {
|
||||
PANNING: 10,
|
||||
SELECTING_NODE: 11,
|
||||
GROUP_DRAGGING: 12,
|
||||
GROUP_RESIZE: 13
|
||||
GROUP_RESIZE: 13,
|
||||
DETACHED_DRAGGING: 14,
|
||||
SLICING: 15,
|
||||
SLICING_JUNCTION: 16
|
||||
}
|
||||
|
@@ -31,6 +31,7 @@ RED.statusBar = (function() {
|
||||
function addWidget(options) {
|
||||
widgets[options.id] = options;
|
||||
var el = $('<span class="red-ui-statusbar-widget"></span>');
|
||||
el.prop('id', options.id);
|
||||
options.element.appendTo(el);
|
||||
if (options.align === 'left') {
|
||||
leftBucket.append(el);
|
||||
|
@@ -15,6 +15,8 @@
|
||||
**/
|
||||
RED.sidebar.config = (function() {
|
||||
|
||||
let flashingConfigNode;
|
||||
let flashingConfigNodeTimer;
|
||||
|
||||
var content = document.createElement("div");
|
||||
content.className = "red-ui-sidebar-node-config";
|
||||
@@ -145,6 +147,7 @@ RED.sidebar.config = (function() {
|
||||
var entry = $('<li class="red-ui-palette-node_id_'+node.id.replace(/\./g,"-")+'"></li>').appendTo(list);
|
||||
var nodeDiv = $('<div class="red-ui-palette-node-config red-ui-palette-node"></div>').appendTo(entry);
|
||||
entry.data('node',node.id);
|
||||
nodeDiv.data('node',node.id);
|
||||
var label = $('<div class="red-ui-palette-label"></div>').text(label).appendTo(nodeDiv);
|
||||
if (node.d) {
|
||||
nodeDiv.addClass("red-ui-palette-node-config-disabled");
|
||||
@@ -350,6 +353,32 @@ RED.sidebar.config = (function() {
|
||||
RED.popover.tooltip($('#red-ui-sidebar-config-filter-unused'), RED._("sidebar.config.showAllUnusedConfigNodes"));
|
||||
|
||||
}
|
||||
|
||||
function flashConfigNode(el) {
|
||||
if(flashingConfigNode && flashingConfigNode.length) {
|
||||
//cancel current flashing node before flashing new node
|
||||
clearInterval(flashingConfigNodeTimer);
|
||||
flashingConfigNodeTimer = null;
|
||||
flashingConfigNode.children("div").removeClass('highlighted');
|
||||
flashingConfigNode = null;
|
||||
}
|
||||
if(!el || !el.children("div").length) { return; }
|
||||
|
||||
flashingConfigNodeTimer = setInterval(function(flashEndTime) {
|
||||
if (flashEndTime >= Date.now()) {
|
||||
const highlighted = el.children("div").hasClass("highlighted");
|
||||
el.children("div").toggleClass('highlighted', !highlighted)
|
||||
} else {
|
||||
clearInterval(flashingConfigNodeTimer);
|
||||
flashingConfigNodeTimer = null;
|
||||
flashingConfigNode = null;
|
||||
el.children("div").removeClass('highlighted');
|
||||
}
|
||||
}, 100, Date.now() + 2200);
|
||||
flashingConfigNode = el;
|
||||
el.children("div").addClass('highlighted');
|
||||
}
|
||||
|
||||
function show(id) {
|
||||
if (typeof id === 'boolean') {
|
||||
if (id) {
|
||||
@@ -374,19 +403,7 @@ RED.sidebar.config = (function() {
|
||||
} else if (y<0) {
|
||||
scrollWindow.animate({scrollTop: '+='+(y-10)},150);
|
||||
}
|
||||
var flash = 21;
|
||||
var flashFunc = function() {
|
||||
if ((flash%2)===0) {
|
||||
node.removeClass('node_highlighted');
|
||||
} else {
|
||||
node.addClass('node_highlighted');
|
||||
}
|
||||
flash--;
|
||||
if (flash >= 0) {
|
||||
setTimeout(flashFunc,100);
|
||||
}
|
||||
}
|
||||
flashFunc();
|
||||
flashConfigNode(node, id);
|
||||
},100);
|
||||
}
|
||||
RED.sidebar.show("config");
|
||||
|
@@ -64,15 +64,17 @@ RED.sidebar.help = (function() {
|
||||
style: "compact",
|
||||
delay: 100,
|
||||
change: function() {
|
||||
var val = $(this).val().toLowerCase();
|
||||
if (val) {
|
||||
const searchFor = $(this).val().toLowerCase();
|
||||
if (searchFor) {
|
||||
showTOC();
|
||||
var c = treeList.treeList('filter',function(item) {
|
||||
treeList.treeList('filter',function(item) {
|
||||
if (item.depth === 0) {
|
||||
return true;
|
||||
}
|
||||
return (item.nodeType && item.nodeType.indexOf(val) > -1) ||
|
||||
(item.subflowLabel && item.subflowLabel.indexOf(val) > -1)
|
||||
let found = item.nodeType && item.nodeType.toLowerCase().indexOf(searchFor) > -1;
|
||||
found = found || item.subflowLabel && item.subflowLabel.toLowerCase().indexOf(searchFor) > -1;
|
||||
found = found || item.palleteLabel && item.palleteLabel.toLowerCase().indexOf(searchFor) > -1;
|
||||
return found;
|
||||
},true)
|
||||
} else {
|
||||
treeList.treeList('filter',null);
|
||||
@@ -224,17 +226,21 @@ RED.sidebar.help = (function() {
|
||||
|
||||
|
||||
moduleNames.forEach(function(moduleName) {
|
||||
var module = modules[moduleName];
|
||||
var nodeTypes = [];
|
||||
|
||||
var setNames = Object.keys(module.sets);
|
||||
const module = modules[moduleName];
|
||||
const nodeTypes = [];
|
||||
const moduleSets = module.sets;
|
||||
const setNames = Object.keys(moduleSets);
|
||||
setNames.forEach(function(setName) {
|
||||
module.sets[setName].types.forEach(function(nodeType) {
|
||||
const moduleSet = moduleSets[setName];
|
||||
moduleSet.types.forEach(function(nodeType) {
|
||||
if ($("script[data-help-name='"+nodeType+"']").length) {
|
||||
const n = {_def:RED.nodes.getType(nodeType),type:nodeType}
|
||||
n.name = getNodePaletteLabel(n);
|
||||
nodeTypes.push({
|
||||
id: "node-type:"+nodeType,
|
||||
nodeType: nodeType,
|
||||
element:getNodeLabel({_def:RED.nodes.getType(nodeType),type:nodeType})
|
||||
palleteLabel: n.name,
|
||||
element: getNodeLabel(n)
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -254,18 +260,21 @@ RED.sidebar.help = (function() {
|
||||
treeList.treeList("data",helpData);
|
||||
}
|
||||
|
||||
function getNodeLabel(n) {
|
||||
var div = $('<div>',{class:"red-ui-node-list-item"});
|
||||
var icon = RED.utils.createNodeIcon(n).appendTo(div);
|
||||
var label = n.name;
|
||||
function getNodePaletteLabel(n) {
|
||||
let label = n.name;
|
||||
if (!label && n._def && n._def.paletteLabel) {
|
||||
try {
|
||||
label = (typeof n._def.paletteLabel === "function" ? n._def.paletteLabel.call(n._def) : n._def.paletteLabel)||"";
|
||||
} catch (err) {
|
||||
}
|
||||
}
|
||||
label = label || n.type;
|
||||
$('<div>',{class:"red-ui-node-label"}).text(n.name||n.type).appendTo(icon);
|
||||
return label || n.type;
|
||||
}
|
||||
|
||||
function getNodeLabel(n) {
|
||||
const div = $('<div>',{class:"red-ui-node-list-item"});
|
||||
const icon = RED.utils.createNodeIcon(n).appendTo(div);
|
||||
$('<div>',{class:"red-ui-node-label"}).text(getNodePaletteLabel(n)).appendTo(icon);
|
||||
return div;
|
||||
}
|
||||
|
||||
@@ -361,7 +370,7 @@ RED.sidebar.help = (function() {
|
||||
var node = selection.nodes[0];
|
||||
if (node.type === "subflow" && node.direction) {
|
||||
// ignore subflow virtual ports
|
||||
} else if (node.type !== 'group'){
|
||||
} else if (node.type !== 'group' && node.type !== 'junction'){
|
||||
showNodeTypeHelp(node.type);
|
||||
}
|
||||
}
|
||||
@@ -379,7 +388,7 @@ RED.sidebar.help = (function() {
|
||||
var currentVersionParts = RED.settings.version.split(".");
|
||||
var tourVersionParts = tour.version.split(".");
|
||||
if (tourVersionParts[0] === currentVersionParts[0] && tourVersionParts[1] === currentVersionParts[1]) {
|
||||
tourHeader = '<div><button type="button" onclick="RED.actions.invoke(\'core:show-welcome-tour\')" class="red-ui-button">Take a tour</button></div>'
|
||||
tourHeader = '<div><button type="button" onclick="RED.actions.invoke(\'core:show-welcome-tour\')" class="red-ui-button">' + RED._("tourGuide.takeATour") + '</button></div>';
|
||||
}
|
||||
}
|
||||
var aboutHeader = '<div style="text-align:center;">'+tourHeader+'</div>'
|
||||
|
@@ -175,6 +175,7 @@ RED.sidebar.info.outliner = (function() {
|
||||
n.d = true;
|
||||
}
|
||||
n.dirty = true;
|
||||
n.dirtyStatus = true;
|
||||
n.changed = true;
|
||||
RED.events.emit("nodes:change",n);
|
||||
groupHistoryEvent.events.push(historyEvent);
|
||||
@@ -203,6 +204,7 @@ RED.sidebar.info.outliner = (function() {
|
||||
n.d = true;
|
||||
}
|
||||
n.dirty = true;
|
||||
n.dirtyStatus = true;
|
||||
n.changed = true;
|
||||
RED.events.emit("nodes:change",n);
|
||||
RED.history.push(historyEvent);
|
||||
@@ -266,13 +268,7 @@ RED.sidebar.info.outliner = (function() {
|
||||
|
||||
}
|
||||
},
|
||||
options: [
|
||||
{label:RED._("sidebar.info.search.configNodes"), value:"is:config"},
|
||||
{label:RED._("sidebar.info.search.unusedConfigNodes"), value:"is:config is:unused"},
|
||||
{label:RED._("sidebar.info.search.invalidNodes"), value: "is:invalid"},
|
||||
{label:RED._("sidebar.info.search.uknownNodes"), value: "type:unknown"},
|
||||
{label:RED._("sidebar.info.search.unusedSubflows"), value:"is:subflow is:unused"},
|
||||
]
|
||||
options: RED.search.getSearchOptions()
|
||||
});
|
||||
|
||||
projectInfo = $('<div class="red-ui-treeList-label red-ui-info-outline-project"><span class="red-ui-treeList-icon"><i class="fa fa-archive"></i></span></div>').hide().appendTo(container)
|
||||
@@ -284,15 +280,18 @@ RED.sidebar.info.outliner = (function() {
|
||||
data:getFlowData()
|
||||
})
|
||||
treeList.on('treelistselect', function(e,item) {
|
||||
var node = RED.nodes.node(item.id) || RED.nodes.group(item.id);
|
||||
var node = RED.nodes.node(item.id) || RED.nodes.group(item.id) || RED.nodes.workspace(item.id) || RED.nodes.subflow(item.id);
|
||||
if (node) {
|
||||
if (node.type === 'group' || node._def.category !== "config") {
|
||||
// RED.view.select({nodes:[node]})
|
||||
} else if (node._def.category === "config") {
|
||||
RED.sidebar.info.refresh(node);
|
||||
} else {
|
||||
// RED.view.select({nodes:[]})
|
||||
}
|
||||
RED.sidebar.info.refresh(node);
|
||||
// if (node.type === 'group' || node._def.category !== "config") {
|
||||
// // RED.view.select({nodes:[node]})
|
||||
// } else if (node._def.category === "config") {
|
||||
// RED.sidebar.info.refresh(node);
|
||||
// } else {
|
||||
// // RED.view.select({nodes:[]})
|
||||
// }
|
||||
} else {
|
||||
RED.sidebar.info.refresh(null);
|
||||
}
|
||||
})
|
||||
treeList.on('treelistconfirm', function(e,item) {
|
||||
@@ -563,7 +562,7 @@ RED.sidebar.info.outliner = (function() {
|
||||
}
|
||||
}
|
||||
function getGutter(n) {
|
||||
var span = $("<span>",{class:"red-ui-info-outline-gutter"});
|
||||
var span = $("<span>",{class:"red-ui-info-outline-gutter red-ui-treeList-gutter-float"});
|
||||
var revealButton = $('<button type="button" class="red-ui-info-outline-item-control-reveal red-ui-button red-ui-button-small"><i class="fa fa-search"></i></button>').appendTo(span).on("click",function(evt) {
|
||||
evt.preventDefault();
|
||||
evt.stopPropagation();
|
||||
|
@@ -163,6 +163,7 @@ RED.sidebar.info = (function() {
|
||||
});
|
||||
return el;
|
||||
}
|
||||
|
||||
function refresh(node) {
|
||||
if (node === undefined) {
|
||||
refreshSelection();
|
||||
@@ -271,7 +272,7 @@ RED.sidebar.info = (function() {
|
||||
objectType = "group";
|
||||
}
|
||||
$(propRow.children()[0]).text(RED._("sidebar.info."+objectType))
|
||||
RED.utils.createObjectElement(node.id).appendTo(propRow.children()[1]);
|
||||
RED.utils.createObjectElement(node.id,{sourceId: node.id}).appendTo(propRow.children()[1]);
|
||||
|
||||
if (node.type === "tab" || node.type === "subflow") {
|
||||
// If nothing is selected, but we're on a flow or subflow tab.
|
||||
@@ -301,8 +302,8 @@ RED.sidebar.info = (function() {
|
||||
if (typeCounts.groups > 0) {
|
||||
$('<div>').text(RED._("clipboard.group",{count:typeCounts.groups})).appendTo(counts);
|
||||
}
|
||||
|
||||
|
||||
} else if (node.type === 'junction') {
|
||||
propertiesPanelHeaderHelp.hide();
|
||||
} else {
|
||||
propertiesPanelHeaderHelp.show();
|
||||
|
||||
@@ -365,7 +366,7 @@ RED.sidebar.info = (function() {
|
||||
|
||||
}
|
||||
} else {
|
||||
RED.utils.createObjectElement(val).appendTo(propRow.children()[1]);
|
||||
RED.utils.createObjectElement(val,{sourceId: node.id}).appendTo(propRow.children()[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -431,6 +432,7 @@ RED.sidebar.info = (function() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
function setInfoText(infoText,target) {
|
||||
var info = addTargetToExternalLinks($('<div class="red-ui-help"><span class="red-ui-text-bidi-aware" dir=\"'+RED.text.bidi.resolveBaseTextDir(infoText)+'">'+infoText+'</span></div>')).appendTo(target);
|
||||
info.find(".red-ui-text-bidi-aware").contents().filter(function() { return this.nodeType === 3 && this.textContent.trim() !== "" }).wrap( "<span></span>" );
|
||||
@@ -447,6 +449,7 @@ RED.sidebar.info = (function() {
|
||||
$(this).toggleClass('expanded',!isExpanded);
|
||||
})
|
||||
}
|
||||
|
||||
var tips = (function() {
|
||||
var enabled = true;
|
||||
var startDelay = 1000;
|
||||
|
@@ -256,6 +256,10 @@ RED.tourGuide = (function() {
|
||||
}
|
||||
$('<div>').css("text-align","left").html(getLocaleText(step.description)).appendTo(stepDescription);
|
||||
|
||||
if (step.image) {
|
||||
$(`<img src="red/tours/${step.image}" />`).appendTo(stepDescription)
|
||||
}
|
||||
|
||||
var stepToolbar = $('<div>',{class:"red-ui-tourGuide-toolbar"}).appendTo(stepContent);
|
||||
|
||||
// var breadcrumbs = $('<div>',{class:"red-ui-tourGuide-breadcrumbs"}).appendTo(stepToolbar);
|
||||
@@ -364,6 +368,8 @@ RED.tourGuide = (function() {
|
||||
if (step.fallback) {
|
||||
focus.one("mouseenter", function(evt) {
|
||||
setTimeout(function() {
|
||||
var pos = targetElement[0].getBoundingClientRect();
|
||||
var dimension = Math.max(50, Math.max(pos.width,pos.height)*1.5);
|
||||
focus.css({
|
||||
width: (4*dimension)+"px",
|
||||
height: (4*dimension)+"px"
|
||||
|
@@ -171,17 +171,21 @@ RED.typeSearch = (function() {
|
||||
var div = $('<div>',{class:"red-ui-search-result"}).appendTo(container);
|
||||
|
||||
var nodeDiv = $('<div>',{class:"red-ui-search-result-node"}).appendTo(div);
|
||||
var colour = RED.utils.getNodeColor(object.type,def);
|
||||
if (object.type === "junction") {
|
||||
nodeDiv.addClass("red-ui-palette-icon-junction");
|
||||
} else {
|
||||
var colour = RED.utils.getNodeColor(object.type,def);
|
||||
nodeDiv.css('backgroundColor',colour);
|
||||
}
|
||||
var icon_url = RED.utils.getNodeIcon(def);
|
||||
nodeDiv.css('backgroundColor',colour);
|
||||
|
||||
var iconContainer = $('<div/>',{class:"red-ui-palette-icon-container"}).appendTo(nodeDiv);
|
||||
RED.utils.createIconElement(icon_url, iconContainer, false);
|
||||
|
||||
if (def.inputs > 0) {
|
||||
if (object.type !== "junction" && def.inputs > 0) {
|
||||
$('<div/>',{class:"red-ui-search-result-node-port"}).appendTo(nodeDiv);
|
||||
}
|
||||
if (def.outputs > 0) {
|
||||
if (object.type !== "junction" && def.outputs > 0) {
|
||||
$('<div/>',{class:"red-ui-search-result-node-port red-ui-search-result-node-output"}).appendTo(nodeDiv);
|
||||
}
|
||||
|
||||
@@ -313,8 +317,8 @@ RED.typeSearch = (function() {
|
||||
return !filter ||
|
||||
(
|
||||
(!filter.type || type === filter.type) &&
|
||||
(!filter.input || def.inputs > 0) &&
|
||||
(!filter.output || def.outputs > 0)
|
||||
(!filter.input || type === 'junction' || def.inputs > 0) &&
|
||||
(!filter.output || type === 'junction' || def.outputs > 0)
|
||||
)
|
||||
}
|
||||
function refreshTypeList(opts) {
|
||||
@@ -323,7 +327,7 @@ RED.typeSearch = (function() {
|
||||
searchInput.searchBox('value','').focus();
|
||||
selected = -1;
|
||||
var common = [
|
||||
'inject','debug','function','change','switch'
|
||||
'inject','debug','function','change','switch','junction'
|
||||
].filter(function(t) { return applyFilter(opts.filter,t,RED.nodes.getType(t)); });
|
||||
|
||||
var recentlyUsed = Object.keys(typesUsed);
|
||||
@@ -348,6 +352,9 @@ RED.typeSearch = (function() {
|
||||
var index = 0;
|
||||
for(i=0;i<common.length;i++) {
|
||||
var itemDef = RED.nodes.getType(common[i]);
|
||||
if (common[i] === 'junction') {
|
||||
itemDef = { inputs:1, outputs: 1, label: 'junction', type: 'junction'}
|
||||
}
|
||||
if (itemDef) {
|
||||
item = {
|
||||
type: common[i],
|
||||
|
@@ -121,6 +121,13 @@ RED.userSettings = (function() {
|
||||
// {setting:"theme", label:"Theme",options:function(done){ done([{val:'',text:'default'}].concat(RED.settings.theme("themes"))) }},
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
title: "menu.label.view.view",
|
||||
options: [
|
||||
{setting:"view-store-zoom",label:"menu.label.view.storeZoom", default: false, toggle:true, onchange: function(val) { if (!val) { RED.settings.removeLocal("zoom-level")}}},
|
||||
{setting:"view-store-position",label:"menu.label.view.storePosition", default: false, toggle:true, onchange: function(val) { if (!val) { RED.settings.removeLocal("scroll-positions")}}},
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "menu.label.view.grid",
|
||||
options: [
|
||||
|
@@ -109,7 +109,7 @@ RED.utils = (function() {
|
||||
window._marked.use({extensions: [descriptionList, description] } );
|
||||
|
||||
function renderMarkdown(txt) {
|
||||
var rendered = _marked(txt);
|
||||
var rendered = _marked.parse(txt);
|
||||
var cleaned = DOMPurify.sanitize(rendered, {SAFE_FOR_JQUERY: true})
|
||||
return cleaned;
|
||||
}
|
||||
@@ -142,6 +142,8 @@ RED.utils = (function() {
|
||||
result = $('<span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-meta"></span>').text('function');
|
||||
} else if (value.hasOwnProperty('type') && (value.type === 'number' || value.type === 'bigint')) {
|
||||
result = $('<span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-number"></span>').text(value.data);
|
||||
} else if (value.hasOwnProperty('type') && value.type === 'regexp') {
|
||||
result = $('<span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-string"></span>').text(value.data);
|
||||
} else {
|
||||
result = $('<span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-meta">object</span>');
|
||||
}
|
||||
@@ -363,7 +365,16 @@ RED.utils = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
function buildMessageElement(obj,options) {
|
||||
/**
|
||||
* Create a DOM element representation of obj - as used by Debug sidebar etc
|
||||
*
|
||||
* @params obj - the data to display
|
||||
* @params options - a bag of options
|
||||
*
|
||||
* - If you want the Copy Value button, then set `sourceId`
|
||||
* - If you want the Copy Path button, also set `path` to the value to be copied
|
||||
*/
|
||||
function createObjectElement(obj,options) {
|
||||
options = options || {};
|
||||
var key = options.key;
|
||||
var typeHint = options.typeHint;
|
||||
@@ -440,6 +451,8 @@ RED.utils = (function() {
|
||||
$('<span class="red-ui-debug-msg-type-null">undefined</span>').appendTo(entryObj);
|
||||
} else if (obj.__enc__ && (obj.type === 'number' || obj.type === 'bigint')) {
|
||||
e = $('<span class="red-ui-debug-msg-type-number red-ui-debug-msg-object-header"></span>').text(obj.data).appendTo(entryObj);
|
||||
} else if (typeHint === "regexp" || (obj.__enc__ && obj.type === 'regexp')) {
|
||||
e = $('<span class="red-ui-debug-msg-type-string red-ui-debug-msg-object-header"></span>').text((typeof obj === "string")?obj:obj.data).appendTo(entryObj);
|
||||
} else if (typeHint === "function" || (obj.__enc__ && obj.type === 'function')) {
|
||||
e = $('<span class="red-ui-debug-msg-type-meta red-ui-debug-msg-object-header"></span>').text("function").appendTo(entryObj);
|
||||
} else if (typeHint === "internal" || (obj.__enc__ && obj.type === 'internal')) {
|
||||
@@ -551,7 +564,7 @@ RED.utils = (function() {
|
||||
if (fullLength <= 10) {
|
||||
for (i=0;i<fullLength;i++) {
|
||||
row = $('<div class="red-ui-debug-msg-object-entry collapsed"></div>').appendTo(arrayRows);
|
||||
subElements[path+"["+i+"]"] = buildMessageElement(
|
||||
subElements[path+"["+i+"]"] = createObjectElement(
|
||||
data[i],
|
||||
{
|
||||
key: ""+i,
|
||||
@@ -581,7 +594,7 @@ RED.utils = (function() {
|
||||
return function() {
|
||||
for (var i=min;i<=max;i++) {
|
||||
var row = $('<div class="red-ui-debug-msg-object-entry collapsed"></div>').appendTo(parent);
|
||||
subElements[path+"["+i+"]"] = buildMessageElement(
|
||||
subElements[path+"["+i+"]"] = createObjectElement(
|
||||
data[i],
|
||||
{
|
||||
key: ""+i,
|
||||
@@ -637,7 +650,7 @@ RED.utils = (function() {
|
||||
newPath += "[\""+keys[i].replace(/"/,"\\\"")+"\"]"
|
||||
}
|
||||
}
|
||||
subElements[newPath] = buildMessageElement(
|
||||
subElements[newPath] = createObjectElement(
|
||||
data[keys[i]],
|
||||
{
|
||||
key: keys[i],
|
||||
@@ -1015,6 +1028,8 @@ RED.utils = (function() {
|
||||
return "font-awesome/fa-object-ungroup";
|
||||
} else if (node && node.type === 'group') {
|
||||
return "font-awesome/fa-object-group"
|
||||
} else if ((node && node.type === 'junction') || (def.type === "junction") ) {
|
||||
return "font-awesome/fa-circle-o"
|
||||
} else if (def.category === 'config') {
|
||||
return RED.settings.apiRootUrl+"icons/node-red/cog.svg"
|
||||
} else if (node && node.type === 'tab') {
|
||||
@@ -1080,6 +1095,8 @@ RED.utils = (function() {
|
||||
l = node.label || defaultLabel
|
||||
} else if (node.type === 'group') {
|
||||
l = node.name || defaultLabel
|
||||
} else if (node.type === 'junction') {
|
||||
l = 'junction'
|
||||
} else {
|
||||
l = node._def.label;
|
||||
try {
|
||||
@@ -1092,6 +1109,18 @@ RED.utils = (function() {
|
||||
return RED.text.bidi.enforceTextDirectionWithUCC(l);
|
||||
}
|
||||
|
||||
function getPaletteLabel(nodeType, def) {
|
||||
var label = nodeType;
|
||||
if (typeof def.paletteLabel !== "undefined") {
|
||||
try {
|
||||
label = (typeof def.paletteLabel === "function" ? def.paletteLabel.call(def) : def.paletteLabel)||"";
|
||||
} catch(err) {
|
||||
console.log("Definition error: "+nodeType+".paletteLabel",err);
|
||||
}
|
||||
}
|
||||
return label
|
||||
}
|
||||
|
||||
var nodeColorCache = {};
|
||||
function clearNodeColorCache() {
|
||||
nodeColorCache = {};
|
||||
@@ -1234,6 +1263,8 @@ RED.utils = (function() {
|
||||
nodeDiv.addClass("red-ui-palette-icon-selection");
|
||||
} else if (node.type === "group") {
|
||||
nodeDiv.addClass("red-ui-palette-icon-group");
|
||||
} else if (node.type === "junction") {
|
||||
nodeDiv.addClass("red-ui-palette-icon-junction");
|
||||
} else if (node.type === 'tab') {
|
||||
nodeDiv.addClass("red-ui-palette-icon-flow");
|
||||
} else {
|
||||
@@ -1365,7 +1396,7 @@ RED.utils = (function() {
|
||||
}
|
||||
|
||||
return {
|
||||
createObjectElement: buildMessageElement,
|
||||
createObjectElement: createObjectElement,
|
||||
getMessageProperty: getMessageProperty,
|
||||
setMessageProperty: setMessageProperty,
|
||||
normalisePropertyExpression: normalisePropertyExpression,
|
||||
@@ -1375,6 +1406,7 @@ RED.utils = (function() {
|
||||
getNodeIcon: getNodeIcon,
|
||||
getNodeLabel: getNodeLabel,
|
||||
getNodeColor: getNodeColor,
|
||||
getPaletteLabel: getPaletteLabel,
|
||||
clearNodeColorCache: clearNodeColorCache,
|
||||
addSpinnerOverlay: addSpinnerOverlay,
|
||||
decodeObject: decodeObject,
|
||||
|
@@ -725,6 +725,315 @@ RED.view.tools = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function wireSeriesOfNodes() {
|
||||
var selection = RED.view.selection();
|
||||
if (selection.nodes) {
|
||||
if (selection.nodes.length > 1) {
|
||||
var i = 0;
|
||||
var newLinks = [];
|
||||
while (i < selection.nodes.length - 1) {
|
||||
var nodeA = selection.nodes[i];
|
||||
var nodeB = selection.nodes[i+1];
|
||||
if (nodeA.outputs > 0 && nodeB.inputs > 0) {
|
||||
var existingLinks = RED.nodes.filterLinks({
|
||||
source: nodeA,
|
||||
target: nodeB,
|
||||
sourcePort: 0
|
||||
})
|
||||
if (existingLinks.length === 0) {
|
||||
var newLink = {
|
||||
source: nodeA,
|
||||
target: nodeB,
|
||||
sourcePort: 0
|
||||
}
|
||||
RED.nodes.addLink(newLink);
|
||||
newLinks.push(newLink);
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if (newLinks.length > 0) {
|
||||
RED.history.push({
|
||||
t: 'add',
|
||||
links: newLinks,
|
||||
dirty: RED.nodes.dirty()
|
||||
})
|
||||
RED.nodes.dirty(true);
|
||||
RED.view.redraw(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function wireNodeToMultiple() {
|
||||
var selection = RED.view.selection();
|
||||
if (selection.nodes) {
|
||||
if (selection.nodes.length > 1) {
|
||||
var sourceNode = selection.nodes[0];
|
||||
if (sourceNode.outputs === 0) {
|
||||
return;
|
||||
}
|
||||
var i = 1;
|
||||
var newLinks = [];
|
||||
while (i < selection.nodes.length) {
|
||||
var targetNode = selection.nodes[i];
|
||||
if (targetNode.inputs > 0) {
|
||||
var existingLinks = RED.nodes.filterLinks({
|
||||
source: sourceNode,
|
||||
target: targetNode,
|
||||
sourcePort: Math.min(sourceNode.outputs-1,i-1)
|
||||
})
|
||||
if (existingLinks.length === 0) {
|
||||
var newLink = {
|
||||
source: sourceNode,
|
||||
target: targetNode,
|
||||
sourcePort: Math.min(sourceNode.outputs-1,i-1)
|
||||
}
|
||||
RED.nodes.addLink(newLink);
|
||||
newLinks.push(newLink);
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if (newLinks.length > 0) {
|
||||
RED.history.push({
|
||||
t: 'add',
|
||||
links: newLinks,
|
||||
dirty: RED.nodes.dirty()
|
||||
})
|
||||
RED.nodes.dirty(true);
|
||||
RED.view.redraw(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Splits selected wires and re-joins them with link-out+link-in
|
||||
* @param {Object || Object[]} wires The wire(s) to split and replace with link-out, link-in nodes.
|
||||
*/
|
||||
function splitWiresWithLinkNodes(wires) {
|
||||
let wiresToSplit = wires || RED.view.selection().links;
|
||||
if (!Array.isArray(wiresToSplit)) {
|
||||
wiresToSplit = [wiresToSplit];
|
||||
}
|
||||
if (wiresToSplit.length < 1) {
|
||||
return; //nothing selected
|
||||
}
|
||||
|
||||
const history = {
|
||||
t: 'multi',
|
||||
events: [],
|
||||
dirty: RED.nodes.dirty()
|
||||
}
|
||||
const nodeSrcMap = {};
|
||||
const nodeTrgMap = {};
|
||||
const _gridSize = RED.view.gridSize();
|
||||
|
||||
for (let wireIdx = 0; wireIdx < wiresToSplit.length; wireIdx++) {
|
||||
const wire = wiresToSplit[wireIdx];
|
||||
|
||||
//get source and target nodes of this wire link
|
||||
const nSrc = wire.source;
|
||||
const nTrg = wire.target;
|
||||
|
||||
var updateNewNodePosXY = function (origNode, newNode, alignLeft, snap, yOffset) {
|
||||
const nnSize = RED.view.calculateNodeDimensions(newNode);
|
||||
newNode.w = nnSize[0];
|
||||
newNode.h = nnSize[1];
|
||||
const coords = { x: origNode.x || 0, y: origNode.y || 0, w: origNode.w || RED.view.node_width, h: origNode.h || RED.view.node_height };
|
||||
const x = coords.x - (coords.w/2.0);
|
||||
if (alignLeft) {
|
||||
coords.x = x - _gridSize - (newNode.w/2.0);
|
||||
} else {
|
||||
coords.x = x + coords.w + _gridSize + (newNode.w/2.0);
|
||||
}
|
||||
newNode.x = coords.x;
|
||||
newNode.y = coords.y;
|
||||
if (snap !== false) {
|
||||
const offsets = RED.view.tools.calculateGridSnapOffsets(newNode);
|
||||
newNode.x -= offsets.x;
|
||||
newNode.y -= offsets.y;
|
||||
}
|
||||
newNode.y += (yOffset || 0);
|
||||
}
|
||||
const srcPort = (wire.sourcePort || 0);
|
||||
let linkOutMapId = nSrc.id + ':' + srcPort;
|
||||
let nnLinkOut = nodeSrcMap[linkOutMapId];
|
||||
//Create a Link Out if one is not already present
|
||||
if(!nnLinkOut) {
|
||||
const nLinkOut = RED.view.createNode("link out"); //create link node
|
||||
nnLinkOut = nLinkOut.node;
|
||||
nodeSrcMap[linkOutMapId] = nnLinkOut;
|
||||
let yOffset = 0;
|
||||
if(nSrc.outputs > 1) {
|
||||
|
||||
const CENTER_PORT = (((nSrc.outputs-1) / 2) + 1);
|
||||
const offsetCount = Math.abs(CENTER_PORT - (srcPort + 1));
|
||||
yOffset = (_gridSize * 2 * offsetCount);
|
||||
if((srcPort + 1) < CENTER_PORT) {
|
||||
yOffset = -yOffset;
|
||||
}
|
||||
updateNewNodePosXY(nSrc, nnLinkOut, false, false, yOffset);
|
||||
} else {
|
||||
updateNewNodePosXY(nSrc, nnLinkOut, false, RED.view.snapGrid, yOffset);
|
||||
}
|
||||
//add created node
|
||||
RED.nodes.add(nnLinkOut);
|
||||
RED.editor.validateNode(nnLinkOut);
|
||||
history.events.push(nLinkOut.historyEvent);
|
||||
//connect node to link node
|
||||
const link = {
|
||||
source: nSrc,
|
||||
sourcePort: wire.sourcePort || 0,
|
||||
target: nnLinkOut
|
||||
};
|
||||
RED.nodes.addLink(link);
|
||||
history.events.push({
|
||||
t: 'add',
|
||||
links: [link],
|
||||
});
|
||||
}
|
||||
|
||||
let nnLinkIn = nodeTrgMap[nTrg.id];
|
||||
//Create a Link In if one is not already present
|
||||
if(!nnLinkIn) {
|
||||
const nLinkIn = RED.view.createNode("link in"); //create link node
|
||||
nnLinkIn = nLinkIn.node;
|
||||
nodeTrgMap[nTrg.id] = nnLinkIn;
|
||||
updateNewNodePosXY(nTrg, nnLinkIn, true, RED.view.snapGrid, 0);
|
||||
//add created node
|
||||
RED.nodes.add(nnLinkIn);
|
||||
RED.editor.validateNode(nnLinkIn);
|
||||
history.events.push(nLinkIn.historyEvent);
|
||||
//connect node to link node
|
||||
const link = {
|
||||
source: nnLinkIn,
|
||||
sourcePort: 0,
|
||||
target: nTrg
|
||||
};
|
||||
RED.nodes.addLink(link);
|
||||
history.events.push({
|
||||
t: 'add',
|
||||
links: [link],
|
||||
});
|
||||
}
|
||||
|
||||
//connect the link out/link in virtual wires
|
||||
if(nnLinkIn.links.indexOf(nnLinkOut.id) == -1) {
|
||||
nnLinkIn.links.push(nnLinkOut.id);
|
||||
}
|
||||
if(nnLinkOut.links.indexOf(nnLinkIn.id) == -1) {
|
||||
nnLinkOut.links.push(nnLinkIn.id);
|
||||
}
|
||||
|
||||
//delete the original wire
|
||||
RED.nodes.removeLink(wire);
|
||||
history.events.push({
|
||||
t: "delete",
|
||||
links: [wire]
|
||||
});
|
||||
}
|
||||
//add all history events to stack
|
||||
RED.history.push(history);
|
||||
|
||||
//select all downstream of new link-in nodes so user can drag to new location
|
||||
RED.view.clearSelection();
|
||||
RED.view.select({nodes: Object.values(nodeTrgMap) });
|
||||
selectConnected("down");
|
||||
|
||||
//update the view
|
||||
RED.nodes.dirty(true);
|
||||
RED.view.redraw(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the required offsets to snap a node
|
||||
* @param {Object} node The node to calculate grid snap offsets for
|
||||
* @param {Object} [options] Options: `align` can be "nearest", "left" or "right"
|
||||
* @returns `{x:number, y:number}` as the offsets to deduct from `x` and `y`
|
||||
*/
|
||||
function calculateGridSnapOffsets(node, options) {
|
||||
options = options || { align: "nearest" };
|
||||
const gridOffset = { x: 0, y: 0 };
|
||||
const gridSize = RED.view.gridSize();
|
||||
const offsetLeft = node.x - (gridSize * Math.round((node.x - node.w / 2) / gridSize) + node.w / 2);
|
||||
const offsetRight = node.x - (gridSize * Math.round((node.x + node.w / 2) / gridSize) - node.w / 2);
|
||||
gridOffset.x = offsetRight;
|
||||
if (options.align === "right") {
|
||||
//skip - already set to right
|
||||
} else if (options.align === "left" || Math.abs(offsetLeft) < Math.abs(offsetRight)) {
|
||||
gridOffset.x = offsetLeft;
|
||||
}
|
||||
gridOffset.y = node.y - (gridSize * Math.round(node.y / gridSize));
|
||||
return gridOffset;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate names for the select nodes.
|
||||
* - it only sets the name if it is currently blank
|
||||
* - it uses `<paletteLabel> <N>` - where N is the next available integer that
|
||||
* doesn't clash with any existing nodes of that type
|
||||
* @param {Object} node The node to set the name of - if not provided, uses current selection
|
||||
*/
|
||||
function generateNodeNames(node) {
|
||||
const nodes = node?[node]:RED.view.selection().nodes;
|
||||
if (nodes && nodes.length > 0) {
|
||||
// Generate history event if using the workspace selection,
|
||||
// or if the provided node already exists
|
||||
const generateHistory = !node || !!RED.nodes.node(node.id)
|
||||
const historyEvents = []
|
||||
const typeIndex = {}
|
||||
let changed = false;
|
||||
nodes.forEach(n => {
|
||||
if (n._def && n._def.defaults && n._def.defaults.name) {
|
||||
const paletteLabel = RED.utils.getPaletteLabel(n.type, n._def)
|
||||
const defaultNodeNameRE = new RegExp('^'+paletteLabel+' (\\d+)$')
|
||||
if (!typeIndex.hasOwnProperty(n.type)) {
|
||||
const existingNodes = RED.nodes.filterNodes({type: n.type})
|
||||
let maxNameNumber = 0;
|
||||
existingNodes.forEach(n => {
|
||||
let match = defaultNodeNameRE.exec(n.name)
|
||||
if (match) {
|
||||
let nodeNumber = parseInt(match[1])
|
||||
if (nodeNumber > maxNameNumber) {
|
||||
maxNameNumber = nodeNumber
|
||||
}
|
||||
}
|
||||
})
|
||||
typeIndex[n.type] = maxNameNumber + 1
|
||||
}
|
||||
if (n.name === '') {
|
||||
if (generateHistory) {
|
||||
historyEvents.push({
|
||||
t:'edit',
|
||||
node: n,
|
||||
changes: { name: n.name },
|
||||
dirty: RED.nodes.dirty(),
|
||||
changed: n.changed
|
||||
})
|
||||
}
|
||||
n.name = paletteLabel+" "+typeIndex[n.type]
|
||||
n.dirty = true
|
||||
typeIndex[n.type]++
|
||||
changed = true
|
||||
}
|
||||
}
|
||||
})
|
||||
if (changed) {
|
||||
if (historyEvents.length > 0) {
|
||||
RED.history.push({
|
||||
t: 'multi',
|
||||
events: historyEvents
|
||||
})
|
||||
}
|
||||
RED.nodes.dirty(true)
|
||||
RED.view.redraw()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
init: function() {
|
||||
RED.actions.add("core:show-selected-node-labels", function() { setSelectedNodeLabelState(true); })
|
||||
@@ -783,7 +1092,12 @@ RED.view.tools = (function() {
|
||||
RED.actions.add("core:distribute-selection-horizontally", function() { distributeSelection('h') })
|
||||
RED.actions.add("core:distribute-selection-vertically", function() { distributeSelection('v') })
|
||||
|
||||
RED.actions.add("core:wire-series-of-nodes", function() { wireSeriesOfNodes() })
|
||||
RED.actions.add("core:wire-node-to-multiple", function() { wireNodeToMultiple() })
|
||||
|
||||
RED.actions.add("core:split-wire-with-link-nodes", function () { splitWiresWithLinkNodes() });
|
||||
|
||||
RED.actions.add("core:generate-node-names", generateNodeNames )
|
||||
|
||||
// RED.actions.add("core:add-node", function() { addNode() })
|
||||
},
|
||||
@@ -796,7 +1110,8 @@ RED.view.tools = (function() {
|
||||
* @param {Number} dx
|
||||
* @param {Number} dy
|
||||
*/
|
||||
moveSelection: moveSelection
|
||||
moveSelection: moveSelection,
|
||||
calculateGridSnapOffsets: calculateGridSnapOffsets
|
||||
}
|
||||
|
||||
})();
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -24,6 +24,9 @@ RED.workspaces = (function() {
|
||||
var hideStack = [];
|
||||
var viewStackPos = 0;
|
||||
|
||||
let flashingTab;
|
||||
let flashingTabTimer;
|
||||
|
||||
function addToViewStack(id) {
|
||||
if (viewStackPos !== viewStack.length) {
|
||||
viewStack.splice(viewStackPos);
|
||||
@@ -66,7 +69,7 @@ RED.workspaces = (function() {
|
||||
var tabId = RED.nodes.id();
|
||||
do {
|
||||
workspaceIndex += 1;
|
||||
} while ($("#red-ui-workspace-tabs a[title='"+RED._('workspace.defaultName',{number:workspaceIndex})+"']").size() !== 0);
|
||||
} while ($("#red-ui-workspace-tabs li[flowname='"+RED._('workspace.defaultName',{number:workspaceIndex})+"']").size() !== 0);
|
||||
|
||||
ws = {
|
||||
type: "tab",
|
||||
@@ -79,12 +82,15 @@ RED.workspaces = (function() {
|
||||
};
|
||||
RED.nodes.addWorkspace(ws,targetIndex);
|
||||
workspace_tabs.addTab(ws,targetIndex);
|
||||
|
||||
workspace_tabs.activateTab(tabId);
|
||||
if (!skipHistoryEntry) {
|
||||
RED.history.push({t:'add',workspaces:[ws],dirty:RED.nodes.dirty()});
|
||||
RED.nodes.dirty(true);
|
||||
}
|
||||
}
|
||||
$("#red-ui-tab-"+(ws.id.replace(".","-"))).attr("flowname",ws.label)
|
||||
|
||||
RED.view.focus();
|
||||
return ws;
|
||||
}
|
||||
@@ -208,65 +214,84 @@ RED.workspaces = (function() {
|
||||
},
|
||||
onhide: function(tab) {
|
||||
hideStack.push(tab.id);
|
||||
|
||||
var hiddenTabs = JSON.parse(RED.settings.getLocal("hiddenTabs")||"{}");
|
||||
hiddenTabs[tab.id] = true;
|
||||
RED.settings.setLocal("hiddenTabs",JSON.stringify(hiddenTabs));
|
||||
|
||||
RED.events.emit("workspace:hide",{workspace: tab.id})
|
||||
},
|
||||
onshow: function(tab) {
|
||||
removeFromHideStack(tab.id);
|
||||
|
||||
var hiddenTabs = JSON.parse(RED.settings.getLocal("hiddenTabs")||"{}");
|
||||
delete hiddenTabs[tab.id];
|
||||
RED.settings.setLocal("hiddenTabs",JSON.stringify(hiddenTabs));
|
||||
|
||||
RED.events.emit("workspace:show",{workspace: tab.id})
|
||||
},
|
||||
minimumActiveTabWidth: 150,
|
||||
scrollable: true,
|
||||
addButton: "core:add-flow",
|
||||
addButtonCaption: RED._("workspace.addFlow"),
|
||||
menu: [
|
||||
{
|
||||
id:"red-ui-tabs-menu-option-search-flows",
|
||||
label: RED._("workspace.listFlows"),
|
||||
onselect: "core:list-flows"
|
||||
},
|
||||
{
|
||||
id:"red-ui-tabs-menu-option-search-subflows",
|
||||
label: RED._("workspace.listSubflows"),
|
||||
onselect: "core:list-subflows"
|
||||
},
|
||||
null,
|
||||
{
|
||||
id:"red-ui-tabs-menu-option-add-flow",
|
||||
label: RED._("workspace.addFlow"),
|
||||
onselect: "core:add-flow"
|
||||
},
|
||||
{
|
||||
id:"red-ui-tabs-menu-option-add-flow-right",
|
||||
label: RED._("workspace.addFlowToRight"),
|
||||
onselect: "core:add-flow-to-right"
|
||||
},
|
||||
null,
|
||||
{
|
||||
id:"red-ui-tabs-menu-option-add-hide-flows",
|
||||
label: RED._("workspace.hideFlow"),
|
||||
onselect: "core:hide-flow"
|
||||
},
|
||||
{
|
||||
id:"red-ui-tabs-menu-option-add-hide-other-flows",
|
||||
label: RED._("workspace.hideOtherFlows"),
|
||||
onselect: "core:hide-other-flows"
|
||||
},
|
||||
{
|
||||
id:"red-ui-tabs-menu-option-add-show-all-flows",
|
||||
label: RED._("workspace.showAllFlows"),
|
||||
onselect: "core:show-all-flows"
|
||||
},
|
||||
{
|
||||
id:"red-ui-tabs-menu-option-add-hide-all-flows",
|
||||
label: RED._("workspace.hideAllFlows"),
|
||||
onselect: "core:hide-all-flows"
|
||||
},
|
||||
{
|
||||
id:"red-ui-tabs-menu-option-add-show-last-flow",
|
||||
label: RED._("workspace.showLastHiddenFlow"),
|
||||
onselect: "core:show-last-hidden-flow"
|
||||
menu: function() {
|
||||
var menuItems = [
|
||||
{
|
||||
id:"red-ui-tabs-menu-option-search-flows",
|
||||
label: RED._("workspace.listFlows"),
|
||||
onselect: "core:list-flows"
|
||||
},
|
||||
{
|
||||
id:"red-ui-tabs-menu-option-search-subflows",
|
||||
label: RED._("workspace.listSubflows"),
|
||||
onselect: "core:list-subflows"
|
||||
},
|
||||
null,
|
||||
{
|
||||
id:"red-ui-tabs-menu-option-add-flow",
|
||||
label: RED._("workspace.addFlow"),
|
||||
onselect: "core:add-flow"
|
||||
},
|
||||
{
|
||||
id:"red-ui-tabs-menu-option-add-flow-right",
|
||||
label: RED._("workspace.addFlowToRight"),
|
||||
onselect: "core:add-flow-to-right"
|
||||
},
|
||||
null,
|
||||
{
|
||||
id:"red-ui-tabs-menu-option-add-hide-flows",
|
||||
label: RED._("workspace.hideFlow"),
|
||||
onselect: "core:hide-flow"
|
||||
},
|
||||
{
|
||||
id:"red-ui-tabs-menu-option-add-hide-other-flows",
|
||||
label: RED._("workspace.hideOtherFlows"),
|
||||
onselect: "core:hide-other-flows"
|
||||
},
|
||||
{
|
||||
id:"red-ui-tabs-menu-option-add-show-all-flows",
|
||||
label: RED._("workspace.showAllFlows"),
|
||||
onselect: "core:show-all-flows"
|
||||
},
|
||||
{
|
||||
id:"red-ui-tabs-menu-option-add-hide-all-flows",
|
||||
label: RED._("workspace.hideAllFlows"),
|
||||
onselect: "core:hide-all-flows"
|
||||
},
|
||||
{
|
||||
id:"red-ui-tabs-menu-option-add-show-last-flow",
|
||||
label: RED._("workspace.showLastHiddenFlow"),
|
||||
onselect: "core:show-last-hidden-flow"
|
||||
}
|
||||
]
|
||||
if (hideStack.length > 0) {
|
||||
menuItems.unshift({
|
||||
label: RED._("workspace.hiddenFlows",{count: hideStack.length}),
|
||||
onselect: "core:list-hidden-flows"
|
||||
})
|
||||
}
|
||||
]
|
||||
return menuItems;
|
||||
}
|
||||
});
|
||||
workspaceTabCount = 0;
|
||||
}
|
||||
@@ -406,7 +431,12 @@ RED.workspaces = (function() {
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
RED.actions.add("core:list-modified-nodes",function() {
|
||||
RED.actions.invoke("core:search","is:modified ");
|
||||
})
|
||||
RED.actions.add("core:list-hidden-flows",function() {
|
||||
RED.actions.invoke("core:search","is:hidden ");
|
||||
})
|
||||
RED.actions.add("core:list-flows",function() {
|
||||
RED.actions.invoke("core:search","type:tab ");
|
||||
})
|
||||
@@ -450,7 +480,7 @@ RED.workspaces = (function() {
|
||||
var changes = { disabled: workspace.disabled };
|
||||
workspace.disabled = disabled;
|
||||
$("#red-ui-tab-"+(workspace.id.replace(".","-"))).toggleClass('red-ui-workspace-disabled',!!workspace.disabled);
|
||||
if (id || activeWorkspace) {
|
||||
if (!id || (id === activeWorkspace)) {
|
||||
$("#red-ui-workspace").toggleClass("red-ui-workspace-disabled",!!workspace.disabled);
|
||||
}
|
||||
var historyEvent = {
|
||||
@@ -504,6 +534,31 @@ RED.workspaces = (function() {
|
||||
workspace_tabs.order(order);
|
||||
}
|
||||
|
||||
function flashTab(tabId) {
|
||||
if(flashingTab && flashingTab.length) {
|
||||
//cancel current flashing node before flashing new node
|
||||
clearInterval(flashingTabTimer);
|
||||
flashingTabTimer = null;
|
||||
flashingTab.removeClass('highlighted');
|
||||
flashingTab = null;
|
||||
}
|
||||
let tab = $("#red-ui-tab-" + tabId);
|
||||
if(!tab || !tab.length) { return; }
|
||||
|
||||
flashingTabTimer = setInterval(function(flashEndTime) {
|
||||
if (flashEndTime >= Date.now()) {
|
||||
const highlighted = tab.hasClass("highlighted");
|
||||
tab.toggleClass('highlighted', !highlighted)
|
||||
} else {
|
||||
clearInterval(flashingTabTimer);
|
||||
flashingTabTimer = null;
|
||||
flashingTab = null;
|
||||
tab.removeClass('highlighted');
|
||||
}
|
||||
}, 100, Date.now() + 2200);
|
||||
flashingTab = tab;
|
||||
tab.addClass('highlighted');
|
||||
}
|
||||
return {
|
||||
init: init,
|
||||
add: addWorkspace,
|
||||
@@ -531,12 +586,12 @@ RED.workspaces = (function() {
|
||||
}
|
||||
if (workspace_tabs.contains(id)) {
|
||||
workspace_tabs.hideTab(id);
|
||||
var hiddenTabs = JSON.parse(RED.settings.getLocal("hiddenTabs")||"{}");
|
||||
hiddenTabs[id] = true;
|
||||
RED.settings.setLocal("hiddenTabs",JSON.stringify(hiddenTabs));
|
||||
}
|
||||
},
|
||||
show: function(id,skipStack,unhideOnly) {
|
||||
isHidden: function(id) {
|
||||
return hideStack.includes(id)
|
||||
},
|
||||
show: function(id,skipStack,unhideOnly,flash) {
|
||||
if (!workspace_tabs.contains(id)) {
|
||||
var sf = RED.nodes.subflow(id);
|
||||
if (sf) {
|
||||
@@ -558,14 +613,14 @@ RED.workspaces = (function() {
|
||||
}
|
||||
workspace_tabs.activateTab(id);
|
||||
}
|
||||
var hiddenTabs = JSON.parse(RED.settings.getLocal("hiddenTabs")||"{}");
|
||||
delete hiddenTabs[id];
|
||||
RED.settings.setLocal("hiddenTabs",JSON.stringify(hiddenTabs));
|
||||
if(flash) {
|
||||
flashTab(id.replace(".","-"))
|
||||
}
|
||||
},
|
||||
refresh: function() {
|
||||
RED.nodes.eachWorkspace(function(ws) {
|
||||
workspace_tabs.renameTab(ws.id,ws.label);
|
||||
|
||||
$("#red-ui-tab-"+(ws.id.replace(".","-"))).attr("flowname",ws.label)
|
||||
})
|
||||
RED.nodes.eachSubflow(function(sf) {
|
||||
if (workspace_tabs.contains(sf.id)) {
|
||||
|
@@ -197,6 +197,7 @@ $view-select-mode-background: $secondary-background-selected;
|
||||
$view-grid-color: #eee;
|
||||
|
||||
$node-label-color: #333;
|
||||
$node-port-label-color: #888;
|
||||
$node-border: #999;
|
||||
$node-border-unknown: #f33;
|
||||
$node-border-placeholder: #aaa;
|
||||
|
@@ -360,6 +360,7 @@ button.red-ui-button-small
|
||||
position: absolute;
|
||||
top: -3000px;
|
||||
}
|
||||
|
||||
.form-row .red-ui-editor-node-label-form-row {
|
||||
margin: 5px 0 0 50px;
|
||||
label {
|
||||
|
@@ -21,6 +21,13 @@
|
||||
stroke-dasharray: 10 5;
|
||||
}
|
||||
|
||||
.nr-ui-view-slice {
|
||||
stroke-width: 1px;
|
||||
stroke: $view-lasso-stroke;
|
||||
fill: none;
|
||||
stroke-dasharray: 10 5;
|
||||
}
|
||||
|
||||
.node_label_italic, // deprecated: use red-ui-flow-node-label-italic
|
||||
.red-ui-flow-node-label-italic {
|
||||
font-style: italic;
|
||||
@@ -47,7 +54,7 @@
|
||||
|
||||
.red-ui-flow-port-label {
|
||||
stroke-width: 0;
|
||||
fill: $secondary-text-color;
|
||||
fill: $node-port-label-color;
|
||||
font-size: 16px;
|
||||
dominant-baseline: middle;
|
||||
text-anchor: middle;
|
||||
@@ -372,3 +379,17 @@ g.red-ui-flow-link-unknown path.red-ui-flow-link-line {
|
||||
white-space: pre;
|
||||
@include disable-selection;
|
||||
}
|
||||
.red-ui-flow-junction-background {
|
||||
stroke: $node-border;
|
||||
stroke-width: 1;
|
||||
fill: $node-port-background;
|
||||
cursor: crosshair;
|
||||
}
|
||||
.red-ui-flow-junction-hovered {
|
||||
stroke: $port-selected-color;
|
||||
fill: $port-selected-color;
|
||||
}
|
||||
.red-ui-flow-junction.selected .red-ui-flow-junction-background {
|
||||
stroke: $port-selected-color;
|
||||
// fill: $port-selected-color;
|
||||
}
|
||||
|
@@ -187,7 +187,7 @@
|
||||
ul.red-ui-menu-dropdown {
|
||||
background: $header-menu-background;
|
||||
border: 1px solid $header-menu-background;
|
||||
width: 250px !important;
|
||||
width: 260px !important;
|
||||
margin-top: 0;
|
||||
li a {
|
||||
color: $header-menu-color;
|
||||
|
@@ -137,10 +137,10 @@
|
||||
padding: 0;
|
||||
border: 1px solid $form-input-border-color;
|
||||
}
|
||||
.ui-spinner input[type=text] {
|
||||
.ui-spinner input {
|
||||
background: $form-input-background;
|
||||
margin: 0 17px 0 0;
|
||||
padding: 8px;
|
||||
padding: 6px;
|
||||
border: none;
|
||||
border-top-right-radius: 0px;
|
||||
border-bottom-right-radius: 0px;
|
||||
|
@@ -189,6 +189,7 @@
|
||||
.red-ui-search-result-node {
|
||||
&.red-ui-palette-icon-flow,
|
||||
&.red-ui-palette-icon-group,
|
||||
&.red-ui-palette-icon-junction,
|
||||
&.red-ui-palette-icon-selection {
|
||||
background: none;
|
||||
border-color: transparent;
|
||||
@@ -268,6 +269,7 @@
|
||||
|
||||
&.red-ui-palette-icon-flow,
|
||||
&.red-ui-palette-icon-group,
|
||||
&.red-ui-palette-icon-junction,
|
||||
&.red-ui-palette-icon-selection {
|
||||
background: none;
|
||||
border-color: transparent;
|
||||
@@ -303,6 +305,7 @@
|
||||
&.red-ui-palette-icon-flow {
|
||||
margin-top: -2px;
|
||||
}
|
||||
&.red-ui-palette-icon-junction .red-ui-palette-icon-fa,
|
||||
&.red-ui-palette-icon-group .red-ui-palette-icon-fa {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
@@ -66,8 +66,9 @@
|
||||
border-left-width: 3px;
|
||||
border-right-width: 3px;
|
||||
.red-ui-palette-icon-fa {
|
||||
font-size: 11px;
|
||||
position: relative;
|
||||
top: -2.5px;
|
||||
top: -3px;
|
||||
left: 0px;
|
||||
}
|
||||
}
|
||||
@@ -204,6 +205,28 @@
|
||||
font-style: italic;
|
||||
color: $form-placeholder-color;
|
||||
}
|
||||
.red-ui-search-history {
|
||||
button {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 7px;
|
||||
}
|
||||
|
||||
&:hover button {
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
.red-ui-search-historyHeader {
|
||||
button {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 7px;
|
||||
}
|
||||
}
|
||||
.red-ui-search-history-result {
|
||||
|
||||
}
|
||||
|
||||
.red-ui-search-result-action {
|
||||
color: $primary-text-color;
|
||||
|
@@ -42,6 +42,10 @@ ul.red-ui-sidebar-node-config-list {
|
||||
border-color: transparent;
|
||||
box-shadow: 0 0 0 2px $node-selected-color;
|
||||
}
|
||||
&.highlighted {
|
||||
border-color: transparent;
|
||||
outline: dashed $node-selected-color 4px;
|
||||
}
|
||||
}
|
||||
.red-ui-palette-label {
|
||||
margin-left: 8px;
|
||||
|
@@ -85,6 +85,10 @@
|
||||
&:not(.active) a:hover+a.red-ui-tab-close {
|
||||
background: $tab-background-hover;
|
||||
}
|
||||
&.highlighted {
|
||||
box-shadow: 0px 0px 4px 2px $node-selected-color;
|
||||
border: dashed 1px $node-selected-color;
|
||||
}
|
||||
&.active {
|
||||
background: $tab-background-active;
|
||||
font-weight: bold;
|
||||
@@ -389,7 +393,19 @@ i.red-ui-tab-icon {
|
||||
vertical-align: top;
|
||||
|
||||
}
|
||||
|
||||
.red-ui-tab-hide {
|
||||
.fa-eye-slash {
|
||||
display: none;
|
||||
}
|
||||
&:hover {
|
||||
.fa-eye-slash {
|
||||
display: inline
|
||||
}
|
||||
.fa-eye {
|
||||
display: none
|
||||
}
|
||||
}
|
||||
}
|
||||
.red-ui-tab-close {
|
||||
display: none;
|
||||
background: $tab-background-inactive;
|
||||
|
@@ -78,6 +78,12 @@
|
||||
}
|
||||
.red-ui-tourGuide-popover-description {
|
||||
padding: 10px 20px 5px;
|
||||
|
||||
img {
|
||||
max-height: 150px;
|
||||
border: 1px solid var(--red-ui-tourGuide-border);
|
||||
border-radius: 2px;
|
||||
}
|
||||
}
|
||||
.red-ui-tourGuide-popover-full {
|
||||
.red-ui-tourGuide-popover-description {
|
||||
|
@@ -135,6 +135,13 @@
|
||||
margin-top: -1px;
|
||||
}
|
||||
}
|
||||
|
||||
.search-counter {
|
||||
display: inline-block;
|
||||
font-size: smaller;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
a.red-ui-footer-button,
|
||||
|
@@ -1,14 +1,23 @@
|
||||
export default {
|
||||
steps: [
|
||||
{
|
||||
title: "Create your first flow",
|
||||
title: {
|
||||
'en-US': 'Create your first flow',
|
||||
'ja': 'はじめてのフローを作成'
|
||||
},
|
||||
width: 400,
|
||||
description: 'This tutorial will guide you through creating your first flow',
|
||||
description: {
|
||||
'en-US': 'This tutorial will guide you through creating your first flow',
|
||||
'ja': '本チュートリアルでは、はじめてのフローを作成する方法について説明します。'
|
||||
},
|
||||
nextButton: 'start'
|
||||
},
|
||||
{
|
||||
element: "#red-ui-workspace .red-ui-tab-button.red-ui-tabs-add",
|
||||
description: 'To add a new tab, click the <i class="fa fa-plus"></i> button',
|
||||
description: {
|
||||
'en-US': 'To add a new tab, click the <i class="fa fa-plus"></i> button',
|
||||
'ja': '新しいタブを追加するため、 <i class="fa fa-plus"></i> ボタンをクリックします。'
|
||||
},
|
||||
wait: {
|
||||
type: "dom-event",
|
||||
event: "click",
|
||||
@@ -18,7 +27,10 @@ export default {
|
||||
{
|
||||
element: '.red-ui-palette-node[data-palette-type="inject"]',
|
||||
direction: 'right',
|
||||
description: 'The palette lists all of the nodes available to use. Drag a new Inject node into the workspace.',
|
||||
description: {
|
||||
'en-US': 'The palette lists all of the nodes available to use. Drag a new Inject node into the workspace.',
|
||||
'ja': 'パレットには、利用できる全てのノードが一覧表示されます。injectノードをワークスペースにドラッグします。'
|
||||
},
|
||||
fallback: 'inset-bottom-right',
|
||||
wait: {
|
||||
type: "nr-event",
|
||||
@@ -38,7 +50,10 @@ export default {
|
||||
{
|
||||
element: '.red-ui-palette-node[data-palette-type="debug"]',
|
||||
direction: 'right',
|
||||
description: 'Next, drag a new Debug node into the workspace.',
|
||||
description: {
|
||||
'en-US': 'Next, drag a new Debug node into the workspace.',
|
||||
'ja': '次に、debugノードをワークスペースにドラッグします。'
|
||||
},
|
||||
fallback: 'inset-bottom-right',
|
||||
wait: {
|
||||
type: "nr-event",
|
||||
@@ -57,7 +72,10 @@ export default {
|
||||
},
|
||||
{
|
||||
element: function() { return $("#"+this.injectNode.id+" .red-ui-flow-port") },
|
||||
description: 'Add a wire from the output of the Inject node to the input of the Debug node',
|
||||
description: {
|
||||
'en-US': 'Add a wire from the output of the Inject node to the input of the Debug node',
|
||||
'ja': 'injectノードの出力から、debugノードの入力へワイヤーで接続します。'
|
||||
},
|
||||
fallback: 'inset-bottom-right',
|
||||
wait: {
|
||||
type: "nr-event",
|
||||
@@ -69,7 +87,10 @@ export default {
|
||||
},
|
||||
{
|
||||
element: "#red-ui-header-button-deploy",
|
||||
description: 'Deploy your changes so the flow is active in the runtime',
|
||||
description: {
|
||||
'en-US': 'Deploy your changes so the flow is active in the runtime',
|
||||
'ja': 'フローをランタイムで実行させるため、変更をデプロイします。'
|
||||
},
|
||||
width: 200,
|
||||
wait: {
|
||||
type: "dom-event",
|
||||
|
BIN
packages/node_modules/@node-red/editor-client/src/tours/images/delete-repair.gif
vendored
Normal file
BIN
packages/node_modules/@node-red/editor-client/src/tours/images/delete-repair.gif
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
BIN
packages/node_modules/@node-red/editor-client/src/tours/images/detach-repair.gif
vendored
Normal file
BIN
packages/node_modules/@node-red/editor-client/src/tours/images/detach-repair.gif
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 70 KiB |
BIN
packages/node_modules/@node-red/editor-client/src/tours/images/slice.gif
vendored
Normal file
BIN
packages/node_modules/@node-red/editor-client/src/tours/images/slice.gif
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 81 KiB |
BIN
packages/node_modules/@node-red/editor-client/src/tours/images/subflow-labels.png
vendored
Normal file
BIN
packages/node_modules/@node-red/editor-client/src/tours/images/subflow-labels.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
@@ -1,151 +1,156 @@
|
||||
export default {
|
||||
version: "2.1.0",
|
||||
version: "2.2.0",
|
||||
steps: [
|
||||
{
|
||||
titleIcon: "fa fa-map-o",
|
||||
title: { "en-US": "Welcome to Node-RED 2.1!" },
|
||||
description: { "en-US": "Let's take a moment to discover the new features in this release." }
|
||||
},
|
||||
{
|
||||
title: { "en-US": "A new Tour Guide" },
|
||||
description: { "en-US": "<p>First, as you've already found, we now have this tour of new features. We'll only show the tour the first time you open the editor for each new version of Node-RED.</p>"+
|
||||
"<p>You can choose not to see this tour in the future by disabling it under the View tab of User Settings.</p>" }
|
||||
},
|
||||
{
|
||||
title: { "en-US": "New Edit menu" },
|
||||
prepare() {
|
||||
$("#red-ui-header-button-sidemenu").trigger("click");
|
||||
$("#menu-item-edit-menu").parent().addClass("open")
|
||||
title: {
|
||||
"en-US": "Welcome to Node-RED 2.2!",
|
||||
"ja": "Node-RED 2.2へようこそ!"
|
||||
},
|
||||
complete() {
|
||||
$("#menu-item-edit-menu").parent().removeClass("open")
|
||||
},
|
||||
element: "#menu-item-edit-menu-submenu",
|
||||
interactive: false,
|
||||
direction: "left",
|
||||
description: { "en-US": "<p>The main menu has been updated with a new 'Edit' section. This includes all of the familar options, like cut/paste and undo/redo.</p>"+
|
||||
"<p>The menu now displays keyboard shortcuts for the options.</p>" }
|
||||
|
||||
},
|
||||
{
|
||||
title: { "en-US": "Arranging nodes" },
|
||||
prepare() {
|
||||
$("#red-ui-header-button-sidemenu").trigger("click");
|
||||
$("#menu-item-arrange-menu").parent().addClass("open")
|
||||
},
|
||||
complete() {
|
||||
$("#menu-item-arrange-menu").parent().removeClass("open")
|
||||
},
|
||||
element: "#menu-item-arrange-menu-submenu",
|
||||
interactive: false,
|
||||
direction: "left",
|
||||
description: { "en-US": "<p>The new 'Arrange' section of the menu provides new options to help arrange your nodes. You can align them to a common edge, spread them out evenly or change their order.</p>" },
|
||||
},
|
||||
{
|
||||
title: { "en-US": "Hiding tabs" },
|
||||
element: "#red-ui-workspace-tabs > li.active",
|
||||
description: { "en-US": '<p>Tabs can now be hidden by clicking their <i class="fa fa-times"></i> icon.</p><p>The Info Sidebar will still list all of your tabs, and tell you which ones are currently hidden.' },
|
||||
interactive: false,
|
||||
prepare() {
|
||||
$("#red-ui-workspace-tabs > li.active .red-ui-tab-close").css("display","block");
|
||||
},
|
||||
complete() {
|
||||
$("#red-ui-workspace-tabs > li.active .red-ui-tab-close").css("display","");
|
||||
description: {
|
||||
"en-US": "Let's take a moment to discover the new features in this release.",
|
||||
"ja": "本リリースの新機能を見つけてみましょう。"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: { "en-US": "Tab menu" },
|
||||
element: "#red-ui-workspace-tabs-menu",
|
||||
description: { "en-US": '<p>The new tab menu also provides lots of new options for your tabs.</p>' },
|
||||
interactive: false,
|
||||
direction: "left",
|
||||
prepare() {
|
||||
$("#red-ui-workspace > .red-ui-tabs > .red-ui-tabs-menu a").trigger("click");
|
||||
title: {
|
||||
"en-US": "Search history",
|
||||
"ja": "検索履歴"
|
||||
},
|
||||
description: {
|
||||
"en-US": "<p>The Search dialog now keeps a history of your searches, making it easier to go back to a previous search.</p>",
|
||||
"ja": "<p>検索ダイアログが検索履歴を保持するようになりました。これによって、過去の検索に戻りやすくなりました。</p>"
|
||||
},
|
||||
element: "#red-ui-search .red-ui-searchBox-form",
|
||||
prepare(done) {
|
||||
RED.search.show();
|
||||
setTimeout(done,400);
|
||||
},
|
||||
complete() {
|
||||
$(document).trigger("click");
|
||||
}
|
||||
},
|
||||
{
|
||||
title: { "en-US": "Flow and Group level environment variables" },
|
||||
element: "#red-ui-workspace-tabs > li.active",
|
||||
interactive: false,
|
||||
description: { "en-US": "<p>Flows and Groups can now have their own environment variables that can be referenced by nodes inside them.</p>" },
|
||||
},
|
||||
{
|
||||
prepare(done) {
|
||||
RED.editor.editFlow(RED.nodes.workspace(RED.workspaces.active()),"editor-tab-envProperties");
|
||||
setTimeout(done,700);
|
||||
RED.search.hide();
|
||||
},
|
||||
element: "#red-ui-tab-editor-tab-envProperties-link-button",
|
||||
description: { "en-US": "<p>Their edit dialogs have a new Environment Variables section.</p>" },
|
||||
},
|
||||
{
|
||||
element: ".node-input-env-container-row",
|
||||
direction: "left",
|
||||
description: { "en-US": '<p>The environment variables are listed in this table and new ones can be added by clicking the <i class="fa fa-plus"></i> button.</p>' },
|
||||
complete(done) {
|
||||
$("#node-dialog-cancel").trigger("click");
|
||||
setTimeout(done,500);
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
title: {"en-US":"Link Call node added"},
|
||||
prepare(done) {
|
||||
this.paletteWasClosed = $("#red-ui-main-container").hasClass("red-ui-palette-closed");
|
||||
RED.actions.invoke("core:toggle-palette",true)
|
||||
$('[data-palette-type="link call"]')[0].scrollIntoView({block:"center"})
|
||||
setTimeout(done,100);
|
||||
title: {
|
||||
"en-US": "Remembering Zoom & Position",
|
||||
"ja": "拡大/縮小のレベルや位置を記憶"
|
||||
},
|
||||
element: '[data-palette-type="link call"]',
|
||||
direction: "right",
|
||||
description: { "en-US": '<p>The <code>Link Call</code> node lets you call another flow that begins with a <code>Link In</code> node and get the result back when the message reaches a <code>Link Out</code> node.</p>' },
|
||||
},
|
||||
{
|
||||
title: {"en-US":"MQTT nodes support dynamic connections"},
|
||||
prepare(done) {
|
||||
$('[data-palette-type="mqtt out"]')[0].scrollIntoView({block:"center"})
|
||||
setTimeout(done,100);
|
||||
description: {
|
||||
"en-US": "<p>The editor has new options to restore the zoom level and scroll position when reloading the editor.</p>",
|
||||
"ja": "<p>エディタを再読み込みした時に、拡大/縮小のレベルやスクロール位置を復元するための新しいオプションを利用できます。</p>"
|
||||
},
|
||||
element: '[data-palette-type="mqtt out"]',
|
||||
direction: "right",
|
||||
description: { "en-US": '<p>The <code>MQTT</code> nodes now support creating their connections and subscriptions dynamically.</p>' },
|
||||
},
|
||||
{
|
||||
title: {"en-US":"File nodes renamed"},
|
||||
element: function() { return $("#user-settings-view-store-position").parent()},
|
||||
prepare(done) {
|
||||
$('[data-palette-type="file"]')[0].scrollIntoView({block:"center"})
|
||||
setTimeout(done,100);
|
||||
},
|
||||
complete() {
|
||||
if (this.paletteWasClosed) {
|
||||
RED.actions.invoke("core:toggle-palette",false)
|
||||
}
|
||||
},
|
||||
element: '[data-palette-type="file"]',
|
||||
direction: "right",
|
||||
description: { "en-US": '<p>The file nodes have been renamed to make it clearer which node does what.</p>' },
|
||||
},
|
||||
{
|
||||
title: {"en-US":"Deep copy option on Change node"},
|
||||
prepare(done) {
|
||||
var def = RED.nodes.getType('change')
|
||||
RED.editor.edit({id:"test",type:"change",rules:[{t:'set',p:'payload',pt:'msg', tot:'msg',to:"anotherProperty"}],_def:def, _:def._})
|
||||
setTimeout(done,700);
|
||||
RED.actions.invoke("core:show-user-settings")
|
||||
setTimeout(done,400);
|
||||
},
|
||||
complete(done) {
|
||||
$("#node-dialog-cancel").trigger("click");
|
||||
setTimeout(done,500);
|
||||
$("#node-dialog-ok").trigger("click");
|
||||
setTimeout(done,400);
|
||||
},
|
||||
element: function() {
|
||||
return $(".node-input-rule-property-deepCopy").next()
|
||||
},
|
||||
description: { "en-US": '<p>The Set rule has a new option to create a deep copy of the value. This ensures a complete copy is made, rather than using a reference.</p>' },
|
||||
},
|
||||
{
|
||||
title: { "en-US": "And that's not all..." },
|
||||
description: { "en-US": "<p>There are many more smaller changes, including:</p><ul><li>Auto-complete suggestions in the <code>msg</code> TypedInput.</li><li>Support for <code>msg.resetTimeout</code> in the <code>Join</code> node.</li><li>Pushing messages to the front of the queue in the <code>Delay</code> node's rate limiting mode.</li><li>An optional second output on the <code>Delay</code> node for rate limited messages.</li></ul>" }
|
||||
title: {
|
||||
"en-US": "New wiring actions",
|
||||
"ja": "新しいワイヤー操作"
|
||||
},
|
||||
// image: "images/",
|
||||
description: {
|
||||
"en-US": `<p>A pair of new actions have been added to help with wiring nodes together:</p>
|
||||
<ul>
|
||||
<li><b><code>Wire Series Of Nodes</code></b> - adds a wire (if necessary) between each pair of nodes in the order they were selected.</li>
|
||||
<li><b><code>Wire Node To Multiple</code></b> - wires the first node selected to all of the other selected nodes.</li>
|
||||
</ul>
|
||||
<p>Actions can be accessed from the Action List in the main menu.</p>`,
|
||||
"ja": `<p>ノード接続を支援する2つの新しい操作が追加されました:</p>
|
||||
<ul>
|
||||
<li><b><code>Wire Series Of Nodes</code></b> - ノードを選択した順序で、各ノードのペアの間にワイヤーを(必要に応じて)追加します。</li>
|
||||
<li><b><code>Wire Node To Multiple</code></b> - 最初に選択したノードから、他の選択した全てのノードに対して、ワイヤーを追加します。</li>
|
||||
</ul>
|
||||
<p>メインメニュー内の動作一覧から、これらの操作を利用できます。</p>`
|
||||
},
|
||||
},
|
||||
{
|
||||
title: {
|
||||
"en-US": "Deleting nodes and reconnecting wires",
|
||||
"ja": "ノードの削除とワイヤーの再接続"
|
||||
},
|
||||
image: "images/delete-repair.gif",
|
||||
description: {
|
||||
"en-US": `<p>It is now possible to delete a selection of nodes and automatically repair the wiring behind them.</p>
|
||||
<p>This is really useful if you want to remove a node from the middle of the flow.</p>
|
||||
<p>Hold the Ctrl (or Cmd) key when you press Delete and the nodes will be gone and the wires repaired.</p>
|
||||
`,
|
||||
"ja": `<p>選択したノードを削除した後、その背後にあるワイヤーを自動的に修復できるようになりました。</p>
|
||||
<p>これは、フローの中からノードを削除する時に、とても便利に使えます。</p>
|
||||
<p>Ctrl (またはCmd)キーを押しながらDeleteキーを押すと、ノードがなくなり、ワイヤーが修復されます。</p>
|
||||
`
|
||||
}
|
||||
},
|
||||
{
|
||||
title: {
|
||||
"en-US": "Detaching nodes from a flow",
|
||||
"ja": "フローからノードの切り離し"
|
||||
},
|
||||
image: "images/detach-repair.gif",
|
||||
description: {
|
||||
"en-US": `<p>If you want to remove a node from a flow without deleting it,
|
||||
you can use the <b><code>Detach Selected Nodes</code></b> action.</p>
|
||||
<p>The nodes will be removed from their flow, the wiring repaired behind them, and then attached to the mouse
|
||||
so you can drop them wherever you want in the workspace.</p>
|
||||
<p>There isn't a default keyboard shortcut assigned for this new action, but
|
||||
you can add your own via the Keyboard pane of the main Settings dialog.</p>`,
|
||||
"ja": `<p>ノードを削除することなく、フローからノードを除きたい場合は、<b><code>Detach Selected Nodes</code></b>操作を利用できます。</p>
|
||||
<p>フローからノードが除かれた後、背後のワイヤーが修復され、ノードはマウスポインタにつながります。そのため、ワークスペースの好きな所にノードを配置できます。</p>
|
||||
<p>この新しい操作に対して、デフォルトのキーボードショートカットは登録されていませんが、メイン設定ダイアログのキーボード設定から追加できます。</p>`
|
||||
}
|
||||
},
|
||||
{
|
||||
title: {
|
||||
"en-US": "More wiring tricks",
|
||||
"ja": "その他のワイヤー操作"
|
||||
},
|
||||
image: "images/slice.gif",
|
||||
description: {
|
||||
"en-US": `<p>A couple more wiring tricks to share.</p>
|
||||
<p>You can now select multiple wires by holding the Ctrl (or Cmd) key
|
||||
when clicking on a wire. This makes it easier to delete multiple wires in one go.</p>
|
||||
<p>If you hold the Ctrl (or Cmd) key, then click and drag with the right-hand mouse button,
|
||||
you can slice through wires to remove them.</p>`,
|
||||
"ja": `<p>その他のいくつかのワイヤー操作</p>
|
||||
<p>Ctrl (またはCmd)キーを押しながらワイヤーをクリックすることで、複数のワイヤーを選択できるようになりました。これによって、複数のワイヤーを一度に削除することが簡単になりました。</p>
|
||||
<p>Ctrl (またはCmd)キーを押しながら、マウスの右ボタンを用いてドラッグすると、ワイヤーを切って削除できます。</p>`
|
||||
}
|
||||
},
|
||||
{
|
||||
title: {
|
||||
"en-US": "Subflow Output Labels",
|
||||
"ja": "サブフローの出力ラベル"
|
||||
},
|
||||
image: "images/subflow-labels.png",
|
||||
description: {
|
||||
"en-US": "<p>If a subflow has labels set for its outputs, they now get shown on the ports within the subflow template view.</p>",
|
||||
"ja": "<p>サブフローの出力にラベルが設定されている場合、サブフローテンプレート画面内のポートにラベルが表示されるようになりました。</p>"
|
||||
},
|
||||
},
|
||||
{
|
||||
title: {
|
||||
"en-US": "Node Updates",
|
||||
"ja": "ノードの更新"
|
||||
},
|
||||
// image: "images/",
|
||||
description: {
|
||||
"en-US": `<ul>
|
||||
<li>The JSON node will now handle parsing Buffer payloads</li>
|
||||
<li>The TCP Client nodes support TLS connections</li>
|
||||
<li>The WebSocket node allows you to specify a sub-protocol when connecting</li>
|
||||
</ul>`,
|
||||
"ja": `<ul>
|
||||
<li>JSONノードが、バッファ形式のペイロードを解析できるようになりました。</li>
|
||||
<li>TCPクライアントノードが、TLS接続をサポートしました。</li>
|
||||
<li>WebSocketノードで、接続時にサブプロトコルを指定できるようになりました。</li>
|
||||
</ul>`
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -31,12 +31,12 @@ interface NodeStatus {
|
||||
}
|
||||
|
||||
declare class node {
|
||||
/**
|
||||
* Send 1 or more messages asynchronously
|
||||
* @param {object | object[]} msg The msg object
|
||||
* @param {Boolean} [clone=true] Flag to indicate the `msg` should be cloned. Default = `true`
|
||||
* @see node-red documentation [writing-functions: sending messages asynchronously](https://nodered.org/docs/user-guide/writing-functions#sending-messages-asynchronously)
|
||||
*/
|
||||
/**
|
||||
* Send 1 or more messages asynchronously
|
||||
* @param {object | object[]} msg The msg object
|
||||
* @param {Boolean} [clone=true] Flag to indicate the `msg` should be cloned. Default = `true`
|
||||
* @see node-red documentation [writing-functions: sending messages asynchronously](https://nodered.org/docs/user-guide/writing-functions#sending-messages-asynchronously)
|
||||
*/
|
||||
static send(msg:object|object[], clone?:Boolean): void;
|
||||
/** Inform runtime this instance has completed its operation */
|
||||
static done();
|
||||
@@ -57,11 +57,13 @@ declare class node {
|
||||
*/
|
||||
static status(status:string|boolean|number);
|
||||
/** the id of this node */
|
||||
public readonly id:string;
|
||||
public static readonly id:string;
|
||||
/** the name of this node */
|
||||
public readonly name:string;
|
||||
public static readonly name:string;
|
||||
/** the path identifier for this node */
|
||||
public static readonly path:string;
|
||||
/** the number of outputs of this node */
|
||||
public readonly outputCount:number;
|
||||
public static readonly outputCount:number;
|
||||
}
|
||||
declare class context {
|
||||
/**
|
||||
@@ -93,27 +95,27 @@ declare class context {
|
||||
/**
|
||||
* Set one or multiple values in context (synchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
*/
|
||||
static set(name: string | string[], value?: any | any[]);
|
||||
/**
|
||||
* Set one or multiple values in context (asynchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param callback - (optional) Callback function (`(err) => {}`)
|
||||
*/
|
||||
static set(name: string | string[], value?: any | any[], callback?: Function);
|
||||
/**
|
||||
* Set one or multiple values in context (synchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param store - (optional) Name of context store
|
||||
*/
|
||||
static set(name: string | string[], value?: any | any[], store?: string);
|
||||
/**
|
||||
* Set one or multiple values in context (asynchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param store - (optional) Name of context store
|
||||
* @param callback - (optional) Callback function (`(err) => {}`)
|
||||
*/
|
||||
@@ -158,27 +160,27 @@ declare class flow {
|
||||
/**
|
||||
* Set one or multiple values in context (synchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
*/
|
||||
static set(name: string | string[], value?: any | any[]);
|
||||
/**
|
||||
* Set one or multiple values in context (asynchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param callback - (optional) Callback function (`(err) => {}`)
|
||||
*/
|
||||
static set(name: string | string[], value?: any | any[], callback?: Function);
|
||||
/**
|
||||
* Set one or multiple values in context (synchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param store - (optional) Name of context store
|
||||
*/
|
||||
static set(name: string | string[], value?: any | any[], store?: string);
|
||||
/**
|
||||
* Set one or multiple values in context (asynchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param store - (optional) Name of context store
|
||||
* @param callback - (optional) Callback function (`(err) => {}`)
|
||||
*/
|
||||
@@ -225,32 +227,32 @@ declare class global {
|
||||
/**
|
||||
* Set one or multiple values in context (synchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
*/
|
||||
static set(name: string | string[], value?: any | any[]);
|
||||
/**
|
||||
* Set one or multiple values in context (asynchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param callback - (optional) Callback function (`(err) => {}`)
|
||||
*/
|
||||
static set(name: string | string[], value?: any | any[], callback?: Function);
|
||||
/**
|
||||
* Set one or multiple values in context (synchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param store - (optional) Name of context store
|
||||
*/
|
||||
static set(name: string | string[], value?: any | any[], store?: string);
|
||||
/**
|
||||
* Set one or multiple values in context (asynchronous).
|
||||
* @param name - Name (or array of names) to set in context
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param value - The value (or array of values) to store in context. If the value(s) are null/undefined, the context item(s) will be removed.
|
||||
* @param store - (optional) Name of context store
|
||||
* @param callback - (optional) Callback function (`(err) => {}`)
|
||||
*/
|
||||
static set(name: string | string[], value?: any | any[], store?: string, callback?: Function);
|
||||
|
||||
|
||||
/** Get an array of the keys in the context store */
|
||||
static keys(): Array<string>;
|
||||
/** Get an array of the keys in the context store */
|
||||
@@ -261,6 +263,20 @@ declare class global {
|
||||
static keys(store: string, callback: Function);
|
||||
}
|
||||
declare class env {
|
||||
/** Get an environment variable value */
|
||||
static get(name:string);
|
||||
/**
|
||||
* Get an environment variable value
|
||||
*
|
||||
* Predefined node-red variables...
|
||||
* * `NR_NODE_ID` - the ID of the node
|
||||
* * `NR_NODE_NAME` - the Name of the node
|
||||
* * `NR_NODE_PATH` - the Path of the node
|
||||
* * `NR_GROUP_ID` - the ID of the containing group
|
||||
* * `NR_GROUP_NAME` - the Name of the containing group
|
||||
* * `NR_FLOW_ID` - the ID of the flow the node is on
|
||||
* * `NR_FLOW_NAME` - the Name of the flow the node is on
|
||||
* @param name Name of the environment variable to get
|
||||
* @example
|
||||
* ```const flowName = env.get("NR_FLOW_NAME");```
|
||||
*/
|
||||
static get(name:string) :string;
|
||||
}
|
||||
|
6
packages/node_modules/@node-red/editor-client/src/vendor/font-awesome/css/all.min.css
vendored
Normal file
6
packages/node_modules/@node-red/editor-client/src/vendor/font-awesome/css/all.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* Font Awesome Free 6.1.1 by @fontawesome - https://fontawesome.com
|
||||
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
||||
* Copyright 2022 Fonticons, Inc.
|
||||
*/
|
||||
@font-face{font-family:"FontAwesome";font-display:block;src:url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.ttf) format("truetype")}@font-face{font-family:"FontAwesome";font-display:block;src:url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.ttf) format("truetype")}@font-face{font-family:"FontAwesome";font-display:block;src:url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.ttf) format("truetype");unicode-range:u+f003,u+f006,u+f014,u+f016-f017,u+f01a-f01b,u+f01d,u+f022,u+f03e,u+f044,u+f046,u+f05c-f05d,u+f06e,u+f070,u+f087-f088,u+f08a,u+f094,u+f096-f097,u+f09d,u+f0a0,u+f0a2,u+f0a4-f0a7,u+f0c5,u+f0c7,u+f0e5-f0e6,u+f0eb,u+f0f6-f0f8,u+f10c,u+f114-f115,u+f118-f11a,u+f11c-f11d,u+f133,u+f147,u+f14e,u+f150-f152,u+f185-f186,u+f18e,u+f190-f192,u+f196,u+f1c1-f1c9,u+f1d9,u+f1db,u+f1e3,u+f1ea,u+f1f7,u+f1f9,u+f20a,u+f247-f248,u+f24a,u+f24d,u+f255-f25b,u+f25d,u+f271-f274,u+f278,u+f27b,u+f28c,u+f28e,u+f29c,u+f2b5,u+f2b7,u+f2ba,u+f2bc,u+f2be,u+f2c0-f2c1,u+f2c3,u+f2d0,u+f2d2,u+f2d4,u+f2dc}@font-face{font-family:"FontAwesome";font-display:block;src:url(../webfonts/fa-v4compatibility.woff2) format("woff2"),url(../webfonts/fa-v4compatibility.ttf) format("truetype");unicode-range:u+f041,u+f047,u+f065-f066,u+f07d-f07e,u+f080,u+f08b,u+f08e,u+f090,u+f09a,u+f0ac,u+f0ae,u+f0b2,u+f0d0,u+f0d6,u+f0e4,u+f0ec,u+f10a-f10b,u+f123,u+f13e,u+f148-f149,u+f14c,u+f156,u+f15e,u+f160-f161,u+f163,u+f175-f178,u+f195,u+f1f8,u+f219,u+f250,u+f252,u+f27a}
|
6
packages/node_modules/@node-red/editor-client/src/vendor/font-awesome/css/v4-shims.min.css
vendored
Normal file
6
packages/node_modules/@node-red/editor-client/src/vendor/font-awesome/css/v4-shims.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 434 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
packages/node_modules/@node-red/editor-client/src/vendor/font-awesome/webfonts/fa-brands-400.ttf
vendored
Normal file
BIN
packages/node_modules/@node-red/editor-client/src/vendor/font-awesome/webfonts/fa-brands-400.ttf
vendored
Normal file
Binary file not shown.
BIN
packages/node_modules/@node-red/editor-client/src/vendor/font-awesome/webfonts/fa-brands-400.woff2
vendored
Normal file
BIN
packages/node_modules/@node-red/editor-client/src/vendor/font-awesome/webfonts/fa-brands-400.woff2
vendored
Normal file
Binary file not shown.
BIN
packages/node_modules/@node-red/editor-client/src/vendor/font-awesome/webfonts/fa-regular-400.ttf
vendored
Normal file
BIN
packages/node_modules/@node-red/editor-client/src/vendor/font-awesome/webfonts/fa-regular-400.ttf
vendored
Normal file
Binary file not shown.
BIN
packages/node_modules/@node-red/editor-client/src/vendor/font-awesome/webfonts/fa-regular-400.woff2
vendored
Normal file
BIN
packages/node_modules/@node-red/editor-client/src/vendor/font-awesome/webfonts/fa-regular-400.woff2
vendored
Normal file
Binary file not shown.
BIN
packages/node_modules/@node-red/editor-client/src/vendor/font-awesome/webfonts/fa-solid-900.ttf
vendored
Normal file
BIN
packages/node_modules/@node-red/editor-client/src/vendor/font-awesome/webfonts/fa-solid-900.ttf
vendored
Normal file
Binary file not shown.
BIN
packages/node_modules/@node-red/editor-client/src/vendor/font-awesome/webfonts/fa-solid-900.woff2
vendored
Normal file
BIN
packages/node_modules/@node-red/editor-client/src/vendor/font-awesome/webfonts/fa-solid-900.woff2
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -25,7 +25,8 @@
|
||||
<link rel="icon" type="image/png" href="{{ page.favicon }}">
|
||||
<link rel="mask-icon" href="{{ page.tabicon.icon }}" color="{{ page.tabicon.colour }}">
|
||||
<link rel="stylesheet" href="vendor/jquery/css/base/jquery-ui.min.css?v={{ page.version }}">
|
||||
<link rel="stylesheet" href="vendor/font-awesome/css/font-awesome.min.css?v={{ page.version }}">
|
||||
<link rel="stylesheet" href="vendor/font-awesome/css/all.min.css?v={{ page.version }}">
|
||||
<link rel="stylesheet" href="vendor/font-awesome/css/v4-shims.min.css?v={{ page.version }}">
|
||||
<link rel="stylesheet" href="red/style.min.css?v={{ page.version }}">
|
||||
{{#page.css}}
|
||||
<link rel="stylesheet" href="{{.}}">
|
||||
|
@@ -1,4 +1,4 @@
|
||||
Copyright JS Foundation and other contributors, http://js.foundation
|
||||
Copyright OpenJS Foundation and other contributors, https://openjsf.org/
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
|
5
packages/node_modules/@node-red/nodes/core/common/05-junction.html
vendored
Normal file
5
packages/node_modules/@node-red/nodes/core/common/05-junction.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<!--
|
||||
05-junction.html
|
||||
This file exists so that the runtime loads the Junction node into the registry,
|
||||
but it is empty so it doesn't appear in the editor palette
|
||||
-->
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user