Compare commits

..

1972 Commits

Author SHA1 Message Date
Nick O'Leary
37524e05bb Do not select parent group after completing quick-add inside group 2023-03-03 15:58:38 +00:00
Nick O'Leary
3fbfd47089 Show quick-add dialog when draggin wire to empty space 2023-03-03 15:52:59 +00:00
Nick O'Leary
d1094da6c7 Merge pull request #3895 from hae-iotplatform/translation-KR
Translation kr
2023-03-03 15:23:54 +00:00
Nick O'Leary
ee1e12eca3 Merge pull request #3952 from cliyr/translation-zhcn
Translation zhcn (!!请懂中文的帮忙review)
2023-03-03 15:22:46 +00:00
Nick O'Leary
307fbef5b2 Merge branch 'dev' into translation-zhcn 2023-03-03 15:22:34 +00:00
Nick O'Leary
f54f500e2b Merge pull request #3964 from GogoVega/french-translation-of-nodes
Add French translation of nodes
2023-03-03 15:18:20 +00:00
Nick O'Leary
fd66335bd4 Merge pull request #3962 from GogoVega/french-translation
Add French translation
2023-03-03 13:37:40 +00:00
Nick O'Leary
301343deb0 Update packages/node_modules/@node-red/editor-client/locales/fr/editor.json
Co-authored-by: Gauthier Dandele <92022724+GogoVega@users.noreply.github.com>
2023-03-03 13:36:45 +00:00
Nick O'Leary
c046c8c4d3 Merge pull request #3804 from FabsMuller/ptbrtranslation
Portuguese Brazilian (pt-BR) translation
2023-03-03 13:33:47 +00:00
Nick O'Leary
0ceca8fc17 Merge pull request #4091 from node-red/enable-unlocked-buttons
Ensure node buttons are redrawn when flow lock state is changed
2023-03-03 13:33:08 +00:00
Nick O'Leary
2ac3b50040 Merge pull request #4090 from node-red/json-async-prep
Deprecate synchronous access to jsonata
2023-03-03 13:23:17 +00:00
Nick O'Leary
70771bf3d6 Ensure node buttons are redrawn when flow lock state is changed 2023-03-03 13:21:23 +00:00
Nick O'Leary
2ed17f0fff Merge pull request #4089 from Steve-Mcl/update-monaco-and-typings
Update-monaco-and-typings
2023-03-03 11:52:13 +00:00
Nick O'Leary
ca53712ee9 Deprecate synchronous access to jsonata 2023-03-03 11:43:06 +00:00
Steve-Mcl
69e139b75b update monaco themes 2023-03-03 10:57:31 +00:00
Steve-Mcl
d268661f29 update monaco locales 2023-03-03 10:56:55 +00:00
Steve-Mcl
ed379387df update monaco (0.36.1) 2023-03-03 10:56:37 +00:00
Steve-Mcl
1eddad82c8 update typings 2023-03-03 10:55:06 +00:00
Nick O'Leary
d7defc011b Merge pull request #4088 from node-red/update-jquery-ui
Update jquery UI
2023-03-03 09:57:22 +00:00
Nick O'Leary
0e4a7829fe Update jquery-ui to latest 2023-03-03 09:33:24 +00:00
Nick O'Leary
e7c6178391 Merge pull request #4085 from node-red/link-call-timeout
Clear link-call timeouts when node is closed
2023-03-02 21:18:34 +00:00
Nick O'Leary
40b506b7b4 Merge pull request #4087 from node-red/junction-loops
Prevent loops being created with junction nodes
2023-03-02 21:18:21 +00:00
Nick O'Leary
b19a679d00 Merge pull request #4086 from node-red/version-check
Bump minimum nodejs version supported to match documented value
2023-03-02 21:16:24 +00:00
Nick O'Leary
81d4c60cbd Prevent loops being created with junction nodes
Fixes #3799
2023-03-02 21:13:39 +00:00
Nick O'Leary
a95be2aa43 Bump minimum nodejs version supported to match documented value 2023-03-02 17:46:00 +00:00
Nick O'Leary
5e9a815b06 Clear link-call timeouts when node is closed
Fixes #3959
2023-03-02 17:23:13 +00:00
Nick O'Leary
010c8eccc8 Bump dependencies 2023-03-02 15:43:38 +00:00
Nick O'Leary
4b89619ef1 Merge pull request #4084 from node-red/add-18
Add Node 18 to test matrix
2023-03-02 15:43:08 +00:00
Nick O'Leary
e5054d306e Merge pull request #4079 from node-red/group-rework
Complete overhaul of Group UX
2023-03-02 15:27:17 +00:00
Nick O'Leary
08eaa9274f Merge branch 'dev' into group-rework 2023-03-02 15:26:01 +00:00
Nick O'Leary
3306cdede5 Merge pull request #4083 from node-red/fix-join-memory
Join: ensure inflight status is cleared when in auto mode
2023-03-02 15:23:43 +00:00
Nick O'Leary
e7f650a9eb Add node 18 and drop node 14 2023-03-02 15:20:48 +00:00
Nick O'Leary
2804794f7a Merge pull request #4072 from node-red-hitachi/fix-align-nodes-on-locked-tab
fix align nodes on locked tab
2023-03-02 15:14:02 +00:00
Nick O'Leary
781eaf058b Merge pull request #4077 from node-red-hitachi/support-editablelist-cnacel
add cancel operation to editableList
2023-03-02 15:13:48 +00:00
Nick O'Leary
b4c155bdb8 Merge branch 'dev' into pr_4059 2023-03-02 15:12:28 +00:00
Nick O'Leary
7c3e045a57 Merge pull request #4068 from node-red/change-tab-notification
Add change icon to tabs
2023-03-02 15:11:28 +00:00
Nick O'Leary
d4f4c7b8c6 Merge pull request #4082 from node-red/fix-link-import
Fix importing connected link nodes into a subflow
2023-03-02 15:10:58 +00:00
Nick O'Leary
9e6d501009 Join: ensure inflight status is cleared when in auto mode
Fixes #4080
2023-03-02 14:59:54 +00:00
Nick O'Leary
27e258b19b Fix importing connected link nodes into a subflow
Fixes #4055
2023-03-02 14:14:33 +00:00
GogoVega
d3615c9661 Add translation of new features from dev branch 2023-03-01 16:50:40 +01:00
GogoVega
a57c449c25 Add translation of new features from dev branch 2023-03-01 16:46:54 +01:00
Nick O'Leary
07f2f0cef3 Complete overhaul of Group UX 2023-03-01 10:02:26 +00:00
Hiroyasu Nishiyama
662b1a8100 add cancel operation to editableList 2023-02-27 14:31:44 +09:00
Hiroyasu Nishiyama
25b6e214dd fix align nodes on locked tab 2023-02-25 00:54:15 +09:00
Nick O'Leary
910f6134f6 Merge pull request #4069 from node-red/prevent-edit-from-sidebar
Prevent opening locked node's edit dialog
2023-02-24 13:10:01 +00:00
Nick O'Leary
52b4b0419f Merge pull request #4066 from kazuhitoyokoi/dev-dedup
Remove duplicated messages in the message catalog
2023-02-23 23:46:30 +00:00
Nick O'Leary
bbc1a82c2a Fix linting on boolean check 2023-02-23 23:45:34 +00:00
Nick O'Leary
6abe66934e Prevent opening locked node's edit dialog 2023-02-23 23:36:51 +00:00
Nick O'Leary
2ddbb44992 Add change annotation for newly added flow 2023-02-23 23:14:18 +00:00
Nick O'Leary
363a8b8588 Add change icon to tabs 2023-02-23 22:48:08 +00:00
Kazuhito Yokoi
5ae56aaec7 Add Japanese translation for action list 2023-02-23 19:45:00 +09:00
Kazuhito Yokoi
37057d1da2 Remove duplicated messages in the message catalog 2023-02-22 01:33:53 +09:00
Nick O'Leary
196a9ae43a Merge pull request #4065 from node-red/node-help-link
Add link to node help in node edit dialog footer
2023-02-21 14:25:40 +00:00
Hiroyasu Nishiyama
96cd823fea Update packages/node_modules/@node-red/editor-client/locales/ja/editor.json
thank you!

Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2023-02-21 20:31:12 +09:00
Nick O'Leary
196773d6ba Merge branch 'master' into dev 2023-02-20 18:17:16 +00:00
Nick O'Leary
d8dbe68425 Merge pull request #4064 from node-red/reverse-tab-scroll
Reverse direction of tab scroll to expected direction
2023-02-20 18:15:04 +00:00
Nick O'Leary
286c0b000f Add link to node help in node edit dialog footer 2023-02-20 18:13:02 +00:00
Nick O'Leary
dec3164fdd Reverse direction of tab scroll to expected direction 2023-02-20 17:30:16 +00:00
Nick O'Leary
c2772e5038 Merge pull request #4051 from sonntam/feature-editor-multipleToNode
Added editor feature for connecting multiple nodes to single node
2023-02-20 17:00:14 +00:00
Nick O'Leary
43e4d09f72 Merge pull request #4049 from kazuhitoyokoi/dev-addjpn
Support i18n of lock/unlock buttons in flow property UI
2023-02-20 16:51:55 +00:00
Nick O'Leary
06e35baeaa Merge pull request #4060 from node-red-hitachi/fix-empty-group-on-outliner
Fix to add empty marker to empty group
2023-02-20 16:51:17 +00:00
Nick O'Leary
c9d72d7a1d Merge pull request #4056 from kazuhitoyokoi/master-validator
Add validators for complete and link call nodes
2023-02-20 16:50:01 +00:00
Nick O'Leary
7e0a783220 Merge pull request #4054 from kazuhitoyokoi/dev-fixmermaid
Apply Mermaid diagram for project settings UI
2023-02-20 16:46:08 +00:00
Nick O'Leary
f853c9f1c3 Merge pull request #4053 from kazuhitoyokoi/dev-fixtour
Fix image URLs for v3.0 tour
2023-02-20 16:45:44 +00:00
Nick O'Leary
62e9572070 Merge pull request #4048 from kazuhitoyokoi/master-notification
Show scrollbar in notification dialog only when needed
2023-02-20 16:45:10 +00:00
Nick O'Leary
fea68c8acc Merge pull request #4050 from kazuhitoyokoi/master-addtooltip
Add tooltip for show/hide button on info sidebar
2023-02-20 16:44:38 +00:00
cliyr
ce9462e6aa Apply suggestions from code review
Co-authored-by: zoollcar <zoollcar@qq.com>
2023-02-20 21:42:53 +08:00
Hiroyasu Nishiyama
929f0e90ac add empty marker to group 2023-02-14 20:49:43 +09:00
Hiroyasu Nishiyama
2e57d80959 add show-global-env action 2023-02-13 14:50:07 +09:00
Kazuhito Yokoi
81331e68d2 Add validator for link call node 2023-02-10 18:55:10 +09:00
Kazuhito Yokoi
4fda59a585 Add validator for complete node 2023-02-10 16:49:29 +09:00
Kazuhito Yokoi
4477b9ac18 Apply mermaid diagram for project settings UI 2023-02-06 00:53:22 +09:00
Kazuhito Yokoi
78f93dc11a Fix image URLs for v3.0 tour 2023-02-05 18:58:58 +09:00
sonntam
4c7c855f2c fix code style 2023-02-04 21:31:49 +01:00
Marcus Sonntag
8740ec5570 Added editor feature for connecting multiple nodes to single node 2023-02-04 21:03:30 +01:00
Kazuhito Yokoi
ede3ac4282 Add tooltip for show/hide button on info sidebar 2023-02-04 20:55:34 +09:00
Kazuhito Yokoi
3e4cad3a79 Add Japanese translations for the action list 2023-02-04 20:38:08 +09:00
Kazuhito Yokoi
bd0b0077a3 Support i18n of lock/unlock button in flow property UI 2023-02-04 20:28:08 +09:00
Kazuhito Yokoi
16f8b78b39 Show scrollbar in notification dialog only when needed 2023-02-04 11:16:28 +09:00
Nick O'Leary
90d1bb0ae4 Merge branch 'master' into dev 2023-02-03 09:11:46 +00:00
Nick O'Leary
adfc5b3e98 Merge pull request #4043 from node-red-hitachi/fix-group-undo-position
fix group position after undo
2023-02-03 09:11:20 +00:00
Hiroyasu Nishiyama
f3d7016ab2 fix group position after undo 2023-02-03 17:25:58 +09:00
Nick O'Leary
ae776547ce Merge pull request #4042 from kazuhitoyokoi/dev-jpn
Add Japanese translations for welcome tour of 3.1.0 beta.1
2023-02-02 15:19:09 +00:00
Kazuhito Yokoi
da6885be62 Add Japanese translations for welcome tour of 3.1.0 beta.1 2023-02-03 00:08:50 +09:00
Nick O'Leary
c0fa4a077f Merge pull request #4041 from node-red/310-tour
Add welcome tour for 3.1.0 beta.1
2023-02-02 14:53:06 +00:00
Nick O'Leary
df19e54555 Fix lint issue 2023-02-02 14:36:04 +00:00
Nick O'Leary
19139a4dce Merge pull request #4040 from kazuhitoyokoi/dev-jpn
Add Japanese translations for locking flow
2023-02-02 13:42:22 +00:00
Kazuhito Yokoi
7d1c3133b3 Fix i18n of tooltips for locking flow 2023-02-02 22:37:00 +09:00
Kazuhito Yokoi
da9c0af854 Add Japanese translations for locking flow 2023-02-02 22:35:07 +09:00
Nick O'Leary
6d717a21cf Add 310 tour 2023-02-02 13:34:01 +00:00
Nick O'Leary
fc251d005e Merge pull request #4039 from node-red/tab-context-menu
Locking Flows
2023-02-02 11:35:54 +00:00
Nick O'Leary
4624e28675 Merge branch 'dev' into tab-context-menu 2023-02-02 11:33:06 +00:00
Nick O'Leary
3a1cc38aaf Update for 3.1.0-beta.1 2023-02-02 11:09:55 +00:00
Nick O'Leary
68bb38b8d7 Merge branch 'master' into dev 2023-02-02 10:40:33 +00:00
Nick O'Leary
2ca3b3e99d Merge pull request #4007 from node-red-hitachi/add-markdown-mermaid-diagram
Add support for mermaid diagram to markdown editor
2023-02-02 10:35:32 +00:00
Nick O'Leary
67c8354f76 Merge branch 'pr_4006' into dev 2023-02-02 10:29:39 +00:00
Nick O'Leary
384377782a Remove package-lock from git history 2023-02-02 10:25:57 +00:00
Nick O'Leary
8382665bbb Merge pull request #3999 from node-red/fix-plugin-async
Fix async loading of modules containing both nodes and plugins
2023-02-02 10:23:42 +00:00
Nick O'Leary
e799cfc16a Merge pull request #4004 from dirkjanfaber/patch-1
Comment node: Clarify where the text will appear
2023-02-02 10:23:22 +00:00
Nick O'Leary
055d0081e1 Merge pull request #4021 from node-red/inject-async-context
Allow Inject node to work with async context stores
2023-02-02 10:22:59 +00:00
Nick O'Leary
9035de32c8 Merge pull request #4023 from node-red/trigger-hide-nul-option
Hide trigger node repeat send  option if sending nothing
2023-02-02 10:22:40 +00:00
Nick O'Leary
af62a520d3 Merge pull request #4028 from node-red/Add-count-to-join-and-batch-node-labels
Add count to join and batch node labels
2023-02-02 10:21:57 +00:00
Nick O'Leary
1824108d09 Merge pull request #4035 from xiaobinqt/dev
fix .red-ui-notification class
2023-02-02 10:20:54 +00:00
Nick O'Leary
149e8ce9b0 Merge pull request #4036 from kazuhitoyokoi/master-usemain
Use main branch as default in project feature
2023-02-02 10:20:24 +00:00
Nick O'Leary
f4661eec75 Merge pull request #4038 from bonanitech/function-node-setup-tab
Fix border radius on Modules list header
2023-02-02 10:19:54 +00:00
Mauricio Bonani
0f7a1a42e4 Fix border radius on Modules list header 2023-02-01 17:50:05 -05:00
Kazuhito Yokoi
5bda221f9d Use main branch as default in project feature 2023-01-31 00:36:18 +09:00
weibin
fd42becbdc fix .red-ui-notification
if flows stopped due to missing too much node types manage-project-dep button display none.
2023-01-30 23:02:42 +08:00
Nick O'Leary
2759c1616c Merge branch 'dev' into pr_4031 2023-01-30 09:52:31 +00:00
Nick O'Leary
55ac98c989 Merge pull request #4033 from node-red-hitachi/fix-hide-subflow-tooltip
fix hide subflow tooltip
2023-01-30 09:48:20 +00:00
Nick O'Leary
c42c6a7b08 Merge pull request #4030 from node-red-hitachi/disable-delete-tab-menu-when-single-tab-exists
Disable delete tab menu when single tab exists
2023-01-30 09:38:16 +00:00
Nick O'Leary
b99bd38649 Merge pull request #4029 from node-red-hitachi/fix-tab-menu-error
fix workspace reference error in case of empty tabs
2023-01-30 09:34:05 +00:00
Hiroyasu Nishiyama
013ee2f1f4 fix hide subflow tooltip 2023-01-30 16:24:52 +09:00
Hiroyasu Nishiyama
7b79d79f84 remove useless console output 2023-01-30 14:09:01 +09:00
Hiroyasu Nishiyama
66f9686e48 disable hide all menu if all tabs hidden 2023-01-30 11:42:53 +09:00
Hiroyasu Nishiyama
9b1b7437b3 disable delete tab menu when single tab exists 2023-01-30 10:59:34 +09:00
Hiroyasu Nishiyama
720d44d53e fix workspace reference error in case of empty tabs 2023-01-30 10:30:06 +09:00
Nick O'Leary
7dca148349 Merge pull request #4027 from kazuhitoyokoi/master-fixmenu4project
Fix disabled menu items in project feature
2023-01-27 10:29:10 +00:00
Dave Conway-Jones
47bacaf58a Add count to join and batch node labels 2023-01-26 22:13:17 +00:00
Kazuhito Yokoi
ffff8aeb91 Fix disabled menu in project feature 2023-01-26 02:11:34 +09:00
Dave Conway-Jones
9a856f50d7 Hide repeat send option if sending nothing
to address https://discourse.nodered.org/t/trigger-node-how-to-delay-and-repeat-message/74117/5
2023-01-25 10:59:04 +00:00
Hiroyasu Nishiyama
e7540de85d remove useless variable 2023-01-25 16:40:12 +09:00
Hiroyasu Nishiyama
ba9ddefbee removed endpoint 2023-01-25 16:06:37 +09:00
Hiroyasu Nishiyama
f1801f9662 fix to prevent uploging unexpected file type 2023-01-25 13:38:12 +09:00
Nick O'Leary
ae92ea9476 Merge pull request #4020 from node-red/rename-package-var
Rename package var to avoid strict mode error
2023-01-23 20:44:29 +00:00
Nick O'Leary
c7017ee84b Allow Inject node to work with async context stores
Fixes #4014
2023-01-23 20:42:25 +00:00
Nick O'Leary
0346294c59 Rename package var 2023-01-23 17:50:50 +00:00
Nick O'Leary
8d240ca797 Rename package var to avoid strict more error
Fixes #4017
2023-01-23 17:44:03 +00:00
Nick O'Leary
a607ee90e0 Merge pull request #4009 from node-red/TCP-node-replaceall-fix
TCP Node: ensure newline substitution applies to whole message
2023-01-23 17:23:28 +00:00
Nick O'Leary
7dbbafec1b Merge pull request #4000 from node-red/fix-split-stream
Split node: avoid duplicate done call for buffer split
2023-01-23 17:04:31 +00:00
Nick O'Leary
428132ea3b Merge pull request #3997 from kazuhitoyokoi/dev-jpn
Add Japanese translation for v3.1.0-beta.0
2023-01-23 17:04:16 +00:00
Nick O'Leary
c49330f9d1 Merge pull request #4012 from kazuhitoyokoi/master-addjpn
Add Japanese translations for v3.0.3
2023-01-23 16:58:34 +00:00
Nick O'Leary
937c5fe893 Merge pull request #4019 from node-red/force-ipv4-lookup-over-ipv6
if possible - force ipv4 name resolution to have priority
2023-01-23 16:58:21 +00:00
Dave Conway-Jones
d2c9f12c3a if possible - force ipv4 name resolution to have priority
to fix Issue #4010
and others (eg) email node server connect fails, and some reported on SO
2023-01-23 13:02:58 +00:00
Robin Schneider
10324d8260 Fix typos in settings.js (#4013)
* chore: Remove trailing whitespace in settings.js

* chore: Fix typos in settings.js

* chore: Use consistent terminology in settings.js
2023-01-19 09:28:46 +00:00
Kazuhito Yokoi
8f27dae7ea Add Japanese translations for v3.0.3 2023-01-16 00:56:39 +09:00
Dave Conway-Jones
94ae511a6d fix tcp to replace all in newline substitution
to close #3989
2023-01-09 09:26:24 +00:00
Hiroyasu Nishiyama
038f75e48f add support for mermaid diagram to markdown editor 2023-01-05 17:25:16 +09:00
Hiroyasu Nishiyama
b9fe4c5cd3 merge upstream/dev 2023-01-05 10:29:45 +09:00
Hiroyasu Nishiyama
7e8b7602b4 add support for inline image drag and drop to markdown editor 2023-01-05 10:28:48 +09:00
Dirk-Jan Faber
7c306a8430 Comment node: Clarify where the text will appear
The text will appear in the information tab of the side panel and not in the help tab of the side panel.
2023-01-03 13:41:31 +01:00
Nick O'Leary
dd2bc44c2d Merge branch 'dev' into dev-jpn 2023-01-01 22:38:20 +00:00
Nick O'Leary
74794fea09 Split node: avoid duplicate done call for buffer split
Fixes #3982
2023-01-01 22:21:49 +00:00
Nick O'Leary
1efd1a52a7 Ensure modules containing plugins and nodes are loaded properly
Fixes #3523
2023-01-01 19:36:49 +00:00
Nick O'Leary
928131cf08 Merge pull request #3941 from node-red-hitachi/global-env-var
add global environment variable feature
2023-01-01 14:10:15 +00:00
Nick O'Leary
4d202a7a37 Merge pull request #3971 from node-red/fix-cred-on-global
Ensure credentials object is removed before returning node in getFlow request
2023-01-01 14:09:54 +00:00
Nick O'Leary
e0d71abdc6 Merge pull request #3992 from node-red/fix-mqtt-reconnect
Fix mqtt nodes not reconnecting on modified-flows deploy
2023-01-01 14:09:33 +00:00
Nick O'Leary
550eb6ee2f Merge pull request #3995 from bonanitech/radialMenu
Let themes change radialMenu text colors
2023-01-01 14:06:00 +00:00
Kazuhito Yokoi
a661bc1d23 Add Japanese translation for v3.1.0-beta.0 2022-12-31 00:41:35 +09:00
Mauricio Bonani
f737162697 Let themes change radialMenu text colors 2022-12-29 09:47:05 -05:00
Nick O'Leary
ce57ba80eb Fix mqtt nodes not reconnected on modified-flows deploy 2022-12-27 14:56:32 +00:00
Hiroyasu Nishiyama
99bd957ea0 Resolve merge conflict 2022-12-27 23:45:25 +09:00
Nick O'Leary
270eb56718 Merge pull request #3916 from kazuhitoyokoi/dev
Add Japanese translation for v3.1.0-beta.0
2022-12-27 14:16:02 +00:00
Nick O'Leary
b3ce0c0079 Merge pull request #3987 from kazuhitoyokoi/master-fixproject
Ignore commit error in project feature
2022-12-27 14:15:47 +00:00
Nick O'Leary
e6cee58e0d Merge pull request #3974 from Steve-Mcl/remember-export-format
Remember compact/pretty flow export user choice
2022-12-27 14:09:47 +00:00
Nick O'Leary
4adc6b269c Merge pull request #3980 from kazuhitoyokoi/master-fixpalette
Hide subflow category after deleting subflow
2022-12-27 13:47:58 +00:00
Nick O'Leary
920b0178ec Merge pull request #3981 from kazuhitoyokoi/master-fixtypo
Fix typo in 25-status.html
2022-12-27 13:43:35 +00:00
Nick O'Leary
3583b40e02 Merge pull request #3990 from node-red/csv-change-to-replaceAll
Csv change replace to replaceAll
2022-12-27 13:43:12 +00:00
Nick O'Leary
7870830367 Merge pull request #3991 from hardillb/http-request-form-array
Support form-data arrays
2022-12-27 13:42:33 +00:00
Ben Hardill
4c1d7ad2d2 Merge branch 'master' into http-request-form-array 2022-12-24 20:37:33 +00:00
Ben Hardill
661b07c856 Add tests 2022-12-24 20:35:51 +00:00
Ben Hardill
5670bd8265 Support form-data arrays 2022-12-24 19:32:33 +00:00
Dave Conway-Jones
93a1911232 CSV - Add note about msg.reset to info page
to close #3976
2022-12-19 21:26:20 +00:00
Dave Conway-Jones
2429191838 CSV - swap to regex replace for node14 support 2022-12-19 13:48:21 +00:00
Dave Conway-Jones
f6901cd19f CSV node replace replace with replaceAll just in case
mentioned in Issue #3989
2022-12-19 09:50:29 +00:00
Kazuhito Yokoi
156c3984a7 Ignore commit error in project feature 2022-12-12 01:23:00 +09:00
Kazuhito Yokoi
f91af2153a Fix typo in 25-status.html 2022-12-10 00:33:40 +09:00
GogoVega
c3f13eb428 A few more minor fixes 2022-12-08 22:31:27 +01:00
GogoVega
91ae0206ac fix: Typos 2022-12-08 21:53:16 +01:00
GogoVega
19b5eda98c fix: Double line in popup 2022-12-08 16:47:25 +01:00
Kazuhito Yokoi
805f8a5ee7 Hide subflow category after deleting subflow 2022-12-08 23:43:47 +09:00
GogoVega
6cbfe3d736 Last adjustment and translation of commit 2022-12-07 12:28:02 +01:00
GogoVega
2274319274 fix: Typos 2022-12-07 02:08:29 +01:00
Hiroyasu Nishiyama
2ab8121a4a add description to global-config settings 2022-12-06 21:12:52 +09:00
Hiroyasu Nishiyama
601a4ec70d Add hasUsers to global-config 2022-12-06 10:33:10 +09:00
Hiroyasu Nishiyama
707b831c30 Update packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-12-06 10:25:38 +09:00
Hiroyasu Nishiyama
72ae375e44 Update packages/node_modules/@node-red/nodes/core/common/91-global-config.html
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-12-06 10:25:25 +09:00
Hiroyasu Nishiyama
3c1ddb5c9d Update packages/node_modules/@node-red/editor-client/src/js/ui/env-var.js
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-12-06 09:32:04 +09:00
Hiroyasu Nishiyama
817db23146 Update packages/node_modules/@node-red/nodes/locales/en-US/messages.json
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-12-06 09:29:51 +09:00
Hiroyasu Nishiyama
a8c820f558 Update packages/node_modules/@node-red/nodes/locales/ja/messages.json
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-12-06 09:29:45 +09:00
Hiroyasu Nishiyama
6d09c81f11 Update packages/node_modules/@node-red/editor-client/locales/en-US/editor.json
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-12-06 09:27:17 +09:00
Hiroyasu Nishiyama
192e537e5d Update packages/node_modules/@node-red/editor-client/locales/ja/editor.json
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-12-06 09:27:02 +09:00
Steve-Mcl
7b52ef34be Remember compact/pretty flow export user choice
closes #3849
2022-12-05 22:17:05 +00:00
Kazuhito Yokoi
7117472e73 Add Japanese translation for range node 2022-12-05 23:13:50 +09:00
Kazuhito Yokoi
c24b123917 Add Japanese translation for editor actions 2022-12-05 23:11:56 +09:00
Hiroyasu Nishiyama
9eb8cf121c Update Japanese message reflecting English message update 2022-12-05 11:29:37 +09:00
Hiroyasu Nishiyama
41ef9ae010 Update test/nodes/core/common/91-global-config_spec.js
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-12-05 11:17:29 +09:00
Hiroyasu Nishiyama
1674bbbde9 Update packages/node_modules/@node-red/nodes/locales/ja/messages.json
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-12-05 11:17:20 +09:00
Hiroyasu Nishiyama
0fb739f7cd Update packages/node_modules/@node-red/nodes/locales/ja/common/91-global-config.html
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-12-05 11:17:04 +09:00
Hiroyasu Nishiyama
169fa940e4 Update packages/node_modules/@node-red/nodes/locales/en-US/messages.json
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-12-05 11:16:53 +09:00
Hiroyasu Nishiyama
c9664cc425 Update packages/node_modules/@node-red/nodes/locales/en-US/common/91-global-config.html
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-12-05 11:16:35 +09:00
Hiroyasu Nishiyama
e61cdff655 Update packages/node_modules/@node-red/editor-client/src/js/ui/env-var.js
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-12-05 11:15:43 +09:00
Hiroyasu Nishiyama
a479b8a5d7 Update packages/node_modules/@node-red/nodes/core/common/91-global-config.html
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-12-05 11:15:32 +09:00
Kazuhito Yokoi
26462e684b Merge branch 'node-red:dev' into dev 2022-12-05 01:08:45 +09:00
Nick O'Leary
113d42ef35 Merge pull request #3970 from node-red/prevent-text-selection
Prevent dbl-click opening node edit dialog with text selected
2022-12-03 23:34:57 +00:00
Nick O'Leary
c18018f017 Ensure credentials object is removed before returning node in getFlow request
Fixes #3953
2022-12-03 23:33:33 +00:00
Nick O'Leary
e804addf0a Prevent dbl-click opening node edit dialog with text selected
Fixes #3958
2022-12-03 23:13:44 +00:00
Nick O'Leary
04cea003b9 Merge pull request #3938 from node-red/locking-flows
Locking flows
2022-12-03 23:01:58 +00:00
Nick O'Leary
65fcc56a56 Merge pull request #3968 from node-red/context-menu-updates
Context menu updates
2022-12-03 23:01:37 +00:00
Nick O'Leary
c065d253e9 Merge pull request #3969 from node-red/bump-deps
Update dependencies
2022-12-03 23:01:10 +00:00
Nick O'Leary
4bb2b91ee6 Merge pull request #3966 from Steve-Mcl/fix-mqtt-single-subscription
fix single subscription mqtt node status
2022-12-03 22:47:42 +00:00
Nick O'Leary
b3f761776d Update dependencies 2022-12-03 22:43:03 +00:00
Nick O'Leary
dce1cccbde Allow subflow to be edited if instance exists on locked flow 2022-12-03 22:30:35 +00:00
Nick O'Leary
3630056ed8 Fix RED.nodes.clear() when handling locked flows 2022-12-03 21:44:33 +00:00
Nick O'Leary
2d6e1d7089 NLS updates for context menu 2022-12-03 21:29:27 +00:00
Nick O'Leary
71db79ba53 More context menu options 2022-12-03 21:16:57 +00:00
GogoVega
a6934b3cba fix: Typos (grammar) 2022-12-03 09:37:08 +01:00
GogoVega
5be378e266 fix: Typos (infinitif) 2022-12-02 18:27:36 +01:00
GogoVega
a9b6eaa31f Add French option in other languages 2022-12-02 18:15:06 +01:00
GogoVega
01f9ce0015 Add French translation of runtime.json file 2022-12-02 18:09:06 +01:00
GogoVega
f4309f5af6 fix: Typos (infinitif) 2022-12-02 18:07:39 +01:00
GogoVega
1004ce564f Add French translation of storage nodes 2022-12-02 14:21:34 +01:00
GogoVega
5a1823d13e Add French translation of sequence nodes 2022-12-02 12:10:43 +01:00
GogoVega
66fb66edbc Add French translation of messages.json file 2022-12-01 21:29:12 +01:00
Steve-Mcl
5bb66ed7d4 fix single subscription mqtt node status 2022-12-01 13:08:48 +00:00
Nick O'Leary
14e74afb07 Merge pull request #3909 from node-red/warn-invalid-msg
Add check that node sends object rather than primitive type
2022-11-30 22:28:09 +00:00
Nick O'Leary
c4e216f839 Merge pull request #3912 from node-red/handle_username_spaces
Ensure key_path is quoted in GIT_SSH_COMMAND in case of spaces in pathname
2022-11-30 22:18:24 +00:00
Nick O'Leary
752fdfedf2 Merge pull request #3935 from node-red/Add-drop-mode-to-range-node
Add drop mode to range node
2022-11-30 22:17:02 +00:00
Nick O'Leary
2a49e7c8ef Merge pull request #3908 from node-red/add-httpheaders
Ensure msg.req.headers is enumerable
2022-11-30 22:15:23 +00:00
Nick O'Leary
02af01d2ca Merge pull request #3867 from Steve-Mcl/improve-nodesdir-scan
Fix nodesDir scan when node package has js/html in sub dir to package.json
2022-11-30 22:15:00 +00:00
Nick O'Leary
07c05c1f2a Merge pull request #3930 from node-red/tab-context-menu
Improve UX around hiding flows via context menu
2022-11-30 22:13:54 +00:00
Nick O'Leary
ee4af4c7bf Merge pull request #3920 from node-red/CSV-header-props-with-quotes
CSV node check header properties for ' and "
2022-11-30 22:10:40 +00:00
Nick O'Leary
3d565e74a5 Merge pull request #3917 from kazuhitoyokoi/master-fixpermission
Fix file permissions
2022-11-30 22:10:03 +00:00
Nick O'Leary
3cb84222f8 Merge pull request #3921 from node-red/fix-group-unknown
Handle replacing unknown node inside group or subflow
2022-11-30 22:09:35 +00:00
Nick O'Leary
1b013bb73b Merge pull request #3949 from Steveorevo/master
Fix #3939, red border red-ui-typedInput-container
2022-11-30 22:07:04 +00:00
Nick O'Leary
fd54e625d5 Merge pull request #3965 from we11adam/master
fix: fix typo in catch.html
2022-11-30 21:40:34 +00:00
GogoVega
e440694987 Use English names for nodes (better) 2022-11-30 17:35:22 +01:00
GogoVega
b4a12edc61 Add French translation of parsers nodes 2022-11-30 15:38:49 +01:00
GogoVega
2b04d6834f Add French translation of network nodes 2022-11-30 13:34:19 +01:00
GogoVega
1191574e07 fix: Typos 2022-11-30 13:22:10 +01:00
Adam Lau
77f6412d3b fix: fix typo in catch.html 2022-11-30 17:51:13 +08:00
Gauthier Dandele
327eab6c0d fix: capitals and better translation 2022-11-29 23:09:28 +01:00
GogoVega
0d8a0db883 Add French translation of function nodes 2022-11-29 20:50:18 +01:00
GogoVega
9727062d60 Add French translation of common nodes 2022-11-29 12:50:19 +01:00
GogoVega
09979d3270 Translation of the jsonata.json file 2022-11-29 00:10:04 +01:00
GogoVega
116839d6f6 Add French translation 2022-11-28 23:00:31 +01:00
lkaiy
bed6c48e99 Translation of nodes context, setting menu, etc.
Translation of node context, setting context, etc.
Corrected previously mistranslated ones (grammar, word-spacing)
2022-11-15 16:41:36 +08:00
lkaiy
4d09e90b90 Translation of side-menu,context-menu, etc. 2022-11-15 16:39:29 +08:00
lkaiy
1d91cc6fc1 translation side-menu,keyboard, contextmenu, etc. 2022-11-15 16:36:50 +08:00
Stephen J. Carnam
c81cd5450f Support for PHP syntax highlight 2022-11-09 16:45:32 -08:00
Steveorevo
0b663abe50 Fix #3939, red border red-ui-typedInput-container 2022-11-09 10:33:05 -08:00
Nick O'Leary
3b27fb2aa7 Merge branch 'dev' into dev 2022-11-07 23:16:14 +00:00
Nick O'Leary
6bd67ae68c Merge pull request #3944 from node-red-hitachi/fix-deploy-locked-flow
fix deployment of locked flow
2022-11-07 23:13:03 +00:00
Nick O'Leary
14c362d4ba Merge pull request #3942 from node-red-hitachi/fix-watch-test
fix watch node test on MacOS/ARM
2022-11-07 21:12:55 +00:00
Nick O'Leary
f28bc1bff7 Remove jshint warning 2022-11-07 21:11:58 +00:00
Nick O'Leary
de8a5ea262 Merge pull request #3945 from node-red-hitachi/fix-jshint-es-version
fix to allow es11 for jshint check
2022-11-07 21:10:26 +00:00
Nick O'Leary
339013434b Merge pull request #3946 from node-red-hitachi/i18n-item-url-copy-notification
i18n item URL copy notification & add Japanese message
2022-11-07 21:07:57 +00:00
Nick O'Leary
8a3ad331d2 Merge pull request #3947 from node-red-hitachi/add-item-url-Japanese-action-message
add Japanese message for item url copy actions
2022-11-07 21:07:38 +00:00
Hiroyasu Nishiyama
e3892dc26d add Japanese message for item url copy actions 2022-11-07 16:07:46 +09:00
Hiroyasu Nishiyama
b95df6d883 i18n item URL copy notification & add Japanese message 2022-11-07 15:47:19 +09:00
Hiroyasu Nishiyama
11ad03b21e fix to allow es11 for jshint check 2022-11-07 10:42:07 +09:00
Hiroyasu Nishiyama
9cb474ea9c fix deployment of locked flow 2022-11-07 09:40:36 +09:00
Hiroyasu Nishiyama
fce43b4e1d fix condition for platform check 2022-11-05 14:50:14 +09:00
Hiroyasu Nishiyama
1d547500e8 fix watch node test on MacOS/ARM 2022-11-05 14:30:32 +09:00
Hiroyasu Nishiyama
f23d0480e4 add global environment variable feature 2022-11-04 18:42:51 +09:00
Nick O'Leary
fe9c630572 Prevent deleting subflow if instance on locked tab 2022-11-01 11:42:40 +00:00
Nick O'Leary
ce94226c3c Disable subflow/flow menu options if active is locked 2022-11-01 11:29:23 +00:00
Nick O'Leary
f12d36b5ed Locking flows fixes and context menu options 2022-11-01 10:48:48 +00:00
Nick O'Leary
3cb5259494 Initial locking flows UX 2022-11-01 10:37:18 +00:00
Nick O'Leary
a351cd9d9f Add move-to-start/end and better subflow menu options 2022-11-01 10:35:57 +00:00
Nick O'Leary
d8e01584f3 Remove add-flow-to-right option if clicked in tab bar 2022-10-31 20:20:05 +00:00
Kazuhito Yokoi
dd76840568 Fix uncleared translations in change node 2022-11-01 01:09:06 +09:00
Dave Conway-Jones
94690fad7a Merge branch 'CSV-header-props-with-quotes' of https://github.com/node-red/node-red into CSV-header-props-with-quotes 2022-10-29 17:36:17 +01:00
Dave Conway-Jones
d693af9615 CSV node check header properties for ' and "
and add test
to close #3919
2022-10-29 17:35:45 +01:00
Dave Conway-Jones
4cc18c25fe Add drop mode to range node
and include tests
2022-10-29 17:34:29 +01:00
Kazuhito Yokoi
8b398f49c0 Merge branch 'node-red:master' into master-fixpermission 2022-10-29 23:51:05 +09:00
Nick O'Leary
902ce68164 Merge branch 'master' into fix-group-unknown 2022-10-26 00:52:34 +01:00
Nick O'Leary
cd0474ce7b Update packages/node_modules/@node-red/editor-client/src/js/nodes.js
Co-authored-by: Stephen McLaughlin <44235289+Steve-Mcl@users.noreply.github.com>
2022-10-26 00:51:41 +01:00
Nick O'Leary
946def022f Merge pull request #3922 from node-red/fix-httpreq-tests
Fix httprequest tests to be more lenient on error message
2022-10-26 00:40:47 +01:00
Nick O'Leary
fb499be979 Add context menu to tab bar 2022-10-25 23:44:59 +01:00
Nick O'Leary
c62a101635 Fix httprequest tests to be more lenient on error message 2022-10-16 23:10:57 +01:00
Nick O'Leary
69a575097d Remove debug 2022-10-16 22:47:34 +01:00
Nick O'Leary
b40551a8fa Handle replacing unknown node inside group or subflow 2022-10-16 22:38:11 +01:00
Dave Conway-Jones
5b27bcd781 CSV node check header properties for ' and "
and add test
to close #3919
2022-10-16 18:05:21 +01:00
Kazuhito Yokoi
75725a38df Fix file permission 2022-10-12 23:50:33 +09:00
Kazuhito Yokoi
c4e277853c Add Japanese translation for button of node URL 2022-10-12 23:24:21 +09:00
Nick O'Leary
24b055b1b8 Ensure key_path is quoted in GIT_SSH_COMMAND in case of spaces in pathname 2022-10-04 15:44:29 +01:00
Nick O'Leary
7da3773f7f Merge pull request #3898 from node-red/delay-flush-reset
let delay node handle both flush then reset
2022-10-04 15:39:05 +01:00
Nick O'Leary
32999ffa84 Merge pull request #3906 from node-red/Fix-for-csv-undefined-property
Fix for CSV undefined property
2022-10-04 15:38:37 +01:00
Nick O'Leary
f06c53f1f1 Merge pull request #3905 from node-red/mqtt-followups
Fix birth topic handling in MQTT node
2022-10-04 15:36:49 +01:00
Nick O'Leary
a9eec28360 Merge pull request #3884 from node-red/fix-auto-complete
Fix autocomplete entry for responseUrl
2022-10-04 15:35:10 +01:00
Nick O'Leary
5cda972872 Merge pull request #3890 from kazuhitoyokoi/master-fixmqttproperty
Fix pull-down menus of MQTT configuration node
2022-10-04 15:34:50 +01:00
Nick O'Leary
087946876b Merge pull request #3907 from boahc077/github_actions_token_permission
ci: add minimum GitHub token permissions for workflows
2022-10-04 15:32:47 +01:00
Nick O'Leary
318f0f1b7e Merge pull request #3899 from node-red/fix-change-self-overwrite
Fix change node overwriting msg with itself
2022-10-04 15:29:23 +01:00
Stephen McLaughlin
6d1a12af4b remove debug/test code 2022-10-04 13:36:23 +01:00
Nick O'Leary
a40e5dbcd4 Add check that node sends object rather than primitive type
Fixes #3876
2022-10-04 11:49:49 +01:00
Nick O'Leary
7c79ca7878 Ensure msg.req.headers is enumerable
Fixes #3878
2022-10-04 11:28:26 +01:00
Nick O'Leary
93c1600980 Merge pull request #3886 from kazuhitoyokoi/master2
Limit number of ports in function node
2022-10-04 11:00:18 +01:00
Nick O'Leary
c3d1e6181f Merge pull request #3894 from hardillb/http-response-status-number
Ensure statusCode is a number
2022-10-04 10:28:04 +01:00
Ashish Kurmi
87e7f3a61c ci: add minimum GitHub token permissions for workflows
Signed-off-by: Ashish Kurmi <akurmi@stepsecurity.io>
2022-10-02 11:16:13 -07:00
Dave Conway-Jones
e724f216bf Fix for CSV undefined property
to close #3900 main issue
and add tests
(other fix is commented out but no tests)
2022-09-30 13:48:48 +01:00
Steve-Mcl
e6b379358a better logging of set with no types 2022-09-29 21:28:13 +01:00
Steve-Mcl
b0abba15a6 remove dud code instead of commenting 2022-09-29 19:08:46 +01:00
Steve-Mcl
81b4874a7c fix new test and fix bug found in previous PR 2022-09-29 19:05:53 +01:00
Steve-Mcl
f11b9c1e18 add test bad birth topic
part of #3865
2022-09-29 13:12:15 +01:00
Steve-Mcl
e15ecc00ce remove old unused code (5y+ not used) 2022-09-29 13:11:25 +01:00
Dave Conway-Jones
3e4c45ac6a Fix change node overwriting msg with itself
and add test
to close #3891
2022-09-22 20:22:11 +01:00
Dave Conway-Jones
fc657ecc71 let delay node handle both flush then reset
and add tests
2022-09-22 10:51:48 +01:00
hae-iotplatform
87cb61750f Korean Translation (message.json) 2022-09-20 11:02:11 +09:00
hae-iotplatform
3231247fb6 Korean Translation (editor.json) 2022-09-20 11:01:08 +09:00
Ben Hardill
4115c13a65 Ensure statusCode is a number
Fixes #3893

Used parseInt instead of the suggested fix so that we don't end up
with statusCode = 200.5
2022-09-19 19:43:06 +01:00
Kazuhito Yokoi
f872e2ab80 Add icon to typedInput in MQTT node 2022-09-18 19:11:33 +09:00
Kazuhito Yokoi
a81b1aa0cb Support i18n in MQTT node property 2022-09-18 17:10:19 +09:00
Kazuhito Yokoi
efc0f1ab91 Fix default values for MQTT retain settings 2022-09-18 16:24:25 +09:00
Kazuhito Yokoi
ce31edc803 Fix handling of max and min values in function outputs 2022-09-18 02:22:52 +09:00
Kazuhito Yokoi
199caccbc3 Change the maximum number of ports to 500 2022-09-17 00:25:46 +09:00
Nick O'Leary
313bab37e2 Merge pull request #3870 from node-red/uri-fragments
Support uri fragments for nodes and groups including edit support
2022-09-15 21:25:50 +01:00
Nick O'Leary
f060309002 Merge pull request #3872 from node-red-hitachi/fix-Japanese-editor-message-for-JSONata
Fix Japanese translation for JSONata editor
2022-09-15 21:25:30 +01:00
Nick O'Leary
fc3d86e6ff Merge pull request #3882 from kazuhitoyokoi/master-addenvinfo2template
Add information about environment variable to template node
2022-09-15 21:24:32 +01:00
Nick O'Leary
9fd4989142 Fix autocomplete entry for responseUrl
Fixes #3883
2022-09-15 21:22:55 +01:00
Kazuhito Yokoi
7507a7b459 Limit number of ports in function node 2022-09-16 02:10:14 +09:00
Kazuhito Yokoi
d657817211 Add information about environment variable to template node 2022-09-13 22:08:22 +09:00
Hiroyasu Nishiyama
954649007c merge master 2022-09-13 10:52:48 +09:00
Nick O'Leary
0caa308757 Add core:copy-item-link action and expose in info sidebar 2022-09-12 20:53:46 +01:00
Nick O'Leary
b0d9903fe2 Merge pull request #3873 from node-red-hitachi/fix-describe-arg
Remove done from describe
2022-09-12 19:29:14 +01:00
Nick O'Leary
6375f3c445 Merge pull request #3841 from Steve-Mcl/fix-search-type-with-spaces
Fix search type with spaces
2022-09-12 19:27:09 +01:00
Nick O'Leary
2328f418be Merge pull request #3871 from node-red-hitachi/fix-extended-function-error-handling-of-jsonata-editor
Fix error hanndling of JSONata expression editor for extended functions
2022-09-12 19:26:15 +01:00
Nick O'Leary
22b6564847 Merge pull request #3880 from kazuhitoyokoi/master-replacedot4function
Remove dot from variable name for external module in function node
2022-09-12 19:25:39 +01:00
Nick O'Leary
25c8bfefe2 Merge pull request #3868 from Steve-Mcl/func-types-monaco-util-promisify
add function node monaco types util and promisify
2022-09-12 19:25:07 +01:00
Nick O'Leary
30f4524821 Merge pull request #3866 from kazuhitoyokoi/master-fixbutton4addsshkey
Add button type to the adding SSH key button
2022-09-12 19:18:49 +01:00
Nick O'Leary
9e4c3a7200 Merge pull request #3879 from kazuhitoyokoi/master-fixradiobutton4project
Check radio button as default in project dialog
2022-09-12 19:18:15 +01:00
Nick O'Leary
5b7e84c1b0 Merge pull request #3869 from Steve-Mcl/fix-mqtt-birth-bad-topic-crash
Prevent invalid mqtt birth topic crashing node-red
2022-09-12 19:17:43 +01:00
Nick O'Leary
e6097e4968 Merge pull request #3874 from node-red-hitachi/support-clone-in-monaco
Add $clone as supported function
2022-09-12 19:16:18 +01:00
Kazuhito Yokoi
0f2829097b Remove dot from variable name for external module in function node 2022-09-10 12:17:18 +09:00
Kazuhito Yokoi
e2a9f940e2 Check radio button as default in project dialog 2022-09-09 01:05:53 +09:00
Hiroyasu Nishiyama
3eb2b2ac5d add $clone as supported function 2022-09-06 18:52:13 +09:00
Hiroyasu Nishiyama
ce7b0a3b5e remove done from describe 2022-09-06 18:05:50 +09:00
Hiroyasu Nishiyama
7bd7c99dd4 Fix Japanese translation for JSONata editor 2022-09-06 16:53:38 +09:00
Hiroyasu Nishiyama
b0d12c4125 Fix error hanndling of JSONata expression editor for extennded functions 2022-09-06 15:38:49 +09:00
Nick O'Leary
1fa8f30550 Support uri fragments for nodes and groups including edit support 2022-09-05 21:08:36 +01:00
Kazuhito Yokoi
745607b5bc Add button type to buttons on node properties 2022-09-04 23:21:34 +09:00
Kazuhito Yokoi
cc5a770b16 Add button type to buttons on projects dialog 2022-09-04 21:58:02 +09:00
Steve-Mcl
fbde0091de fix node-red crash with invalid mqtt birth topic
fixes #3865
2022-09-04 11:08:41 +01:00
Steve-Mcl
a533943a40 add function node monaco types util and promisify
fixes #3851
2022-09-04 01:50:54 +01:00
Stephen McLaughlin
e11f17672c Update packages/node_modules/@node-red/editor-client/src/js/ui/palette.js 2022-09-03 22:01:54 +01:00
Stephen McLaughlin
c038c99f9d Update packages/node_modules/@node-red/editor-client/src/js/ui/search.js
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-09-03 21:54:41 +01:00
Stephen McLaughlin
5f159c1fbd Update packages/node_modules/@node-red/editor-client/src/js/ui/search.js
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-09-03 21:54:21 +01:00
Steve-Mcl
6a19d8246c add test for specific arrangement of node package 2022-09-03 21:37:27 +01:00
Steve-Mcl
d6bb3a558f fix loading node package in nodesDir on linux
fixes #3861
2022-09-03 21:23:38 +01:00
Kazuhito Yokoi
cd8ca8981b Add button type to the adding SSH key button 2022-09-03 21:03:08 +09:00
Nick O'Leary
44300dbb34 Merge pull request #3807 from node-red-hitachi/env-var-jsonata
Env var jsonata
2022-09-02 20:47:30 +01:00
Nick O'Leary
a5d7f7acce Merge pull request #3842 from hardillb/fix-broken-headers-tests
Add missing property to node object HTTPRequest
2022-09-02 20:46:22 +01:00
Nick O'Leary
a032c2e326 Merge pull request #3840 from Steve-Mcl/fix-mqtt-session-time
ensure sessionExpiry(Interval) is applied
2022-09-02 20:45:41 +01:00
Nick O'Leary
9d770ed436 Merge pull request #3857 from kazuhitoyokoi/master-fixeditablelist4httprequest
Support sortable list on property UI of http request and http response nodes
2022-09-02 20:45:08 +01:00
Nick O'Leary
ae753940f3 Merge pull request #3852 from kazuhitoyokoi/master-addjpn
Add Japanese translation for v3.0.2
2022-09-02 20:44:45 +01:00
Kazuhito Yokoi
d0d22c333c Add Japanese translation for v3.0.2 2022-08-28 02:04:13 +09:00
Kazuhito Yokoi
266ba17ebb Use sortable list in http response node and proxy setting 2022-08-18 11:52:56 +09:00
Kazuhito Yokoi
0d0d5bafb0 Make pre-defined header list sortable in http request node 2022-08-18 01:29:07 +09:00
Ben Hardill
58b951e134 Make port number dynamic in test 2022-08-14 15:09:48 +01:00
Ben Hardill
30956b5441 Add missing property to node object HTTPRequest
Also add tests for broken headers
2022-08-14 15:02:39 +01:00
Steve-Mcl
9540cfe749 fix flags search without val 2022-08-13 18:09:11 +01:00
Steve-Mcl
31b17faa2a fix MQTT test fail due to birth sent before connection done 2022-08-12 18:23:07 +01:00
Steve-Mcl
5c6b8e9e50 opportunistic tidy up MQTT tests 2022-08-12 18:21:36 +01:00
Steve-Mcl
5a36e8fb11 add tests for MQTT v5 (sessionExpiry property) 2022-08-12 18:20:11 +01:00
Steve-Mcl
7d4c857a43 ensure sessionExpiry(Interval) is applied 2022-08-12 15:47:15 +01:00
Steve-Mcl
598bcf675f fix searching by type when type name has a space 2022-08-12 15:45:12 +01:00
Fabio Barcello S. Dos R. Muller
e7c657f82d Some minor changes to sections that were missing in some files
Fixing missing sessions is some pt-BR files and also
one small typo of an hmtl end paragraph </p> in the 21-httprequest.html
of en-US original language file.
2022-08-05 16:29:19 -03:00
Fabio Barcello S. Dos R. Muller
3bae92b356 Changing as pr-3804 discussion
Added some lines to /pt-br/editor.json and
added pt-br into other language editor.json locales.
2022-08-04 11:15:57 -03:00
Nick O'Leary
5365786386 Merge pull request #3830 from node-red/release-302
Bump for 3.0.2
2022-08-04 14:13:26 +01:00
Nick O'Leary
c9b0a7c2dd Bump for 3.0.2 2022-08-04 13:50:31 +01:00
Nick O'Leary
371d8042d6 Merge pull request #3776 from hardillb/relaxed-http-req-headers
Allow HTTP Headers not in spec
2022-08-04 13:36:24 +01:00
Nick O'Leary
be343cb21e Merge pull request #3812 from bonanitech/workspace-chart-bottom
Fix workspace chart bottom property
2022-08-04 13:12:21 +01:00
Nick O'Leary
e9eabd6881 Merge pull request #3802 from Dennis14e/patch-de-2
Update german translation
2022-08-04 13:10:52 +01:00
Nick O'Leary
abccdc7f21 Update packages/node_modules/@node-red/nodes/locales/en-US/messages.json 2022-08-04 13:10:05 +01:00
Nick O'Leary
4ae914f729 Merge pull request #3801 from kazuhitoyokoi/master-subflowcolor
Support color reset to the default in subflow and group
2022-08-04 13:02:04 +01:00
Nick O'Leary
86ac955b79 Merge pull request #3817 from node-red/fix-regex-name-handle
Allow generateNodeNames to handle names containing regex control chars
2022-08-04 12:58:06 +01:00
Nick O'Leary
9734691cac Merge pull request #3808 from bonanitech/overflow-auto
Hide scrollbars until they're needed
2022-08-04 12:57:53 +01:00
Nick O'Leary
d94f3a477d Merge pull request #3818 from node-red/fix-subflow-module-node-lookup
Register subflow module instance node with parent flow
2022-08-04 12:57:21 +01:00
Nick O'Leary
d53cd209f7 Merge pull request #3816 from node-red/import-junction-fix
Include junctions/groups when exporting subflows plus related fixes
2022-08-04 12:57:06 +01:00
Nick O'Leary
65cacb39d2 Merge pull request #3820 from node-red/remove-console-log-subflow-js
remove console.log
2022-08-04 12:56:48 +01:00
Stephen McLaughlin
b008a6a2aa remove console.log
fixes #3819
2022-08-04 11:05:27 +01:00
Nick O'Leary
5c29feec63 Register subflow module instance node with parent flow
Fixes #3798
2022-08-02 00:05:21 +01:00
Nick O'Leary
d8e350d603 Allow generateNodeNames to handle names containing regex control characters
Fixes #3813
2022-08-01 21:05:52 +01:00
Nick O'Leary
14a3366850 Include junctins/groups when exporting subflows plus related fixes
Fixes #3805
2022-08-01 20:54:05 +01:00
Mauricio Bonani
5ea0c6fca1 Fix workspace chart bottom property 2022-07-29 09:49:59 -04:00
Mauricio Bonani
f454c29b8c Hide scrollbars until they're needed 2022-07-28 10:56:38 -04:00
Hiroyasu Nishiyama
1ddbeaa50f add test cases 2022-07-27 20:25:43 +09:00
Fabulous Muller
b937c37be3 Fixed JSON errors in 2 files
fixed 2 errors in editor.json and messages.json as reported
by run tests #1174 build(16).
2022-07-26 17:18:43 -03:00
Fabulous Muller
0908369dba Portuguese Brazilian (pt-BR) translation
Portuguese Brazilian, pt-BR, translation based on v.3.0.1 branch.
The initial efforts started with PR #3100(V.2.0.3) but there were some
problems and the quality needed to be improved. Now I fixed some
failures and reviewed files line by line, double-checked with text editor
and dictionary updated to last ortographic agreement of the portuguese
language; anyway errors still can happen, this is not a robotic translation
and portuguese has  a latin branch, so one word in english(sometimes) has
many possible translations in portuguese; just to complicate a litlle
bit.

So we are finally making pt-BR available in Node-Red and hope to just
improve from now on.

Resolves: #3100
2022-07-25 16:35:06 -03:00
Dennis Neufeld
fe5132be1d Update german translation 2 2022-07-24 16:31:01 +02:00
Dennis Neufeld
b50ba3e0e4 Update german translation 2022-07-23 18:53:39 +02:00
Kazuhito Yokoi
4fb40f9077 Support color reset to the default in subflow 2022-07-23 21:39:07 +09:00
Nick O'Leary
dc7fef6395 Merge pull request #3797 from node-red/301
Update changelog and bump for 3.0.1
2022-07-22 10:27:46 +01:00
Nick O'Leary
da65bf7292 Update changelog and bump for 3.0.1 2022-07-22 09:50:37 +01:00
Nick O'Leary
17d9c2577e Merge pull request #3794 from Steve-Mcl/fix-code-editor-theme-from-theme
Allow codeEditor theme to be set even if `codeEditor` is not set in settings.js
2022-07-21 16:27:41 +01:00
Steve-Mcl
bc7852c1cc Allow codeEditor theme to be set missing from settings.js 2022-07-21 14:44:29 +01:00
Nick O'Leary
51d8792f62 Merge pull request #3793 from Steve-Mcl/sys-info-amendments
Sys info (diagnostics report) amendments
2022-07-21 11:39:50 +01:00
Nick O'Leary
bfdbeb0964 Merge pull request #3791 from Steve-Mcl/allow-editor-create-no-title-no-mode
Allow `mode` and `title` to be omitted in `options` argument for `createEditor`
2022-07-21 11:39:02 +01:00
Nick O'Leary
ede82ad0d5 Merge pull request #3789 from Steve-Mcl/fix-focus-issues
Fix focus issues
2022-07-21 11:38:38 +01:00
Nick O'Leary
f50dcb9e40 Merge pull request #3788 from node-red/fix-typedinput-submit
Ensure all typedInput buttons have button type set
2022-07-21 11:37:52 +01:00
Nick O'Leary
676c5e5df5 Merge pull request #3787 from node-red/fix-search-unused
Do not flag hasUsers=false nodes as unused in search
2022-07-21 11:37:39 +01:00
Nick O'Leary
d52be76c8a Merge pull request #3786 from node-red/fix-quick-add-pos
Properly position quick-add dialog in all cases
2022-07-21 11:37:26 +01:00
Nick O'Leary
c6a517c88c Merge pull request #3785 from node-red/ts-pos
Ensure quick-add dialog does not obscure ghost node when shifted
2022-07-21 11:37:10 +01:00
Nick O'Leary
96eb8719b8 Merge pull request #3784 from node-red/remove-hasown
Remove use of Object.hasOwn
2022-07-21 11:36:56 +01:00
Steve-Mcl
bcd31610f6 update tests for sys info diagnostics ammendments 2022-07-21 10:07:40 +01:00
Steve-Mcl
a4d66622a5 add a handful of missing settings to basic report 2022-07-21 09:30:49 +01:00
Steve-Mcl
af4f07cb26 include flows stop/start state 2022-07-21 09:29:51 +01:00
Steve-Mcl
f7120b32f5 Allow mode and title to be empty
fixes #3774
2022-07-20 13:58:03 +01:00
Steve-Mcl
273404e24d focus search input when opened via context menu 2022-07-20 12:30:52 +01:00
Steve-Mcl
1b53b5b927 focus stack when re-showing nested editor 2022-07-20 12:30:15 +01:00
Steve-Mcl
7c5413e568 ensure red-ui-editor-stack is focusable 2022-07-20 12:29:16 +01:00
Nick O'Leary
39b2fe45a5 Ensure all typedInput buttons have button type set
Fixes #3780

Otherwise they act as type="submit" and the browser will click on them
when enter is pressed in an input
2022-07-20 11:11:44 +01:00
Nick O'Leary
8d3c5d09f6 Do not flag hasUsers=false nodes as unused in search
Fixes #3777
2022-07-20 10:47:57 +01:00
Nick O'Leary
5944fdb5dc Properly position quick-add dialog in all cases
Fixes #3781
2022-07-20 10:40:20 +01:00
Nick O'Leary
e120bad779 Ensure quick-add dialog does not obscure ghost node when shifted 2022-07-20 10:37:40 +01:00
Nick O'Leary
d546a4a15b Remove use of Object.hasOwn
Fixes #3778
2022-07-20 10:14:06 +01:00
Hiroyasu Nishiyama
93a88a83a8 add JSONata support for env var definition 2022-07-20 10:13:13 +09:00
Ben Hardill
660a2e0ed6 Allow HTTP Headers not in spec
potential fix for #3772
2022-07-16 19:51:35 +01:00
Nick O'Leary
30ea300f65 Merge pull request #3769 from node-red/310
Bump dev to 3.1.0-beta.0
2022-07-14 21:16:38 +01:00
Nick O'Leary
04f4d5274d Bump dev to 3.1.0-beta.0 2022-07-14 20:58:25 +01:00
Nick O'Leary
1f9695abd7 Merge pull request #3768 from node-red/master
Get `dev` branch up to date with `master`
2022-07-14 20:56:42 +01:00
Nick O'Leary
1b94cc3ac0 Merge pull request #3764 from node-red/300
Node-RED 3.0 release
2022-07-14 09:49:05 +01:00
Nick O'Leary
4698d5d2fc Update dependencies 2022-07-14 09:31:10 +01:00
Nick O'Leary
92bc9d81c5 Update changelog 2022-07-14 09:27:57 +01:00
Nick O'Leary
952cfaec14 Merge pull request #3766 from Steve-Mcl/fix-split-with
Fix "split with" on virtual links
2022-07-14 09:26:05 +01:00
Nick O'Leary
637c44aa59 Merge pull request #3767 from Steve-Mcl/use-theme-page-and-header-values
Use theme page and header values if settings.js values are not present
2022-07-14 09:20:44 +01:00
Steve-Mcl
6e5fc29dca show add junction when nodes are selected 2022-07-13 22:34:22 +01:00
Steve-Mcl
8bd02d0c36 update header url if set in theme and not settings 2022-07-13 20:36:27 +01:00
Steve-Mcl
c6cfbb8755 use page&theme settings in a theme plugin 2022-07-13 20:16:34 +01:00
Steve-Mcl
75d3444391 Ensure added junc(s) are selected
Feature parity with insert node, insert links etc
2022-07-13 12:43:58 +01:00
Steve-Mcl
c648e1e8d6 fix context menu insert junc/links enabled state 2022-07-13 12:42:55 +01:00
Steve-Mcl
e2f42fddb5 Ensire only wire links are split with junctions/links 2022-07-13 12:19:05 +01:00
Nick O'Leary
f93fe684c0 Update changelog 2022-07-12 21:26:16 +01:00
Nick O'Leary
ee378ea0c4 Update version to 3.0 2022-07-12 21:18:49 +01:00
Nick O'Leary
613d34e6e6 Update tourGuide for 3.0 2022-07-12 21:12:31 +01:00
Nick O'Leary
4c784af55d Update dependencies 2022-07-12 21:12:00 +01:00
Nick O'Leary
b28595c814 Merge pull request #3759 from kazuhitoyokoi/master-fixundo
Focus editor for undo after some actions in menu
2022-07-12 13:18:55 +01:00
Nick O'Leary
fca7beec01 Merge pull request #3763 from node-red/pr_3756
Ensure node icon shade has properly rounded corners
2022-07-12 13:18:22 +01:00
Stephen McLaughlin
f813f03a46 Merge pull request #3762 from node-red/sf-creds-fix
Fix storing subflow credential type when input has multiple types
2022-07-12 10:21:20 +01:00
Nick O'Leary
6ff2232df3 Ensure node icon shade has properly rounded corners 2022-07-12 09:27:45 +01:00
Nick O'Leary
e3b1f058cd Merge pull request #3752 from Steve-Mcl/fix-global-path-popover
Ensure global-config and flow-config have info in the hierarchy popover
2022-07-11 20:28:58 +01:00
Nick O'Leary
542e9cacc2 Merge pull request #3751 from Steve-Mcl/fix-linkcall-registry
Fix linkcall registry bugs
2022-07-11 20:27:08 +01:00
Nick O'Leary
0a0a7ca39b Fix storing subflow credential type when input has multiple types
Fixes #3749
2022-07-11 20:19:48 +01:00
Kazuhito Yokoi
cee287da99 Focus editor for undo after some actions in menu 2022-07-12 02:09:20 +09:00
Stephen McLaughlin
c8e4df94f9 Merge pull request #3754 from braincube-io/fix-change-context
Fix change node, not handling from field properly when using context
2022-07-11 17:26:30 +01:00
Kazuhito Yokoi
c86e4f52a0 Fix shade for node icon to be rounded rectangle 2022-07-12 00:10:51 +09:00
Steve-Mcl
44216310ca Ensure global/config and flow/config have info
fixes #3750
2022-07-11 13:09:49 +01:00
Steve-Mcl
5c69599e78 Apply linting suggestions to the registry enclosure 2022-07-11 10:28:31 +01:00
Steve-Mcl
e4098d3991 fix undecalred variable access 2022-07-11 10:28:17 +01:00
Steve-Mcl
55a94d659b fix const reassignment 2022-07-11 10:27:30 +01:00
Franck Mourre
7a048d5b32 Fix change node, not handling from field properly when using context 2022-07-11 10:51:31 +02:00
Nick O'Leary
e14dd06a94 Merge pull request #3748 from Steve-Mcl/fix-add-junc-undo
include dirty state in history event
2022-07-08 17:07:27 +01:00
Nick O'Leary
62332a2b56 Merge pull request #3746 from node-red/pr_3744
Fix display direction of context sub-menu
2022-07-08 17:07:03 +01:00
Steve-Mcl
639030924f include dirty state in history event 2022-07-08 14:09:54 +01:00
Nick O'Leary
241b47fe19 Merge branch 'master' into pr_3744 2022-07-08 13:08:26 +01:00
Nick O'Leary
69beecf334 Fix menu padding for pull-left submenus 2022-07-08 13:06:05 +01:00
Nick O'Leary
e308e02f9d Merge pull request #3745 from node-red-hitachi/fix-debug-path-menu
Fix clear pinned paths of debug sidebar menu
2022-07-08 08:53:24 +01:00
Nick O'Leary
87258e485a Merge pull request #3742 from Steve-Mcl/fix-tooltip-exception
prevent exception generating tooltip for deleted nodes
2022-07-08 08:23:56 +01:00
Nick O'Leary
0682c346ea Merge pull request #3741 from Steve-Mcl/fix-context-menu
Fix context menu issues ready for v3 beta.5
2022-07-08 08:23:02 +01:00
Hiroyasu Nishiyama
5ae566952b do not show clear pinned if not available 2022-07-08 13:10:21 +09:00
Hiroyasu Nishiyama
18f9ab0cda make left sub-menu caret fit within context menu 2022-07-07 20:23:27 +09:00
Hiroyasu Nishiyama
bd4a5ac844 fixed menu width and window width 2022-07-07 19:39:28 +09:00
Hiroyasu Nishiyama
257b1f89f3 fix display direction of context sub-menu 2022-07-07 16:49:13 +09:00
Steve-Mcl
962672564e prevent exception generating tooltip for deleted nodes 2022-07-06 15:17:58 +01:00
Steve-Mcl
7216c6d62a code linting and remove excessive new lines 2022-07-06 13:08:56 +01:00
Steve-Mcl
21d3261eec Allow editor events to close context menu 2022-07-06 13:05:57 +01:00
Steve-Mcl
03f758720c Allow escape key to close context menu 2022-07-06 13:05:18 +01:00
Steve-Mcl
eaa85ae8d5 Fix insert=>link nodes enable/disable state 2022-07-06 12:54:22 +01:00
Stephen McLaughlin
8cb212d897 Merge pull request #3729 from node-red/cut-vs-copy
Do not generate new node-ids when pasting a cut flow
2022-07-06 10:36:14 +01:00
Stephen McLaughlin
a38d3981df Merge pull request #3731 from node-red-hitachi/fix-node-move
Fix to prevent node from moving out of workspace
2022-07-06 10:35:54 +01:00
Stephen McLaughlin
af08c077d2 Merge pull request #3736 from bonanitech/disabled-config-node-background
Don't let themes change disabled config node background color
2022-07-06 10:34:20 +01:00
Stephen McLaughlin
84e2489585 Merge pull request #3737 from bonanitech/pr3692-leftovers
Move colors left behind in #3692 to CSS variables
2022-07-06 10:33:59 +01:00
Mauricio Bonani
744375bd5d Don't let themes change config node label colors 2022-07-05 07:33:31 -04:00
Hiroyasu Nishiyama
6c1f63bfbb introduce RED.view.dimensions for workspace dimensions 2022-07-05 09:02:21 +09:00
Mauricio Bonani
7d0267c924 Move colors left behind in #3692 to CSS variables 2022-07-04 18:38:45 -04:00
Mauricio Bonani
daa9cb65e5 Change disabled config node background color variable 2022-07-04 17:17:40 -04:00
Nick O'Leary
7072265225 Merge pull request #3734 from node-red-hitachi/fix-close-websocket
Fix close timeout of websocket node
2022-07-04 21:02:20 +01:00
Nick O'Leary
8daade0021 Merge pull request #3733 from node-red-hitachi/fix-debug-message-handling
fix handling of global debug message
2022-07-04 21:01:35 +01:00
Nick O'Leary
b4d30b462f Merge pull request #3730 from ralphwetzel/master
Fix label overflow @ config-node palette
2022-07-04 20:52:04 +01:00
Nick O'Leary
18acd67b4f Merge pull request #3728 from node-red/fix-credential-clear
Do not remove unknown credentials of Subflow Modules
2022-07-04 20:47:04 +01:00
Nick O'Leary
78ed53f4fb Ensure a second paste of cut nodes is treated as a copy-paste 2022-07-04 20:46:21 +01:00
Nick O'Leary
d95314c754 Update packages/node_modules/@node-red/runtime/lib/nodes/credentials.js 2022-07-04 20:21:25 +01:00
Hiroyasu Nishiyama
277cc19ec3 call done after close handler 2022-07-04 11:23:47 +09:00
Hiroyasu Nishiyama
67f4553213 fix handling of global debug message 2022-07-04 10:45:20 +09:00
Nick O'Leary
b2bb656d30 Merge pull request #3732 from node-red/fix-monaco-default
Fix defaulting to monaco if settings does not contain codeEditor
2022-07-03 20:55:16 +01:00
Nick O'Leary
ca20f41d0e Update theme tests to ensure monaco is loaded 2022-07-03 20:37:55 +01:00
Nick O'Leary
13e8aeae4e Fix defaulting to monaco if settings does not contain codeEditor 2022-07-03 20:22:19 +01:00
Hiroyasu Nishiyama
02308f9e2f prevennt node from moving out of workspace 2022-07-03 20:39:54 +09:00
ralphwetzel
0fdcbb4611 Fix label overflow @ config-node palette 2022-07-02 09:52:14 +02:00
Nick O'Leary
829ccc3466 Do not generate new node-ids when pasting a cut flow
Fixes #3629
2022-07-01 17:48:14 +01:00
Nick O'Leary
9ac83cf62e Do not remove unknown credentials of Subflow Modules
Fixes #3641
2022-07-01 17:34:16 +01:00
Nick O'Leary
f760354e82 Merge pull request #3700 from ralphwetzel/master
Disable keyboard shortcut mapping when showing Edit[..]Dialog
2022-07-01 12:23:49 +01:00
Nick O'Leary
e91e35d508 Merge pull request #3721 from node-red/update-changlog
Add missing entries from beta.4 changelog
2022-07-01 12:22:09 +01:00
Nick O'Leary
db7e196bf8 Merge pull request #3727 from node-red/rh-click-link-actions
Update add-junction menu to work in more cases
2022-07-01 12:22:00 +01:00
Nick O'Leary
f5fe4f99f1 Merge pull request #3723 from Steve-Mcl/fix-import
Ensure importMap is not null when using import UI
2022-07-01 12:21:37 +01:00
Nick O'Leary
e2bff36395 Merge pull request #3724 from kazuhitoyokoi/master-addjpn
Add Japanese translations for v3.0-beta.4
2022-07-01 10:40:26 +01:00
Nick O'Leary
0a5d7c2100 Update add-junction menu to work in more cases 2022-07-01 10:31:50 +01:00
ralphwetzel
4d42f8ec58 Global variable definition in for loop: Fixed 2022-06-30 22:08:58 +02:00
ralphwetzel
81e7b052da Merge branch 'master' of https://github.com/ralphwetzel/node-red 2022-06-30 21:55:25 +02:00
ralphwetzel
be44b7e2c7 Merge branch 'node-red:master' into master 2022-06-30 21:54:18 +02:00
ralphwetzel
d8a781632c Re-order shortcut keymap 2022-06-30 21:52:52 +02:00
ralphwetzel
3726d6fe3b Finetune keyboard shortcut management 2022-06-30 21:52:16 +02:00
ralphwetzel
6090a5b274 Revert disable/enable logic proposed before 2022-06-30 21:51:51 +02:00
Kazuhito Yokoi
d4fdf6be67 Add Japanese translations for v3.0-beta.4 2022-07-01 01:09:06 +09:00
Steve-Mcl
1b6cbe5c23 Ensure importMap is not null when using import UI
fixes #3722
2022-06-30 15:17:49 +01:00
Nick O'Leary
1d130a7857 Add missing entries from beta.4 changelog 2022-06-30 10:14:51 +01:00
Nick O'Leary
f041159aa7 Merge pull request #3720 from node-red/300-b4
Update for 3 beta 4
2022-06-30 09:40:56 +01:00
Nick O'Leary
f438cbf633 Update for 3 beta 4 2022-06-29 21:04:28 +01:00
Nick O'Leary
51684d18cf Merge pull request #3719 from node-red/pr_3642
Allow flows to be stopped and started manually
2022-06-29 20:54:45 +01:00
Nick O'Leary
c13d2ac044 Merge pull request #3692 from bonanitech/use-css-variables
Move all colours to CSS variables
2022-06-29 20:54:25 +01:00
Nick O'Leary
6dd1adda2e Merge pull request #3703 from node-red-hitachi/fix-subflow-credential-input
Fix credential type input item of subflow template
2022-06-29 20:24:24 +01:00
Nick O'Leary
5d0d7391e7 Merge pull request #3709 from node-red/Fix-delay-rate-limit-timing-when-empty
Fix delay rate limit last timing when empty
2022-06-29 20:23:33 +01:00
Nick O'Leary
d37da58e87 Merge pull request #3718 from Steve-Mcl/fix-async-node-type-reg
Add option flag `reimport` to `importNodes`
2022-06-29 20:22:48 +01:00
Nick O'Leary
1839c1972e Update packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js
Co-authored-by: Stephen McLaughlin <44235289+Steve-Mcl@users.noreply.github.com>
2022-06-29 20:21:27 +01:00
Stephen McLaughlin
b7bdcc4e57 Update packages/node_modules/@node-red/editor-client/locales/en-US/editor.json
Remove unused i18n entries (these are safe to remove - were added in the original PR)
2022-06-29 18:37:53 +01:00
Nick O'Leary
b59a3b15f3 Fix flow unit tests 2022-06-29 11:41:19 +01:00
Nick O'Leary
7580f7491a Update flow state tests to match changes in api 2022-06-29 10:45:06 +01:00
Nick O'Leary
f33848e16b Rework start/stop api to use runtime-event notification message 2022-06-29 10:27:44 +01:00
Mauricio Bonani
9b4d3ad6bf Merge branch 'master' into use-css-variables 2022-06-28 16:25:40 -04:00
Mauricio Bonani
7b06d4273a Use the correct variable for alpha values 2022-06-28 16:22:31 -04:00
Nick O'Leary
95f7ea9fc0 Merge pull request #3691 from Dennis14e/patch-1-de
Update german translation
2022-06-28 20:56:50 +01:00
Nick O'Leary
12b64d1906 Merge pull request #3695 from node-red/fix-dynamic-link-call
Ensure link-call cache is updated when link-in is modified
2022-06-28 20:56:33 +01:00
Nick O'Leary
52db4b3321 Merge pull request #3716 from node-red/CSV-fix-n-handling-inside-text-fields
Fix CSV node to handle \n when outputting text fields
2022-06-28 20:55:29 +01:00
Nick O'Leary
388c1b4ce4 Merge pull request #3717 from node-red/tour-help
List welcome tours in help sidebar
2022-06-28 20:54:44 +01:00
Nick O'Leary
b134cdb90d Merge pull request #3715 from node-red/fix-hide-flows-count
Ensure 'hidden flow' count doesn't include subflows
2022-06-28 20:54:29 +01:00
Steve-Mcl
c120dffbf0 Add option flag reimport to importNodes
fixes #3699
2022-06-28 16:22:24 +01:00
Hiroyasu Nishiyama
3578f1b254 remove line break to prevent jshint error 2022-06-28 20:35:39 +09:00
Nick O'Leary
a7e3548f22 List welcome tours in help sidebar under node-red section 2022-06-28 11:54:51 +01:00
Nick O'Leary
272e5380c2 Merge pull request #3706 from hotlong/patch-1
fix chinese translate: 登陆 -> 登录
2022-06-28 11:46:05 +01:00
Dave Conway-Jones
b60fd36c6e Fix CSV node to handle \n when outputting text fields
and add tests
2022-06-28 10:14:12 +01:00
Dennis Neufeld
5301798654 Update german translation based on PR review 2022-06-28 08:06:16 +02:00
Hiroyasu Nishiyama
f7e6d7d143 fix type selector of subflow environment variable 2022-06-28 09:16:30 +09:00
Mauricio Bonani
b9649aed32 Fix typo 2022-06-27 16:59:56 -04:00
Nick O'Leary
4467c0df31 Merge pull request #3714 from kazuhitoyokoi/master-fixdefaulticonbutton
Fix use default button for node icon
2022-06-27 20:36:05 +01:00
Nick O'Leary
7af3acde9e Ensure 'hidden flow' count doesn't include subflows
Fixes #3707
2022-06-27 20:30:14 +01:00
Stephen McLaughlin
68c1e49f62 Delete view_copy.js
Remove file that slipped through the net
2022-06-27 18:12:45 +01:00
Steve-Mcl
1e57190b8c Merge remote-tracking branch 'upstream/master' into stop-start-flows 2022-06-27 18:07:49 +01:00
Steve-Mcl
1b8a4577d5 improve UI, i18n and layout of stop/start feature 2022-06-27 18:07:22 +01:00
Steve-Mcl
51baed4932 default stop/start feature to enabled:false 2022-06-27 18:06:53 +01:00
Steve-Mcl
2f1f587c50 Use HTTP body instead of header for setting flows run state 2022-06-27 18:03:14 +01:00
Kazuhito Yokoi
ab1e38dde8 Fix use default button for node icon 2022-06-27 23:56:24 +09:00
Nick O'Leary
dd0d1e700e Merge pull request #3669 from dschmidt/patch-1
Import default export if node is a transpiled es module
2022-06-27 14:31:43 +01:00
Nick O'Leary
51ebb2579f Merge pull request #3670 from node-red/join-reduce-keep-msg
Join node in reduce mode doesn't keep existing msg properties
2022-06-27 14:29:41 +01:00
Nick O'Leary
d1d3b805f6 Merge pull request #3690 from cow0w/env_evalulating_in_template
Add support for evalulating {{env.<var>}} within a template node
2022-06-27 14:28:17 +01:00
Nick O'Leary
a6e247326b Merge pull request #3698 from bonanitech/fix-select-box-alignment
Fix select boxes vertical alignment
2022-06-27 14:18:34 +01:00
Nick O'Leary
823b7e2989 Merge pull request #3704 from bonanitech/monaco-default-theme
Leave Monaco theme commented out by default
2022-06-27 14:16:49 +01:00
Nick O'Leary
5f40dc37a2 Merge pull request #3708 from Steve-Mcl/fix-undo-drop-still-dirty
Ensure workspace clean after undoing dropped node
2022-06-27 14:12:50 +01:00
Nick O'Leary
5e5c05f0c6 Merge pull request #3710 from Steve-Mcl/fix-config-node-text-underflow
Use solid colour as config node icon background to hide text overflow
2022-06-27 14:11:09 +01:00
Nick O'Leary
ab1340d213 Merge pull request #3711 from Steve-Mcl/quick-add-height
Increase quick-add height to reveal 2 most recent entries
2022-06-27 14:09:38 +01:00
Steve-Mcl
6b6004ee70 Merge remote-tracking branch 'upstream/stop-start-flows' into stop-start-flows 2022-06-27 13:05:39 +01:00
Steve-Mcl
3cef2bb7e0 Merge remote-tracking branch 'upstream/master' into stop-start-flows 2022-06-27 13:03:52 +01:00
Stephen McLaughlin
cc5a0a436c Merge pull request #3702 from node-red/default-monaco
Set default editor to monaco in absence of user preference
2022-06-27 09:43:07 +01:00
Dave Conway-Jones
495a81768d Delay node - add example for simple queue with release 2022-06-26 16:27:11 +01:00
Steve-Mcl
125b37e98f increase quick-add height to reveal 2 most recent
fixes #3568
2022-06-26 12:16:39 +01:00
Steve-Mcl
f8ad75329d use $node-port-background as config node icon background
Makse sense since it contrasts the $node-port-label-color used for icon text
Also, only show pointer if node icon has count
2022-06-26 11:52:55 +01:00
Dave Conway-Jones
cb2efb14f7 Fix delay rate limit last timing when empty 2022-06-26 10:17:16 +01:00
Steve-Mcl
78327716a4 ensure workspace clean after undoing dropped node 2022-06-26 09:08:26 +01:00
庄建国
cd71b3daf3 fix chinese translate: 登陆 -> 登录 2022-06-26 13:02:16 +08:00
Mauricio Bonani
5393fa81b9 Leave Monaco theme commented out by default 2022-06-25 20:27:32 -04:00
Dennis Neufeld
d1efd2137a Add german contextMenu translation 2022-06-25 16:24:28 +02:00
Dennis Neufeld
fce8c3a8a0 Merge commit '1f5588b803c7e2f216f2bfa31df7ac2cfa874480' into patch-1-de 2022-06-25 16:19:07 +02:00
Hiroyasu Nishiyama
4bd71da056 fix credential type input item of subflow template 2022-06-23 16:52:43 +09:00
Nick O'Leary
d2e84925f7 Set default editor to monaco in absence of user preference 2022-06-22 21:43:25 +01:00
ralphwetzel
d81523370e Merge branch 'node-red:master' into master 2022-06-22 19:58:49 +02:00
ralphwetzel
6939546f22 Disable keyboard shortcut mapping when showing Edit[..]Dialog 2022-06-22 19:58:02 +02:00
Mauricio Bonani
2ea10206fa Fix select box alignment 2022-06-21 11:43:02 -04:00
Mauricio Bonani
8aa922c55f Fix indentation 2022-06-21 11:02:56 -04:00
Mauricio Bonani
d66def5530 Add fix from flowforge-nr-theme
https://github.com/flowforge/flowforge-nr-theme/blob/main/common/forge-common.css#L92-L98
2022-06-21 10:56:18 -04:00
Hiroyasu Nishiyama
42ecf54df6 add i18n support adn English and Japanese message 2022-06-21 22:39:22 +09:00
Hiroyasu Nishiyama
10835968fb add access to previous tours 2022-06-21 21:47:57 +09:00
Nick O'Leary
1f5588b803 Merge pull request #3696 from node-red/right-click-menu-fix
Fix clicking on node in workspace to hide context menu
2022-06-21 09:04:55 +01:00
Nick O'Leary
202102ebf7 Fix clicking on node in workspace to hide context menu 2022-06-20 20:51:31 +01:00
Steve-Mcl
9729c89f5d ensure link-call cache is updated when link-in is modified
fixes #3694
depends on node-red-node-test-helper@0.3.0
2022-06-20 18:25:41 +01:00
Nick O'Leary
71714733ad Merge pull request #3688 from kazuhitoyokoi/master-addjpn
Add Japanese translations for v3.0-beta.3
2022-06-20 16:30:12 +01:00
Dennis Neufeld
3fbbfce17c Fix typo in german translation 2022-06-20 13:28:10 +02:00
Kazuhito Yokoi
ad0a08ea0e Add Japanese translations in action list for project feature 2022-06-20 00:44:20 +09:00
Mauricio Bonani
3a2fa4073a Move all colours to CSS variables 2022-06-18 16:05:25 -04:00
Dennis Neufeld
6c2297c365 Update german translation 2022-06-18 19:46:38 +02:00
Kazuhito Yokoi
5e592427e9 Add Japanese translation in action list for junction 2022-06-19 01:56:59 +09:00
Kazuhito Yokoi
643541eebd Remove unnecessary spaces 2022-06-19 01:37:55 +09:00
Kazuhito Yokoi
13885493ac Update Japanese translations in welcome tour 2022-06-19 01:26:48 +09:00
Kazuhito Yokoi
75c9353cbd Fix keys to insert junction 2022-06-19 01:23:28 +09:00
cow0w
01d9affe61 Add support for evalulating {{env.<var>}} within a template node 2022-06-17 22:18:14 +03:00
Kazuhito Yokoi
3ad95bec3c Add Japanese translation for file nodes 2022-06-18 00:57:30 +09:00
Kazuhito Yokoi
418b3ee7d6 Fix Japanese translations to be same as others 2022-06-18 00:56:34 +09:00
Kazuhito Yokoi
0000f2a34d Support i18n in context menu 2022-06-18 00:51:05 +09:00
Nick O'Leary
fc5a5f1b73 Merge pull request #3687 from node-red/space-in-strings
Fix handling of spacebar inside JSON visual editor
2022-06-17 10:05:12 +01:00
Nick O'Leary
226ab406b2 Merge pull request #3686 from node-red/fix-menu-padding
Fix menu padding to handle both icons and submenus
2022-06-17 10:05:01 +01:00
Nick O'Leary
9eaf5d82b6 Merge pull request #3685 from node-red/quick-add-offset
Include scroll offset when positioning quick-add dialog
2022-06-16 23:31:38 +01:00
Nick O'Leary
e3d6d242ac Fix handling of spacebar inside JSON visual editor
Fixes #3682

The treeList keyboard handling was consuming the event - used
to select the item in the list.

The fix here adds a 'selectable' flag on the treeList that can
be used to disabled (=false) the keyboard selection of items.
2022-06-16 23:29:46 +01:00
Nick O'Leary
53184715bc Fix menu padding to handle both icons and submenus
Fixes #3683
2022-06-16 23:18:02 +01:00
Nick O'Leary
1844633ff1 Include scroll offset when positioning quick-add dialog
Fixes #3684
2022-06-16 22:57:23 +01:00
Nick O'Leary
7d7682b34e Merge pull request #3681 from node-red/30-release
3.0.0-beta.3 release
2022-06-16 17:23:01 +01:00
Nick O'Leary
83655a749c Update changelog 2022-06-16 17:01:11 +01:00
Nick O'Leary
b9444e8197 Merge pull request #3679 from node-red/update-deps
Update dependencies
2022-06-16 16:03:37 +01:00
Nick O'Leary
5ff70b2a36 Merge pull request #3680 from node-red/300-tour
Update tour for 3.0-beta.3
2022-06-16 16:03:18 +01:00
Nick O'Leary
4ed559af95 Update changelog and version for 3-beta.3 2022-06-16 15:44:51 +01:00
Nick O'Leary
ce529a9b9f Update module dependencies 2022-06-16 15:39:42 +01:00
Nick O'Leary
31e472145c Merge pull request #3678 from node-red/right-click-menu
Right click menu
2022-06-16 15:38:58 +01:00
Nick O'Leary
1664428429 Update tour for 3.0-beta.3 2022-06-16 15:37:07 +01:00
Nick O'Leary
1780cb9b91 Update dependencies 2022-06-16 14:47:11 +01:00
Nick O'Leary
ad32677263 Fix lint errors in contextMenu 2022-06-16 14:37:48 +01:00
Nick O'Leary
0eba4bdd61 Add right-click context menu to workspace 2022-06-16 13:59:14 +01:00
Nick O'Leary
28238eb5a7 Allow typeSearch to list actions
A proof-of-concept which needs a bit more UI polish, but capturing the
current code for the future. We do not add actions to the list, so the code
is unused.
2022-06-16 13:57:50 +01:00
Nick O'Leary
cce4f6f7f7 Add onpre/postselect, direction opts to menu and make id optional 2022-06-16 13:50:05 +01:00
Nick O'Leary
6bea3dabbb Allow popover position to be set via absolute pos rather than relative 2022-06-16 13:49:25 +01:00
Nick O'Leary
ea46947054 Add RED.actions.getLabel to retrieve action i18n label 2022-06-16 13:48:36 +01:00
Nick O'Leary
22879f8c23 Merge pull request #3677 from Steve-Mcl/file-node-filename-ux
Further simplify file node filename entry UX (v3)
2022-06-16 13:13:43 +01:00
Nick O'Leary
77c4423059 Merge pull request #3676 from Steve-Mcl/nodesdir-feature-parity
Scanning of `nodesdir` to be more aligned (feature wise) with `coreNodeDir` and `userDir`
2022-06-16 13:11:36 +01:00
Steve-Mcl
62a2a4a9f5 Further simplify file node filename entry UX (v3)
fixes #3668
2022-06-16 11:38:19 +01:00
Nick O'Leary
59690328e2 Merge pull request #3674 from node-red-hitachi/fix-cursor-position-function-node
Fix initial cursor position of init/finalize tab of function node
2022-06-16 11:21:49 +01:00
Nick O'Leary
e50ecd613f Merge pull request #3671 from node-red-hitachi/fix-disable-junction
Fix disable junction
2022-06-16 11:20:18 +01:00
Nick O'Leary
d873a6138a Merge pull request #3672 from kazuhitoyokoi/v2.x-addjpn
Add Japanese translations for v2.2.3
2022-06-16 11:17:22 +01:00
Nick O'Leary
8093ae8570 Merge pull request #3643 from node-red/fix-drag-hidden
Reset mouse state when switching tabs
2022-06-16 11:09:29 +01:00
Steve-Mcl
98ebb02763 improve tests for nodeDir
Adds new resources (loose files, non NR pkgs, NR modules, NR Plugins)
Adds new tests
#getNodeFiles - new tests below
  √ Finds nodes and icons only in nodesDir with files, icons and valid node-red packages
  √ Should not find node-red node in nodesDir with files, icons and valid node-red packages
  √ Should not find node-red node in nodesDir when regular package and valid node-red packages
#getModuleFiles - new tests below
  √ gets a nodes module files
  √ Finds only 1 node-red node in nodesDir amongst legacy nodes and regular nodes
  √ Finds a node-red node in nodesDir with a sub dir containing valid node-red package
  √ Finds 2 node-red node and 1 plugin in nodesDir (in root of dir)
  √ Finds 2 node-red node and 1 plugin in nodesDir pointing to a node_modules dir
2022-06-16 11:00:31 +01:00
Steve-Mcl
ba22b07dce align functionality of nodesDir with coreNodesDir and userDir 2022-06-16 10:57:29 +01:00
Hiroyasu Nishiyama
d1312703c5 fix initial cursor position of init/finalize 2022-06-16 14:16:40 +09:00
Kazuhito Yokoi
8d99a42307 Add Japanese translations (Backport #3576 to v2.x) 2022-06-16 00:32:20 +09:00
Hiroyasu Nishiyama
3ab93ecdd4 fix disable junction 2022-06-16 00:00:02 +09:00
Dave Conway-Jones
6c0d6c5425 Join-reduce keep existing msg properties
see https://discourse.nodered.org/t/no-response-object-after-split-join/63919
2022-06-15 10:16:12 +01:00
Dominik Schmidt
326f346936 Import default export if node is a transpiled es module 2022-06-14 22:54:00 +02:00
Stephen McLaughlin
8762d0e164 Merge pull request #3666 from node-red-hitachi/fix-junction-to-subflow-2
Fix uncorrect fix of junction to subflow conversion
2022-06-14 09:34:56 +01:00
Hiroyasu Nishiyama
2b91edeb74 fix uncorrect fix of junction to subflow conversion 2022-06-14 16:49:14 +09:00
Nick O'Leary
6c49d1aa3f Merge pull request #3653 from node-red-hitachi/fix-undo-junction-to-subflow
Fix undoing junction to subflow
2022-06-13 21:09:20 +01:00
Nick O'Leary
f07f086d62 Merge pull request #3652 from node-red-hitachi/fix-junction-to-subflow
Fix conversion of junction to subflow
2022-06-13 21:09:11 +01:00
Nick O'Leary
c28862f8c7 Merge pull request #3650 from node-red-hitachi/fix-export-junction
Fix to include junction to exported nodes
2022-06-13 21:06:33 +01:00
Nick O'Leary
9cfaf567be Merge pull request #3649 from kazuhitoyokoi/master-fixshade4palette
Fix z-index value for shade to cover nodes in palette
2022-06-13 21:04:52 +01:00
Nick O'Leary
53f453bf34 Merge pull request #3647 from node-red-hitachi/fix-subflow-category-name
Fix to extend escaped subflow category characters
2022-06-13 21:04:13 +01:00
Nick O'Leary
a16032a8ed Track mouse release outside workspace so current action completes 2022-06-13 21:01:34 +01:00
Nick O'Leary
8cec0d8fcd Merge pull request #3645 from node-red/fix-esm
Fix ESM module loading in Function node
2022-06-13 08:10:28 -05:00
Hiroyasu Nishiyama
6f6f67829b fix undoing junction to subflow 2022-06-13 14:12:04 +09:00
Hiroyasu Nishiyama
94471b6d07 fix conversion of junction to subflow 2022-06-13 08:47:41 +09:00
Hiroyasu Nishiyama
7eed9c0584 include junction to exported nodes 2022-06-12 10:08:13 +09:00
Kazuhito Yokoi
3e717862a4 Fix z-index value for shade to cover nodes in palette 2022-06-11 20:52:58 +09:00
Hiroyasu Nishiyama
30d88bbe7e extend escaped subflow category characters 2022-06-11 09:50:28 +09:00
Nick O'Leary
551e73adef Merge pull request #3646 from node-red-hitachi/fix-tab-name-sanitize
Fix to sanitize tab name
2022-06-10 06:56:40 -05:00
Hiroyasu Nishiyama
99d32c4758 sanitize tab name 2022-06-10 20:22:09 +09:00
Nick O'Leary
9e52c15829 Merge pull request #3644 from bonanitech/fix-selector-placement
Fix selector placement
2022-06-09 22:14:09 -05:00
Nick O'Leary
71a272f0a6 Fix ESM module loading in Function node
Fixes #3627
2022-06-09 22:11:48 -05:00
Mauricio Bonani
64061c3440 Fix selector placement 2022-06-09 17:44:11 -04:00
Steve-Mcl
1b4f2b9c53 fix formatting (resolve merge conflict) 2022-06-09 22:29:28 +01:00
Stephen McLaughlin
d83516584d Merge branch 'master' into stop-start-flows 2022-06-09 22:29:09 +01:00
Nick O'Leary
3e34d0badb Merge pull request #3622 from kazuhitoyokoi/master-addjpn
Add Japanese translations for v3.0-beta.2
2022-06-09 16:03:43 -05:00
Nick O'Leary
b2e8474df3 Merge pull request #3624 from node-red-hitachi/fix-buffer-parse-error
fix buffer parse error message of evaluateNodeProperty
2022-06-09 16:02:48 -05:00
Nick O'Leary
73ff7e2de4 Merge pull request #3632 from node-red-hitachi/fix-inject-of-JSONata
Fix JSONata evaluation of inject button
2022-06-09 16:00:23 -05:00
Nick O'Leary
b5d8d34718 Merge pull request #3633 from node-red-hitachi/fix-new-folder-save-to-library
Fix new folder menu of save to library dialog
2022-06-09 15:59:34 -05:00
Nick O'Leary
ac44d22cee Merge pull request #3638 from node-red-hitachi/fix-palette-node-layer
Fix layer of palette node
2022-06-09 15:55:46 -05:00
Nick O'Leary
6e8fa12172 Merge pull request #3637 from node-red-hitachi/fix-node-placement
Fix to place a node dragged from palette within the workspace
2022-06-09 15:54:32 -05:00
Nick O'Leary
deb9c4ecc0 Reset mouse state when switching tabs
Fixes #3639
2022-06-09 15:47:16 -05:00
Steve-Mcl
d4e6136b09 re-enable tests i had temporarily disabled 2022-06-09 15:27:50 +01:00
Steve-Mcl
68331fc40c implement flows runtime stop/start API and UI 2022-06-08 21:56:17 +01:00
Hiroyasu Nishiyama
3046798ec5 fix layer of palette node 2022-06-08 14:50:14 +09:00
Hiroyasu Nishiyama
c4332658ba place node dragged from palette within workspace 2022-06-08 09:36:32 +09:00
Hiroyasu Nishiyama
50e3da0849 fix new folder menu of save to library dialog 2022-05-28 20:16:53 +09:00
Stephen McLaughlin
62cd3b2061 Merge pull request #3630 from Steve-Mcl/fix-tcp-sockets-crash
Dont delete TCP socket twice
2022-05-27 07:37:28 +01:00
Hiroyasu Nishiyama
7e6dfa7b92 update test for inject node 2022-05-27 12:11:53 +09:00
Hiroyasu Nishiyama
7fbebbf361 fix JSONata evaluation of inject button 2022-05-27 11:44:56 +09:00
Kazuhito Yokoi
121372802f Use built-in type in typedInput 2022-05-26 22:50:52 +09:00
Nick O'Leary
7924907384 Merge pull request #3626 from node-red/noproxy-not-defined
MQTT Node: define noproxy variable
2022-05-26 10:43:39 +01:00
Stephen McLaughlin
51d429f9ae Dont delete TCP socket twice 2022-05-26 10:18:34 +01:00
Stephen McLaughlin
267aebb9cb Merge pull request #3628 from bonanitech/patch-1
Fix typo in CSS
2022-05-25 16:44:26 +01:00
Mauricio Bonani
3f9ebb588e Fix typo 2022-05-25 11:15:29 -04:00
Kazuhito Yokoi
f424f07e54 Fix typos in message catalog 2022-05-25 22:56:58 +09:00
Kazuhito Yokoi
e5a21a3261 Merge branch 'node-red:master' into master-addjpn 2022-05-25 19:07:57 +09:00
Stephen McLaughlin
6f0de7c80e define noproxy variable 2022-05-24 20:43:29 +01:00
Stephen McLaughlin
3ace7eeafd Merge pull request #3623 from node-red-hitachi/i18n-debug-sidebar-node-label
i18n debug sidebar node label
2022-05-24 07:03:14 +01:00
Stephen McLaughlin
eb9f15e4e4 Merge pull request #3615 from bonanitech/ace-editor-gutter-color
Use the correct variable for the gutter text color
2022-05-23 17:33:51 +01:00
Hiroyasu Nishiyama
bc80569fe9 fix buffer parse error message of evaluateNodeProperty 2022-05-22 17:59:27 +09:00
Hiroyasu Nishiyama
a147458120 i18n debug sidebar node label 2022-05-22 16:28:11 +09:00
Kazuhito Yokoi
6182e22d18 Add string label to typedInput in file nodes 2022-05-22 11:56:21 +09:00
Kazuhito Yokoi
dda84c5cd5 Fix indents in other code except message catalog 2022-05-22 11:18:40 +09:00
Kazuhito Yokoi
6c15fb6978 Fix indents in message catalog 2022-05-22 10:51:35 +09:00
Kazuhito Yokoi
b17b68c44b Add Japanese translations for v3.0-beta.2 2022-05-22 10:37:22 +09:00
Mauricio Bonani
afdb15dc58 Use the correct variable for the gutter text color 2022-05-18 10:28:36 -04:00
Nick O'Leary
98b4b0dce0 Merge pull request #3612 from node-red/3beta2
Update for 3.0.0-beta.2
2022-05-16 11:47:07 +01:00
Nick O'Leary
70f26e0bea Update for 3.0.0-beta.2 2022-05-16 11:10:31 +01:00
Nick O'Leary
b6ad396a6c Merge pull request #3611 from node-red/fix-ace-worker-opts
Ensure ACE worker options are set
2022-05-16 10:59:59 +01:00
Nick O'Leary
e44bb57b0e Merge pull request #3609 from Steve-Mcl/slicing-button
Change slicing / slice-junction operations over to mouse button 0 (Left Mouse Button)
2022-05-16 09:59:41 +01:00
Stephen McLaughlin
5c10b16b65 Ensure ACE worker options are set
fixes #3610
2022-05-15 13:19:28 +01:00
Steve-Mcl
7ec1d42808 Change slicing op to mouse button 0
fixes #3582
2022-05-13 16:43:27 +01:00
Stephen McLaughlin
03e9e89558 Merge pull request #3608 from node-red/filter-virtual-on-slice
Do not slice-junction link node wires
2022-05-13 11:13:14 +01:00
Nick O'Leary
3057035dec Do not slice-junction link node wires 2022-05-12 14:57:16 +01:00
Nick O'Leary
4af72cc7ba Merge pull request #3607 from node-red/junction-rework
Rework Junctions to be more node like in their event handling
2022-05-12 10:12:38 +01:00
Nick O'Leary
f6aee81651 Hide junction ports whilst dragging nodes 2022-05-12 10:02:35 +01:00
Nick O'Leary
a22f569ca0 Rework Junctions to be more node like in their event handling 2022-05-11 23:13:12 +01:00
Nick O'Leary
8043f5d865 Merge pull request #3606 from node-red/dev
Merge minor dev branch fixes and "Search flow:active" V3 item into master
2022-05-10 11:19:03 +01:00
Stephen McLaughlin
2ef50ab71f Merge pull request #3604 from node-red/fix-many-to-one-junction-slice
Handle many-to-one slicing of wires
2022-05-10 08:09:00 +01:00
Stephen McLaughlin
192a4f5e7f Merge pull request #3605 from node-red/fix-ungroup-history
Remove duplicate history add of ungroup event
2022-05-10 08:08:45 +01:00
Stephen McLaughlin
1af56a7f00 Merge pull request #3590 from Steve-Mcl/search-current-flow
Add ability to search in current flow
2022-05-10 08:08:28 +01:00
Nick O'Leary
d2fab7fddd Remove duplicate history add of ungroup event
Fixes #3581
2022-05-09 20:51:17 +01:00
Nick O'Leary
1818b0281d Handle many-to-one slicing of wires 2022-05-09 20:39:34 +01:00
Stephen McLaughlin
09973ba8cf Update packages/node_modules/@node-red/editor-client/src/js/ui/search.js
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-05-09 17:41:41 +01:00
Stephen McLaughlin
dd3174c40f Update packages/node_modules/@node-red/editor-client/src/js/ui/search.js
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-05-09 17:41:33 +01:00
Stephen McLaughlin
f0293b8f52 Update packages/node_modules/@node-red/editor-client/locales/en-US/editor.json
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-05-09 17:41:24 +01:00
Nick O'Leary
d549a9ad92 Merge pull request #3603 from node-red-hitachi/fix-select-width-of-switch-node-rule
use text width instead of number of characters for deciding select fi…
2022-05-09 17:18:49 +01:00
Stephen McLaughlin
0385c72a8f Merge pull request #3594 from PhilDay-CT/issue-3593
Handle removal of event handlers to allow mqtt client.end() to work
2022-05-09 16:50:48 +01:00
Stephen McLaughlin
e223b20cbd Remove unnecessary call to clientRemoveListeners
Also, merge the non JSDOC comment into the JSDOC comment
2022-05-09 16:37:25 +01:00
Phil Day
a0f7e92e40 call client.end with force=true on timeout 2022-05-09 16:29:39 +01:00
Phil Day
c87ff3ca26 Update packages/node_modules/@node-red/nodes/core/network/10-mqtt.js
Co-authored-by: Stephen McLaughlin <44235289+Steve-Mcl@users.noreply.github.com>
2022-05-09 16:22:50 +01:00
Phil Day
82672a825d Update packages/node_modules/@node-red/nodes/core/network/10-mqtt.js
Co-authored-by: Stephen McLaughlin <44235289+Steve-Mcl@users.noreply.github.com>
2022-05-09 16:20:44 +01:00
Phil Day
98d524e82d Update packages/node_modules/@node-red/nodes/core/network/10-mqtt.js
Co-authored-by: Stephen McLaughlin <44235289+Steve-Mcl@users.noreply.github.com>
2022-05-09 16:20:27 +01:00
Phil Day
3d3090a8f2 Updated to cover the removal of individual event handlers 2022-05-09 15:39:12 +01:00
Steve-Mcl
5561e89201 remove unused var 2022-05-08 14:48:57 +01:00
Stephen McLaughlin
9ed96de237 Merge pull request #3602 from node-red-hitachi/i18n-switch-rule-selector
I18n switch rule selector
2022-05-08 14:28:36 +01:00
Steve-Mcl
0f2420576a improve flashing of node
sometimes node highlight get stuck
2022-05-08 14:24:30 +01:00
Steve-Mcl
d1b74675d9 change search term is:thisflow to flow:active
this also permits flow:<flow-id>
2022-05-08 14:23:47 +01:00
Hiroyasu Nishiyama
abb81a0bac use text width instead of number of characters for deciding select field width of switch node rule 2022-05-08 12:32:07 +09:00
Hiroyasu Nishiyama
05eb055b8c add Japanese translation of switch rules 2022-05-08 08:59:07 +09:00
Hiroyasu Nishiyama
e8ddd6d16d i18n switch group label & add Japanese message 2022-05-08 08:44:35 +09:00
Stephen McLaughlin
8706998c8c Merge pull request #3600 from node-red-hitachi/fix-link-call-info-jp
update Japanese info of link call node reflecting update of English info
2022-05-07 14:28:05 +01:00
Hiroyasu Nishiyama
06e0869767 update Japanese info of link call node reflecting update of English info 2022-05-07 22:09:54 +09:00
Nick O'Leary
7841fc6d3e Merge pull request #3580 from bonanitech/typedinput-label
Fix typedInput label not visible on themes
2022-05-06 19:25:54 +01:00
Nick O'Leary
1f7311deeb Merge pull request #3597 from node-red-hitachi/fix-link-call-info
update link-call node info according to current behavior
2022-05-06 19:25:10 +01:00
Hiroyasu Nishiyama
07a9e69e7b update link-call node info according to current behavior 2022-05-06 23:38:58 +09:00
Phil Day
9bc8adc715 Revent change of grunt version 2022-05-06 15:34:25 +01:00
Phil Day
7845ebffc5 Track which event handlers we add to the mqtt client so we can removed them cleanly 2022-05-06 15:29:42 +01:00
Nick O'Leary
b985de6df2 Merge pull request #3595 from Steve-Mcl/fix-project-switching
Fix project switching when junctions are present
2022-05-05 20:48:54 +01:00
Steve-Mcl
11f6491889 fix project switching when junctions are present
fixes #3588
2022-05-05 16:56:28 +01:00
Phil Day
b2ec040a8d Add Force parameter mqtt client.end() when called in disconnect 2022-05-05 16:12:28 +01:00
Stephen McLaughlin
424a53da4e Merge pull request #3576 from kazuhitoyokoi/master-addjpn
Add Japanese translations for v3.0-beta.1
2022-05-05 15:16:36 +01:00
Stephen McLaughlin
963c289af7 Merge pull request #3592 from kazuhitoyokoi/master-fixiconpath
Fix image paths where `red/image/typedInput/XXXX.png` should be `red/image/typedInput/XXXX.svg`
2022-05-05 14:57:49 +01:00
Kazuhito Yokoi
c5af71e0a2 Change icon path from png to svg 2022-05-05 20:38:55 +09:00
Nick O'Leary
329008bf6d Merge pull request #3591 from Steve-Mcl/fix-back-link-to-junc
Fix junction: when wiring from a regular nodes INPUT, backwards to a junction
2022-05-05 10:27:48 +01:00
Steve-Mcl
531dbc5f83 Fix junction: ensure sourcePort is not undefined
fixes #3587
2022-05-05 09:37:32 +01:00
Stephen McLaughlin
851a925956 Merge pull request #3585 from Steve-Mcl/fix-flow-prop-tab
fix error initialising flow tab editor
2022-05-05 08:25:15 +01:00
Stephen McLaughlin
5d4e01eea6 Merge pull request #3589 from node-red-hitachi/fix-system-info
fix error on system-info action
2022-05-05 08:24:24 +01:00
Stephen McLaughlin
7484dc5b4c Merge pull request #3584 from Steve-Mcl/fix-search-err
Fix browser console error Uncaught TypeError when searching certain terms
2022-05-05 08:14:26 +01:00
Stephen McLaughlin
e04f5cb277 Merge pull request #3575 from ralphwetzel/patch-1
remove debugging remnants
2022-05-05 08:10:38 +01:00
Hiroyasu Nishiyama
c513cff843 fix error on system-info action 2022-05-05 10:10:52 +09:00
ralphwetzel
a4603a4396 Update 60-link.html
Remove development debug message.
Fixes #3574 ... courtesy of @Steve-Mcl
2022-05-04 20:15:24 +02:00
Kazuhito Yokoi
bc5eafce66 Update translations in file and http request nodes 2022-05-05 01:28:42 +09:00
Kazuhito Yokoi
5fb811eb4c Change icon path from png to svg in typedInput 2022-05-05 01:20:41 +09:00
Kazuhito Yokoi
84a3884ffc Fix i18n in typedInput of header area 2022-05-04 23:54:23 +09:00
Kazuhito Yokoi
50ae29a08c Add Japanese translations for v3.0-beta.1 2022-05-04 23:29:40 +09:00
Steve-Mcl
bf8bfa582a fix error initialising flow tab editor
fixes #3577
2022-05-04 15:16:35 +01:00
Steve-Mcl
492d1ef30e declare undeclared loop var 2022-05-04 15:10:02 +01:00
Steve-Mcl
bd19c203e1 Prevent error when uses search term is used
fixes #3578
2022-05-04 15:08:52 +01:00
Steve-Mcl
1141f9de86 Add ability to search in current flow
fixes #3419
2022-05-04 14:42:47 +01:00
Mauricio Bonani
7955a17a17 Fix typedInput label not visible 2022-05-04 06:37:52 -04:00
Kazuhito Yokoi
58085e39d1 Add Japanese translations for welcome tour in 3.0-beta.1 2022-05-04 11:39:34 +09:00
ralphwetzel
bbc32c4cd0 Update 21-debug.html
Tidy up a leftover development debug message ... with a smile!
2022-05-03 22:17:00 +02:00
Nick O'Leary
3841039728 Update gen publish script for 3.x 2022-05-03 14:29:25 +01:00
Nick O'Leary
f04d954882 Drop node 12 from test runs 2022-05-03 14:25:27 +01:00
Nick O'Leary
39602ff5f2 Update changelog 2022-05-03 13:58:02 +01:00
Nick O'Leary
55ecc7a92c Merge pull request #3573 from node-red/3-0
Update changelog and tourguide for 3.0
2022-05-03 13:41:06 +01:00
Nick O'Leary
1148960d43 Update changelog and tour guide 2022-05-03 13:40:27 +01:00
Nick O'Leary
415107fbf0 Bump engines to 14 2022-05-03 13:40:02 +01:00
Nick O'Leary
437cc20198 Add moment dependency to resolve vuln in moment-timezone 2022-05-03 13:39:30 +01:00
Nick O'Leary
32f78a99fd Update dependencies 2022-05-03 09:48:13 +01:00
Nick O'Leary
65c7855afd Merge pull request #3571 from node-red/master
Pull master into dev
2022-05-03 09:36:32 +01:00
Stephen McLaughlin
7f68e341da Merge branch 'dev' into master 2022-05-03 09:35:32 +01:00
Nick O'Leary
a2f750ed1a Merge pull request #3567 from Steve-Mcl/notification-buttons
Add "search for" buttons to notifications
2022-05-03 09:23:21 +01:00
Nick O'Leary
b74a42cdf5 Merge pull request #3569 from node-red/watch-fix
Fix Watch node handling of recursive directories
2022-05-03 09:22:31 +01:00
Nick O'Leary
95b35be541 Merge pull request #3570 from node-red/validate-tooltip-fix
Ensure node validation tooltip is closed when field becomes valid
2022-05-03 09:22:24 +01:00
Nick O'Leary
ea747a3d58 Merge pull request #3563 from Steve-Mcl/mqtt-topic-val
Add client and Runtime MQTT topic validation and fix subsequent connection lockup (that arises due to bad birth/will topic)
2022-05-03 09:22:11 +01:00
Stephen McLaughlin
9b644e3c47 Use new validation option to return better label
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-05-02 21:28:04 +01:00
Steve-Mcl
3f776397d1 close parent notification on "search for..." click 2022-05-02 21:24:46 +01:00
Steve-Mcl
1ec75035ba declare missing var notification 2022-05-02 21:23:36 +01:00
Steve-Mcl
97b7b7b968 ensure space after search terms 2022-05-02 21:22:45 +01:00
Steve-Mcl
135427dcc8 fix i18n for unknownNodesButton 2022-05-02 21:21:09 +01:00
Nick O'Leary
a2de514c05 Merge pull request #3540 from hardillb/no-home-dir
Don't start if user has no home directory
2022-05-02 21:12:57 +01:00
Nick O'Leary
f1bada7fd8 Ensure node validation tooltip is closed when field becomes valid 2022-05-02 20:56:01 +01:00
Nick O'Leary
ea5d25c794 Merge pull request #3564 from bonanitech/config-nodes-colors
Don't let themes change node config colors
2022-05-02 20:19:40 +01:00
Nick O'Leary
193e420eb3 Fix Watch node handling of recursive directories
Fixes #3566
2022-05-02 20:11:04 +01:00
Steve-Mcl
8a972ee543 Add "search for" buttons to notifications 2022-05-01 16:48:04 +01:00
Mauricio Bonani
b51eb7326f Change node config SASS variables 2022-04-29 18:40:34 -04:00
Steve-Mcl
be3b5b7fe2 MQTT topic validation and lockup fix
closes #3557
2022-04-29 19:56:37 +01:00
Stephen McLaughlin
3a7a606f6a Merge pull request #3562 from Steve-Mcl/mqttv5-userprops
MQTT Node - save and restore v5 config user props
2022-04-29 12:09:38 +01:00
Stephen McLaughlin
294fc6b62f Ensure userProps makes it through to runtime 2022-04-29 11:25:19 +01:00
Stephen McLaughlin
662a44fccf save and restore v5 config user props 2022-04-29 10:44:19 +01:00
Nick O'Leary
b0a5d4fb6f Merge pull request #3560 from bonanitech/border-radius-gap
Fix gap between typedInput containers borders
2022-04-28 16:32:41 +01:00
Stephen McLaughlin
4fb8292618 Merge pull request #3559 from node-red/watch-node-update
Update Watch node to use node-watch module
2022-04-28 14:32:39 +01:00
Nick O'Leary
539e5899e3 Bump version for 3.0.0-beta.1 2022-04-28 14:30:45 +01:00
Nick O'Leary
bee9e20827 Update Watch node to use node-watch module 2022-04-28 14:07:13 +01:00
Nick O'Leary
12f527a120 Merge pull request #3558 from node-red/deps-update
Dependencies update
2022-04-28 11:55:32 +01:00
Nick O'Leary
bd626899df Fix linting error from merge 2022-04-28 11:17:32 +01:00
Nick O'Leary
54d036715f Bump node-red-admin to 3.0 2022-04-28 11:15:17 +01:00
Nick O'Leary
54c87f81a6 Update dependencies 2022-04-28 11:04:06 +01:00
Nick O'Leary
5de078dc61 Merge pull request #3511 from Steve-Mcl/diagnostics
Diagnostics
2022-04-27 22:30:24 +01:00
Nick O'Leary
ff57de0753 Merge branch 'dev' into diagnostics 2022-04-27 22:30:13 +01:00
Nick O'Leary
9565aee3c5 Merge pull request #3533 from Steve-Mcl/filename-typedinput
Feature: Change basic Filename field to a typedInput
2022-04-27 22:28:12 +01:00
Steve-Mcl
f63da0c58b Default to msg.filename as per v2 condition 2022-04-27 20:44:41 +01:00
Mauricio Bonani
205dbc1a25 Increase typedInput container border-radius
Fixes #3548
2022-04-27 15:00:29 -04:00
Stephen McLaughlin
12c309fd50 Merge pull request #3556 from Steve-Mcl/fixlintsm
fix linting errors introduced in #3553
2022-04-27 17:13:38 +01:00
Stephen McLaughlin
f04e3d5338 fix linting errors introduced in #3553 2022-04-27 15:31:14 +01:00
Nick O'Leary
dc03d0b300 Merge pull request #3553 from Steve-Mcl/code-edit-ux-improvements
Code editor ux improvements around remembering state of each code editor in a flow
2022-04-27 14:35:43 +01:00
Steve-Mcl
3e16cc4912 Add i18n for json editor title when readonly 2022-04-27 12:52:41 +01:00
Steve-Mcl
fcdf252f03 rename jsonButtons to toolbarButtons 2022-04-27 12:52:01 +01:00
Steve-Mcl
b23fea9cb5 group json editor toolbar buttons 2022-04-27 12:50:45 +01:00
Stephen McLaughlin
e714ff35c4 Merge branch 'dev' into diagnostics 2022-04-27 12:08:32 +01:00
Steve-Mcl
4054d0eca7 adjust settings comments to more like existing std 2022-04-27 12:05:51 +01:00
Steve-Mcl
367f9b6232 i18n 2022-04-27 12:05:20 +01:00
Steve-Mcl
194eb4e266 code editor ux improvements
* Save and restore editor selection(s), cursor(s), scroll pos etc
* Improve focusing of editor at appropriate times
* Works with both ace and monaco
* Backwards compatible and (almost) fully functional with existing nodes
2022-04-27 11:23:13 +01:00
Stephen McLaughlin
f717eb7388 Merge pull request #3552 from Steve-Mcl/fix-mqtt-status
Fix incorrect MQTT status
2022-04-26 23:57:55 +01:00
Nick O'Leary
e8f20285af Merge pull request #3551 from node-red/pr_3544
Add message count option to Debug status
2022-04-26 16:25:01 +01:00
Nick O'Leary
0fec9c7c55 Apply i18n messages to diagnostics dialog 2022-04-26 16:24:13 +01:00
Nick O'Leary
f8d0ed7ca6 Merge pull request #3515 from bonanitech/svg-icons
Make it easier to apply themes on SVG icons
2022-04-26 16:22:47 +01:00
Stephen McLaughlin
020eaef5ba Fix incorrect MQTT status
fixes #3550
2022-04-26 16:12:54 +01:00
Nick O'Leary
973b31521e Tidy up debug message status count 2022-04-26 16:04:09 +01:00
Stephen McLaughlin
59e513f130 Remove pointless placeholders 2022-04-26 15:30:20 +01:00
Nick O'Leary
62e730b621 Merge pull request #3549 from node-red/pr_3438
Add support of property validation message
2022-04-26 13:53:50 +01:00
Nick O'Leary
f4bb62adbc Merge branch 'dev' into pr_3438 2022-04-26 13:53:35 +01:00
Nick O'Leary
48a528a4b8 Ensure property validation is backwards compatible 2022-04-26 13:45:14 +01:00
Nick O'Leary
5aba66ea78 Merge branch 'master' into dev 2022-04-26 09:14:51 +01:00
Nick O'Leary
c5efdf5ae3 Merge pull request #3547 from node-red/fix-wire-history
Fix recording removed links in edit history
2022-04-26 09:14:33 +01:00
Nick O'Leary
15958cd4a3 Fix recording removed links in edit history
Fixes #3546
2022-04-26 09:13:38 +01:00
Nick O'Leary
edcdc6c97c Update packages/node_modules/node-red/lib/red.js 2022-04-25 20:56:03 +01:00
Stephen McLaughlin
143b807e9b Merge pull request #3538 from node-red/fix-name-generator
Fix name auto-generator to leave blank names alone on copy/paste
2022-04-25 20:33:55 +01:00
Nick O'Leary
861379c227 Merge pull request #3541 from node-red/fix-import-node-library
Fix importing external module from node-red module
2022-04-25 20:33:25 +01:00
Nick O'Leary
2fb9f62d0b Merge branch 'dev' into fix-name-generator 2022-04-25 20:31:33 +01:00
Nick O'Leary
84e02fc144 Remove name generation from link call and add to Function 2022-04-25 20:30:05 +01:00
Nick O'Leary
57ac90f837 Merge pull request #3542 from Steve-Mcl/httpstatic-improvements
Add support for multiple static paths with optional static root
2022-04-25 20:21:54 +01:00
Nick O'Leary
10a45ece76 Merge pull request #3543 from Steve-Mcl/monaco-default
Set monaco as default code editor as of v3.x
2022-04-25 20:06:50 +01:00
Nick O'Leary
c88a177cb2 Merge pull request #3530 from Steve-Mcl/mqtt-payload-auto-parsing
MQTT payload auto parsing improvements
2022-04-25 11:40:59 +01:00
Rafael Muynarsk
a63dfc4650 Added condition that.statusType === "counter" in the debug.html file 2022-04-24 17:13:53 -03:00
Rafael Muynarsk
8924ac2783 implementing message count on the debug node 2022-04-23 20:18:51 -03:00
Steve-Mcl
4fffa2d0ba restore "input" help info for msg.filename 2022-04-23 11:23:44 +01:00
Steve-Mcl
856d2ab266 remove unecessary ${ENV_VAR} test 2022-04-23 11:20:21 +01:00
Steve-Mcl
750d2c76f5 set monaco as default from v3 2022-04-23 10:04:09 +01:00
Steve-Mcl
47157049c0 remove unused comment from settings file 2022-04-22 17:39:19 +01:00
Steve-Mcl
22000f10df Add support for multiple static paths with root
closes #3510
2022-04-22 17:06:40 +01:00
Nick O'Leary
d802ce1484 Merge pull request #3460 from ArFe/feature-add-store-external-token-when-authenticate
Feature add: Store external token when authenticate if provided
2022-04-22 09:51:20 +01:00
Steve-Mcl
4b10b9ffc3 update tests 2022-04-21 21:32:24 +01:00
Steve-Mcl
552408f488 Make new Auto Output mode optional
- adds entry to output data type
- adds depreciation tip
2022-04-21 21:20:41 +01:00
Nick O'Leary
4884938036 Merge branch 'master' into dev 2022-04-21 16:05:54 +01:00
Ben Hardill
cdcc8cc59a Update packages/node_modules/node-red/red.js
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-04-21 15:47:40 +01:00
Nick O'Leary
f7bd600715 Fix importing external module from node-red module 2022-04-21 15:06:08 +01:00
Ben Hardill
0014fec63f Remove test that exits if no userDir defined
With the storage plugins it is possible to not need a userDir, just a
settings.js
2022-04-21 13:52:38 +01:00
Ben Hardill
812efde342 Also check if there is a useDir defined 2022-04-21 12:00:10 +01:00
Ben Hardill
889f0e1569 Don't start if user has no home directory
If the user doesn't have a defined home dir (env var `HOME`,
`USERPROFILE` or `HOMEPATH`) and the `userDir` is not passed on the
command line then we shouldn't start as we don't know where to copy the
default `settings.js` file to or where to store flows

fixes #3539
2022-04-21 11:40:12 +01:00
Nick O'Leary
3a26c5cd65 Merge pull request #3498 from sammachin/sammachin_credentials
Error on invalid encrypted credentials
2022-04-21 10:59:43 +01:00
Nick O'Leary
12a25c37aa Merge branch 'master' into dev 2022-04-20 10:56:55 +01:00
Nick O'Leary
4706e20a1d Merge pull request #3526 from node-red-hitachi/fix-status-reference-in-debug-node
fix reference error of msg.status in debug node
2022-04-20 10:56:25 +01:00
Nick O'Leary
14c23051ee Merge pull request #3388 from mw75/strategy_in_verify
OAuth/OpenID logout with Keycloak - Forum 57492
2022-04-20 10:24:58 +01:00
Nick O'Leary
330ddfa3ad Merge pull request #3528 from Steve-Mcl/link-list-in-subflow
Display link targets of nodes in a regular flow, for Link Call nodes inside a subflow
2022-04-20 09:47:35 +01:00
Nick O'Leary
a1e9a14ef3 Merge pull request #3465 from node-red/tcp-node-better-split
TCP node better split
2022-04-20 09:34:36 +01:00
Nick O'Leary
958f57085f Merge branch 'dev' into tcp-node-better-split 2022-04-20 09:34:16 +01:00
Nick O'Leary
646a786b75 Merge pull request #3519 from node-red/auto-login
Allow adminAuth to auto-login users when using passport strategy
2022-04-20 09:30:58 +01:00
Nick O'Leary
c8516bc5f4 Merge pull request #3522 from Steve-Mcl/monaco-0-33-0
Update Monaco to V0.33.0
2022-04-20 09:30:30 +01:00
Nick O'Leary
58e87b3ddf Merge pull request #3536 from bonanitech/unused-sass-vars
Remove unused SASS vars
2022-04-20 09:30:13 +01:00
Nick O'Leary
ea0abb70a2 Merge pull request #3537 from bonanitech/jquery-borders
Add custom style for jQuery widgets borders
2022-04-20 09:29:52 +01:00
Nick O'Leary
908f9562f6 Fix name auto-generator to leave blank names alone on copy/paste 2022-04-19 19:17:41 +01:00
Steve-Mcl
8131d9a640 remove theme 2022-04-19 15:28:11 +01:00
Stephen McLaughlin
e092f41074 Merge #3531 websocket status improvements
call done after ws disconnects
2022-04-19 14:40:59 +01:00
Mauricio Bonani
79a90dc476 Add custom style for jQuery widgets borders
Fixes #3518
2022-04-19 08:53:39 -04:00
Mauricio Bonani
25962dbf39 Remove unused SASS vars
Fixes #3534
2022-04-19 08:00:01 -04:00
Steve-Mcl
8df53e441d remove unused vars 2022-04-19 10:42:00 +01:00
Stephen McLaughlin
6f89efa40b remove unused if block
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-04-19 10:30:08 +01:00
Stephen McLaughlin
d6a1b4e71f Merge pull request #3535 from node-red-hitachi/fix-unknown-config-error
fix out of scope reference of `hasUnusedConfig` variable
2022-04-18 08:52:34 +01:00
Hiroyasu Nishiyama
a2c0e53f87 fix out of scope reference of hasUnusedConfig variable 2022-04-18 08:36:19 +09:00
Steve-Mcl
013af7619e add tests
- fix 2 issues found when developing tests :)
2022-04-16 17:13:54 +01:00
Steve-Mcl
aa302ecc32 Ensure filename is at least an empty string! 2022-04-16 14:42:03 +01:00
Steve-Mcl
99b049fe2d final updates to file node filename typedInput
- ensure node settings are auto updated to correct typedInput type/value
- improve label
- ensure str and env are considered "static" (keep stream open)
2022-04-16 14:25:37 +01:00
Steve-Mcl
dbdd1b8671 Merge branch 'mqtt-payload-auto-parsing' of https://github.com/Steve-Mcl/node-red into mqtt-payload-auto-parsing 2022-04-15 18:22:39 +01:00
Steve-Mcl
8ba6a7436e Add tests for MQTT v5 auto parsing hints 2022-04-15 18:21:36 +01:00
Steve-Mcl
6e35a9f682 use typedInput for filename on file nodes 2022-04-14 23:55:57 +01:00
Stephen McLaughlin
78f456911a auto mode to auto parse string to JS Object 2022-04-14 22:47:18 +01:00
Steve-Mcl
8f5d3dc49c Use v5 properties to aid auto parsing payload
- closes #3421
- fixes bug in `function setBoolProp()`
2022-04-14 22:47:18 +01:00
Steve-Mcl
97678577fb call done after ws disconnects
fixes #3527
2022-04-14 22:07:52 +01:00
Stephen McLaughlin
ce67737cc9 auto mode to auto parse string to JS Object 2022-04-14 16:39:35 +01:00
Steve-Mcl
b9919b0a9c Show link targets for link call in subflow
fixes #3248
2022-04-12 22:11:34 +01:00
Hiroyasu Nishiyama
226f45d8d5 fix reference error of msg.status in debug node 2022-04-12 11:33:02 +09:00
Hiroyasu Nishiyama
accbf6ecfc update validator arguments not to use optional object 2022-04-12 08:09:46 +09:00
Stephen McLaughlin
0aa80d82d9 Merge pull request #3524 from Steve-Mcl/hadnle-status-typo
correct "non string" check parenthesis
2022-04-11 16:50:55 +01:00
Hiroyasu Nishiyama
ace5f81a17 fix validation function argument check & eliminate option of standard validation function 2022-04-11 23:06:26 +09:00
Steve-Mcl
21a0b33645 correct "non string" check parenthesis
fixes #3493
2022-04-11 13:57:26 +01:00
Steve-Mcl
8b991e11a2 undo regression on types
- updates made directly in node-red were not in node-red/nr-monaco-build
2022-04-10 10:40:49 +01:00
Steve-Mcl
8f013776df fix model markers
- monaco depreciated model.getModeId() replaced with model._languageId
2022-04-10 09:13:41 +01:00
Steve-Mcl
c30aedd309 Update monaco to v0.33.0 2022-04-10 01:18:16 +01:00
Steve-Mcl
39f303fcd6 add unit tests 2022-04-06 15:11:37 +01:00
Steve-Mcl
76c0e140cf fix up report - remove duplicate entries 2022-04-06 15:11:28 +01:00
Steve-Mcl
ccb3c991a6 improve rejection message 2022-04-06 15:11:03 +01:00
Stephen McLaughlin
a7932da207 Merge pull request #3488 from Steve-Mcl/httpreq-headers-ui
Add UI for Http Request node headers
2022-04-06 08:35:32 +01:00
Stephen McLaughlin
5fda20c330 Improve built in help
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-04-06 07:01:01 +01:00
Nick O'Leary
1be6e4565f Merge pull request #3521 from Steve-Mcl/autocomplete-improvements
autocomplete improvements...
2022-04-05 23:44:13 +01:00
Nick O'Leary
e606d0b1de Merge pull request #3385 from node-red/allow-inject-on-start
let inject optionally fire at start in only at time mode.
2022-04-05 23:34:20 +01:00
Nick O'Leary
b4bcb7ace2 Merge pull request #3503 from node-red/debug-tooltip
Add a tooltip to debug sidebar messages to reveal full path to node
2022-04-05 23:33:14 +01:00
Nick O'Leary
a63fee1223 Merge pull request #3507 from Steve-Mcl/fix-down-arrow-in-search
Fix down arrow triggering menu in search box
2022-04-05 23:32:59 +01:00
Nick O'Leary
ae76ff0aaf Merge pull request #3516 from Steve-Mcl/status-i18n
Ensure i18n of scoped package name
2022-04-05 23:32:08 +01:00
Nick O'Leary
bba819ba84 Merge pull request #3517 from Steve-Mcl/no-deploy-when-shaded
Prevent shortcut deploy when deploy button shaded
2022-04-05 23:31:45 +01:00
Nick O'Leary
d0d0da6cb7 Merge pull request #3512 from node-red-hitachi/dev-addjpn
Add Japanese translations for v3.0
2022-04-05 23:30:49 +01:00
Steve-Mcl
475113838a autocomplete improvements...
* add minInput - fixes #3479
* Add missing entries for catch, status, tcp, udp, websocket
* corrections for http request
* match visibility improvements (mono font + match color)
* match to variable source as well as variable name
2022-04-05 14:00:14 +01:00
Nick O'Leary
b8435efc97 Allow adminAuth to auto-login users when using passport strategy
Fixes #3467
2022-04-04 21:23:39 +01:00
Steve-Mcl
780e41d6a6 Prevent shortcut deploy when deploy button shaded
fixes #3509
2022-04-04 17:06:29 +01:00
Steve-Mcl
6d0b55f753 Ensure i18n of scoped package name
fixes #3452
2022-04-04 16:20:44 +01:00
Mauricio Bonani
c9fa5c7284 Make typedInput themeable 2022-04-03 18:11:24 -04:00
Mauricio Bonani
e97f4c4054 Make tab icon themeable 2022-04-03 18:09:08 -04:00
Mauricio Bonani
96d15b7505 Make spinner themeable 2022-04-03 18:06:16 -04:00
Mauricio Bonani
2f77596034 Make icons flow themeable 2022-04-03 18:04:15 -04:00
Mauricio Bonani
5619c105aa Make separator grip themeable 2022-04-03 18:00:08 -04:00
Mauricio Bonani
9a6ee023b3 Use SVG for separator grip 2022-04-03 17:47:07 -04:00
Dave Conway-Jones
77e2e44abc Fix markdown editor to mark up orderedlists correctly
to close #3513
2022-03-31 13:45:07 +01:00
Kazuhito Yokoi
32bddfdd47 Add Japanese translations for flow editor 2022-03-30 15:34:44 +09:00
Kazuhito Yokoi
c9aa654ef0 Fix incorrect variable name for i18n of the flow editor 2022-03-30 15:34:07 +09:00
Kazuhito Yokoi
5e501857aa Add Japanese translations for link node 2022-03-30 15:31:48 +09:00
Kazuhito Yokoi
6b00aba039 Adjust indents in the documentation of the link node 2022-03-30 15:30:30 +09:00
Kazuhito Yokoi
14fa9cfa4b Change indents from tabs to 4 spaces 2022-03-30 15:20:39 +09:00
Steve-Mcl
5633c5224e Add system info UI 2022-03-29 20:59:35 +01:00
Steve-Mcl
03763a1423 Update diagnostics as per Issue discussion 2022-03-29 20:48:29 +01:00
Steve-Mcl
cf6df1556c Ensure UTC time is UTC 2022-03-29 08:35:09 +01:00
Steve-Mcl
cdc8a42393 Add diagnosticsOptions to settings.js 2022-03-28 18:50:12 +01:00
Steve-Mcl
a2fd705153 Improve diagnostics content 2022-03-28 18:49:56 +01:00
Steve-Mcl
3388f699a0 Add diagnostics endpoint
fixes #3430
2022-03-24 16:00:45 +00:00
Steve-Mcl
5e197713ff Fix down arrow triggering menu in search box
fixes #3491
2022-03-24 11:28:24 +00:00
Sam Machin
50718495da fix test mock 2022-03-24 08:39:31 +00:00
Sam Machin
b7b604aed4 Update packages/node_modules/@node-red/runtime/lib/nodes/credentials.js
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-03-24 08:37:51 +00:00
Sam Machin
a1f5cabbba Update packages/node_modules/@node-red/runtime/locales/en-US/runtime.json
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-03-24 08:37:46 +00:00
Sam Machin
c2aae6ddf6 Update packages/node_modules/@node-red/runtime/locales/en-US/runtime.json
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-03-24 08:37:35 +00:00
Dave Conway-Jones
8a40622815 tcp node - undo trim if we re-add split chars
and fix tests
2022-03-23 22:07:43 +00:00
Nick O'Leary
cb88409102 Merge pull request #3504 from Steve-Mcl/merge-master-dev
Merge-master-dev
2022-03-23 11:59:55 +00:00
Steve-Mcl
b918b75414 Merge remote-tracking branch 'upstream/master' into dev 2022-03-23 11:16:18 +00:00
Nick O'Leary
37f0e36c98 Merge pull request #3463 from Steve-Mcl/dynamic-link-call
Dynamic link call
2022-03-23 10:14:48 +00:00
Stephen McLaughlin
c8dc2327a3 Merge pull request #3497 from Steve-Mcl/mqtt-unit-tests
Add unit tests for MQTT nodes
2022-03-23 10:10:57 +00:00
Stephen McLaughlin
f660973168 Dont run MQTT tests by default on local
- update skip message to inform use of how to enable test
2022-03-23 10:00:36 +00:00
Stephen McLaughlin
cf2e7744f3 remove copyright header
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-03-23 09:15:57 +00:00
Sam Machin
855d799b21 Update credentials.js 2022-03-22 21:18:11 +00:00
Sam Machin
97dd1d0f4f typo 2022-03-22 07:34:18 +00:00
Nick O'Leary
5b5553b9a3 Add debug message path info tooltip
Fixes #3477
2022-03-21 20:44:36 +00:00
Stephen McLaughlin
702545e0b2 Merge pull request #3500 from ralphwetzel/master
Fix: Sidebar "Configuration" filter button tooltip
2022-03-21 20:10:55 +00:00
Stephen McLaughlin
fa2787eb5d Merge pull request #3499 from bonanitech/diff-colors
Add the ability to customize diff colors even more
2022-03-21 20:09:21 +00:00
Nick O'Leary
0f37b326a0 Merge pull request #3502 from Steve-Mcl/fix-mqtt-will-props
fix typo of will properties (properies)
2022-03-21 19:29:23 +00:00
Steve-Mcl
7f9f551cfe fix typo of will properties (properies)
Fixes #3501
2022-03-21 15:24:23 +00:00
Steve-Mcl
ecf1847dd2 use CI flag to skip MQTT tests 2022-03-21 14:59:10 +00:00
Steve-Mcl
40a9dce869 try broker.emqx.io 2022-03-21 13:51:20 +00:00
Steve-Mcl
a6696733fa tidy up code 2022-03-21 13:50:24 +00:00
Sam Machin
d9bd736159 change error to warn for moving from unencrypted to encrypted 2022-03-21 09:29:41 +00:00
ralphwetzel
4f5f5d31a3 Merge pull request #1 from ralphwetzel/ralphwetzel-sidebar-filter-button-tooltip
Fix: Sidebar "Configuration" filter button tooltip
2022-03-21 00:06:02 +01:00
ralphwetzel
fad1325427 Fix: Sidebar "Configuration" filter button tooltip
"Configuration" sidebar shows wrong tooltip for filter button "All". Fixed.
2022-03-20 23:59:24 +01:00
Mauricio Bonani
8b6678a453 Add the ability to customize diff colors even more 2022-03-20 15:40:52 -04:00
Sam Machin
c7f48a83c0 add test 2022-03-19 17:57:30 +00:00
Sam Machin
af0f02d63e add locale warning 2022-03-19 17:44:21 +00:00
Steve-Mcl
497d63e67e Add unit tests for MQTT nodes 2022-03-19 17:29:31 +00:00
Sam Machin
4d048af384 Check for missing encrypted credentials 2022-03-19 13:34:46 +00:00
Nick O'Leary
3649f10600 Merge pull request #3478 from node-red/auto-gen-name
Allow node name to be auto-generated when added
2022-03-14 19:35:58 +00:00
Nick O'Leary
49e69a54bd Merge pull request #3481 from Steve-Mcl/fix-node-val-changed
do JSON comparison of old value/new value
2022-03-14 18:52:25 +00:00
Nick O'Leary
a0acc89fcb Merge pull request #3405 from Steve-Mcl/continuous-search
Add feature: Continuous search tools (search previous, search next)
2022-03-14 18:38:04 +00:00
Nick O'Leary
64d1a82920 Merge pull request #3462 from node-red/junctions
Add Junctions
2022-03-14 18:34:09 +00:00
Nick O'Leary
2396e28479 Add 'juntion' to quick-add type search 2022-03-14 18:31:23 +00:00
Nick O'Leary
db1ad0df63 Add Junctions 2022-03-14 18:16:24 +00:00
Steve-Mcl
c5de18caae fix: node save broken
- Revert last minute code tidy that changed too many `this` to `node`
2022-03-12 16:10:36 +00:00
Steve-Mcl
e57774e121 fix UI change events
- use `this` not `node` in UI change events
2022-03-12 15:02:25 +00:00
Steve-Mcl
b7ee46d400 revise header options
- remove Accept-Charset
- Use camel case by default
- additional encodings
2022-03-12 15:00:48 +00:00
Steve-Mcl
6007132640 rearange UI (name to bottom) 2022-03-12 14:59:15 +00:00
Steve-Mcl
31b3a4c342 Add UI for common headers/values
- Wrap HTML node script in IFFE (isolate module level vars & functions)
- Add UI elements for setting headers in http req node edit form
- Update built in help
- Add tests
2022-03-12 13:47:29 +00:00
Stephen McLaughlin
73ff852648 backward compatible equality testing of immutables
- make non object equality tests non strict
- this aligns with prior condition
2022-03-10 11:22:59 +00:00
Nick O'Leary
6d50eb5737 Merge pull request #3484 from zettca/node-wires-array
fix nodes losing their wires when in an iframe
2022-03-09 11:42:10 +00:00
Nick O'Leary
3c0b74005b Add core:generate-node-names action 2022-03-09 11:32:37 +00:00
Nick O'Leary
93ff667df1 Add RED.utils.getPaletteLabel 2022-03-09 11:29:51 +00:00
Bruno Henriques
a8579fa68a fix nodes losing their wires when in an iframe 2022-03-09 10:39:47 +00:00
Stephen McLaughlin
10f77fdf1a permit non strict comparison of string or number 2022-03-08 23:13:41 +00:00
Steve-Mcl
99d824a999 Merge 2022-03-08 16:19:28 +00:00
Steve-Mcl
97d2b5df15 close search toolbar on escape 2022-03-08 16:09:05 +00:00
Steve-Mcl
84a9cf7adf handle errors by circ refs, undefined, BigInt etc 2022-03-08 14:20:12 +00:00
Steve-Mcl
a49927f173 do JSON comparison of old value/new value
fixes #3475
2022-03-08 14:07:03 +00:00
Nick O'Leary
6a5c50ff77 Merge pull request #3476 from Steve-Mcl/fix-calculateGridSnapOffsets
fix PR 'split wire with link nodes' #3416
2022-03-07 21:10:46 +00:00
Steve-Mcl
c948573c2d fix PR 'split wire with link nodes' #3416 2022-03-07 20:23:06 +00:00
Stephen McLaughlin
5233bc501c Merge branch 'dev' into continuous-search 2022-03-07 20:04:59 +00:00
Steve-Mcl
ad96c6f838 fix search counter glitch 2022-03-07 20:01:24 +00:00
Nick O'Leary
0e92f68b4a Merge pull request #3399 from Steve-Mcl/split-wire-to-links
Add feature: split-wire-to-links
2022-03-07 12:57:49 +00:00
Nick O'Leary
ac97e8c613 Merge pull request #3468 from Steve-Mcl/scroll-into-view-calcs
Improve scroll into view
2022-03-07 12:47:54 +00:00
Nick O'Leary
95fe717ca7 Merge pull request #3472 from Steve-Mcl/fix-mqtt-setboolprop
fix: ensure mqtt v5 props can be set false
2022-03-07 12:47:01 +00:00
Steve-Mcl
10b18de3e0 fix: ensure mqtt v5 props can be set false
fixes #3471
2022-03-05 11:24:25 +00:00
Steve-Mcl
08295eb807 Remove RED.nodes.createNode 2022-03-05 11:08:36 +00:00
Steve-Mcl
fce4f0c116 resolve PR issues...
- change default keymap to `ALT-L L`
- Move `RED.nodes.createNode` to `RED.view.createNode`
- replace `selectedLinks` with `selection().links`
2022-03-05 11:06:13 +00:00
Steve-Mcl
cf1424976f Improve scroll into view
- if a node is behind scrollbar, it is not scrolled into view
- jQuery `.width()` & `.width()` actually includes the scroll bar.
- using native `clientWidth` and `clientHeight` fixes this
2022-03-04 16:08:29 +00:00
Steve-Mcl
94e8fce40a improve contineous search
- rename action core:search-prev for  core:search-previous
- Ensure search counter in toolbar is i18n ready
- remember (and display in toolbar) the search term
- recall the search term when magnifier clicked
- esnure currently flashing node is cancelled before flashing next node
- Add "flash" for flow tabs revealed by a search
- Fix "flash" for config nodes revealed by a search
2022-03-04 16:00:02 +00:00
Steve-Mcl
ea671bf395 Use v5 properties to aid auto parsing payload
- closes #3421
- fixes bug in `function setBoolProp()`
2022-03-04 08:44:21 +00:00
Nick O'Leary
fdb868516f Merge pull request #3464 from Steve-Mcl/dont-show-hidden-tab
Dont show 1st tab if hidden when loading
2022-03-03 23:15:07 +00:00
Nick O'Leary
c75bebfc90 Merge pull request #3390 from node-red/copy-node-props
Copy node props
2022-03-03 21:57:00 +00:00
Nick O'Leary
3e102ef760 Merge pull request #3395 from Steve-Mcl/search-options
Add info-tab search options dropdown to the regular search
2022-03-03 21:53:21 +00:00
Nick O'Leary
c07eddbd97 Merge branch 'dev' into search-options 2022-03-03 21:52:52 +00:00
Stephen McLaughlin
e85b925f40 Ensure linkType is a valid value (2nd attempt) 2022-03-01 16:48:31 +00:00
Steve-Mcl
27761ba6f2 Update built in docs 2022-02-28 19:01:15 +00:00
Steve-Mcl
b665698e78 Ensure linkType is a valid value 2022-02-28 19:00:58 +00:00
Steve-Mcl
97ebe33d68 Dont show 1st tab if hidden when loading
fixes #3455
2022-02-28 18:15:13 +00:00
Steve-Mcl
249f7e45fb Link Call should not call into subflow...
- includes missing jsdoc
- improves speed (no searching, only lookups)
- code formatting consistency
- improve tests
2022-02-28 13:57:22 +00:00
Dave Conway-Jones
c0612e6193 Merge branch 'master' of https://github.com/node-red/node-red 2022-02-28 09:59:35 +00:00
Ariel Ferreira
79a789c557 add test to check if in the case user contains token, Node-RED uses it instead of generating a new Token 2022-02-26 17:24:59 -05:00
Ariel Ferreira
450888f542 check if user contains token and use it instead of generating a new Token 2022-02-26 16:35:46 -05:00
萧十一郎
380a08242a fix html label mistake (#3459) 2022-02-26 10:10:17 +00:00
Steve-Mcl
e653a933f1 fix subflow calls 2022-02-25 18:39:48 +00:00
Dave Conway-Jones
bda5dffa34 Add tests 2022-02-25 16:19:20 +00:00
Steve-Mcl
29df7e84a1 add tests 2022-02-25 16:13:48 +00:00
Steve-Mcl
19cf43a10e Re-write link call targeting...
- Remove msg.target by object
- Remove :: scoping
- Always try to locate matching link-in on same flow first
  - If not found, look on all flows
    - if 1 found, call it
    - If more than 1 link target found, raise error
2022-02-25 16:13:39 +00:00
Dave Conway-Jones
0398ef3b90 undo regression in tcp-in node (missed one)
and add test
2022-02-25 16:06:44 +00:00
Dave Conway-Jones
8c19daf949 TCP nodes- Add optional reattach delimiter to streaming strings 2022-02-25 15:56:13 +00:00
Steve-Mcl
e4f0688a02 dynamic link target 1st draft 2022-02-24 19:46:21 +00:00
Dave Conway-Jones
25f4fbf2bb undo regression to tcp-in node
To fix #3454
2022-02-21 20:03:25 +00:00
Nick O'Leary
0533c08438 Merge branch 'master' into dev 2022-02-18 22:02:30 +00:00
Nick O'Leary
5f0ea85f47 Bump for 2.2.2 2022-02-18 14:46:01 +00:00
Nick O'Leary
6c7c1202ed Merge pull request #3451 from Steve-Mcl/fix-mqtt-close-timeout
Fix "close timed out" error when performing full deploy or modifying broker node.
2022-02-18 14:43:34 +00:00
Steve-Mcl
669aa769c2 Fix close timeout on MQTT nodes
fixes #2934
2022-02-17 10:18:46 +00:00
Nick O'Leary
fcf2994015 Bump for 2.2.1 2022-02-15 13:41:53 +00:00
Nick O'Leary
bee21ddc9e Update dependencies 2022-02-15 13:36:05 +00:00
Nick O'Leary
263e68e677 Merge pull request #3447 from Steve-Mcl/fix-hook-module-location
Improve module location parsing (of stack info) when adding hook
2022-02-15 13:18:25 +00:00
Steve-Mcl
2b958f5724 Improve module location parsing when adding hook
- fixes #3401
- handles brackets and no brackets in stack line
- handles short stack
2022-02-15 12:40:34 +00:00
Nick O'Leary
95f7177ef4 Merge pull request #3445 from node-red-hitachi/fix-path-substitution
Fix substitution of NR_NODE_PATH
2022-02-15 11:26:19 +00:00
Nick O'Leary
006324b78e Merge pull request #3446 from Steve-Mcl/better-bad-node-err-log
improve "Unexpected Node Error" logging
2022-02-15 11:26:08 +00:00
Steve-Mcl
efd8c1229d improve "Unexpected Node Error" logging
- fixes #3389
- adds additional info to aid sourcing the issue
- removes lots of undefined info when node type is incorrect
- stores and reports original stack before internal try/catch exception
- ensure this._flow is something before attempting to call `handleError`
2022-02-15 10:51:18 +00:00
Hiroyasu Nishiyama
0f1aea3e0d add test case 2022-02-15 14:41:03 +09:00
Hiroyasu Nishiyama
6a41cbebc9 evaluate env var after path initialization 2022-02-15 14:23:01 +09:00
Nick O'Leary
fba95e6a42 Merge pull request #3392 from Steve-Mcl/search-ismodified
New Feature: Add ability to find modified nodes/flows.
2022-02-14 23:19:27 +00:00
Nick O'Leary
bffb91f196 Merge pull request #3443 from node-red/delay-field-validation
Allow nbRateUnits to be undefined when validating
2022-02-14 23:18:41 +00:00
Nick O'Leary
4573b65639 Merge pull request #3444 from node-red/keyboard-filter-case
Handle mixed-cased filter terms in keyboard shortcut dialog
2022-02-14 23:18:16 +00:00
Nick O'Leary
3d8505385a Merge pull request #3442 from node-red/dupe-links
Prevent duplicate links being added between nodes
2022-02-14 23:18:01 +00:00
Nick O'Leary
95d3a8cc22 Merge pull request #3409 from node-red/let-switch-number-test-report-NaN-as-false
switch node - add check for NaN in is of type number to be false
2022-02-14 23:17:38 +00:00
Nick O'Leary
99c053f86b Merge pull request #3440 from Steve-Mcl/monaco-env-suggestions
Coding help for recently added node-red Predefined Environment Variables
2022-02-14 23:02:55 +00:00
Nick O'Leary
f2dde705ef Handle mixed-cased filter terms in keyboard shortcut dialog
Fixes #3400
2022-02-14 20:59:43 +00:00
Nick O'Leary
be11fda814 Allow nbRateUnits to be undefined when validating
Fixes #3407
2022-02-14 20:44:55 +00:00
Nick O'Leary
0261105c52 Prevent duplicate links being added between nodes 2022-02-14 20:35:47 +00:00
Nick O'Leary
264047dc0c Merge pull request #3437 from Steve-Mcl/fix-multiple-wires
bug fix: Dont add wires to undo buffer twice
2022-02-14 20:12:46 +00:00
Steve-Mcl
4d84926ed2 Update monaco for Predefined Environment Variables
- add Predefined Environment Variables to snippet suggestions
- update jsdoc for `env.get`
2022-02-14 13:38:37 +00:00
Nick O'Leary
da3211fee6 Merge pull request #3439 from node-red/remove-debug
Remove console.log when ignoring disabled module
2022-02-14 10:48:33 +00:00
Nick O'Leary
1388b03cf2 Remove console.log when ignoring disabled module 2022-02-14 10:46:08 +00:00
Hiroyasu Nishiyama
9f98b4b082 add support of property validation message 2022-02-14 10:40:49 +09:00
Steve-Mcl
b3f1401ab4 Dont add wires to undo buffer twice
Fixes #3433
2022-02-13 16:56:26 +00:00
Hiroyasu Nishiyama
e5e3832809 fix Japanese message of delay node (#3434) 2022-02-12 16:13:59 +00:00
Nick O'Leary
2eff7da171 Merge pull request #3397 from node-red-hitachi/fix-config-node-validation
fix node validation to be applied to config node
2022-02-09 19:47:23 +00:00
Nick O'Leary
e9622bcfe8 Merge pull request #3391 from node-red-hitachi/fix-hide-flow-tooltip
fix to hide tooltip after removing subflow tab
2022-02-09 19:44:05 +00:00
Dave Conway-Jones
63ebadc526 add check for NaN in is of type number to be false
and add test
to fix issue #3408
2022-02-09 12:03:38 +00:00
Steve-Mcl
fe47b07229 Add feature: search next, search previous 2022-02-09 11:00:09 +00:00
Hiroyasu Nishiyama
dc73997be3 fix not to use hasOwnProperty 2022-02-08 09:21:52 +09:00
Steve-Mcl
62315fd478 Add feature: split-wire-to-links 2022-02-07 12:25:09 +00:00
Hiroyasu Nishiyama
fb81121bd3 fix node validation to be applied to config node 2022-02-04 17:45:00 +09:00
Nick O'Leary
5293563a6a Merge pull request #3394 from Alkarex/fix-debug-node-hasOwnProperty
Fix no-prototype-builtins bug in debug node and utils
2022-02-03 16:31:46 +00:00
Alexandre Alapetite
2e1e61dabe Remove part of JSDoc 2022-02-03 16:32:51 +01:00
Alexandre Alapetite
280d63fde7 Fix util.encodeObject 2022-02-03 15:59:25 +01:00
Steve-Mcl
c6104195f6 add search options dropdown to regular search 2022-02-03 10:26:50 +00:00
Alexandre Alapetite
e55cbb3e3d Fix bug in debug node due to msg.hasOwnProperty construct
`msg.hasOwnProperty("status")` might make the debug node crash/produce an error if the payload was created with `Object.create(null)`.
This is the case e.g. for `ini` (to parse INI files), an official NPM node:
4f289946b3/lib/ini.js (L63)

My Node-RED node `node-red-contrib-parser-ini`, which is using that library, was hit by this bug and I had to ship a workaround
fe6b1eb4b1/parser-ini.js (L14)

The `msg.hasOwnProperty("xxx")` construct should not be used since ECMAScript 5.1.

ESLint advises in the same direction https://eslint.org/docs/rules/no-prototype-builtins

This patch was produced using the following regex:
Search: `\b([\w.]+).hasOwnProperty\(`
Replace: `Object.prototype.hasOwnProperty.call($1, `

This could be applied more gobally if desired.
2022-02-03 02:01:22 +01:00
Steve-Mcl
56b85e4194 Merge branch 'search-ismodified' of https://github.com/Steve-Mcl/node-red into search-ismodified 2022-02-02 17:21:33 +00:00
Steve-Mcl
6431c43d0e Add ability to find modified nodes/flows 2022-02-02 17:21:23 +00:00
Steve-Mcl
a62107fbd1 Add ability to find modified nodes/flows 2022-02-02 17:19:23 +00:00
Hiroyasu Nishiyama
7959d18248 hide tooltip after removing subflow tab 2022-02-02 11:34:58 +09:00
Nick O'Leary
2f66915a9f Update node info table based on selection of outliner 2022-01-31 21:14:07 +00:00
Nick O'Leary
a508177e21 Add copy-value button to entries in Node Props table of info sidebar 2022-01-31 20:35:42 +00:00
Mario Wolff
5a9d858604 OAuth/OpenID logout with Keycloak - Forum 57492 2022-01-31 08:03:34 +01:00
Dave Conway-Jones
514da83961 let inject optionally fire at start in only at time mode. 2022-01-28 18:05:20 +00:00
Nick O'Leary
b7bae18849 Update inner package dependency 2022-01-27 12:58:43 +00:00
Nick O'Leary
fbde247c72 Update node-red-admin dependency 2022-01-27 12:57:32 +00:00
Nick O'Leary
3a69af9034 Merge pull request #3383 from node-red/dev
Merge dev to master for 2.2.0
2022-01-27 12:50:45 +00:00
Nick O'Leary
5c87a6cb76 Update package readmes and licenses 2022-01-27 12:49:48 +00:00
Nick O'Leary
9c6bb434e8 Update contributing guide for new cla 2022-01-27 12:44:22 +00:00
Nick O'Leary
d1bd303dfa Update version for 2.2.0 2022-01-27 10:13:28 +00:00
Nick O'Leary
3813c32454 Update marked to latest 2022-01-27 10:12:55 +00:00
Nick O'Leary
3b00a692ee Update changelog 2022-01-27 10:12:06 +00:00
Nick O'Leary
3304ebe9d3 Merge pull request #3382 from node-red-hitachi/fix-subflow-update
fix opening/closing subflow template not to make subflow changed
2022-01-27 09:30:26 +00:00
Nick O'Leary
513120cbfe Merge pull request #3381 from kazuhitoyokoi/dev-addjpn
Add Japanese translations for v2.2.0
2022-01-27 09:28:29 +00:00
Hiroyasu Nishiyama
b06049d5a3 fix opening/closing subflow template not to make subflow changed 2022-01-27 12:57:37 +09:00
Kazuhito Yokoi
0f50355deb Add Japanese translations for v2.2.0 2022-01-27 11:14:24 +09:00
Nick O'Leary
bd6e35fea2 Merge branch 'dev' of github.com:node-red/node-red into dev 2022-01-26 17:46:47 +00:00
Nick O'Leary
a4fd63cd44 Merge pull request #3380 from Steve-Mcl/search-find-filenode
Pallet Label (if different to type) should be indexed for search
2022-01-26 17:00:47 +00:00
Steve-Mcl
fdc4219b68 palletLabel (if different) should be indexed
for search - fixes #3297
2022-01-26 16:14:34 +00:00
Nick O'Leary
5b428bb8e6 Merge pull request #3379 from node-red-hitachi/nr_node_path-support
add NR_NODE_PATH path support
2022-01-26 14:29:03 +00:00
Hiroyasu Nishiyama
c948ff88a5 add support of NR_NODE_PATH 2022-01-26 21:24:48 +09:00
Nick O'Leary
9b9a0d7060 Update dependencies 2022-01-26 12:20:45 +00:00
Nick O'Leary
16578e3677 Update changelog 2022-01-26 12:07:04 +00:00
Nick O'Leary
be7f84bc67 Merge pull request #3377 from Steve-Mcl/function-node-decs
Update `node` declarations in func.d.ts
2022-01-26 12:03:56 +00:00
Nick O'Leary
033d26f2cb Merge pull request #3378 from node-red/tour-update
Update tour for 2.2.0
2022-01-26 12:03:40 +00:00
Nick O'Leary
4c0826b1c4 Update tour for 2.2.0 2022-01-26 12:00:30 +00:00
Steve-Mcl
c4cc204c94 Add static declerations to func ts. fixes #3376 2022-01-26 11:40:05 +00:00
Nick O'Leary
3747db18b1 Update changelog 2022-01-26 11:34:32 +00:00
Nick O'Leary
4173625fca Merge pull request #3243 from node-red/delete-global-context
Clear context contents when switching projects
2022-01-26 11:28:34 +00:00
Nick O'Leary
0e7863a6fb Merge pull request #3375 from node-red/settings-update
Add editorTheme.tours property to default settings file
2022-01-26 11:21:55 +00:00
Nick O'Leary
207ba00ad2 Add editorTheme.tours property to default settings file 2022-01-26 11:21:11 +00:00
Nick O'Leary
87c89586a5 Merge pull request #3356 from node-red-hitachi/node-prop-env-var
Add support for accessing node id & name as environment variable
2022-01-26 11:11:02 +00:00
Nick O'Leary
1cea1ced82 Merge pull request #3371 from node-red/node-alias
Add _path property to nodes and expose as node.path in Function node
2022-01-26 11:10:43 +00:00
Nick O'Leary
08732bac0f Merge pull request #3374 from Steve-Mcl/mqtt-reconnect-fix
Mqtt reconnect fix
2022-01-26 11:03:20 +00:00
Nick O'Leary
283e8d3c08 Merge pull request #3373 from Steve-Mcl/merge-fix
bug: merge issue. fixes #3364
2022-01-26 11:01:35 +00:00
Nick O'Leary
42a7165596 Merge pull request #3372 from Steve-Mcl/use-paletteLabel-in-help
Use a nodes palette label in help tree
2022-01-26 11:00:53 +00:00
Hiroyasu Nishiyama
aa3f5001d5 additional update of test for NR_ prefix addition 2022-01-26 10:52:41 +09:00
Hiroyasu Nishiyama
56580c4005 add test for NR_ prefix addition 2022-01-26 09:26:05 +09:00
Hiroyasu Nishiyama
ba304c9651 add NR_ prefix to special environment variables 2022-01-26 09:25:30 +09:00
Nick O'Leary
703c5adba7 Add _path property to nodes and expose as node.path in Function node 2022-01-25 21:32:28 +00:00
Steve-Mcl
8b85f6e0a6 ensure help search is case insensitive 2022-01-25 18:27:47 +00:00
Nick O'Leary
c136d22382 Merge pull request #3370 from node-red/fix-vertical-align-subflow-port
Fix vertical align subflow port
2022-01-25 17:09:05 +00:00
Nick O'Leary
42358419ad Fix vertical align of subflow port labels 2022-01-25 17:08:04 +00:00
Nick O'Leary
ab2ced5c37 Merge pull request #3352 from ralphwetzel/dev
Subflow: Add labels to OUTPUT nodes
2022-01-25 17:07:12 +00:00
Steve-Mcl
faf31be0dc Ensure label is shown in help tree 2022-01-25 16:30:30 +00:00
Nick O'Leary
ff4c67d068 Merge pull request #3353 from kazuhitoyokoi/dev-addjpn
Add Japanese translations for v2.2.0-beta.1
2022-01-25 16:02:29 +00:00
Steve-Mcl
10b133db02 bug: merge issue. fixes #3364 2022-01-25 14:47:36 +00:00
Nick O'Leary
f0bf607b43 Merge pull request #3359 from node-red-hitachi/fix-action-list-i18n
fix to make actions list i18n ready and Japanese translation
2022-01-25 14:47:18 +00:00
Steve-Mcl
8948ca5323 Merge branch 'dev' into mqtt-reconnect-fix 2022-01-25 12:32:49 +00:00
Steve-Mcl
9c3be51fe9 Improve MQTT broker disconnect situation
* Ensure topic is sane to prevent error 129
* Ensure a log entry is made
* Update node status
2022-01-25 12:29:51 +00:00
Hiroyasu Nishiyama
2da9161f29 Update packages/node_modules/@node-red/editor-client/src/js/ui/actions.js
Oh, I'm sorry about this.

Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-01-25 21:21:39 +09:00
Hiroyasu Nishiyama
983dad5b53 add test for env var access of GROUP_ID & GROUP_NAME 2022-01-25 21:07:38 +09:00
Hiroyasu Nishiyama
8b23d341b4 add support for env var access of GROUP_ID & GROUP_NAME 2022-01-25 21:04:43 +09:00
Hiroyasu Nishiyama
0ad60013aa add test for env var access of FLOW_ID & FLOW_NAME 2022-01-25 20:52:45 +09:00
Hiroyasu Nishiyama
289815e128 add support of FLOW_ID & FLOW_NAME 2022-01-25 20:46:01 +09:00
Kazuhito Yokoi
f7ee83f1b9 Add translations for restoring zoom level and scroll position 2022-01-25 11:18:35 +09:00
Nick O'Leary
f67aafa8d3 Merge pull request #3361 from node-red/zoom-level
Remember Zoom level and Sidebar tab selection between sessions
2022-01-24 23:21:31 +00:00
Nick O'Leary
4e5ddd57bf Merge branch 'dev' of github.com:node-red/node-red into dev 2022-01-24 23:18:43 +00:00
Nick O'Leary
e0d4ecf835 Merge branch 'master' into dev 2022-01-24 23:18:25 +00:00
Nick O'Leary
81a461115b Merge pull request #3365 from node-red-hitachi/fix-http-request-set-cookie
Fix http request set cookie to use sync API
2022-01-24 21:26:29 +00:00
Nick O'Leary
d679b02658 Add option to remember zoom and scroll position in localStorage 2022-01-24 21:04:27 +00:00
Hiroyasu Nishiyama
5effcdb024 use setCookieSync instead of setCookie 2022-01-19 23:45:13 +09:00
Nick O'Leary
211a5eb2bb Bump for 2.1.6 2022-01-18 09:46:57 +00:00
Nick O'Leary
c4465ba58d Merge pull request #3351 from node-red-hitachi/fix-delay-rate-unit-validation
fix unit value validation of delay node
2022-01-18 09:45:56 +00:00
Nick O'Leary
7903c53876 Merge pull request #3363 from node-red/revert-copy-fix
Revert copy-text change and apply alternative fix
2022-01-18 09:28:37 +00:00
Nick O'Leary
dbefe6a560 Revert copy-text change and apply alternative fix
Reverts PR #3331 and applies the alternative fix originally proposed
in PR #3329
2022-01-18 09:27:15 +00:00
Nick O'Leary
8b1f412255 Merge pull request #3362 from node-red/update-marked
Update marked to latest
2022-01-18 09:22:28 +00:00
Nick O'Leary
a2e0074061 Update marked to latest 2022-01-18 09:20:52 +00:00
Nick O'Leary
5fc920087b Store user zoom level in localStorage 2022-01-17 21:27:48 +00:00
Nick O'Leary
085233ab9b Remember last sidebar tab between editor sessions 2022-01-17 21:27:21 +00:00
Hiroyasu Nishiyama
6657b2629f move i18n code to action list according to PR comment 2022-01-16 12:10:19 +09:00
Nick O'Leary
310a279aaf Merge pull request #3358 from node-red-hitachi/fix-property-error-tooltip
fix to make start of property error tooltip messages aligned
2022-01-15 19:44:18 +00:00
Hiroyasu Nishiyama
58f3a76da7 fix to make actions list i18n ready and Japanese translation 2022-01-15 20:39:05 +09:00
Hiroyasu Nishiyama
a2c9458b1b aligin start of property error tooltip messages 2022-01-15 13:11:56 +09:00
Hiroyasu Nishiyama
75bcd9e8d5 add support for accessing node id & name as env var 2022-01-14 23:40:12 +09:00
Kazuhito Yokoi
977e7ef395 Add Japanese translations for v2.2.0-beta.1 2022-01-14 14:43:28 +09:00
ralphwetzel
eb1b8b577f Merge branch 'node-red:dev' into dev 2022-01-13 23:36:23 +01:00
ralphwetzel
28f91685ce Subflow: Add labels to OUTPUT nodes 2022-01-13 23:33:06 +01:00
Nick O'Leary
81a4fe59d9 Update changelog/welcome tour for 2.2 2022-01-13 15:16:16 +00:00
Hiroyasu Nishiyama
e7189ab81f fix unit value validation of delay node 2022-01-13 23:52:06 +09:00
Nick O'Leary
346db89e66 Merge pull request #3349 from node-red-hitachi/fix-inject-property-validation
fix JSON propety validation of inject node
2022-01-13 12:50:17 +00:00
Hiroyasu Nishiyama
f786c7f144 fix JSON propety validation of inject node 2022-01-13 21:42:50 +09:00
Nick O'Leary
51f45293b8 Merge branch 'master' into dev 2022-01-13 10:52:36 +00:00
Nick O'Leary
943b103001 Update changelog 2022-01-13 10:29:20 +00:00
Nick O'Leary
f055d42277 Update package version for 2.1.5 2022-01-13 10:22:41 +00:00
Nick O'Leary
fb7a2a8d5d Update dependencies 2022-01-13 10:19:56 +00:00
Nick O'Leary
1e5ed2a2e3 Merge pull request #3331 from kazuhitoyokoi/master-fixcopybutton2
Fix copy buttons on the debug window (another method)
2022-01-13 09:50:27 +00:00
Nick O'Leary
e1467dfe23 Merge pull request #3348 from node-red/scrollbar-expand
Prevent function scrollbar from obscuring expand button
2022-01-13 09:49:15 +00:00
Nick O'Leary
c480f96d30 Prevent function scrollbar from obscuring expand button
Fixes #2955
2022-01-13 09:46:37 +00:00
Kazuhito Yokoi
cf613aafb2 Update packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-01-13 10:35:12 +09:00
Nick O'Leary
20dbf7c5f4 Merge pull request #3346 from node-red/fix-stack-capture
Handle reporting error location when stack is truncated
2022-01-12 22:54:25 +00:00
Nick O'Leary
47c912c25b Merge pull request #3345 from node-red/jsonata-compat-mode-fix
Improve jsonata legacy mode detection regex
2022-01-12 22:54:05 +00:00
Nick O'Leary
48fb1a8127 Merge pull request #3344 from node-red/fix-ws-hb
Only setup ws client heartbeat once it is connected
2022-01-12 22:53:51 +00:00
Nick O'Leary
6c1b55db16 Merge pull request #3347 from node-red/flow-name-increment
Fix generating flow name with incrementing number
2022-01-12 22:53:33 +00:00
Nick O'Leary
df70c8a800 Fix generating flow name with incrementing number
Fixes #3295
2022-01-12 22:45:18 +00:00
Nick O'Leary
82ae2e7118 Handle reporting error location when stack is truncated
Fixes #3292
2022-01-12 22:07:44 +00:00
Nick O'Leary
0cf9b5f3df Improve jsonata legacy mode detection regex
Fixes #3290
2022-01-12 21:56:38 +00:00
Nick O'Leary
036a825892 Only setup ws client heartbeat once it is connected
Fixes #3264
2022-01-12 21:46:56 +00:00
Nick O'Leary
8b43b31c64 Add checkbox on project-open screen to clear context 2022-01-12 21:05:47 +00:00
Nick O'Leary
3abef972a7 Clear context contents when switching projects
Fixes #3240
2022-01-12 18:59:29 +00:00
Nick O'Leary
30b00741b5 Merge pull request #3296 from node-red/Json-try-parse-buffer
Let JSON node attempt to parse buffer if it contains a valid string
2022-01-12 18:58:02 +00:00
Nick O'Leary
f86e743cce Merge branch 'master' into dev 2022-01-12 17:59:26 +00:00
Nick O'Leary
cb96fb735e Merge pull request #3289 from node-red/snap-grid
Snap nodes on grid using either edge as reference
2022-01-12 17:57:26 +00:00
Nick O'Leary
459a52d31d Merge pull request #3340 from node-red/cut-wires
Add wire-slice mode to delete wires with Ctrl-RHClick-Drag
2022-01-12 17:52:54 +00:00
Nick O'Leary
44ef9a13d6 Merge pull request #3338 from node-red/detach-action
Detach action
2022-01-12 17:52:32 +00:00
Nick O'Leary
0bb3652a63 Merge pull request #3323 from node-red/highlight-links
Highlight links when selecting nodes
2022-01-12 17:52:03 +00:00
Nick O'Leary
6a82d683a9 Merge pull request #3262 from node-red/search-history
Add search history to main search box
2022-01-12 17:51:46 +00:00
Nick O'Leary
fad708e8de Merge pull request #3294 from node-red/multi-select-links
Allow multiple links to be selected by ctrl-click
2022-01-12 17:51:15 +00:00
Nick O'Leary
c6a38b8355 Merge pull request #3300 from node-red/remove-use-of-verbose-flag-in-core-nodes
Remove use of verbose flag in core nodes - and use node.debug level instead
2022-01-12 17:38:34 +00:00
Nick O'Leary
ee84eb666b Merge pull request #3307 from node-red/add-tls-option-to-tcp-node
Add TLS option to tcp client nodes
2022-01-12 17:37:43 +00:00
Nick O'Leary
6d2793cac6 Merge pull request #3336 from node-red-hitachi/add-link-call-example
add link call example
2022-01-12 17:31:57 +00:00
Nick O'Leary
86d518fc2e Merge pull request #3343 from node-red/adminAuth-logging
Initialize passport when only adminAuth.tokens is set
2022-01-12 17:31:44 +00:00
Nick O'Leary
25dba1a6d5 Merge pull request #3342 from node-red/add-log-logging
Add log logging
2022-01-12 17:29:29 +00:00
Nick O'Leary
af949c62c2 Allow 'escape' to cancel wire-slicing 2022-01-12 17:24:25 +00:00
Nick O'Leary
ea20342d76 Handle non-error responses from token function 2022-01-12 13:48:06 +00:00
Nick O'Leary
7732d52583 Initialize passport when only adminAuth.tokens is set
Fixes #3341
2022-01-12 13:27:01 +00:00
Nick O'Leary
c801bc5e6b Add error logging if Node.log throws an error
Part of #3327
2022-01-12 11:13:29 +00:00
Nick O'Leary
ea43729063 Add _module to Node object to provide module info 2022-01-12 11:07:25 +00:00
Nick O'Leary
e26bae8027 Merge pull request #3333 from tobiasoort/dev
Implemented support for Websocket Subprotocols in WS Client Node.
2022-01-12 09:31:55 +00:00
Tobias Oort
555f155cad Added support for commaseparated subprotocols
Removed placeholder from html
2022-01-12 09:10:35 +01:00
Nick O'Leary
f8c47f59bc Merge pull request #3339 from node-red/fix-filter-node-start-condition
Fix for filter node narrrowbandEq mode start condition failure
2022-01-11 22:39:14 +00:00
Nick O'Leary
f3997128b9 Add wire-slice mode to delete wires with Ctrl-RHClick-Drag 2022-01-11 19:49:40 +00:00
Nick O'Leary
154a4e23dd Add delete-selection-and-reconnect action 2022-01-11 14:11:55 +00:00
Dave Conway-Jones
52e4e0e569 Fix for narrrowbandEq mode start condition failure
And add test
As discussed https://discourse.nodered.org/t/the-filter-node-or-the-old-rbe-node/56371
2022-01-11 13:56:44 +00:00
Nick O'Leary
30f2b96c68 Pressing escape whilst DETACH_DRAGGING should revert change 2022-01-11 00:24:34 +00:00
Nick O'Leary
58c94b7773 Add core:detach-selected-nodes action 2022-01-11 00:16:24 +00:00
Tobias Oort
83203d5f5d Fixed property name in unit-test 2022-01-10 22:23:45 +01:00
Dave Conway-Jones
f77d161643 remove debug msg from inject close 2022-01-10 20:22:20 +00:00
Nick O'Leary
6580b139c0 Merge pull request #3288 from node-red/wiring-shortcut
Wiring shortcut
2022-01-10 18:34:06 +00:00
Nick O'Leary
2743c7c6ac Merge pull request #3304 from node-red-hitachi/dev-unknownconfig
Check availability of type of config node on deploy
2022-01-10 18:33:36 +00:00
Nick O'Leary
062f76214e Merge pull request #3325 from hardillb/http-basic-username-only
Fix basic auth with empty username or password
2022-01-10 18:27:55 +00:00
Nick O'Leary
ce98ed98a2 Merge pull request #3334 from Steve-Mcl/fix-monaco-expanded
load extralibs when expanding monaco. fixes #3319
2022-01-10 18:23:07 +00:00
Nick O'Leary
dce9d93f6c Merge pull request #3335 from node-red-hitachi/fix-file-node-example
Update file node examples according to node name change
2022-01-10 18:22:39 +00:00
Nick O'Leary
f7e35a6cbe Merge pull request #3337 from node-red-hitachi/fix-selection
resume focus after import/export dialog close
2022-01-10 18:21:55 +00:00
Hiroyasu Nishiyama
931335220f resume focus after import/export dialog close 2022-01-09 23:34:08 +09:00
Hiroyasu Nishiyama
3ce35a8a4b add link call example 2022-01-09 20:24:15 +09:00
Hiroyasu Nishiyama
9ac4e5cf6a update file node examples according to node name change 2022-01-09 19:49:06 +09:00
Tobias Oort
bd77d7eec3 Implemented support for Websocket Subprotocols in WS Client Node. 2022-01-08 22:18:05 +01:00
Steve-Mcl
b5e48aa509 load extralibs when expanding monaco. fixes #3319 2022-01-08 19:29:49 +00:00
Kazuhito Yokoi
b14c42b6a4 Update Japanese translations in node help (#3332)
* Update Japanese translations in node help

* Fix typos
2022-01-07 17:43:53 +00:00
Kazuhito Yokoi
ba794ba58c Use clipboard.writeText() instead of execCommand("copy") 2022-01-07 11:49:26 +09:00
Kazuhito Yokoi
b00282590d Fix copy buttons on the debug window 2022-01-07 09:27:01 +09:00
Ben Hardill
44616c6872 Fix basic auth with empty username or password
fix for #3324
2022-01-05 20:56:46 +00:00
Nick O'Leary
aaa2b4c3db Merge pull request #3322 from node-red/inject-props-fix
Fix incorrect clearing of blank payload property in Inject node
2022-01-04 18:59:05 +00:00
Nick O'Leary
8974d8e4df Merge pull request #3321 from node-red/fix-prev-tab-action
Fix findPreviousVisibleTab action
2022-01-04 18:58:45 +00:00
Nick O'Leary
699063cbb0 Merge pull request #3312 from node-red/hide-tabs-fix
Fix storing hidden tab state when not hidden via action
2022-01-04 18:58:32 +00:00
Nick O'Leary
e76000b713 Merge pull request #3311 from node-red/strip-empty-env
Avoid adding empty env properties to tabs/groups
2022-01-04 18:57:53 +00:00
Nick O'Leary
332b372e31 Merge pull request #3310 from node-red/group-env-fix
Update Function to use correct api to access env vars
2022-01-04 18:57:33 +00:00
Nick O'Leary
cb3fcb7bfa Ctrl-Shift-Click on node should add to existing selection 2022-01-03 23:29:42 +00:00
Nick O'Leary
bef641609e Select links when nodes on either side selected 2022-01-03 23:29:12 +00:00
Nick O'Leary
24b52f09df Add RED.nodes.getNodeLinks to help node-link lookup 2022-01-03 23:27:25 +00:00
Nick O'Leary
942b17b807 Fix incorrect clearing of blank payload property in Inject node
Fixes #3316
2022-01-03 21:51:49 +00:00
Nick O'Leary
cf19d7f3ad Fix findPreviousVisibleTab action
Fixes #3320
2022-01-03 21:20:23 +00:00
Nick O'Leary
ebd62a4112 Fix storing hidden tab state when not hidden via action
Fixes #3305
2021-12-28 10:29:42 +00:00
Nick O'Leary
9af7357ca4 Avoid adding empty env properties to tabs/groups
Fixes #3306
2021-12-27 12:03:40 +00:00
Nick O'Leary
0dbc35c252 Update Function to use correct api to access env vars
Fixes #3299
2021-12-27 11:55:10 +00:00
Dave Conway-Jones
c9f03f1ac5 better tests
(and a small fix as a result)
2021-12-27 09:51:50 +00:00
Dave Conway-Jones
02bd292b8c fix and test 2021-12-26 16:12:47 +00:00
Dave Conway-Jones
e5f1029d0c fix variable names for test 2021-12-26 15:37:41 +00:00
Dave Conway-Jones
cae247160f Let tcprequest split incoming strings on delimiter (as per tcpin node)
and fixup i18n messages
2021-12-26 15:28:16 +00:00
Dave Conway-Jones
6692b1992c TCP add tls option to inbound nodes 2021-12-26 12:12:31 +00:00
Dave Conway-Jones
0937837b7f Add TLS config option to TCP client nodes
(not yet when in server mode)
2021-12-24 16:18:00 +00:00
Kunihiko Toumura
828888490a check availability of config node on deploy 2021-12-21 18:10:42 +09:00
Kazuhito Yokoi
91cb6ba73b Add Japanese translations for hidden flow (#3302) 2021-12-20 09:34:41 +00:00
Nick O'Leary
4ee4d32b2e Merge pull request #3301 from kazuhitoyokoi/master-fixwelcometour
Fix hide icon in tour guide
2021-12-17 11:19:27 +00:00
Kazuhito Yokoi
8df630a2f5 Fix hide button icon in tour guide 2021-12-17 19:37:29 +09:00
Dave Conway-Jones
2cad42870e chaneg exec, file and inject node to use node.debug rather than -v flag 2021-12-17 09:58:10 +00:00
Nick O'Leary
43651135f3 Replace selectedLinks array with wrapped Set object 2021-12-13 21:02:55 +00:00
Dave Conway-Jones
6ae42eb787 Let JSON parser attempt to parse buffers if they contain strings
and add/fix test
2021-12-10 15:21:43 +00:00
Nick O'Leary
ecaf866613 Fix serialisation of selection in view 2021-12-07 09:29:11 +00:00
Nick O'Leary
5ea3329b36 Allow multiple links to be selected by ctrl-click 2021-12-07 09:19:27 +00:00
Nick O'Leary
7bb7149f4c Snap nodes on grid using either edge as reference 2021-12-05 23:23:57 +00:00
Nick O'Leary
5856d043ca Add node wiring actions 2021-12-05 19:52:47 +00:00
Nick O'Leary
7cd3e49f04 Merge branch 'master' into dev 2021-12-05 19:32:13 +00:00
Nick O'Leary
173e75175e update changelog 2021-12-02 09:30:41 +00:00
Nick O'Leary
800006dd76 Merge pull request #3282 from node-red/tab-buttons
Change tab hide button icon to an eye and add search option
2021-12-02 09:29:28 +00:00
Nick O'Leary
a824b6910a Add tooltips to tabs and close/hide buttons 2021-12-02 09:23:13 +00:00
Nick O'Leary
dcea382b38 Change tab hide button icon to an eye and add search option 2021-12-01 17:54:17 +00:00
Nick O'Leary
d9f976baea Update package for 2.1.4 2021-12-01 16:06:03 +00:00
Nick O'Leary
1fa13efe19 Merge pull request #3281 from node-red/i18n-space-ns-fix
Fix i18n handling of namespaces with spaces in
2021-12-01 15:15:38 +00:00
Nick O'Leary
33af5cd7c6 Apply i18n namespace fix to runtime component 2021-12-01 15:15:08 +00:00
Nick O'Leary
7cb8f97ef1 Fix i18n handling of namespaces with spaces in 2021-12-01 15:08:04 +00:00
Nick O'Leary
bf965a9cde Merge pull request #3280 from node-red/auto-complete-fix
Trigger change event when autoComplete fills in input
2021-12-01 14:38:10 +00:00
Nick O'Leary
17ffff685a Trigger change event when autoComplete fills in input
Fixes #3271
2021-12-01 14:35:45 +00:00
Nick O'Leary
ae76271cff Merge pull request #3279 from node-red/cn-fix
Apply CN i18n fix
2021-12-01 14:26:37 +00:00
Nick O'Leary
8f3a96d615 Apply CN i18n fix
Fixes #3272

Verified with Google Translate this is a better translation for
"Export to library"
2021-12-01 14:25:35 +00:00
Nick O'Leary
30e750dfe5 Merge pull request #3278 from node-red-hitachi/fix-env-var-access
fix env var access using $parent for groups
2021-12-01 14:23:44 +00:00
Nick O'Leary
682dff7c6f Merge pull request #3273 from node-red-hitachi/fix-config-select-name
fix select menu label of config node to use paletteLabel
2021-12-01 14:02:55 +00:00
Nick O'Leary
85415eb8a8 Merge pull request #3275 from node-red-hitachi/fix-node-conflict
fix removed tab not to cause node conflict
2021-12-01 14:01:50 +00:00
Nick O'Leary
68a80b9244 Merge pull request #3277 from node-red/debug-path-fix
Add proper error handling for 404 errors when serving debug files
2021-12-01 13:48:25 +00:00
Hiroyasu Nishiyama
c331da7323 fix env var access using $env for groups 2021-11-27 19:29:57 +09:00
Nick O'Leary
04ffa06221 Add proper error handling for 404 errors when serving debug files 2021-11-26 11:30:51 +00:00
Hiroyasu Nishiyama
1f0690c6ec fix removed tab not to cause node conflict 2021-11-25 13:26:52 +09:00
Hiroyasu Nishiyama
711467abcd fix select menu label of config node to use paletteLabel 2021-11-24 14:06:45 +09:00
Nick O'Leary
9439cd0e3d Merge pull request #3179 from kazuhitoyokoi/dev-addjpn
Add Japanese translations for Node-RED v2.1.0-beta.1
2021-11-22 23:25:33 +00:00
Nick O'Leary
314c19650d Merge pull request #3239 from node-red/group-diff-fix
Group diff fix
2021-11-22 23:25:19 +00:00
Nick O'Leary
ed6afcd802 Merge pull request #3251 from node-red/regex-debug
Handle RegExp types in Debug sidebar
2021-11-22 23:24:55 +00:00
Nick O'Leary
082d4fe8e1 Merge pull request #3252 from node-red/disable-hidden-flow
Only toggle disabled workspace flag if on activeWorkspace
2021-11-22 23:24:39 +00:00
Nick O'Leary
cd23b44506 Merge pull request #3253 from node-red/clear-disabled-status
Do not show status for disabled nodes
2021-11-22 23:24:18 +00:00
Nick O'Leary
46b6b024b9 Merge pull request #3269 from node-red/auth-id
Include full user object on login audit events
2021-11-22 23:24:00 +00:00
Nick O'Leary
cb88cc35e5 Merge pull request #3261 from node-red/fix-delay-2nd-output-when-in-per-topic-mode
fix 2nd output when in rate limit per topic modes
2021-11-22 23:23:35 +00:00
Nick O'Leary
75c0c44809 Merge pull request #3265 from kazuhitoyokoi/master-fixtourguide
Set dimension value for tour guide
2021-11-22 23:23:03 +00:00
Nick O'Leary
a091b82ba9 Merge pull request #3263 from node-red/ti-fix
Avoid redundant initialisation of TypedInput type
2021-11-22 23:20:40 +00:00
Nick O'Leary
a3b8f022e6 Merge pull request #3270 from bonanitech/node-port-label-color
Don't let themes change flow port label color
2021-11-22 23:20:30 +00:00
Nick O'Leary
279fcb7c51 Merge pull request #3267 from node-red-hitachi/fix-link-target-select
fix to show link target when selected
2021-11-22 23:20:04 +00:00
Mauricio Bonani
49a9376073 Change flow port label CSS variable 2021-11-22 16:24:14 -05:00
Nick O'Leary
96840ede56 Include full user object on login audit events 2021-11-22 19:58:48 +00:00
Hiroyasu Nishiyama
7e7f481f99 fix to show link target when selected 2021-11-19 17:14:22 +09:00
Kazuhito Yokoi
3edbf52bc6 Set dimension value for tour guide 2021-11-18 15:38:49 +09:00
Nick O'Leary
fba6e801fc Avoid redundant initialisation of TypedInput type 2021-11-16 14:32:09 +00:00
Nick O'Leary
720a163273 Bump dev version 2021-11-15 23:38:01 +00:00
Nick O'Leary
a9b12e5172 Add search history to main search box 2021-11-15 23:24:57 +00:00
Dave Conway-Jones
6ac0c0a367 fix 2nd output when in rate limit per topic modes
to fix issue found in #3260
2021-11-15 14:05:16 +00:00
Kazuhito Yokoi
300402d253 Add Japanese translation for tour button 2021-11-12 18:15:57 +09:00
Kazuhito Yokoi
0d9bfae503 Add Japanese translations to tour guide for first flow 2021-11-11 13:02:52 +09:00
Nick O'Leary
bfe0d3b8a3 Do not show status for disabled nodes
Fixes #3249
2021-11-08 21:12:13 +00:00
Nick O'Leary
5fdd9c0546 Only toggle disabled workspace flag if on activeWorkspace
Fixes #3244
2021-11-08 20:38:34 +00:00
Nick O'Leary
b6570a16b8 Handle RegExp types in Debug sidebar
Fixes #3245
2021-11-08 20:24:10 +00:00
Kazuhito Yokoi
8e2d3ea16f Remove unused messages in language catalog 2021-11-08 13:46:24 +09:00
Kazuhito Yokoi
bc2c81f058 Add Japanese translations for link call, mqtt and file nodes 2021-11-08 13:38:17 +09:00
Nick O'Leary
3e0f080ea7 Merge pull request #3242 from node-red/inject-fix
Do not modify inject node props in oneditprepare
2021-11-01 21:40:47 +00:00
Nick O'Leary
679e07189d Do not modify inject node props in oneditprepare
Fixes #3241
2021-11-01 20:10:52 +00:00
Nick O'Leary
a38ebef100 Display group changes property in diff view 2021-10-28 12:14:56 +01:00
Nick O'Leary
b8ad6475e1 Strip off env property if it is empty - avoid inflated flow files 2021-10-28 12:14:34 +01:00
Nick O'Leary
0f0cb3ac6d Fix setting object env var properties so they can be undone 2021-10-28 12:14:03 +01:00
Nick O'Leary
d3efb9d7cc Merge pull request #3238 from node-red/treeLister-gutter-fix
Fix treeList gutter calculation to handle floating gutters
2021-10-28 10:46:04 +01:00
Nick O'Leary
84a237d3f5 Fix treeList gutter calculation to handle floating gutters
Fixes #3234
2021-10-28 10:44:50 +01:00
Nick O'Leary
e6de52eede Merge pull request #3236 from hardillb/http-basic-username-only
HTTP Basic Auth should always add : between username and password even if empty
2021-10-28 10:14:02 +01:00
Nick O'Leary
98aee964d7 Merge pull request #3237 from node-red/remove-de-style
Remove styling from de locale files
2021-10-28 10:11:54 +01:00
Nick O'Leary
570e5442e0 Remove styling from de locale files
Fixes #3230
2021-10-28 10:10:22 +01:00
Ben Hardill
b77a2dc353 Better fix 2021-10-28 10:08:28 +01:00
Ben Hardill
87af31de20 HTTP Basic Auth should always add : to username
fix for #3235
2021-10-28 09:18:17 +01:00
Nick O'Leary
cfe201dbe1 Bump for 2.1.3 2021-10-26 10:42:53 +01:00
Nick O'Leary
6ccdab35e0 Merge pull request #3227 from node-red/reload-node-settings
Refresh editor settings whenever a node is added or enabled
2021-10-26 09:51:41 +01:00
Nick O'Leary
55b9f36b45 Merge pull request #3229 from node-red/spinner-css
Revert spinner css change that made it shrink in some cases
2021-10-26 09:51:31 +01:00
Nick O'Leary
fbcb1130c9 Merge pull request #3221 from hardillb/disable-tours
Add environment variable to enable/disable tours
2021-10-26 09:47:17 +01:00
Nick O'Leary
d4f7a6d2bc Revert spinner css change that made it shrink in some cases 2021-10-26 09:44:32 +01:00
Nick O'Leary
8a19f71abe Refresh editor settings whenever a node is added or enabled
Fixes #3217

This ensures any node-provided settings are loaded and ready
for use by the nodes
2021-10-25 20:48:01 +01:00
Nick O'Leary
fb153757b5 Merge pull request #3225 from node-red/i18n-fix
Fix loading non-default language files leaving runtime in wrong locale
2021-10-25 16:06:12 +01:00
Nick O'Leary
4f175fc93e Fix loading non-default language files leaving runtime in wrong locale 2021-10-25 15:58:07 +01:00
Nick O'Leary
2d4ca7cec0 Merge pull request #3224 from node-red/import-msg-fix
Fix import notification message when importing config nodes
2021-10-25 15:12:46 +01:00
Nick O'Leary
bf0ea89969 Fix import notification message when importing config nodes 2021-10-25 15:08:30 +01:00
Nick O'Leary
073f0c2a20 Merge pull request #3223 from node-red/ti-fix
Handle changing types of TypedInput repeatedly
2021-10-25 13:55:38 +01:00
Nick O'Leary
ba83be9062 Handle changing types of TypedInput repeatedly
Fixes #3222
2021-10-25 13:54:42 +01:00
Ben Hardill
2e7188ea4f Add environment variable to enable/disable tours
NODE_RED_ENABLE_TOURS

Also had to patch editor-api/lib/editor/themes.js to pass
`editorTheme.tours` to the editor.
2021-10-25 11:25:31 +01:00
Nick O'Leary
5a012182d9 Update gen-publish script to update 'next' tag for main releases 2021-10-25 10:05:23 +01:00
Nick O'Leary
b855438af6 Fix changelog 2021-10-25 09:42:44 +01:00
Nick O'Leary
2ffea143e7 Bump for 2.1.2 2021-10-25 09:38:32 +01:00
Duncan Bellamy
61d85b49e6 Remove bash dependency (#3216)
Change backticks to dollar sign and parentheses
2021-10-25 08:44:49 +01:00
Nick O'Leary
35f617e96c Merge pull request #3213 from GerwinvBeek/markdown-regex
Improved regex for markdown renderer
2021-10-24 23:04:20 +01:00
Nick O'Leary
6b6ad47c35 Merge pull request #3220 from node-red/ti-fixes
Fix TypedInput initialisation
2021-10-24 22:58:55 +01:00
Nick O'Leary
e57183ed0e Merge pull request #3219 from Steve-Mcl/mqtt-use-datatype
fix datatype in node config not used. fixes #3215
2021-10-24 22:58:36 +01:00
Nick O'Leary
ecfd61a822 Fix TypedInput initialisation handle 2021-10-24 22:53:22 +01:00
Steve-Mcl
153f87704b fix datatype in node config not used. fixes #3215 2021-10-24 22:21:44 +01:00
Gerwin van Beek
836f7d2163 Improved regex for markdown renderer 2021-10-22 17:05:37 +02:00
Nick O'Leary
d4d6f71cf4 Bump for 2.1.1 2021-10-22 09:27:52 +01:00
Nick O'Leary
42a9da006e Merge pull request #3212 from node-red/fix-tour-guide-width
Ensure tourGuide popover doesn't fall offscreen
2021-10-22 09:26:31 +01:00
Nick O'Leary
2bd5c4f527 Ensure tourGuide popover doesn't fall offscreen
Only handles the left hand edge - will need expanding to cover
the other edges as needed
2021-10-22 09:24:40 +01:00
Nick O'Leary
6a49b5c106 Merge pull request #3210 from node-red/fix-old-inject-migration
Fix issue with old inject nodes that migrated topic to 'string' type
2021-10-22 09:16:54 +01:00
Nick O'Leary
23e14d1b72 Merge pull request #3211 from node-red/cache-bust
Add cache-busting query params to index.mst
2021-10-22 09:16:45 +01:00
Nick O'Leary
f4f11c8884 Add cache-busting query params to index.mst 2021-10-22 09:14:01 +01:00
Nick O'Leary
2b220abdb7 Fix issue with old inject nodes that migrated topic to 'string' type 2021-10-22 09:01:24 +01:00
Nick O'Leary
c1d947ebe3 Merge pull request #3207 from node-red/fix-debug-all
Fix TypedInput validation of type without options
2021-10-21 14:45:09 +01:00
Nick O'Leary
d695cf392e Fix TypedInput validation of type without options
Fixes #3206
2021-10-21 14:44:15 +01:00
Nick O'Leary
21304a695c Fix tcprequest deprecation warnings 2021-10-21 09:40:25 +01:00
Nick O'Leary
fa51b06c46 Merge pull request #3205 from node-red/dev
Node-RED 2.1.0
2021-10-21 09:13:09 +01:00
Nick O'Leary
7560bb8d7b Bump for 2.1.0 2021-10-21 09:08:35 +01:00
Nick O'Leary
fc9d65abcc Merge pull request #3204 from node-red/tcp-req-text-output
Add string option to TCP request node output
2021-10-20 09:40:44 +01:00
Dave Conway-Jones
a7413cccd0 reuse existing labels for tcp request buffer/string option 2021-10-20 09:36:08 +01:00
Nick O'Leary
7610353f07 Position popover properly on a scrolled page
Not needed in the core editor, but needed in the docs pages that can scroll
2021-10-19 22:22:53 +01:00
Dave Conway-Jones
d3f978c90c Add optional string type output to tcp request node
to be similar to tcp in. node
2021-10-19 21:34:23 +01:00
Kazuhito Yokoi
b55a8ef62a Merge branch 'dev' into dev-addjpn 2021-10-19 19:20:32 +09:00
Nick O'Leary
8d79deffb5 Merge pull request #3202 from node-red/tour-guide-fix
Fixes from 2.1.0-beta.2
2021-10-19 10:20:24 +01:00
Nick O'Leary
8158487c3e Reduce churn in setting Switch rule typedInput type 2021-10-19 10:12:13 +01:00
Nick O'Leary
0cc061196d Handle changing value before type without reseting TypedInput 2021-10-19 10:11:37 +01:00
Nick O'Leary
d0ec055222 Fix Inject/Change node restoring typedInput options 2021-10-18 21:23:42 +01:00
Nick O'Leary
ae12ddd32b Change node: Fix deepCopy checkbox spacing on Safari 2021-10-18 20:38:46 +01:00
Nick O'Leary
31da3adaa9 Fix hide/show of palette in tour and add MQTT nodes 2021-10-18 20:29:37 +01:00
Nick O'Leary
9fd5213f13 Merge pull request #3201 from node-red/link-fixes
Fix saving link out node links
2021-10-18 09:43:30 +01:00
Nick O'Leary
de882f5849 Fix saving link out node links 2021-10-18 09:32:00 +01:00
Nick O'Leary
fded1e0021 Refix #3170 - copy switch rule type when adding new rule 2021-10-14 21:47:49 +01:00
Nick O'Leary
6cb06c146d Update for 2.1.0-beta.2 2021-10-14 13:07:58 +01:00
Nick O'Leary
b8f1386ad0 Dynamic MQTT connections (#3189)
* add mqtt-control
- adds auto-connect option to broker
- add new node mqtt-control
- adds i18n messages
- adds documentation

* documentation tweaks

* built in documentation improvements

* fix tip layout causing oversized editor

* remove unused requires

* add missing `unsubscribe` dropdown option
- oddly forgotten - now added

* ensure clientid is updated dynamically

* [rewrite] move mqtt-control login into mqtt-in

* Remove dynamic label

* remove redundant mqtt-control code left overs

* Callback for brokerConn.connect (improve done())
- done is now called on connect callback

* fix race condition if connect/disconnect too fast
- node.connected and node.client.connected getting out of sync

* fix connection fail when switching protocol 3 ~ 5
- ensure protocolId is correct for protocolVersion

* change msg.subscribe prop to `msg.topic`

* unsub all topics if msg.topic is `true`

* delete temprary debugger statements

* Final rework of dynamic mqtt connections

Co-authored-by: Steve-Mcl <sdmclaughlin@gmail.com>
2021-10-14 12:05:06 +01:00
Nick O'Leary
2b38b5ea50 Merge pull request #3200 from node-red/fix-link-call-label
Fix link call label
2021-10-14 12:04:25 +01:00
Nick O'Leary
2f707a6b16 Merge pull request #3199 from node-red/switch-project-fix
Fix switching projects
2021-10-14 12:04:07 +01:00
Nick O'Leary
d4c2fcd559 Merge pull request #3198 from node-red/locale-fix
Use locale setting when installing/enabling node
2021-10-14 12:03:54 +01:00
Nick O'Leary
082970cdb7 Merge pull request #3197 from node-red/tour-projects-fix
Do not show projects-wecome dialog until welcome tour completes
2021-10-14 12:03:41 +01:00
Nick O'Leary
fe97c78977 Merge pull request #3196 from node-red/link-fixes
Fix converting selection to subflow
2021-10-14 12:03:28 +01:00
Nick O'Leary
79394aa69f Merge pull request #3195 from node-red/keyboard-fix
Avoid conflicts with native browser cmd-ctrl type shortcuts
2021-10-14 12:03:17 +01:00
Nick O'Leary
21fd6e3c21 Ensure link call node label updates when link-in changes 2021-10-14 12:00:27 +01:00
Nick O'Leary
de4944cd83 Ensure node is resized if its label changes 2021-10-14 11:53:55 +01:00
Nick O'Leary
3fde5c27ed Fix switching projects 2021-10-14 11:07:49 +01:00
Nick O'Leary
e1d492813e Use locale setting when installing/enabling node
Fixes #3194
2021-10-14 10:57:11 +01:00
Nick O'Leary
48d0ee3b6d Do not show projects-wecome dialog until welcome tour completes
Fixes #3193
2021-10-14 10:17:27 +01:00
Nick O'Leary
eebb64901c Fix converting selection to subflow
Fixes #3191
2021-10-14 09:48:35 +01:00
Nick O'Leary
60e0ed2af6 Avoid conflicts with native browser cmd-ctrl type shortcuts
Fixes #3190
2021-10-14 09:34:46 +01:00
Nick O'Leary
f030694ef4 Merge pull request #3183 from node-red/debug-filter-opts
Redesign debug filter options and make them persistant
2021-10-13 14:47:08 +01:00
Nick O'Leary
e9ed13459a Merge pull request #3184 from node-red/inject-spinner-css
Widen Inject interval box for >1 digit
2021-10-13 14:41:52 +01:00
Nick O'Leary
af1e38fdf7 Merge pull request #3185 from node-red/switch-focus-fix
Fix rule focus when switch 'otherwise' rule is used
2021-10-13 14:41:42 +01:00
Nick O'Leary
b12900e680 Merge pull request #3186 from node-red/context-tools-fix
Ensure message tools stay attached to top-level entry in Debug/Context
2021-10-13 14:41:29 +01:00
Nick O'Leary
44aa1f4a5e Filter out Link Out Return nodes in Link In edit dialog
Fixes #3187
2021-10-13 14:23:43 +01:00
Nick O'Leary
9425548a85 Ensure message tools stay attached to top-level entry in Debug/Context
Fixes #3180
2021-10-12 21:11:20 +01:00
Nick O'Leary
bfd4fc81fe Widen Inject interval box for >1 digit 2021-10-12 17:25:30 +01:00
Nick O'Leary
439af2a325 Fix rule focus when switch 'otherwise' rule is used
Fixes #3182
2021-10-12 17:25:13 +01:00
Nick O'Leary
3204b04455 Overhaul Debug sidebar filter and clear button options 2021-10-12 17:24:51 +01:00
Nick O'Leary
bed1be14ba Allow toolip action/content to be updated 2021-10-12 17:24:46 +01:00
Nick O'Leary
7cd92faf0d Separate 'focus' from 'selected' state in treeList 2021-10-12 17:24:41 +01:00
Nick O'Leary
be7e28af5d Update package dependencies 2021-10-12 17:24:10 +01:00
Nick O'Leary
8eaa762ec5 Merge branch 'dev' of github.com:node-red/node-red into dev 2021-10-11 10:01:46 +01:00
Nick O'Leary
953a9f7cd4 Update to latest node-red-admin 2021-10-11 09:58:55 +01:00
Kazuhito Yokoi
36f099d68b Add Japanese translations for Node-RED v2.1.0-beta.1 2021-10-11 16:02:18 +09:00
Nick O'Leary
c8fd5090bd Merge pull request #3178 from node-red/fix-md-help
Fix table tokenizer for node help markdown renderer
2021-10-08 18:14:10 +01:00
Nick O'Leary
155e1be494 Fix table tokenizer for node help markdown renderer 2021-10-08 17:56:24 +01:00
Nick O'Leary
cf5e125cb3 Merge pull request #3175 from node-red/tab-disabled-fix
Ensure tab state updates properly when toggling enable state
2021-10-08 15:52:16 +01:00
Nick O'Leary
764fc8477d Merge pull request #3176 from node-red/long-module-names
Improve handling of long labels in TreeList
2021-10-08 15:52:05 +01:00
Nick O'Leary
d35e62f8cf Merge pull request #3177 from node-red/scroll-tab-bar
Shift-click tab scroll arrows to jump to start/end
2021-10-08 15:51:56 +01:00
Nick O'Leary
904babdd13 Shift-click tab scroll arrows to jump to start/end 2021-10-08 15:45:17 +01:00
Nick O'Leary
154d3842a8 Improve handling of long labels in TreeList 2021-10-08 15:30:43 +01:00
Nick O'Leary
edb8a120bd Ensure tab state updates properly when toggling enable state 2021-10-08 15:09:51 +01:00
Nick O'Leary
cdfeba0b82 Update changelog 2021-10-07 09:37:24 +01:00
Nick O'Leary
8ce1465e9f Merge branch 'master' into dev 2021-10-07 09:35:52 +01:00
Nick O'Leary
a296b1c9c8 Merge pull request #3172 from node-red/tour-210
Update welcome tour for 2.1.0-beta.1
2021-10-07 09:34:52 +01:00
Nick O'Leary
bb8d7058a4 Merge pull request #3173 from mailsvb/mailsvb-typo-http-request
Typo in http request set method translation
2021-10-07 09:33:03 +01:00
mailsvb
816cfa1c7e Typo in http request set method translation 2021-10-07 08:07:57 +02:00
Nick O'Leary
53938200fc Update changelog 2021-10-06 17:36:51 +01:00
Nick O'Leary
3885bb039d Merge branch 'dev' of github.com:node-red/node-red into dev 2021-10-06 17:35:34 +01:00
Nick O'Leary
4adad6e424 Merge pull request #3166 from node-red/output-discarded-rate-limit
Delay node: add option to send intermediate messages on separate output
2021-10-06 17:34:44 +01:00
Nick O'Leary
5fb9531338 Merge branch 'pr_3146' into dev 2021-10-06 17:33:28 +01:00
Nick O'Leary
273d9c76a7 Add fallback when logging uncaughtExceptions 2021-10-06 17:33:04 +01:00
Nick O'Leary
79a1d6c561 RED.notifiy.update should not change fixed state unless explicitly set 2021-10-06 13:52:36 +01:00
Nick O'Leary
4b0eb8475d Fix updating shortcuts in menus after keyboard dialog closed 2021-10-06 13:51:38 +01:00
Nick O'Leary
3dc874b517 Update welcome tour for 2.1.0-beta.1 2021-10-06 12:05:49 +01:00
Nick O'Leary
8a3da1ce8d update changelog 2021-10-06 11:41:27 +01:00
Nick O'Leary
42d90542b5 Merge pull request #3171 from node-red/auto-complete
Add autoComplete widget and add to TypedInput for msg. props
2021-10-06 11:40:20 +01:00
Nick O'Leary
690a93d82d Update changelog 2021-10-06 10:04:30 +01:00
Nick O'Leary
8042fe4e2b Merge branch 'master' into dev 2021-10-06 09:12:16 +01:00
Nick O'Leary
a27ce375db Update package dependencies 2021-10-06 09:11:20 +01:00
Nick O'Leary
db3688799d Merge pull request #3170 from node-red/switch-rule-type
Copy previous rule type when adding rule to switch node
2021-10-05 23:32:17 +01:00
Nick O'Leary
a88be35292 Merge pull request #3168 from node-red/improve-unit-test-coverage
Improve unit test coverage
2021-10-05 23:31:58 +01:00
Nick O'Leary
e2d7fcbfc2 Add lots of docs to RED.popover 2021-10-05 23:18:29 +01:00
Nick O'Leary
421d155586 Add some docs to autoComplete widget 2021-10-05 20:41:21 +01:00
Nick O'Leary
7f9e318214 Add autoComplete widget and add to TypedInput for msg. props 2021-10-05 17:59:44 +01:00
Nick O'Leary
57386edb7c Merge branch 'dev' of github.com:node-red/node-red into dev 2021-10-05 11:26:19 +01:00
Nick O'Leary
94d5ba4550 Tweak table styles 2021-10-05 11:25:35 +01:00
Nick O'Leary
2a0b4ea828 Merge pull request #3167 from node-red/httprequest-send-error
Add option to only send http response errors to Catch node
2021-10-05 10:44:08 +01:00
Nick O'Leary
893ef227d4 Merge pull request #3084 from Steve-Mcl/theme-monaco-theme
Permit plugin theme to theme monaco editor
2021-10-05 10:42:08 +01:00
Nick O'Leary
1fe6e5a00d Merge pull request #3104 from hardillb/client-editor-fixes
Fix editor-client package.json
2021-10-05 10:40:28 +01:00
Nick O'Leary
6c96cde73c Copy previous rule type when adding rule to switch node 2021-10-05 10:34:46 +01:00
Steve-Mcl
2b12834d53 fix typo in boolean logic test 2021-10-05 00:06:25 +01:00
Steve-Mcl
8a2e74b3b8 fix grunt errors 2021-10-04 23:52:55 +01:00
Steve-Mcl
aa1721ab3d Only style ordered list with dl.message-properties 2021-10-04 23:36:22 +01:00
Steve-Mcl
c0a256306b clean up temp enable flag 2021-10-04 23:34:38 +01:00
Steve-Mcl
f0b03b4ada add styling for mardown tables 2021-10-04 23:02:23 +01:00
Steve-Mcl
5503f53af2 Handle marked adding a <p> to ordered lists.
- This causes the text after a number in the numbered list to be on a new line.
- To fix this, a new style rule is required
2021-10-04 23:00:30 +01:00
Steve-Mcl
a89d294b27 Custom markdown rendering to generate style guide 2021-10-04 22:59:34 +01:00
Nick O'Leary
012e1cbcc5 Improve unit test coverage 2021-10-04 17:53:14 +01:00
Nick O'Leary
3759e0f778 Add option to only send http response errors to Catch node 2021-10-04 14:04:59 +01:00
Nick O'Leary
1c18641699 Delay node: add option to send intermediate messages on separate output 2021-10-04 13:00:24 +01:00
Nick O'Leary
e50e2201b1 Merge pull request #3108 from sammachin/patch-2
change template characters
2021-10-04 10:57:04 +01:00
Nick O'Leary
1419729458 Merge pull request #3163 from node-red/notification-fixes
Allow RED.notify.update to modify any notification setting
2021-10-04 10:56:26 +01:00
Nick O'Leary
c14177b0e8 Merge pull request #3160 from node-red/filter-configs
Allow a node to specify a filter for the config nodes it can pick from
2021-10-04 10:56:16 +01:00
Nick O'Leary
126df969b3 Merge pull request #3157 from node-red/relabel-file-nodes
Add paletteLabel to file nodes to make read/write more obvious
2021-10-04 10:56:01 +01:00
Nick O'Leary
f8ee92ba06 Merge pull request #3158 from node-red/node-install-err-reporting
Improve node install error reporting
2021-10-04 10:55:47 +01:00
Nick O'Leary
81a278dd8c Merge pull request #3156 from node-red/change-clone
Add option to deep-clone properties in Change node
2021-10-04 10:54:52 +01:00
Nick O'Leary
a98013806c Merge pull request #3164 from node-red/fix-http-response-layout
Fix sizing of HTTP Response header fields
2021-10-04 10:54:01 +01:00
Nick O'Leary
0171ffac6a Fix sizing of HTTP Response header fields 2021-10-04 10:52:36 +01:00
Nick O'Leary
7544241316 Allow RED.notify.update to modify any notification setting
Fixes #3162
2021-10-04 10:31:46 +01:00
Nick O'Leary
061afb3a94 Improve RED.actions api to ensure actions cannot be overridden
Also alows multiple args to be passed to an action.
2021-10-02 23:26:01 +01:00
Nick O'Leary
8a5eda9c1f Ensure type select button is not focussable when TypedInput only has one type 2021-10-02 23:25:56 +01:00
Nick O'Leary
f62040f0ec Merge pull request #3161 from node-red/tour-theme
Improve themeing of tourGuide
2021-10-02 23:24:22 +01:00
Nick O'Leary
f2e51779e4 Improve themeing of tourGuide 2021-10-02 23:15:35 +01:00
Nick O'Leary
da114fa3a5 Merge pull request #3152 from node-red/link-call
Add Link Call node
2021-10-01 15:59:43 +01:00
Nick O'Leary
3775a1657b Merge pull request #3153 from node-red/update-monaco
Update monaco to 0.28.1
2021-10-01 15:59:16 +01:00
Nick O'Leary
2bd7c4bc81 Merge pull request #3159 from node-red/multi-select-typedInput
Do better remembering TypedInput values whilst switching types
2021-10-01 15:40:59 +01:00
Nick O'Leary
253c489a33 Allow a node to specify a filter for the config nodes it can pick from 2021-09-30 19:44:34 +01:00
Nick O'Leary
ac84b6fe3f Do better remembering TypedInput values whilst switching types 2021-09-30 18:14:45 +01:00
Nick O'Leary
8761e61439 Include load error in notification of unknown node 2021-09-30 15:39:45 +01:00
Nick O'Leary
29e903e1c8 Improve error reporting when installing bad nodes 2021-09-30 15:28:09 +01:00
Nick O'Leary
ec27e19e3f Add unit tests for Join restartTimeout and update help 2021-09-30 10:59:45 +01:00
Nick O'Leary
5df0dae11a Merge pull request #3121 from magma1447/dev
SPLIT Join node - support for msg.resetTimeout …
2021-09-30 10:45:42 +01:00
Nick O'Leary
7fffc1a36d Merge pull request #3069 from node-red/delay-push-to-front
Add push to front of rate limit queue.
2021-09-30 10:44:14 +01:00
Nick O'Leary
f3d0179834 Add paletteLabel to file nodes to make read/write more obvious 2021-09-30 10:41:18 +01:00
Nick O'Leary
8bf69c598a Ensure tab scroll handles are cleared when hide-all tabs run 2021-09-30 10:34:18 +01:00
Nick O'Leary
aa5fad6628 Add deep copy option to Change node 'set' action 2021-09-30 09:49:51 +01:00
Nick O'Leary
b0f1fad4e2 Change label for 'set' change node action to make it clearer 2021-09-29 19:43:30 +01:00
Nick O'Leary
3b6d0995b4 Merge pull request #3155 from node-red/config-select
Ensure config-node select inherits width properly from input
2021-09-29 19:14:12 +01:00
Nick O'Leary
0cbf4ac37d Better regex for parsing config select width placeholder style 2021-09-29 19:12:13 +01:00
Nick O'Leary
9ccffee82c Ensure config-node select inherits width properly from input
Fixes #3001
2021-09-29 19:06:34 +01:00
Nick O'Leary
1b38e2eedf Merge pull request #3154 from node-red/fix-windows-themes
Fix serving of theme files on Windows
2021-09-29 18:00:41 +01:00
Nick O'Leary
ce87abe96e Fix serving of theme files on Windows
Fixes #3097
2021-09-29 17:59:25 +01:00
Nick O'Leary
becbda8483 Update monaco types 2021-09-29 17:28:06 +01:00
Nick O'Leary
da210e2ae4 Ignore top-level await errs in monaco
Fixes #3138
2021-09-29 17:19:12 +01:00
Nick O'Leary
d4fc6feeba Update to monaco 0.28.1 2021-09-29 17:17:34 +01:00
Nick O'Leary
f1cbca8d76 Add link-call help 2021-09-29 14:46:09 +01:00
Nick O'Leary
dfd9364061 Add timeout option to link-call node 2021-09-29 14:28:12 +01:00
Nick O'Leary
1931395fdb Add basic link-call/return tests 2021-09-29 13:49:55 +01:00
Nick O'Leary
b01fd24e15 Add link-call node and add return mode for link-out node 2021-09-29 10:45:00 +01:00
Nick O'Leary
c9d1329fc2 Add 'radio' option to treeList 2021-09-29 10:44:09 +01:00
Nick O'Leary
ab2d3bfd80 Fix RED.nodes.filterNodes when searching full node set 2021-09-29 10:43:41 +01:00
Nick O'Leary
36bb172f29 Merge pull request #3151 from GerwinvBeek/dev
Restore tab selection after merging conflicts
2021-09-29 00:43:25 +01:00
Gerwin van Beek
01e64be39d rename 2021-09-28 17:33:23 +02:00
Gerwin van Beek
4ebe160f6c Restore tab selection after merging conflicts 2021-09-28 17:19:22 +02:00
Nick O'Leary
b427eca21f Merge pull request #3136 from node-red/tour-guide-2
Add Tour Guide component
2021-09-27 17:59:05 +01:00
Nick O'Leary
3eb438c8d2 Merge pull request #3116 from node-red-hitachi/dev-httpreqlog
Extend HTTP request node to log detailed timing information
2021-09-27 17:56:34 +01:00
Nick O'Leary
068f425833 Merge pull request #3139 from node-red/fs-promises
Fixes to fs promises so that an electron built version runs
2021-09-27 17:51:10 +01:00
Nick O'Leary
b3c84242dc Bump version for 2.1.0-beta.1 2021-09-27 17:50:09 +01:00
Nick O'Leary
24672d91d8 Fix linting error in tourGuide 2021-09-27 17:49:38 +01:00
Nick O'Leary
4422af26ec Try to handle smaller screen sizes in tourGuide 2021-09-27 17:35:49 +01:00
Nick O'Leary
5329e803e2 Add keyboard handling to tourGuide - escape/enter 2021-09-27 17:35:24 +01:00
Nick O'Leary
ad542b91fa Add i18n support to tours 2021-09-27 17:34:30 +01:00
Nick O'Leary
e9e03c945b Add core:show-welcome-tour action and logic to display on first-run 2021-09-27 16:42:51 +01:00
Nick O'Leary
e20cfb3dae Ignore dynamicImport warning from jshint 2021-09-26 20:46:43 +01:00
Nick O'Leary
48baac916c Add initial tour-guide feature 2021-09-26 20:46:38 +01:00
Nick O'Leary
adadf38b08 Allow menu items to be opened via css class 2021-09-26 20:46:33 +01:00
Nick O'Leary
d4e1469450 Allow default tab to be specified when editing flows/groups/subflows 2021-09-26 20:46:28 +01:00
Nick O'Leary
2c456f044f Allow popovers to be moved and styled 2021-09-26 20:46:23 +01:00
Nick O'Leary
228c15ace3 Fix icon position in dropdown menu 2021-09-26 20:38:55 +01:00
Nick O'Leary
a0d15e6e7b Fix menu error for workspace tab button 2021-09-26 20:08:15 +01:00
Dave Conway-Jones
2fe78cf971 Update packages/node_modules/@node-red/util/lib/i18n.js
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2021-09-25 14:51:47 +01:00
Nick O'Leary
5ec3544340 Merge pull request #3148 from node-red/login-fixes
Improve error reporting with oauth login strategies
2021-09-24 22:40:15 +01:00
Nick O'Leary
5443a17775 Merge pull request #3120 from node-red/hide-flows
Allow tabs to be hidden
2021-09-24 22:39:42 +01:00
Nick O'Leary
40d60e4eb3 Add allowUpdate to settings file 2021-09-24 22:23:50 +01:00
Nick O'Leary
f3312a6403 Merge pull request #3143 from node-red/upgrade-deny-list
Add allowUpdate feature to externalModules.palette
2021-09-24 22:20:58 +01:00
Nick O'Leary
e638b55b30 Merge pull request #3149 from hardillb/coreNodesDir-false
Allow coreNodesDir to be set to false
2021-09-24 22:20:11 +01:00
Nick O'Leary
5caa76a8b3 Widden default menu to handle shortcuts 2021-09-24 22:15:02 +01:00
Nick O'Leary
901a5ce9d2 Better fade effect when hiding tabs 2021-09-24 22:10:53 +01:00
Nick O'Leary
6ab74951f4 Fix menu shortcut display when menu label is long 2021-09-24 19:44:05 +01:00
Nick O'Leary
c2625d696d Merge branch 'dev' into hide-flows 2021-09-24 19:12:34 +01:00
Ben Hardill
77fb5ef2ab Allow coreNodesDir to be set to false
This will disable all core nodes
2021-09-22 10:21:23 +01:00
Steve-Mcl
c20ca3399e codeEditor.options should take precedence
- over plugins monacoOptions
2021-09-21 14:12:21 +01:00
Steve-Mcl
5825da9c76 Merge branch 'dev' into theme-monaco-theme 2021-09-21 14:06:54 +01:00
Nick O'Leary
e3853ae402 Improve error reporting with oauth login strategies 2021-09-20 11:48:51 +01:00
Renato Junior
bd142a9710 uncaughtException debug improvements
Changed error uncaughtException tracing
2021-09-17 22:02:48 -03:00
Dave Conway-Jones
4f23847546 Fix UDP node to not not use port if unassigned 2021-09-16 16:22:01 +01:00
Nick O'Leary
85820c571d Add unit tests for allowUpdate settings 2021-09-14 10:50:26 +01:00
Nick O'Leary
d9bed03025 Add allowUpdate feature to externalModules.palette 2021-09-13 21:25:12 +01:00
Nick O'Leary
d6e05962c9 Merge pull request #3140 from harmonic7/dev
Allow colouring of tab icon svg
2021-09-13 09:23:59 +01:00
Casey Wilkes
d32636ed6b Tweak theme tests for tabicon colour config 2021-09-10 23:16:42 +12:00
Dave Conway-Jones
bbf066f030 Fixes to fs promises so that electron version runs 2021-09-10 08:33:07 +01:00
Casey Wilkes
a3d2f6592e Add support for colouring tab icon in settings.js
```
editorTheme: {
    page: {
       tabicon: {
           icon: "full/path/of/tabicon.svg",
           colour: "#008f00"
    }
}
```

The old way still works also (but doesn't allow the tabicon to
be coloured:
```
editorTheme: {
    page: {
       tabicon: "full/path/of/tabicon.svg"
    }
}
```
2021-09-10 13:10:01 +12:00
Nick O'Leary
87b6327c5e Merge branch 'dev' into hide-flows 2021-09-07 13:53:45 +01:00
Nick O'Leary
abaebb329d Merge branch 'dev' into edit-panes-2 2021-09-07 13:42:49 +01:00
Nick O'Leary
8970fe412d Merge pull request #3124 from node-red/raise-lower-nodes
Allow nodes to be raised/lowered in the workspace
2021-09-07 12:19:56 +01:00
Nick O'Leary
9dc5ae21c4 Add menu options for raise/lower actions 2021-09-07 12:04:58 +01:00
Nick O'Leary
4132fb79a6 Allow nodes to be raised/lowered in the workspace 2021-09-07 11:49:31 +01:00
Nick O'Leary
9a4dc30604 Merge pull request #3110 from node-red/view-tools
Add align actions to editor
2021-09-07 11:49:10 +01:00
Nick O'Leary
192b542fe4 Add menu options for align tools and show shortcuts on menu 2021-09-07 11:47:04 +01:00
Kunihiko Toumura
490547cd3d Use httpRequestTimingLog for enable detailed timing log 2021-09-05 15:22:13 +09:00
Dave Conway-Jones
17f9829498 Fix for incorrect tcpout connection count
to Close #3098
seems to need dummy data receiver in order to recognise other callbacks.
2021-09-03 13:00:06 +01:00
Nick O'Leary
234e77fd06 Rename registerEditPane function 2021-09-02 22:12:32 +01:00
Nick O'Leary
87ac831c8a Simplify edit pane api 2021-09-02 21:59:30 +01:00
Nick O'Leary
4e92492165 Edit panes should not need to create own tray content div 2021-09-02 21:44:06 +01:00
Nick O'Leary
c3d0b1114f Fix jshint error 2021-09-02 16:37:13 +01:00
Nick O'Leary
4463a7d4ba Move envVar list component to own file 2021-09-02 16:14:35 +01:00
Nick O'Leary
741fe3dd90 Move tab edit dialog into editor and use new edit panes 2021-09-02 14:29:58 +01:00
Nick O'Leary
e910f3915d Initial refactor of edit dialogs to separate panes 2021-09-02 10:33:43 +01:00
Nick O'Leary
39aafc5007 Ensure treeList row has suitable min-height when no content
Fixes #3109
2021-09-02 10:26:54 +01:00
Nick O'Leary
9b83afae42 Fix typo in ko editor.json
Fixes #3119
2021-09-02 10:26:49 +01:00
Mauricio Bonani
bdf54f6cff Change fade color when hovering an inactive tab 2021-09-02 10:26:44 +01:00
Mauricio Bonani
f2a9887a12 Place close tab link in front of fade 2021-09-02 10:26:39 +01:00
bartbutenaers
4f4d78bfab Key and certificate as string or buffer 2021-09-02 10:26:34 +01:00
Nick O'Leary
3b460fb8fa Bump for 2.0.6 2021-09-02 09:00:54 +01:00
Nick O'Leary
ee15e9acc5 Update tar to latest 2021-09-02 08:21:10 +01:00
Nick O'Leary
48fce35fb3 Merge pull request #3128 from aksswami/master
Update tar to 6.1.9 to resolve vulnerability issue
2021-09-02 08:20:15 +01:00
Amit Kumar Swami
78899378c2 Update tar to 6.1.9 to resolve vulnerability issue 2021-09-02 13:36:41 +08:00
Hiroyasu Nishiyama
67404a327d merge getFlowSetting to getSetting 2021-09-01 22:26:31 +09:00
Sam Machin
702dfa4b79 Update packages/node_modules/@node-red/nodes/locales/en-US/function/80-template.html
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2021-08-31 16:59:32 +01:00
Nick O'Leary
2144407e41 Merge pull request #3117 from dschmidt/passport-callback-arity
Give passport verfiy callback wrapper the same arity as the original callback
2021-08-31 16:45:43 +01:00
Nick O'Leary
b36dd62c50 Remove console.log 2021-08-31 15:23:50 +01:00
Nick O'Leary
7026df7d96 Track hidden tabs in localStorage 2021-08-31 15:19:04 +01:00
Nick O'Leary
ed8e7afdf6 Add flow tab bar menu 2021-08-31 14:46:11 +01:00
Hiroyasu Nishiyama
d78e5932f9 update according to PR comments 2021-08-30 08:00:58 +09:00
Nick O'Leary
26d83bb9ea Ensure treeList row has suitable min-height when no content
Fixes #3109
2021-08-27 16:32:43 +01:00
Nick O'Leary
8e89b1bdf2 Fix typo in ko editor.json
Fixes #3119
2021-08-27 16:22:58 +01:00
Nick O'Leary
c880cc0987 Add core:hide-other-tabs and handle multiple tab selection 2021-08-27 11:46:30 +01:00
Nick O'Leary
0874ba7a03 Add core:show-last-hidden-tab and update keymap 2021-08-26 22:20:25 +01:00
Nick O'Leary
7962278475 Allow tabs to be hidden via x-button on tab 2021-08-26 12:06:35 +01:00
Nick O'Leary
c8949f5eeb Fix treeList gutter padding for outliner 2021-08-26 12:06:30 +01:00
Nick O'Leary
8108b93c5f Add core:toggle-tabs action 2021-08-26 12:06:25 +01:00
Nick O'Leary
9dbe531bf7 Remove duplicate hide-tab action 2021-08-26 12:06:20 +01:00
Nick O'Leary
46e2ff1001 Allow tabs to be hidden 2021-08-26 12:06:15 +01:00
Nick O'Leary
d2cdc67ec7 Add distribute-horizontally/vertically actions to editor 2021-08-26 12:05:56 +01:00
Nick O'Leary
56121203bf Rename align actions to match existing align-selection-to-grid 2021-08-26 12:05:51 +01:00
Nick O'Leary
e13133fd2b Add align actions to editor 2021-08-26 12:05:45 +01:00
Magnus Månsson
f20565fd16 Renamed resetTimeout to restartTimeout
Updated documentation differently
2021-08-25 21:53:37 +02:00
Magnus Månsson
cf2d5841f5 SPLIT Join node - support for payload.resetTimeout to restore original timeout 2021-08-25 12:52:10 +02:00
Dominik Schmidt
630d2ca926 Give passport verfiy callback wrapper the same arity as the original callback passed in via options 2021-08-23 15:57:44 +02:00
Nick O'Leary
34cb93794c Merge pull request #3106 from bonanitech/fade-on-hover
Fix fade colors when hovering over tabs
2021-08-23 12:34:42 +01:00
Nick O'Leary
122b5ba468 Merge pull request #3115 from bartbutenaers/https-settings-as-string
Key and certificate as string or buffer
2021-08-23 12:25:56 +01:00
Kunihiko Toumura
401466d6c0 Add timing log 2021-08-23 11:54:05 +09:00
bartbutenaers
7f2627dbc8 Key and certificate as string or buffer 2021-08-21 22:21:58 +02:00
Hiroyasu Nishiyama
6aecc3915c add support of environtment variable for tab & group 2021-08-19 21:15:13 +09:00
Dave Conway-Jones
ef1b3aa7f5 Add comment to info docs re queue depth limit setting 2021-08-18 14:05:42 +01:00
Sam Machin
1aaab2a814 change template characters
Added note about changing template characters
2021-08-12 16:41:32 +01:00
Mauricio Bonani
e93734b209 Change fade color when hovering an inactive tab 2021-08-10 14:26:41 -04:00
Mauricio Bonani
9e5218f6b4 Place close tab link in front of fade 2021-08-10 14:21:54 -04:00
Ben Hardill
711ec39327 Fix editor-client package.json
The main entry pointed to non-existant entry.

Also fixed error when loading nodes lazily
2021-08-06 21:16:34 +01:00
Steve-Mcl
08049252f2 permit plugin theme to change other monaco options 2021-07-31 10:24:48 +01:00
Nick O'Leary
f1e7ec0c6b Bump for 2.0.5 2021-07-30 13:28:52 +01:00
Nick O'Leary
23765d9139 Update tar dependency 2021-07-30 13:20:26 +01:00
Nick O'Leary
43febe269c Add support for maintenance streams in generate-publish-script 2021-07-30 13:19:36 +01:00
Nick O'Leary
40233c7702 Fix regression in Join node when manual joining array with msg.parts present
Fixes #3096
2021-07-30 13:17:05 +01:00
Nick O'Leary
27ed81614b Remove default ctrl-enter keybinding from monaco editor
Fixes #3093
2021-07-30 11:50:21 +01:00
Nick O'Leary
889d23e9bd Update changelog 2021-07-28 11:02:11 +01:00
Nick O'Leary
f8571023f6 Fix inject now button unable to send empty props 2021-07-28 10:59:16 +01:00
Nick O'Leary
6364e00202 Merge pull request #3092 from hardillb/http-req-ca-fix
Copy tls.cert to tls.certificate for GOT
2021-07-28 10:05:19 +01:00
Ben Hardill
a76c6f86c6 Add Testcase & Fix typo 2021-07-28 08:52:35 +01:00
Ben Hardill
555e815402 Copy tls.cert to tls.certificate for GOT 2021-07-27 22:19:35 +01:00
Steve-Mcl
8a1d81989b use codeEditor.options.theme 2021-07-26 21:02:11 +01:00
Nick O'Leary
ee9234b2c6 Bump for 2.0.4 2021-07-26 17:09:26 +01:00
Nick O'Leary
735b9c5844 Handle just-copied-but-not-deployed node with credentials in editor
Fixes #3090
2021-07-26 14:50:00 +01:00
Nick O'Leary
064f3eb3bc Fix RBE node handling of default topi property
Fixes #3087
2021-07-26 14:36:09 +01:00
Nick O'Leary
f1775d4fd1 Handle partially encoded url query strings in request node 2021-07-26 14:21:52 +01:00
Nick O'Leary
a9bc111c4f Merge pull request #3089 from hardillb/http-req-ca-fix
Fix support for supplied CA certs
2021-07-26 14:20:08 +01:00
Nick O'Leary
c100612473 Merge pull request #3085 from bonanitech/fade-colors
Fix tab fade CSS for when using themes
2021-07-26 14:08:15 +01:00
Ben Hardill
26087f8dc7 Fix support for supplied CA certs 2021-07-26 10:25:06 +01:00
Mauricio Bonani
36e75cb728 Fix tab fade CSS for when using themes 2021-07-25 11:08:55 -04:00
Steve-Mcl
d7a2fc2be4 use them plugin theme monacoTheme if present 2021-07-25 15:16:49 +01:00
Nick O'Leary
142176f194 Bump for 2.0.3 2021-07-23 14:38:43 +01:00
Nick O'Leary
c5892fc17e Fix HTML parsing when body is included in the select tag
Fixes #3079
2021-07-23 10:09:00 +01:00
Nick O'Leary
6e69cfbca4 Preserve case of user-provided http headers in request node
Fixes #3081
2021-07-23 09:55:32 +01:00
Nick O'Leary
775181f761 Set decompress to false for HTTP Request to keep 1.x compatibility
Fixes #3083
2021-07-23 08:57:44 +01:00
Nick O'Leary
36e83d628e Add unit tests for HTTP Request encodeURI and error response 2021-07-23 00:10:17 +01:00
Nick O'Leary
5f6fcb2bc0 Do not throw HTTP errors in request node
Fixes #3082

GOT will throw errors for non-successful http responses by default. We need to turn that
off to be consistent with the 1.x behaviour using the request module
2021-07-22 23:48:30 +01:00
Nick O'Leary
7b106e5650 Ensure uri is properly encoded before passing to got module
Fixes #3080
2021-07-22 23:47:32 +01:00
Nick O'Leary
79d9c83a2d Better detection of broken agent-base function patching 2021-07-22 11:19:25 +01:00
Nick O'Leary
269669ba28 Bump for 2.0.2 2021-07-22 11:17:48 +01:00
Nick O'Leary
4ef7240598 Handle other error types in Manage Palette view
We still get [object Object] appearing in the palette manager sometimes.
This fix nails down another cause - where the err property has a 'code'
but no 'message' property. This happens with the type_already_registered
error
2021-07-21 17:26:19 +01:00
Nick O'Leary
efdf689c31 Merge pull request #3076 from node-red/unpatch-https
Detect if agent-base has patch https.request and undo it
2021-07-21 17:07:29 +01:00
Nick O'Leary
f7606e92ca Detect if agent-base has patch https.request and undo it
Fixes #3072
2021-07-21 16:22:28 +01:00
Nick O'Leary
6750be3ec9 HTTP Request node - ignore invalid cookies rather than fail request
Fixes #3075

Keeps behaviour consistent with the request module
2021-07-21 14:09:15 +01:00
Nick O'Leary
68fb5089f8 Fix msg.reset handling in Delay node
Fixes #3074
2021-07-21 11:32:45 +01:00
Nick O'Leary
a8d093bacd Use file:// url with dynamic import 2021-07-21 11:00:24 +01:00
Nick O'Leary
233a1995b3 Fix tab fade css because Safari
Fixes #3073
2021-07-21 10:26:06 +01:00
Nick O'Leary
8ef3baaffb Fix error closing library dialog with monaco 2021-07-21 10:10:07 +01:00
Nick O'Leary
c9597b9447 Bump for 2.0.1 2021-07-20 14:44:47 +01:00
Nick O'Leary
b2dc1d8b23 Ensure default module export is exposed in Function node 2021-07-20 14:42:43 +01:00
Nick O'Leary
859c0c7f6c Update to latest node-red-admin 2021-07-20 11:19:13 +01:00
Nick O'Leary
aaf18e2416 Merge branch 'master' into dev 2021-07-20 11:11:28 +01:00
Nick O'Leary
fd679ef117 Update contributing docs 2021-07-20 11:10:41 +01:00
Nick O'Leary
6cc611b3f1 Merge branch 'master' into dev 2021-07-20 11:04:25 +01:00
Nick O'Leary
77ee726f66 Fix focus outline overlap in button-groups
Fixes #3070
2021-07-20 11:03:28 +01:00
Nick O'Leary
dc603b76a4 Fix focus outline overlap in button-groups
Fixes #3070
2021-07-20 11:02:24 +01:00
Nick O'Leary
bcb3371acc Fix another typo in issue template 2021-07-16 12:34:54 +01:00
Nick O'Leary
d14ce7e476 Fix typo in issue template 2021-07-16 12:30:21 +01:00
Dave Conway-Jones
4d26b806dd delay - add test for push toFront and flush=1 2021-07-16 11:38:06 +01:00
Dave Conway-Jones
a2b95dbb39 delay node - change lifo property to toFront
add info to sidebar
add tests
2021-07-16 11:31:21 +01:00
Nick O'Leary
47f7b43bcc Update bug_report.yml 2021-07-16 10:21:51 +01:00
Nick O'Leary
77fd8c120c Update bug_report.yml 2021-07-16 10:20:23 +01:00
Nick O'Leary
a1a6f40158 Update issue templates to use GH forms 2021-07-16 10:16:09 +01:00
Nick O'Leary
ed09cd7489 Merge pull request #3068 from hardillb/http-auth-fix
Fix for #3067
2021-07-16 09:47:57 +01:00
Nick O'Leary
eb3330d145 Fix vertical sizing of function node edit dialog 2021-07-16 09:44:56 +01:00
Nick O'Leary
5ba0588c7b Merge branch 'master' into dev 2021-07-16 08:53:35 +01:00
Nick O'Leary
d4a199f0e1 Avoid prototype pollution in RED.view.calculateTextDimensions 2021-07-16 08:52:00 +01:00
Ben Hardill
32dd186f4d Prevent Overwite of configured creds 2021-07-16 08:47:30 +01:00
Dave Conway-Jones
d820f55358 Add push to front of rate limit queue.
(moved random delay to top to group with other delay types.
Tests and docs to follow
2021-07-15 22:15:46 +01:00
Ben Hardill
81f0fb3c74 Fix creds in URL 2021-07-15 18:32:51 +01:00
Ben Hardill
972c83cd52 Fix for #3067
Check if there are any content to the credential object
2021-07-15 17:35:03 +01:00
Nick O'Leary
66a704af55 Fallback to 'require' if on node < 12.17 2021-07-15 15:38:07 +01:00
Nick O'Leary
31c5d6e1c1 Update changelog 2021-07-15 15:38:02 +01:00
Nick O'Leary
bf0ab95c09 Merge pull request #3066 from node-red-hitachi/update-message-jp
Update Japanese message catalogue
2021-07-15 13:17:41 +01:00
Hiroyasu Nishiyama
c1d85f760d update Japanese message catalogue 2021-07-15 21:09:20 +09:00
Nick O'Leary
88ad2f4c18 Merge pull request #3065 from node-red/funcExtMod-default
Enable functionExternalModules by default
2021-07-15 10:14:28 +01:00
Nick O'Leary
be9f9e7b0c Change default functionExternalModules test 2021-07-15 10:13:21 +01:00
Nick O'Leary
2cc1973f62 Enable functionExternalModules by default 2021-07-15 10:07:52 +01:00
Nick O'Leary
eb4625a0b9 Merge pull request #3064 from node-red/revert-external-modules-dir
Move externalModules back into the user dir
2021-07-15 09:56:23 +01:00
Nick O'Leary
5bfb01254b Add unit tests for externalModules.import 2021-07-15 09:52:53 +01:00
Nick O'Leary
bb80fa4a2d Fix externalModules tests 2021-07-14 23:38:46 +01:00
Nick O'Leary
ddb715d88d Record runtime-installed modules in .config.modules.json 2021-07-14 23:13:52 +01:00
Nick O'Leary
395b499856 Fix async loading of modules in function node 2021-07-14 21:10:59 +01:00
Nick O'Leary
cce6a47f11 Rework function module screen 2021-07-14 20:23:01 +01:00
Nick O'Leary
7fd17b4ec0 Add RED.import to support importing ES6 modules 2021-07-14 19:18:39 +01:00
Nick O'Leary
e16ab2a0fd Bump for 2.0.0 2021-07-13 11:51:23 +01:00
Nick O'Leary
15f5364c30 Update changelog 2021-07-13 11:50:38 +01:00
Nick O'Leary
65081767bf Fix externalModules tests 2021-07-13 11:44:12 +01:00
Nick O'Leary
c7c595e5fa Merge pull request #3063 from kazuhitoyokoi/dev-addjpn
Add Japanese translations for Node-RED v2.0
2021-07-13 11:37:23 +01:00
Nick O'Leary
5b24e8b69c Merge pull request #3059 from node-red/delay-queue
Delay node updates to added numeric flush control for releasing things from queue
2021-07-13 11:37:13 +01:00
Nick O'Leary
e6a845e606 Move externalModules back into the user dir 2021-07-13 11:24:10 +01:00
Kazuhito Yokoi
ec8b8a7b87 Change translation to be same as other usages 2021-07-13 14:15:37 +09:00
Kazuhito Yokoi
51a9205105 Add Japanese translations for Node-RED v2.0 2021-07-13 14:05:44 +09:00
Nick O'Leary
ed5567fc73 Merge pull request #3056 from node-red/ws-ping
Allow websocket client node to send pings
2021-07-12 19:40:57 +01:00
Nick O'Leary
4b3f5d74a0 Merge pull request #3058 from kazuhitoyokoi/master-fixdependencies
Add necessary modules and remove unnecessary module in dependencies
2021-07-12 19:40:40 +01:00
Nick O'Leary
b01c5a05e7 Fix reporting of type_already_registered error 2021-07-12 16:09:25 +01:00
Nick O'Leary
36eddabc1c Ensure node.types is defined if node html file missing 2021-07-12 16:09:02 +01:00
Dave Conway-Jones
ea11aa7a0d add some part flush tests 2021-07-08 13:51:37 +01:00
Nick O'Leary
e7efa76e6d Add a slight fade to tab labels that overflow 2021-07-08 12:23:15 +01:00
Dave Conway-Jones
41c8ca8ab4 Delay node updates to added flush control for queuing 2021-07-08 12:13:23 +01:00
Nick O'Leary
4624079be7 Merge pull request #3057 from kazuhitoyokoi/dev-fixdependencies
Add necessary modules and remove unnecessary module in dependencies
2021-07-08 12:07:07 +01:00
Nick O'Leary
c6f6042271 Show config node details when selected in outliner 2021-07-08 12:03:20 +01:00
Nick O'Leary
e9e3b9b7c6 Fix layout of info outliner for subflow entries 2021-07-08 12:02:11 +01:00
Kazuhito Yokoi
becbb09a29 Add necessary modules and remove unnecessary module in dependencies 2021-07-08 19:50:26 +09:00
Kazuhito Yokoi
6f6ab50995 Add necessary modules and remove unnecessary module in dependencies 2021-07-08 19:14:53 +09:00
Nick O'Leary
d8ee766860 Allow websocket client node to send pings 2021-07-08 10:51:36 +01:00
Nick O'Leary
108c26d8af Merge pull request #3055 from bonanitech/grip-horizontal
Fix grip on panels separator
2021-07-08 08:41:48 +01:00
Nick O'Leary
ed8d3088ca Merge pull request #3054 from bonanitech/scriptFiles
Fix scriptFiles
2021-07-08 08:41:18 +01:00
Nick O'Leary
46c4e2d212 Merge branch 'master' into dev 2021-07-08 08:40:44 +01:00
Nick O'Leary
94891d45f9 Merge pull request #3052 from kazuhitoyokoi/dev-fixdependencies
Add fs-extra module to dependencies in @node-red/util module
2021-07-08 08:39:51 +01:00
Nick O'Leary
7448ad109e Add missing dependency to @node-red/utils module 2021-07-08 08:39:20 +01:00
Mauricio Bonani
6211dfe024 Fix grip on horizontally displayed panels separator 2021-07-07 09:52:47 -04:00
Mauricio Bonani
9b85200954 Fix grip on panels separator 2021-07-07 09:24:14 -04:00
Mauricio Bonani
94ee739d91 Fix scriptFiles 2021-07-07 09:12:58 -04:00
Kazuhito Yokoi
e81a6db9a3 Add fs-extra module to dependencies in @node-red/util module 2021-07-05 13:34:56 +09:00
Nick O'Leary
b2f5a259ab Fix exec node test for gh-actions
The node adds `shell` to `execOpts` if `/bin/bash` exists. Clearly it
has not existed in Travis or running locally - but it does exist
on gh-action runner, so the test was failing.
2021-07-02 10:15:44 +01:00
Nick O'Leary
c8a0d3c10d Add error handling to exec test 2021-07-02 10:09:00 +01:00
Nick O'Leary
97df964051 Update changelog 2021-07-02 10:02:08 +01:00
Nick O'Leary
66dd05f8bc Merge branch 'master' into dev 2021-07-02 10:01:07 +01:00
Nick O'Leary
19589d9117 Merge branch 'master' into dev 2021-07-02 10:00:43 +01:00
Nick O'Leary
8147b2e0b1 Update changelog 2021-07-02 09:58:56 +01:00
Nick O'Leary
be22f8cd14 Update js-yaml 2021-07-02 09:39:19 +01:00
Nick O'Leary
868be9b7ff Update node-red-admin to 2.1 2021-07-02 09:37:14 +01:00
Nick O'Leary
5011281104 Merge branch 'dev' of github.com:node-red/node-red into dev 2021-07-02 09:22:56 +01:00
Nick O'Leary
42992c64ec Merge branch 'pr_3026' into dev 2021-07-02 09:22:35 +01:00
Nick O'Leary
2baff243ed Rename exec node hideWin option 2021-07-02 09:22:08 +01:00
Nick O'Leary
83440a6b0f Merge pull request #3047 from node-red/config-outliner-fix
Emit `nodes:change` for any updated config node when node deleted/added
2021-07-02 08:47:46 +01:00
Nick O'Leary
87c9a1c06c Include hasUser=false config nodes when exporting whole flow (#3048) 2021-07-01 21:40:57 +01:00
Nick O'Leary
b848fe249f Remove stray console.log from mqtt.html 2021-07-01 21:01:11 +01:00
Nick O'Leary
1e804d97ce Fix padding of compact notification
Closes #3045
2021-07-01 20:57:42 +01:00
Nick O'Leary
218d3c144b Emit nodes:change for any updated config node when node deleted/added 2021-07-01 20:52:13 +01:00
Nick O'Leary
05a4905490 Fix padding of compact notification
Closes #3045
2021-07-01 17:23:52 +01:00
Nick O'Leary
75103da378 Merge pull request #3044 from hardillb/hpagent-update
Bump hpagent to 0.1.2
2021-07-01 17:09:07 +01:00
Ben Hardill
9db9b53c81 Fix package.json
Also back out auth changes
2021-06-30 14:12:20 +01:00
Ben Hardill
0e4787f3e8 Bump hpagent to 0.1.2
Also remove workaround for empty proxy credentials
2021-06-30 13:42:56 +01:00
Nick O'Leary
f8d8d4b186 Update dependencies 2021-06-29 16:19:28 +01:00
Nick O'Leary
45e0a1ffea Merge pull request #3042 from node-red/bye-travis
Bye Travis. Hello GitHub Actions
2021-06-29 15:28:49 +01:00
Nick O'Leary
75c58093f1 Remove bye-travis branch trigger 2021-06-29 14:25:22 +01:00
Nick O'Leary
cc708e9fb4 Move to GH Actions in place of Travis 2021-06-29 14:19:24 +01:00
Nick O'Leary
2ce0e38827 Merge pull request #3040 from node-red/map-set-debug
Add support for Map/Set property types on Debug
2021-06-29 14:08:29 +01:00
Nick O'Leary
5b980e8c13 Merge pull request #3032 from node-red/view-annotations
Add RED.view.annotations api
2021-06-29 14:08:08 +01:00
Nick O'Leary
21b602650c Merge branch 'dev' of github.com:node-red/node-red into dev 2021-06-29 14:01:12 +01:00
Nick O'Leary
fa4b7a1a69 Ensure any html in changelog is escaped before displaying 2021-06-29 13:58:24 +01:00
Kazuhito Yokoi
977dfe700b Fix change log in help tab 2021-06-29 19:51:41 +09:00
Nick O'Leary
48ac50e1c9 Add support for Map/Set property types on Debug 2021-06-29 11:09:30 +01:00
Nick O'Leary
1a817947eb Merge pull request #3039 from kazuhitoyokoi/dev-fixfileinlabel
Fix output label in file-in node
2021-06-29 10:27:40 +01:00
Kazuhito Yokoi
be64603097 Fix indents from tab to space 2021-06-29 18:08:02 +09:00
Kazuhito Yokoi
f6b90c8271 Fix output label in file-in node 2021-06-29 18:02:06 +09:00
Kazuhito Yokoi
26e4be87c7 Add Japanese translation for file-in node (#3037) 2021-06-29 08:42:16 +01:00
Nick O'Leary
cddbb8d80d Merge pull request #3035 from node-red/file-node-msg-clone-option
Add option for file-in node to include all properties (default off)
2021-06-28 15:48:12 +01:00
Nick O'Leary
58023b4bf0 Merge branch 'pr_3024' into dev 2021-06-28 15:32:32 +01:00
Nick O'Leary
4f18a5f1c3 Merge pull request #3025 from node-red/comms-batch
Batch messages sent over Comms link
2021-06-28 15:28:40 +01:00
Nick O'Leary
56df8d8bd3 Merge pull request #3031 from Steve-Mcl/monaco0252
Update Monaco Editor to V0.25.2 (latest)
2021-06-28 15:28:09 +01:00
Nick O'Leary
211ec104c2 Merge pull request #3015 from Steve-Mcl/monaco-beta-bug-fix
Patches for Monaco editor
2021-06-28 15:27:27 +01:00
Nick O'Leary
3fb573247d Add 'theme' to default settings file 2021-06-25 18:10:13 +01:00
Dave Conway-Jones
6aac44db14 Add option for file-in node to include all properties (default off)
and add test
2021-06-25 14:39:18 +01:00
Nick O'Leary
3255e11cfc Limit annotations to badge type 2021-06-24 17:59:32 +01:00
Nick O'Leary
844bf29de1 Add RED.view.annotations api 2021-06-24 17:40:26 +01:00
Steve-Mcl
04d91d1422 prevent promise rejection when loading editor 2021-06-24 11:28:39 +01:00
Steve-Mcl
db90e1f801 remove unnecessary global uncaught promise handler
- monaco issue https://github.com/microsoft/monaco-editor/issues/2382
2021-06-24 11:27:24 +01:00
Steve-Mcl
7f30748a41 dont try to load en-gb or en-us (they're builtin)
- also monaco now comes with Turkish, Polish, Portuguese, Czech langs
2021-06-24 11:25:26 +01:00
Steve-Mcl
a4e0abb48f Update monaco editor to V0.5.2 2021-06-24 11:21:49 +01:00
Steve-Mcl
3f27dc89d8 Add overloads for context/flow/global set/get/keys 2021-06-23 22:27:13 +01:00
Nick O'Leary
d6f6efc189 Lower tray zIndex when overlay tray being opened
Fixes #3019
2021-06-23 14:34:52 +01:00
Nick O'Leary
2cda49fc38 Reduce z-Index of Function expand buttons to prevent overlap
Part of #3019
2021-06-23 14:16:36 +01:00
Nathanaël Lécaudé
04f4a76b41 exec node: clarify scope 2021-06-18 14:46:16 -04:00
Steve-Mcl
0a8f7085f3 allow static private field to have initializer 2021-06-17 08:44:44 +01:00
Nathanaël Lécaudé
7ae48d7390 exec: solidify tests 2021-06-16 17:38:34 -04:00
Steve-Mcl
c908502644 add 2 ace compatible functions
- clearSelection - blocky node
- selectAll - obvious addition
2021-06-16 22:36:00 +01:00
Nathanaël Lécaudé
2f0631809d exec node: modify test 2021-06-16 17:09:21 -04:00
Nathanaël Lécaudé
91ab3bd972 exec node: add windowsHide option to hide windows under Windows 2021-06-16 17:00:00 -04:00
Sam Machin
672636313c Update packages/node_modules/@node-red/runtime/locales/en-US/runtime.json
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2021-06-16 17:13:52 +01:00
Nick O'Leary
79875ef50d Merge branch 'master' into dev 2021-06-16 17:03:50 +01:00
Nick O'Leary
aea5445495 Support loading external module sub path
Fixes #3023
2021-06-16 17:02:24 +01:00
Nick O'Leary
754a36fbc9 Merge branch 'master' into dev 2021-06-16 13:42:56 +01:00
Nick O'Leary
85dafc0b3c Ensure RED.clipboard.import displays the right library
Fixes #3021
2021-06-16 13:41:58 +01:00
Nick O'Leary
b516ab9b4f Batch messages sent over comms to prevent flooding 2021-06-16 11:45:02 +01:00
Nick O'Leary
1a27e60e55 Allow RED.popover.panel to specify a closeButton to ignore click events on 2021-06-16 11:44:40 +01:00
Nick O'Leary
2c710736e8 Use browser default language for initial page load 2021-06-16 11:44:35 +01:00
Nick O'Leary
69b9ff69be Add css var for node font color 2021-06-16 11:44:30 +01:00
Nick O'Leary
a3a4fc0cc2 Fix label padding of toggleButton 2021-06-16 11:44:25 +01:00
Nick O'Leary
ae686bb15d Give sidebar open tab a bit more room for its label 2021-06-16 11:44:20 +01:00
Nick O'Leary
68a5325849 Bump version to 2.0.0-beta.2 2021-06-16 11:44:14 +01:00
Nick O'Leary
75e3bddfa9 Remove the request module as a dependency 2021-06-16 11:44:09 +01:00
Sam Machin
bd3a8db438 log readOnly on startup 2021-06-16 10:10:31 +01:00
Nick O'Leary
102868bf74 Merge pull request #3022 from kazuhitoyokoi/update-message-files
Add additional Japanese translations for Node-RED 2.0 beta-1
2021-06-15 23:28:19 +01:00
Steve-Mcl
1a73a27102 add diagnosticCodesToIgnore 2345
- handles issue with Intl.DateTimeFormat when `options` is a variable
2021-06-15 23:15:54 +01:00
Steve-Mcl
a9cf34ab56 prevent IE script error
- even though monaco does not work in EI, scripts must not fail to load
2021-06-15 21:02:30 +01:00
Steve-Mcl
46d17c3314 update code comments 2021-06-15 21:01:33 +01:00
Nick O'Leary
40f816c311 Merge pull request #3020 from node-red-hitachi/update-message-files
Update message catalogue
2021-06-15 08:53:02 +01:00
Kazuhito Yokoi
13f1c12912 Add translations to message catalog 2021-06-14 15:54:05 +09:00
Hiroyasu Nishiyama
93c25f5d1b Update message catalogue 2021-06-13 14:19:36 +09:00
Steve-Mcl
aa6ec60c34 fix up issues with function node types
- node.status add overload
- remove examples as they dont render correctly
- correct Number and Object types to number and object
2021-06-11 18:44:37 +01:00
Nick O'Leary
ac159bb52e Merge pull request #3017 from hardillb/dev
Fix for basic auth with @ in username
2021-06-11 14:51:38 +01:00
Ben Hardill
919aee64f9 Add support for user/pass in URL 2021-06-11 14:48:41 +01:00
Ben Hardill
553bec1a1f Add testcase 2021-06-11 14:34:16 +01:00
Ben Hardill
bcb6d1cf93 Fix for basic auth with @ in username 2021-06-11 14:25:18 +01:00
Steve-Mcl
7d24e5b279 node.status snippet enums for fill and shape 2021-06-11 08:01:38 +01:00
Steve-Mcl
12253e23b5 Add setReadOnly support 2021-06-10 21:18:29 +01:00
Nick O'Leary
4acb66fb7a Merge branch 'master' into dev 2021-06-10 16:06:30 +01:00
Nick O'Leary
68ef85b64b Update CHANGELOG 2021-06-10 15:48:24 +01:00
Dave Conway-Jones
b73efe6bb4 Ensure CSV node tries to parse number when set to do so (trim whitespace) 2021-06-10 14:55:47 +01:00
Nick O'Leary
89c84522d2 Merge branch 'master' into dev 2021-06-10 14:19:24 +01:00
Nick O'Leary
98172764ac Handle node icon paths for scoped modules
Fixes #3013
2021-06-10 14:15:43 +01:00
Nick O'Leary
448e881104 Update to latest node-red-admin 2021-06-10 10:31:54 +01:00
Nick O'Leary
f16134ab1f Update changelog 2021-06-09 13:49:33 +01:00
Nick O'Leary
f5dc1564a4 Merge pull request #3009 from hardillb/get-got
Get got - deactivate HTTP - Proxy unit tests
2021-06-09 09:59:31 +01:00
Nick O'Leary
133df75bd4 Merge branch 'dev' into get-got 2021-06-09 09:59:23 +01:00
Nick O'Leary
440be0653a Merge pull request #3012 from node-red/reorganise-settings
Restructure default settings.js to be more organised
2021-06-09 09:57:34 +01:00
Nick O'Leary
d721a40ca5 Clarify flowFilePretty option 2021-06-09 09:26:55 +01:00
Nick O'Leary
a9b252b8fa Ensure httpServerOptions gets applied to ALL the express apps
This is silly. Turns out setting options at a top level app
does not percolate down to sub apps (and vice versa). You
have to apply the options to ALL express apps.
2021-06-08 21:17:42 +01:00
Nick O'Leary
8a5b3ddee7 Change comment style in default settings file.
Makes clearer what is a comment and what is commented-out code.
2021-06-08 21:04:59 +01:00
Nick O'Leary
d83e543a98 Update dependencies 2021-06-08 17:33:40 +01:00
Nick O'Leary
bcd6e8fd63 Restructure default settings.js to be more organised 2021-06-08 15:58:19 +01:00
Ben Hardill
d5c5738aab Fix proxy authentication problem & reinstate tests
Down to only 2 of the previous tests not working
2021-06-08 14:22:20 +01:00
Ben Hardill
9e4dfe081f Remove unused dev dependency 2021-06-08 13:27:26 +01:00
Ben Hardill
090852b72b Revet changes to /proxyAuthneticate
This end point is currently not hit
2021-06-08 12:06:18 +01:00
Nick O'Leary
ff5e038c49 Improve contrast of export dialog JSON font color 2021-06-08 11:54:58 +01:00
Nick O'Leary
5cc2e5f6e1 Fix merge 2021-06-08 11:48:45 +01:00
Ben Hardill
4e8c0573c4 Re-enable as many http-request proxy tests as possible 2021-06-08 11:46:54 +01:00
Nick O'Leary
ce905ba2c4 Merge branch 'master' into dev 2021-06-08 11:44:31 +01:00
Nick O'Leary
3104c17fb3 Update to latest node-red-admin 2021-06-08 11:36:16 +01:00
Nick O'Leary
7651941722 Do not assign z property to tab node when updating flow
Fixes #3010
2021-06-08 11:35:43 +01:00
Nick O'Leary
7bf938901a Merge branch 'pr_2952' into dev 2021-06-08 11:09:56 +01:00
Nick O'Leary
f8b61d2926 Merge pull request #2997 from hardillb/watch-fix
Watch node throws errors if new files deleted
2021-06-08 11:07:37 +01:00
Nick O'Leary
4edea59ab1 Merge branch 'pr_2990' into dev 2021-06-08 10:56:57 +01:00
Nick O'Leary
c8bcd2818d Disable inject-now button if inside subflow 2021-06-08 10:56:34 +01:00
Nick O'Leary
9b46dbaff1 Switch editableList buttons from <a> to <button> elements 2021-06-08 10:56:04 +01:00
Ben Hardill
17a139f27f Start to add HTTP-PROXY tests back in 2021-06-08 10:30:24 +01:00
Nick O'Leary
bd00c728d1 Merge pull request #3008 from Steve-Mcl/node-red-typings-update
Node red typings update
2021-06-08 10:29:03 +01:00
Nick O'Leary
9d510b514c Merge pull request #3007 from Steve-Mcl/monaco-update
update monaco v0.24.0
2021-06-08 10:27:15 +01:00
Nick O'Leary
00dcc5ecda Merge pull request #3011 from node-red/cheerio-update
HTML node: cheerio update to 1.x
2021-06-08 10:22:20 +01:00
Nick O'Leary
dbbdd3f799 Update to latest cheerio module 2021-06-08 09:31:27 +01:00
Nick O'Leary
3541b4b968 Merge pull request #3004 from node-red-hitachi/fix-get-subflow-info
Fix allow Flow.getNode to return subflowInstance nodes
2021-06-07 18:16:01 +01:00
Nick O'Leary
5b1bf35a23 Fix over-greeding matching whilst parsing commit history
Fixes #3006
2021-06-07 18:07:58 +01:00
Ben Hardill
591b61945f Merge branch 'get-got' of github.com:hardillb/node-red into get-got 2021-06-07 16:01:06 +01:00
Ben Hardill
bd1943626b Add more comment 2021-06-07 16:00:07 +01:00
Ben Hardill
f152cdef51 Merge pull request #1 from node-red/get-got
Get got
2021-06-07 13:04:27 +01:00
Ben Hardill
33f8c9747d Comment out HTTP Proxy tests
These have been removed because the mock proxy doesn't
support using the HTTP CONNECT verb and the new Got based
http-request node only uses CONNET for proxied content
2021-06-07 13:00:02 +01:00
Steve-Mcl
714a5e26b3 add env.get to function node defs 2021-06-05 12:42:54 +01:00
Steve-Mcl
7f2c6e40d3 fix typescript errors in node-red d.ts def files 2021-06-05 12:42:13 +01:00
Steve-Mcl
db676ec223 add snippet for env.get 2021-06-05 12:34:47 +01:00
Steve-Mcl
ffb3e511a7 update monaco v0.24.0 2021-06-05 12:28:25 +01:00
Nick O'Leary
e9e64f6a44 Add option to RED.nodes.createCompleteNodeSet to include node dimensions
This allows the linter to use a flow json with more than just position
information.
2021-06-04 13:53:01 +01:00
Kazuhiro Ito
a7b8adb0e1 Fix allow Flow.getNode to return subflowInstance nodes 2021-06-04 15:08:03 +09:00
Jiye Yu
4140ff03d7 fix typo in zh-CN translation (#3003) 2021-06-03 19:03:00 +01:00
Nick O'Leary
e042ef05a4 Update dependencies 2021-06-02 16:24:12 +01:00
Nick O'Leary
7c02e4d66a Merge branch 'master' into dev 2021-06-02 15:40:56 +01:00
Nick O'Leary
711794cfe1 Merge pull request #2993 from Steve-Mcl/master
ensure context get/set key is a string
2021-06-02 15:20:25 +01:00
Nick O'Leary
c0e4cf2358 Fix handling of boolean subflow module properties
Fixes #3000
2021-06-02 14:48:54 +01:00
Nick O'Leary
a92f8f36c1 Keep proper track of moved/changed state in undo/redo history
Fixes #2999
2021-06-02 14:07:22 +01:00
Nick O'Leary
12698dc347 Add full ast parsing in Function node to spot node.done calls
Fixes #2998
2021-06-02 12:32:44 +01:00
Nick O'Leary
3e6a55f78e Update to latest 6.x ws module 2021-06-02 11:58:51 +01:00
Ben Hardill
7585f14b89 Watch node throws errors if new files deleted
before the node has finished processing them all.

Fixes #2996
2021-05-28 08:34:08 +01:00
Nick O'Leary
01b5fc4d49 Merge pull request #2987 from node-red/clean-ids
Change node id generation to give fixed length values without '.'
2021-05-27 12:18:38 +01:00
Nick O'Leary
0fb7d3bfc8 Merge pull request #2991 from node-red-hitachi/fix-empty-switch-rule
fix handling of empty switch rules
2021-05-27 12:18:23 +01:00
Nick O'Leary
2cd74d355c Merge pull request #2994 from node-red/css-vars
Add css named variables for certain key colours
2021-05-27 12:18:05 +01:00
Nick O'Leary
3d405f8c63 Merge pull request #2969 from node-red/ajv-update
Update ajv to 8.2.0 - drop support for JSON-Schema draft-04
2021-05-27 12:17:51 +01:00
Steve-Mcl
a92f0c4c6e fix context key validation + add tests
- adds a helper function validateContextKey to keep it DRY
- adds tests ensure key of null "" 1 {} [] [""] [1] [{}] all throw error
2021-05-26 13:04:09 +01:00
Nick O'Leary
de142ac9d6 Add css named variables for certain key colors 2021-05-25 21:03:01 +01:00
Nick O'Leary
468ef7ecff Allow RED.settings.set to replace string property with object property 2021-05-25 21:02:14 +01:00
Steve-Mcl
4d768fd236 ensure context get/set key is a string 2021-05-25 14:53:06 +01:00
Steve-Mcl
bfc1f95190 remove redundant i18n entries
- no longer needed since moving inject onto edit form
2021-05-25 13:53:59 +01:00
Nick O'Leary
bc17ebd90e Fix css of node help table of contents elements 2021-05-24 10:23:00 +01:00
Hiroyasu Nishiyama
bb1b3727cb add test case 2021-05-23 10:42:28 +09:00
Hiroyasu Nishiyama
4dbebefb45 fix handling empty rules 2021-05-23 10:01:45 +09:00
Steve-Mcl
e1c5764fbf move new inject button to existing edit form
- revert refactoring of building editableList (not needed now)
- remove node button modifier click & tray.show feature
- add inject button to editableList [buttons] array
- add `id` option to editableList to permit DOM access after creation
- get the new inject button via its `id` and float it to the right
- removed the popup tray buttons i18n entries
2021-05-22 10:52:44 +01:00
Steve-Mcl
70f975e4f0 move inject button off dialog and onto form 2021-05-21 13:26:50 +01:00
Steve-Mcl
845567d1ba add 2 tests for user inject values 2021-05-20 22:53:32 +01:00
Steve-Mcl
f570447000 i18n for buttons on user inject values 2021-05-20 22:53:10 +01:00
Steve-Mcl
9d7b8f1f2f change user prop name for injected values
- less chance for collision
2021-05-20 22:35:42 +01:00
Steve-Mcl
bae6bfc32d Add inject values without deploy feature 2021-05-20 21:12:32 +01:00
Nick O'Leary
8a63390464 Merge pull request #2988 from hardillb/ALPNProtocols
Add ALPN support to TLS node
2021-05-19 17:39:19 +01:00
Ben Hardill
0b52cd8b31 Fixes from testing
I set up a NGINX instance to test this and found I'd missed some bits.

Still can't find a way to test this easily from a nodejs unit test
2021-05-19 10:41:24 +01:00
Nick O'Leary
f97569dd34 Clarify codeEditor options only relate to monaco 2021-05-18 16:46:16 +01:00
Nick O'Leary
a9164e63ab Merge branch 'dev' into pr_2971 2021-05-18 16:30:13 +01:00
Ben Hardill
8c95067ec4 Add ALPN support to TLS node 2021-05-18 13:13:32 +01:00
Nick O'Leary
4f77bbeb2b Update for 1.3.5 2021-05-18 11:52:49 +01:00
Nick O'Leary
8bbed2c831 Change node id generation to give fixed length values without '.' 2021-05-18 11:32:17 +01:00
Nick O'Leary
6b43a23c4b Merge branch 'master' into dev 2021-05-14 21:18:32 +01:00
Nick O'Leary
be9521f659 Revert some of #2967 to fix treeList gutter width calculation 2021-05-14 21:17:47 +01:00
Nick O'Leary
90761fd840 Fix 'SyntaxError' in Function node when last line of on-stop is a comment 2021-05-13 17:23:25 +01:00
Nick O'Leary
d49d9a783c Merge branch 'master' into dev 2021-05-13 16:06:33 +01:00
Nick O'Leary
d7dc7c4eda Fix error handling in runtime/lib/api/nodes 2021-05-13 15:46:56 +01:00
Nick O'Leary
fe64c6a841 Merge branch 'master' into dev 2021-05-13 14:30:02 +01:00
Nick O'Leary
2bbdc85a29 Prevent unknown node from breaking editor
If a node provides a .js file that registers a type
but its .html is empty, then the editor will know about
the type, but there will be no node definition.

This fix handles that in some of the utility functions
for generating node appearance.

This wasn't an exhaustive check for these things - just
some obvious candidates that I hit in testing 'bad' nodes
2021-05-13 14:28:01 +01:00
Nick O'Leary
74628b7034 Update debug tests to handle compact comms format 2021-05-13 14:18:11 +01:00
Nick O'Leary
15aa249f64 Stop module with missing types from preventing editor load 2021-05-13 14:06:43 +01:00
Nick O'Leary
fdf58e1225 Fix lint errors in editor hooks 2021-05-13 14:00:21 +01:00
Nick O'Leary
866f305686 Open subflow tab next to active tab rather than at the end 2021-05-13 13:57:29 +01:00
Nick O'Leary
1550e5343c Merge branch 'master' into dev 2021-05-13 13:42:26 +01:00
Nick O'Leary
add3dd1077 Merge pull request #2986 from hardillb/get-got
Fix msg.responseUrl
2021-05-13 13:41:58 +01:00
Nick O'Leary
79a142fb19 Fix error log in runtime hooks module 2021-05-13 13:40:42 +01:00
Nick O'Leary
1a30fe4a1a Improve red-ui-node-icon css and add red-ui-node-icon-small modifier class 2021-05-13 13:39:29 +01:00
Nick O'Leary
4ff991764e Updates to encode/decode message when passed over debug comms link 2021-05-13 13:38:34 +01:00
Nick O'Leary
001f066769 Remove all input event listeners on a node once it is closed
This prevents in-flight messages being passed to the node after
it has closed.
2021-05-13 13:37:21 +01:00
Nick O'Leary
c47b553a8e Add viewAddPort viewRemovePort viewAddNode viewRemoveNode hooks to view 2021-05-13 13:36:50 +01:00
Nick O'Leary
319af51f84 Add RED.hooks to editor 2021-05-13 13:35:12 +01:00
Nick O'Leary
5dbaaae68e Merge branch 'master' into dev 2021-05-12 16:00:36 +01:00
Ben Hardill
8c1a749a5a Fix msg.responseUrl
The original version would pick up the proxy servers port number
2021-05-12 11:08:57 +01:00
Nick O'Leary
fc8643f238 Merge pull request #2983 from hardillb/get-got
Get got working with proxies
2021-05-12 09:41:26 +01:00
Nick O'Leary
c8653f19bf Merge pull request #2985 from node-red-hitachi/update-function-node-info-text
Update Japanese info text of function node
2021-05-12 09:41:09 +01:00
Hiroyasu Nishiyama
b01100d818 Update Japanese info text of function node 2021-05-12 08:54:32 +09:00
Nick O'Leary
d4096a9026 Merge pull request #2984 from node-red/migrate-sass
Migrate to sass module from node-sass
2021-05-11 18:56:06 +01:00
Nick O'Leary
b9e780cdcd Add Node 16 with sass fixed 2021-05-11 18:14:05 +01:00
Nick O'Leary
b77cd56a01 Migrate from node-sass to sass
node-sass is deprecated and doesn't work on Node 16.
sass is actively maintained and considered the canonical sass
implementation.
2021-05-11 18:13:21 +01:00
Nick O'Leary
9cdec156dc Merge pull request #2974 from aheissenberger/fix-bundle-error
Fixed esbuild bundle error "installRetry" was declared a constant and changed
2021-05-11 17:45:07 +01:00
Nick O'Leary
6aa5968863 Fix Function tab label names in the node help text
Closes #2978
2021-05-11 17:15:27 +01:00
Nick O'Leary
8f7686cd7b Handle sidebar tab that no longer exists when setting first active 2021-05-11 16:42:32 +01:00
Nick O'Leary
d8d384a979 Fix plugin loading when browser sends unrecognised lang 2021-05-11 16:42:00 +01:00
Nick O'Leary
ade318bb78 Support mousewheel scroll in tab bar 2021-05-11 15:58:01 +01:00
Nick O'Leary
ed3aa8189f Shrink default notification box
Also reduces Inject/Debug notification display time as 5 seconds is a
long time for a message telling you it worked
2021-05-11 14:45:53 +01:00
Nick O'Leary
3e43597617 Prevent error whilst drag/drop importing from leaving dropTarget visible
Fixes #2982
2021-05-11 14:10:40 +01:00
Ben Hardill
4c8e895ac7 Clean up console.logs 2021-05-11 09:56:22 +01:00
Ben Hardill
f6a3671366 Get the http-request node got port working with Proxy 2021-05-10 23:01:29 +01:00
Nick O'Leary
e641b0a965 Fix scaling issues when dragging nodes into scaled workspace 2021-05-10 21:03:27 +01:00
Hiroyasu Nishiyama
eddddc6c9b fix duplicate csv node example (#2980) 2021-05-10 15:39:23 +01:00
Nick O'Leary
f249d6306f Merge pull request #2976 from kazuhitoyokoi/master-fixinfotips
Fix incorrect shortcut keys in info tips
2021-05-10 09:42:59 +01:00
Kazuhito Yokoi
5c31bd54e4 Fix incorrect shortcut keys in info tips 2021-05-06 20:09:35 +09:00
Nick O'Leary
71ba73b38f Merge branch 'master' into dev 2021-05-04 11:19:05 +01:00
Nick O'Leary
db0ff74857 Reduce code duplication around node/label generation 2021-05-04 11:12:55 +01:00
Steve-Mcl
1acb073737 add support for explicit calls to ace.setFontSize
- found node-red-contrib-ui-svg explicitly calling ace function
2021-05-04 10:34:29 +01:00
Steve-Mcl
251dda3652 missing editor destroy() calls 2021-05-04 09:04:13 +01:00
Steve-Mcl
22db24509d Ensure monaco exists before attempting cleanup 2021-05-04 09:03:35 +01:00
Andreas Heissenberger
54c9d27fd8 fix 2021-05-03 17:35:50 +02:00
Andreas Heissenberger
01888ff078 fix "installRetry" was declared a constant and changed 2021-05-03 17:23:27 +02:00
Steve-Mcl
ffbd140a97 bug fix orphaned models and graphical tray glitch
- ensure models are disposed correctly
- clean up any orphaned models left after editor:close
- improve concurrent multiple instances javascript models
- fix graphical glitch
2021-05-03 16:19:01 +01:00
Steve-Mcl
dedf5c52d9 better support for multiple editors
- as the javascript model is singleton, need to disable
syntax checking when editor not focused
(support multiple instances of js editor (function node))
2021-05-02 23:11:29 +01:00
Steve-Mcl
10465c5d68 treat appcache files as shell (uibuilder support) 2021-05-02 23:00:35 +01:00
Steve-Mcl
1f4f64a7c0 handle node-red style affecting monaco rename box 2021-05-02 22:44:48 +01:00
Steve-Mcl
a6f116b57b add default basic entries in settings,js
- defaults to "ace" but provides instruction for using monaco
2021-05-01 22:17:48 +01:00
Steve-Mcl
0a80186a92 Merge branch 'dev' into monaco2 2021-05-01 21:56:45 +01:00
Nick O'Leary
635bdf15cb Fix use of paletteLabel in help tab
Fixes #2973
2021-05-01 21:55:50 +01:00
Steve-Mcl
a72bdfdacc Handle known bug (monaco-editor issue No 2382)
- handles "Uncaught (in promise) Canceled: Canceled"
2021-05-01 11:40:43 +01:00
Steve-Mcl
dc3e04456c remove temporary debugging window variable 2021-05-01 11:01:04 +01:00
Nick O'Leary
b0e4fb7602 Fix infotip display following i18n update 2021-04-30 13:54:25 +01:00
Steve-Mcl
df7aa3339b dont tokenise JSONata
- monaco has jsonata tokeniser
2021-04-29 18:11:47 +01:00
Steve-Mcl
c475536388 provide extra libs and call to refresh 2021-04-29 18:00:23 +01:00
Steve-Mcl
cc7def89af ensure monaco is correctly sized 2021-04-29 17:59:12 +01:00
Steve-Mcl
58da87898e integrate monaco
- refactors createEditor out to own code files
- moves ace editor to own code file
- adds monaco editor to own code file
- add monaco bootstrap
- update mst to include monaco asset
- update grunt to include new files and integrate
2021-04-29 17:58:41 +01:00
Steve-Mcl
bded5490d2 add utility func getBrowserInfo
- prep for monaco - for slimming down monaco on mobile
- prep for monaco - needed to prevent monaco on IE
2021-04-29 17:35:11 +01:00
Steve-Mcl
c3715a2a3d ensure editor is removed
- Fixes issue with left over HTML in the DOM
2021-04-29 17:32:44 +01:00
Steve-Mcl
abf084f6c2 Dont call to ACE, re-use createEditor instead 2021-04-29 17:31:38 +01:00
Steve-Mcl
37ba409dc3 ensure mode is set for event log viewer 2021-04-29 17:29:54 +01:00
Steve-Mcl
f29488b24f prevent editor context menu being clipped by sidebar
- raise / lower tray z-index for correct slide animation
2021-04-29 17:03:17 +01:00
Steve-Mcl
71bdade7b9 prevent exception if ace is missing 2021-04-29 16:59:11 +01:00
Steve-Mcl
60d97c887d missing args from JSONata $now signature 2021-04-29 16:57:22 +01:00
Steve-Mcl
5bba50f01f refactor node.libs to a function getLibsList
- preparation for monaco integration
2021-04-29 16:56:16 +01:00
Steve-Mcl
1f7884dc70 add typings for basic intellisense 2021-04-29 16:54:29 +01:00
Steve-Mcl
69dafd6c68 add codeEditor settings 2021-04-29 16:53:59 +01:00
Steve-Mcl
64b79cd5ac add monaco dist
- includes themes from https://github.com/brijeshb42/monaco-themes
2021-04-29 16:52:22 +01:00
Nick O'Leary
1af21735a9 Fix theme handling when no editorTheme.page setting 2021-04-29 15:32:26 +01:00
Nick O'Leary
9886af3cec Fix jshint error in treeList 2021-04-29 14:09:21 +01:00
Nick O'Leary
1eb8f9ad97 Update changelog 2021-04-29 14:01:40 +01:00
Nick O'Leary
08e73d9d7d Merge pull request #2967 from hanc2006/master
Fixed remove item when depth=0 and wrong gutter calc treeList widget
2021-04-29 14:00:02 +01:00
Nick O'Leary
b0e349b215 Update for 1.3.4 2021-04-29 11:22:22 +01:00
Nick O'Leary
caa98b08da Merge branch 'pr_2965' into dev 2021-04-29 11:04:50 +01:00
Nick O'Leary
00caa13a12 Update externalModules_spec to handle variable npm args length 2021-04-29 11:04:19 +01:00
Nick O'Leary
cfc0135e86 Update ajv to 8.2.0 - drop support for JSON-Schema draft-04 2021-04-29 10:48:26 +01:00
Dave Conway-Jones
9ee8c1c791 Give delay node random mina nd max more space so you can see complete value 2021-04-29 10:36:13 +01:00
Nick O'Leary
cd3aba2b89 Allow nodes to access resolved theme files
Fixes #2968
2021-04-29 10:17:07 +01:00
Daniele
a150d8e289 Update packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js
Thanks for the tip, I'll remember next time.

Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2021-04-28 23:37:26 +02:00
Nick O'Leary
6da8e92f20 Fix inject node output tooltip extra property count 2021-04-28 22:01:39 +01:00
Nick O'Leary
1d4dd4be96 Merge pull request #2961 from node-red/rerorder-inject-typedinput
Re-order inject typedinput to de-emphasise context options
2021-04-28 21:56:47 +01:00
Nick O'Leary
7df1a03b4b Handle subflow modules that contain subflows 2021-04-28 21:50:00 +01:00
Nick O'Leary
ad316ffd37 Merge pull request #2964 from node-red-hitachi/fix-grunt-error-on-exec-node
fix grunt fail on exec node test
2021-04-28 21:02:23 +01:00
Nick O'Leary
91f5542a57 Fix importing node to currently flow rather than match its old z value
If you import a node whose z value is a known existing tab, it is getting
imported to that tab, rather than the expected behaviour of being imported
to the current tab.

This commit fixes that by checked if the node is being imported to a tab
that was included in the import, rather than pre-existing.
2021-04-28 20:54:31 +01:00
GitHub
d47a8aa562 Fix remove item when depth=0 and wrong gutter calc 2021-04-28 17:25:26 +02:00
nileio
676f790933 add engine-strict flag to npm install args 2021-04-28 22:40:17 +10:00
Hiroyasu Nishiyama
70433f3d05 fix grunt fail on exec node test 2021-04-28 21:40:17 +09:00
Nick O'Leary
9f2a2b9869 Pass npm args to preUninstall hook to be consistent with preInstall 2021-04-27 17:32:18 +01:00
Nick O'Leary
a0c09fc617 Update api docs header 2021-04-27 17:30:30 +01:00
Dave Conway-Jones
19d391fa05 only move msg. instead 2021-04-27 11:28:01 +01:00
Dave Conway-Jones
d1aa1fd4d8 reorder inject typedinput to de-empahsise context options 2021-04-27 11:15:16 +01:00
Dave Conway-Jones
0e02d03d9a Merge branch 'master' of https://github.com/node-red/node-red 2021-04-27 11:12:10 +01:00
Nick O'Leary
4133f9c56f Merge pull request #2936 from node-red/npm-install-hooks
Add pre/postInstall hooks to npm install handling
2021-04-27 10:57:14 +01:00
Nick O'Leary
53055064e1 Merge pull request #2932 from node-red/file-cwd-setting
File node: Add fileWorkingDirectory to customise how relative paths are resolved
2021-04-27 10:49:02 +01:00
Nick O'Leary
06090d8de1 Merge branch 'dev' into pr_2949 2021-04-27 10:45:33 +01:00
Nick O'Leary
d6ccae38f8 Merge pull request #2959 from node-red/inject-cronosjs
Move Inject node to CronosJS module
2021-04-27 10:44:22 +01:00
Nick O'Leary
f7210effec Rework hooks structure to be a linkedlist
Allows for safe removal of hooks whilst they are being invoked
2021-04-26 21:14:42 +01:00
Nick O'Leary
8e7efd98b2 Don't let 'escape' whilst moving nodes interrupt things
Fixes #2960
2021-04-26 16:48:21 +01:00
Nick O'Leary
ea50ba16f9 Move Inject node to CronosJS module 2021-04-26 14:47:50 +01:00
Nick O'Leary
b62e4f6662 Fix deprecation of httpRoot 2021-04-26 14:43:06 +01:00
Nick O'Leary
f5a1c8bc49 Merge pull request #2957 from node-red-hitachi/fix-error-on-git-auto-commit
fix error on auto commit for no flow change
2021-04-26 11:54:05 +01:00
Nick O'Leary
4cb8e99430 Timeout http upgrade requests that are not otherwise handled
Fixes #2956
2021-04-26 11:45:28 +01:00
Nick O'Leary
bbac49ff38 Ensure function expand button is above vertical scrollbar
Fixes #2955
2021-04-26 10:18:25 +01:00
Nick O'Leary
1d12017f11 Sort context stores in TypedInput and ensure default first
Fixes #2954
2021-04-26 10:13:57 +01:00
Kazuhito Yokoi
46af2e37a7 Add Japanese translations for delay node enhancements (#2958) 2021-04-26 09:57:11 +01:00
Hiroyasu Nishiyama
a480919ec3 fix error on auto commit for no flow change 2021-04-26 09:05:53 +09:00
Dave Conway-Jones
f8abf9fce1 add another test to csv 2021-04-25 08:53:18 +01:00
Nick O'Leary
62f2a552ea Merge pull request #2953 from node-red/depreacte-usage-of-httpRoot-and-add-warning
Deprecate usage of httpRoot and add warning
2021-04-23 16:42:01 +01:00
Dave Conway-Jones
b053e02174 remove httpRoot from setting.js entirely 2021-04-23 16:38:45 +01:00
Dave Conway-Jones
3798167908 Update packages/node_modules/@node-red/runtime/locales/en-US/runtime.json
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2021-04-23 16:36:22 +01:00
Dave Conway-Jones
56fe2014e1 Update packages/node_modules/@node-red/runtime/lib/index.js
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2021-04-23 16:36:15 +01:00
Nick O'Leary
be2e64433f Merge pull request #2951 from node-red/fix-flowfile-name-in-settings
fix flowfile name to flows.json in settings
2021-04-23 16:27:45 +01:00
Dave Conway-Jones
8732e89e55 Update packages/node_modules/@node-red/runtime/locales/en-US/runtime.json
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2021-04-23 16:22:50 +01:00
Dave Conway-Jones
fdd0a93bad Deprecate use of httpRoot in settings and add warning
(no change is actual behaviour yet - just warning)
Should we remove option from settings ? or just label it ?
2021-04-23 15:42:57 +01:00
Nick O'Leary
dd12572b1d Allow node16 build to fail for now 2021-04-23 14:30:50 +01:00
Nick O'Leary
e23f20227a Initial migration from request to got for http-request node 2021-04-23 14:19:15 +01:00
Dave Conway-Jones
5cc791690b fix flowfile name to flows.json in settings
and warn if not set (as if anyone reads warnings)
Move setting to top of settings.js as it will be edited more often.
Default behaviour will still work
(needs translations)
2021-04-23 14:09:06 +01:00
Dave Conway-Jones
9f1deb0c36 CSV Add couple more special character tests just to make sure 2021-04-23 11:19:23 +01:00
Dave Conway-Jones
4cebbf8d22 Fix CSV handling of special chars as separators
(ie escape regex special chars)
and add tests
to close #2950
2021-04-23 10:47:23 +01:00
Dave Conway-Jones
93971537b4 add rate option to queue and timed modes. so a simple check box instead. 2021-04-22 11:02:34 +01:00
Dave Conway-Jones
87e816a7f5 Delay node - Make msg.rate an optional override 2021-04-22 10:26:35 +01:00
Dave Conway-Jones
0f45b1da48 Try to make delay modes consistent as regards flush
behaviour is different. May cause minor breakage.
if flush arrives with payload that is now included with the flushed data so no data is lost. Previously any payload was dropped.
2021-04-22 09:43:54 +01:00
Kazuhito Yokoi
a20049c82a Delay node enhancements (#2294)
* Remove unused messages in message catalog

* Support msg.rate in delay node

* Support nodeMessageBufferMaxLength in delay node

* Add logging function for queue size

* Support msg.nodeMessageBufferMaxLength

* Revert "Support msg.nodeMessageBufferMaxLength"

This reverts commit cc72f892f7.

* Improve logging function for delay node

* Add support for Messaging API to delay node

* Add documentation about msg.rate in delay node

* Add test cases for msg.rate in delay node

Co-authored-by: Dave Conway-Jones <dceejay@users.noreply.github.com>
2021-04-22 09:01:28 +01:00
Nick O'Leary
e57ebdb583 Merge pull request #2947 from kazuhitoyokoi/master
Fix margin between nodes on palette
2021-04-21 09:42:43 +01:00
Kazuhito Yokoi
372122037f Fix margin between nodes on palette 2021-04-21 13:14:46 +09:00
Nick O'Leary
23a5cb1917 Ensure typedInput option is selected in dropdown menu
Part of #2945
2021-04-20 23:39:21 +01:00
Nick O'Leary
f8d5fef3c4 Ensure typedInput without value has focus class removed
Closes #2945
2021-04-20 23:25:56 +01:00
Nick O'Leary
250005ad16 Allow npm install args to be customised by preInstall trigger 2021-04-20 22:55:06 +01:00
Nick O'Leary
719aea2a58 Add Node 16 to travis 2021-04-20 18:38:35 +01:00
Nick O'Leary
0e06da6c63 Update for 1.3.3 2021-04-20 11:06:23 +01:00
Nick O'Leary
68fef169f3 Merge pull request #2944 from node-red/Pull-in-RBE-and-push-out-tail
v2: Pull in RBE node and push out tail
2021-04-20 10:57:37 +01:00
Nick O'Leary
c668201df4 Merge pull request #2931 from node-red/join-default
Join: change default manual mode to object
2021-04-20 10:57:23 +01:00
Nick O'Leary
1d68c8cc87 Merge pull request #2940 from node-red/i18n-update
Update to latest i18n in editor and runtime
2021-04-20 10:57:08 +01:00
Nick O'Leary
b9ac8b42ea Use paletteLabel if set in help sidebar 2021-04-19 21:07:44 +01:00
Nick O'Leary
b4a03a56b4 Allow preInstall hook to return false to skip npm install 2021-04-19 20:29:30 +01:00
Nick O'Leary
9eb668ab30 Prevent TypedInput label overflowing element
Also adds title attribute to the button for the label so it gets a tooltip
2021-04-19 15:28:17 +01:00
Nick O'Leary
233a74c146 Remove TypedInput from tab focus when only one type available 2021-04-19 15:27:47 +01:00
Dave Conway-Jones
e0c7269b8e bump other refs to bcrypt up to 5.0.1 2021-04-19 13:21:12 +01:00
Dave Conway-Jones
73063df11b Pull in RBE node and push out tail 2021-04-19 13:09:13 +01:00
Nick O'Leary
ff00afb5d7 Fix project credential secret reset handling
Part of #2868
2021-04-19 11:32:26 +01:00
Nick O'Leary
3f43dc1855 Fix jshint error 2021-04-19 10:43:01 +01:00
Nick O'Leary
4a4e7fc7cb Make typedInput.disable more consistent in behaviour
Fixes #2942
2021-04-19 10:39:58 +01:00
Dave Conway-Jones
0253dc9623 ensure CSV node can send false as string 2021-04-19 10:03:11 +01:00
Nick O'Leary
f8855b83fa Update i18next in util package 2021-04-16 17:11:57 +01:00
Nick O'Leary
0d0459d83d Update to latest i18n in editor and runtime
Fixes #2924
2021-04-16 16:52:12 +01:00
Nick O'Leary
374ef3902c Merge pull request #2938 from hardillb/dev
Fix for #2935
2021-04-16 13:27:22 +01:00
Ben Hardill
235690064f Fix for #2935 2021-04-16 13:26:11 +01:00
Nick O'Leary
0167c25e08 Export package version in Grunt file so docs template can access 2021-04-16 11:56:23 +01:00
Nick O'Leary
d2432716ea Fix hook requires in unit tests 2021-04-15 15:30:02 +01:00
Nick O'Leary
52ef85cba3 Update test for latest sinon 2021-04-15 15:15:52 +01:00
Nick O'Leary
8140057bea Add pre/postInstall hooks to module install path 2021-04-15 15:12:40 +01:00
Nick O'Leary
22df59e229 Update hooks api to support promise api 2021-04-15 15:12:35 +01:00
Nick O'Leary
ed351eee54 Move hooks to util package 2021-04-15 15:12:30 +01:00
Nick O'Leary
c021b4c368 Merge pull request #2922 from node-red/update-dependencies
Update dependencies
2021-04-15 14:57:07 +01:00
Nick O'Leary
04a3c4bb22 Ensure mqtt-close message is published when closing mqtt nodes
The change in 1.3 where we ensure config nodes are closed last broke this behaviour. Previously, the config node would get closed triggering the close message. With the new 1.3 behaviour, the flow nodes are stopped and as soon as the last flow node deregisters itself, the broker node would disconnect without sending the close message.

The fix is to send the close message as part of the deregister flow as that will handle all cases properly
2021-04-14 22:28:25 +01:00
Nick O'Leary
b5fda5642f Fix package semver comparison to allow >1 version increment 2021-04-14 18:06:59 +01:00
Nick O'Leary
b0955705be Update to 1.3.2 2021-04-13 13:34:16 +01:00
Nick O'Leary
a4a624d537 Update changelog 2021-04-13 13:33:41 +01:00
Nick O'Leary
6a8cf1b768 Fix variable reference error in editableList
Fixes #2933
2021-04-13 13:24:54 +01:00
Nick O'Leary
aac2a8f830 File node: Add fileWorkingDirectory to customise how relative paths are resolved 2021-04-12 18:00:58 +01:00
Nick O'Leary
8269490dd1 Join: change default manual mode to object 2021-04-12 14:22:27 +01:00
Kazuhito Yokoi
39274b0c5d Add Japanese translations for Node-RED v1.3.1 (#2930) 2021-04-12 14:15:07 +01:00
Dave Conway-Jones
55c2430671 Merge branch 'master' of https://github.com/node-red/node-red 2021-04-12 12:16:32 +01:00
Dave Conway-Jones
023486e175 File out node - fix timing of msg.send to be after close., and...
allow msg.encoding to set encoding if desired.
To close #2921
2021-04-12 12:16:23 +01:00
Nick O'Leary
8227643741 Merge branch 'pr_2920' 2021-04-12 12:08:32 +01:00
Nick O'Leary
e44131f97a Update function node help reference to node properties 2021-04-12 12:08:07 +01:00
Nick O'Leary
5028377d45 Fix MQTT Broker TLS config row layout
Fixes #2927
2021-04-12 11:48:10 +01:00
Nick O'Leary
51aaf1b150 Handle package.json without dependencies section 2021-04-12 10:34:43 +01:00
Nick O'Leary
13406e76de Ensure theme login image is passed through to api response
Fixes #2929
2021-04-12 10:06:35 +01:00
Dave Conway-Jones
4672d98e8a split node - add comment to info re $N being number of messages arriving 2021-04-12 09:47:18 +01:00
Dave Conway-Jones
858b3d640a fix CSV parsing with other than , separator
(and joining as well...
and add tests
to close #2925
2021-04-10 22:17:31 +01:00
Nick O'Leary
6087002562 Fix handling of user-provided keymap
Fixes #2926
2021-04-10 21:34:26 +01:00
Nick O'Leary
82ced56bed Update package versions 2021-04-09 14:12:10 +01:00
Nick O'Leary
982b8ea51d Update fs-extra and semver 2021-04-09 13:53:06 +01:00
Nick O'Leary
877c463494 Update to latest sinon 2021-04-09 11:22:57 +01:00
Nick O'Leary
9882582903 Update to latest bcrypt 2021-04-09 10:50:35 +01:00
Nick O'Leary
ba566657f1 Set minimum node version to 12 2021-04-09 10:37:05 +01:00
Nick O'Leary
cb1a178fbf Set 2.0.0-beta.1 version 2021-04-09 10:35:19 +01:00
Kristian Heljas
ad788fbed1 Function node: describe node.outputCount in help text 2021-04-08 21:09:44 +03:00
734 changed files with 124219 additions and 15402 deletions

View File

@@ -1,35 +0,0 @@
<!--
## Before you hit that Submit button....
This issue tracker is for problems with the Node-RED runtime, the editor or the core nodes.
If your issue is:
- a general 'how-to' type question,
- a feature request or suggestion for a change,
- or problems with 3rd party (`node-red-contrib-`) nodes
please use the [Node-RED Forum](https://discourse.nodered.org) or [slack team](https://nodered.org/slack).
You could also consider asking a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/node-red) and tag it `node-red`.
That way the whole Node-RED user community can help, rather than rely on the core development team.
## So you have a real issue to raise...
To help us understand the issue, please fill-in as much of the following information as you can:
-->
### What are the steps to reproduce?
### What happens?
### What do you expect to happen?
### Please tell us about your environment:
- [ ] Node-RED version:
- [ ] Node.js version:
- [ ] npm version:
- [ ] Platform/OS:
- [ ] Browser:
- [ ] running in Docker:

View File

@@ -1,39 +0,0 @@
---
name: Bug report
about: Reproducible software issues in the core of Node-RED
title: ''
labels: ''
assignees: ''
---
<!--
This issue tracker is for problems with the Node-RED runtime, the editor or the core nodes.
If your issue is:
- a general 'how-to' type question,
- a feature request or suggestion for a change,
- or problems with 3rd party (`node-red-contrib-`) nodes
please use the [Node-RED Forum](https://discourse.nodered.org) or [slack team](https://nodered.org/slack).
You could also consider asking a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/node-red) and tag it `node-red`.
That way the whole Node-RED user community can help, rather than rely on the core development team.
To help us understand the issue, please fill-in as much of the following information as you can:
-->
### What are the steps to reproduce?
### What happens?
### What do you expect to happen?
### Please tell us about your environment:
- [ ] Node-RED version:
- [ ] Node.js version:
- [ ] npm version:
- [ ] Platform/OS:
- [ ] Browser:

View File

@@ -1,17 +0,0 @@
---
name: Anything Else
about: Something that is not a bug report
title: ''
labels: ''
assignees: ''
---
Please DO NOT raise an issue.
We DO NOT use the issue tracker for general support or feature requests. Only bug reports should be raised here using the 'Bug report' template.
For general support, please use the [Node-RED Forum](https://discourse.nodered.org) or [slack team](https://nodered.org/slack). You could also consider asking a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/node-red) and tag it `node-red`.
That way the whole Node-RED user community can help, rather than rely on the core development team.
For feature requests, please use the Node-RED Forum](https://discourse.nodered.org). Many ideas have already been discussed there and you should search that for your request before starting a new discussion.

61
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@@ -0,0 +1,61 @@
name: 🐞 Report a bug
description: File a bug/issue on the core of Node-RED
labels: [needs-triage]
body:
- type: markdown
attributes:
value: |
This issue tracker is for problems with the Node-RED runtime, the editor or the core nodes.
If your issue is:
- a general 'how-to' type question,
- a feature request or suggestion for a change,
- or problems with 3rd party (`node-red-contrib-`) nodes
please use the [Node-RED Forum](https://discourse.nodered.org) or [slack team](https://nodered.org/slack).
You could also consider asking a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/node-red) and tag it `node-red`.
That way the whole Node-RED user community can help, rather than rely on the core development team.
To help us understand the issue, please fill-in as much of the following information as you can:
- type: textarea
attributes:
label: Current Behavior
description: A clear & concise description of what you're experiencing.
validations:
required: false
- type: textarea
attributes:
label: Expected Behavior
description: A clear & concise description of what you expected to happen.
validations:
required: false
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
validations:
required: false
- type: textarea
attributes:
label: Example flow
description: If you have a minimal example flow that demonstrates the issue, share it here.
value: |
```
paste your flow here
```
validations:
required: false
- type: textarea
attributes:
label: Environment
description: Please tell us about your environment. Include any relevant information on how you are running Node-RED.
value: |
- Node-RED version:
- Node.js version:
- npm version:
- Platform/OS:
- Browser:
validations:
required: false

14
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
blank_issues_enabled: true
contact_links:
- name: ❓ Questions
url: https://discourse.nodered.org
about: Ask your question on the Node-RED forum
- name: ⭐️ Feature Request
url: https://discourse.nodered.org/c/development/feature-requests
about: Discuss your request with the community
- name: 🗂 Documentation
url: https://nodered.org/docs
about: Go straight to the documentation
- name: 💬 Slack
url: https://nodered.org/slack
about: Chat about the project on our slack team

View File

@@ -1,10 +1,13 @@
name: PublishDockerImage
name: Publish Release
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
on:
release:
types: [published]
permissions:
contents: read
jobs:
generate:
name: 'Update node-red-docker image'
@@ -26,7 +29,7 @@ jobs:
path: 'node-red.github.io'
- uses: actions/setup-node@v1
with:
node-version: '12'
node-version: '16'
- run: node ./node-red/.github/scripts/update-node-red-docker.js
- name: Create Docker Pull Request
uses: peter-evans/create-pull-request@v2

36
.github/workflows/tests.yml vendored Normal file
View File

@@ -0,0 +1,36 @@
name: Run tests
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]
permissions:
contents: read
jobs:
build:
permissions:
checks: write # for coverallsapp/github-action to create new checks
contents: read # for actions/checkout to fetch code
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 18]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm install
- name: Run tests
run: |
npm run test
- name: Publish to coveralls.io
if: ${{ matrix.node-version == 16 }}
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ github.token }}

View File

@@ -15,5 +15,5 @@
"shadow": true, // allow variable shadowing (re-use of names...)
"sub": true, // don't warn that foo['bar'] should be written as foo.bar
"proto": true, // allow setting of __proto__ in node < v0.12,
"esversion": 6 // allow es6
"esversion": 11 // allow es11(ES2020)
}

View File

@@ -1,21 +0,0 @@
sudo: false
addons:
chrome: stable
language: node_js
matrix:
include:
- node_js: "14"
script:
- ./node_modules/.bin/grunt && ( cat coverage/lcov.info | $(npm get prefix)/bin/coveralls || true ) && rm -rf coverage
# - scripts/install-ui-test-dependencies.sh && grunt test-ui
before_script:
- npm install -g coveralls
- node_js: "12"
script:
- ./node_modules/.bin/grunt no-coverage
- node_js: "10"
script:
- ./node_modules/.bin/grunt no-coverage
#- node_js: "8"
# script:
# - ./node_modules/.bin/grunt no-coverage

14
API.md
View File

@@ -1,8 +1,12 @@
Node-RED Modules
---
Node-RED consists of 6 node modules under the `@node-red` scope, which are pulled together
by the top-level `node-red` module. The typical scenario is where you are embedding Node-RED into your
own application, in which case you would use the `node-red` module rather than any of the
internal modules directly.
```javascript
let RED = require("node-red");
```
Node-RED provides a set of node modules that implement different parts of the
application.
Module | Description
-------|-------
@@ -11,5 +15,5 @@ Module | Description
[@node-red/runtime](@node-red_runtime.html) | the core runtime of Node-RED
[@node-red/util](@node-red_util.html) | common utilities for the Node-RED runtime and editor modules
[@node-red/registry](@node-red_registry.html) | the internal node registry
@node-red/nodes | the default set of core nodes
@node-red/nodes | the default set of core nodes. This module only contains the Node-RED nodes - it does not expose any APIs.
@node-red/editor-client | the client-side resources of the Node-RED editor application

File diff suppressed because it is too large Load Diff

View File

@@ -38,13 +38,18 @@ 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.
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.
If you raise a pull-request without having signed the CLA, you will be prompted
to do so automatically.
### Code Branches
When raising a PR for a fix or a new feature, it is important to target the right branch.
- `master` - this is the main branch for the latest stable release of Node-RED. All bug fixes for that release should target this branch.
- `v1.x` - this is the maintenance branch for the 1.x stream. If a fix *only* applies to 1.x, then it should target this branch. If it applies to the current stable release as well, target `master` first. We will then decide if it needs to be back ported to the 1.x stream.
- `dev` - this is the branch for new feature development targeting the next milestone release.
### Coding standards

View File

@@ -16,7 +16,7 @@
var path = require("path");
var fs = require("fs-extra");
var sass = require("node-sass");
var sass = require("sass");
module.exports = function(grunt) {
@@ -40,8 +40,10 @@ module.exports = function(grunt) {
if (nonHeadless) {
process.env.NODE_RED_NON_HEADLESS = true;
}
const pkg = grunt.file.readJSON('package.json');
process.env.NODE_RED_PACKAGE_VERSION = pkg.version;
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
pkg: pkg,
paths: {
dist: ".dist"
},
@@ -135,10 +137,12 @@ module.exports = function(grunt) {
"packages/node_modules/@node-red/editor-client/src/js/jquery-addons.js",
"packages/node_modules/@node-red/editor-client/src/js/red.js",
"packages/node_modules/@node-red/editor-client/src/js/events.js",
"packages/node_modules/@node-red/editor-client/src/js/hooks.js",
"packages/node_modules/@node-red/editor-client/src/js/i18n.js",
"packages/node_modules/@node-red/editor-client/src/js/settings.js",
"packages/node_modules/@node-red/editor-client/src/js/user.js",
"packages/node_modules/@node-red/editor-client/src/js/comms.js",
"packages/node_modules/@node-red/editor-client/src/js/runtime.js",
"packages/node_modules/@node-red/editor-client/src/js/text/bidi.js",
"packages/node_modules/@node-red/editor-client/src/js/text/format.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/state.js",
@@ -147,6 +151,7 @@ module.exports = function(grunt) {
"packages/node_modules/@node-red/editor-client/src/js/font-awesome.js",
"packages/node_modules/@node-red/editor-client/src/js/history.js",
"packages/node_modules/@node-red/editor-client/src/js/validators.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/mermaid.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/utils.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js",
@@ -159,14 +164,17 @@ module.exports = function(grunt) {
"packages/node_modules/@node-red/editor-client/src/js/ui/common/stack.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/common/toggleButton.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/common/colorPicker.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/common/autoComplete.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/actions.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/diagnostics.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/diff.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/keyboard.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/env-var.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/statusBar.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/view.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/view-annotations.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/view-navigator.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/view-tools.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/sidebar.js",
@@ -178,13 +186,16 @@ module.exports = function(grunt) {
"packages/node_modules/@node-red/editor-client/src/js/ui/tab-context.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/editor.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/editors/panes/*.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/editors/*.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/editors/code-editors/*.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/event-log.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/tray.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/library.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/notifications.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/search.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/contextMenu.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/actionList.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/typeSearch.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js",
@@ -194,7 +205,8 @@ module.exports = function(grunt) {
"packages/node_modules/@node-red/editor-client/src/js/ui/projects/projectSettings.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/projects/projectUserSettings.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/projects/tab-versionControl.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/touch/radialMenu.js"
"packages/node_modules/@node-red/editor-client/src/js/ui/touch/radialMenu.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/tour/*.js"
],
dest: "packages/node_modules/@node-red/editor-client/public/red/red.js"
},
@@ -208,11 +220,13 @@ module.exports = function(grunt) {
"node_modules/marked/marked.min.js",
"node_modules/dompurify/dist/purify.min.js",
"packages/node_modules/@node-red/editor-client/src/vendor/d3/d3.v3.min.js",
"packages/node_modules/@node-red/editor-client/src/vendor/i18next/i18next.min.js",
"node_modules/i18next/i18next.min.js",
"node_modules/i18next-http-backend/i18nextHttpBackend.min.js",
"node_modules/jquery-i18next/jquery-i18next.min.js",
"node_modules/jsonata/jsonata-es5.min.js",
"packages/node_modules/@node-red/editor-client/src/vendor/jsonata/formatter.js",
"packages/node_modules/@node-red/editor-client/src/vendor/ace/ace.js",
"packages/node_modules/@node-red/editor-client/src/vendor/ace/ext-language_tools.js",
"packages/node_modules/@node-red/editor-client/src/vendor/ace/ext-language_tools.js"
],
// "packages/node_modules/@node-red/editor-client/public/vendor/vendor.css": [
// // TODO: resolve relative resource paths in
@@ -221,6 +235,9 @@ module.exports = function(grunt) {
"packages/node_modules/@node-red/editor-client/public/vendor/ace/worker-jsonata.js": [
"node_modules/jsonata/jsonata-es5.min.js",
"packages/node_modules/@node-red/editor-client/src/vendor/jsonata/worker-jsonata.js"
],
"packages/node_modules/@node-red/editor-client/public/vendor/mermaid/mermaid.min.js": [
"node_modules/mermaid/dist/mermaid.min.js"
]
}
}
@@ -281,7 +298,9 @@ module.exports = function(grunt) {
"packages/node_modules/@node-red/editor-client/public/index.html",
"packages/node_modules/@node-red/editor-client/public/favicon.ico",
"packages/node_modules/@node-red/editor-client/public/icons",
"packages/node_modules/@node-red/editor-client/public/vendor"
"packages/node_modules/@node-red/editor-client/public/vendor",
"packages/node_modules/@node-red/editor-client/public/types/node",
"packages/node_modules/@node-red/editor-client/public/types/node-red",
]
},
release: {
@@ -317,6 +336,12 @@ module.exports = function(grunt) {
],
tasks: ['jsonlint:keymaps','copy:build']
},
tours: {
files: [
'packages/node_modules/@node-red/editor-client/src/tours/**/*.js'
],
tasks: ['copy:build']
},
misc: {
files: [
'CHANGELOG.md'
@@ -371,11 +396,24 @@ module.exports = function(grunt) {
src: [
'ace/**',
'jquery/css/base/**',
'font-awesome/**'
'font-awesome/**',
'monaco/dist/**',
'monaco/types/extraLibs.js',
'monaco/style.css',
'monaco/monaco-bootstrap.js'
],
expand: true,
dest: 'packages/node_modules/@node-red/editor-client/public/vendor/'
},
{
cwd: 'packages/node_modules/@node-red/editor-client/src',
src: [
'types/node/**/*.ts',
'types/node-red/*.ts',
],
expand: true,
dest: 'packages/node_modules/@node-red/editor-client/public/'
},
{
cwd: 'packages/node_modules/@node-red/editor-client/src/icons',
src: '**',
@@ -401,6 +439,12 @@ module.exports = function(grunt) {
src: '**',
expand: true,
dest: 'packages/node_modules/@node-red/editor-client/public/vendor/ace/'
},
{
cwd: 'packages/node_modules/@node-red/editor-client/src/tours',
src: '**',
expand: true,
dest: 'packages/node_modules/@node-red/editor-client/public/red/tours/'
}
]
}
@@ -467,7 +511,8 @@ module.exports = function(grunt) {
],
options: {
destination: 'docs',
configure: './jsdoc.json'
configure: './jsdoc.json',
fred: "hi there"
}
},
_editor: {
@@ -546,7 +591,7 @@ module.exports = function(grunt) {
grunt.registerMultiTask('attachCopyright', function() {
var files = this.data.src;
var copyright = "/**\n"+
" * Copyright JS Foundation and other contributors, http://js.foundation\n"+
" * Copyright OpenJS Foundation and other contributors, https://openjsf.org/\n"+
" *\n"+
" * Licensed under the Apache License, Version 2.0 (the \"License\");\n"+
" * you may not use this file except in compliance with the License.\n"+

View File

@@ -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

View File

@@ -1,6 +1,6 @@
{
"name": "node-red",
"version": "1.3.1",
"version": "3.1.0-beta.1",
"description": "Low-code programming for event-driven applications",
"homepage": "http://nodered.org",
"license": "Apache-2.0",
@@ -26,95 +26,102 @@
}
],
"dependencies": {
"ajv": "6.12.6",
"async-mutex": "0.3.1",
"acorn": "8.8.2",
"acorn-walk": "8.2.0",
"ajv": "8.12.0",
"async-mutex": "0.4.0",
"basic-auth": "2.0.1",
"bcryptjs": "2.4.3",
"body-parser": "1.19.0",
"cheerio": "0.22.0",
"body-parser": "1.20.2",
"cheerio": "1.0.0-rc.10",
"clone": "2.1.2",
"content-type": "1.0.4",
"cookie": "0.4.1",
"cookie-parser": "1.4.5",
"content-type": "1.0.5",
"cookie": "0.5.0",
"cookie-parser": "1.4.6",
"cors": "2.8.5",
"cron": "1.7.2",
"denque": "1.5.0",
"express": "4.17.1",
"express-session": "1.17.1",
"fs-extra": "8.1.0",
"fs.notify": "0.0.4",
"cronosjs": "1.7.1",
"denque": "2.1.0",
"express": "4.18.2",
"express-session": "1.17.3",
"form-data": "4.0.0",
"fs-extra": "10.1.0",
"got": "11.8.6",
"hash-sum": "2.0.0",
"https-proxy-agent": "5.0.0",
"i18next": "15.1.2",
"iconv-lite": "0.6.2",
"hpagent": "1.2.0",
"https-proxy-agent": "5.0.1",
"i18next": "21.10.0",
"iconv-lite": "0.6.3",
"is-utf8": "0.2.1",
"js-yaml": "3.14.0",
"js-yaml": "4.1.0",
"json-stringify-safe": "5.0.1",
"jsonata": "1.8.4",
"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.6",
"multer": "1.4.2",
"memorystore": "1.6.7",
"mime": "3.0.0",
"moment": "2.29.4",
"moment-timezone": "0.5.41",
"mqtt": "4.3.7",
"multer": "1.4.5-lts.1",
"mustache": "4.2.0",
"node-red-admin": "^0.2.6",
"node-red-node-rbe": "^0.5.0",
"node-red-node-sentiment": "^0.1.6",
"node-red-node-tail": "^0.3.0",
"node-red-admin": "^3.0.0",
"node-watch": "0.7.3",
"nopt": "5.0.0",
"oauth2orize": "1.11.0",
"oauth2orize": "1.11.1",
"on-headers": "1.0.2",
"passport": "0.4.1",
"passport": "0.6.0",
"passport-http-bearer": "1.0.1",
"passport-oauth2-client-password": "0.1.2",
"raw-body": "2.4.1",
"request": "2.88.0",
"semver": "6.3.0",
"tar": "6.1.0",
"uglify-js": "3.13.3",
"ws": "6.2.1",
"raw-body": "2.5.2",
"semver": "7.3.8",
"tar": "6.1.13",
"tough-cookie": "4.1.2",
"uglify-js": "3.17.4",
"uuid": "9.0.0",
"ws": "7.5.6",
"xml2js": "0.4.23"
},
"optionalDependencies": {
"bcrypt": "3.0.8"
"bcrypt": "5.1.0"
},
"devDependencies": {
"dompurify": "2.2.7",
"grunt": "1.3.0",
"dompurify": "2.4.1",
"grunt": "1.6.1",
"grunt-chmod": "~1.1.1",
"grunt-cli": "~1.4.2",
"grunt-cli": "~1.4.3",
"grunt-concurrent": "3.0.0",
"grunt-contrib-clean": "~2.0.0",
"grunt-contrib-compress": "1.6.0",
"grunt-contrib-concat": "~1.0.1",
"grunt-contrib-copy": "~1.0.0",
"grunt-contrib-jshint": "~2.1.0",
"grunt-contrib-uglify": "~4.0.1",
"grunt-contrib-watch": "~1.1.0",
"grunt-contrib-clean": "2.0.1",
"grunt-contrib-compress": "2.0.0",
"grunt-contrib-concat": "2.1.0",
"grunt-contrib-copy": "1.0.0",
"grunt-contrib-jshint": "3.2.0",
"grunt-contrib-uglify": "5.2.2",
"grunt-contrib-watch": "1.1.0",
"grunt-jsdoc": "2.4.1",
"grunt-jsdoc-to-markdown": "5.0.0",
"grunt-jsdoc-to-markdown": "6.0.0",
"grunt-jsonlint": "2.1.3",
"grunt-mkdir": "~1.1.0",
"grunt-npm-command": "~0.1.2",
"grunt-sass": "~3.1.0",
"grunt-simple-mocha": "~0.4.1",
"grunt-simple-nyc": "^3.0.1",
"http-proxy": "1.18.1",
"i18next-http-backend": "1.4.1",
"jquery-i18next": "1.2.1",
"jsdoc-nr-template": "github:node-red/jsdoc-nr-template",
"marked": "2.0.1",
"marked": "4.2.12",
"mermaid": "^9.3.0",
"minami": "1.2.3",
"mocha": "^5.2.0",
"node-red-node-test-helper": "^0.2.7",
"node-sass": "^5.0.0",
"nodemon": "2.0.7",
"mocha": "9.2.2",
"node-red-node-test-helper": "^0.3.0",
"nodemon": "2.0.20",
"proxy": "^1.0.2",
"sass": "1.58.3",
"should": "13.2.3",
"sinon": "1.17.7",
"sinon": "11.1.2",
"stoppable": "^1.1.0",
"supertest": "5.0.0"
"supertest": "6.3.3"
},
"engines": {
"node": ">=8"
"node": ">=14"
}
}

View File

@@ -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

View File

@@ -0,0 +1,23 @@
let runtimeAPI;
let settings;
const apiUtil = require("../util");
module.exports = {
init: function(_settings, _runtimeAPI) {
settings = _settings;
runtimeAPI = _runtimeAPI;
},
getReport: function(req, res) {
const diagnosticsOpts = settings.diagnostics || {};
const opts = {
user: req.user,
scope: diagnosticsOpts.level || "basic"
}
if(diagnosticsOpts.enabled === false || diagnosticsOpts.enabled === "false") {
apiUtil.rejectHandler(req, res, {message: "diagnostics are disabled", status: 403, code: "diagnostics.disabled" })
} else {
runtimeAPI.diagnostics.get(opts)
.then(function(result) { res.json(result); })
.catch(err => apiUtil.rejectHandler(req, res, err))
}
}
}

View File

@@ -68,5 +68,28 @@ module.exports = {
}).catch(function(err) {
apiUtils.rejectHandler(req,res,err);
})
},
getState: function(req,res) {
const opts = {
user: req.user,
req: apiUtils.getRequestLogObject(req)
}
runtimeAPI.flows.getState(opts).then(function(result) {
res.json(result);
}).catch(function(err) {
apiUtils.rejectHandler(req,res,err);
})
},
postState: function(req,res) {
const opts = {
user: req.user,
state: req.body.state || "",
req: apiUtils.getRequestLogObject(req)
}
runtimeAPI.flows.setState(opts).then(function(result) {
res.json(result);
}).catch(function(err) {
apiUtils.rejectHandler(req,res,err);
})
}
}

View File

@@ -23,6 +23,7 @@ var context = require("./context");
var auth = require("../auth");
var info = require("./settings");
var plugins = require("./plugins");
var diagnostics = require("./diagnostics");
var apiUtil = require("../util");
@@ -34,15 +35,31 @@ module.exports = {
context.init(runtimeAPI);
info.init(settings,runtimeAPI);
plugins.init(runtimeAPI);
diagnostics.init(settings, runtimeAPI);
var needsPermission = auth.needsPermission;
var adminApp = express();
var defaultServerSettings = {
"x-powered-by": false
}
var serverSettings = Object.assign({},defaultServerSettings,settings.httpServerOptions||{});
for (var eOption in serverSettings) {
adminApp.set(eOption, serverSettings[eOption]);
}
// Flows
adminApp.get("/flows",needsPermission("flows.read"),flows.get,apiUtil.errorHandler);
adminApp.post("/flows",needsPermission("flows.write"),flows.post,apiUtil.errorHandler);
// Flows/state
adminApp.get("/flows/state", needsPermission("flows.read"), flows.getState, apiUtil.errorHandler);
if (settings.runtimeState && settings.runtimeState.enabled === true) {
adminApp.post("/flows/state", needsPermission("flows.write"), flows.postState, apiUtil.errorHandler);
}
// Flow
adminApp.get("/flow/:id",needsPermission("flows.read"),flow.get,apiUtil.errorHandler);
adminApp.post("/flow",needsPermission("flows.write"),flow.post,apiUtil.errorHandler);
@@ -86,6 +103,8 @@ module.exports = {
adminApp.get("/plugins", needsPermission("plugins.read"), plugins.getAll, apiUtil.errorHandler);
adminApp.get("/plugins/messages", needsPermission("plugins.read"), plugins.getCatalogs, apiUtil.errorHandler);
adminApp.get("/diagnostics", needsPermission("diagnostics.read"), diagnostics.getReport, apiUtil.errorHandler);
return adminApp;
}
}

View File

@@ -17,9 +17,8 @@ module.exports = {
})
} else {
opts.lang = apiUtils.determineLangFromHeaders(req.acceptsLanguages());
if (/[^a-z\-\*]/i.test(opts.lang)) {
res.json({});
return;
if (/[^0-9a-z=\-\*]/i.test(opts.lang)) {
opts.lang = "en-US";
}
runtimeAPI.plugins.getPluginConfigs(opts).then(function(configs) {
res.send(configs);
@@ -32,9 +31,8 @@ module.exports = {
lang: req.query.lng,
req: apiUtils.getRequestLogObject(req)
}
if (/[^a-z\-\*]/i.test(opts.lang)) {
res.json({});
return;
if (/[^0-9a-z=\-\*]/i.test(opts.lang)) {
opts.lang = "en-US";
}
runtimeAPI.plugins.getPluginCatalogs(opts).then(function(result) {
res.json(result);

View File

@@ -90,7 +90,7 @@ function getToken(req,res,next) {
return server.token()(req,res,next);
}
function login(req,res) {
async function login(req,res) {
var response = {};
if (settings.adminAuth) {
var mergedAdminAuth = Object.assign({}, settings.adminAuth, settings.adminAuth.module);
@@ -106,9 +106,15 @@ function login(req,res) {
urlPrefix += "/";
}
response = {
"type":"strategy",
"prompts":[{type:"button",label:mergedAdminAuth.strategy.label, url: urlPrefix + "auth/strategy"}]
"type":"strategy"
}
if (mergedAdminAuth.strategy.autoLogin) {
response.autoLogin = true
response.loginRedirect = urlPrefix + "auth/strategy"
}
response.prompts = [
{type:"button",label:mergedAdminAuth.strategy.label, url: urlPrefix + "auth/strategy"}
]
if (mergedAdminAuth.strategy.icon) {
response.prompts[0].icon = mergedAdminAuth.strategy.icon;
}
@@ -116,8 +122,9 @@ function login(req,res) {
response.prompts[0].image = theme.serveFile('/login/',mergedAdminAuth.strategy.image);
}
}
if (theme.context().login && theme.context().login.image) {
response.image = theme.context().login.image;
let themeContext = await theme.context();
if (themeContext.login && themeContext.login.image) {
response.image = themeContext.login.image;
}
}
res.json(response);
@@ -140,7 +147,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);
});
@@ -172,31 +179,38 @@ function genericStrategy(adminApp,strategy) {
adminApp.use(passport.session());
var options = strategy.options;
var verify = function() {
var originalDone = arguments[arguments.length-1];
if (options.verify) {
var args = Array.from(arguments);
args[args.length-1] = function(err,profile) {
if (err) {
return originalDone(err);
} else {
return completeVerify(profile,originalDone);
}
};
passport.use(new strategy.strategy(options,
function() {
var originalDone = arguments[arguments.length-1];
if (options.verify) {
var args = Array.from(arguments);
args[args.length-1] = function(err,profile) {
if (err) {
return originalDone(err);
} else {
return completeVerify(profile,originalDone);
}
};
options.verify.apply(null,args);
} else {
var profile = arguments[arguments.length - 2];
return completeVerify(profile,originalDone);
}
options.verify.apply(this,args);
} else {
var profile = arguments[arguments.length - 2];
return completeVerify(profile,originalDone);
}
));
};
// Give our callback the same arity as the original one from options
if (options.verify) {
Object.defineProperty(verify, "length", { value: options.verify.length })
}
passport.use(new strategy.strategy(options, verify));
adminApp.get('/auth/strategy',
passport.authenticate(strategy.name, {session:false, failureRedirect: settings.httpAdminRoot }),
completeGenerateStrategyAuth
passport.authenticate(strategy.name, {session:false,
failureMessage: true,
failureRedirect: settings.httpAdminRoot
}),
completeGenerateStrategyAuth,
handleStrategyError
);
var callbackMethodFunc = adminApp.get;
@@ -204,8 +218,13 @@ function genericStrategy(adminApp,strategy) {
callbackMethodFunc = adminApp.post;
}
callbackMethodFunc.call(adminApp,'/auth/strategy/callback',
passport.authenticate(strategy.name, {session:false, failureRedirect: settings.httpAdminRoot }),
completeGenerateStrategyAuth
passport.authenticate(strategy.name, {
session:false,
failureMessage: true,
failureRedirect: settings.httpAdminRoot
}),
completeGenerateStrategyAuth,
handleStrategyError
);
}
@@ -215,6 +234,13 @@ function completeGenerateStrategyAuth(req,res) {
// Successful authentication, redirect home.
res.redirect(settings.httpAdminRoot + '?access_token='+tokens.accessToken);
}
function handleStrategyError(err, req, res, next) {
if (res.headersSent) {
return next(err)
}
log.audit({event: "auth.login.fail.oauth",error:err.toString()});
res.redirect(settings.httpAdminRoot + '?session_message='+err.toString());
}
module.exports = {
init: init,

View File

@@ -92,10 +92,16 @@ var passwordTokenExchange = function(client, username, password, scope, done) {
loginAttempts = loginAttempts.filter(function(logEntry) {
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});
done(null,tokens.accessToken,null,{expires_in:tokens.expires_in});
});
// Check if the user contains a user defined token and use it
// instead of generating a new token
if(user.token){
done(null,user.token,null,null);
} else {
Tokens.create(username,client.id,scope).then(function(tokens) {
log.audit({event: "auth.login",user,username:username,client:client.id,scope:scope});
done(null,tokens.accessToken,null,{expires_in:tokens.expires_in});
});
}
} else {
log.audit({event: "auth.login.fail.permissions",username:username,client:client.id,scope:scope});
done(null,false);
@@ -146,7 +152,7 @@ function authenticateUserToken(req) {
} else {
reject();
}
});
}).catch(reject);
} else {
reject();
}
@@ -163,6 +169,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);
});
}

View File

@@ -158,25 +158,31 @@ function CommsConnection(ws, user) {
}
CommsConnection.prototype.send = function(topic,data) {
var self = this;
if (topic && data) {
this.stack.push({topic:topic,data:data});
}
this._queueSend();
}
CommsConnection.prototype._queueSend = function() {
var self = this;
if (!this._xmitTimer) {
this._xmitTimer = setTimeout(function() {
try {
self.ws.send(JSON.stringify(self.stack));
self.ws.send(JSON.stringify(self.stack.splice(0,50)));
self.lastSentTime = Date.now();
} catch(err) {
removeActiveConnection(self);
log.warn(log._("comms.error-send",{message:err.toString()}));
}
delete self._xmitTimer;
self.stack = [];
if (self.stack.length > 0) {
self._queueSend();
}
},50);
}
}
CommsConnection.prototype.subscribe = function(topic) {
runtimeAPI.comms.subscribe({
user: this.user,

View File

@@ -64,10 +64,12 @@ module.exports = {
}
});
}
if (settings.httpServerOptions) {
for (var eOption in settings.httpServerOptions) {
editorApp.set(eOption, settings.httpServerOptions[eOption]);
}
var defaultServerSettings = {
"x-powered-by": false
}
var serverSettings = Object.assign({},defaultServerSettings,settings.httpServerOptions||{});
for (var eOption in serverSettings) {
editorApp.set(eOption, serverSettings[eOption]);
}
editorApp.get("/",ensureRuntimeStarted,ui.ensureSlash,ui.editor);

View File

@@ -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);
}
}

View File

@@ -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) {

View File

@@ -18,14 +18,6 @@ var apiUtils = require("../util");
var express = require("express");
var runtimeAPI;
function getUsername(userObj) {
var username = '__default';
if ( userObj && userObj.name ) {
username = userObj.name;
}
return username;
}
module.exports = {
init: function(_runtimeAPI) {
runtimeAPI = _runtimeAPI;

View File

@@ -24,16 +24,20 @@ var defaultContext = {
page: {
title: "Node-RED",
favicon: "favicon.ico",
tabicon: "red/images/node-red-icon-black.svg"
tabicon: {
icon: "red/images/node-red-icon-black.svg",
colour: "#8f0000"
},
version: require(path.join(__dirname,"../../package.json")).version
},
header: {
title: "Node-RED",
image: "red/images/node-red.svg"
},
asset: {
red: (process.env.NODE_ENV == "development")? "red/red.js":"red/red.min.js",
main: (process.env.NODE_ENV == "development")? "red/main.js":"red/main.min.js",
red: "red/red.min.js",
main: "red/main.min.js",
vendorMonaco: ""
}
};
@@ -74,7 +78,7 @@ function serveFilesFromTheme(themeValue, themeApp, directory, baseDirectory) {
let fullPath = array[i];
if (baseDirectory) {
fullPath = path.resolve(baseDirectory,array[i]);
if (fullPath.indexOf(baseDirectory) !== 0) {
if (fullPath.indexOf(path.resolve(baseDirectory)) !== 0) {
continue;
}
}
@@ -91,8 +95,16 @@ module.exports = {
init: function(settings, _runtimeAPI) {
runtimeAPI = _runtimeAPI;
themeContext = clone(defaultContext);
if (process.env.NODE_ENV == "development") {
themeContext.asset.red = "red/red.js";
themeContext.asset.main = "red/main.js";
}
themeSettings = null;
theme = settings.editorTheme || {};
themeContext.asset.vendorMonaco = "vendor/monaco/monaco-bootstrap.js"
if (theme.codeEditor && theme.codeEditor.lib === 'ace') {
themeContext.asset.vendorMonaco = ''
}
activeTheme = theme.theme;
},
@@ -122,13 +134,25 @@ module.exports = {
}
if (theme.page.tabicon) {
url = serveFile(themeApp,"/tabicon/",theme.page.tabicon)
let icon = theme.page.tabicon.icon || theme.page.tabicon
url = serveFile(themeApp,"/tabicon/", icon)
if (url) {
themeContext.page.tabicon = url;
themeContext.page.tabicon.icon = url;
}
if (theme.page.tabicon.colour) {
themeContext.page.tabicon.colour = theme.page.tabicon.colour
}
}
themeContext.page.title = theme.page.title || themeContext.page.title;
// Store the resolved urls to these resources so nodes (such as Debug)
// can access them
theme.page._ = {
css: themeContext.page.css,
scripts: themeContext.page.scripts,
favicon: themeContext.page.favicon
}
}
if (theme.header) {
@@ -207,6 +231,11 @@ module.exports = {
if (theme.theme) {
themeSettings.theme = theme.theme;
}
if (theme.hasOwnProperty("tours")) {
themeSettings.tours = theme.tours;
}
return themeApp;
},
context: async function() {
@@ -223,6 +252,8 @@ module.exports = {
themePlugin.path
);
themeContext.page.css = cssFiles.concat(themeContext.page.css || [])
theme.page = theme.page || {_:{}}
theme.page._.css = cssFiles.concat(theme.page._.css || [])
}
if (themePlugin.scripts) {
const scriptFiles = serveFilesFromTheme(
@@ -232,7 +263,72 @@ module.exports = {
themePlugin.path
)
themeContext.page.scripts = scriptFiles.concat(themeContext.page.scripts || [])
theme.page = theme.page || {_:{}}
theme.page._.scripts = scriptFiles.concat(theme.page._.scripts || [])
}
// check and load page settings from theme
if (themePlugin.page) {
if (themePlugin.page.favicon && !theme.page.favicon) {
const result = serveFilesFromTheme(
[themePlugin.page.favicon],
themeApp,
"/",
themePlugin.path
)
if(result && result.length > 0) {
// update themeContext page favicon
themeContext.page.favicon = result[0]
theme.page = theme.page || {_:{}}
theme.page._.favicon = result[0]
}
}
if (themePlugin.page.tabicon && themePlugin.page.tabicon.icon && !theme.page.tabicon) {
const result = serveFilesFromTheme(
[themePlugin.page.tabicon.icon],
themeApp,
"/page/",
themePlugin.path
)
if(result && result.length > 0) {
// update themeContext page tabicon
themeContext.page.tabicon.icon = result[0]
themeContext.page.tabicon.colour = themeContext.page.tabicon.colour || themeContext.page.tabicon.colour
theme.page = theme.page || {_:{}}
theme.page._.tabicon = theme.page._.tabicon || {}
theme.page._.tabicon.icon = themeContext.page.tabicon.icon
theme.page._.tabicon.colour = themeContext.page.tabicon.colour
}
}
// if the plugin has a title AND the users settings.js does NOT
if (themePlugin.page.title && !theme.page.title) {
themeContext.page.title = themePlugin.page.title || themeContext.page.title
}
}
// check and load header settings from theme
if (themePlugin.header) {
if (themePlugin.header.image && !theme.header.image) {
const result = serveFilesFromTheme(
[themePlugin.header.image],
themeApp,
"/header/",
themePlugin.path
)
if(result && result.length > 0) {
// update themeContext header image
themeContext.header.image = result[0]
}
}
// if the plugin has a title AND the users settings.js does NOT have a title
if (themePlugin.header.title && !theme.header.title) {
themeContext.header.title = themePlugin.header.title || themeContext.header.title
}
// if the plugin has a header url AND the users settings.js does NOT
if (themePlugin.header.url && !theme.header.url) {
themeContext.header.url = themePlugin.header.url || themeContext.header.url
}
}
theme.codeEditor = theme.codeEditor || {}
theme.codeEditor.options = Object.assign({}, themePlugin.monacoOptions, theme.codeEditor.options);
}
activeThemeInitialised = true;
}

View File

@@ -91,7 +91,16 @@ module.exports = {
},
editor: async function(req,res) {
res.send(Mustache.render(editorTemplate,await theme.context()));
let sessionMessages;
if (req.session && req.session.messages) {
sessionMessages = JSON.stringify(req.session.messages);
delete req.session.messages
}
res.send(Mustache.render(editorTemplate,{
sessionMessages,
...await theme.context()
}));
},
editorResources: express.static(path.join(editorClientDir,'public'))
};

View File

@@ -64,6 +64,14 @@ function init(settings,_server,storage,runtimeAPI) {
}
}
var defaultServerSettings = {
"x-powered-by": false
}
var serverSettings = Object.assign({},defaultServerSettings,settings.httpServerOptions||{});
for (var eOption in serverSettings) {
adminApp.set(eOption, serverSettings[eOption]);
}
auth.init(settings,storage);
var maxApiRequestSize = settings.apiMaxLength || '5mb';
@@ -82,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);
}

View File

@@ -1,6 +1,6 @@
{
"name": "@node-red/editor-api",
"version": "1.3.1",
"version": "3.1.0-beta.1",
"license": "Apache-2.0",
"main": "./lib/index.js",
"repository": {
@@ -16,25 +16,25 @@
}
],
"dependencies": {
"@node-red/util": "1.3.1",
"@node-red/editor-client": "1.3.1",
"@node-red/util": "3.1.0-beta.1",
"@node-red/editor-client": "3.1.0-beta.1",
"bcryptjs": "2.4.3",
"body-parser": "1.19.0",
"body-parser": "1.20.2",
"clone": "2.1.2",
"cors": "2.8.5",
"express-session": "1.17.1",
"express": "4.17.1",
"memorystore": "1.6.6",
"mime": "2.5.2",
"multer": "1.4.2",
"express-session": "1.17.3",
"express": "4.18.2",
"memorystore": "1.6.7",
"mime": "3.0.0",
"multer": "1.4.5-lts.1",
"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.4.1",
"ws": "6.2.1"
"passport": "0.6.0",
"ws": "7.5.6"
},
"optionalDependencies": {
"bcrypt": "3.0.6"
"bcrypt": "5.1.0"
}
}

View File

@@ -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

271
packages/node_modules/@node-red/editor-client/locales/de/editor.json vendored Executable file → Normal file
View File

@@ -44,7 +44,8 @@
"loadNodes": "Lade Nodes __count__",
"loadFlows": "Lade Flows",
"importFlows": "Füge Flows dem Arbeitsbereich hinzu",
"importError": "<p>Fehler beim Laden von Flows.</p><p>__message__</p>"
"importError": "<p>Fehler beim Laden von Flows.</p><p>__message__</p>",
"loadingProject": "Lade Projekt"
},
"workspace": {
"defaultName": "Flow __number__",
@@ -53,7 +54,16 @@
"delete": "Sind Sie sicher, dass '__label__' gelöscht werden soll?",
"dropFlowHere": "Hier kann der Flow eingefügt werden",
"addFlow": "Flow hinzufügen",
"addFlowToRight": "Flow zum Arbeitsbereich rechts hinzufügen",
"hideFlow": "Flow ausblenden",
"hideOtherFlows": "Andere Flows ausblenden",
"showAllFlows": "Alle Flows anzeigen",
"hideAllFlows": "Alle Flows ausblenden",
"hiddenFlows": "Liste __count__ ausgeblendeten Flow auf",
"hiddenFlows_plural": "Liste __count__ ausgeblendete Flows auf",
"showLastHiddenFlow": "Letzten ausgeblendeten Flow anzeigen",
"listFlows": "Flows auflisten",
"listSubflows": "Subflows auflisten",
"status": "Status",
"enabled": "Aktiviert",
"disabled": "Deaktiviert",
@@ -65,6 +75,8 @@
"view": {
"view": "Ansicht",
"grid": "Raster",
"storeZoom": "Zoomstufe beim Laden wiederherstellen",
"storePosition": "Scrollposition beim Laden wiederherstellen",
"showGrid": "Raster anzeigen",
"snapGrid": "Am Raster ausrichten",
"gridSize": "Rastergröße",
@@ -82,6 +94,7 @@
"palette": {
"show": "Palette anzeigen"
},
"edit": "Bearbeiten",
"settings": "Einstellungen",
"userSettings": "Einstellungen",
"nodes": "Nodes",
@@ -92,7 +105,7 @@
"search": "Flows durchsuchen",
"searchInput": "Flows durchsuchen",
"subflows": "Subflow",
"createSubflow": "Erstellen",
"createSubflow": "Hinzufügen",
"selectionToSubflow": "Auswahl in Subflow umwandeln",
"flows": "Flow",
"add": "Hinzufügen",
@@ -104,24 +117,43 @@
"editPalette": "Palette verwalten",
"other": "Sonstige",
"showTips": "Tipps anzeigen",
"showWelcomeTours": "Geführte Touren für neue Versionen anzeigen",
"help": "Node-RED-Website",
"projects": "Projekt",
"projects": "Projekte",
"projects-new": "Neu",
"projects-open": "Öffnen",
"projects-settings": "Einstellungen",
"showNodeLabelDefault": "Zeige Namen von neu hinzugefügten Nodes",
"groups": "Gruppe",
"codeEditor": "Code-Editor",
"groups": "Gruppen",
"groupSelection": "Auswahl gruppieren",
"ungroupSelection": "Gruppe auflösen",
"groupMergeSelection": "Auswahl der Gruppe hinzufügen",
"groupRemoveSelection": "Auswahl aus der Gruppe entfernen"
"groupRemoveSelection": "Auswahl aus der Gruppe entfernen",
"arrange": "Anordnen",
"alignLeft": "Links ausrichten",
"alignCenter": "Zentrieren",
"alignRight": "Rechts ausrichten",
"alignTop": "Oben ausrichten",
"alignMiddle": "Mittig ausrichten",
"alignBottom": "Unten ausrichten",
"distributeHorizontally": "Horizontal verteilen",
"distributeVertically": "Vertikal verteilen",
"moveToBack": "Nach hinten verschieben",
"moveToFront": "Nach vorne verschieben",
"moveBackwards": "Rückwärts verschieben",
"moveForwards": "Vorwärts verschieben"
}
},
"actions": {
"toggle-navigator": "Navigator ein-/ausblenden",
"zoom-out": "Verkleinern",
"zoom-reset": "Vergrößerung rücksetzen",
"zoom-in": "Vergrößern"
"zoom-in": "Vergrößern",
"search-flows": "Flows durchsuchen",
"search-prev": "Vorherige",
"search-next": "Nächste",
"search-counter": "\"__term__\" __result__ von __count__"
},
"user": {
"loggedInAs": "Angemeldet als __name__",
@@ -131,48 +163,52 @@
"loginFailed": "Anmeldung fehlgeschlagen",
"notAuthorized": "Nicht berechtigt",
"errors": {
"settings": "Sie müssen angemeldet sein, um auf die Einstellungen zuzugreifen zu können",
"settings": "Sie müssen angemeldet sein, um auf die Einstellungen zugreifen zu können",
"deploy": "Sie müssen angemeldet sein, um Änderungen übernehmen (deploy) zu können",
"notAuthorized": "Sie müssen angemeldet sein, um diese Aktion ausführen zu können"
}
},
"notification": {
"warning": "<strong>Warnung:</strong> __message__",
"state": {
"flowsStopped": "Flows gestoppt",
"flowsStarted": "Flows gestartet"
},
"warning": "<strong>Warnung</strong>: __message__",
"warnings": {
"undeployedChanges": "Node hat nicht übernommene (deploy) Änderungen",
"nodeActionDisabled": "Node-Aktionen deaktiviert",
"nodeActionDisabledSubflow": "Node-Aktionen deaktiviert im Subflow",
"nodeActionDisabledSubflow": "Node-Aktionen innerhalb des Subflows deaktiviert",
"missing-types": "<p>Flows gestoppt aufgrund fehlender Node-Typen</p>",
"missing-modules": "<p>Flows angehalten aufgrund fehlender Module</p>",
"safe-mode": "<p>Flows sind im abgesicherten Modus gestoppt.</p><p>Flows können bearbeitet und übernommen (deploy) werden, um sie neu zu starten.</p>",
"restartRequired": "Node-RED muss neu gestartet werden, damit die Module nach Upgrade aktiviert werden",
"credentials_load_failed": "<p>Flows gestoppt, da die Berechtigungen nicht entschlüsselt werden konnten.</p><p>Die Datei mit dem Flow-Berechtigungen ist verschlüsselt, aber der Schlüssel des Projekts fehlt oder ist ungültig.</p>",
"credentials_load_failed_reset": "<p>Die Berechtigungen konnten nicht entschlüsselt werden.</p><p>Die Datei mit den Flow-Berechtigungen ist verschlüsselt, aber der Schlüssel des Projekts fehlt oder ist ungültig.</p><p>Die Datei mit den Flow-Berechtigungen wird bei der nächsten Übernahme (deploy) zurückgesetzt. Alle vorhandenen Flow-Berechtigungen werden gelöscht.</p>",
"credentials_load_failed": "<p>Flows gestoppt, da die Credentials nicht entschlüsselt werden konnten.</p><p>Die Datei mit den Flow-Credentials ist verschlüsselt, aber der Schlüssel des Projekts fehlt oder ist ungültig.</p>",
"credentials_load_failed_reset": "<p>Die Credentials konnten nicht entschlüsselt werden.</p><p>Die Datei mit den Flow-Credentials ist verschlüsselt, aber der Schlüssel des Projekts fehlt oder ist ungültig.</p><p>Die Datei mit den Flow-Credentials wird bei der nächsten Übernahme (deploy) zurückgesetzt. Alle vorhandenen Flow-Credentials werden gelöscht.</p>",
"missing_flow_file": "<p>Die Flow-Datei des Projekts wurde nicht gefunden.</p><p>Das Projekt ist nicht mit einer Flow-Datei konfiguriert.</p>",
"missing_package_file": "<p>Die Paket-Datei des Projekts wurde nicht gefunden.</p><p>In dem Projekt fehlt die 'package.json'-Datei.</p>",
"project_empty": "<p>Das Projekt ist leer.</p><p>Soll ein Standardsatz an Projektdateien erstellen werden?<br/>Andernfalls müssen die Dateien manuell außerhalb des Editors dem Projekt hinzugefügt werden.</p>",
"project_not_found": "<p>Das Projekt '__project__' wurde nicht gefunden.</p>",
"git_merge_conflict": "<p>Der automatische Merge der Änderungen ist fehlgeschlagen.</p><p>Die Merge-Konflikte müssen behoben und die Ergebnisse ins Repository übertragen werden (commit).</p>"
},
"error": "<strong>Fehler:</strong> __message__",
"error": "<strong>Fehler</strong>: __message__",
"errors": {
"lostConnection": "Verbindung zum Server verloren. Verbindung wird erneut hergestellt ...",
"lostConnectionReconnect": "Verbindung zum Server verloren. Verbindung wird in __time__ s versucht wieder herzustellen.",
"lostConnectionTry": "Jetzt testen",
"lostConnectionReconnect": "Verbindung zum Server verloren. Wiederherstellung der Verbindung in __time__s.",
"lostConnectionTry": "Jetzt versuchen",
"cannotAddSubflowToItself": "Subflow kann nicht zu sich selbst hinzugefügt werden",
"cannotAddCircularReference": "Subflow kann nicht hinzugefügt werden, da ein zirkulärer Bezug erkannt wurde",
"unsupportedVersion": "<p>Nicht unterstützte Version von Node.js erkannt.</p><p>Es muss ein Upgrade auf das neueste LTS-Release von Node.js durchgeführt werden.</p>",
"failedToAppendNode": "<p>Fehler beim Laden von '__module__'.</p><p>__error__</p>"
},
"project": {
"change-branch": "Wechsel in den Branch '__project__'",
"merge-abort": "Merge abgebrochen",
"change-branch": "Wechsel in den lokalen Branch '__project__'",
"merge-abort": "Git-Merge abgebrochen",
"loaded": "Projekt '__project__' geladen",
"updated": "Projekt '__project__' aktualisiert",
"pull": "Projekt '__project__' erneut geladen",
"revert": "Änderungen im Projekt '__project__' rückgängig gemacht",
"merge-complete": "Merge abgeschlossen",
"setupCredentials": "Berechtigungen einrichten",
"merge-complete": "Git-Merge abgeschlossen",
"setupCredentials": "Credentials einrichten",
"setupProjectFiles": "Projektdateien einrichten",
"no": "Nein, Danke",
"createDefault": "Standardprojektdateien erstellen",
@@ -180,12 +216,13 @@
},
"label": {
"manage-project-dep": "Projektabhängigkeiten verwalten",
"setup-cred": "Berechtigungen einrichten",
"setup-cred": "Credentials einrichten",
"setup-project": "Projektdateien einrichten",
"create-default-package": "Standardpaketdatei erstellen",
"no-thanks": "Nein, Danke",
"create-default-project": "Standardprojektdateien erstellen",
"show-merge-conflicts": "Merge-Konflikte anzeigen"
"show-merge-conflicts": "Merge-Konflikte anzeigen",
"unknownNodesButton": "Nach unbekannten Nodes suchen"
}
},
"clipboard": {
@@ -203,17 +240,17 @@
"subflow_plural": "__count__ Subflows",
"replacedNodes": "__count__ Node ersetzt",
"replacedNodes_plural": "__count__ Nodes ersetzt",
"pasteNodes": "Flow-JSON hier einfügen oder",
"pasteNodes": "Flow-JSON einfügen oder",
"selectFile": "Datei für Import auswählen",
"importNodes": "Import",
"exportNodes": "Export",
"download": "Download",
"importUnrecognised": "Importierter Typ nicht erkannt:",
"importUnrecognised_plural": "Importierte Typen nicht erkannt:",
"importDuplicate": "Importiertes doppeltes Node:",
"importDuplicate_plural": "Importierte doppelte Nodes:",
"nodesExported": "Nodes in der Zwischenablage abgelegt",
"nodesImported": "Eingefügt:",
"importUnrecognised": "Nicht erkannten Typ importiert:",
"importUnrecognised_plural": "Nicht erkannte Typen importiert:",
"importDuplicate": "Doppelten Node importiert:",
"importDuplicate_plural": "Doppelte Nodes importiert:",
"nodesExported": "Nodes in die Zwischenablage exportiert",
"nodesImported": "Importiert:",
"nodeCopied": "__count__ Node kopiert",
"nodeCopied_plural": "__count__ Nodes kopiert",
"groupCopied": "__count__ Gruppe kopiert",
@@ -229,11 +266,11 @@
"all": "Alle Flows",
"compact": "Kompakt",
"formatted": "Formatiert",
"copy": "In Zwischenablage exportieren",
"copy": "In Zwischenablage kopieren",
"export": "In Bibliothek exportieren",
"exportAs": "Exportiere als",
"overwrite": "Ersetzen",
"exists": "<p>'__file__' existiert bereits.</p><p>Soll sie ersetzt werden?</p>"
"exists": "<p><b>\"__file__\"</b> existiert bereits.</p><p>Soll sie ersetzt werden?</p>"
},
"import": {
"import": "Importiere in",
@@ -263,13 +300,19 @@
"modifiedFlowsDesc": "Übernimmt nur Flows, die geänderte Nodes enthalten",
"modifiedNodes": "Geänderte Nodes",
"modifiedNodesDesc": "Übernimmt nur Nodes, die sich geändert haben",
"startFlows": "Start",
"startFlowsDesc": "Flows starten",
"stopFlows": "Stop",
"stopFlowsDesc": "Flows stoppen",
"restartFlows": "Flows neustarten",
"restartFlowsDesc": "Startet die aktuell übernommenen Flows (ohne vorheriges Deploy)",
"successfulDeploy": "Erfolgreich übernommen (deploy)",
"successfulRestart": "Flows erfolgreich neugestartet",
"deployFailed": "Übernahme (deploy) fehlgeschlagen: __message__",
"unusedConfigNodes": "Einige Konfigurations-Nodes werden nicht verwendet.",
"unusedConfigNodesLink": "Hier klicken, um sie anzuschauen.",
"unusedConfigNodesButton": "Suche nach unbenutzten Konfigurations-Nodes",
"unknownNodesButton": "Suche nach unbekannten Nodes",
"invalidNodesButton": "Suche nach ungültigen Nodes",
"errors": {
"noResponse": "Keine Antwort vom Server"
},
@@ -342,7 +385,7 @@
"confirmDelete": "Sind Sie sicher mit dem Löschen dieses Subflows?",
"info": "Beschreibung",
"category": "Kategorie",
"module": "Module",
"module": "Modul",
"license": "Lizenz",
"licenseNone": "Keine",
"licenseOther": "Andere",
@@ -352,10 +395,10 @@
"keys": "Schlüsselwörter",
"keysPlaceholder": "Komma-getrennte Schlüsselwörter",
"author": "Author",
"authorPlaceholder": "Dein Name <email@beispiel.de>",
"authorPlaceholder": "Ihr Name <email@example.com>",
"desc": "Beschreibung",
"env": {
"restore": "Stelle auf Subflow-Standard zurück",
"restore": "Subflow-Standard wiederherstellen",
"remove": "Entferne Umgebungsvariable"
},
"errors": {
@@ -364,9 +407,9 @@
}
},
"group": {
"editGroup": "Editiere Gruppe: __name__",
"editGroup": "Bearbeite Gruppe: __name__",
"errors": {
"cannotCreateDiffGroups": "Kann keine Gruppe erzeugen mit Nodes von verschiedenen Gruppen",
"cannotCreateDiffGroups": "Kann keine Gruppe mit Nodes von anderen Gruppen erstellen",
"cannotAddSubflowPorts": "Kann keine Subflow-Anschlüsse zu einer Gruppe hinzufügen"
}
},
@@ -380,7 +423,7 @@
"addNewConfig": "Neuen Konfigurations-Node '__type__' hinzufügen",
"editNode": "Node '__type__' bearbeiten",
"editConfig": "Konfigurations-Node '__type__' bearbeiten",
"addNewType": "Neuen Typ '__type__' hinzufügen",
"addNewType": "Neuen Typ '__type__' hinzufügen ...",
"nodeProperties": "Node-Eigenschaften",
"label": "Name",
"color": "Farbe",
@@ -400,10 +443,10 @@
"icon": "Icon",
"inputType": "Eingangstyp",
"selectType": "Wähle Typen ...",
"loadCredentials": "Lade Node-Berechtigungen",
"loadCredentials": "Lade Node-Credentials",
"inputs": {
"input": "Eingang",
"select": "hle",
"select": "Auswahl",
"checkbox": "Checkbox",
"spinner": "Spinner",
"none": "Kein",
@@ -416,7 +459,7 @@
"json": "JSON",
"bin": "buffer",
"env": "Umgebungsvariable",
"cred": "Berechtigung"
"cred": "Credentials"
},
"menu": {
"input": "Eingang",
@@ -436,7 +479,7 @@
"errors": {
"scopeChange": "Wenn Sie den Geltungsbereich (scope) ändern, wird er für Nodes in anderen Flows nicht verfügbar sein",
"invalidProperties": "Ungültige Eigenschaften:",
"credentialLoadFailed": "Laden der Node-Berechtigungen fehlgeschlagen"
"credentialLoadFailed": "Laden der Node-Credentials fehlgeschlagen"
}
},
"keyboard": {
@@ -446,23 +489,27 @@
"shortcut": "Tastenkürzel",
"scope": "Geltungsbereich",
"unassigned": "Nicht zugeordnet",
"global": "global",
"global": "Global",
"workspace": "Arbeitsbereich",
"selectAll": "Alle Nodes auswählen",
"selectAll": "Alles auswählen",
"selectNone": "Alles abwählen",
"selectAllConnected": "Alle verbundenen Nodes auswählen",
"addRemoveNode": "Node aus Auswahl hinzufügen/entfernen",
"editSelected": "Ausgewählten Node bearbeiten",
"deleteSelected": "Ausgewählte Nodes oder Links löschen",
"importNode": "Node importieren",
"exportNode": "Node exportieren",
"importNode": "Nodes importieren",
"exportNode": "Nodes exportieren",
"nudgeNode": "Ausgewählte Nodes verschieben (1px)",
"moveNode": "Ausgewählte Nodes verschieben (20px)",
"toggleSidebar": "Seitenleiste ein-/ausblenden",
"togglePalette": "Palette ein-/ausblenden",
"copyNode": "Ausgewählte Nodes kopieren",
"cutNode": "Ausgewählte Nodes ausschneiden",
"pasteNode": "Node einfügen",
"pasteNode": "Nodes einfügen",
"copyGroupStyle": "Gruppenstil kopieren",
"pasteGroupStyle": "Gruppenstil einfügen",
"undoChange": "Letzte Änderung rückgängig machen",
"redoChange": "Letzte Änderung wiederholen",
"searchBox": "Suchfeld öffnen",
"managePalette": "Palette verwalten",
"actionList": "Aktionsliste"
@@ -488,7 +535,7 @@
"palette": {
"noInfo": "Keine Informationen verfügbar",
"filter": "Nodes filtern",
"search": "Modules durchsuchen",
"search": "Module durchsuchen",
"addCategory": "Neu hinzufügen ...",
"label": {
"subflows": "Subflows",
@@ -517,7 +564,8 @@
"nodeEnabled_plural": "Nodes aktiviert:",
"nodeDisabled": "Node deaktiviert:",
"nodeDisabled_plural": "Nodes deaktiviert:",
"nodeUpgraded": "Upgrade von Node-Modul __module__ auf Version __version__ durchgeführt"
"nodeUpgraded": "Upgrade von Node-Modul __module__ auf Version __version__ durchgeführt",
"unknownNodeRegistered": "Fehler beim Laden des Nodes: <ul><li>__type__<br>__error__</li></ul>"
},
"editor": {
"title": "Palette verwalten",
@@ -633,15 +681,8 @@
"outline": "Entwurf",
"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"
}
"triggerAction": "Aktion auslösen",
"find": "Suche im Arbeitsbereich"
},
"help": {
"name": "Hilfe",
@@ -651,7 +692,8 @@
"showHelp": "Hilfe zeigen",
"showInOutline": "Zeige im Editor",
"showTopics": "Zeige Hilfethemen",
"noHelp": "Kein Hilfethema ausgewählt"
"noHelp": "Kein Hilfethema ausgewählt",
"changeLog": "Änderungsprotokoll"
},
"config": {
"name": "Konfigurations-Node",
@@ -705,7 +747,7 @@
"addToProject": "Zu Projekt hinzufügen",
"files": "Dateien",
"flow": "Flow",
"credentials": "Berechtigungen",
"credentials": "Credentials",
"package": "Paket",
"packageCreate": "Datei wird erstellt beim Speichern der Änderungen",
"fileNotExist": "Datei existiert nicht",
@@ -718,7 +760,7 @@
"changeTheEncryptionKey": "Schlüssel ändern",
"currentKey": "Aktueller Schlüssel",
"newKey": "Neuer Schlüssel",
"credentialsAlert": "Dadurch werden alle vorhandenen Berechtigungen gelöscht",
"credentialsAlert": "Dadurch werden alle vorhandenen Credentials gelöscht",
"versionControl": "Versionsverwaltung (Git)",
"branches": "Branches",
"noBranches": "Keine Branches",
@@ -743,7 +785,7 @@
"userName": "Benutzername",
"email": "E-Mail",
"workflow": "Arbeitsablauf",
"workfowTip": "Wähle deinen bevorzugten Git-Arbeitsablauf",
"workfowTip": "Wählen Sie Ihren bevorzugten Git-Arbeitsablauf (Workflow)",
"workflowManual": "Manuell",
"workflowManualTip": "Alle Änderungen müssen manuell übertragen werden (commit) über die Seitenleiste 'Projekthistorie'",
"workflowAuto": "Automatisch",
@@ -854,7 +896,7 @@
"date": "timestamp",
"jsonata": "JSONata",
"env": "Umgebungsvariable",
"cred": "Berechtigung"
"cred": "Credentials"
}
},
"editableList": {
@@ -862,8 +904,20 @@
"addTitle": "Element hinzufügen"
},
"search": {
"history": "Suchhistorie",
"clear": "Leeren",
"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",
"hiddenFlows": "Versteckte Flows",
"modifiedNodes": "Geänderte Nodes",
"thisFlow": "Aktueller Flow"
}
},
"expressionEditor": {
"functions": "Funktionen",
@@ -884,6 +938,9 @@
"eval": "Fehler beim Auswerten des Ausdrucks\n__message__"
}
},
"monaco": {
"setTheme": "Thema auswählen"
},
"jsEditor": {
"title": "JavaScript-Editor"
},
@@ -893,8 +950,10 @@
"jsonEditor": {
"title": "JSON-Editor",
"format": "JSON formatieren",
"rawMode": "JSON-Editor",
"rawMode": "Bearbeite JSON",
"uiMode": "Visueller Editor",
"rawMode-readonly": "JSON",
"uiMode-readonly": "Visuell",
"insertAbove": "Oberhalb einfügen",
"insertBelow": "Unterhalb einfügen",
"addItem": "Element hinzufügen",
@@ -965,7 +1024,7 @@
"clone": "Projekt klonen",
"desc0": "Wenn Sie bereits über ein Git-Repository verfügen, das ein Projekt enthält, können Sie es klonen, um damit zu arbeiten.",
"already-exists": "Das Projekt ist bereits vorhanden",
"must-contain": "Darf nur A-Z 0-9 _ enthalten",
"must-contain": "Darf nur A-Z 0-9 _ - enthalten",
"project-name": "Projektname",
"no-info-in-url": "Geben Sie Benutzername & Passwort nicht innerhalb der URL vor",
"git-url": "Git-Repository-URL",
@@ -977,7 +1036,7 @@
"passphrase": "Passphrase",
"ssh-key-desc": "Bevor Sie ein Repository über SSH lokal klonen können, müssen Sie einen SSH-Schlüssel hinzufügen, um auf diesen zugreifen zu können",
"ssh-key-add": "SSH-Schlüssel hinzufügen",
"credential-key": "Schlüssel für Berechtigungen",
"credential-key": "Schlüssel für Credentials",
"cant-get-ssh-key": "Fehler! Der ausgewählte SSH-Schlüsselpfad kann nicht abgerufen werden",
"already-exists2": "bereits vorhanden",
"git-error": "Git-Fehler",
@@ -989,27 +1048,27 @@
"create": "Erstellen Sie Ihre Projektdateien",
"desc0": "Ein Projekt enthält Ihre Flow-Dateien, eine README-Datei und die 'package.json'-Datei.",
"desc1": "Es kann alle anderen Dateien enthalten, die im Git-Repository verwaltet werden sollen.",
"desc2": "Ihre vorhandenen Flow- und Berechtigungs-Dateien werden in das Projekt kopiert.",
"desc2": "Ihre vorhandenen Flow- und Credential-Dateien werden in das Projekt kopiert.",
"flow-file": "Flow-Datei",
"credentials-file": "Datei mit Berechtigungen"
"credentials-file": "Datei mit Credentials"
},
"encryption-config": {
"setup": "Einrichtung der Verschlüsselung Ihrer Datei mit den Berechtigungen",
"desc0": "Die Datei mit den Flow-Berechtigungen kann verschlüsselt werden, um ihren Inhalt zu schützen.",
"desc1": "Wenn Sie diese Berechtigungen in einem öffentlichen Repository speichern möchten, müssen Sie sie mit einen geheimen Schlüsselausdruck verschlüsseln.",
"desc2": "Die Datei mit den Flow-Berechtigungen ist derzeit nicht verschlüsselt.",
"setup": "Einrichtung der Verschlüsselung Ihrer Datei mit den Credentials",
"desc0": "Die Datei mit den Flow-Credentials kann verschlüsselt werden, um ihren Inhalt zu schützen.",
"desc1": "Wenn Sie diese Credentials in einem öffentlichen Repository speichern möchten, müssen Sie sie mit einen geheimen Schlüsselausdruck verschlüsseln.",
"desc2": "Die Datei mit den Flow-Credentials ist derzeit nicht verschlüsselt.",
"desc3": "D.h. ihr Inhalt (z.B. Passwörter und Zugriffs-Tokens) kann von jedem mit Zugriff auf die Datei gelesen werden.",
"desc4": "Wenn Sie diese Berechtigungen in einen öffentlichen Repository speichern möchten, müssen Sie diese verschlüsseln, indem Sie einen geheimen Schlüsselausdruck eingeben.",
"desc5": "Ihre Datei mit den Flow-Berechtigungen wird derzeit mit dem Eintrag 'credentialSecret' Ihrer Einstellungsdatei als Schlüssel verschlüsselt.",
"desc6": "Die Datei mit den Flow-Berechtigungen wird derzeit mit einem vom System generierten Schlüssel verschlüsselt. Sie sollten einen neuen geheimen Schlüssel für dieses Projekt vorgeben.",
"desc4": "Wenn Sie diese Credentials in einen öffentlichen Repository speichern möchten, müssen Sie diese verschlüsseln, indem Sie einen geheimen Schlüsselausdruck eingeben.",
"desc5": "Ihre Datei mit den Flow-Credentials wird derzeit mit dem Eintrag 'credentialSecret' Ihrer Einstellungsdatei als Schlüssel verschlüsselt.",
"desc6": "Die Datei mit den Flow-Credentials wird derzeit mit einem vom System generierten Schlüssel verschlüsselt. Sie sollten einen neuen geheimen Schlüssel für dieses Projekt vorgeben.",
"desc7": "Der Schlüssel wird separat von den Projektdateien gespeichert. Sie müssen den Schlüssel angeben, damit dieses Projekt auch in einem anderen Node-RED-System verwendet werden kann.",
"credentials": "Berechtigung",
"credentials": "Credentials",
"enable": "Verschlüsselung aktivieren",
"disable": "Verschlüsselung deaktivieren",
"disabled": "deaktiviert",
"copy": "Vorhandenen Schlüssel ersetzen",
"use-custom": "Eigenen Schlüssel verwenden",
"desc8": "Die Datei mit den Berechtigungen wird nicht verschlüsselt, und ihr Inhalt kann leicht gelesen werden",
"desc8": "Die Datei mit den Credentials wird nicht verschlüsselt und ihr Inhalt kann leicht gelesen werden",
"create-project-files": "Projektdateien erstellen",
"create-project": "Projekt erstellen",
"already-exists": "bereits vorhanden",
@@ -1023,7 +1082,7 @@
"desc2": "Im Tab 'Commit-Historie' in der Seitenleiste werden alle Dateien angezeigt, die sich in Ihrem Projekt geändert haben, und um sie ins lokale Repository zu übertragen (commit). Es zeigt Ihnen eine vollständige Historie Ihrer Commits an und ermöglicht es Ihnen, Ihre Commits in ein (remote) Server-Repository zu schieben (push)."
},
"create": {
"projects": "Projekt",
"projects": "Projekte",
"already-exists": "Das Projekt ist bereits vorhanden",
"must-contain": "Darf nur A-Z 0-9 _ enthalten",
"no-info-in-url": "Geben Sie Benutzername & Passwort nicht innerhalb der URL vor",
@@ -1034,12 +1093,12 @@
"desc": "Beschreibung",
"opt": "Optional",
"flow-file": "Flow-Datei",
"credentials": "Berechtigungen",
"credentials": "Credentials",
"enable-encryption": "Verschlüsselung aktivieren",
"disable-encryption": "Verschlüsselung deaktivieren",
"encryption-key": "Schlüssel",
"desc0": "Eine Floskel, mit der Sie Ihre Berechtigungen schützen",
"desc1": "Die Datei mit den Berechtigungen wird nicht verschlüsselt, und ihr Inhalt kann leicht gelesen werden",
"desc0": "Eine Ausdruck, mit der Sie Ihre Credentials schützen",
"desc1": "Die Datei mit den Credentials wird nicht verschlüsselt und ihr Inhalt kann leicht gelesen werden",
"git-url": "Git-Repository-URL",
"protocols": "https://, ssh:// oder file://",
"auth-failed": "Authentifizierung fehlgeschlagen",
@@ -1049,14 +1108,15 @@
"passphrase": "Passphrase",
"desc2": "Bevor Sie ein Repository über SSH klonen können, müssen Sie einen SSH-Schlüssel hinzufügen, um auf diesen zu zugreifen",
"add-ssh-key": "Einen SSH-Schlüssel hinzufügen",
"credentials-encryption-key": "Schlüssel für Berechtigungen",
"credentials-encryption-key": "Schlüssel für Credentials",
"already-exists-2": "bereits vorhanden",
"git-error": "Git-Fehler",
"con-failed": "Verbindung fehlgeschlagen",
"not-git": "Kein Git-Repository",
"no-resource": "Repository nicht gefunden",
"cant-get-ssh-key-path": "Fehler! Der ausgewählte SSH-Schlüsselpfad kann nicht abgerufen werden.",
"unexpected_error": "unerwarteter_Fehler"
"unexpected_error": "unerwarteter_Fehler",
"clearContext": "Kontextdaten löschen beim Projektwechsel"
},
"delete": {
"confirm": "Sind Sie sicher, dass dieses Projekt gelöscht werden soll?"
@@ -1103,13 +1163,46 @@
"preview": "Vorschau",
"defaultValue": "Standardwert"
},
"tourGuide": {
"takeATour": "Tour starten",
"start": "Start",
"next": "Nächste",
"welcomeTours": "Welcome Tours"
},
"diagnostics": {
"title": "System-Informationen"
},
"languages": {
"de": "German",
"en-US": "English",
"ja": "Japanese",
"ko": "Korean",
"ru": "Russian",
"zh-CN": "Chinese(Simplified)",
"zh-TW": "Chinese(Traditional)"
"de": "Deutsch",
"en-US": "Englisch",
"fr": "Französisch",
"ja": "Japanisch",
"ko": "Koreanisch",
"pt-BR":"Portugiesisch",
"ru": "Russisch",
"zh-CN": "Chinesisch (Vereinfacht)",
"zh-TW": "Chinesisch (Traditionell)"
},
"validator": {
"errors": {
"invalid-json": "Ungültige JSON-Daten: __error__",
"invalid-json-prop": "__prop__: ungültige JSON-Daten: __error__",
"invalid-prop": "Ungültiger Eigenschaftsausdruck",
"invalid-prop-prop": "__prop__: ungültiger Eigenschaftsausdruck",
"invalid-num": "Ungültige Nummer",
"invalid-num-prop": "__prop__: ungültige Nummer",
"invalid-regexp": "Ungültiges Eingabemuster",
"invalid-regex-prop": "__prop__: ungültiges Eingabemuster",
"missing-required-prop": "__prop__: Eigenschaftswert fehlt",
"invalid-config": "__prop__: ungültige Konfigurations-Node",
"missing-config": "__prop__: Konfigurations-Node fehlt",
"validation-error": "__prop__: Validierungsfehler: __node__, __id__: __error__"
}
},
"contextMenu": {
"insert": "Einfügen",
"node": "Node",
"junction": "Kreuzung",
"linkNodes": "Verknüpfe Nodes"
}
}

View File

View File

View File

@@ -3,7 +3,7 @@
"label": {
"name": "Name",
"ok": "Ok",
"done":"Done",
"done": "Done",
"cancel": "Cancel",
"delete": "Delete",
"close": "Close",
@@ -23,7 +23,11 @@
"position": "Position",
"enable": "Enable",
"disable": "Disable",
"upload": "Upload"
"upload": "Upload",
"lock": "Lock",
"unlock": "Unlock",
"locked": "Locked",
"unlocked": "Unlocked"
},
"type": {
"string": "string",
@@ -53,19 +57,38 @@
"confirmDelete": "Confirm delete",
"delete": "Are you sure you want to delete '__label__'?",
"dropFlowHere": "Drop the flow here",
"addFlow": "Add Flow",
"listFlows": "List Flows",
"dropImageHere": "Drop the image here",
"addFlow": "Add flow",
"addFlowToRight": "Add flow to the right",
"closeFlow": "Close flow",
"hideFlow": "Hide flow",
"hideOtherFlows": "Hide other flows",
"showAllFlows": "Show all flows (__count__ hidden)",
"hideAllFlows": "Hide all flows",
"hiddenFlows": "List __count__ hidden flow",
"hiddenFlows_plural": "List __count__ hidden flows",
"showLastHiddenFlow": "Reopen hidden flow",
"listFlows": "List flows",
"listSubflows": "List subflows",
"status": "Status",
"enabled": "Enabled",
"disabled":"Disabled",
"disabled": "Disabled",
"info": "Description",
"selectNodes": "Click nodes to select"
"selectNodes": "Click nodes to select",
"enableFlow": "Enable flow",
"disableFlow": "Disable flow",
"lockFlow": "Lock flow",
"unlockFlow": "Unlock flow",
"moveToStart": "Move flow to start",
"moveToEnd": "Move flow to end"
},
"menu": {
"label": {
"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",
@@ -83,12 +106,14 @@
"palette": {
"show": "Show palette"
},
"edit": "Edit",
"settings": "Settings",
"userSettings": "User Settings",
"nodes": "Nodes",
"displayStatus": "Show node status",
"displayConfig": "Configuration nodes",
"import": "Import",
"importExample": "Import Example Flow",
"export": "Export",
"search": "Search flows",
"searchInput": "search your flows",
@@ -102,27 +127,46 @@
"keyboardShortcuts": "Keyboard shortcuts",
"login": "Login",
"logout": "Logout",
"editPalette":"Manage palette",
"editPalette": "Manage palette",
"other": "Other",
"showTips": "Show tips",
"showWelcomeTours": "Show guided tours for new versions",
"help": "Node-RED website",
"projects": "Projects",
"projects-new": "New",
"projects-open": "Open",
"projects-settings": "Project Settings",
"showNodeLabelDefault": "Show label of newly added nodes",
"codeEditor": "Code Editor",
"groups": "Groups",
"groupSelection": "Group selection",
"ungroupSelection": "Ungroup selection",
"groupMergeSelection": "Merge selection",
"groupRemoveSelection": "Remove from group"
"groupRemoveSelection": "Remove from group",
"arrange": "Arrange",
"alignLeft": "Align to left",
"alignCenter": "Align to center",
"alignRight": "Align to right",
"alignTop": "Align to top",
"alignMiddle": "Align to middle",
"alignBottom": "Align to bottom",
"distributeHorizontally": "Distribute horizontally",
"distributeVertically": "Distribute vertically",
"moveToBack": "Move to back",
"moveToFront": "Move to front",
"moveBackwards": "Move backwards",
"moveForwards": "Move forwards"
}
},
"actions": {
"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__",
@@ -138,6 +182,10 @@
}
},
"notification": {
"state": {
"flowsStopped": "Flows stopped",
"flowsStarted": "Flows started"
},
"warning": "<strong>Warning</strong>: __message__",
"warnings": {
"undeployedChanges": "node has undeployed changes",
@@ -145,10 +193,10 @@
"nodeActionDisabledSubflow": "node actions disabled within subflow",
"missing-types": "<p>Flows stopped due to missing node types.</p>",
"missing-modules": "<p>Flows stopped due to missing modules.</p>",
"safe-mode":"<p>Flows stopped in safe mode.</p><p>You can modify your flows and deploy the changes to restart.</p>",
"safe-mode": "<p>Flows stopped in safe mode.</p><p>You can modify your flows and deploy the changes to restart.</p>",
"restartRequired": "Node-RED must be restarted to enable upgraded modules",
"credentials_load_failed": "<p>Flows stopped as the credentials could not be decrypted.</p><p>The flow credential file is encrypted, but the project's encryption key is missing or invalid.</p>",
"credentials_load_failed_reset":"<p>Credentials could not be decrypted</p><p>The flow credential file is encrypted, but the project's encryption key is missing or invalid.</p><p>The flow credential file will be reset on the next deployment. Any existing flow credentials will be cleared.</p>",
"credentials_load_failed_reset": "<p>Credentials could not be decrypted</p><p>The flow credential file is encrypted, but the project's encryption key is missing or invalid.</p><p>The flow credential file will be reset on the next deployment. Any existing flow credentials will be cleared.</p>",
"missing_flow_file": "<p>Project flow file not found.</p><p>The project is not configured with a flow file.</p>",
"missing_package_file": "<p>Project package file not found.</p><p>The project is missing a package.json file.</p>",
"project_empty": "<p>The project is empty.</p><p>Do you want to create a default set of project files?<br/>Otherwise, you will have to manually add files to the project outside of the editor.</p>",
@@ -186,7 +234,8 @@
"create-default-package": "Create default package file",
"no-thanks": "No thanks",
"create-default-project": "Create default project files",
"show-merge-conflicts": "Show merge conflicts"
"show-merge-conflicts": "Show merge conflicts",
"unknownNodesButton": "Search for unknown nodes"
}
},
"clipboard": {
@@ -225,11 +274,11 @@
"recoveredNodesInfo": "The nodes on this flow were missing a valid flow id when they were imported. They have been added to this flow so you can either restore or delete them.",
"recoveredNodesNotification": "<p>Imported nodes without a valid flow id</p><p>They have been added to a new flow called '__flowName__'.</p>",
"export": {
"selected":"selected nodes",
"current":"current flow",
"all":"all flows",
"compact":"compact",
"formatted":"formatted",
"selected": "selected nodes",
"current": "current flow",
"all": "all flows",
"compact": "compact",
"formatted": "formatted",
"copy": "Copy to clipboard",
"export": "Export to library",
"exportAs": "Export as",
@@ -264,13 +313,19 @@
"modifiedFlowsDesc": "Only deploys flows that contain changed nodes",
"modifiedNodes": "Modified Nodes",
"modifiedNodesDesc": "Only deploys nodes that have changed",
"startFlows": "Start",
"startFlowsDesc": "Start Flows",
"stopFlows": "Stop",
"stopFlowsDesc": "Stop Flows",
"restartFlows": "Restart Flows",
"restartFlowsDesc": "Restarts the current deployed flows",
"successfulDeploy": "Successfully deployed",
"successfulRestart": "Successfully restarted flows",
"deployFailed": "Deploy failed: __message__",
"unusedConfigNodes":"You have some unused configuration nodes.",
"unusedConfigNodesLink":"Click here to see them",
"unusedConfigNodes": "You have some unused configuration nodes.",
"unusedConfigNodesButton": "Search unused config nodes",
"unknownNodesButton": "Search for unknown nodes",
"invalidNodesButton": "Search for invalid nodes",
"errors": {
"noResponse": "no response from server"
},
@@ -317,8 +372,8 @@
},
"nodeCount": "__count__ node",
"nodeCount_plural": "__count__ nodes",
"local":"Local changes",
"remote":"Remote changes",
"local": "Local changes",
"remote": "Remote changes",
"reviewChanges": "Review Changes",
"noBinaryFileShowed": "Cannot show binary file contents",
"viewCommitDiff": "View Commit Changes",
@@ -402,7 +457,7 @@
"inputType": "Input type",
"selectType": "select types...",
"loadCredentials": "Loading node credentials",
"inputs" : {
"inputs": {
"input": "input",
"select": "select",
"checkbox": "checkbox",
@@ -449,11 +504,13 @@
"unassigned": "Unassigned",
"global": "global",
"workspace": "workspace",
"selectAll": "Select all nodes",
"selectAllConnected": "Select all connected nodes",
"selectAll": "Select all",
"selectNone": "Select none",
"selectAllConnected": "Select connected",
"addRemoveNode": "Add/remove node from selection",
"editSelected": "Edit selected node",
"deleteSelected": "Delete selected nodes or link",
"deleteReconnect": "Delete and Reconnect",
"importNode": "Import nodes",
"exportNode": "Export nodes",
"nudgeNode": "Move selected nodes (1px)",
@@ -463,10 +520,14 @@
"copyNode": "Copy selected nodes",
"cutNode": "Cut selected nodes",
"pasteNode": "Paste nodes",
"undoChange": "Undo the last change performed",
"copyGroupStyle": "Copy group style",
"pasteGroupStyle": "Paste group style",
"undoChange": "Undo",
"redoChange": "Redo",
"searchBox": "Open search box",
"managePalette": "Manage palette",
"actionList":"Action list"
"actionList": "Action list",
"splitWireWithLinks": "Split selection with Link nodes"
},
"library": {
"library": "Library",
@@ -518,7 +579,8 @@
"nodeEnabled_plural": "Nodes enabled:",
"nodeDisabled": "Node disabled:",
"nodeDisabled_plural": "Nodes disabled:",
"nodeUpgraded": "Node module __module__ upgraded to version __version__"
"nodeUpgraded": "Node module __module__ upgraded to version __version__",
"unknownNodeRegistered": "Error loading node: <ul><li>__type__<br>__error__</li></ul>"
},
"editor": {
"title": "Manage palette",
@@ -577,19 +639,19 @@
},
"confirm": {
"install": {
"body":"<p>Installing '__module__'</p><p>Before installing, please read the node's documentation. Some nodes have dependencies that cannot be automatically resolved and can require a restart of Node-RED.</p>",
"body": "<p>Installing '__module__'</p><p>Before installing, please read the node's documentation. Some nodes have dependencies that cannot be automatically resolved and can require a restart of Node-RED.</p>",
"title": "Install nodes"
},
"remove": {
"body":"<p>Removing '__module__'</p><p>Removing the node will uninstall it from Node-RED. The node may continue to use resources until Node-RED is restarted.</p>",
"body": "<p>Removing '__module__'</p><p>Removing the node will uninstall it from Node-RED. The node may continue to use resources until Node-RED is restarted.</p>",
"title": "Remove nodes"
},
"update": {
"body":"<p>Updating '__module__'</p><p>Updating the node will require a restart of Node-RED to complete the update. This must be done manually.</p>",
"body": "<p>Updating '__module__'</p><p>Updating the node will require a restart of Node-RED to complete the update. This must be done manually.</p>",
"title": "Update nodes"
},
"cannotUpdate": {
"body":"An update for this node is available, but it is not installed in a location that the palette manager can update.<br/><br/>Please refer to the documentation for how to update this node."
"body": "An update for this node is available, but it is not installed in a location that the palette manager can update.<br/><br/>Please refer to the documentation for how to update this node."
},
"button": {
"review": "Open node information",
@@ -623,26 +685,23 @@
"showMore": "show more",
"showLess": "show less",
"flow": "Flow",
"selection":"Selection",
"nodes":"__count__ nodes",
"selection": "Selection",
"nodes": "__count__ nodes",
"flowDesc": "Flow Description",
"subflowDesc": "Subflow Description",
"nodeHelp": "Node Help",
"none":"None",
"none": "None",
"arrayItems": "__count__ items",
"showTips":"You can open the tips from the settings panel",
"showTips": "You can open the tips from the settings panel",
"outline": "Outline",
"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"
}
"copyItemUrl": "Copy item url",
"copyURL2Clipboard": "Copied url to clipboard",
"showFlow": "Show",
"hideFlow": "Hide"
},
"help": {
"name": "Help",
@@ -652,7 +711,8 @@
"showHelp": "Show help",
"showInOutline": "Show in outline",
"showTopics": "Show topics",
"noHelp": "No help topic selected"
"noHelp": "No help topic selected",
"changeLog": "Change Log"
},
"config": {
"name": "Configuration nodes",
@@ -668,8 +728,8 @@
"filtered": "__count__ hidden"
},
"context": {
"name":"Context Data",
"label":"context",
"name": "Context Data",
"label": "context",
"none": "none selected",
"refresh": "refresh to load",
"empty": "empty",
@@ -707,9 +767,9 @@
"files": "Files",
"flow": "Flow",
"credentials": "Credentials",
"package":"Package",
"packageCreate":"File will be created when changes are saved",
"fileNotExist":"File does not exist",
"package": "Package",
"packageCreate": "File will be created when changes are saved",
"fileNotExist": "File does not exist",
"selectFile": "Select File",
"invalidEncryptionKey": "Invalid encryption key",
"encryptionEnabled": "Encryption enabled",
@@ -863,8 +923,20 @@
"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",
"thisFlow": "Current flow"
}
},
"expressionEditor": {
"functions": "Functions",
@@ -882,9 +954,15 @@
"invalid-expr": "Invalid JSONata expression:\n __message__",
"invalid-msg": "Invalid example JSON message:\n __message__",
"context-unsupported": "Cannot test context functions\n $flowContext or $globalContext",
"env-unsupported": "Cannot test $env function",
"moment-unsupported": "Cannot test $moment function",
"clone-unsupported": "Cannot test $clone function",
"eval": "Error evaluating expression:\n __message__"
}
},
"monaco": {
"setTheme": "Set theme"
},
"jsEditor": {
"title": "JavaScript editor"
},
@@ -896,6 +974,8 @@
"format": "format JSON",
"rawMode": "Edit JSON",
"uiMode": "Visual editor",
"rawMode-readonly": "JSON",
"uiMode-readonly": "Visual",
"insertAbove": "Insert above",
"insertBelow": "Insert below",
"addItem": "Add item",
@@ -922,13 +1002,16 @@
"quote": "Quote",
"link": "Link",
"horizontal-rule": "Horizontal rule",
"toggle-preview": "Toggle preview"
"toggle-preview": "Toggle preview",
"mermaid": {
"summary": "Mermaid Diagram"
}
},
"bufferEditor": {
"title": "Buffer editor",
"modeString": "Handle as UTF-8 String",
"modeArray": "Handle as JSON array",
"modeDesc":"<h3>Buffer editor</h3><p>The Buffer type is stored as a JSON array of byte values. The editor will attempt to parse the entered value as a JSON array. If it is not valid JSON, it will be treated as a UTF-8 String and converted to an array of the individual character code points.</p><p>For example, a value of <code>Hello World</code> will be converted to the JSON array:<pre>[72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100]</pre></p>"
"modeDesc": "<h3>Buffer editor</h3><p>The Buffer type is stored as a JSON array of byte values. The editor will attempt to parse the entered value as a JSON array. If it is not valid JSON, it will be treated as a UTF-8 String and converted to an array of the individual character code points.</p><p>For example, a value of <code>Hello World</code> will be converted to the JSON array:<pre>[72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100]</pre></p>"
},
"projects": {
"config-git": "Configure Git client",
@@ -1057,7 +1140,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?"
@@ -1089,7 +1173,7 @@
"no-empty": "Cannot create default file set on a non-empty project",
"git-error": "git error"
},
"errors" : {
"errors": {
"no-username-email": "Your Git client is not configured with a username/email.",
"unexpected": "An unexpected error occurred",
"code": "code"
@@ -1104,13 +1188,51 @@
"preview": "UI Preview",
"defaultValue": "Default value"
},
"languages" : {
"tourGuide": {
"takeATour": "Take a tour",
"start": "Start",
"next": "Next",
"welcomeTours": "Welcome Tours"
},
"diagnostics": {
"title": "System Info"
},
"languages": {
"de": "German",
"en-US": "English",
"fr": "French",
"ja": "Japanese",
"ko": "Korean",
"pt-BR":"Portuguese",
"ru": "Russian",
"zh-CN": "Chinese(Simplified)",
"zh-TW": "Chinese(Traditional)"
},
"validator": {
"errors": {
"invalid-json": "Invalid JSON data: __error__",
"invalid-json-prop": "__prop__: invalid JSON data: __error__",
"invalid-prop": "Invalid property expression",
"invalid-prop-prop": "__prop__: invalid property expression",
"invalid-num": "Invalid number",
"invalid-num-prop": "__prop__: invalid number",
"invalid-regexp": "Invalid input pattern",
"invalid-regex-prop": "__prop__: invalid input pattern",
"missing-required-prop": "__prop__: property value missing",
"invalid-config": "__prop__: invalid configuration node",
"missing-config": "__prop__: missing configuration node",
"validation-error": "__prop__: validation error: __node__, __id__: __error__"
}
},
"contextMenu": {
"insert": "Insert",
"node": "Node",
"junction": "Junction",
"linkNodes": "Link Nodes"
},
"env-var": {
"environment": "Environment",
"header": "Global Environment Variables",
"revert": "Revert"
}
}

View File

@@ -1,23 +1,23 @@
{
"info": {
"tip0" : "You can remove the selected nodes or links with {{core:delete-selection}}",
"tip1" : "Search for nodes using {{core:search}}",
"tip2" : "{{core:toggle-sidebar}} will toggle the view of this sidebar",
"tip3" : "You can manage your palette of nodes with {{core:manage-palette}}",
"tip4" : "Your flow configuration nodes are listed in the sidebar panel. It can be accessed from the menu or with {{core:show-config-tab}}",
"tip5" : "Enable or disable these tips from the option in the settings",
"tip6" : "Move the selected nodes using the [left] [up] [down] and [right] keys. Hold [shift] to nudge them further",
"tip7" : "Dragging a node onto a wire will splice it into the link",
"tip8" : "Export the selected nodes, or the current tab with {{core:show-export-dialog}}",
"tip9" : "Import a flow by dragging its JSON into the editor, or with {{core:show-import-dialog}}",
"tip10" : "[shift] [click] and drag on a node port to move all of the attached wires or just the selected one",
"tip11" : "Show the Info tab with {{core:show-info-tab}} or the Debug tab with {{core:show-debug-tab}}",
"tip12" : "[ctrl] [click] in the workspace to open the quick-add dialog",
"tip13" : "Hold down [ctrl] when you [click] on a node port to enable quick-wiring",
"tip14" : "Hold down [shift] when you [click] on a node to also select all of its connected nodes",
"tip15" : "Hold down [ctrl] when you [click] on a node to add or remove it from the current selection",
"tip16" : "Switch flow tabs with {{core:show-previous-tab}} and {{core:show-next-tab}}",
"tip17" : "You can confirm your changes in the node edit tray with {{core:confirm-edit-tray}} or cancel them with {{core:cancel-edit-tray}}",
"tip18" : "Pressing {{core:edit-selected-node}} will edit the first node in the current selection"
"tip0": "You can remove the selected nodes or links with {{core:delete-selection}}",
"tip1": "Search for nodes using {{core:search}}",
"tip2": "{{core:toggle-sidebar}} will toggle the view of this sidebar",
"tip3": "You can manage your palette of nodes with {{core:manage-palette}}",
"tip4": "Your flow configuration nodes are listed in the sidebar panel. It can be accessed from the menu or with {{core:show-config-tab}}",
"tip5": "Enable or disable these tips from the option in the settings",
"tip6": "Move the selected nodes using the [left] [up] [down] and [right] keys. Hold [shift] to nudge them further",
"tip7": "Dragging a node onto a wire will splice it into the link",
"tip8": "Export the selected nodes, or the current tab with {{core:show-export-dialog}}",
"tip9": "Import a flow by dragging its JSON into the editor, or with {{core:show-import-dialog}}",
"tip10": "[shift] [click] and drag on a node port to move all of the attached wires or just the selected one",
"tip11": "Show the Info tab with {{core:show-info-tab}} or the Debug tab with {{core:show-debug-tab}}",
"tip12": "[ctrl] [click] in the workspace to open the quick-add dialog",
"tip13": "Hold down [ctrl] when you [click] on a node port to enable quick-wiring",
"tip14": "Hold down [shift] when you [click] on a node to also select all of its connected nodes",
"tip15": "Hold down [ctrl] when you [click] on a node to add or remove it from the current selection",
"tip16": "Switch flow tabs with {{core:show-previous-tab}} and {{core:show-next-tab}}",
"tip17": "You can confirm your changes in the node edit tray with {{core:confirm-edit-tray}} or cancel them with {{core:cancel-edit-tray}}",
"tip18": "Pressing {{core:edit-selected-node}} will edit the first node in the current selection"
}
}

View File

@@ -52,52 +52,52 @@
"desc": "Finds occurrences of `pattern` within `str` and replaces them with `replacement`.\n\nThe optional `limit` parameter is the maximum number of replacements."
},
"$now": {
"args":"",
"desc":"Generates a timestamp in ISO 8601 compatible format and returns it as a string."
"args": "$[picture [, timezone]]",
"desc": "Generates a timestamp in ISO 8601 compatible format and returns it as a string. If the optional picture and timezone parameters are supplied, then the current timestamp is formatted as described by the `$fromMillis()` function"
},
"$base64encode": {
"args":"string",
"desc":"Converts an ASCII string to a base 64 representation. Each character in the string is treated as a byte of binary data. This requires that all characters in the string are in the 0x00 to 0xFF range, which includes all characters in URI encoded strings. Unicode characters outside of that range are not supported."
"args": "string",
"desc": "Converts an ASCII string to a base 64 representation. Each character in the string is treated as a byte of binary data. This requires that all characters in the string are in the 0x00 to 0xFF range, which includes all characters in URI encoded strings. Unicode characters outside of that range are not supported."
},
"$base64decode": {
"args":"string",
"desc":"Converts base 64 encoded bytes to a string, using a UTF-8 Unicode codepage."
"args": "string",
"desc": "Converts base 64 encoded bytes to a string, using a UTF-8 Unicode codepage."
},
"$number": {
"args": "arg",
"desc": "Casts the `arg` parameter to a number using the following casting rules:\n\n - Numbers are unchanged\n - Strings that contain a sequence of characters that represent a legal JSON number are converted to that number\n - All other values cause an error to be thrown."
},
"$abs": {
"args":"number",
"desc":"Returns the absolute value of the `number` parameter."
"args": "number",
"desc": "Returns the absolute value of the `number` parameter."
},
"$floor": {
"args":"number",
"desc":"Returns the value of `number` rounded down to the nearest integer that is smaller or equal to `number`."
"args": "number",
"desc": "Returns the value of `number` rounded down to the nearest integer that is smaller or equal to `number`."
},
"$ceil": {
"args":"number",
"desc":"Returns the value of `number` rounded up to the nearest integer that is greater than or equal to `number`."
"args": "number",
"desc": "Returns the value of `number` rounded up to the nearest integer that is greater than or equal to `number`."
},
"$round": {
"args":"number [, precision]",
"desc":"Returns the value of the `number` parameter rounded to the number of decimal places specified by the optional `precision` parameter."
"args": "number [, precision]",
"desc": "Returns the value of the `number` parameter rounded to the number of decimal places specified by the optional `precision` parameter."
},
"$power": {
"args":"base, exponent",
"desc":"Returns the value of `base` raised to the power of `exponent`."
"args": "base, exponent",
"desc": "Returns the value of `base` raised to the power of `exponent`."
},
"$sqrt": {
"args":"number",
"desc":"Returns the square root of the value of the `number` parameter."
"args": "number",
"desc": "Returns the square root of the value of the `number` parameter."
},
"$random": {
"args":"",
"desc":"Returns a pseudo random number greater than or equal to zero and less than one."
"args": "",
"desc": "Returns a pseudo random number greater than or equal to zero and less than one."
},
"$millis": {
"args":"",
"desc":"Returns the number of milliseconds since the Unix Epoch (1 January, 1970 UTC) as a number. All invocations of `$millis()` within an evaluation of an expression will all return the same value."
"args": "",
"desc": "Returns the number of milliseconds since the Unix Epoch (1 January, 1970 UTC) as a number. All invocations of `$millis()` within an evaluation of an expression will all return the same value."
},
"$sum": {
"args": "array",
@@ -136,20 +136,20 @@
"desc": "Appends two arrays"
},
"$sort": {
"args":"array [, function]",
"desc":"Returns an array containing all the values in the `array` parameter, but sorted into order.\n\nIf a comparator `function` is supplied, then it must be a function that takes two parameters:\n\n`function(left, right)`\n\nThis function gets invoked by the sorting algorithm to compare two values left and right. If the value of left should be placed after the value of right in the desired sort order, then the function must return Boolean `true` to indicate a swap. Otherwise it must return `false`."
"args": "array [, function]",
"desc": "Returns an array containing all the values in the `array` parameter, but sorted into order.\n\nIf a comparator `function` is supplied, then it must be a function that takes two parameters:\n\n`function(left, right)`\n\nThis function gets invoked by the sorting algorithm to compare two values left and right. If the value of left should be placed after the value of right in the desired sort order, then the function must return Boolean `true` to indicate a swap. Otherwise it must return `false`."
},
"$reverse": {
"args":"array",
"desc":"Returns an array containing all the values from the `array` parameter, but in reverse order."
"args": "array",
"desc": "Returns an array containing all the values from the `array` parameter, but in reverse order."
},
"$shuffle": {
"args":"array",
"desc":"Returns an array containing all the values from the `array` parameter, but shuffled into random order."
"args": "array",
"desc": "Returns an array containing all the values from the `array` parameter, but shuffled into random order."
},
"$zip": {
"args":"array, ...",
"desc":"Returns a convolved (zipped) array containing grouped arrays of values from the `array1` … `arrayN` arguments from index 0, 1, 2...."
"args": "array, ...",
"desc": "Returns a convolved (zipped) array containing grouped arrays of values from the `array1` … `arrayN` arguments from index 0, 1, 2...."
},
"$keys": {
"args": "object",
@@ -168,24 +168,24 @@
"desc": "Merges an array of `objects` into a single `object` containing all the key/value pairs from each of the objects in the input array. If any of the input objects contain the same key, then the returned `object` will contain the value of the last one in the array. It is an error if the input array contains an item that is not an object."
},
"$sift": {
"args":"object, function",
"desc":"Returns an object that contains only the key/value pairs from the `object` parameter that satisfy the predicate `function` passed in as the second parameter.\n\nThe `function` that is supplied as the second parameter must have the following signature:\n\n`function(value [, key [, object]])`"
"args": "object, function",
"desc": "Returns an object that contains only the key/value pairs from the `object` parameter that satisfy the predicate `function` passed in as the second parameter.\n\nThe `function` that is supplied as the second parameter must have the following signature:\n\n`function(value [, key [, object]])`"
},
"$each": {
"args":"object, function",
"desc":"Returns an array containing the values return by the `function` when applied to each key/value pair in the `object`."
"args": "object, function",
"desc": "Returns an array containing the values return by the `function` when applied to each key/value pair in the `object`."
},
"$map": {
"args":"array, function",
"desc":"Returns an array containing the results of applying the `function` parameter to each value in the `array` parameter.\n\nThe `function` that is supplied as the second parameter must have the following signature:\n\n`function(value [, index [, array]])`"
"args": "array, function",
"desc": "Returns an array containing the results of applying the `function` parameter to each value in the `array` parameter.\n\nThe `function` that is supplied as the second parameter must have the following signature:\n\n`function(value [, index [, array]])`"
},
"$filter": {
"args":"array, function",
"desc":"Returns an array containing only the values in the `array` parameter that satisfy the `function` predicate.\n\nThe `function` that is supplied as the second parameter must have the following signature:\n\n`function(value [, index [, array]])`"
"args": "array, function",
"desc": "Returns an array containing only the values in the `array` parameter that satisfy the `function` predicate.\n\nThe `function` that is supplied as the second parameter must have the following signature:\n\n`function(value [, index [, array]])`"
},
"$reduce": {
"args":"array, function [, init]",
"desc":"Returns an aggregated value derived from applying the `function` parameter successively to each value in `array` in combination with the result of the previous application of the function.\n\nThe function must accept two arguments, and behaves like an infix operator between each value within the `array`. The signature of `function` must be of the form: `myfunc($accumulator, $value[, $index[, $array]])`\n\nThe optional `init` parameter is used as the initial value in the aggregation."
"args": "array, function [, init]",
"desc": "Returns an aggregated value derived from applying the `function` parameter successively to each value in `array` in combination with the result of the previous application of the function.\n\nThe function must accept two arguments, and behaves like an infix operator between each value within the `array`. The signature of `function` must be of the form: `myfunc($accumulator, $value[, $index[, $array]])`\n\nThe optional `init` parameter is used as the initial value in the aggregation."
},
"$flowContext": {
"args": "string[, string]",
@@ -200,8 +200,8 @@
"desc": "Returns a copy of the `string` with extra padding, if necessary, so that its total number of characters is at least the absolute value of the `width` parameter.\n\nIf `width` is a positive number, then the string is padded to the right; if negative, it is padded to the left.\n\nThe optional `char` argument specifies the padding character(s) to use. If not specified, it defaults to the space character."
},
"$fromMillis": {
"args": "number",
"desc": "Convert a number representing milliseconds since the Unix Epoch (1 January, 1970 UTC) to a timestamp string in the ISO 8601 format."
"args": "number, [, picture [, timezone]]",
"desc": "Convert the `number` representing milliseconds since the Unix Epoch (1 January, 1970 UTC) to a formatted string representation of the timestamp as specified by the picture string.\n\nIf the optional `picture` parameter is omitted, then the timestamp is formatted in the ISO 8601 format.\n\nIf the optional `picture` string is supplied, then the timestamp is formatted occording to the representation specified in that string. The behaviour of this function is consistent with the two-argument version of the XPath/XQuery function `format-dateTime` as defined in the XPath F&O 3.1 specification. The picture string parameter defines how the timestamp is formatted and has the same syntax as `format-dateTime`.\n\nIf the optional `timezone` string is supplied, then the formatted timestamp will be in that timezone. The `timezone` string should be in the format '±HHMM', where ± is either the plus or minus sign and HHMM is the offset in hours and minutes from UTC. Positive offset for timezones east of UTC, negative offset for timezones west of UTC."
},
"$formatNumber": {
"args": "number, picture [, options]",

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,23 @@
{
"info": {
"tip0": "Vous pouvez supprimer les noeuds ou les liens sélectionnés avec {{core:delete-selection}}",
"tip1": "Rechercher des noeuds à l'aide de {{core:search}}",
"tip2": "{{core:toggle-sidebar}} basculera l'affichage de cette barre latérale",
"tip3": "Vous pouvez gérer votre palette de noeuds avec {{core:manage-palette}}",
"tip4": "Vos noeuds de configuration de flux sont répertoriés dans le panneau de la barre latérale. Ils sont accessibles depuis le menu ou avec {{core:show-config-tab}}",
"tip5": "Activer ou désactiver ces conseils à partir de l'option dans les paramètres",
"tip6": "Déplacer les noeuds sélectionnés à l'aide des touches [gauche] [haut] [bas] et [droite]. Maintenir la touche [shift] enfoncée pour les pousser plus loin",
"tip7": "Faire glisser un noeud sur un fil le raccordera au lien",
"tip8": "Exporter les noeuds sélectionnés, ou l'onglet actuel avec {{core:show-export-dialog}}",
"tip9": "Importer un flux en faisant glisser son JSON dans l'éditeur, ou avec {{core:show-import-dialog}}",
"tip10": "[majuscule] [clic] et faites glisser sur un port de noeud pour déplacer tous les fils attachés ou seulement celui sélectionné",
"tip11": "Afficher l'onglet Infos avec {{core:show-info-tab}} ou l'onglet Débogage avec {{core:show-debug-tab}}",
"tip12": "[ctrl] [clic] dans l'espace de travail pour ouvrir la boîte de dialogue d'ajout rapide",
"tip13": "Maintenir la touche [ctrl] enfoncée lorsque vous [cliquez] sur un port de noeud pour activer le câblage rapide",
"tip14": "Maintenir la touche [shift] enfoncée lorsque vous [cliquez] sur un noeud pour sélectionner également tous ses noeuds connectés",
"tip15": "Maintenir la touche [ctrl] enfoncée lorsque vous [cliquez] sur un noeud pour l'ajouter ou le supprimer de la sélection actuelle",
"tip16": "Changer d'onglet de flux avec {{core:show-previous-tab}} et {{core:show-next-tab}}",
"tip17": "Vous pouvez confirmer vos modifications dans le panneau d'édition du noeud avec {{core:confirm-edit-tray}} ou les annuler avec {{core:cancel-edit-tray}}",
"tip18": "Appuyer sur {{core:edit-selected-node}} modifiera le premier noeud de la sélection actuelle"
}
}

View File

@@ -0,0 +1,274 @@
{
"$string": {
"args": "arg[, prettify]",
"desc": "Convertit le paramètre `arg` en une chaîne de caractères en utilisant les règles de typage suivantes :\n\n - Les chaînes de caractères sont inchangées\n - Les fonctions sont converties en une chaîne vide\n - L'infini numérique et NaN renvoient une erreur car ils ne peuvent pas être représentés comme un Numéro JSON\n - Toutes les autres valeurs sont converties en une chaîne JSON à l'aide de la fonction `JSON.stringify`. Si `prettify` est vrai, alors le JSON \"prettified\" est produit. c'est-à-dire une ligne par champ et les lignes seront en retrait en fonction de la profondeur du champ."
},
"$length": {
"args": "str",
"desc": "Renvoie le nombre de caractères dans la chaîne `str`. Une erreur est renvoyée si `str` n'est pas une chaîne de caractères."
},
"$substring": {
"args": "str, start[, length]",
"desc": "Renvoie une chaîne contenant les caractères du premier paramètre `str` commençant à la position `start` (pas de décalage). Si `length` est spécifié, alors la sous-chaîne contiendra un maximum de caractères `length`. Si `start` est négatif alors il indique le nombre de caractères à partir de la fin de `str`."
},
"$substringBefore": {
"args": "str, chars",
"desc": "Renvoie la sous-chaîne avant la première occurrence de la séquence de caractères `chars` dans `str`. Si `str` ne contient pas `chars`, alors il renvoie `str`."
},
"$substringAfter": {
"args": "str, chars",
"desc": "Renvoie la sous-chaîne après la première occurrence de la séquence de caractères `chars` dans `str`. Si `str` ne contient pas `chars`, alors il renvoie `str`."
},
"$uppercase": {
"args": "str",
"desc": "Renvoie une chaîne avec tous les caractères de `str` convertis en majuscules."
},
"$lowercase": {
"args": "str",
"desc": "Renvoie une chaîne avec tous les caractères de `str` convertis en minuscules."
},
"$trim": {
"args": "str",
"desc": "Normalise et supprime tous les caractères d'espacement dans `str` en appliquant les étapes suivantes :\n\n - Toutes les tabulations, retours à la ligne et sauts de ligne sont remplacés par des espaces.\n- Les séquences contiguës d'espaces sont réduites à un seul espace.\n- Les espaces de fin et de début sont supprimés.\n\n Si `str` n'est pas spécifié (c'est-à-dire que cette fonction est invoquée sans argument), alors la valeur de contexte est utilisée comme valeur de `str`. Une erreur est renvoyée si `str` n'est pas une chaîne."
},
"$contains": {
"args": "str, pattern",
"desc": "Renvoie `true` si `str` correspond à `pattern`, sinon il renvoie `false`. Si `str` n'est pas spécifié (c'est-à-dire que cette fonction est invoquée avec un argument), alors la valeur de contexte est utilisée comme valeur de `str`. Le paramètre `pattern` peut être une chaîne ou une expression régulière."
},
"$split": {
"args": "str[, separator][, limit]",
"desc": "Divise le paramètre `str` en un tableau de sous-chaînes. C'est une erreur si `str` n'est pas une chaîne. Le paramètre facultatif `separator` spécifie les caractères à l'intérieur de `str` à propos desquels il doit être divisé en chaîne ou en expression régulière. Si `separator` n'est pas spécifié, la chaîne vide est supposée et `str` sera divisé en un tableau de caractères uniques. C'est une erreur si `separator` n'est pas une chaîne. Le paramètre facultatif `limit` est un nombre qui spécifie le nombre maximum de sous-chaînes à inclure dans le tableau résultant. Toutes les sous-chaînes supplémentaires sont ignorées. Si `limit` n'est pas spécifié, alors `str` est entièrement divisé sans limite à la taille du tableau résultant. C'est une erreur si `limit` n'est pas un nombre non négatif."
},
"$join": {
"args": "array[, separator]",
"desc": "Joint un tableau de chaînes de composants en une seule chaîne concaténée, chaque chaîne de composants étant séparée par le paramètre facultatif `separator`. C'est une erreur si l'entrée `array` contient un élément qui n'est pas une chaîne. Si `séparateur` n'est pas spécifié, il est supposé être la chaîne vide, c'est-à-dire qu'il n'y a pas de `séparateur` entre les chaînes de composants. C'est une erreur si `separator` n'est pas une chaîne."
},
"$match": {
"args": "str, pattern [, limit]",
"desc": "Applique la chaîne `str` à l'expression régulière `pattern` et renvoie un tableau d'objets, chaque objet contenant des informations sur chaque occurrence d'une correspondance dans `str`."
},
"$replace": {
"args": "str, pattern, replacement [, limit]",
"desc": "Trouve les occurrences de `pattern` dans `str` et les remplace par `replacement`.\n\nLe paramètre facultatif `limit` est le nombre maximum de remplacements."
},
"$now": {
"args": "$[picture [, timezone]]",
"desc": "Génère un horodatage au format compatible ISO 8601 et le renvoie sous forme de chaîne. Si les paramètres optionnels d'image et de fuseau horaire sont fournis, alors l'horodatage actuel est formaté comme décrit par la fonction `$fromMillis()`"
},
"$base64encode": {
"args": "string",
"desc": "Convertit une chaîne ASCII en une représentation en base 64. Chaque caractère de la chaîne est traité comme un octet de données binaires. Cela nécessite que tous les caractères de la chaîne se trouvent dans la plage 0x00 à 0xFF, qui inclut tous les caractères des chaînes encodées en URI. Les caractères Unicode en dehors de cette plage ne sont pas pris en charge."
},
"$base64decode": {
"args": "string",
"desc": "Convertit les octets encodés en base 64 en une chaîne, à l'aide d'une page de codes Unicode UTF-8."
},
"$number": {
"args": "arg",
"desc": "Convertit le paramètre `arg` en un nombre en utilisant les règles de conversion suivantes :\n\n - Les nombres sont inchangés\n - Les chaînes qui contiennent une séquence de caractères représentant un nombre JSON légal sont converties en ce nombre\n - Toutes les autres valeurs provoquer l'envoi d'une erreur."
},
"$abs": {
"args": "number",
"desc": "Renvoie la valeur absolue du paramètre `nombre`."
},
"$floor": {
"args": "number",
"desc": "Renvoie la valeur de `number` arrondie à l'entier le plus proche inférieur ou égal à `number`."
},
"$ceil": {
"args": "number",
"desc": "Renvoie la valeur de `number` arrondie à l'entier le plus proche supérieur ou égal à `number`."
},
"$round": {
"args": "number [, precision]",
"desc": "Renvoie la valeur du paramètre `number` arrondie au nombre de décimales spécifié par le paramètre facultatif `precision`."
},
"$power": {
"args": "base, exponent",
"desc": "Renvoie la valeur de `base` élevée à la puissance de `exponent`."
},
"$sqrt": {
"args": "number",
"desc": "Renvoie la racine carrée de la valeur du paramètre `number`."
},
"$random": {
"args": "",
"desc": "Renvoie un nombre pseudo-aléatoire supérieur ou égal à zéro et inférieur à un."
},
"$millis": {
"args": "",
"desc": "Renvoie le nombre de millisecondes depuis l'époque Unix (1er janvier 1970 UTC) sous forme de nombre. Tous les appels de `$millis()` dans une évaluation d'une expression renverront toutes la même valeur."
},
"$sum": {
"args": "array",
"desc": "Renvoie la somme arithmétique d'un `tableau` de nombres. C'est une erreur si l'entrée `array` contient un élément qui n'est pas un nombre."
},
"$max": {
"args": "array",
"desc": "Renvoie le nombre maximal dans un `tableau` de nombres. C'est une erreur si l'entrée `array` contient un élément qui n'est pas un nombre."
},
"$min": {
"args": "array",
"desc": "Renvoie le nombre minimum dans un `tableau` de nombres. C'est une erreur si l'entrée `array` contient un élément qui n'est pas un nombre."
},
"$average": {
"args": "array",
"desc": "Renvoie la valeur moyenne d'un `tableau` de nombres. C'est une erreur si l'entrée `array` contient un élément qui n'est pas un nombre."
},
"$boolean": {
"args": "arg",
"desc": "Transforme l'argument en booléen en utilisant les règles suivantes :\n\n - `Boolean` : inchangé\n - `string` : vide : `false`\n - `string` : non vide : `true`\n - `number` : `0` : `false`\n - `number` : non nul : `true`\n - `null` : `false`\n - `array` : vide : `false`\n - `array` : contient un membre qui convertit en `true` : `true`\n - `array` : tous les membres sont transformés en `false` : `false`\n - `object` : vide : `false`\n - `object` : non vide : `true`\n - `function` : `false`"
},
"$not": {
"args": "arg",
"desc": "Renvoie un booléen résultat de la négation logique de l'argument"
},
"$exists": {
"args": "arg",
"desc": "Renvoie la valeur booléenne `true` si l'expression `arg` est évaluée à une valeur, ou `false` si l'expression ne correspond à rien (par exemple, un chemin vers une référence de champ inexistante)."
},
"$count": {
"args": "array",
"desc": "Renvoie le nombre d'éléments du tableau"
},
"$append": {
"args": "array, array",
"desc": "Combine deux tableaux"
},
"$sort": {
"args": "array [, function]",
"desc": "Renvoie un tableau contenant toutes les valeurs du paramètre `array`, mais triées dans l'ordre.\n\nSi un comparateur `function` est fourni, alors il doit s'agir d'une fonction qui prend deux paramètres :\n\n`function(left , droite)`\n\nCette fonction est invoquée par l'algorithme de tri pour comparer deux valeurs à gauche et à droite. Si la valeur de left doit être placée après la valeur de right dans l'ordre de tri souhaité, la fonction doit renvoyer un booléen `true` pour indiquer un échange. Sinon, il doit renvoyer `false`."
},
"$reverse": {
"args": "array",
"desc": "Renvoie un tableau contenant toutes les valeurs du paramètre `array`, mais dans l'ordre inverse."
},
"$shuffle": {
"args": "array",
"desc": "Renvoie un tableau contenant toutes les valeurs du paramètre `array`, mais mélangées dans un ordre aléatoire."
},
"$zip": {
"args": "array, ...",
"desc": "Renvoie un tableau convolué (zippé) contenant des tableaux groupés de valeurs des arguments `array1`...`arrayN` d'index 0, 1, 2...."
},
"$keys": {
"args": "object",
"desc": "Renvoie un tableau contenant les clés de l'objet. Si l'argument est un tableau d'objets, le tableau renvoyé contient une liste dédupliquée de toutes les clés de tous les objets."
},
"$lookup": {
"args": "object, key",
"desc": "Renvoie la valeur associée à la clé dans l'objet. Si le premier argument est un tableau d'objets, tous les objets du tableau sont recherchés et les valeurs associées à toutes les occurrences de key sont renvoyées."
},
"$spread": {
"args": "object",
"desc": "Divise un objet contenant des paires clé/valeur en un tableau d'objets, chacun ayant une seule paire clé/valeur de l'objet d'entrée. Si le paramètre est un tableau d'objets, alors le tableau résultant contient un objet pour chaque paire clé/valeur dans chaque objet du tableau fourni."
},
"$merge": {
"args": "array&lt;object&gt;",
"desc": "Fusionne un tableau d'`objets` en un seul `objet` contenant toutes les paires clé/valeur de chacun des objets du tableau d'entrée. Si l'un des objets d'entrée contient la même clé, alors l'`objet` renvoyé contiendra la valeur du dernier dans le tableau. C'est une erreur si le tableau d'entrée contient un élément qui n'est pas un objet."
},
"$sift": {
"args": "object, function",
"desc": "Renvoie un objet qui contient uniquement les paires clé/valeur du paramètre `object` qui satisfont le prédicat `function` transmis comme second paramètre.\n\nLa `function` qui est fournie comme second paramètre doit avoir la signature suivante :\n\n`fonction(valeur [, clé [, objet]])`"
},
"$each": {
"args": "object, function",
"desc": "Renvoie un tableau contenant les valeurs renvoyées par la `fonction` lorsqu'elle est appliquée à chaque paire clé/valeur dans l'`objet`."
},
"$map": {
"args": "array, function",
"desc": "Renvoie un tableau contenant les résultats de l'application du paramètre `function` à chaque valeur du paramètre `array`.\n\nLa `function` fournie comme second paramètre doit avoir la signature suivante :\n\n`function( valeur [, indice [, tableau]])`"
},
"$filter": {
"args": "array, function",
"desc": "Renvoie un tableau contenant uniquement les valeurs du paramètre `array` qui satisfont le prédicat `function`.\n\nLa `function` fournie comme second paramètre doit avoir la signature suivante :\n\n`function(value [ , indice [, tableau]])`"
},
"$reduce": {
"args": "array, function [, init]",
"desc": "Renvoie une valeur agrégée dérivée de l'application successive du paramètre `function` à chaque valeur de `array` en combinaison avec le résultat de l'application précédente de la fonction.\n\nLa fonction doit accepter deux arguments et se comporte comme un opérateur infixe entre chaque valeur dans le `tableau`. La signature de `function` doit être de la forme : `myfunc($accumulator, $value[, $index[, $array]])`\n\nLe paramètre facultatif `init` est utilisé comme valeur initiale dans l'agrégation ."
},
"$flowContext": {
"args": "string[, string]",
"desc": "Récupère une propriété de contexte de flux.\n\nCeci est une fonction définie par Node-RED."
},
"$globalContext": {
"args": "string[, string]",
"desc": "Récupère une propriété de contexte globale.\n\nCeci est une fonction définie par Node-RED."
},
"$pad": {
"args": "string, width [, char]",
"desc": "Renvoie une copie de la `chaîne` avec un rembourrage supplémentaire, si nécessaire, de sorte que son nombre total de caractères corresponde au moins à la valeur absolue du paramètre `width`.\n\nSi `width` est un nombre positif, alors la chaîne est rembourré à droite; s'il est négatif, il est rempli vers la gauche.\n\nL'argument optionnel `char` spécifie le(s) caractère(s) de remplissage à utiliser. S'il n'est pas spécifié, la valeur par défaut est le caractère espace."
},
"$fromMillis": {
"args": "number, [, picture [, timezone]]",
"desc": "Convertisser le « nombre » représentant les millisecondes depuis l'époque Unix (1er janvier 1970 UTC) en une représentation sous forme de chaîne formatée de l'horodatage tel que spécifié par la chaîne d'image.\n\nSi le paramètre facultatif « image » est omis, l'horodatage est formaté au format ISO 8601.\n\nSi la chaîne facultative `image` est fournie, l'horodatage est formaté selon la représentation spécifiée dans cette chaîne. Le comportement de cette fonction est cohérent avec la version à deux arguments de la fonction XPath/XQuery `format-dateTime` telle que définie dans la spécification XPath F&O 3.1. Le paramètre de chaîne d'image définit la façon dont l'horodatage est formaté et a la même syntaxe que `format-dateTime`.\n\nSi la chaîne facultative `timezone` est fournie, alors l'horodatage formaté sera dans ce fuseau horaire. La chaîne `timezone` doit être au format '±HHMM', où ± est le signe plus ou moins et HHMM est le décalage en heures et minutes par rapport à UTC. Décalage positif pour les fuseaux horaires à l'est de UTC, décalage négatif pour les fuseaux horaires à l'ouest de UTC."
},
"$formatNumber": {
"args": "number, picture [, options]",
"desc": "Convertit le `number` en une chaîne et le formate en une représentation décimale comme spécifié par la chaîne `picture`.\n\n Le comportement de cette fonction est cohérent avec la fonction XPath/XQuery fn:format-number telle que définie dans le Spécification XPath F&O 3.1. Le paramètre de chaîne d'image définit la façon dont le nombre est formaté et a la même syntaxe que fn:format-number.\n\nLe troisième argument facultatif `options` est utilisé pour remplacer les caractères de formatage spécifiques aux paramètres régionaux par défaut, tels que le séparateur décimal. S'il est fourni, cet argument doit être un objet contenant des paires nom/valeur spécifiées dans la section de format décimal de la spécification XPath F&O 3.1."
},
"$formatBase": {
"args": "number [, radix]",
"desc": "Convertit le `number` en une chaîne et le formate en un entier représenté dans la base numérique spécifiée par l'argument `radix`. Si `radix` n'est pas spécifié, la valeur par défaut est la base 10. `radix` peut être compris entre 2 et 36, sinon une erreur est renvoyée."
},
"$toMillis": {
"args": "timestamp",
"desc": "Convertit une chaîne `timestamp` au format ISO 8601 en nombre de millisecondes depuis l'époque Unix (1er janvier 1970 UTC) sous forme de nombre. Une erreur est renvoyée si la chaîne n'est pas au format correct."
},
"$env": {
"args": "arg",
"desc": "Renvoie la valeur d'une variable d'environnement.\n\nCeci est une fonction définie par Node-RED."
},
"$eval": {
"args": "expr [, context]",
"desc": "Analyse et évalue la chaîne `expr` qui contient un JSON littéral ou une expression JSONata en utilisant le contexte actuel comme contexte d'évaluation."
},
"$formatInteger": {
"args": "number, picture",
"desc": "Transforme le `nombre` en une chaîne et le formate en une représentation entière comme spécifié par la chaîne `image`. Le paramètre de chaîne d'image définit la façon dont le nombre est formaté et a la même syntaxe que `fn:format-integer` de la spécification XPath F&O 3.1."
},
"$parseInteger": {
"args": "string, picture",
"desc": "Analyse le contenu du paramètre `string` en un entier (comme un nombre JSON) en utilisant le format spécifié par la chaîne `picture`. Le paramètre de chaîne `picture` a le même format que `$formatInteger`."
},
"$error": {
"args": "[str]",
"desc": "Génère une erreur avec un message. Le `str` facultatif remplacera le message par défaut de la fonction `$error() évaluée`"
},
"$assert": {
"args": "arg, str",
"desc": "Si `arg` est vrai, la fonction renvoie undefined. Si `arg` est faux, une exception est lancée avec `str` comme message de l'exception."
},
"$single": {
"args": "array, function",
"desc": "Renvoie la seule et unique valeur du paramètre `array` qui satisfait le prédicat `function` (c'est-à-dire que la `function` renvoie la valeur booléenne `true` lorsqu'elle est transmise à la valeur). Lève une exception si le nombre de valeurs correspondantes n'est pas exactement un.\n\nLa fonction doit être fournie dans la signature suivante : `function(value [, index [, array]])` où value est chaque entrée du tableau, index est la position de cette valeur et le tableau entier est passé comme troisième argument"
},
"$encodeUrlComponent": {
"args": "str",
"desc": "Encode un composant URL (Uniform Resource Locator) en remplaçant chaque instance de certains caractères par une, deux, trois ou quatre séquences d'échappement représentant l'encodage UTF-8 du caractère.\n\nExemple : `$encodeUrlComponent(\"?x =test\")` => `\"%3Fx%3Dtest\"`"
},
"$encodeUrl": {
"args": "str",
"desc": "Encode une URL (Uniform Resource Locator) en remplaçant chaque instance de certains caractères par une, deux, trois ou quatre séquences d'échappement représentant l'encodage UTF-8 du caractère. \n\nExemple : `$encodeUrl(\"https://mozilla.org/?x=шеллы\")` => `\"https://mozilla.org/?x=%D1%88%D0% B5%D0%BB%D0%BB%D1%8B\"`"
},
"$decodeUrlComponent": {
"args": "str",
"desc": "Décode un composant URL (Uniform Resource Locator) précédemment créé par encodeUrlComponent. \n\nExemple : `$decodeUrlComponent(\"%3Fx%3Dtest\")` => `\"?x=test\"`"
},
"$decodeUrl": {
"args": "str",
"desc": "Décode une URL (Uniform Resource Locator) précédemment créée par encodeUrl. \n\nExemple : `$decodeUrl(\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\")` => `\"https://mozilla.org/?x=шеллы\"`"
},
"$distinct": {
"args": "array",
"desc": "Renvoie un tableau avec les valeurs en double supprimées de `array`"
},
"$type": {
"args": "value",
"desc": "Renvoie le type de `value` sous forme de chaîne. Si `value` n'est pas défini, cela renverra `undefined`"
},
"$moment": {
"args": "[str]",
"desc": "Obtient un objet de date à l'aide de la bibliothèque Moment."
}
}

View File

@@ -23,7 +23,11 @@
"position": "配置",
"enable": "有効",
"disable": "無効",
"upload": "アップロード"
"upload": "アップロード",
"lock": "固定",
"unlock": "固定を解除",
"locked": "固定済み",
"unlocked": "固定なし"
},
"type": {
"string": "文字列",
@@ -53,19 +57,38 @@
"confirmDelete": "削除の確認",
"delete": "本当に '__label__' を削除しますか?",
"dropFlowHere": "ここにフローをドロップしてください",
"dropImageHere": "ここに画像ファイルをドロップしてください",
"addFlow": "フローの追加",
"addFlowToRight": "右側にフローを追加",
"closeFlow": "フローを閉じる",
"hideFlow": "フローを非表示",
"hideOtherFlows": "他のフローを非表示",
"showAllFlows": "全てのフローを表示",
"hideAllFlows": "全てのフローを非表示",
"hiddenFlows": "__count__ 個の非表示のフロー一覧",
"hiddenFlows_plural": "__count__ 個の非表示のフロー一覧",
"showLastHiddenFlow": "最後に非表示にしたフローを表示",
"listFlows": "フロー一覧",
"listSubflows": "サブフロー一覧",
"status": "状態",
"enabled": "有効",
"disabled": "無効",
"info": "詳細",
"selectNodes": "ノードをクリックして選択"
"selectNodes": "ノードをクリックして選択",
"enableFlow": "フローを有効化",
"disableFlow": "フローを無効化",
"lockFlow": "フローを固定",
"unlockFlow": "フローの固定を解除",
"moveToStart": "フローを先頭へ移動",
"moveToEnd": "フローを最後へ移動"
},
"menu": {
"label": {
"view": {
"view": "表示",
"grid": "グリッド",
"storeZoom": "読み込み時に拡大/縮小のレベルを復元",
"storePosition": "読み込み時にスクロール位置を復元",
"showGrid": "グリッドを表示",
"snapGrid": "ノードの配置を補助",
"gridSize": "グリッドの大きさ",
@@ -83,12 +106,14 @@
"palette": {
"show": "パレットを表示"
},
"edit": "編集",
"settings": "設定",
"userSettings": "ユーザ設定",
"nodes": "ノード",
"displayStatus": "ノードのステータスを表示",
"displayConfig": "設定ノード",
"import": "読み込み",
"importExample": "フロー例を読み込み",
"export": "書き出し",
"search": "ノードを検索",
"searchInput": "ノードを検索",
@@ -105,24 +130,43 @@
"editPalette": "パレットの管理",
"other": "その他",
"showTips": "ヒントを表示",
"showWelcomeTours": "新バージョンのガイドツアーを表示",
"help": "Node-REDウェブサイト",
"projects": "プロジェクト",
"projects-new": "新規",
"projects-open": "開く",
"projects-settings": "設定",
"showNodeLabelDefault": "追加したノードのラベルを表示",
"codeEditor": "コードエディタ",
"groups": "グループ",
"groupSelection": "選択部分をグループ化",
"ungroupSelection": "選択部分をグループ解除",
"groupMergeSelection": "選択部分をマージ",
"groupRemoveSelection": "グループから削除"
"groupRemoveSelection": "グループから削除",
"arrange": "配置",
"alignLeft": "左揃え",
"alignCenter": "左右中央揃え",
"alignRight": "右揃え",
"alignTop": "上揃え",
"alignMiddle": "上下中央揃え",
"alignBottom": "下揃え",
"distributeHorizontally": "左右に整列",
"distributeVertically": "上下に整列",
"moveToBack": "最背面へ移動",
"moveToFront": "最前面へ移動",
"moveBackwards": "背面へ移動",
"moveForwards": "前面へ移動"
}
},
"actions": {
"toggle-navigator": "ナビゲータの表示/非表示を切替",
"zoom-out": "縮小",
"zoom-reset": "拡大/縮小を初期化",
"zoom-in": "拡大"
"zoom-in": "拡大",
"search-flows": "フローを検索",
"search-prev": "前へ",
"search-next": "次へ",
"search-counter": "\"__term__\" __count__ 件中の __result__ 件目"
},
"user": {
"loggedInAs": "__name__ としてログインしました",
@@ -138,6 +182,10 @@
}
},
"notification": {
"state": {
"flowsStopped": "フローを停止しました",
"flowsStarted": "フローを開始しました"
},
"warning": "<strong>警告</strong>: __message__",
"warnings": {
"undeployedChanges": "ノードの変更をデプロイしていません",
@@ -186,7 +234,8 @@
"create-default-package": "デフォルトパッケージファイルの作成",
"no-thanks": "不要",
"create-default-project": "デフォルトプロジェクトファイルの作成",
"show-merge-conflicts": "マージ競合を表示"
"show-merge-conflicts": "マージ競合を表示",
"unknownNodesButton": "不明なノードを検索する"
}
},
"clipboard": {
@@ -264,13 +313,19 @@
"modifiedFlowsDesc": "変更したノードを含むフローのみデプロイ",
"modifiedNodes": "変更したノード",
"modifiedNodesDesc": "変更したノードのみデプロイ",
"startFlows": "開始",
"startFlowsDesc": "フローを開始",
"stopFlows": "停止",
"stopFlowsDesc": "フローを停止",
"restartFlows": "フローを再起動",
"restartFlowsDesc": "デプロイされた現在のフローを再起動",
"successfulDeploy": "デプロイが成功しました",
"successfulRestart": "フローの再起動が成功しました",
"deployFailed": "デプロイが失敗しました: __message__",
"unusedConfigNodes": "使われていない設定ノードがあります。",
"unusedConfigNodesLink": "設定を参照する",
"unusedConfigNodesButton": "未使用の構成ノードを検索",
"unknownNodesButton": "不明なノードを検索する",
"invalidNodesButton": "無効なノードを検索する",
"errors": {
"noResponse": "サーバの応答がありません"
},
@@ -450,23 +505,29 @@
"global": "グローバル",
"workspace": "ワークスペース",
"selectAll": "全てのノードを選択",
"selectAllConnected": "接続された全てのノードを選択",
"selectNone": "選択を外す",
"selectAllConnected": "接続されたノードを選択",
"addRemoveNode": "ノードの選択、選択解除",
"editSelected": "選択したノードを編集",
"deleteSelected": "選択したノードや接続を削除",
"deleteReconnect": "削除と再接続",
"importNode": "フローの読み込み",
"exportNode": "フローの書き出し",
"nudgeNode": "選択したノードを移動(移動量小)",
"moveNode": "選択したノードを移動(移動量大)",
"toggleSidebar": "サイドバーの表示/非表示",
"togglePalette": "パレットの表示/非表示",
"copyNode": "選択したノードをコピー",
"cutNode": "選択したノードを切り取り",
"copyNode": "ノードをコピー",
"cutNode": "ノードを切り取り",
"pasteNode": "ノードを貼り付け",
"copyGroupStyle": "グループ様式をコピー",
"pasteGroupStyle": "グループ様式を貼り付け",
"undoChange": "変更操作を戻す",
"redoChange": "変更操作をやり直し",
"searchBox": "ノードを検索",
"managePalette": "パレットの管理",
"actionList": "動作一覧"
"actionList": "動作一覧",
"splitWireWithLinks": "選択したワイヤーをlinkードで分離"
},
"library": {
"library": "ライブラリ",
@@ -518,14 +579,15 @@
"nodeEnabled_plural": "ノードを有効化しました:",
"nodeDisabled": "ノードを無効化しました:",
"nodeDisabled_plural": "ノードを無効化しました:",
"nodeUpgraded": "ノードモジュール __module__ をバージョン __version__ へ更新しました"
"nodeUpgraded": "ノードモジュール __module__ をバージョン __version__ へ更新しました",
"unknownNodeRegistered": "ノードの読み込みエラー: <ul><li>__type__<br>__error__</li></ul>"
},
"editor": {
"title": "パレットの管理",
"palette": "パレット",
"times": {
"seconds": "秒前",
"minutes": "分前",
"seconds": "秒前",
"minutes": "分前",
"minutesV": "__count__ 分前",
"hoursV": "__count__ 時間前",
"hoursV_plural": "__count__ 時間前",
@@ -636,13 +698,10 @@
"globalConfig": "グローバル設定ノード",
"triggerAction": "アクションを実行",
"find": "ワークスペース内を検索",
"search": {
"configNodes": "設定ノード",
"unusedConfigNodes": "未使用の設定ノード",
"invalidNodes": "不正なノード",
"uknownNodes": "未知のノード",
"unusedSubflows": "未使用のサブフロー"
}
"copyItemUrl": "要素のURLをコピー",
"copyURL2Clipboard": "URLをクリップボードにコピーしました",
"showFlow": "表示",
"hideFlow": "非表示"
},
"help": {
"name": "ヘルプ",
@@ -652,7 +711,8 @@
"showHelp": "ヘルプを表示",
"showInOutline": "アウトラインに表示",
"showTopics": "トピックを表示",
"noHelp": "ヘルプのトピックが未選択"
"noHelp": "ヘルプのトピックが未選択",
"changeLog": "更新履歴"
},
"config": {
"name": "設定ノードを表示",
@@ -812,7 +872,7 @@
"pushFailed": "リモートに新しいコミットがあるため、プッシュに失敗しました。プルしてマージしてから、再度プッシュしてください。",
"push": "プッシュ",
"pull": "プル",
"unablePull": "<p>リモートの変更のプル失敗:ステージングされていないローカルの変更上書きされてしまいます。</p><p>変更をコミットしてから再度実行してください。</p>",
"unablePull": "<p>リモートの変更のプル失敗:ステージングされていないローカルの変更上書きされてしまいます。</p><p>変更をコミットしてから再度実行してください。</p>",
"showUnstagedChanges": "ステージングされていない変更を表示",
"connectionFailed": "リモートリポジトリに接続できません: ",
"pullUnrelatedHistory": "<p>リモートに関連のないコミット履歴があります。</p><p>本当に変更をプルしてローカルリポジトリに反映しますか?</p>",
@@ -863,8 +923,20 @@
"addTitle": "要素を追加"
},
"search": {
"history": "検索履歴",
"clear": "全て削除",
"empty": "一致したものが見つかりませんでした",
"addNode": "ノードを追加..."
"addNode": "ノードを追加...",
"options": {
"configNodes": "設定ノード",
"unusedConfigNodes": "未使用の設定ノード",
"invalidNodes": "不正なノード",
"uknownNodes": "未知のノード",
"unusedSubflows": "未使用のサブフロー",
"hiddenFlows": "非表示のフロー",
"modifiedNodes": "修正したノードやフロー",
"thisFlow": "現在のフロー"
}
},
"expressionEditor": {
"functions": "関数",
@@ -881,10 +953,16 @@
"errors": {
"invalid-expr": "不正なJSONata式:\n __message__",
"invalid-msg": "不正なJSONメッセージ例:\n __message__",
"context-unsupported": "$flowContext や $globalContextの\nコンテキスト機能をテストできません",
"eval": "表現評価エラー:\n __message__"
"context-unsupported": "$flowContext や $globalContextの\nコンテキスト関数をテストできません",
"env-unsupported": "$env関数はテストできません",
"moment-unsupported": "$moment関数はテストできません",
"clone-unsupported": "$clone関数はテストできません",
"eval": "式評価エラー:\n __message__"
}
},
"monaco": {
"setTheme": "テーマを設定:"
},
"jsEditor": {
"title": "JavaScriptエディタ"
},
@@ -896,6 +974,8 @@
"format": "JSONフォーマット",
"rawMode": "JSONを編集",
"uiMode": "ビジュアルエディタ",
"rawMode-readonly": "JSON",
"uiMode-readonly": "ビジュアル",
"insertAbove": "上に挿入",
"insertBelow": "下に挿入",
"addItem": "要素を追加",
@@ -922,7 +1002,10 @@
"quote": "引用",
"link": "リンク",
"horizontal-rule": "区切り線",
"toggle-preview": "プレビュー表示切替え"
"toggle-preview": "プレビュー表示切替え",
"mermaid": {
"summary": "Mermaid図"
}
},
"bufferEditor": {
"title": "バッファエディタ",
@@ -1057,7 +1140,8 @@
"not-git": "Gitリポジトリではありません",
"no-resource": "リポジトリが見つかりません",
"cant-get-ssh-key-path": "エラー! 選択したSSHキーのパスを取得できません。",
"unexpected_error": "予期しないエラー"
"unexpected_error": "予期しないエラー",
"clearContext": "プロジェクトを切り替る際にコンテキストを初期化"
},
"delete": {
"confirm": "プロジェクトを削除しても良いですか?"
@@ -1104,13 +1188,205 @@
"preview": "UIプレビュー",
"defaultValue": "デフォルト値"
},
"tourGuide": {
"takeATour": "ツアーを開始",
"start": "開始",
"next": "次へ",
"welcomeTours": "ウェルカムツアー"
},
"diagnostics": {
"title": "システム情報"
},
"languages": {
"de": "ドイツ語",
"en-US": "英語",
"fr": "フランス語",
"ja": "日本語",
"ko": "韓国語",
"pt-BR":"ポルトガル語",
"ru": "ロシア語",
"zh-CN": "中国語(簡体)",
"zh-TW": "中国語(繁体)"
},
"validator": {
"errors": {
"invalid-json": "JSONデータが不正: __error__",
"invalid-json-prop": "__prop__: JSONデータが不正: __error__",
"invalid-prop": "プロパティ式が不正",
"invalid-prop-prop": "__prop__: プロパティ式が不正",
"invalid-num": "数値が不正",
"invalid-num-prop": "__prop__: 数値が不正",
"invalid-regexp": "入力パターンが不正",
"invalid-regex-prop": "__prop__: 入力パターンが不正",
"missing-required-prop": "__prop__: プロパティが未設定",
"invalid-config": "__prop__: 設定ノードが不正",
"missing-config": "__prop__: 設定ノードが存在しません",
"validation-error": "__prop__: チェックエラー: __node__, __id__: __error__"
}
},
"contextMenu": {
"insert": "挿入",
"node": "ノード",
"junction": "分岐点",
"linkNodes": "Linkード"
},
"env-var": {
"environment": "環境変数",
"header": "大域環境変数",
"revert": "破棄"
},
"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-modified-nodes": "修正したフローを表示",
"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": "ノードを複数に接続",
"wire-multiple-to-node": "複数からノードへ接続",
"split-wire-with-link-nodes": "ワイヤーをlinkードで分割",
"generate-node-names": "ノード名を生成",
"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": "検索",
"search-previous": "前を検索",
"search-next": "次を検索",
"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": "ナビゲータ表示切替",
"show-system-info": "システム情報",
"split-wires-with-junctions": "分岐点によりワイヤーを分割",
"new-project": "新しいプロジェクト",
"open-project": "プロジェクトを開く",
"show-project-settings": "プロジェクト設定を表示",
"show-version-control-tab": "バージョンコントロールタブを表示",
"start-flows": "フローを開始",
"stop-flows": "フローを停止",
"copy-item-url": "要素のURLをコピー",
"copy-item-edit-url": "要素の編集URLをコピー",
"move-flow-to-start": "フローを先頭に移動",
"move-flow-to-end": "フローを末尾に移動",
"show-global-env": "大域環境変数を表示",
"lock-flow": "フローを固定",
"unlock-flow": "フローの固定を解除",
"show-node-help": "ノードのヘルプを表示"
}
}

View File

@@ -17,7 +17,7 @@
"tip14": "[shift] を押しながらノードを [click] すると、接続された全てのノードを選択できます。",
"tip15": "[ctrl] を押しながらノードを [click] すると、選択/非選択を切り替えできます。",
"tip16": "{{core:show-previous-tab}} や {{core:show-next-tab}} で、タブの切り替えができます。",
"tip17": "ノードのプロティ設定画面にて {{core:confirm-edit-tray}} を押すと、変更を確定できます。また、 {{core:cancel-edit-tray}} を押すと、変更を取り消せます。",
"tip17": "ノードのプロティ設定画面にて {{core:confirm-edit-tray}} を押すと、変更を確定できます。また、 {{core:cancel-edit-tray}} を押すと、変更を取り消せます。",
"tip18": "ノードを選択し、 {{core:edit-selected-node}} を押すとプロパティ設定画面が表示されます。"
}
}

View File

@@ -52,8 +52,8 @@
"desc": "文字列 `str` からパターン `pattern` を検索し、置換文字列 `replacement` に置き換えます。\n\n任意の引数 `limit` には、置換回数の上限値を指定します。"
},
"$now": {
"args": "",
"desc": "ISO 8601互換形式の時刻を生成し、文字列として返します。"
"args": "$[picture [, timezone]]",
"desc": "ISO 8601互換形式の時刻を生成し、文字列として返します。pictureおよびtimezoneパラメータが指定されている場合、現在時刻を`$fromMillis()`関数の説明に従ってフォーマットします。"
},
"$base64encode": {
"args": "string",
@@ -200,8 +200,8 @@
"desc": "文字数が引数 `width` の絶対値以上となるよう、必要に応じて追加文字を付け足した `string` のコピーを返します。\n\n`width` が正の値の場合、文字列の右側に追加文字を付け足します。もし負の値の場合、文字列の左側に追加文字を付け足します。\n\n任意の引数 `char` には、本関数で用いる追加文字を指定します。もし追加文字を指定しない場合は、既定値として空白文字を使用します。"
},
"$fromMillis": {
"args": "number",
"desc": "Unixエポック(1 January, 1970 UTC)からの経過ミリ秒を表す数値を、ISO 8601形式のタイムスタンプの文字列に変換します。"
"args": "number, [, picture [, timezone]]",
"desc": "Unixエポック(1 January, 1970 UTC)からの経過ミリ秒を表す数値を、`picture`の指定に従ってタイムスタンプの文字列に変換します。\n\n`picture`パラメータが指定されない場合、ISO 8601形式に変換します。\n\n`picture`を指定すると、指定した文字列に従って変換を行います。この変換はXPath F&O 3.1仕様におけるXPath/XQueryの2引数形式`format-dateTime`と同様です。`picture`パラメータはタイムスタンプの変換形式を定義し、その書式は`format-dateTime`と同じです。\n\n`timezone`を指定すると、指定タイムゾーンで変換します。`timezone`は'±HHMM'という形式で指定します。ここで、±は+もしくは-記号を表し、HHMMはUTCからの差分時間と分を表します。正の差分はUTCの東、負の差分は西のタイムゾーンとなります。"
},
"$formatNumber": {
"args": "number, picture [, options]",

273
packages/node_modules/@node-red/editor-client/locales/ko/editor.json vendored Executable file → Normal file
View File

@@ -24,16 +24,29 @@
"delete": "정말로 '__label__' 을(를) 삭제하시겠습니까?",
"dropFlowHere": "플로우를 이곳에 가져오세요",
"addFlow": "플로우 추가",
"addFlowToRight": "오른쪽에 플로우 추가",
"hideFlow": "플로우 숨기기",
"hideOtherFlows": "다른 플로우 숨기기",
"showAllFlows": "모든 플로우 보기",
"hideAllFlows": "모든 플로우 숨기기",
"hiddenFlows": "__count__개의 숨겨진 플로우 보기",
"hiddenFlows_plural": "__count__개의 숨겨진 플로우 보기",
"showLastHiddenFlow": "마지막으로 숨겨진 플로우 보기",
"listFlows": "플로우 리스트",
"listSubflows": "서브 플로우 리스트",
"status": "상태",
"enabled": "사용가능",
"disabled": "사용불가능",
"info": "상세내역"
"info": "상세내역",
"selectNodes": "선택할 노드 클릭"
},
"menu": {
"label": {
"view": {
"view": "창",
"grid": "눈금선",
"storeZoom": "불러오기 시 확대/축소 복원",
"storePosition": "불러오기 시 스크롤 위치 복원",
"showGrid": "눈금선 보이기",
"snapGrid": "노드 배치 보조 켜기",
"gridSize": "눈금선 크기",
@@ -41,7 +54,9 @@
"defaultDir": "기본",
"ltr": "왼쪽 -> 오른쪽",
"rtl": "오른쪽 -> 왼쪽",
"auto": "자동배분"
"auto": "자동배분",
"language": "언어",
"browserDefault": "브라우저 기본값"
},
"sidebar": {
"show": "우측사이드바 보이기"
@@ -49,18 +64,19 @@
"palette": {
"show": "팔렛트 보이기"
},
"edit": "수정",
"settings": "설정",
"userSettings": "사용자 설정",
"nodes": "노드설정",
"displayStatus": "노드상태 보이기",
"displayConfig": "설정노드 보기",
"displayStatus": "노드 상태 보이기",
"displayConfig": "설정 노드 보기",
"import": "가져오기",
"export": "내보내기",
"search": "플로우 색",
"search": "플로우 색",
"searchInput": "플로우 검색",
"subflows": "보조 플로우",
"createSubflow": "보조 플로우 생성",
"selectionToSubflow": "보조 플로우 선택",
"subflows": "서브 플로우",
"createSubflow": "서브 플로우 생성",
"selectionToSubflow": "서브 플로우 선택",
"flows": "플로우",
"add": "추가",
"rename": "이름변경",
@@ -71,19 +87,43 @@
"editPalette": "팔렛트 관리",
"other": "기타",
"showTips": "Tip 보기",
"showWelcomeTours": "새 버전에 대한 가이드 보기 표시",
"help": "Node-RED 웹사이트",
"projects": "프로젝트",
"projects-new": "신규",
"projects-open": "열기",
"projects-settings": "프로젝트 설정",
"showNodeLabelDefault": "새로 추가된 노드의 라벨 보이기"
"showNodeLabelDefault": "새로 추가된 노드의 라벨 보이기",
"codeEditor": "Code Editor",
"groups": "그룹",
"groupSelection": "그룹 선택",
"ungroupSelection": "그룹 선택 해제",
"groupMergeSelection": "선택 항목 병합",
"groupRemoveSelection": "선택 그룹 제거",
"arrange": "배치",
"alignLeft": "왼쪽으로 정렬",
"alignCenter": "가운데 정렬",
"alignRight": "오른쪽으로 정렬",
"alignTop": "맨 위에 정렬",
"alignMiddle": "맨 위에 정렬",
"alignBottom": "맨 아래 정렬",
"distributeHorizontally": "수평으로 배치",
"distributeVertically": "수직으로 배치",
"moveToBack": "맨 뒤로 이동",
"moveToFront": "맨 앞으로 이동",
"moveBackwards": "뒤로 이동",
"moveForwards": "앞으로 이동"
}
},
"actions": {
"toggle-navigator": "네비게이터 표시/비표시",
"zoom-out": "축소하기",
"zoom-reset": "확대/축소 초기화",
"zoom-in": "확대하기"
"zoom-in": "확대하기",
"search-flows": "플로우 찾기",
"search-prev": "이전",
"search-next": "다음",
"search-counter": "\"__term__\" __result__ of __count__"
},
"user": {
"loggedInAs": "__name__ 에 로그인됨",
@@ -99,12 +139,17 @@
}
},
"notification": {
"state": {
"flowsStopped": "플로우 중지됨",
"flowsStarted": "플로우 시작됨"
},
"warning": "<strong>경고</strong>: __message__",
"warnings": {
"undeployedChanges": "변경사항 배포가 취소되었습니다",
"nodeActionDisabled": "노드 실행이 비활성화 되었습니다",
"nodeActionDisabledSubflow": "보조 플로우에서 노드 실행이 비활성화 되었습니다",
"missing-types": "<p>타입이 없는 노드로인해 플로우가 중지되었습니다</p>",
"missing-modules": "<p>누락된 모듈로 인해 플로우가 중지되었습니다.</p>",
"safe-mode": "<p>[안전모드] 플로우가 정지되었습니다.</p><p>플로우의 수정과 배포가 가능합니다. 다시 배포버튼을 누르세요.</p>",
"restartRequired": "업그레이드한 모듈을 유효화하기 위해 Node-RED를 재시작 합니다 ",
"credentials_load_failed": "<p>인증정보 복호화에 실패하여 플로우가 멈췄습니다. </p><p>인증정보는 암호화 되어있습니다. 프로젝트의 암호화 키가 깨졌거나 정상적이지 않습니다.</p>",
@@ -132,7 +177,12 @@
"updated": "'__project__'가 변경 되었습니다",
"pull": "'__project__'를 다시 가져왔습니다",
"revert": "'__project__'를 취소했습니다",
"merge-complete": "Git 병합이 완료되었습니다"
"merge-complete": "Git 병합이 완료되었습니다",
"setupCredentials": "자격 증명 설정",
"setupProjectFiles": "프로젝트 파일 설정",
"no": "취소",
"createDefault": "기본 프로젝트 파일 만들기",
"mergeConflict": "병합 충돌 표시"
},
"label": {
"manage-project-dep": "프로젝트 의존성 관리",
@@ -141,7 +191,8 @@
"create-default-package": "기본 패키지 파일 생성",
"no-thanks": "괜찮습니다",
"create-default-project": "기본 프로젝트 파일 생성",
"show-merge-conflicts": "병합 충돌 보여주기"
"show-merge-conflicts": "병합 충돌 보여주기",
"unknownNodesButton": "알 수 없는 노드 검색"
}
},
"clipboard": {
@@ -151,10 +202,14 @@
"node_plural": "__count__ 개의 노드",
"configNode": "__count__ 개의 설정 노드",
"configNode_plural": "__count__ 개의 설정 노드",
"group": "__count__ 개의 그룹",
"group_plural": "__count__ 개의 그룹",
"flow": "__count__ 개의 플로우",
"flow_plural": "__count__ 개의 플로우",
"subflow": "__count__ 개의 서브 플로우",
"subflow_plural": "__count__ 개의 서브 플로우",
"replacedNodes": "__count__ 개의 교체된 노드",
"replacedNodes_plural": "__count__ 개의 교체된 노드",
"pasteNodes": "여기에 노드를 붙여넣기 하세요",
"selectFile": "불러올 파일을 선택하세요",
"importNodes": "노드 불러오기",
@@ -162,28 +217,46 @@
"download": "다운로드",
"importUnrecognised": "알 수 없는 형식 :",
"importUnrecognised_plural": "알 수 없는 형식 :",
"importDuplicate": "가져온 중복 노드:",
"importDuplicate_plural": "가져온 중복 노드:",
"nodesExported": "클립보드에 노드 내보내기",
"nodesImported": "불러오기 : ",
"nodeCopied": "__count__개의 노드가 복사 되었습니다",
"nodeCopied_plural": "__count__개의 노드가 복사 되었습니다",
"nodeCopied": "__count__개의 노드가 복사되었습니다",
"nodeCopied_plural": "__count__개의 노드가 복사되었습니다",
"groupCopied": "__count__ 개의 그룹이 복사되었습니다",
"groupCopied_plural": "__count__ 개의 그룹이 복사되었습니다",
"groupStyleCopied": "그룹 스타일이 복사되었습니다",
"invalidFlow": "정상적지 않은 플로우 : __message__",
"recoveredNodes": "복구된 노드",
"recoveredNodesInfo": "이 플로우의 노드를 가져올 때 유효한 플로우 ID가 누락되었습니다. 해당 플로우에 추가되었으므로 복원하거나 삭제할 수 있습니다.",
"recoveredNodesNotification": "<p>유효하지 않은 플로우 ID를 가진 노드입니다.</p><p>'__flowName__' 라는 플로우에 추가되었습니다.</p>",
"export": {
"selected": "선택된 노드",
"current": "현재 플로우",
"all": "모든 플로우",
"compact": "압축형식",
"formatted": "서식유지",
"copy": "클립보드로 내보내기"
"copy": "클립보드로 내보내기",
"export": "라이브러리로 내보내기",
"exportAs": "내보내기",
"overwrite": "확인",
"exists": "<p><b>\"__file__\"</b> 이미 존재합니다.</p><p>교체하시겠습니까?</p>"
},
"import": {
"import": "가져올 위치 : ",
"importSelected": "선택 항목 가져오기",
"importCopy": "사본 가져오기",
"viewNodes": "노드 보기...",
"newFlow": "새로운 플로우",
"replace": "교체",
"errors": {
"notArray": "입력이 JSON 배열이 아닙니다",
"itemNotObject": "입력이 올바른 플로우가 아닙니다 - __index__는 노드 오브젝트가 아닙니다",
"missingId": "입력이 올바른 플로우가 아닙니다 - __index__의 'id' 속성이 없습니다",
"missingType": "입력이 올바른 플로우가 아닙니다 - __index__의 'type' 속성이 없습니다"
}
},
"conflictNotification1": "가져오는 노드 중 일부가 이미 작업 공간에 있습니다..",
"conflictNotification2": "가져올 노드와 기존 노드를 바꿀지 아니면 복사본을 가져올지 선택합니다."
},
"copyMessagePath": "Path가 복사 되었습니다",
"copyMessageValue": "Value가 복사 되었습니다",
@@ -197,13 +270,19 @@
"modifiedFlowsDesc": "변경사항이 있는 플로우만 배포합니다",
"modifiedNodes": "변경된 노드",
"modifiedNodesDesc": "변경사항이 있는 노드만 배포합니다",
"startFlows": "시작",
"startFlowsDesc": "플로우를 시작합니다",
"stopFlows": "중지",
"stopFlowsDesc": "플로우를 중지합니다",
"restartFlows": "플로우 재시작",
"restartFlowsDesc": "현재 배포된 플로우를 재시작합니다",
"successfulDeploy": "배포가 성공했습니다",
"successfulRestart": "플로우 재시작을 성공했습니다",
"deployFailed": "배포 실패 : __message__",
"unusedConfigNodes": "사용되지 않는 설정노드가 있습니다",
"unusedConfigNodesLink": "여기를 클릭하면 볼 수 있습니다",
"unusedConfigNodesButton":"사용하지 않는 구성 노드 검색",
"unknownNodesButton":"알 수 없는 노드 검색",
"invalidNodesButton":"잘못된 노드 검색",
"errors": {
"noResponse": "서버의 응답이 없습니다"
},
@@ -263,6 +342,7 @@
"newVersionError": "New Version의 JSON 형식이 올바르지 않습니다 :"
},
"subflow": {
"editSubflowInstance": "서브 플로우 인스턴스 수정: __name__",
"editSubflow": "플로우 템플릿 수정 : __name__",
"edit": "플로우 템플릿 수정",
"subflowInstances": "서브 플로우 템플릿에 __count__개의 인스턴스가 있습니다",
@@ -270,14 +350,39 @@
"editSubflowProperties": "속성 수정",
"input": "입력:",
"output": "출력:",
"status": "상태 노드",
"deleteSubflow": "서브 플로우 삭제",
"confirmDelete": "서브 플로우를 삭제하시겠습니까?",
"info": "상세내역",
"category": "카테고리",
"module": "모듈",
"license": "라이선스",
"licenseNone": "없음",
"licenseOther": "Other",
"type": "노드",
"version": "버전",
"versionPlaceholder": "x.y.z",
"keys": "키워드",
"keysPlaceholder": "키워드(쉼표로 구분)를 입력해주세요",
"author": "이름",
"authorPlaceholder": "이름 또는 이메일을 입력해주세요",
"desc": "설명",
"env": {
"restore": "서브 플로우 기본값으로 복원",
"remove": "환경 변수 제거"
},
"errors": {
"noNodesSelected": "<strong>서브 플로우를 생성할 수 없습니다</strong> : 노드가 선택되지 않았습니다",
"multipleInputsToSelection": "<strong>서브 플로우를 생성할 수 없습니다</strong> : 복수의 입력이 선택되었습니다"
}
},
"group": {
"editGroup": "그룹 수정: __name__",
"errors": {
"cannotCreateDiffGroups": "다른 그룹의 노드를 사용하여 그룹을 생성할 수 없습니다",
"cannotAddSubflowPorts": "그룹에 서브 플로우 포트를 추가할 수 없습니다"
}
},
"editor": {
"configEdit": "수정",
"configAdd": "추가",
@@ -291,19 +396,20 @@
"addNewType": "__type__의 노드타입 추가 ...",
"nodeProperties": "노드 속성",
"label": "명칭",
"color": "Color",
"portLabels": "포트 설정",
"labelInputs": "입력",
"labelOutputs": "출력",
"settingIcon": "아이콘",
"default": "default",
"noDefaultLabel": "없음",
"defaultLabel": "기본 명칭",
"searchIcons": "아이콘 조회",
"useDefault": "기본설정 사용",
"description": "상세 내역",
"show": "보이기",
"hide": "숨기기",
"errors": {
"scopeChange": "범위를 변경하게 되면 다른 플로우의 노드가 사용이 불가능해 집니다."
"scopeChange": "범위를 변경하게 되면 다른 플로우의 노드가 사용이 불가능해 집니다.",
"invalidProperties": "유효하지 않은 속성:"
}
},
"keyboard": {
@@ -316,10 +422,11 @@
"global": "글로벌",
"workspace": "작업공간",
"selectAll": "모든 노드 선택",
"selectAllConnected": "모든 연결된 노드 선택",
"selectNone": "노드 선택 취소",
"selectAllConnected": "연결된 모든 노드 선택",
"addRemoveNode": "노드 추가/삭제",
"editSelected": "선택된 노드 수정",
"deleteSelected": "선택된 노드 링크 삭제",
"deleteSelected": "선택된 노드 또는 링크 삭제",
"importNode": "노드 불러오기",
"exportNode": "노드 내보내기",
"nudgeNode": "선택된 노드 이동 (1px)",
@@ -329,9 +436,14 @@
"copyNode": "선택된 노드 복사",
"cutNode": "선택된 노드 잘라내기",
"pasteNode": "노드 붙여넣기",
"copyGroupStyle": "그룹 스타일 복사하기",
"pasteGroupStyle": "그룹 스타일 붙여넣기",
"undoChange": "마지막 변경 되돌리기",
"redoChange": "다시 실행하기",
"searchBox": "검색창 열기",
"managePalette": "팔렛트 관리"
"managePalette": "팔렛트 관리",
"actionList": "액션 목록",
"splitWireWithLinks": "링크 노드로 선택 항목 분할"
},
"library": {
"library": "라이브러리",
@@ -339,13 +451,16 @@
"saveToLibrary": "라이브러리로 저장...",
"typeLibrary": "__type__ 라이브러리",
"unnamedType": "이름없는 __type__",
"exportedToLibrary": "노드를 라이브러리로 내보냈습니다.",
"dialogSaveOverwrite": "__libraryType__이 __libraryName__으로 이미 등록되어있습니다. 덮어쓸까요?",
"invalidFilename": "파일명이 올바르지 않습니다",
"savedNodes": "저장된 노드",
"savedType": "저장된 __type__",
"saveFailed": "저장 실패 : __message__",
"newFolder": "새로운 폴더",
"types": {
"examples": "예시"
"local": "로컬",
"examples": "예시"
}
},
"palette": {
@@ -355,9 +470,13 @@
"addCategory": "추가 ...",
"label": {
"subflows": "서브 플로우",
"network": "네트워크",
"common": "일반",
"input": "입력",
"output": "출력",
"function": "기능",
"sequence": "sequence",
"parser": "parser",
"social": "소셜",
"storage": "저장",
"analysis": "분석",
@@ -376,7 +495,8 @@
"nodeEnabled_plural": "노드가 활성화 되었습니다:",
"nodeDisabled": "노드가 비활성화 되었습니다:",
"nodeDisabled_plural": "노드가 비활성화 되었습니다:",
"nodeUpgraded": "__module__ 노드모듈이 __version__으로 업그레이드 되었습니다"
"nodeUpgraded": "__module__ 노드모듈이 __version__으로 업그레이드 되었습니다",
"unknownNodeRegistered": "Error loading node: <ul><li>__type__<br>__error__</li></ul>"
},
"editor": {
"title": "팔렛트 관리",
@@ -423,6 +543,8 @@
"sortAZ": "a-z",
"sortRecent": "최근",
"more": "+ __count__ 개 더 보기",
"upload": "Upload module tgz file",
"refresh": "모듈 목록 새로 고침",
"errors": {
"catalogLoadFailed": "<p>노드 카탈로그를 설치하지 못했습니다.</p><p>브라우저 콘솔로그를 참고하세요.</p>",
"installFailed": "<p>설치 실패 : __module__</p><p>__message__</p><p>브라우저 콘솔로그를 참고하세요.</p>",
@@ -463,6 +585,7 @@
"label": "정보",
"node": "노드",
"type": "타입",
"group": "Group",
"module": "모듈",
"id": "ID",
"status": "상태",
@@ -485,7 +608,23 @@
"nodeHelp": "노드 도움말",
"none": "없음",
"arrayItems": "__count__ 개의 항목",
"showTips": "설정에서 도움말을 열 수 있습니다. "
"showTips": "설정에서 도움말을 열 수 있습니다. ",
"outline": "개요",
"empty": "비우기",
"globalConfig": "전역 설정 노드",
"triggerAction": "트리거 작업",
"find": "작업 공간에서 찾기"
},
"help": {
"name": "도움말",
"label": "도움말",
"search": "도움말 검색",
"nodeHelp": "노드 도움말 보기",
"showHelp": "도움말 보기",
"showInOutline": "요약 보기",
"showTopics": "토픽 보기",
"noHelp": "선택한 도움말 항목이 없습니다",
"changeLog": "릴리즈 정보"
},
"config": {
"name": "노드 설정",
@@ -495,7 +634,9 @@
"subflows": "보조 플로우",
"flows": "플로우",
"filterAll": "전체",
"showAllConfigNodes": "모든 설정 노드 보기",
"filterUnused": "미사용",
"showAllUnusedConfigNodes": "사용하지 않는 모든 설정 노드 보기",
"filtered": "__count__ 개 숨김"
},
"context": {
@@ -506,8 +647,11 @@
"empty": "공백",
"node": "노드",
"flow": "플로우",
"global": "Global",
"deleteConfirm": "정말로 이 아이템을 지우시겠습니까?"
"global": "글로벌",
"deleteConfirm": "정말로 이 아이템을 지우시겠습니까?",
"autoRefresh": "선택 변경 시 새로 고침",
"refrsh": "새로고침",
"delete": "삭제"
},
"palette": {
"name": "팔레트 관리",
@@ -522,6 +666,7 @@
"noSummaryAvailable": "요약 없음",
"editDescription": "프로젝트 상세내역 수정",
"editDependencies": "프로젝트 의존성 수정",
"noDescriptionAvailable": "설명 없음",
"editReadme": "README.md 수정",
"showProjectSettings": "프로젝트 설정 보이기",
"projectSettings": {
@@ -534,6 +679,10 @@
"files": "파일",
"flow": "플로우",
"credentials": "인증정보",
"package": "Package",
"packageCreate": "변경 내용이 저장될 때 파일이 생성됩니다",
"fileNotExist": "파일이 존재하지 않습니다",
"selectFile": "파일 선택",
"invalidEncryptionKey": "잘못된 암호화 키",
"encryptionEnabled": "암호화 활성화",
"encryptionDisabled": "암호화 비활성화",
@@ -671,15 +820,29 @@
"bin": "buffer",
"date": "timestamp",
"jsonata": "expression",
"env": "env variable"
"env": "env variable",
"cred": "credential"
}
},
"editableList": {
"add": "추가"
"add": "추가",
"addTitle": "add an item"
},
"search": {
"history": "Search history",
"clear": "clear all",
"empty": "결과 없음",
"addNode": "노드 추가 ..."
"addNode": "노드 추가 ...",
"options": {
"configNodes": "설정 노드",
"unusedConfigNodes": "사용되지 않는 설정 노드",
"invalidNodes": "잘못된 노드",
"uknownNodes": "알 수 없는 노드",
"unusedSubflows": "사용되지 않는 서브 플로우",
"hiddenFlows": "숨겨진 플로우",
"modifiedNodes": "수정된 노드 및 플로우",
"thisFlow": "현재 플로우"
}
},
"expressionEditor": {
"functions": "기능",
@@ -700,15 +863,36 @@
"eval": "형식 오류 :\n __message__"
}
},
"monaco": {
"setTheme": "테마 설정"
},
"jsEditor": {
"title": "자바스크립트 에디터"
},
"textEditor": {
"title": "텍스트 에디터"
},
"jsonEditor": {
"title": "JSON 에디터",
"format": "JSON 형식"
"format": "JSON 형식",
"rawMode": "JSON 수정",
"uiMode": "비주얼 편집기",
"rawMode-readonly": "JSON",
"uiMode-readonly": "비주얼",
"insertAbove": "위로 삽입",
"insertBelow": "아래로 삽입",
"addItem": "속성 추가",
"copyPath": "속성의 키값 복사",
"expandItems": "속성 펼치기",
"collapseItems": "속성 접기",
"duplicate": "복사",
"error": {
"invalidJSON": "비유효한 JSON: "
}
},
"markdownEditor": {
"title": "Markdown 에디터",
"expand": "Expand",
"format": "Markdown 형식",
"heading1": "제목 레벨1",
"heading2": "제목 레벨2",
@@ -738,6 +922,7 @@
"desc2": "이 기능을 건너뛰어도 상관없습니다. 언제든지 프로젝트 메뉴에서 첫번째 프로젝트를 만들 수 있습니다.",
"create": "프로젝트 생성",
"clone": "프로젝트 복제",
"openExistingProject": "기존 프로젝트 열기",
"not-right-now": "나중에"
},
"git-config": {
@@ -855,7 +1040,8 @@
"not-git": "git 저장소가 아닙니다",
"no-resource": "저장소아 없습니다",
"cant-get-ssh-key-path": "에러! 선택한 SSH키 경로를 가져올 수 없습니다.",
"unexpected_error": "예기치 않은 에러"
"unexpected_error": "예기치 않은 에러",
"clearContext": "프로젝트 전환 시 context 삭제"
},
"delete": {
"confirm": "프로젝트를 정말 지우시겠습니까?"
@@ -894,7 +1080,26 @@
},
"editor-tab": {
"properties": "속성",
"envProperties": "환경 변수",
"module": "모듈 속성",
"description": "상세 내역",
"appearance": "모양"
"appearance": "모양",
"preview": "UI 프리뷰",
"defaultValue": "기본값"
},
"tourGuide": {
"takeATour": "둘러보기",
"start": "시작",
"next": "다음",
"welcomeTours": "버전 별 릴리즈 정보"
},
"diagnostics": {
"title": "시스템 정보"
},
"contextMenu": {
"insert": "삽입",
"node": "노드",
"junction": "접합",
"linkNodes": "링크 노드"
}
}

View File

View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,23 @@
{
"info": {
"tip0": "Você pode remover os nós ou links selecionados com {{core:delete-selection}}",
"tip1": "Procure por nós usando {{core:search}}",
"tip2": "{{core:toggle-sidebar}} irá alternar a visualização desta barra lateral",
"tip3": "Você pode gerenciar sua paleta de nós com {{core:manage-palette}}",
"tip4": "Seus nós de configuração de fluxo são listados no painel da barra lateral. Pode ser acessado a partir do menu ou com{{core:show-config-tab}}",
"tip5": "Habilite ou desabilite essas dicas na opção nas configurações",
"tip6": "Mova os nós selecionados usando o [left] [up] [down] e [right] chaves. Segure [shift] para empurrá-los ainda mais",
"tip7": "Arrastar um nó para um fio o unirá no link",
"tip8": "Exporte os nós selecionados ou a guia atual com {{core:show-export-dialog}}",
"tip9": "Importe um fluxo arrastando seu JSON para o editor ou com {{core:show-import-dialog}}",
"tip10": "[shift] [click] e arraste em uma porta de nó para mover todos os fios conectados ou apenas o selecionado",
"tip11": "Mostre a guia Informações com {{core:show-info-tab}} ou a guia Depurar com {{core:show-debug-tab}}",
"tip12": "[ctrl] [click] na área de trabalho para abrir a caixa de diálogo de adição rápida",
"tip13": "Mantenha pressionado [ctrl] enquanto você [click] em uma porta de nó para habilitar a ligação rápida",
"tip14": "Mantenha pressionado [shift] enquanto você [click] em um nó para também selecionar todos os seus nós conectados",
"tip15": "Mantenha pressionado [ctrl] enquanto você [click] em um nó para adicioná-lo ou removê-lo da seleção atual",
"tip16": "Alternar guias de fluxo com {{core:show-previous-tab}} e {{core:show-next-tab}}",
"tip17": "Você pode confirmar suas alterações na bandeja de edição do nó com {{core:confirm-edit-tray}} ou cancele-os com {{core:cancel-edit-tray}}",
"tip18": "Pressionando {{core:edit-selected-node}} irá editar o primeiro nó na seleção atual"
}
}

View File

@@ -0,0 +1,274 @@
{
"$string": {
"args": "arg[, prettify]",
"desc": "Converte o tipo do parâmetro `arg` em uma cadeia de caracteres usando as seguintes regras de conversão de tipo:\n\n - Cadeia de caracteres não são alteradas\n - As funções são convertidas para uma cadeia de caracteres vazia\n - os tipos numérico infinito e NaN geram um erro porque não podem ser representados como um número JSON\n - Todos os outros valores são convertidos para uma cadeia de caracteres JSON usando a função `JSON.stringify`. Se `prettify` for verdadeira, então o JSON \"prettified\" é produzido. Isto é, uma linha por campo e as linhas serão indentadas com base na profundidade do campo."
},
"$length": {
"args": "str",
"desc": "Retorna o número de caracteres na cadeia de caracteres `str`. Um erro é gerado se `str` não for uma cadeia de caracteres."
},
"$substring": {
"args": "str, start[, length]",
"desc": "Retorna uma cadeia de caracteres contendo os caracteres no primeiro parâmetro `str` começando na posição `start` (deslocamento zero). Se` length` for especificado, então a sub cadeia de caracteres conterá o máximo `length` de caracteres. Se` start` for negativo isso indica o número de caracteres a partir do fim de `str`."
},
"$substringBefore": {
"args": "str, chars",
"desc": "Retorna a sub cadeia de caracteres antes da primeira ocorrência da sequência de caracteres `chars` em `string`. Se` string` não contiver `chars`, então retorna `str`. "
},
"$substringAfter": {
"args": "str, chars",
"desc": "Retorna a sub cadeia de caracteres após a primeira ocorrência da sequência de caracteres `chars` em `string`. Se `string` não contiver `chars`, então retorna `str`. "
},
"$uppercase": {
"args": "str",
"desc": "Retorna uma cadeia de caracteres com todos os caracteres de `string` convertidos em maiúsculas. "
},
"$lowercase": {
"args": "str",
"desc": "Retorna uma cadeia de caracteres com todos os caracteres de `string` convertidos em minúsculas. "
},
"$trim": {
"args": "str",
"desc": "Normaliza e retira todos os caracteres de espaço em branco em `str` aplicando as seguintes etapas:\n\n - Todas as tabulações, retornos de carro e avanços de linha são substituídos por espaços.\n- Sequências contíguas de espaços são reduzidas a um único espaço.\n- Espaços à direita e à esquerda são removidos.\n\n Se `str` não for especificado (isto é, esta função é chamada sem argumentos), então o valor do contexto é usado como o valor de `str`. Um erro é gerado se `str` não for uma cadeia de caracteres."
},
"$contains": {
"args": "str, pattern",
"desc": "Retorna `true` se `str` tiver correspondente em `pattern`, caso contrário, retorna `false`. Se `str` não for especificado (isto é, esta função é chamada com um argumento), então o valor do contexto é usado como o valor de `str`. O parâmetro `pattern` pode ser uma cadeia de caracteres ou uma expressão regular. "
},
"$split": {
"args": "str[, separator][, limit]",
"desc": "Divide o parâmetro `str` em uma matriz de sub cadeia de caracteres. É um erro se `str` não for uma cadeia de caracteres. O parâmetro opcional `separator` especifica os caracteres dentro de `str` sobre os quais devem ser divididos como uma cadeia de caracteres ou expressão regular. Se `separator` não for especificado, a cadeia de caracteres vazia será assumida e `str` será dividido em uma matriz de caracteres únicos. É um erro se `separador` não for uma cadeia de caracteres. O parâmetro opcional `limit` é um número que especifica o número máximo de sub cadeia de caracteres a serem incluídas na matriz resultante. Quaisquer sub cadeia de caracteres adicionais são descartadas. Se `limit` não for especificado, então `str` será totalmente dividido sem limite para o tamanho da matriz resultante . É um erro se `limit` não for um número não negativo."
},
"$join": {
"args": "array[, separator]",
"desc": "Une uma matriz de cadeias de caracteres de componentes em uma única cadeia de caracteres concatenada com cada cadeia de caracteres de componente separada pelo parâmetro opcional `separator`. É um erro se a `matriz` de entrada contiver um item que não seja uma cadeia de caracteres. Se `separator` for não especificado, assume-se que é uma cadeia de caracteres vazia, ou seja, nenhum `separator` entre as cadeias de caracteres do componente. É um erro se `separator` não for uma cadeia de caracteres. "
},
"$match": {
"args": "str, pattern [, limit]",
"desc": "Aplica a cadeia de caracteres `str` à expressão regular `pattern` e retorna uma matriz de objetos, com cada objeto contendo informações sobre cada ocorrência de uma correspondência dentro de `str`. "
},
"$replace": {
"args": "str, pattern, replacement [, limit]",
"desc": "Encontra ocorrências de `pattern` dentro de `str` e as substitui por `replacement`.\n\nO parâmetro opcional `limit` é o número máximo de substituições."
},
"$now": {
"args":"$[picture [, timezone]]",
"desc":"Gera um carimbo de data/hora em formato compatível com ISO 8601 e o retorna como uma cadeia de caracteres. Se os parâmetros opcionais de imagem e fuso horário forem fornecidos, o carimbo de data/hora atual é formatado conforme descrito pela função `$ fromMillis ()`"
},
"$base64encode": {
"args":"string",
"desc":"Converte uma cadeia de caracteres ASCII em uma representação de base 64. Cada caractere na cadeia de caracteres é tratado como um byte de dados binários. Isso requer que todos os caracteres na cadeia de caracteres estejam no intervalo de 0x00 a 0xFF, o que inclui todos os caracteres em cadeias de caracteres codificadas em URI. Caracteres Unicode fora desse intervalo não são suportados."
},
"$base64decode": {
"args":"string",
"desc":"Converte bytes codificados de base 64 em uma cadeia de caracteres, usando uma página de código UTF-8 Unicode."
},
"$number": {
"args": "arg",
"desc": "Converte o parâmetro `arg` em um número usando as seguintes regras de conversão:\n\n - Os números permanecem inalterados\n - Cadeias de caracteres que contêm uma sequência de caracteres que representam um número JSON válido são convertidos para esse número\n - Todos os outros valores causam a geração de um erro."
},
"$abs": {
"args":"number",
"desc":"Retorna o valor absoluto do parâmetro `number`."
},
"$floor": {
"args":"number",
"desc":"Retorna o valor de `number` arredondado para baixo para o inteiro mais próximo que seja menor ou igual a `number`."
},
"$ceil": {
"args":"number",
"desc":"Retorna o valor de `number` arredondado para o número inteiro mais próximo que é maior ou igual a `number`."
},
"$round": {
"args":"number [, precision]",
"desc":"Retorna o valor do parâmetro `number` arredondado para o número de casas decimais especificado pelo parâmetro opcional `precision`."
},
"$power": {
"args":"base, exponent",
"desc":"Retorna o valor de `base` elevado à potência de `exponent`."
},
"$sqrt": {
"args":"number",
"desc":"Retorna a raiz quadrada do valor do parâmetro `number`."
},
"$random": {
"args":"",
"desc":"Retorna um número pseudoaleatório maior ou igual a zero e menor que um."
},
"$millis": {
"args":"",
"desc":"Retorna o número de milissegundos desde o Unix Epoch (1º de janeiro de 1970 UTC) como um número. Todas as invocações de `$ millis ()` dentro de uma avaliação de uma expressão retornarão todas o mesmo valor."
},
"$sum": {
"args": "array",
"desc": "Retorna a soma aritmética de uma `array` de números. É um erro se o `array` de entrada contiver um item que não seja um número."
},
"$max": {
"args": "array",
"desc": "Retorna o número máximo em uma `array` de números. É um erro se o `array` de entrada contiver um item que não seja um número."
},
"$min": {
"args": "array",
"desc": "Retorna o número mínimo em uma `array` de números. É um erro se o `array` de entrada contiver um item que não seja um número."
},
"$average": {
"args": "array",
"desc": "Retorna o valor médio de uma `array` de números. É um erro se o `array` de entrada contiver um item que não seja um número."
},
"$boolean": {
"args": "arg",
"desc": "Converte o argumento em um booliano usando as seguintes regras:\n\n - `Boolean` : inalterado\n - `string`: vazio : `false`\n - `string`: não-vazio : `true`\n - `number`: `0` : `false`\n - `number`: não-zero : `true`\n - `null` : `false`\n - `array`: vazio : `false`\n - `array`: contém um membro que converte de tipo para `true` : `true`\n - `array`: todos os membros convertidos de tipo para `false` : `false`\n - `object`: vazio : `false`\n - `object`: não-vazio : `true`\n - `function` : `false`"
},
"$not": {
"args": "arg",
"desc": "Retorna booliano NOT no argumento. `Arg` é convertido de tipo primeiro para um booliano "
},
"$exists": {
"args": "arg",
"desc": "Retorna booliano `true` se a expressão `arg` for avaliada como um valor, ou `false` se a expressão não corresponder a nada (por exemplo, um caminho para uma referência de campo inexistente)."
},
"$count": {
"args": "array",
"desc": "Retorna o número de itens na matriz"
},
"$append": {
"args": "array, array",
"desc": "Anexa duas matrizes"
},
"$sort": {
"args":"array [, function]",
"desc":"Retorna uma matriz contendo todos os valores no parâmetro `array`, mas classificados em ordem.\n\nSe um comparador `function` for fornecido, então deve ser uma função que leva dois parâmetros:\n\n`function(left, right)`\n\nEsta função é invocada pelo algoritmo de classificação para comparar dois valores à esquerda e à direita. Se o valor de esquerda deve ser colocado após o valor de direita na ordem de classificação desejada, a função deve retornar o booliano `true` para indicar uma troca. Caso contrário, deve retornar `false`."
},
"$reverse": {
"args":"array",
"desc":"Retorna uma matriz contendo todos os valores do parâmetro `array`, mas na ordem reversa. "
},
"$shuffle": {
"args":"array",
"desc":"Retorna uma matriz contendo todos os valores do parâmetro `array`, mas misturados em ordem aleatória. "
},
"$zip": {
"args":"array, ...",
"desc":"Retorna uma matriz convolucional (compactada) contendo matrizes agrupadas de valores dos argumentos `array1`… `arrayN` do índice 0, 1, 2 ...."
},
"$keys": {
"args": "object",
"desc": "Retorna uma matriz contendo as chaves do objeto. Se o argumento for uma matriz de objetos, então a matriz retornada contém uma lista não duplicada de todas as chaves em todos os objetos."
},
"$lookup": {
"args": "object, key",
"desc": "Retorna o valor associado à chave no objeto. Se o primeiro argumento for uma matriz de objetos, todos os objetos na matriz são pesquisados e os valores associados a todas as ocorrências da chave são retornados."
},
"$spread": {
"args": "object",
"desc": "Divide um objeto que contém pares de chave/valor em uma matriz de objetos, cada um com um único par de chave/valor do objeto de entrada. Se o parâmetro for uma matriz de objetos, a matriz resultante conterá um objeto para cada par de chave/valor em todo objeto na matriz fornecida. "
},
"$merge": {
"args": "array&lt;object&gt;",
"desc": "Mescla uma matriz de `objects` em um único `object` contendo todos os pares de chave/valor de cada um dos objetos na matriz de entrada. Se qualquer um dos objetos de entrada contiver a mesma chave, então o `object` retornado conterá o valor do último na matriz. É um erro se a matriz de entrada contiver um item que não seja um objeto."
},
"$sift": {
"args":"object, function",
"desc": "Retorna um objeto que contém apenas os pares de chave/valor do parâmetro `object` que satisfazem o predicado `function` passado como o segundo parâmetro.\n\nA `function` que é fornecida como o segundo parâmetro deve ter o seguinte assinatura:\n\n`function(value [, key [, object]])`"
},
"$each": {
"args":"object, function",
"desc":"Retorna uma matriz contendo os valores retornados por `function` quando aplicado a cada par chave/valor no `object`."
},
"$map": {
"args":"array, function",
"desc":"Retorna uma matriz contendo os resultados da aplicação do parâmetro `function` a cada valor no parâmetro `array`.\n\nA `function` que é fornecido como o segundo parâmetro deve ter a seguinte assinatura:\n\n`function(value [, index [, array]])`"
},
"$filter": {
"args":"array, function",
"desc":"Retorna uma matriz contendo apenas os valores no parâmetro `array` que satisfazem o predicado `function`.\n\nThe `function` que é fornecido como o segundo parâmetro deve ter a seguinte assinatura:\n\n`function(value [, index [, array]])`"
},
"$reduce": {
"args":"array, function [, init]",
"desc":"Retorna um valor agregado derivado da aplicação do parâmetro `function` sucessivamente a cada valor em `array` em combinação com o resultado da aplicação anterior da função.\n\nA função deve aceitar dois argumentos e se comportar como um operador inserido entre cada valor dentro de `array`. A assinatura da `function` deve estar no formato: `myfunc($accumulator, $value[, $index[, $array]])`\n\nO parâmetro opcional `init` é usado como o valor inicial na agregação."
},
"$flowContext": {
"args": "string[, string]",
"desc": "Recupera uma propriedade de contexto de fluxo.\n\nEsta é uma função definida pelo Node-RED. "
},
"$globalContext": {
"args": "string[, string]",
"desc": "Recupera uma propriedade de contexto global.\n\nEsta é uma função definida pelo Node-RED. "
},
"$pad": {
"args": "string, width [, char]",
"desc": "Retorna uma cópia da `string` com preenchimento extra, se necessário, de forma que seu número total de caracteres seja pelo menos o valor absoluto do parâmetro `width`.\n\nSe `width` for um número positivo, a cadeia de caracteres será preenchida à direita; se negativo, é preenchida à esquerda.\n\nO argumento opcional `char` especifica os caracteres de preenchimento a serem usados. Se não for especificado, o padrão é o caractere de espaço. "
},
"$fromMillis": {
"args": "number, [, picture [, timezone]]",
"desc": "Converta o `number` que representa os milissegundos desde a época do Unix (1 January, 1970 UTC) em uma representação de cadeia de caracteres formatada do carimbo de data/hora conforme especificado pela cadeia de caracteres de imagem.\n\nSe o parâmetro opcional `image` for omitido, o carimbo de data/hora será formatado no formato ISO 8601.\n\nSe a cadeia de caracteresopcional `picture` for fornecida, o carimbo de data/hora é formatado de acordo com a representação especificada nessa cadeia de caracteres. O comportamento desta função é consistente com a versão de dois argumentos da função XPath/XQuery `format-dateTime` conforme definido na especificação XPath F&O 3.1. O parâmetro de cadeia de caracteres de imagem define como o carimbo de data/hora é formatado e tem a mesma sintaxe de `format-dateTime`.\n\nSe a cadeia de caracteres opcional `timezone` for fornecida, o carimbo de data/hora formatado estará nesse fuso horário. A cadeia de caracteres `timezone` deve estar no formato '± HHMM', onde ± é o sinal de mais ou menos e HHMM é o deslocamento em horas e minutos do UTC. Deslocamento positivo para fusos horários a leste do UTC, deslocamento negativo para fusos horários a oeste do UTC. "
},
"$formatNumber": {
"args": "number, picture [, options]",
"desc": "Converte o tipo de `number` em uma cadeia de caracteres e o formata em uma representação decimal conforme especificado pela cadeia de caracteres `picture`.\n\n O comportamento desta função é consistente com a função XPath/XQuery fn: format-number conforme definido na especificação XPath F&O 3.1. O parâmetro de cadeia de caracteres de imagem define como o número é formatado e tem a mesma sintaxe de fn: format-number.\n\nO terceiro argumento opcional `options` é usado para substituir os caracteres de formatação específicos da localidade padrão, como o separador decimal. Se fornecido, este argumento deve ser um objeto contendo pares de nome/valor especificados na seção de formato decimal da especificação XPath F&O 3.1."
},
"$formatBase": {
"args": "number [, radix]",
"desc": "Converte o `number` em uma cadeia de caracteres e o formata em um inteiro representado na base do número especificada pelo argumento `radix`. Se `radix` não for especificado, o padrão é a base 10. `radix` pode estar entre 2 e 36, caso contrário, um erro será gerado. "
},
"$toMillis": {
"args": "timestamp",
"desc": "Converta o tipo de uma cadeia de caracteres `timestamp` no formato ISO 8601 para o número de milissegundos desde a época do Unix (1 January, 1970 UTC) como um número. Um erro é gerado se a cadeia de caracteres não estiver no formato correto. "
},
"$env": {
"args": "arg",
"desc": "Retorna o valor de uma variável de ambiente.\n\nEsta é uma função definida pelo Node-RED."
},
"$eval": {
"args": "expr [, context]",
"desc": "Analisa e avalia a cadeia de caracteres `expr` que contém um JSON literal ou uma expressão JSONata usando o contexto atual como o contexto para avaliação. "
},
"$formatInteger": {
"args": "number, picture",
"desc": "Converte o tipo de `number` em uma cadeia de caracteres e o formata em uma representação inteira conforme especificado pela cadeia de caracteres `picture`. O parâmetro da cadeia de caracteres de imagem define como o número é formatado e tem a mesma sintaxe de `fn: format-integer` do Especificação XPath F&O 3.1. "
},
"$parseInteger": {
"args": "string, picture",
"desc": "Examina e troca o conteúdo do parâmetro `string` para um inteiro (como um número JSON) usando o formato especificado pela cadeia de caracteres `picture`. O parâmetro da cadeia de caracteres `picture` tem o mesmo formato que `$ formatInteger`."
},
"$error": {
"args": "[str]",
"desc": "Gera um erro com uma mensagem. O (parâmetro) opcional `str` substituirá a mensagem padrão de `$error() function evaluated`"
},
"$assert": {
"args": "arg, str",
"desc": "Se `arg` for verdadeiro, a função retorna indefinido. Se `arg` for falso, uma exceção é gerada com `str` como a mensagem da exceção. "
},
"$single": {
"args": "array, function",
"desc": "Retorna o único valor no parâmetro `array` que satisfaz o predicado `function` (isto é, O (parâmetro) `function` retorna o booliano `true` quando passado o valor). Gera uma exceção se o número de valores correspondentes não for exatamente um .\n\nA função deve ser fornecida na seguinte assinatura: `function(value [, index [, array]])` onde 'value' é cada entrada da matriz, 'index' é a posição desse valor e toda a matriz é passada como o terceiro argumento"
},
"$encodeUrlComponent": {
"args": "str",
"desc": "Codifica um componente Localizador Uniforme de Recursos (URL) substituindo cada instância de certos caracteres por uma, duas, três ou quatro sequências de escape que representam a codificação UTF-8 do caractere.\n\nExemplo: `$encodeUrlComponent(\"?x=test\")` => `\"%3Fx%3Dtest\"`"
},
"$encodeUrl": {
"args": "str",
"desc": "Codifica um Localizador Uniforme de Recursos (URL) substituindo cada instância de certos caracteres por uma, duas, três ou quatro sequências de escape que representam a codificação UTF-8 do caractere. \n\nExemplo: `$encodeUrl(\"https://mozilla.org/?x=шеллы\")` => `\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\"`"
},
"$decodeUrlComponent": {
"args": "str",
"desc": "Decodifica um componente Localizador Uniforme de Recursos (URL) criado anteriormente por encodeUrlComponent. \n\nExemplo: `$decodeUrlComponent(\"%3Fx%3Dtest\")` => `\"?x=test\"`"
},
"$decodeUrl": {
"args": "str",
"desc": "Decodifica um Localizador Uniforme de Recursos (URL) criado anteriormente por encodeUrl. \n\nExemplo: `$decodeUrl(\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\")` => `\"https://mozilla.org/?x=шеллы\"`"
},
"$distinct": {
"args": "array",
"desc": "Retorna uma matriz com valores duplicados removidos da `array` "
},
"$type": {
"args": "value",
"desc": "Retorna o tipo de `value` como uma cadeia de caracteres. Se `value` for indefinido, retornará `undefined` "
},
"$moment": {
"args": "[str]",
"desc": "Obtém um objeto de dados usando a biblioteca 'Moment'."
}
}

27
packages/node_modules/@node-red/editor-client/locales/ru/editor.json vendored Executable file → Normal file
View File

@@ -183,7 +183,8 @@
"create-default-package": "Создать файл пакета по умолчанию",
"no-thanks": "Нет, спасибо",
"create-default-project": "Создать файлы проекта по умолчанию",
"show-merge-conflicts": "Показать конфликты слияния"
"show-merge-conflicts": "Показать конфликты слияния",
"unknownNodesButton": "Поиск неизвестных узлов"
}
},
"clipboard": {
@@ -277,7 +278,9 @@
"successfulRestart": "Потоки успешно перезапущены",
"deployFailed": "Развертывание не удалось: __message__",
"unusedConfigNodes":"У вас есть неиспользуемых узлы конфигурации.",
"unusedConfigNodesLink":"Нажмите здесь, чтобы их увидеть",
"unusedConfigNodesButton":"Поиск неиспользуемых узлов конфигурации",
"unknownNodesButton":"Поиск неизвестных узлов",
"invalidNodesButton":"Поиск недопустимых узлов",
"errors": {
"noResponse": "нет ответа от сервера"
},
@@ -650,14 +653,7 @@
"empty": "пусто",
"globalConfig": "Глобальные конфиг узлы",
"triggerAction": "Вызвать действие",
"find": "Найти в рабочей области",
"search": {
"configNodes": "Узлы конфигурации",
"unusedConfigNodes": "Неиспользуемые узлы конфигурации",
"invalidNodes": "Недействительные узлы",
"uknownNodes": "Неизвестные узлы",
"unusedSubflows": "Неиспользуемые подпотоки"
}
"find": "Найти в рабочей области"
},
"help": {
"name": "Справка",
@@ -888,7 +884,14 @@
},
"search": {
"empty": "Ничего не найдено",
"addNode": "добавить узел..."
"addNode": "добавить узел...",
"options": {
"configNodes": "Узлы конфигурации",
"unusedConfigNodes": "Неиспользуемые узлы конфигурации",
"invalidNodes": "Недействительные узлы",
"uknownNodes": "Неизвестные узлы",
"unusedSubflows": "Неиспользуемые подпотоки"
}
},
"expressionEditor": {
"functions": "Функции",
@@ -1130,8 +1133,10 @@
"languages" : {
"de": "Немецкий",
"en-US": "Английский",
"fr": "Французский",
"ja": "Японский",
"ko": "Корейский",
"pt-BR":"португальский",
"ru": "Русский",
"zh-CN": "Китайский (упрощенный)",
"zh-TW": "Китайский (традиционный)"

View File

View File

File diff suppressed because it is too large Load Diff

View File

@@ -182,7 +182,8 @@
"create-default-package": "創建默認的包文件",
"no-thanks": "不了,謝謝",
"create-default-project": "創建默認項目文件",
"show-merge-conflicts": "顯示合併衝突"
"show-merge-conflicts": "顯示合併衝突",
"unknownNodesButton": "搜索未知節點"
}
},
"clipboard": {
@@ -264,7 +265,9 @@
"successfulRestart": "成功重啟流程",
"deployFailed": "部署失敗: __message__",
"unusedConfigNodes": "您有一些未使用的配置節點",
"unusedConfigNodesLink": "點擊此處查看它們",
"unusedConfigNodesButton":"搜索未使用的配置節點",
"unknownNodesButton":"搜索未知節點",
"invalidNodesButton":"搜索無效節點",
"errors": {
"noResponse": "伺服器沒有回應"
},
@@ -614,14 +617,7 @@
"empty": "空的",
"globalConfig": "全局配置節點",
"triggerAction": "觸發動作",
"find": "在工作區中查找",
"search": {
"configNodes": "配置節點",
"unusedConfigNodes": "未使用的配置節點",
"invalidNodes": "無效的節點",
"uknownNodes": "未知的節點",
"unusedSubflows": "未使用的子流程"
}
"find": "在工作區中查找"
},
"help": {
"name": "幫助",
@@ -842,7 +838,14 @@
},
"search": {
"empty": "找不到匹配",
"addNode": "添加一個節點..."
"addNode": "添加一個節點...",
"options": {
"configNodes": "配置節點",
"unusedConfigNodes": "未使用的配置節點",
"invalidNodes": "無效的節點",
"uknownNodes": "未知的節點",
"unusedSubflows": "未使用的子流程"
}
},
"expressionEditor": {
"functions": "功能",
@@ -1085,8 +1088,11 @@
"languages": {
"de": "德語",
"en-US": "英語",
"fr": "法語",
"ja": "日語",
"ko": "韓語",
"pt-BR":"葡萄牙语",
"ru":"俄語",
"zh-CN": "簡體中文",
"zh-TW": "繁體中文"
}

View File

@@ -1,6 +1,6 @@
{
"name": "@node-red/editor-client",
"version": "1.3.1",
"version": "3.1.0-beta.1",
"license": "Apache-2.0",
"repository": {
"type": "git",
@@ -14,5 +14,5 @@
"name": "Dave Conway-Jones"
}
],
"main": "./lib/index.js"
"main": "./index.js"
}

View File

@@ -76,7 +76,7 @@ oop.inherits(NRJavaScriptWorker, Mirror);
(function() {
this.setOptions = function(options) {
this.options = {
o.options = {
// undef: true,
// unused: true,
esversion: 9,
@@ -98,7 +98,7 @@ oop.inherits(NRJavaScriptWorker, Mirror);
if (options) {
for (var opt in options) {
if (options.hasOwnProperty(opt)) {
this.options[opt] = options.opt;
o.options[opt] = options[opt];
}
}
}

View File

@@ -0,0 +1 @@
<svg width="50" height="5" viewBox="0, 0, 50, 5" xmlns="http://www.w3.org/2000/svg"><path d="M0 1H50V4H0Z" fill="#CCC"/></svg>

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 B

View File

@@ -0,0 +1 @@
<svg width="5" height="50" viewBox="0, 0, 5, 50" xmlns="http://www.w3.org/2000/svg"><path d="M1 0H4V50H1Z" fill="#CCC"/></svg>

After

Width:  |  Height:  |  Size: 127 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" height="512" width="512"><g transform="translate(0 -540.36)"><path fill="#8f0000" color="#000" d="M0 540.36h512v392H0z"/><rect ry="0" height="108.23" width="500.23" stroke="#fff" y="938.25" x="5.89" stroke-width="11.77" fill="#fff"/><path style="text-decoration-color:#000;isolation:auto;mix-blend-mode:normal;solid-color:#000;block-progression:tb;text-decoration-line:none;white-space:normal;text-indent:0;text-transform:none;text-decoration-style:solid" d="M122.88 305.82a4.46 4.46 0 0 0-4.38 4.42v.78c-2.23.1-4.04.54-5.33 1.43a10.5 10.5 0 0 0-3.18 3.87c-.71 1.3-1.3 2.41-2.15 3.2-.72.66-1.8 1.12-3.45 1.32a4.37 4.37 0 0 0-4.3-3.95H82.91a4.43 4.43 0 0 0-4.42 4.35v4.24a4.43 4.43 0 0 0 4.42 4.36h17.16a4.4 4.4 0 0 0 4.4-4.36v-1.6c9.72.14 12.46 2.6 15.59 5.33 3 2.62 6.66 5.38 15.43 5.5v.73a4.49 4.49 0 0 0 4.46 4.38h17.09c2.38 0 4.45-2 4.45-4.38v-4.24a4.49 4.49 0 0 0-4.45-4.38h-17.1c-2.38 0-4.45 2-4.45 4.38v.58c-8.1-.06-10.48-2.15-13.5-4.79-2.5-2.19-5.64-4.58-11.94-5.58 1.17-1.18 1.88-2.52 2.51-3.66.68-1.23 1.29-2.2 2.27-2.88.76-.52 1.98-.84 3.66-.94v.55c0 2.39 2 4.34 4.38 4.34h17.24a4.39 4.39 0 0 0 4.38-4.34v-4.24c0-2.38-2-4.42-4.38-4.42zm0 3h17.24c.8 0 1.38.62 1.38 1.42v4.24c0 .81-.57 1.34-1.38 1.34h-17.24c-.8 0-1.38-.53-1.38-1.34v-4.24c0-.8.57-1.42 1.38-1.42zm-39.96 11.02h17.16c.81 0 1.42.6 1.42 1.4v4.24c0 .81-.61 1.41-1.42 1.41H82.92c-.8 0-1.42-.6-1.42-1.4v-4.25c0-.8.61-1.4 1.42-1.4zm57.04 9.98h17.09c.8 0 1.45.57 1.45 1.38v4.17c0 .8-.65 1.45-1.45 1.45h-17.1c-.8 0-1.45-.65-1.45-1.45v-4.17c0-.8.65-1.38 1.46-1.38z" fill="#fff" color="#000" transform="matrix(4 0 0 4 -162 -450.91)"/><g fill="#8f0000"><path d="M91 954.34v8.45l-8 1.45v60.07H69.03l-28.53-47.1-.5.05v37.2l8 1.44v8.41H19v-8.4l7.45-1.45v-50.22L19 962.79v-8.46h21.48l28.37 47.1.15-.04v-37.15l-7-1.45v-8.45h29zM95 997.83q0-11.63 6.49-19.03 6.53-7.45 18.02-7.45 11.53 0 18.02 7.4 6.54 7.4 6.54 19.08v1q0 11.74-6.54 19.14-6.49 7.35-17.93 7.35-11.58 0-18.11-7.35-6.5-7.4-6.5-19.13v-1.01zm14.03 1q0 7.12 2.5 11.45 2.5 4.28 8.08 4.28 5.43 0 7.93-4.33 2.54-4.33 2.54-11.4v-1q0-6.92-2.54-11.3-2.55-4.37-8.03-4.37t-7.98 4.37-2.5 11.3v1zM184.48 1017.96a17.15 17.15 0 0 1-5.82 5.48 15.17 15.17 0 0 1-7.59 1.88c-6.4 0-11.4-2.35-14.95-7.03-3.52-4.67-5.13-10.86-5.13-18.55v-1c0-8.21 1.62-14.83 5.18-19.86 3.56-5.03 8.56-7.54 15-7.54 2.6 0 4.93.57 7.01 1.73a17.94 17.94 0 0 1 5.81 4.8v-18.64l-8-1.45v-8.46h22v65.13l6 1.44v8.43h-18.45l-1.06-6.36zm-19.49-18.22c0 4.55.63 8.14 2.14 10.77 1.54 2.6 4.04 3.9 7.5 3.9 2.05 0 3.83-.43 5.33-1.26 1.5-.83 3.07-2.03 4.03-3.6v-22.06a11.27 11.27 0 0 0-4.03-3.85 9.62 9.62 0 0 0-5.24-1.4c-3.43 0-5.92 1.53-7.5 4.57s-2.23 7.02-2.23 11.92v1.01zM233.7 1025.28c-7.5 0-13.5-2.4-17.98-7.21-4.48-4.81-6.73-10.91-6.73-18.32v-1.92c0-7.72 2.12-14.08 6.35-19.08 4.26-5 9.96-7.46 17.1-7.43 7.03 0 12.47 2.1 16.35 6.33a23.46 23.46 0 0 1 6.2 17.15v7.52h-31.43l-.1.41c.26 3.43 1.4 6.25 3.41 8.46 2.05 2.21 4.83 3.32 8.32 3.32 3.1 0 5.69-.3 7.74-.91 2.05-.64 4.29-1.64 6.73-2.98l3.8 8.65a27.59 27.59 0 0 1-8.37 4.28 35.28 35.28 0 0 1-11.4 1.73zm-1.25-43.16c-2.6 0-4.65.99-6.15 2.98s-2.44 4.6-2.8 7.83l.15.4H241v-1.41c0-2.98-.84-5.35-2.25-7.11-1.37-1.8-3.47-2.7-6.3-2.7zM291.99 1000.32h-27v-11h27zM331.88 954.34c7.95 0 14.18 1.82 18.7 5.47 4.52 3.63 6.4 8.64 6.4 15.05 0 3.52-.57 6.58-2.46 9.18-1.89 2.6-4.66 4.7-8.31 6.3 4.13 1.21 7.1 3.25 8.89 6.1a19.02 19.02 0 0 1 2.89 10.52v3.56c0 1.54.15 2.74.76 3.6.6.84 1.62 1.34 3.03 1.5l1.2.24v8.46h-6.73c-4.58 0-7.8-1.24-9.66-3.7s-2.6-5.66-2.6-9.57v-3.99c0-3.4-1.1-6.05-2.93-7.98-1.8-1.95-4.34-2.98-7.64-3.07H322v18.45l7 1.44v8.42h-29v-8.42l8-1.44v-50.22l-8-1.44v-8.46h31.89zm-9.95 30.85h9.71c3.91 0 6.84-.83 8.8-2.5s2.93-4.07 2.93-7.2c0-3.15-.98-5.65-2.93-7.5-1.92-1.9-4.78-2.84-8.56-2.84h-9.9v20.04zM412.99 993.32h-23v20h22.21l.63-8h10.2v18.99H368v-8.42l8-1.44v-50.22l-8-1.44v-8.47h54.95v19h-10.3l-.63-8H390v17h23v11zM462.48 954.36c8.55 0 15.6 2.71 21.14 8.19 5.55 5.45 8.36 12.42 8.36 20.98v11.58c0 8.59-2.81 15.63-8.36 21.08-5.54 5.41-12.59 8.12-21.14 8.12h-31.5v-8.41l7-1.52v-50.22l-7-1.37v-8.43l7.46-.08 24.04.08zm-10.5 10.76v48.4l9.77.02c5.03.02 8.98-1.7 11.83-5.1 2.85-3.39 4.4-7.8 4.4-13.28v-11.68c0-5.42-1.55-9.84-4.4-13.24-2.85-3.4-6.8-5.1-11.83-5.1l-9.77-.02z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -0,0 +1,4 @@
<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg">
<path color="#000" fill="#8c101c" d="M0 0h32v32H0z"></path>
<path style="fill:#ffffff;stroke:#000000;stroke-width:0" d="M 24,16 8,24 8,8 Z" fill="none" stroke="#000" stroke-width="1.5"></path>
</svg>

After

Width:  |  Height:  |  Size: 271 B

View File

@@ -0,0 +1,4 @@
<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg">
<path color="#000" fill="#8c101c" d="M0 0h32v32H0z"></path>
<rect style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0;" width="15" height="15" x="8" y="8.5"></rect>
</svg>

After

Width:  |  Height:  |  Size: 256 B

View File

@@ -13,10 +13,23 @@
* 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 = [];
function nodeOrJunction(id) {
var node = RED.nodes.node(id);
if (node) {
return node;
}
return RED.nodes.junction(id);
}
function undoEvent(ev) {
var i;
var len;
@@ -66,12 +79,14 @@ RED.history = (function() {
var importedResult = RED.nodes.import(ev.config,{importMap: importMap})
inverseEv = {
t: 'replace',
config: importedResult.removedNodes
config: importedResult.removedNodes,
dirty: RED.nodes.dirty()
}
}
} else if (ev.t == 'add') {
inverseEv = {
t: "delete",
dirty: RED.nodes.dirty()
};
if (ev.nodes) {
inverseEv.nodes = [];
@@ -99,6 +114,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--) {
@@ -158,7 +190,8 @@ RED.history = (function() {
} else if (ev.t == "delete") {
inverseEv = {
t: "add"
t: "add",
dirty: RED.nodes.dirty()
};
if (ev.workspaces) {
inverseEv.workspaces = [];
@@ -264,6 +297,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++) {
@@ -300,11 +348,12 @@ RED.history = (function() {
} else if (ev.t == "move") {
inverseEv = {
t: 'move',
nodes: []
nodes: [],
dirty: RED.nodes.dirty()
};
for (i=0;i<ev.nodes.length;i++) {
var n = ev.nodes[i];
var rn = {n: n.n, ox: n.n.x, oy: n.n.y, dirty: true, moved: n.moved};
var rn = {n: n.n, ox: n.n.x, oy: n.n.y, dirty: true, moved: n.n.moved};
inverseEv.nodes.push(rn);
n.n.x = n.ox;
n.n.y = n.oy;
@@ -329,14 +378,17 @@ RED.history = (function() {
if (ev.addToGroup) {
RED.group.removeFromGroup(ev.addToGroup,ev.nodes.map(function(n) { return n.n }),false);
inverseEv.removeFromGroup = ev.addToGroup;
} else if (ev.removeFromGroup) {
}
if (ev.removeFromGroup) {
RED.group.addToGroup(ev.removeFromGroup,ev.nodes.map(function(n) { return n.n }));
inverseEv.addToGroup = ev.removeFromGroup;
}
} else if (ev.t == "edit") {
inverseEv = {
t: "edit",
changes: {}
changes: {},
changed: ev.node.changed,
dirty: RED.nodes.dirty()
};
inverseEv.node = ev.node;
for (i in ev.changes) {
@@ -370,6 +422,9 @@ RED.history = (function() {
ev.node[i] = ev.changes[i];
}
}
ev.node.dirty = true;
ev.node.changed = ev.changed;
var eventType;
switch(ev.node.type) {
case 'tab': eventType = "flows"; break;
@@ -383,7 +438,9 @@ RED.history = (function() {
if (ev.node.type === 'tab' && ev.changes.hasOwnProperty('disabled')) {
$("#red-ui-tab-"+(ev.node.id.replace(".","-"))).toggleClass('red-ui-workspace-disabled',!!ev.node.disabled);
$("#red-ui-workspace").toggleClass("red-ui-workspace-disabled",!!ev.node.disabled);
}
if (ev.node.type === 'tab' && ev.changes.hasOwnProperty('locked')) {
$("#red-ui-tab-"+(ev.node.id.replace(".","-"))).toggleClass('red-ui-workspace-locked',!!ev.node.locked);
}
if (ev.subflow) {
inverseEv.subflow = {};
@@ -458,8 +515,6 @@ RED.history = (function() {
inverseEv.links.push(ev.createdLinks[i]);
}
}
ev.node.dirty = true;
ev.node.changed = ev.changed;
} else if (ev.t == "createSubflow") {
inverseEv = {
t: "deleteSubflow",
@@ -471,6 +526,7 @@ RED.history = (function() {
var z = ev.activeWorkspace;
var fullNodeList = RED.nodes.filterNodes({z:ev.subflow.subflow.id});
fullNodeList = fullNodeList.concat(RED.nodes.groups(ev.subflow.subflow.id))
fullNodeList = fullNodeList.concat(RED.nodes.junctions(ev.subflow.subflow.id))
fullNodeList.forEach(function(n) {
n.x += ev.subflow.offsetX;
n.y += ev.subflow.offsetY;
@@ -480,7 +536,7 @@ RED.history = (function() {
});
inverseEv.subflows = [];
for (i=0;i<ev.nodes.length;i++) {
inverseEv.subflows.push(RED.nodes.node(ev.nodes[i]));
inverseEv.subflows.push(nodeOrJunction(ev.nodes[i]));
RED.nodes.remove(ev.nodes[i]);
}
}
@@ -552,10 +608,22 @@ RED.history = (function() {
} else if (ev.t == "reorder") {
inverseEv = {
t: 'reorder',
order: RED.nodes.getWorkspaceOrder()
dirty: RED.nodes.dirty()
};
if (ev.order) {
RED.workspaces.order(ev.order);
if (ev.workspaces) {
inverseEv.workspaces = {
from: ev.workspaces.to,
to: ev.workspaces.from
}
RED.workspaces.order(ev.workspaces.from);
}
if (ev.nodes) {
inverseEv.nodes = {
z: ev.nodes.z,
from: ev.nodes.to,
to: ev.nodes.from
}
RED.nodes.setNodeOrder(ev.nodes.z,ev.nodes.from);
}
} else if (ev.t == "createGroup") {
inverseEv = {
@@ -582,6 +650,12 @@ RED.history = (function() {
ev.groups[i].nodes = [];
RED.nodes.addGroup(ev.groups[i]);
RED.group.addToGroup(ev.groups[i],nodes);
if (ev.groups[i].g) {
const parentGroup = RED.nodes.group(ev.groups[i].g)
if (parentGroup) {
RED.group.addToGroup(parentGroup, ev.groups[i])
}
}
}
}
} else if (ev.t == "addToGroup") {
@@ -651,6 +725,8 @@ RED.history = (function() {
push: function(ev) {
undoHistory.push(ev);
redoHistory = [];
RED.menu.setDisabled("menu-item-edit-undo", false);
RED.menu.setDisabled("menu-item-edit-redo", true);
},
pop: function() {
var ev = undoHistory.pop();
@@ -658,13 +734,24 @@ RED.history = (function() {
if (rev) {
redoHistory.push(rev);
}
RED.menu.setDisabled("menu-item-edit-undo", undoHistory.length === 0);
RED.menu.setDisabled("menu-item-edit-redo", redoHistory.length === 0);
},
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 = [];
RED.menu.setDisabled("menu-item-edit-undo", true);
RED.menu.setDisabled("menu-item-edit-redo", true);
},
redo: function() {
var ev = redoHistory.pop();
@@ -674,6 +761,8 @@ RED.history = (function() {
undoHistory.push(uev);
}
}
RED.menu.setDisabled("menu-item-edit-undo", undoHistory.length === 0);
RED.menu.setDisabled("menu-item-edit-redo", redoHistory.length === 0);
}
}

View File

@@ -0,0 +1,156 @@
RED.hooks = (function() {
var VALID_HOOKS = [
]
var hooks = { }
var labelledHooks = { }
function add(hookId, callback) {
var parts = hookId.split(".");
var id = parts[0], label = parts[1];
// if (VALID_HOOKS.indexOf(id) === -1) {
// throw new Error("Invalid hook '"+id+"'");
// }
if (label && labelledHooks[label] && labelledHooks[label][id]) {
throw new Error("Hook "+hookId+" already registered")
}
var hookItem = {cb:callback, previousHook: null, nextHook: null }
var tailItem = hooks[id];
if (tailItem === undefined) {
hooks[id] = hookItem;
} else {
while(tailItem.nextHook !== null) {
tailItem = tailItem.nextHook
}
tailItem.nextHook = hookItem;
hookItem.previousHook = tailItem;
}
if (label) {
labelledHooks[label] = labelledHooks[label]||{};
labelledHooks[label][id] = hookItem;
}
}
function remove(hookId) {
var parts = hookId.split(".");
var id = parts[0], label = parts[1];
if ( !label) {
throw new Error("Cannot remove hook without label: "+hookId)
}
if (labelledHooks[label]) {
if (id === "*") {
// Remove all hooks for this label
var hookList = Object.keys(labelledHooks[label]);
for (var i=0;i<hookList.length;i++) {
removeHook(hookList[i],labelledHooks[label][hookList[i]])
}
delete labelledHooks[label];
} else if (labelledHooks[label][id]) {
removeHook(id,labelledHooks[label][id])
delete labelledHooks[label][id];
if (Object.keys(labelledHooks[label]).length === 0){
delete labelledHooks[label];
}
}
}
}
function removeHook(id,hookItem) {
var previousHook = hookItem.previousHook;
var nextHook = hookItem.nextHook;
if (previousHook) {
previousHook.nextHook = nextHook;
} else {
hooks[id] = nextHook;
}
if (nextHook) {
nextHook.previousHook = previousHook;
}
hookItem.removed = true;
if (!previousHook && !nextHook) {
delete hooks[id];
}
}
function trigger(hookId, payload, done) {
var hookItem = hooks[hookId];
if (!hookItem) {
if (done) {
done();
}
return;
}
function callNextHook(err) {
if (!hookItem || err) {
if (done) { done(err) }
return err;
}
if (hookItem.removed) {
hookItem = hookItem.nextHook;
return callNextHook();
}
var callback = hookItem.cb;
if (callback.length === 1) {
try {
let result = callback(payload);
if (result === false) {
// Halting the flow
if (done) { done(false) }
return result;
}
hookItem = hookItem.nextHook;
return callNextHook();
} catch(e) {
console.warn(e);
if (done) { done(e);}
return e;
}
} else {
// There is a done callback
try {
callback(payload,function(result) {
if (result === undefined) {
hookItem = hookItem.nextHook;
callNextHook();
} else {
if (done) { done(result)}
}
})
} catch(e) {
console.warn(e);
if (done) { done(e) }
return e;
}
}
}
return callNextHook();
}
function clear() {
hooks = {}
labelledHooks = {}
}
function has(hookId) {
var parts = hookId.split(".");
var id = parts[0], label = parts[1];
if (label) {
return !!(labelledHooks[label] && labelledHooks[label][id])
}
return !!hooks[id]
}
return {
has: has,
clear: clear,
add: add,
remove: remove,
trigger: trigger
}
})();

View File

@@ -18,53 +18,69 @@ RED.i18n = (function() {
var apiRootUrl;
function detectLanguage() {
return navigator.language
}
return {
init: function(options, done) {
apiRootUrl = options.apiRootUrl||"";
var preferredLanguage = localStorage.getItem("editor-language");
var preferredLanguage = localStorage.getItem("editor-language") || detectLanguage();
var opts = {
resGetPath: apiRootUrl+'locales/__ns__?lng=__lng__',
dynamicLoad: false,
load:'current',
ns: {
namespaces: ["editor","node-red","jsonata","infotips"],
defaultNs: "editor"
compatibilityJSON: 'v3',
backend: {
loadPath: apiRootUrl+'locales/__ns__?lng=__lng__',
},
lng: 'en-US',
// debug: true,
preload:['en-US'],
ns: ["editor","node-red","jsonata","infotips"],
defaultNS: "editor",
fallbackLng: ['en-US'],
useCookie: false,
returnObjectTrees: true
returnObjects: true,
keySeparator: ".",
nsSeparator: ":",
interpolation: {
unescapeSuffix: 'HTML',
escapeValue: false,
prefix: '__',
suffix: '__'
}
};
if (preferredLanguage) {
opts.lng = preferredLanguage;
}
i18n.init(opts,function() {
i18next.use(i18nextHttpBackend).init(opts,function() {
done();
});
jqueryI18next.init(i18next, $, { handleName: 'i18n' });
RED["_"] = function() {
var v = i18n.t.apply(null,arguments);
var v = i18next.t.apply(i18next,arguments);
if (typeof v === 'string') {
return v;
} else {
return arguments[0];
}
}
},
lang: function() {
// Gets the active message catalog language. This is based on what
// locale the editor is using and what languages are available.
//
var preferredLangs = i18n.functions.toLanguages(localStorage.getItem("editor-language")||i18n.detectLanguage());
var preferredLangs = [localStorage.getItem("editor-language")|| detectLanguage()].concat(i18next.languages);
var knownLangs = RED.settings.theme("languages")||["en-US"];
for (var i=0;i<preferredLangs.length;i++) {
if (knownLangs.indexOf(preferredLangs[i]) > -1) {
return preferredLangs[i]
}
}
return 'end-US'
return 'en-US'
},
loadNodeCatalog: function(namespace,done) {
var languageList = i18n.functions.toLanguages(localStorage.getItem("editor-language")||i18n.detectLanguage());
var languageList = [localStorage.getItem("editor-language")|| detectLanguage()].concat(i18next.languages);
var toLoad = languageList.length;
languageList.forEach(function(lang) {
$.ajax({
@@ -74,7 +90,7 @@ RED.i18n = (function() {
cache: false,
url: apiRootUrl+'nodes/'+namespace+'/messages?lng='+lang,
success: function(data) {
i18n.addResourceBundle(lang,namespace,data);
i18next.addResourceBundle(lang,namespace,data);
toLoad--;
if (toLoad === 0) {
done();
@@ -86,7 +102,7 @@ RED.i18n = (function() {
},
loadNodeCatalogs: function(done) {
var languageList = i18n.functions.toLanguages(localStorage.getItem("editor-language")||i18n.detectLanguage());
var languageList = [localStorage.getItem("editor-language")|| detectLanguage()].concat(i18next.languages);
var toLoad = languageList.length;
languageList.forEach(function(lang) {
@@ -99,7 +115,7 @@ RED.i18n = (function() {
success: function(data) {
var namespaces = Object.keys(data);
namespaces.forEach(function(ns) {
i18n.addResourceBundle(lang,ns,data[ns]);
i18next.addResourceBundle(lang,ns,data[ns]);
});
toLoad--;
if (toLoad === 0) {
@@ -111,7 +127,7 @@ RED.i18n = (function() {
},
loadPluginCatalogs: function(done) {
var languageList = i18n.functions.toLanguages(localStorage.getItem("editor-language")||i18n.detectLanguage());
var languageList = [localStorage.getItem("editor-language")|| detectLanguage()].concat(i18next.languages);
var toLoad = languageList.length;
languageList.forEach(function(lang) {
@@ -124,7 +140,7 @@ RED.i18n = (function() {
success: function(data) {
var namespaces = Object.keys(data);
namespaces.forEach(function(ns) {
i18n.addResourceBundle(lang,ns,data[ns]);
i18next.addResourceBundle(lang,ns,data[ns]);
});
toLoad--;
if (toLoad === 0) {
@@ -133,6 +149,7 @@ RED.i18n = (function() {
}
});
})
}
},
detectLanguage: detectLanguage
}
})();

View File

@@ -3,16 +3,12 @@
"alt-shift-p":"core:manage-palette",
"ctrl-f": "core:search",
"ctrl-shift-f": "core:list-flows",
"ctrl-+": "core:zoom-in",
"ctrl--": "core:zoom-out",
"ctrl-0": "core:zoom-reset",
"ctrl-enter": "core:confirm-edit-tray",
"ctrl-escape": "core:cancel-edit-tray",
"ctrl-d": "core:deploy-flows",
"ctrl-g i": "core:show-info-tab",
"ctrl-g h": "core:show-help-tab",
"ctrl-g d": "core:show-debug-tab",
"ctrl-g c": "core:show-config-tab",
"ctrl-g d": "core:show-debug-tab",
"ctrl-g h": "core:show-help-tab",
"ctrl-g i": "core:show-info-tab",
"ctrl-g v": "core:show-version-control-tab",
"ctrl-g x": "core:show-context-tab",
"ctrl-e": "core:show-export-dialog",
"ctrl-i": "core:show-import-dialog",
@@ -23,7 +19,6 @@
"ctrl-alt-r": "core:show-remote-diff",
"ctrl-alt-n": "core:new-project",
"ctrl-alt-o": "core:open-project",
"ctrl-g v": "core:show-version-control-tab",
"ctrl-shift-l": "core:show-event-log",
"ctrl-shift-p":"core:show-action-list"
},
@@ -36,7 +31,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",
@@ -77,6 +74,28 @@
"right": "core:go-to-nearest-node-on-right",
"left": "core:go-to-nearest-node-on-left",
"up": "core:go-to-nearest-node-above",
"down": "core:go-to-nearest-node-below"
"down": "core:go-to-nearest-node-below",
"alt-a g": "core:align-selection-to-grid",
"alt-a l": "core:align-selection-to-left",
"alt-a r": "core:align-selection-to-right",
"alt-a t": "core:align-selection-to-top",
"alt-a b": "core:align-selection-to-bottom",
"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",
"shift-f": "core:search-previous",
"f": "core:search-next",
"alt-l l": "core:split-wire-with-link-nodes",
"alt-w": "core:hide-flow",
"alt-shift-w": "core:show-last-hidden-flow",
"ctrl-+": "core:zoom-in",
"ctrl--": "core:zoom-out",
"ctrl-0": "core:zoom-reset"
},
"red-ui-editor-stack": {
"ctrl-enter": "core:confirm-edit-tray",
"ctrl-escape": "core:cancel-edit-tray"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -36,7 +36,7 @@ var RED = (function() {
}
function loadPlugins(done) {
loader.reportProgress(RED._("event.loadPlugins",{count:""}), 17)
var lang = localStorage.getItem("editor-language")||i18n.detectLanguage();
var lang = localStorage.getItem("editor-language")||RED.i18n.detectLanguage();
$.ajax({
headers: {
@@ -176,7 +176,7 @@ var RED = (function() {
function loadNodes() {
loader.reportProgress(RED._("event.loadNodes",{count:""}), 30)
var lang = localStorage.getItem("editor-language")||i18n.detectLanguage();
var lang = localStorage.getItem("editor-language")||RED.i18n.detectLanguage();
$.ajax({
headers: {
@@ -201,6 +201,7 @@ var RED = (function() {
RED.projects.refresh(function(activeProject) {
loadFlows(function() {
RED.sidebar.info.refresh()
var showProjectWelcome = false;
if (!activeProject) {
// Projects enabled but no active project
RED.menu.setDisabled('menu-item-projects-open',true);
@@ -208,10 +209,10 @@ var RED = (function() {
if (activeProject === false) {
// User previously decline the migration to projects.
} else { // null/undefined
RED.projects.showStartup();
showProjectWelcome = true;
}
}
completeLoad();
completeLoad(showProjectWelcome);
});
});
} else {
@@ -248,8 +249,51 @@ var RED = (function() {
RED.nodes.import(nodes.flows);
RED.nodes.dirty(false);
RED.view.redraw(true);
if (/^#flow\/.+$/.test(currentHash)) {
RED.workspaces.show(currentHash.substring(6),true);
if (/^#(flow|node|group)\/.+$/.test(currentHash)) {
const hashParts = currentHash.split('/')
const showEditDialog = hashParts.length > 2 && hashParts[2] === 'edit'
if (hashParts[0] === '#flow') {
RED.workspaces.show(hashParts[1], true);
if (showEditDialog) {
RED.workspaces.edit()
}
} else if (hashParts[0] === '#node') {
const nodeToShow = RED.nodes.node(hashParts[1])
if (nodeToShow) {
setTimeout(() => {
RED.view.reveal(nodeToShow.id)
window.location.hash = currentHash
if (showEditDialog) {
RED.editor.edit(nodeToShow)
}
}, 50)
}
} else if (hashParts[0] === '#group') {
const nodeToShow = RED.nodes.group(hashParts[1])
if (nodeToShow) {
RED.view.reveal(nodeToShow.id)
window.location.hash = currentHash
if (showEditDialog) {
RED.editor.editGroup(nodeToShow)
}
}
}
}
if (RED.workspaces.count() > 0) {
const hiddenTabs = JSON.parse(RED.settings.getLocal("hiddenTabs")||"{}");
const workspaces = RED.nodes.getWorkspaceOrder();
if (RED.workspaces.active() === 0) {
for (let index = 0; index < workspaces.length; index++) {
const ws = workspaces[index];
if (!hiddenTabs[ws]) {
RED.workspaces.show(ws);
break;
}
}
}
if (RED.workspaces.active() === 0) {
RED.workspaces.show(workspaces[0]);
}
}
} catch(err) {
console.warn(err);
@@ -267,7 +311,7 @@ var RED = (function() {
});
}
function completeLoad() {
function completeLoad(showProjectWelcome) {
var persistentNotifications = {};
RED.comms.subscribe("notification/#",function(topic,msg) {
var parts = topic.split("/");
@@ -280,6 +324,10 @@ var RED = (function() {
// handled below
return;
}
if (notificationId === "flows-run-state") {
// handled in editor-client/src/js/runtime.js
return;
}
if (notificationId === "project-update") {
loader.start(RED._("event.loadingProject"), 0);
RED.nodes.clear();
@@ -300,6 +348,8 @@ var RED = (function() {
loader.end()
RED.notify($("<p>").text(message));
RED.sidebar.info.refresh()
RED.menu.setDisabled('menu-item-projects-open',false);
RED.menu.setDisabled('menu-item-projects-settings',false);
});
});
return;
@@ -315,7 +365,6 @@ var RED = (function() {
id: notificationId
}
if (notificationId === "runtime-state") {
RED.events.emit("runtime-state",msg);
if (msg.error === "safe-mode") {
options.buttons = [
{
@@ -341,6 +390,14 @@ var RED = (function() {
} else {
options.buttons = [
{
text: RED._("notification.label.unknownNodesButton"),
class: "pull-left",
click: function() {
RED.actions.invoke("core:search", "type:unknown ");
}
},
{
class: "primary",
text: RED._("common.label.close"),
click: function() {
persistentNotifications[notificationId].hideNotification();
@@ -448,16 +505,16 @@ var RED = (function() {
} else if (persistentNotifications.hasOwnProperty(notificationId)) {
persistentNotifications[notificationId].close();
delete persistentNotifications[notificationId];
if (notificationId === 'runtime-state') {
RED.events.emit("runtime-state",msg);
}
}
if (notificationId === 'runtime-state') {
RED.events.emit("runtime-state",msg);
}
});
RED.comms.subscribe("status/#",function(topic,msg) {
var parts = topic.split("/");
var node = RED.nodes.node(parts[1]);
if (node) {
if (msg.hasOwnProperty("text") && msg.text !== null && /^[a-zA-Z]/.test(msg.text)) {
if (msg.hasOwnProperty("text") && msg.text !== null && /^[@a-zA-Z]/.test(msg.text)) {
msg.text = node._(msg.text.toString(),{defaultValue:msg.text.toString()});
}
node.status = msg;
@@ -471,22 +528,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() {
$.get('nodes/'+id, 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];
@@ -499,18 +567,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 {
$.get('nodes/'+msg.id, function(data) {
appendNodeConfig(data);
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.nodeAdded", {count:msg.types.length})+typeList,"success");
});
}
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) {
@@ -530,22 +609,28 @@ var RED = (function() {
$(".red-ui-header-toolbar").show();
RED.sidebar.show(":first");
RED.sidebar.show(":first", true);
setTimeout(function() {
loader.end();
checkFirstRun(function() {
if (showProjectWelcome) {
RED.projects.showStartup();
}
});
},100);
}
function showAbout() {
$.get('red/about', function(data) {
var aboutHeader = '<div style="text-align:center;">'+
'<img width="50px" src="red/images/node-red-icon.svg" />'+
'</div>';
RED.sidebar.help.set(aboutHeader+RED.utils.renderMarkdown(data));
});
function checkFirstRun(done) {
if (RED.settings.theme("tours") === false) {
done();
return;
}
if (!RED.settings.get("editor.view.view-show-welcome-tours", true)) {
done();
return;
}
RED.actions.invoke("core:show-welcome-tour", RED.settings.get("editor.tours.welcome"), done);
}
function buildMainMenu() {
@@ -557,6 +642,25 @@ 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: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,
{id: "menu-item-edit-cut", label:RED._("keyboard.cutNode"), onselect: "core:cut-selection-to-internal-clipboard"},
{id: "menu-item-edit-copy", label:RED._("keyboard.copyNode"), onselect: "core:copy-selection-to-internal-clipboard"},
{id: "menu-item-edit-paste", label:RED._("keyboard.pasteNode"), disabled: true, onselect: "core:paste-from-internal-clipboard"},
null,
{id: "menu-item-edit-copy-group-style", label:RED._("keyboard.copyGroupStyle"), onselect: "core:copy-group-style"},
{id: "menu-item-edit-paste-group-style", label:RED._("keyboard.pasteGroupStyle"), disabled: true, onselect: "core:paste-group-style"},
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"},
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:[
{id:"menu-item-palette",label:RED._("menu.label.palette.show"),toggle:true,onselect:"core:toggle-palette", selected: true},
{id:"menu-item-sidebar",label:RED._("menu.label.sidebar.show"),toggle:true,onselect:"core:toggle-sidebar", selected: true},
@@ -564,6 +668,25 @@ var RED = (function() {
{id:"menu-item-action-list",label:RED._("keyboard.actionList"),onselect:"core:show-action-list"},
null
]});
menuOptions.push({id:"menu-item-arrange-menu", label:RED._("menu.label.arrange"), options: [
{id: "menu-item-view-tools-align-left", label:RED._("menu.label.alignLeft"), disabled: true, onselect: "core:align-selection-to-left"},
{id: "menu-item-view-tools-align-center", label:RED._("menu.label.alignCenter"), disabled: true, onselect: "core:align-selection-to-center"},
{id: "menu-item-view-tools-align-right", label:RED._("menu.label.alignRight"), disabled: true, onselect: "core:align-selection-to-right"},
null,
{id: "menu-item-view-tools-align-top", label:RED._("menu.label.alignTop"), disabled: true, onselect: "core:align-selection-to-top"},
{id: "menu-item-view-tools-align-middle", label:RED._("menu.label.alignMiddle"), disabled: true, onselect: "core:align-selection-to-middle"},
{id: "menu-item-view-tools-align-bottom", label:RED._("menu.label.alignBottom"), disabled: true, onselect: "core:align-selection-to-bottom"},
null,
{id: "menu-item-view-tools-distribute-horizontally", label:RED._("menu.label.distributeHorizontally"), disabled: true, onselect: "core:distribute-selection-horizontally"},
{id: "menu-item-view-tools-distribute-veritcally", label:RED._("menu.label.distributeVertically"), disabled: true, onselect: "core:distribute-selection-vertically"},
null,
{id: "menu-item-view-tools-move-to-back", label:RED._("menu.label.moveToBack"), disabled: true, onselect: "core:move-selection-to-back"},
{id: "menu-item-view-tools-move-to-front", label:RED._("menu.label.moveToFront"), disabled: true, onselect: "core:move-selection-to-front"},
{id: "menu-item-view-tools-move-backwards", label:RED._("menu.label.moveBackwards"), disabled: true, onselect: "core:move-selection-backwards"},
{id: "menu-item-view-tools-move-forwards", label:RED._("menu.label.moveForwards"), disabled: true, onselect: "core:move-selection-forwards"}
]});
menuOptions.push(null);
if (RED.settings.theme("menu.menu-item-import-library", true)) {
menuOptions.push({id: "menu-item-import", label: RED._("menu.label.import"), onselect: "core:show-import-dialog"});
@@ -624,7 +747,6 @@ var RED = (function() {
RED.user.init();
RED.notifications.init();
RED.library.init();
RED.keyboard.init();
RED.palette.init();
RED.eventLog.init();
@@ -648,21 +770,21 @@ var RED = (function() {
RED.search.init();
RED.actionList.init();
RED.editor.init();
RED.diagnostics.init();
RED.diff.init();
RED.deploy.init(RED.settings.theme("deployButton",null));
buildMainMenu();
RED.keyboard.init(buildMainMenu);
RED.envVar.init();
RED.nodes.init();
RED.runtime.init()
RED.comms.connect();
$("#red-ui-main-container").show();
RED.actions.add("core:show-about", showAbout);
loadPluginList();
}
@@ -674,7 +796,7 @@ var RED = (function() {
$('<div id="red-ui-header-shade" class="hide"></div>').appendTo(header);
$('<div id="red-ui-main-container" class="red-ui-sidebar-closed hide">'+
'<div id="red-ui-workspace"></div>'+
'<div id="red-ui-editor-stack"></div>'+
'<div id="red-ui-editor-stack" tabindex="-1"></div>'+
'<div id="red-ui-palette"></div>'+
'<div id="red-ui-sidebar"></div>'+
'<div id="red-ui-sidebar-separator"></div>'+
@@ -711,7 +833,7 @@ var RED = (function() {
throw new Error("RED already initialised");
}
initialised = true;
ace.require("ace/ext/language_tools");
if(window.ace) { window.ace.require("ace/ext/language_tools"); }
options = options || {};
options.apiRootUrl = options.apiRootUrl || "";
if (options.apiRootUrl && !/\/$/.test(options.apiRootUrl)) {

View File

@@ -0,0 +1,36 @@
RED.runtime = (function() {
let state = ""
let settings = { ui: false, enabled: false };
const STOPPED = "stop"
const STARTED = "start"
const SAFE = "safe"
return {
init: function() {
// refresh the current runtime status from server
settings = Object.assign({}, settings, RED.settings.runtimeState);
RED.events.on("runtime-state", function(msg) {
if (msg.state) {
const currentState = state
state = msg.state
$(".red-ui-flow-node-button").toggleClass("red-ui-flow-node-button-stopped", state !== STARTED)
if(settings.enabled === true && settings.ui === true) {
RED.menu.setVisible("deploymenu-item-runtime-stop", state === STARTED)
RED.menu.setVisible("deploymenu-item-runtime-start", state !== STARTED)
}
// Do not notify the user about this event if:
// - This is the very first event we've received after loading the editor (currentState = '')
// - The state matches what we already thought was the case (state === currentState)
// - The event was triggered by a deploy (msg.deploy === true)
// - The event is a safe mode event - that gets notified separately
if (currentState !== '' && state !== currentState && !msg.deploy && state !== SAFE) {
RED.notify(RED._("notification.state.flows"+(state === STOPPED?'Stopped':'Started'), msg), "success")
}
}
});
},
get started() {
return state === STARTED
}
}
})()

View File

@@ -19,7 +19,6 @@ RED.settings = (function () {
var loadedSettings = {};
var userSettings = {};
var settingsDirty = false;
var pendingSave;
var hasLocalStorage = function () {
@@ -126,7 +125,7 @@ RED.settings = (function () {
load(done);
}
var load = function(done) {
var refreshSettings = function(done) {
$.ajax({
headers: {
"Accept": "application/json"
@@ -136,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");
}
@@ -143,22 +159,13 @@ RED.settings = (function () {
console.groupCollapsed("Versions");
console.log("jQuery",$().jquery)
console.log("jQuery UI",$.ui.version);
console.log("ACE",ace.version);
if(window.ace) { console.log("ACE",ace.version); }
if(window.monaco) { console.log("MONACO",monaco.version || "unknown"); }
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) {
@@ -219,14 +226,28 @@ RED.settings = (function () {
return defaultValue;
}
}
function getLocal(key) {
return localStorage.getItem(key)
}
function setLocal(key, value) {
localStorage.setItem(key, value);
}
function removeLocal(key) {
localStorage.removeItem(key)
}
return {
init: init,
load: load,
loadUserSettings: loadUserSettings,
refreshSettings: refreshSettings,
set: set,
get: get,
remove: remove,
theme: theme
theme: theme,
setLocal: setLocal,
getLocal: getLocal,
removeLocal: removeLocal
}
})();

View File

@@ -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;
}

View File

@@ -1,25 +1,67 @@
RED.actions = (function() {
var actions = {
}
};
function addAction(name,handler) {
actions[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: handler,
options: options,
};
}
function removeAction(name) {
delete actions[name];
}
function getAction(name) {
return actions[name];
return actions[name].handler;
}
function invokeAction(name,args) {
function getActionLabel(name) {
let def = actions[name]
if (!def) {
return ''
}
if (!def.label) {
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();
}
});
}
def.label = label;
}
return def.label
}
function invokeAction() {
var args = Array.prototype.slice.call(arguments);
var name = args.shift();
if (actions.hasOwnProperty(name)) {
actions[name](args);
var handler = actions[name].handler;
handler.apply(null, args);
}
}
function listActions() {
var result = [];
Object.keys(actions).forEach(function(action) {
var def = actions[action];
var shortcut = RED.keyboard.getShortcut(action);
var isUser = false;
if (shortcut) {
@@ -27,19 +69,25 @@ RED.actions = (function() {
} else {
isUser = !!RED.keyboard.getUserShortcut(action);
}
if (!def.label) {
def.label = getActionLabel(action)
}
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 {
add: addAction,
remove: removeAction,
get: getAction,
getLabel: getActionLabel,
invoke: invokeAction,
list: listActions
}

View File

@@ -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();
}
}
],
@@ -417,11 +423,10 @@ RED.clipboard = (function() {
}
}
function showImportNodes(mode) {
function showImportNodes(library = 'clipboard') {
if (disabled) {
return;
}
mode = mode || "clipboard";
dialogContainer.empty();
dialogContainer.append($(importNodesDialog));
@@ -452,7 +457,7 @@ RED.clipboard = (function() {
var libraries = RED.settings.libraries || [];
libraries.forEach(function(lib) {
var tabId = "red-ui-clipboard-dialog-import-tab-library-"+lib.id
var tabId = "red-ui-clipboard-dialog-import-tab-"+lib.id
tabs.addTab({
id: tabId,
label: RED._(lib.label||lib.id)
@@ -498,6 +503,13 @@ RED.clipboard = (function() {
$("#red-ui-clipboard-dialog-import-text").on("keyup", validateImport);
$("#red-ui-clipboard-dialog-import-text").on('paste',function() { setTimeout(validateImport,10)});
if (RED.workspaces.active() === 0 || RED.workspaces.isLocked()) {
$("#red-ui-clipboard-dialog-import-opt-current").addClass('disabled').removeClass("selected");
$("#red-ui-clipboard-dialog-import-opt-new").addClass("selected");
} else {
$("#red-ui-clipboard-dialog-import-opt-current").removeClass('disabled').addClass("selected");
$("#red-ui-clipboard-dialog-import-opt-new").removeClass("selected");
}
$("#red-ui-clipboard-dialog-import-opt > a").on("click", function(evt) {
evt.preventDefault();
if ($(this).hasClass('disabled') || $(this).hasClass('selected')) {
@@ -520,8 +532,8 @@ RED.clipboard = (function() {
$("#red-ui-clipboard-dialog-import-file-upload").trigger("click");
})
tabs.activateTab("red-ui-clipboard-dialog-import-tab-"+mode);
if (mode === 'clipboard') {
tabs.activateTab("red-ui-clipboard-dialog-import-tab-"+library);
if (library === 'clipboard') {
setTimeout(function() {
$("#red-ui-clipboard-dialog-import-text").trigger("focus");
},100)
@@ -545,13 +557,16 @@ RED.clipboard = (function() {
});
}
function showExportNodes(mode) {
/**
* Show the export dialog
* @params library which export destination to show
* @params mode whether to default to 'auto' (default) or 'flow'
**/
function showExportNodes(library = 'clipboard', mode = 'auto' ) {
if (disabled) {
return;
}
mode = mode || "clipboard";
dialogContainer.empty();
dialogContainer.append($(exportNodesDialog));
@@ -611,9 +626,6 @@ RED.clipboard = (function() {
activeLibraries[tabId] = browser;
})
$("#red-ui-clipboard-dialog-tab-library-name").on("keyup", validateExportFilename);
$("#red-ui-clipboard-dialog-tab-library-name").on('paste',function() { setTimeout(validateExportFilename,10)});
$("#red-ui-clipboard-dialog-export").button("enable");
@@ -636,7 +648,6 @@ RED.clipboard = (function() {
label: RED._("editor.types.json")
});
var previewList = $("#red-ui-clipboard-dialog-export-tab-clipboard-preview-list").css({position:"absolute",top:0,right:0,bottom:0,left:0}).treeList({
data: []
})
@@ -645,7 +656,12 @@ RED.clipboard = (function() {
$("#red-ui-clipboard-dialog-tab-library-name").val("flows.json").select();
dialogContainer.i18n();
var format = RED.settings.flowFilePretty ? "red-ui-clipboard-dialog-export-fmt-full" : "red-ui-clipboard-dialog-export-fmt-mini";
const userFormat = RED.settings.get("editor.dialog.export.pretty")
if (userFormat === false || userFormat === true) {
format = userFormat ? "red-ui-clipboard-dialog-export-fmt-full" : "red-ui-clipboard-dialog-export-fmt-mini";
}
$("#red-ui-clipboard-dialog-export-fmt-group > a").on("click", function(evt) {
evt.preventDefault();
@@ -661,7 +677,8 @@ RED.clipboard = (function() {
var nodes = JSON.parse(flow);
format = $(this).attr('id');
if (format === 'red-ui-clipboard-dialog-export-fmt-full') {
const pretty = format === "red-ui-clipboard-dialog-export-fmt-full";
if (pretty) {
flow = JSON.stringify(nodes,null,4);
} else {
flow = JSON.stringify(nodes);
@@ -670,6 +687,7 @@ RED.clipboard = (function() {
setTimeout(function() { $("#red-ui-clipboard-dialog-export-text").scrollTop(0); },50);
$("#red-ui-clipboard-dialog-export-text").trigger("focus");
RED.settings.set("editor.dialog.export.pretty", pretty)
}
});
@@ -700,7 +718,15 @@ RED.clipboard = (function() {
} else if (type === 'flow') {
var activeWorkspace = RED.workspaces.active();
nodes = RED.nodes.groups(activeWorkspace);
nodes = nodes.concat(RED.nodes.junctions(activeWorkspace));
nodes = nodes.concat(RED.nodes.filterNodes({z:activeWorkspace}));
RED.nodes.eachConfig(function(n) {
if (n.z === RED.workspaces.active() && n._def.hasUsers === false) {
// Grab any config nodes scoped to this flow that don't
// require any flow-nodes to use them
nodes.push(n);
}
});
var parentNode = RED.nodes.workspace(activeWorkspace)||RED.nodes.subflow(activeWorkspace);
nodes.unshift(parentNode);
nodes = RED.nodes.createExportableNodeSet(nodes);
@@ -731,24 +757,33 @@ RED.clipboard = (function() {
$("#red-ui-clipboard-dialog-export").hide();
$("#red-ui-clipboard-dialog-import-conflict").hide();
var selection = RED.workspaces.selection();
if (selection.length > 0) {
$("#red-ui-clipboard-dialog-export-rng-selected").trigger("click");
if (RED.workspaces.active() === 0) {
$("#red-ui-clipboard-dialog-export-rng-selected").addClass('disabled').removeClass('selected');
$("#red-ui-clipboard-dialog-export-rng-flow").addClass('disabled').removeClass('selected');
$("#red-ui-clipboard-dialog-export-rng-full").trigger("click");
} else {
selection = RED.view.selection();
if (selection.nodes) {
var selection = RED.workspaces.selection();
if (selection.length > 0) {
$("#red-ui-clipboard-dialog-export-rng-selected").trigger("click");
} else {
$("#red-ui-clipboard-dialog-export-rng-selected").addClass('disabled').removeClass('selected');
$("#red-ui-clipboard-dialog-export-rng-flow").trigger("click");
selection = RED.view.selection();
if (selection.nodes) {
$("#red-ui-clipboard-dialog-export-rng-selected").trigger("click");
} else {
$("#red-ui-clipboard-dialog-export-rng-selected").addClass('disabled').removeClass('selected');
$("#red-ui-clipboard-dialog-export-rng-flow").trigger("click");
}
}
}
if (mode === 'flow' && !$("#red-ui-clipboard-dialog-export-rng-flow").hasClass('disabled')) {
$("#red-ui-clipboard-dialog-export-rng-flow").trigger("click");
}
if (format === "red-ui-clipboard-dialog-export-fmt-full") {
$("#red-ui-clipboard-dialog-export-fmt-full").trigger("click");
} else {
$("#red-ui-clipboard-dialog-export-fmt-mini").trigger("click");
}
tabs.activateTab("red-ui-clipboard-dialog-export-tab-"+mode);
tabs.activateTab("red-ui-clipboard-dialog-export-tab-"+library);
var dialogHeight = 400;
var winHeight = $(window).height();
@@ -924,7 +959,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({
@@ -938,14 +974,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') {
@@ -965,6 +1000,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);
}
@@ -1186,22 +1222,6 @@ RED.clipboard = (function() {
}
}
function getNodeLabelText(n) {
var label = n.name || n.type+": "+n.id;
if (n._def.label) {
try {
label = (typeof n._def.label === "function" ? n._def.label.call(n) : n._def.label)||"";
} catch(err) {
console.log("Definition error: "+n.type+".label",err);
}
}
var newlineIndex = label.indexOf("\\n");
if (newlineIndex > -1) {
label = label.substring(0,newlineIndex)+"...";
}
return label;
}
function getFlowLabel(n) {
n = JSON.parse(JSON.stringify(n));
n._def = RED.nodes.getType(n.type) || {};
@@ -1227,16 +1247,8 @@ RED.clipboard = (function() {
if (n._def) {
n._ = n._def._;
}
var div = $('<div>',{class:"red-ui-info-outline-item"});
RED.utils.createNodeIcon(n).appendTo(div);
var contentDiv = $('<div>',{class:"red-ui-search-result-description"}).appendTo(div);
var labelText = getNodeLabelText(n);
var label = $('<div>',{class:"red-ui-search-result-node-label red-ui-info-outline-item-label"}).appendTo(contentDiv);
if (labelText) {
label.text(labelText)
} else {
label.html(n.type)
}
var div = $('<div>',{class:"red-ui-node-list-item"});
RED.utils.createNodeIcon(n,true).appendTo(div);
return div;
}
@@ -1244,8 +1256,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);
@@ -1268,15 +1278,17 @@ RED.clipboard = (function() {
RED.keyboard.add("#red-ui-drop-target", "escape" ,hideDropTarget);
$('#red-ui-workspace-chart').on("dragenter",function(event) {
if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1 ||
$.inArray("Files",event.originalEvent.dataTransfer.types) != -1) {
if (!RED.workspaces.isLocked() && (
$.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1 ||
$.inArray("Files",event.originalEvent.dataTransfer.types) != -1)) {
$("#red-ui-drop-target").css({display:'table'}).focus();
}
});
$('#red-ui-drop-target').on("dragover",function(event) {
if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1 ||
$.inArray("Files",event.originalEvent.dataTransfer.types) != -1) {
$.inArray("Files",event.originalEvent.dataTransfer.types) != -1 ||
RED.workspaces.isLocked()) {
event.preventDefault();
}
})
@@ -1284,21 +1296,28 @@ RED.clipboard = (function() {
hideDropTarget();
})
.on("drop",function(event) {
if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1) {
var data = event.originalEvent.dataTransfer.getData("text/plain");
data = data.substring(data.indexOf('['),data.lastIndexOf(']')+1);
importNodes(data);
} else if ($.inArray("Files",event.originalEvent.dataTransfer.types) != -1) {
var files = event.originalEvent.dataTransfer.files;
if (files.length === 1) {
var file = files[0];
var reader = new FileReader();
reader.onload = (function(theFile) {
return function(e) {
importNodes(e.target.result);
};
})(file);
reader.readAsText(file);
if (!RED.workspaces.isLocked()) {
try {
if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1) {
var data = event.originalEvent.dataTransfer.getData("text/plain");
data = data.substring(data.indexOf('['),data.lastIndexOf(']')+1);
importNodes(data);
} else if ($.inArray("Files",event.originalEvent.dataTransfer.types) != -1) {
var files = event.originalEvent.dataTransfer.files;
if (files.length === 1) {
var file = files[0];
var reader = new FileReader();
reader.onload = (function(theFile) {
return function(e) {
importNodes(e.target.result);
};
})(file);
reader.readAsText(file);
}
}
} catch(err) {
// Ensure any errors throw above doesn't stop the drop target from
// being hidden.
}
}
hideDropTarget();

View File

@@ -0,0 +1,126 @@
(function($) {
/**
* Attach to an <input type="text"> to provide auto-complete
*
* $("#node-red-text").autoComplete({
* search: function(value) { return ['a','b','c'] }
* })
*
* options:
*
* search: function(value, [done])
* A function that is passed the current contents of the input whenever
* it changes.
* The function must either return auto-complete options, or pass them
* to the optional 'done' parameter.
* If the function signature includes 'done', it must be used
* minLength: number
* If `minLength` is 0, pressing down arrow will show the list
*
* The auto-complete options should be an array of objects in the form:
* {
* value: String : the value to insert if selected
* label: String|DOM Element : the label to display in the dropdown.
* }
*
*/
$.widget( "nodered.autoComplete", {
_create: function() {
const that = this;
this.completionMenuShown = false;
this.options.minLength = parseInteger(this.options.minLength, 1, 0);
this.options.search = this.options.search || function() { return [] };
this.element.addClass("red-ui-autoComplete");
this.element.on("keydown.red-ui-autoComplete", function(evt) {
if ((evt.keyCode === 13 || evt.keyCode === 9) && that.completionMenuShown) {
var opts = that.menu.options();
that.element.val(opts[0].value);
that.menu.hide();
evt.preventDefault();
}
})
this.element.on("keyup.red-ui-autoComplete", function(evt) {
if (evt.keyCode === 13 || evt.keyCode === 9 || evt.keyCode === 27) {
// ENTER / TAB / ESCAPE
return
}
if (evt.keyCode === 8 || evt.keyCode === 46) {
// Delete/Backspace
if (!that.completionMenuShown) {
return;
}
}
that._updateCompletions(this.value);
});
},
_showCompletionMenu: function(completions) {
if (this.completionMenuShown) {
return;
}
this.menu = RED.popover.menu({
tabSelect: true,
width: 300,
maxHeight: 200,
class: "red-ui-autoComplete-container",
options: completions,
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({
target: this.element
})
this.completionMenuShown = true;
},
_updateCompletions: function(val) {
const that = this;
if (val.trim().length < this.options.minLength) {
if (this.completionMenuShown) {
this.menu.hide();
}
return;
}
function displayResults(completions,requestId) {
if (requestId && requestId !== that.pendingRequest) {
// This request has been superseded
return
}
if (!completions || completions.length === 0) {
if (that.completionMenuShown) {
that.menu.hide();
}
return
}
if (that.completionMenuShown) {
that.menu.options(completions);
} else {
that._showCompletionMenu(completions);
}
}
if (this.options.search.length === 2) {
const requestId = 1+Math.floor(Math.random()*10000);
this.pendingRequest = requestId;
this.options.search(val,function(completions) { displayResults(completions,requestId);})
} else {
displayResults(this.options.search(val))
}
},
_destroy: function() {
this.element.removeClass("red-ui-autoComplete")
this.element.off("keydown.red-ui-autoComplete")
this.element.off("keyup.red-ui-autoComplete")
if (this.completionMenuShown) {
this.menu.hide();
}
}
});
function parseInteger(input, def, min, max) {
if(input == null) { return (def || 0); }
min = min == null ? Number.NEGATIVE_INFINITY : min;
max = max == null ? Number.POSITIVE_INFINITY : max;
let n = parseInt(input);
if(isNaN(n) || n < min || n > max) { n = def || 0; }
return n;
}
})(jQuery);

View File

@@ -18,7 +18,7 @@
/**
* options:
* - addButton : boolean|string - text for add label, default 'add'
* - buttons : array - list of custom buttons (objects with fields 'label', 'icon', 'title', 'click')
* - buttons : array - list of custom buttons (objects with fields 'id', 'label', 'icon', 'title', 'click')
* - height : number|'auto'
* - resize : function - called when list as a whole is resized
* - resizeItem : function(item) - called to resize individual item
@@ -71,7 +71,7 @@
var buttons = this.options.buttons || [];
if (this.options.addButton !== false) {
var addLabel, addTittle;
var addLabel, addTitle;
if (typeof this.options.addButton === 'string') {
addLabel = this.options.addButton
} else {
@@ -94,7 +94,7 @@
}
buttons.forEach(function(button) {
var element = $('<a href="#" class="red-ui-button red-ui-button-small red-ui-editableList-addButton" style="margin-top: 4px; margin-right: 5px;"></a>')
var element = $('<button type="button" class="red-ui-button red-ui-button-small red-ui-editableList-addButton" style="margin-top: 4px; margin-right: 5px;"></button>')
.appendTo(that.topContainer)
.on("click", function(evt) {
evt.preventDefault();
@@ -102,7 +102,10 @@
button.click(evt);
}
});
if (button.id) {
element.attr("id", button.id);
}
if (button.title) {
element.attr("title", button.title);
}
@@ -113,7 +116,7 @@
element.append($("<span></span>").text(" " + button.label));
}
});
if (this.element.css("position") === "absolute") {
["top","left","bottom","right"].forEach(function(s) {
var v = that.element.css(s);
@@ -157,7 +160,7 @@
this.element.css("maxHeight",null);
}
if (this.options.height !== 'auto') {
this.uiContainer.css("overflow-y","scroll");
this.uiContainer.css("overflow-y","auto");
if (!isNaN(this.options.height)) {
this.uiHeight = this.options.height;
}
@@ -414,6 +417,9 @@
} else {
return null;
}
},
cancel: function() {
this.element.sortable("cancel");
}
});
})(jQuery);

View File

@@ -16,6 +16,7 @@
RED.menu = (function() {
var menuItems = {};
let menuItemCount = 0
function createMenuItem(opt) {
var item;
@@ -59,15 +60,16 @@ RED.menu = (function() {
item = $('<li class="red-ui-menu-divider"></li>');
} else {
item = $('<li></li>');
if (!opt.id) {
opt.id = 'red-ui-menu-item-'+(menuItemCount++)
}
if (opt.group) {
item.addClass("red-ui-menu-group-"+opt.group);
}
var linkContent = '<a '+(opt.id?'id="'+opt.id+'" ':'')+'tabindex="-1" href="#">';
if (opt.toggle) {
linkContent += '<i class="fa fa-square pull-left"></i>';
linkContent += '<i class="fa fa-check-square pull-left"></i>';
linkContent += '<i class="fa fa-square'+(opt.direction!=='right'?" pull-left":"")+'"></i>';
linkContent += '<i class="fa fa-check-square'+(opt.direction!=='right'?" pull-left":"")+'"></i>';
}
if (opt.icon !== undefined) {
@@ -77,17 +79,27 @@ RED.menu = (function() {
linkContent += '<i class="'+(opt.icon?opt.icon:'" style="display: inline-block;"')+'"></i> ';
}
}
let label = opt.label
if (!opt.label && typeof opt.onselect === 'string') {
label = RED.actions.getLabel(opt.onselect)
}
if (opt.sublabel) {
linkContent += '<span class="red-ui-menu-label-container"><span class="red-ui-menu-label">'+opt.label+'</span>'+
linkContent += '<span class="red-ui-menu-label-container"><span class="red-ui-menu-label">'+label+'</span>'+
'<span class="red-ui-menu-sublabel">'+opt.sublabel+'</span></span>'
} else {
linkContent += '<span class="red-ui-menu-label">'+opt.label+'</span>'
linkContent += '<span class="red-ui-menu-label"><span>'+label+'</span></span>'
}
linkContent += '</a>';
var link = $(linkContent).appendTo(item);
opt.link = link;
if (typeof opt.onselect === 'string' || opt.shortcut) {
var shortcut = opt.shortcut || RED.keyboard.getShortcut(opt.onselect);
if (shortcut && shortcut.key) {
opt.shortcutSpan = $('<span class="red-ui-popover-key">'+RED.keyboard.formatKey(shortcut.key, true)+'</span>').appendTo(link.find(".red-ui-menu-label"));
}
}
menuItems[opt.id] = opt;
@@ -119,19 +131,45 @@ RED.menu = (function() {
});
}
if (opt.options) {
item.addClass("red-ui-menu-dropdown-submenu pull-left");
item.addClass("red-ui-menu-dropdown-submenu"+(opt.direction!=='right'?" pull-left":""));
var submenu = $('<ul id="'+opt.id+'-submenu" class="red-ui-menu-dropdown"></ul>').appendTo(item);
var hasIcons = false
var hasSubmenus = false
for (var i=0;i<opt.options.length;i++) {
if (opt.options[i]) {
if (opt.onpreselect && opt.options[i].onpreselect === undefined) {
opt.options[i].onpreselect = opt.onpreselect
}
if (opt.onpostselect && opt.options[i].onpostselect === undefined) {
opt.options[i].onpostselect = opt.onpostselect
}
opt.options[i].direction = opt.direction
hasIcons = hasIcons || (opt.options[i].icon);
hasSubmenus = hasSubmenus || (opt.options[i].options);
}
var li = createMenuItem(opt.options[i]);
if (li) {
li.appendTo(submenu);
}
}
if (!hasIcons) {
submenu.addClass("red-ui-menu-dropdown-noicons")
}
if (hasSubmenus) {
submenu.addClass("red-ui-menu-dropdown-submenus")
}
}
if (opt.disabled) {
item.addClass("disabled");
}
if (opt.visible === false) {
item.addClass("hide");
}
}
@@ -140,7 +178,9 @@ RED.menu = (function() {
}
function createMenu(options) {
var topMenu = $("<ul/>",{class:"red-ui-menu red-ui-menu-dropdown pull-right"});
if (options.direction) {
topMenu.addClass("red-ui-menu-dropdown-direction-"+options.direction)
}
if (options.id) {
topMenu.attr({id:options.id+"-submenu"});
var menuParent = $("#"+options.id);
@@ -166,9 +206,22 @@ RED.menu = (function() {
}
var lastAddedSeparator = false;
var hasSubmenus = false;
var hasIcons = false;
for (var i=0;i<options.options.length;i++) {
var opt = options.options[i];
if (opt) {
if (options.onpreselect && opt.onpreselect === undefined) {
opt.onpreselect = options.onpreselect
}
if (options.onpostselect && opt.onpostselect === undefined) {
opt.onpostselect = options.onpostselect
}
opt.direction = options.direction || 'left'
}
if (opt !== null || !lastAddedSeparator) {
hasIcons = hasIcons || (opt && opt.icon);
hasSubmenus = hasSubmenus || (opt && opt.options);
var li = createMenuItem(opt);
if (li) {
li.appendTo(topMenu);
@@ -176,13 +229,21 @@ RED.menu = (function() {
}
}
}
if (!hasIcons) {
topMenu.addClass("red-ui-menu-dropdown-noicons")
}
if (hasSubmenus) {
topMenu.addClass("red-ui-menu-dropdown-submenus")
}
return topMenu;
}
function triggerAction(id, args) {
var opt = menuItems[id];
var callback = opt.onselect;
if (opt.onpreselect) {
opt.onpreselect.call(opt,args)
}
if (typeof opt.onselect === 'string') {
callback = RED.actions.get(opt.onselect);
}
@@ -191,6 +252,9 @@ RED.menu = (function() {
} else {
console.log("No callback for",id,opt.onselect);
}
if (opt.onpostselect) {
opt.onpostselect.call(opt,args)
}
}
function isSelected(id) {
@@ -242,6 +306,14 @@ RED.menu = (function() {
}
}
function setVisible(id,state) {
if (!state) {
$("#"+id).parent().addClass("hide");
} else {
$("#"+id).parent().removeClass("hide");
}
}
function addItem(id,opt) {
var item = createMenuItem(opt);
if (opt !== null && opt.group) {
@@ -276,14 +348,32 @@ RED.menu = (function() {
}
}
function refreshShortcuts() {
for (var id in menuItems) {
if (menuItems.hasOwnProperty(id)) {
var opt = menuItems[id];
if (typeof opt.onselect === "string" && opt.shortcutSpan) {
opt.shortcutSpan.remove();
delete opt.shortcutSpan;
var shortcut = RED.keyboard.getShortcut(opt.onselect);
if (shortcut && shortcut.key) {
opt.shortcutSpan = $('<span class="red-ui-popover-key">'+RED.keyboard.formatKey(shortcut.key, true)+'</span>').appendTo(opt.link.find(".red-ui-menu-label"));
}
}
}
}
}
return {
init: createMenu,
setSelected: setSelected,
isSelected: isSelected,
toggleSelected: toggleSelected,
setDisabled: setDisabled,
setVisible: setVisible,
addItem: addItem,
removeItem: removeItem,
setAction: setAction
setAction: setAction,
refreshShortcuts: refreshShortcuts
}
})();

View File

@@ -13,24 +13,138 @@
* See the License for the specific language governing permissions and
* limitations under the License.
**/
/*
* RED.popover.create(options) - create a popover callout box
* RED.popover.tooltip(target,content, action) - add a tooltip to an element
* RED.popover.menu(options) - create a dropdown menu
* RED.popover.panel(content) - create a dropdown container element
*/
/*
* RED.popover.create(options)
*
* options
* - target : DOM element - the element to target with the popover
* - direction : string - position of the popover relative to target
* 'top', 'right'(default), 'bottom', 'left', 'inset-[top,right,bottom,left]'
* - trigger : string - what triggers the popover to be displayed
* 'hover' - display when hovering the target
* 'click' - display when target is clicked
* 'modal' - hmm not sure, need to find where we use that mode
* - content : string|function - contents of the popover. If a string, handled
* as raw HTML, so take care.
* If a function, can return a String to be added
* as text (not HTML), or a DOM element to append
* - delay : object - sets show/hide delays after mouseover/out events
* { show: 750, hide: 50 }
* - autoClose : number - delay before closing the popover in some cases
* if trigger is click - delay after mouseout
* else if trigger not hover/modal - delay after showing
* - width : number - width of popover, default 'auto'
* - maxWidth : number - max width of popover, default 'auto'
* - size : string - scale of popover. 'default', 'small'
* - offset : number - px offset from target
* - tooltip : boolean - if true, clicking on popover closes it
* - class : string - optional css class to apply to popover
* - interactive : if trigger is 'hover' and this is set to true, allow the mouse
* to move over the popover without hiding it.
*
* Returns the popover object with the following properties/functions:
* properties:
* - element : DOM element - the popover dom element
* functions:
* - setContent(content) - change the popover content. This only works if the
* popover is not currently displayed. It does not
* change the content of a visible popover.
* - open(instant) - show the popover. If 'instant' is true, don't fade in
* - close(instant) - hide the popover. If 'instant' is true, don't fade out
* - move(options) - move the popover. The options parameter can take many
* of the options detailed above including:
* target,direction,content,width,offset
* Other settings probably won't work because we haven't needed to change them
*/
/*
* RED.popover.tooltip(target,content, action)
*
* - target : DOM element - the element to apply the tooltip to
* - content : string - the text of the tooltip
* - action : string - *optional* the name of an Action this tooltip is tied to
* For example, it 'target' is a button that triggers a particular action.
* The tooltip will include the keyboard shortcut for the action
* if one is defined
*
*/
/*
* RED.popover.menu(options)
*
* options
* - options : array - list of menu options - see below for format
* - width : number - width of the menu. Default: 'auto'
* - class : string - class to apply to the menu container
* - maxHeight : number - maximum height of menu before scrolling items. Default: none
* - onselect : function(item) - called when a menu item is selected, if that item doesn't
* have its own onselect function
* - onclose : function(cancelled) - called when the menu is closed
* - disposeOnClose : boolean - by default, the menu is discarded when it closes
* and mustbe rebuilt to redisplay. Setting this to 'false'
* keeps the menu on the DOM so it can be shown again.
*
* Menu Options array:
* [
* label : string|DOM element - the label of the item. Can be custom DOM element
* onselect : function - called when the item is selected
* ]
*
* Returns the menu object with the following functions:
*
* - options([menuItems]) - if menuItems is undefined, returns the current items.
* otherwise, sets the current menu items
* - show(opts) - shows the menu. `opts` is an object of options. See RED.popover.panel.show(opts)
* for the full list of options. In most scenarios, this just needs:
* - target : DOM element - the element to display the menu below
* - hide(cancelled) - hide the menu
*/
/*
* RED.popover.panel(content)
* Create a UI panel that can be displayed relative to any target element.
* Handles auto-closing when mouse clicks outside the panel
*
* - 'content' - DOM element to display in the panel
*
* Returns the panel object with the following functions:
*
* properties:
* - container : DOM element - the panel element
*
* functions:
* - show(opts) - show the panel.
* opts:
* - onclose : function - called when the panel closes
* - closeButton : DOM element - if the panel is closeable by a click of a button,
* by providing a reference to it here, we can
* handle the events properly to hide the panel
* - target : DOM element - the element to display the panel relative to
* - align : string - should the panel align to the left or right edge of target
* default: 'right'
* - offset : Array - px offset to apply from the target. [width, height]
* - dispose : boolean - whether the panel should be removed from DOM when hidden
* default: true
* - hide(dispose) - hide the panel.
*/
RED.popover = (function() {
var deltaSizes = {
"default": {
top: 10,
topTop: 30,
leftRight: 17,
leftLeft: 25,
leftBottom: 8,
leftTop: 11
x: 12,
y: 12
},
"small": {
top: 6,
topTop: 20,
leftRight: 8,
leftLeft: 26,
leftBottom: 8,
leftTop: 9
x:8,
y:8
}
}
function createPopover(options) {
@@ -41,7 +155,9 @@ RED.popover = (function() {
var delay = options.delay || { show: 750, hide: 50 };
var autoClose = options.autoClose;
var width = options.width||"auto";
var maxWidth = options.maxWidth;
var size = options.size||"default";
var popupOffset = options.offset || 0;
if (!deltaSizes[size]) {
throw new Error("Invalid RED.popover size value:",size);
}
@@ -49,6 +165,8 @@ RED.popover = (function() {
var timer = null;
var active;
var div;
var contentDiv;
var currentStyle;
var openPopup = function(instant) {
if (active) {
@@ -58,6 +176,10 @@ RED.popover = (function() {
return;
}
div = $('<div class="red-ui-popover"></div>');
if (options.class) {
div.addClass(options.class);
}
contentDiv = $('<div class="red-ui-popover-content">').appendTo(div);
if (size !== "default") {
div.addClass("red-ui-popover-size-"+size);
}
@@ -67,71 +189,23 @@ RED.popover = (function() {
return;
}
if (typeof result === 'string') {
div.text(result);
contentDiv.text(result);
} else {
div.append(result);
contentDiv.append(result);
}
} else {
div.html(content);
}
if (width !== "auto") {
div.width(width);
contentDiv.html(content);
}
div.appendTo("body");
var targetPos = target.offset();
var targetWidth = target.outerWidth();
var targetHeight = target.outerHeight();
var divHeight = div.height();
var divWidth = div.width();
var paddingRight = 10;
movePopup({target,direction,width,maxWidth});
var viewportTop = $(window).scrollTop();
var viewportLeft = $(window).scrollLeft();
var viewportBottom = viewportTop + $(window).height();
var viewportRight = viewportLeft + $(window).width();
var top = 0;
var left = 0;
var d = direction;
if (d === 'right') {
top = targetPos.top+targetHeight/2-divHeight/2-deltaSizes[size].top;
left = targetPos.left+targetWidth+deltaSizes[size].leftRight;
} else if (d === 'left') {
top = targetPos.top+targetHeight/2-divHeight/2-deltaSizes[size].top;
left = targetPos.left-deltaSizes[size].leftLeft-divWidth;
} else if (d === 'bottom') {
top = targetPos.top+targetHeight+deltaSizes[size].top;
left = targetPos.left+targetWidth/2-divWidth/2 - deltaSizes[size].leftBottom;
if (left < 0) {
d = "right";
top = targetPos.top+targetHeight/2-divHeight/2-deltaSizes[size].top;
left = targetPos.left+targetWidth+deltaSizes[size].leftRight;
} else if (left+divWidth+paddingRight > viewportRight) {
d = "left";
top = targetPos.top+targetHeight/2-divHeight/2-deltaSizes[size].top;
left = targetPos.left-deltaSizes[size].leftLeft-divWidth;
if (top+divHeight+targetHeight/2 + 5 > viewportBottom) {
top -= (top+divHeight+targetHeight/2 - viewportBottom + 5)
}
} else if (top+divHeight > viewportBottom) {
d = 'top';
top = targetPos.top-deltaSizes[size].topTop-divHeight;
left = targetPos.left+targetWidth/2-divWidth/2 - deltaSizes[size].leftTop;
}
} else if (d === 'top') {
top = targetPos.top-deltaSizes[size].topTop-divHeight;
left = targetPos.left+targetWidth/2-divWidth/2 - deltaSizes[size].leftTop;
if (top < 0) {
d = 'bottom';
top = targetPos.top+targetHeight+deltaSizes[size].top;
left = targetPos.left+targetWidth/2-divWidth/2 - deltaSizes[size].leftBottom;
}
}
div.addClass('red-ui-popover-'+d).css({top: top, left: left});
if (existingPopover) {
existingPopover.close(true);
}
target.data("red-ui-popover",res)
if (options.trigger !== 'manual') {
target.data("red-ui-popover",res)
}
if (options.tooltip) {
div.on("mousedown", function(evt) {
closePopup(true);
@@ -161,6 +235,104 @@ RED.popover = (function() {
}
}
}
var movePopup = function(options) {
target = options.target || target;
direction = options.direction || direction || "right";
popupOffset = options.offset || popupOffset;
var transition = options.transition;
var width = options.width||"auto";
div.width(width);
if (options.maxWidth) {
div.css("max-width",options.maxWidth)
} else {
div.css("max-width", 'auto');
}
var targetPos = target[0].getBoundingClientRect();
var targetHeight = targetPos.height;
var targetWidth = targetPos.width;
var divHeight = div.outerHeight();
var divWidth = div.outerWidth();
var paddingRight = 10;
var viewportTop = $(window).scrollTop();
var viewportLeft = $(window).scrollLeft();
var viewportBottom = viewportTop + $(window).height();
var viewportRight = viewportLeft + $(window).width();
var top = 0;
var left = 0;
if (direction === 'right') {
top = targetPos.top+targetHeight/2-divHeight/2;
left = targetPos.left+targetWidth+deltaSizes[size].x+popupOffset;
} else if (direction === 'left') {
top = targetPos.top+targetHeight/2-divHeight/2;
left = targetPos.left-deltaSizes[size].x-divWidth-popupOffset;
} else if (direction === 'bottom') {
top = targetPos.top+targetHeight+deltaSizes[size].y+popupOffset;
left = targetPos.left+targetWidth/2-divWidth/2;
if (left < 0) {
direction = "right";
top = targetPos.top+targetHeight/2-divHeight/2;
left = targetPos.left+targetWidth+deltaSizes[size].x+popupOffset;
} else if (left+divWidth+paddingRight > viewportRight) {
direction = "left";
top = targetPos.top+targetHeight/2-divHeight/2;
left = targetPos.left-deltaSizes[size].x-divWidth-popupOffset;
if (top+divHeight+targetHeight/2 + 5 > viewportBottom) {
top -= (top+divHeight+targetHeight/2 - viewportBottom + 5)
}
} else if (top+divHeight > viewportBottom) {
direction = 'top';
top = targetPos.top-deltaSizes[size].y-divHeight-popupOffset;
left = targetPos.left+targetWidth/2-divWidth/2;
}
} else if (direction === 'top') {
top = targetPos.top-deltaSizes[size].y-divHeight-popupOffset;
left = targetPos.left+targetWidth/2-divWidth/2;
if (top < 0) {
direction = 'bottom';
top = targetPos.top+targetHeight+deltaSizes[size].y+popupOffset;
left = targetPos.left+targetWidth/2-divWidth/2;
}
} else if (/inset/.test(direction)) {
top = targetPos.top + targetHeight/2 - divHeight/2;
left = targetPos.left + targetWidth/2 - divWidth/2;
if (/bottom/.test(direction)) {
top = targetPos.top + targetHeight - divHeight-popupOffset;
}
if (/top/.test(direction)) {
top = targetPos.top+popupOffset;
}
if (/left/.test(direction)) {
left = targetPos.left+popupOffset;
}
if (/right/.test(direction)) {
left = targetPos.left + targetWidth - divWidth-popupOffset;
}
}
if (currentStyle) {
div.removeClass(currentStyle);
}
if (transition) {
div.css({
"transition": "0.6s ease",
"transition-property": "top,left,right,bottom"
})
}
currentStyle = 'red-ui-popover-'+direction;
div.addClass(currentStyle).css({top: top, left: left});
if (transition) {
setTimeout(function() {
div.css({
"transition": "none"
});
},600);
}
}
var closePopup = function(instant) {
$(document).off('mousedown.red-ui-popover');
if (!active) {
@@ -178,6 +350,16 @@ 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);
@@ -236,8 +418,10 @@ RED.popover = (function() {
},autoClose);
}
var res = {
get element() { return div },
setContent: function(_content) {
content = _content;
return res;
},
open: function (instant) {
@@ -249,6 +433,10 @@ RED.popover = (function() {
active = false;
closePopup(instant);
return res;
},
move: function(options) {
movePopup(options);
return
}
}
return res;
@@ -258,18 +446,17 @@ RED.popover = (function() {
return {
create: createPopover,
tooltip: function(target,content, action) {
var label = content;
if (action) {
label = function() {
var label = content;
var label = function() {
var label = content;
if (action) {
var shortcut = RED.keyboard.getShortcut(action);
if (shortcut && shortcut.key) {
label = $('<span>'+content+' <span class="red-ui-popover-key">'+RED.keyboard.formatKey(shortcut.key, true)+'</span></span>');
}
return label;
}
return label;
}
return RED.popover.create({
var popover = RED.popover.create({
tooltip: true,
target:target,
trigger: "hover",
@@ -278,6 +465,19 @@ RED.popover = (function() {
content: label,
delay: { show: 750, hide: 50 }
});
popover.setContent = function(newContent) {
content = newContent;
}
popover.setAction = function(newAction) {
action = newAction;
}
popover.delete = function() {
popover.close(true)
target.off("mouseenter");
target.off("mouseleave");
};
return popover;
},
menu: function(options) {
var list = $('<ul class="red-ui-menu"></ul>');
@@ -286,20 +486,47 @@ RED.popover = (function() {
}
var menuOptions = options.options || [];
var first;
menuOptions.forEach(function(opt) {
var item = $('<li>').appendTo(list);
var link = $('<a href="#"></a>').text(opt.label).appendTo(item);
link.on("click", function(evt) {
evt.preventDefault();
if (opt.onselect) {
opt.onselect();
}
menu.hide();
})
if (!first) { first = link}
})
var container = RED.popover.panel(list);
if (options.width) {
container.container.width(options.width);
}
if (options.class) {
container.container.addClass(options.class);
}
if (options.maxHeight) {
container.container.css({
"max-height": options.maxHeight,
"overflow-y": 'auto'
})
}
var menu = {
options: function(opts) {
if (opts === undefined) {
return menuOptions
}
menuOptions = opts || [];
list.empty();
menuOptions.forEach(function(opt) {
var item = $('<li>').appendTo(list);
var link = $('<a href="#"></a>').appendTo(item);
if (typeof opt.label == "string") {
link.text(opt.label)
} else if (opt.label){
opt.label.appendTo(link);
}
link.on("click", function(evt) {
evt.preventDefault();
if (opt.onselect) {
opt.onselect();
} else if (options.onselect) {
options.onselect(opt);
}
menu.hide();
})
if (!first) { first = link}
})
},
show: function(opts) {
$(document).on("keydown.red-ui-menu", function(evt) {
var currentItem = list.find(":focus").parent();
@@ -308,11 +535,9 @@ RED.popover = (function() {
// DOWN
if (currentItem.length > 0) {
if (currentItem.index() === menuOptions.length-1) {
console.log("WARP TO TOP")
// Wrap to top of list
list.children().first().children().first().focus();
} else {
console.log("GO DOWN ONE")
currentItem.next().children().first().focus();
}
} else {
@@ -323,11 +548,9 @@ RED.popover = (function() {
// UP
if (currentItem.length > 0) {
if (currentItem.index() === 0) {
console.log("WARP TO BOTTOM")
// Wrap to bottom of list
list.children().last().children().first().focus();
} else {
console.log("GO UP ONE")
currentItem.prev().children().first().focus();
}
} else {
@@ -337,6 +560,11 @@ RED.popover = (function() {
// ESCAPE
evt.preventDefault();
menu.hide(true);
} else if (evt.keyCode === 9 && options.tabSelect) {
// TAB - with tabSelect enabled
evt.preventDefault();
currentItem.find("a").trigger("click");
}
evt.stopPropagation();
})
@@ -356,6 +584,7 @@ RED.popover = (function() {
}
}
}
menu.options(menuOptions);
return menu;
},
panel: function(content) {
@@ -363,7 +592,6 @@ RED.popover = (function() {
panel.css({ display: "none" });
panel.appendTo(document.body);
content.appendTo(panel);
var closeCallback;
function hide(dispose) {
$(document).off("mousedown.red-ui-popover-panel-close");
@@ -378,22 +606,26 @@ RED.popover = (function() {
}
function show(options) {
var closeCallback = options.onclose;
var closeButton = options.closeButton;
var target = options.target;
var align = options.align || "right";
var offset = options.offset || [0,0];
var xPos = options.x;
var yPos = options.y;
var isAbsolutePosition = (xPos !== undefined && yPos !== undefined)
var pos = target.offset();
var targetWidth = target.width();
var targetHeight = target.height();
var pos = isAbsolutePosition?{left:xPos, top: yPos}:target.offset();
var targetWidth = isAbsolutePosition?0:target.width();
var targetHeight = isAbsolutePosition?0:target.outerHeight();
var panelHeight = panel.height();
var panelWidth = panel.width();
var top = (targetHeight+pos.top) + offset[1];
if (top+panelHeight > $(window).height()) {
if (top+panelHeight-$(document).scrollTop() > $(window).height()) {
top -= (top+panelHeight)-$(window).height() + 5;
}
if (top < 0) {
panelHeight.height(panelHeight+top)
panel.height(panelHeight+top)
top = 0;
}
if (align === "right") {
@@ -420,7 +652,8 @@ RED.popover = (function() {
});
$(document).on("mousedown.red-ui-popover-panel-close", function(event) {
if(!$(event.target).closest(panel).length && !$(event.target).closest(".red-ui-editor-dialog").length) {
var hitCloseButton = closeButton && $(event.target).closest(closeButton).length;
if(!hitCloseButton && !$(event.target).closest(panel).length && !$(event.target).closest(".red-ui-editor-dialog").length) {
if (closeCallback) {
closeCallback();
}

View File

@@ -105,8 +105,8 @@
}
});
this.element.on("keydown",function(e) {
if (!menuShown && e.keyCode === 40) {
//DOWN
if (!menuShown && e.keyCode === 40 && $(this).val() === '') {
//DOWN (only show menu if search field is emty)
showMenu();
}
});

View File

@@ -38,6 +38,7 @@ RED.tabs = (function() {
if (options.vertical) {
wrapper.addClass("red-ui-tabs-vertical");
}
if (options.addButton) {
wrapper.addClass("red-ui-tabs-add");
var addButton = $('<div class="red-ui-tab-button red-ui-tabs-add"><a href="#"><i class="fa fa-plus"></i></a></div>').appendTo(wrapper);
@@ -75,6 +76,8 @@ RED.tabs = (function() {
});
}
if (options.searchButton) {
// This is soft-deprecated as we don't use this in the core anymore
// We no use the `menu` option to provide a drop-down list of actions
wrapper.addClass("red-ui-tabs-search");
var searchButton = $('<div class="red-ui-tab-button red-ui-tabs-search"><a href="#"><i class="fa fa-list-ul"></i></a></div>').appendTo(wrapper);
searchButton.find('a').on("click", function(evt) {
@@ -94,17 +97,100 @@ RED.tabs = (function() {
}
}
if (options.menu) {
wrapper.addClass("red-ui-tabs-menu");
var menuButton = $('<div class="red-ui-tab-button red-ui-tabs-menu"><a href="#"><i class="fa fa-caret-down"></i></a></div>').appendTo(wrapper);
var menuButtonLink = menuButton.find('a')
var menuOpen = false;
var menu;
menuButtonLink.on("click", function(evt) {
evt.stopPropagation();
evt.preventDefault();
if (menuOpen) {
menu.remove();
menuOpen = false;
return;
}
menuOpen = true;
var menuOptions = [];
if (typeof options.searchButton === '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");
menu.css({
position: "absolute"
})
menu.appendTo("body");
var elementPos = menuButton.offset();
menu.css({
top: (elementPos.top+menuButton.height()-2)+"px",
left: (elementPos.left - menu.width() + menuButton.width())+"px"
})
$(".red-ui-menu.red-ui-menu-dropdown").hide();
$(document).on("click.red-ui-tabmenu", function(evt) {
$(document).off("click.red-ui-tabmenu");
menuOpen = false;
menu.remove();
});
menu.show();
})
}
if (options.contextmenu) {
wrapper.on('contextmenu', function(evt) {
let clickedTab
let target = evt.target
while(target.nodeName !== 'A' && target.nodeName !== 'UL' && target.nodeName !== 'BODY') {
target = target.parentNode
}
if (target.nodeName === 'A') {
const href = target.getAttribute('href')
if (href) {
clickedTab = tabs[href.slice(1)]
}
}
evt.preventDefault()
evt.stopPropagation()
RED.contextMenu.show({
x:evt.clientX-5,
y:evt.clientY-5,
options: options.contextmenu(clickedTab)
})
return false
})
}
var scrollLeft;
var scrollRight;
if (options.scrollable) {
wrapper.addClass("red-ui-tabs-scrollable");
scrollContainer.addClass("red-ui-tabs-scroll-container");
scrollContainer.on("scroll",updateScroll);
scrollContainer.on("scroll",function(evt) {
// Generated by trackpads - not mousewheel
updateScroll(evt);
});
scrollContainer.on("wheel", function(evt) {
if (evt.originalEvent.deltaX === 0) {
// Prevent the scroll event from firing
evt.preventDefault();
// Assume this is wheel event which might not trigger
// the scroll event, so do things manually
var sl = scrollContainer.scrollLeft();
sl += evt.originalEvent.deltaY;
scrollContainer.scrollLeft(sl);
}
})
scrollLeft = $('<div class="red-ui-tab-button red-ui-tab-scroll red-ui-tab-scroll-left"><a href="#" style="display:none;"><i class="fa fa-caret-left"></i></a></div>').appendTo(wrapper).find("a");
scrollLeft.on('mousedown',function(evt) { scrollEventHandler(evt,'-=150') }).on('click',function(evt){ evt.preventDefault();});
scrollLeft.on('mousedown',function(evt) {scrollEventHandler(evt, evt.shiftKey?('-='+scrollContainer.scrollLeft()):'-=150') }).on('click',function(evt){ evt.preventDefault();});
scrollRight = $('<div class="red-ui-tab-button red-ui-tab-scroll red-ui-tab-scroll-right"><a href="#" style="display:none;"><i class="fa fa-caret-right"></i></a></div>').appendTo(wrapper).find("a");
scrollRight.on('mousedown',function(evt) { scrollEventHandler(evt,'+=150') }).on('click',function(evt){ evt.preventDefault();});
scrollRight.on('mousedown',function(evt) { scrollEventHandler(evt,evt.shiftKey?('+='+(scrollContainer[0].scrollWidth - scrollContainer.width()-scrollContainer.scrollLeft())):'+=150') }).on('click',function(evt){ evt.preventDefault();});
}
if (options.collapsible) {
@@ -322,6 +408,12 @@ RED.tabs = (function() {
if (link.length === 0) {
return;
}
if (link.parent().hasClass("hide-tab")) {
link.parent().removeClass("hide-tab").removeClass("hide");
if (options.onshow) {
options.onshow(tabs[link.attr('href').slice(1)])
}
}
if (!link.parent().hasClass("active")) {
ul.children().removeClass("active");
ul.children().css({"transition": "width 100ms"});
@@ -347,13 +439,13 @@ RED.tabs = (function() {
}
}
function activatePreviousTab() {
var previous = ul.find("li.active").prev();
var previous = findPreviousVisibleTab();
if (previous.length > 0) {
activateTab(previous.find("a"));
}
}
function activateNextTab() {
var next = ul.find("li.active").next();
var next = findNextVisibleTab();
if (next.length > 0) {
activateTab(next.find("a"));
}
@@ -363,7 +455,9 @@ RED.tabs = (function() {
if (options.vertical) {
return;
}
var tabs = ul.find("li.red-ui-tab");
var allTabs = ul.find("li.red-ui-tab");
var tabs = allTabs.filter(":not(.hide-tab)");
var hiddenTabs = allTabs.filter(".hide-tab");
var width = wrapper.width();
var tabCount = tabs.length;
var tabWidth;
@@ -373,7 +467,7 @@ RED.tabs = (function() {
var visibleCount = collapsedButtonsRow.children(":visible").length;
tabWidth = width - collapsedButtonsRow.width()-10;
var maxTabWidth = 198;
var minTabWidth = 80;
var minTabWidth = 120;
if (tabWidth <= minTabWidth || (tabWidth < maxTabWidth && visibleCount > 5)) {
// The tab is too small. Hide the next button to make room
// Start at the end of the button row, -1 for the menu button
@@ -431,6 +525,7 @@ RED.tabs = (function() {
// }
tabs.css({width:currentTabWidth});
hiddenTabs.css({width:"0px"});
if (tabWidth < 50) {
// ul.find(".red-ui-tab-close").hide();
ul.find(".red-ui-tab-icon").hide();
@@ -471,12 +566,19 @@ RED.tabs = (function() {
}
var li = ul.find("a[href='#"+id+"']").parent();
if (li.hasClass("active")) {
var tab = li.prev();
var tab = findPreviousVisibleTab(li);
if (tab.length === 0) {
tab = li.next();
tab = findNextVisibleTab(li);
}
if (tab.length > 0) {
activateTab(tab.find("a"));
} else {
if (options.onchange) {
options.onchange(null);
}
}
activateTab(tab.find("a"));
}
li.remove();
if (tabs[id].pinned) {
pinnedTabsCount--;
@@ -492,6 +594,75 @@ RED.tabs = (function() {
}
}
function findPreviousVisibleTab(li) {
if (!li) {
li = ul.find("li.active");
}
var previous = li.prev();
while(previous.length > 0 && previous.hasClass("hide-tab")) {
previous = previous.prev();
}
return previous;
}
function findNextVisibleTab(li) {
if (!li) {
li = ul.find("li.active");
}
var next = li.next();
while(next.length > 0 && next.hasClass("hide-tab")) {
next = next.next();
}
return next;
}
function showTab(id) {
if (tabs[id]) {
var li = ul.find("a[href='#"+id+"']").parent();
if (li.hasClass("hide-tab")) {
li.removeClass("hide-tab").removeClass("hide");
if (ul.find("li.red-ui-tab:not(.hide-tab)").length === 1) {
activateTab(li.find("a"))
}
updateTabWidths();
if (options.onshow) {
options.onshow(tabs[id])
}
}
}
}
function hideTab(id) {
if (tabs[id]) {
var li = ul.find("a[href='#"+id+"']").parent();
if (!li.hasClass("hide-tab")) {
if (li.hasClass("active")) {
var tab = findPreviousVisibleTab(li);
if (tab.length === 0) {
tab = findNextVisibleTab(li);
}
if (tab.length > 0) {
activateTab(tab.find("a"));
} else {
if (options.onchange) {
options.onchange(null);
}
}
}
li.removeClass("active");
li.one("transitionend", function(evt) {
li.addClass("hide");
updateTabWidths();
if (options.onhide) {
options.onhide(tabs[id])
}
setTimeout(function() {
updateScroll()
},200)
})
li.addClass("hide-tab");
li.css({width:0})
}
}
}
var tabAPI = {
addTab: function(tab,targetIndex) {
if (options.onselect) {
@@ -521,7 +692,7 @@ RED.tabs = (function() {
}
var link = $("<a/>",{href:"#"+tab.id, class:"red-ui-tab-label"}).appendTo(li);
if (tab.icon) {
$('<img src="'+tab.icon+'" class="red-ui-tab-icon"/>').appendTo(link);
$('<i>',{class:"red-ui-tab-icon", style:"mask-image: url("+tab.icon+"); -webkit-mask-image: url("+tab.icon+");"}).appendTo(link);
} else if (tab.iconClass) {
$('<i>',{class:"red-ui-tab-icon "+tab.iconClass}).appendTo(link);
}
@@ -648,6 +819,7 @@ RED.tabs = (function() {
link.on("click", function(evt) { evt.preventDefault(); })
link.on("dblclick", function(evt) { evt.stopPropagation(); evt.preventDefault(); })
$('<span class="red-ui-tabs-fade"></span>').appendTo(li);
if (tab.closeable) {
li.addClass("red-ui-tabs-closeable")
@@ -657,17 +829,31 @@ RED.tabs = (function() {
event.preventDefault();
removeTab(tab.id);
});
RED.popover.tooltip(closeLink,RED._("workspace.closeFlow"));
}
// if (tab.hideable) {
// li.addClass("red-ui-tabs-closeable")
// 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);
if (options.onselect) {
$('<i class="red-ui-tabs-badge-changed fa fa-circle"></i>').appendTo(badges);
$('<i class="red-ui-tabs-badge-selected fa fa-check-circle"></i>').appendTo(badges);
}
// link.attr("title",tab.label);
RED.popover.tooltip(link,function() { return RED.utils.sanitize(tab.label); });
if (options.onadd) {
options.onadd(tab);
}
link.attr("title",tab.label);
if (ul.find("li.red-ui-tab").length == 1) {
activateTab(link);
}
@@ -768,19 +954,40 @@ RED.tabs = (function() {
previousTab: activatePreviousTab,
resize: updateTabWidths,
count: function() {
return ul.find("li.red-ui-tab").length;
return ul.find("li.red-ui-tab:not(.hide)").length;
},
activeIndex: function() {
return ul.find("li.active").index()
},
getTabIndex: function (id) {
return ul.find("a[href='#"+id+"']").parent().index()
},
contains: function(id) {
return ul.find("a[href='#"+id+"']").length > 0;
},
showTab: showTab,
hideTab: hideTab,
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();
},
listTabs: function() {
return $.makeArray(ul.children().map(function() { return $(this).data('tabId');}));
},
selection: getSelection,
clearSelection: function() {
if (options.onselect) {
var selection = ul.find("li.red-ui-tab.selected");
if (selection.length > 0) {
selection.removeClass("selected");
selectionChanged();
}
}
},
order: function(order) {
preferredOrder = order;
var existingTabOrder = $.makeArray(ul.children().map(function() { return $(this).data('tabId');}));

View File

@@ -48,7 +48,7 @@
});
this.button = $('<button type="button" class="red-ui-toggleButton '+baseClass+' toggle single"></button>');
if (enabledLabel || disabledLabel) {
this.buttonLabel = $("<span>").appendTo(this.button);
this.buttonLabel = $("<span>").appendTo(this.button).css("margin-left", "5px");
}
if (this.options.class) {

View File

@@ -21,9 +21,13 @@
* - multi : boolean - if true, .selected will return an array of results
* otherwise, returns the first selected item
* - sortable: boolean/string - TODO: see editableList
* - selectable: boolean - default true - whether individual items can be selected
* - rootSortable: boolean - if 'sortable' is set, then setting this to
* false, prevents items being sorted to the
* top level of the tree
* - autoSelect: boolean - default true - triggers item selection when navigating
* list by keyboard. If the list has checkboxed items
* you probably want to set this to false
*
* methods:
* - data(items) - clears existing items and replaces with new data
@@ -41,6 +45,7 @@
* sublabel: 'Local', // a sub-label for the item
* icon: 'fa fa-rocket', // (optional) icon for the item
* checkbox: true/false, // (optional) if present, display checkbox accordingly
* radio: 'group-name', // (optional) if present, display radio box - using group-name to set radio group
* selected: true/false, // (optional) whether the item is selected or not
* children: [] | function(done,item) // (optional) an array of child items, or a function
* // that will call the `done` callback with an array
@@ -49,6 +54,7 @@
* deferBuild: true/false, // don't build any ui elements for the item's children
* until it is expanded by the user.
* element: // custom dom element to use for the item - ignored if `label` is set
* collapsible: true/false, // prevent a parent item from being collapsed. default true.
* }
* ]
*
@@ -89,77 +95,100 @@
$.widget( "nodered.treeList", {
_create: function() {
var that = this;
var autoSelect = true;
if (that.options.autoSelect === false) {
autoSelect = false;
}
this.element.addClass('red-ui-treeList');
this.element.attr("tabIndex",0);
var wrapper = $('<div>',{class:'red-ui-treeList-container'}).appendTo(this.element);
this.element.on('keydown', function(evt) {
var selected = that._topList.find(".selected").parent().data('data');
if (!selected && (evt.keyCode === 40 || evt.keyCode === 38)) {
that.select(that._data[0]);
var focussed = that._topList.find(".focus").parent().data('data');
if (!focussed && (evt.keyCode === 40 || evt.keyCode === 38)) {
if (that._data[0]) {
if (autoSelect) {
that.select(that._data[0]);
} else {
that._topList.find(".focus").removeClass("focus")
}
that._data[0].treeList.label.addClass('focus')
}
return;
}
var target;
switch(evt.keyCode) {
case 32: // SPACE
case 13: // ENTER
if (!that.options.selectable) { return }
if (evt.altKey || evt.ctrlKey || evt.metaKey || evt.shiftKey) {
return
}
evt.preventDefault();
evt.stopPropagation();
if (selected.children) {
if (selected.treeList.container.hasClass("expanded")) {
selected.treeList.collapse()
if (focussed.checkbox) {
focussed.treeList.checkbox.trigger("click");
} else if (focussed.radio) {
focussed.treeList.radio.trigger("click");
} else if (focussed.children) {
if (focussed.treeList.container.hasClass("expanded")) {
focussed.treeList.collapse()
} else {
selected.treeList.expand()
focussed.treeList.expand()
}
} else {
that._trigger("confirm",null,selected)
that._trigger("confirm",null,focussed)
}
break;
case 37: // LEFT
evt.preventDefault();
evt.stopPropagation();
if (selected.children&& selected.treeList.container.hasClass("expanded")) {
selected.treeList.collapse()
} else if (selected.parent) {
target = selected.parent;
if (focussed.children&& focussed.treeList.container.hasClass("expanded")) {
focussed.treeList.collapse()
} else if (focussed.parent) {
target = focussed.parent;
}
break;
case 38: // UP
evt.preventDefault();
evt.stopPropagation();
target = that._getPreviousSibling(selected);
target = that._getPreviousSibling(focussed);
if (target) {
target = that._getLastDescendant(target);
}
if (!target && selected.parent) {
target = selected.parent;
if (!target && focussed.parent) {
target = focussed.parent;
}
break;
case 39: // RIGHT
evt.preventDefault();
evt.stopPropagation();
if (selected.children) {
if (!selected.treeList.container.hasClass("expanded")) {
selected.treeList.expand()
if (focussed.children) {
if (!focussed.treeList.container.hasClass("expanded")) {
focussed.treeList.expand()
}
}
break
case 40: //DOWN
evt.preventDefault();
evt.stopPropagation();
if (selected.children && Array.isArray(selected.children) && selected.children.length > 0 && selected.treeList.container.hasClass("expanded")) {
target = selected.children[0];
if (focussed.children && Array.isArray(focussed.children) && focussed.children.length > 0 && focussed.treeList.container.hasClass("expanded")) {
target = focussed.children[0];
} else {
target = that._getNextSibling(selected);
while (!target && selected.parent) {
selected = selected.parent;
target = that._getNextSibling(selected);
target = that._getNextSibling(focussed);
while (!target && focussed.parent) {
focussed = focussed.parent;
target = that._getNextSibling(focussed);
}
}
break
}
if (target) {
that.select(target);
if (autoSelect) {
that.select(target);
} else {
that._topList.find(".focus").removeClass("focus")
}
target.treeList.label.addClass('focus')
}
});
this._data = [];
@@ -312,7 +341,8 @@
}
if (child.depth !== parent.depth+1) {
child.depth = parent.depth+1;
var labelPaddingWidth = ((child.gutter?child.gutter.width()+2:0)+(child.depth*20));
// var labelPaddingWidth = ((child.gutter ? child.gutter[0].offsetWidth + 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({
@@ -348,6 +378,18 @@
that._selected.delete(item);
delete item.treeList;
delete that._items[item.id];
if(item.depth === 0) {
for(var key in that._items) {
if (that._items.hasOwnProperty(key)) {
var child = that._items[key];
if(child.parent && child.parent.id === item.id) {
delete that._items[key].treeList;
delete that._items[key];
}
}
}
that._data = that._data.filter(function(data) { return data.id !== item.id})
}
}
item.treeList.insertChildAt = function(newItem,position,select) {
newItem.parent = item;
@@ -449,6 +491,9 @@
container.addClass("expanded");
}
item.treeList.collapse = function() {
if (item.collapsible === false) {
return
}
if (!item.children) {
return;
}
@@ -480,7 +525,10 @@
if (item.treeList.container) {
$(item.element).remove();
$(element).appendTo(item.treeList.label);
var labelPaddingWidth = (item.gutter?item.gutter.width()+2:0)+(item.depth*20);
// using the JQuery Object, the gutter width will
// be wrong when the element is reattached the second time
var labelPaddingWidth = (item.gutter ? item.gutter[0].offsetWidth + 2 : 0) + (item.depth * 20);
$(element).css({
width: "calc(100% - "+(labelPaddingWidth+20+(item.icon?20:0))+"px)"
})
@@ -516,9 +564,12 @@
}).appendTo(label)
}
var labelPaddingWidth = (item.gutter?item.gutter.width()+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,
width: labelPaddingWidth+'px'
}).appendTo(label);
@@ -564,7 +615,7 @@
// Already a parent because we've got the angle-right icon
return;
}
$('<i class="fa fa-angle-right" />').appendTo(treeListIcon);
$('<i class="fa fa-angle-right" />').toggleClass("hide",item.collapsible === false).appendTo(treeListIcon);
treeListIcon.on("click.red-ui-treeList-expand", function(e) {
e.stopPropagation();
e.preventDefault();
@@ -615,6 +666,46 @@
label.on("click", function(e) {
e.stopPropagation();
cb.trigger("click");
that._topList.find(".focus").removeClass("focus")
label.addClass('focus')
})
}
item.treeList.select = function(v) {
if (v !== item.selected) {
cb.trigger("click");
}
}
item.treeList.checkbox = cb;
selectWrapper.appendTo(label)
} else if (item.radio) {
var selectWrapper = $('<span class="red-ui-treeList-icon"></span>');
var cb = $('<input class="red-ui-treeList-radio" type="radio">').prop('name', item.radio).prop('checked',item.selected).appendTo(selectWrapper);
cb.on('click', function(e) {
e.stopPropagation();
});
cb.on('change', function(e) {
item.selected = this.checked;
that._selected.forEach(function(selectedItem) {
if (selectedItem.radio === item.radio) {
selectedItem.treeList.label.removeClass("selected");
selectedItem.selected = false;
that._selected.delete(selectedItem);
}
})
if (item.selected) {
that._selected.add(item);
} else {
that._selected.delete(item);
}
label.toggleClass("selected",this.checked);
that._trigger("select",e,item);
})
if (!item.children) {
label.on("click", function(e) {
e.stopPropagation();
cb.trigger("click");
that._topList.find(".focus").removeClass("focus")
label.addClass('focus')
})
}
item.treeList.select = function(v) {
@@ -623,6 +714,7 @@
}
}
selectWrapper.appendTo(label)
item.treeList.radio = cb;
} else {
label.on("click", function(e) {
if (!that.options.multi) {
@@ -630,10 +722,14 @@
}
label.addClass("selected");
that._selected.add(item);
that._topList.find(".focus").removeClass("focus")
label.addClass('focus')
that._trigger("select",e,item)
})
label.on("dblclick", function(e) {
that._topList.find(".focus").removeClass("focus")
label.addClass('focus')
if (!item.children) {
that._trigger("confirm",e,item);
}
@@ -781,6 +877,9 @@
if (item.treeList.label) {
item.treeList.label.addClass("selected");
}
that._topList.find(".focus").removeClass("focus");
if (triggerEvent !== false) {
this._trigger("select",null,item)
}
@@ -788,6 +887,9 @@
clearSelection: function() {
this._selected.forEach(function(item) {
item.selected = false;
if (item.treeList.checkbox) {
item.treeList.checkbox.prop('checked',false)
}
if (item.treeList.label) {
item.treeList.label.removeClass("selected")
}

View File

@@ -15,7 +15,7 @@
**/
(function($) {
var contextParse = function(v,defaultStore) {
var parts = RED.utils.parseContextKey(v, defaultStore);
var parts = RED.utils.parseContextKey(v, defaultStore&&defaultStore.value);
return {
option: parts.store,
value: parts.key
@@ -53,8 +53,120 @@
}
return icon;
}
var autoComplete = function(options) {
function getMatch(value, searchValue) {
const idx = value.toLowerCase().indexOf(searchValue.toLowerCase());
const len = idx > -1 ? searchValue.length : 0;
return {
index: idx,
found: idx > -1,
pre: value.substring(0,idx),
match: value.substring(idx,idx+len),
post: value.substring(idx+len),
}
}
function generateSpans(match) {
const els = [];
if(match.pre) { els.push($('<span/>').text(match.pre)); }
if(match.match) { els.push($('<span/>',{style:"font-weight: bold; color: var(--red-ui-text-color-link);"}).text(match.match)); }
if(match.post) { els.push($('<span/>').text(match.post)); }
return els;
}
return function(val) {
var matches = [];
options.forEach(opt => {
const optVal = opt.value;
const optSrc = (opt.source||[]).join(",");
const valMatch = getMatch(optVal, val);
const srcMatch = getMatch(optSrc, val);
if (valMatch.found || srcMatch.found) {
const element = $('<div>',{style: "display: flex"});
const valEl = $('<div/>',{style:"font-family: var(--red-ui-monospace-font); white-space:nowrap; overflow: hidden; flex-grow:1"});
valEl.append(generateSpans(valMatch));
valEl.appendTo(element);
if (optSrc) {
const optEl = $('<div>').css({ "font-size": "0.8em" });
optEl.append(generateSpans(srcMatch));
optEl.appendTo(element);
}
matches.push({
value: optVal,
label: element,
i: (valMatch.found ? valMatch.index : srcMatch.index)
});
}
})
matches.sort(function(A,B){return A.i-B.i})
return matches;
}
}
// This is a hand-generated list of completions for the core nodes (based on the node help html).
var msgCompletions = [
{ value: "payload" },
{ value: "topic", source: ["mqtt","inject","rbe"] },
{ value: "action", source: ["mqtt"] },
{ value: "complete", source: ["join"] },
{ value: "contentType", source: ["mqtt"] },
{ value: "cookies", source: ["http request","http response"] },
{ value: "correlationData", source: ["mqtt"] },
{ value: "delay", source: ["delay","trigger"] },
{ value: "encoding", source: ["file"] },
{ value: "error", source: ["catch"] },
{ value: "error.message", source: ["catch"] },
{ value: "error.source", source: ["catch"] },
{ value: "error.source.id", source: ["catch"] },
{ value: "error.source.type", source: ["catch"] },
{ value: "error.source.name", source: ["catch"] },
{ value: "filename", source: ["file","file in"] },
{ value: "flush", source: ["delay"] },
{ value: "followRedirects", source: ["http request"] },
{ value: "headers", source: ["http response","http request"] },
{ value: "host", source: ["tcp request","http request"] },
{ value: "ip", source: ["udp out"] },
{ value: "kill", source: ["exec"] },
{ value: "messageExpiryInterval", source: ["mqtt"] },
{ value: "method", source: ["http request"] },
{ value: "options", source: ["xml"] },
{ value: "parts", source: ["split","join","batch","sort"] },
{ value: "pid", source: ["exec"] },
{ value: "port", source: ["tcp request"," udp out"] },
{ value: "qos", source: ["mqtt"] },
{ value: "rate", source: ["delay"] },
{ value: "rejectUnauthorized", source: ["http request"] },
{ value: "req", source: ["http in"]},
{ value: "req.body", source: ["http in"]},
{ value: "req.headers", source: ["http in"]},
{ value: "req.query", source: ["http in"]},
{ value: "req.params", source: ["http in"]},
{ value: "req.cookies", source: ["http in"]},
{ value: "req.files", source: ["http in"]},
{ value: "requestTimeout", source: ["http request"] },
{ value: "reset", source: ["delay","trigger","join","rbe"] },
{ value: "responseCookies", source: ["http request"] },
{ value: "responseTopic", source: ["mqtt"] },
{ value: "responseUrl", source: ["http request"] },
{ value: "restartTimeout", source: ["join"] },
{ value: "retain", source: ["mqtt"] },
{ value: "schema", source: ["json"] },
{ value: "select", source: ["html"] },
{ value: "statusCode", source: ["http response","http request"] },
{ value: "status", source: ["status"] },
{ value: "status.text", source: ["status"] },
{ value: "status.source", source: ["status"] },
{ value: "status.source.type", source: ["status"] },
{ value: "status.source.id", source: ["status"] },
{ value: "status.source.name", source: ["status"] },
{ value: "target", source: ["link call"] },
{ value: "template", source: ["template"] },
{ value: "toFront", source: ["delay"] },
{ value: "url", source: ["http request"] },
{ value: "userProperties", source: ["mqtt"] },
{ value: "_session", source: ["websocket out","tcp out"] },
]
var allOptions = {
msg: {value:"msg",label:"msg.",validate:RED.utils.validatePropertyExpression},
msg: {value:"msg",label:"msg.",validate:RED.utils.validatePropertyExpression, autoComplete: autoComplete(msgCompletions)},
flow: {value:"flow",label:"flow.",hasValue:true,
options:[],
validate:RED.utils.validatePropertyExpression,
@@ -86,6 +198,8 @@
}
RED.editor.editJSON({
value: value,
stateId: RED.editor.generateViewStateId("typedInput", that, "json"),
focus: true,
complete: function(v) {
var value = v;
try {
@@ -108,6 +222,8 @@
var that = this;
RED.editor.editExpression({
value: this.value().replace(/\t/g,"\n"),
stateId: RED.editor.generateViewStateId("typedInput", that, "jsonata"),
focus: true,
complete: function(v) {
that.value(v.replace(/\n/g,"\t"));
}
@@ -122,6 +238,8 @@
var that = this;
RED.editor.editBuffer({
value: this.value(),
stateId: RED.editor.generateViewStateId("typedInput", that, "bin"),
focus: true,
complete: function(v) {
that.value(v);
}
@@ -265,6 +383,47 @@
}
}
};
// For a type with options, check value is a valid selection
// If !opt.multiple, returns the valid option object
// if opt.multiple, returns an array of valid option objects
// If not valid, returns null;
function isOptionValueValid(opt, currentVal) {
if (!opt.multiple) {
for (var i=0;i<opt.options.length;i++) {
op = opt.options[i];
if (typeof op === "string" && op === currentVal) {
return {value:currentVal}
} else if (op.value === currentVal) {
return op;
}
}
} else {
// Check to see if value is a valid csv of
// options.
var currentValues = {};
var selected = [];
currentVal.split(",").forEach(function(v) {
if (v) {
currentValues[v] = true;
}
});
for (var i=0;i<opt.options.length;i++) {
op = opt.options[i];
var val = typeof op === "string" ? op : op.value;
if (currentValues.hasOwnProperty(val)) {
delete currentValues[val];
selected.push(typeof op === "string" ? {value:op} : op.value)
}
}
if (!$.isEmptyObject(currentValues)) {
return null;
}
return selected
}
}
var nlsd = false;
$.widget( "nodered.typedInput", {
@@ -279,6 +438,14 @@
var contextStores = RED.settings.context.stores;
var contextOptions = contextStores.map(function(store) {
return {value:store,label: store, icon:'<i class="red-ui-typedInput-icon fa fa-database"></i>'}
}).sort(function(A,B) {
if (A.value === RED.settings.context.default) {
return -1;
} else if (B.value === RED.settings.context.default) {
return 1;
} else {
return A.value.localeCompare(B.value);
}
})
if (contextOptions.length < 2) {
allOptions.flow.options = [];
@@ -290,7 +457,8 @@
}
nlsd = true;
var that = this;
this.identifier = this.element.attr('id') || "TypedInput-"+Math.floor(Math.random()*100);
if (this.options.debug) { console.log(this.identifier,"Create",{defaultType:this.options.default, value:this.element.val()}) }
this.disarmClick = false;
this.input = $('<input class="red-ui-typedInput-input" type="text"></input>');
this.input.insertAfter(this.element);
@@ -320,6 +488,8 @@
});
this.defaultInputType = this.input.attr('type');
// Used to remember selections per-type to restore them when switching between types
this.oldValues = {};
this.uiSelect.addClass("red-ui-typedInput-container");
@@ -331,7 +501,7 @@
this.options.types = this.options.types||Object.keys(allOptions);
}
this.selectTrigger = $('<button class="red-ui-typedInput-type-select" tabindex="0"></button>').prependTo(this.uiSelect);
this.selectTrigger = $('<button type="button" class="red-ui-typedInput-type-select" tabindex="0"></button>').prependTo(this.uiSelect);
$('<i class="red-ui-typedInput-icon fa fa-caret-down"></i>').toggle(this.options.types.length > 1).appendTo(this.selectTrigger);
this.selectLabel = $('<span class="red-ui-typedInput-type-label"></span>').appendTo(this.selectTrigger);
@@ -372,6 +542,9 @@
that.element.trigger('paste',evt);
});
this.input.on('keydown', function(evt) {
if (that.typeMap[that.propertyType].autoComplete) {
return
}
if (evt.keyCode >= 37 && evt.keyCode <= 40) {
evt.stopPropagation();
}
@@ -389,14 +562,19 @@
evt.stopPropagation();
}).on('focus', function() {
that.uiSelect.addClass('red-ui-typedInput-focus');
}).on('blur', function() {
var opt = that.typeMap[that.propertyType];
if (opt.hasValue === false) {
that.uiSelect.removeClass('red-ui-typedInput-focus');
}
})
// explicitly set optionSelectTrigger display to inline-block otherwise jQ sets it to 'inline'
this.optionSelectTrigger = $('<button tabindex="0" class="red-ui-typedInput-option-trigger" style="display:inline-block"><span class="red-ui-typedInput-option-caret"><i class="red-ui-typedInput-icon fa fa-caret-down"></i></span></button>').appendTo(this.uiSelect);
this.optionSelectTrigger = $('<button type="button" tabindex="0" class="red-ui-typedInput-option-trigger" style="display:inline-block"><span class="red-ui-typedInput-option-caret"><i class="red-ui-typedInput-icon fa fa-caret-down"></i></span></button>').appendTo(this.uiSelect);
this.optionSelectLabel = $('<span class="red-ui-typedInput-option-label"></span>').prependTo(this.optionSelectTrigger);
RED.popover.tooltip(this.optionSelectLabel,function() {
return that.optionValue;
});
// RED.popover.tooltip(this.optionSelectLabel,function() {
// return that.optionValue;
// });
this.optionSelectTrigger.on("click", function(event) {
event.preventDefault();
event.stopPropagation();
@@ -413,9 +591,11 @@
that.uiSelect.addClass('red-ui-typedInput-focus');
});
this.optionExpandButton = $('<button tabindex="0" class="red-ui-typedInput-option-expand" style="display:inline-block"></button>').appendTo(this.uiSelect);
this.optionExpandButton = $('<button type="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);
}
@@ -438,7 +618,11 @@
});
this._showMenu(this.optionMenu,this.optionSelectTrigger);
var selectedOption = this.optionMenu.find("[value='"+this.optionValue+"']");
var targetValue = this.optionValue;
if (this.optionValue === null || this.optionValue === undefined) {
targetValue = this.value();
}
var selectedOption = this.optionMenu.find("[value='"+targetValue+"']");
if (selectedOption.length === 0) {
selectedOption = this.optionMenu.children(":first");
}
@@ -491,7 +675,7 @@
if (opt.icon.indexOf("<") === 0) {
$(opt.icon).prependTo(op);
} else if (opt.icon.indexOf("/") !== -1) {
$('<img>',{src:mapDeprecatedIcon(opt.icon),style:"margin-right: 4px; height: 18px;"}).prependTo(op);
$('<i>',{class:"red-ui-typedInput-icon", style:"mask-image: url("+opt.icon+"); -webkit-mask-image: url("+opt.icon+");"}).prependTo(op);
} else {
$('<i>',{class:"red-ui-typedInput-icon "+opt.icon}).prependTo(op);
}
@@ -562,7 +746,7 @@
var height = relativeTo.height();
var menuHeight = menu.height();
var top = (height+pos.top);
if (top+menuHeight > $(window).height()) {
if (top+menuHeight-$(document).scrollTop() > $(window).height()) {
top -= (top+menuHeight)-$(window).height()+5;
}
if (top < 0) {
@@ -659,6 +843,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') {
@@ -669,6 +854,13 @@
that.typeMap[result.value] = result;
return result;
});
if (this.typeList.length < 2) {
this.selectTrigger.attr("tabindex", -1)
this.selectTrigger.on("mousedown.red-ui-typedInput-focus-block", function(evt) { evt.preventDefault(); })
} else {
this.selectTrigger.attr("tabindex", 0)
this.selectTrigger.off("mousedown.red-ui-typedInput-focus-block")
}
this.selectTrigger.toggleClass("disabled", this.typeList.length === 1);
this.selectTrigger.find(".fa-caret-down").toggle(this.typeList.length > 1)
if (this.menu) {
@@ -676,10 +868,19 @@
}
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()
} else {
this.selectTrigger.show()
}
},
width: function(desiredWidth) {
@@ -690,7 +891,10 @@
},
value: function(value) {
var that = this;
var opt = this.typeMap[this.propertyType];
// If the default type has been set to an invalid type, then on first
// creation, the current propertyType will not exist. Default to an
// empty object on the assumption the corrent type will be set shortly
var opt = this.typeMap[this.propertyType] || {};
if (!arguments.length) {
var v = this.input.val();
if (opt.export) {
@@ -698,27 +902,38 @@
}
return v;
} else {
if (this.options.debug) { console.log(this.identifier,"----- SET VALUE ------",value) }
var selectedOption = [];
var valueToCheck = value;
if (opt.options) {
var checkValues = [value];
if (opt.hasValue && opt.parse) {
var parts = opt.parse(value);
if (this.options.debug) { console.log(this.identifier,"new parse",parts) }
value = parts.value;
valueToCheck = parts.option || parts.value;
}
var checkValues = [valueToCheck];
if (opt.multiple) {
selectedOption = [];
checkValues = value.split(",");
checkValues = valueToCheck.split(",");
}
checkValues.forEach(function(value) {
checkValues.forEach(function(valueToCheck) {
for (var i=0;i<opt.options.length;i++) {
var op = opt.options[i];
if (typeof op === "string") {
if (op === value || op === ""+value) {
if (op === valueToCheck || op === ""+valueToCheck) {
selectedOption.push(that.activeOptions[op]);
break;
}
} else if (op.value === value) {
} else if (op.value === valueToCheck) {
selectedOption.push(op);
break;
}
}
})
if (this.options.debug) { console.log(this.identifier,"set value to",value) }
this.input.val(value);
if (!opt.multiple) {
if (selectedOption.length === 0) {
@@ -743,9 +958,64 @@
return this.propertyType;
} else {
var that = this;
if (this.options.debug) { console.log(this.identifier,"----- SET TYPE -----",type) }
var previousValue = null;
var opt = this.typeMap[type];
if (opt && this.propertyType !== type) {
// If previousType is !null, then this is a change of the type, rather than the initialisation
var previousType = this.typeMap[this.propertyType];
previousValue = this.input.val();
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;
} else if (previousType.hasValue === false) {
this.oldValues[previousType.value] = previousValue;
} else {
this.oldValues["_"] = previousValue;
}
if ((opt.options && opt.hasValue !== true) || opt.hasValue === false) {
if (this.oldValues.hasOwnProperty(opt.value)) {
if (this.options.debug) { console.log(this.identifier,"restored previous (1)",this.oldValues[opt.value]) }
this.input.val(this.oldValues[opt.value]);
} else if (opt.options) {
// No old value for the option type.
// It is possible code has called 'value' then 'type'
// to set the selected option. This is what the Inject/Switch/Change
// nodes did before 2.1.
// So we need to be careful to not reset the value if it is a valid option.
var validOptions = isOptionValueValid(opt,previousValue);
if (this.options.debug) { console.log(this.identifier,{previousValue,opt,validOptions}) }
if ((previousValue || previousValue === '') && validOptions) {
if (this.options.debug) { console.log(this.identifier,"restored previous (2)") }
this.input.val(previousValue);
} else {
if (typeof opt.default === "string") {
if (this.options.debug) { console.log(this.identifier,"restored previous (3)",opt.default) }
this.input.val(opt.default);
} else if (Array.isArray(opt.default)) {
if (this.options.debug) { console.log(this.identifier,"restored previous (4)",opt.default.join(",")) }
this.input.val(opt.default.join(","))
} else {
if (this.options.debug) { console.log(this.identifier,"restored previous (5)") }
this.input.val("");
}
}
} else {
if (this.options.debug) { console.log(this.identifier,"restored default/blank",opt.default||"") }
this.input.val(opt.default||"")
}
} else {
if (this.options.debug) { console.log(this.identifier,"restored old/default/blank") }
this.input.val(this.oldValues.hasOwnProperty("_")?this.oldValues["_"]:(opt.default||""))
}
if (previousType.autoComplete) {
this.input.autoComplete("destroy");
}
}
this.propertyType = type;
this.typeChanged = true;
if (this.typeField) {
this.typeField.val(type);
}
@@ -756,10 +1026,7 @@
$(opt.icon).prependTo(this.selectLabel);
}
else if (opt.icon.indexOf("/") !== -1) {
image = new Image();
image.name = opt.icon;
image.src = mapDeprecatedIcon(opt.icon);
$('<img>',{src:mapDeprecatedIcon(opt.icon),style:"margin-right: 4px;height: 18px;"}).prependTo(this.selectLabel);
$('<i>',{class:"red-ui-typedInput-icon", style:"mask-image: url("+opt.icon+"); -webkit-mask-image: url("+opt.icon+"); margin-right: 4px;height: 18px;width:13px"}).prependTo(this.selectLabel);
}
else {
$('<i>',{class:"red-ui-typedInput-icon "+opt.icon,style:"min-width: 13px; margin-right: 4px;"}).prependTo(this.selectLabel);
@@ -768,6 +1035,11 @@
if (opt.hasValue === false || (opt.showLabel !== false && !opt.icon)) {
this.selectLabel.text(opt.label);
}
if (opt.label) {
this.selectTrigger.attr("title",opt.label);
} else {
this.selectTrigger.attr("title","");
}
if (opt.hasValue === false) {
this.selectTrigger.addClass("red-ui-typedInput-full-width");
} else {
@@ -809,22 +1081,12 @@
var op;
if (!opt.hasValue) {
var validValue = false;
var currentVal = this.input.val();
// Check the value is valid for the available options
var validValues = isOptionValueValid(opt,this.input.val());
if (!opt.multiple) {
for (var i=0;i<opt.options.length;i++) {
op = opt.options[i];
if (typeof op === "string" && op === currentVal) {
that._updateOptionSelectLabel({value:currentVal});
validValue = true;
break;
} else if (op.value === currentVal) {
that._updateOptionSelectLabel(op);
validValue = true;
break;
}
}
if (!validValue) {
if (validValues) {
that._updateOptionSelectLabel(validValues)
} else {
op = opt.options[0];
if (typeof op === "string") {
this.value(op);
@@ -835,27 +1097,19 @@
}
}
} else {
// Check to see if value is a valid csv of
// options.
var currentValues = {};
currentVal.split(",").forEach(function(v) {
if (v) {
currentValues[v] = true;
}
});
for (var i=0;i<opt.options.length;i++) {
op = opt.options[i];
delete currentValues[op.value||op];
}
if (!$.isEmptyObject(currentValues)) {
// Invalid, set to default/empty
this.value((opt.default||[]).join(","));
if (!validValues) {
validValues = (opt.default || []).map(function(v) {
return typeof v === "string"?v:v.value
});
this.value(validValues.join(","));
}
that._updateOptionSelectLabel(validValues);
}
} else {
var selectedOption = this.optionValue||opt.options[0];
if (opt.parse) {
var parts = opt.parse(this.input.val(),selectedOption);
var selectedOptionObj = typeof selectedOption === "string"?{value:selectedOption}:selectedOption
var parts = opt.parse(this.input.val(),selectedOptionObj);
if (parts.option) {
selectedOption = parts.option;
if (!this.activeOptions.hasOwnProperty(selectedOption)) {
@@ -879,6 +1133,7 @@
this._updateOptionSelectLabel(this.activeOptions[selectedOption]);
}
} else if (selectedOption) {
if (this.options.debug) { console.log(this.identifier,"HERE",{optionValue:selectedOption.value}) }
this.optionValue = selectedOption.value;
this._updateOptionSelectLabel(selectedOption);
} else {
@@ -911,8 +1166,6 @@
this.input.attr('type',this.defaultInputType)
}
if (opt.hasValue === false) {
this.oldValue = this.input.val();
this.input.val("");
this.elementDiv.hide();
this.valueLabelContainer.hide();
} else if (opt.valueLabel) {
@@ -925,12 +1178,14 @@
this.elementDiv.hide();
opt.valueLabel.call(this,this.valueLabelContainer,this.input.val());
} else {
if (this.oldValue !== undefined) {
this.input.val(this.oldValue);
delete this.oldValue;
}
this.valueLabelContainer.hide();
this.elementDiv.show();
if (opt.autoComplete) {
this.input.autoComplete({
search: opt.autoComplete,
minLength: 0
})
}
}
if (this.optionExpandButton) {
if (opt.expand) {
@@ -1004,16 +1259,20 @@
this.uiSelect.hide();
},
disable: function(val) {
if(val === true) {
if(val === undefined || !!val ) {
this.uiSelect.attr("disabled", "disabled");
} else if (val === false) {
this.uiSelect.attr("disabled", null); //remove attr
} else {
this.uiSelect.attr("disabled", val); //user value
this.uiSelect.attr("disabled", null); //remove attr
}
},
enable: function() {
this.uiSelect.attr("disabled", null); //remove attr
},
disabled: function() {
return this.uiSelect.attr("disabled");
return this.uiSelect.attr("disabled") === "disabled";
},
focus: function() {
this.input.focus();
}
});
})(jQuery);

View File

@@ -0,0 +1,246 @@
RED.contextMenu = (function () {
let menu;
function disposeMenu() {
$(document).off("mousedown.red-ui-workspace-context-menu");
if (menu) {
menu.remove();
}
menu = null;
}
function show(options) {
if (menu) {
menu.remove()
}
let menuItems = []
if (options.options) {
menuItems = options.options
} else if (options.type === 'workspace') {
const selection = RED.view.selection()
const noSelection = !selection || Object.keys(selection).length === 0
const hasSelection = (selection.nodes && selection.nodes.length > 0);
const hasMultipleSelection = hasSelection && selection.nodes.length > 1;
const virtulLinks = (selection.links && selection.links.filter(e => !!e.link)) || [];
const wireLinks = (selection.links && selection.links.filter(e => !e.link)) || [];
const hasLinks = wireLinks.length > 0;
const isSingleLink = !hasSelection && hasLinks && wireLinks.length === 1
const isMultipleLinks = !hasSelection && hasLinks && wireLinks.length > 1
const canDelete = hasSelection || hasLinks
const isGroup = hasSelection && selection.nodes.length === 1 && selection.nodes[0].type === 'group'
const canEdit = !RED.workspaces.isLocked()
const canRemoveFromGroup = hasSelection && !!selection.nodes[0].g
const isAllGroups = hasSelection && selection.nodes.filter(n => n.type !== 'group').length === 0
const hasGroup = hasSelection && selection.nodes.filter(n => n.type === 'group' ).length > 0
const offset = $("#red-ui-workspace-chart").offset()
let addX = options.x - offset.left + $("#red-ui-workspace-chart").scrollLeft()
let addY = options.y - offset.top + $("#red-ui-workspace-chart").scrollTop()
if (RED.view.snapGrid) {
const gridSize = RED.view.gridSize()
addX = gridSize * Math.floor(addX / gridSize)
addY = gridSize * Math.floor(addY / gridSize)
}
menuItems.push(
{ onselect: 'core:show-action-list', onpostselect: function () { } }
)
const insertOptions = []
menuItems.push({ label: RED._("contextMenu.insert"), options: insertOptions })
insertOptions.push(
{
label: RED._("contextMenu.node"),
onselect: function () {
RED.view.showQuickAddDialog({
position: [addX, addY],
touchTrigger: true,
splice: isSingleLink ? selection.links[0] : undefined,
// spliceMultiple: isMultipleLinks
})
},
disabled: !canEdit
},
(hasLinks) ? { // has least 1 wire selected
label: RED._("contextMenu.junction"),
onselect: 'core:split-wires-with-junctions',
disabled: !canEdit || !hasLinks
} : {
label: RED._("contextMenu.junction"),
onselect: function () {
const nn = {
_def: { defaults: {} },
type: 'junction',
z: RED.workspaces.active(),
id: RED.nodes.id(),
x: addX,
y: addY,
w: 0, h: 0,
outputs: 1,
inputs: 1,
dirty: true,
moved: true
}
const junction = RED.nodes.addJunction(nn);
const historyEvent = {
dirty: RED.nodes.dirty(),
t: 'add',
junctions: [junction]
}
RED.history.push(historyEvent);
RED.nodes.dirty(true);
RED.view.select({nodes: [junction] });
RED.view.redraw(true)
},
disabled: !canEdit
},
{
label: RED._("contextMenu.linkNodes"),
onselect: 'core:split-wire-with-link-nodes',
disabled: !canEdit || !hasLinks
},
null,
{ onselect: 'core:show-import-dialog', label: RED._('common.label.import')},
{ onselect: 'core:show-examples-import-dialog', label: RED._('menu.label.importExample') }
)
if (hasSelection && canEdit) {
const nodeOptions = []
if (!hasMultipleSelection && !isGroup) {
nodeOptions.push(
{ onselect: 'core:show-node-help' },
null
)
}
nodeOptions.push(
{ onselect: 'core:enable-selected-nodes' },
{ onselect: 'core:disable-selected-nodes' },
null,
{ onselect: 'core:show-selected-node-labels' },
{ onselect: 'core:hide-selected-node-labels' }
)
menuItems.push({
label: RED._('sidebar.info.node'),
options: nodeOptions
})
menuItems.push({
label: RED._('sidebar.info.group'),
options: [
{ onselect: 'core:group-selection' },
{ onselect: 'core:ungroup-selection', disabled: !hasGroup },
]
})
if (hasGroup) {
menuItems[menuItems.length - 1].options.push(
{ onselect: 'core:merge-selection-to-group', label: RED._("menu.label.groupMergeSelection") }
)
}
if (canRemoveFromGroup) {
menuItems[menuItems.length - 1].options.push(
{ onselect: 'core:remove-selection-from-group', label: RED._("menu.label.groupRemoveSelection") }
)
}
menuItems[menuItems.length - 1].options.push(
null,
{ onselect: 'core:copy-group-style', disabled: !hasGroup },
{ onselect: 'core:paste-group-style', disabled: !hasGroup}
)
}
if (canEdit && hasMultipleSelection) {
menuItems.push({
label: RED._('menu.label.arrange'),
options: [
{ label:RED._("menu.label.alignLeft"), onselect: "core:align-selection-to-left"},
{ label:RED._("menu.label.alignCenter"), onselect: "core:align-selection-to-center"},
{ label:RED._("menu.label.alignRight"), onselect: "core:align-selection-to-right"},
null,
{ label:RED._("menu.label.alignTop"), onselect: "core:align-selection-to-top"},
{ label:RED._("menu.label.alignMiddle"), onselect: "core:align-selection-to-middle"},
{ label:RED._("menu.label.alignBottom"), onselect: "core:align-selection-to-bottom"},
null,
{ label:RED._("menu.label.distributeHorizontally"), onselect: "core:distribute-selection-horizontally"},
{ label:RED._("menu.label.distributeVertically"), onselect: "core:distribute-selection-vertically"}
]
})
}
menuItems.push(
null,
{ onselect: 'core:undo', disabled: RED.history.list().length === 0 },
{ onselect: 'core:redo', disabled: RED.history.listRedo().length === 0 },
null,
{ onselect: 'core:cut-selection-to-internal-clipboard', label: RED._("keyboard.cutNode"), disabled: !canEdit || !hasSelection },
{ onselect: 'core:copy-selection-to-internal-clipboard', label: RED._("keyboard.copyNode"), disabled: !hasSelection },
{ onselect: 'core:paste-from-internal-clipboard', label: RED._("keyboard.pasteNode"), disabled: !canEdit || !RED.view.clipboard() },
{ onselect: 'core:delete-selection', disabled: !canEdit || !canDelete },
{ onselect: 'core:delete-selection-and-reconnect', label: RED._('keyboard.deleteReconnect'), disabled: !canEdit || !canDelete },
{ onselect: 'core:show-export-dialog', label: RED._("menu.label.export") },
{ onselect: 'core:select-all-nodes' },
)
}
var direction = "right";
var MENU_WIDTH = 500; // can not use menu width here
if ((options.x -$(document).scrollLeft()) >
($(window).width() -MENU_WIDTH)) {
direction = "left";
}
menu = RED.menu.init({
direction: direction,
onpreselect: function() {
disposeMenu()
},
onpostselect: function () {
RED.view.focus()
},
options: menuItems
});
menu.attr("id", "red-ui-workspace-context-menu");
menu.css({
position: "absolute"
})
menu.appendTo("body");
// TODO: prevent the menu from overflowing the window.
var top = options.y
var left = options.x
if (top + menu.height() - $(document).scrollTop() > $(window).height()) {
top -= (top + menu.height()) - $(window).height() + 22;
}
if (left + menu.width() - $(document).scrollLeft() > $(window).width()) {
left -= (left + menu.width()) - $(window).width() + 18;
}
menu.css({
top: top + "px",
left: left + "px"
})
$(".red-ui-menu.red-ui-menu-dropdown").hide();
$(document).on("mousedown.red-ui-workspace-context-menu", function (evt) {
if (menu && menu[0].contains(evt.target)) {
return
}
disposeMenu()
});
menu.show();
// set focus to first item so that pressing escape key closes the menu
$("#red-ui-workspace-context-menu :first(ul) > a").trigger("focus")
}
// Allow escape key hook and other editor events to close context menu
RED.keyboard.add("red-ui-workspace-context-menu", "escape", function () { RED.contextMenu.hide() })
RED.events.on("editor:open", function () { RED.contextMenu.hide() });
RED.events.on("search:open", function () { RED.contextMenu.hide() });
RED.events.on("type-search:open", function () { RED.contextMenu.hide() });
RED.events.on("actionList:open", function () { RED.contextMenu.hide() });
RED.events.on("view:selection-changed", function () { RED.contextMenu.hide() });
return {
show: show,
hide: disposeMenu
}
})()

View File

@@ -63,16 +63,18 @@ RED.deploy = (function() {
'</a>'+
'<a id="red-ui-header-button-deploy-options" class="red-ui-deploy-button" href="#"><i class="fa fa-caret-down"></i></a>'+
'</span></li>').prependTo(".red-ui-header-toolbar");
RED.menu.init({id:"red-ui-header-button-deploy-options",
options: [
{id:"deploymenu-item-full",toggle:"deploy-type",icon:"red/images/deploy-full.svg",label:RED._("deploy.full"),sublabel:RED._("deploy.fullDesc"),selected: true, onselect:function(s) { if(s){changeDeploymentType("full")}}},
{id:"deploymenu-item-flow",toggle:"deploy-type",icon:"red/images/deploy-flows.svg",label:RED._("deploy.modifiedFlows"),sublabel:RED._("deploy.modifiedFlowsDesc"), onselect:function(s) {if(s){changeDeploymentType("flows")}}},
{id:"deploymenu-item-node",toggle:"deploy-type",icon:"red/images/deploy-nodes.svg",label:RED._("deploy.modifiedNodes"),sublabel:RED._("deploy.modifiedNodesDesc"),onselect:function(s) { if(s){changeDeploymentType("nodes")}}},
null,
{id:"deploymenu-item-reload", icon:"red/images/deploy-reload.svg",label:RED._("deploy.restartFlows"),sublabel:RED._("deploy.restartFlowsDesc"),onselect:"core:restart-flows"},
]
});
const mainMenuItems = [
{id:"deploymenu-item-full",toggle:"deploy-type",icon:"red/images/deploy-full.svg",label:RED._("deploy.full"),sublabel:RED._("deploy.fullDesc"),selected: true, onselect:function(s) { if(s){changeDeploymentType("full")}}},
{id:"deploymenu-item-flow",toggle:"deploy-type",icon:"red/images/deploy-flows.svg",label:RED._("deploy.modifiedFlows"),sublabel:RED._("deploy.modifiedFlowsDesc"), onselect:function(s) {if(s){changeDeploymentType("flows")}}},
{id:"deploymenu-item-node",toggle:"deploy-type",icon:"red/images/deploy-nodes.svg",label:RED._("deploy.modifiedNodes"),sublabel:RED._("deploy.modifiedNodesDesc"),onselect:function(s) { if(s){changeDeploymentType("nodes")}}},
null
]
if (RED.settings.runtimeState && RED.settings.runtimeState.ui === true) {
mainMenuItems.push({id:"deploymenu-item-runtime-start", icon:"red/images/start.svg",label:RED._("deploy.startFlows"),sublabel:RED._("deploy.startFlowsDesc"),onselect:"core:start-flows", visible:false})
mainMenuItems.push({id:"deploymenu-item-runtime-stop", icon:"red/images/stop.svg",label:RED._("deploy.stopFlows"),sublabel:RED._("deploy.stopFlowsDesc"),onselect:"core:stop-flows", visible:false})
}
mainMenuItems.push({id:"deploymenu-item-reload", icon:"red/images/deploy-reload.svg",label:RED._("deploy.restartFlows"),sublabel:RED._("deploy.restartFlowsDesc"),onselect:"core:restart-flows"})
RED.menu.init({id:"red-ui-header-button-deploy-options", options: mainMenuItems });
} else if (type == "simple") {
var label = options.label || RED._("deploy.deploy");
var icon = 'red/images/deploy-full-o.svg';
@@ -100,6 +102,10 @@ RED.deploy = (function() {
RED.actions.add("core:deploy-flows",save);
if (type === "default") {
if (RED.settings.runtimeState && RED.settings.runtimeState.ui === true) {
RED.actions.add("core:stop-flows",function() { stopStartFlows("stop") });
RED.actions.add("core:start-flows",function() { stopStartFlows("start") });
}
RED.actions.add("core:restart-flows",restart);
RED.actions.add("core:set-deploy-type-to-full",function() { RED.menu.setSelected("deploymenu-item-full",true);});
RED.actions.add("core:set-deploy-type-to-modified-flows",function() { RED.menu.setSelected("deploymenu-item-flow",true); });
@@ -270,18 +276,73 @@ RED.deploy = (function() {
function sanitize(html) {
return html.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")
}
function restart() {
var startTime = Date.now();
$(".red-ui-deploy-button-content").css('opacity',0);
$(".red-ui-deploy-button-spinner").show();
var deployWasEnabled = !$("#red-ui-header-button-deploy").hasClass("disabled");
$("#red-ui-header-button-deploy").addClass("disabled");
deployInflight = true;
function shadeShow() {
$("#red-ui-header-shade").show();
$("#red-ui-editor-shade").show();
$("#red-ui-palette-shade").show();
$("#red-ui-sidebar-shade").show();
}
function shadeHide() {
$("#red-ui-header-shade").hide();
$("#red-ui-editor-shade").hide();
$("#red-ui-palette-shade").hide();
$("#red-ui-sidebar-shade").hide();
}
function deployButtonSetBusy(){
$(".red-ui-deploy-button-content").css('opacity',0);
$(".red-ui-deploy-button-spinner").show();
$("#red-ui-header-button-deploy").addClass("disabled");
}
function deployButtonClearBusy(){
$(".red-ui-deploy-button-content").css('opacity',1);
$(".red-ui-deploy-button-spinner").hide();
}
function stopStartFlows(state) {
const startTime = Date.now()
const deployWasEnabled = !$("#red-ui-header-button-deploy").hasClass("disabled")
deployInflight = true
deployButtonSetBusy()
shadeShow()
$.ajax({
url:"flows/state",
type: "POST",
data: {state: state}
}).done(function(data,textStatus,xhr) {
if (deployWasEnabled) {
$("#red-ui-header-button-deploy").removeClass("disabled")
}
}).fail(function(xhr,textStatus,err) {
if (deployWasEnabled) {
$("#red-ui-header-button-deploy").removeClass("disabled")
}
if (xhr.status === 401) {
RED.notify(RED._("notification.error", { message: RED._("user.notAuthorized") }), "error")
} else if (xhr.responseText) {
const errorDetail = { message: err ? (err + "") : "" }
try {
errorDetail.message = JSON.parse(xhr.responseText).message
} finally {
errorDetail.message = errorDetail.message || xhr.responseText
}
RED.notify(RED._("notification.error", errorDetail), "error")
} else {
RED.notify(RED._("notification.error", { message: RED._("deploy.errors.noResponse") }), "error")
}
}).always(function() {
const delta = Math.max(0, 300 - (Date.now() - startTime))
setTimeout(function () {
deployButtonClearBusy()
shadeHide()
deployInflight = false
}, delta);
});
}
function restart() {
var startTime = Date.now();
var deployWasEnabled = !$("#red-ui-header-button-deploy").hasClass("disabled");
deployInflight = true;
deployButtonSetBusy();
$.ajax({
url:"flows",
type: "POST",
@@ -307,204 +368,287 @@ RED.deploy = (function() {
RED.notify(RED._("deploy.deployFailed",{message:RED._("deploy.errors.noResponse")}),"error");
}
}).always(function() {
deployInflight = false;
var delta = Math.max(0,300-(Date.now()-startTime));
setTimeout(function() {
$(".red-ui-deploy-button-content").css('opacity',1);
$(".red-ui-deploy-button-spinner").hide();
$("#red-ui-header-shade").hide();
$("#red-ui-editor-shade").hide();
$("#red-ui-palette-shade").hide();
$("#red-ui-sidebar-shade").hide();
deployButtonClearBusy();
deployInflight = false;
},delta);
});
}
function save(skipValidation,force) {
if (!$("#red-ui-header-button-deploy").hasClass("disabled")) {
if (!RED.user.hasPermission("flows.write")) {
RED.notify(RED._("user.errors.deploy"),"error");
function save(skipValidation, force) {
if ($("#red-ui-header-button-deploy").hasClass("disabled")) {
return; //deploy is disabled
}
if ($("#red-ui-header-shade").is(":visible")) {
return; //deploy is shaded
}
if (!RED.user.hasPermission("flows.write")) {
RED.notify(RED._("user.errors.deploy"), "error");
return;
}
let hasUnusedConfig = false;
if (!skipValidation) {
let hasUnknown = false;
let hasInvalid = false;
const unknownNodes = [];
const 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));
}
if (node.type === "unknown") {
if (unknownNodes.indexOf(node.name) == -1) {
unknownNodes.push(node.name);
}
}
});
hasUnknown = unknownNodes.length > 0;
hasInvalid = invalidNodes.length > 0;
const unusedConfigNodes = [];
RED.nodes.eachConfig(function (node) {
if ((node._def.hasUsers !== false) && (node.users.length === 0)) {
unusedConfigNodes.push(getNodeInfo(node));
hasUnusedConfig = true;
}
});
let showWarning = false;
let notificationMessage;
let notificationButtons = [];
let notification;
if (hasUnknown && !ignoreDeployWarnings.unknown) {
showWarning = true;
notificationMessage = "<p>" + RED._('deploy.confirm.unknown') + "</p>" +
'<ul class="red-ui-deploy-dialog-confirm-list"><li>' + cropList(unknownNodes).map(function (n) { return sanitize(n) }).join("</li><li>") + "</li></ul><p>" +
RED._('deploy.confirm.confirm') +
"</p>";
notificationButtons = [
{
text: RED._("deploy.unknownNodesButton"),
class: "pull-left",
click: function() {
notification.close();
RED.actions.invoke("core:search","type:unknown ");
}
},
{
id: "red-ui-deploy-dialog-confirm-deploy-deploy",
text: RED._("deploy.confirm.button.confirm"),
class: "primary",
click: function () {
save(true);
notification.close();
}
}
];
} else if (hasInvalid && !ignoreDeployWarnings.invalid) {
showWarning = true;
invalidNodes.sort(sortNodeInfo);
notificationMessage = "<p>" + RED._('deploy.confirm.improperlyConfigured') + "</p>" +
'<ul class="red-ui-deploy-dialog-confirm-list"><li>' + cropList(invalidNodes.map(function (A) { return sanitize((A.tab ? "[" + A.tab + "] " : "") + A.label + " (" + A.type + ")") })).join("</li><li>") + "</li></ul><p>" +
RED._('deploy.confirm.confirm') +
"</p>";
notificationButtons = [
{
text: RED._("deploy.invalidNodesButton"),
class: "pull-left",
click: function() {
notification.close();
RED.actions.invoke("core:search","is:invalid ");
}
},
{
id: "red-ui-deploy-dialog-confirm-deploy-deploy",
text: RED._("deploy.confirm.button.confirm"),
class: "primary",
click: function () {
save(true);
notification.close();
}
}
];
}
if (showWarning) {
notificationButtons.unshift(
{
text: RED._("common.label.cancel"),
click: function () {
notification.close();
}
}
);
notification = RED.notify(notificationMessage, {
modal: true,
fixed: true,
buttons: notificationButtons
});
return;
}
if (!skipValidation) {
var hasUnknown = false;
var hasInvalid = false;
var hasUnusedConfig = false;
var unknownNodes = [];
var invalidNodes = [];
RED.nodes.eachNode(function(node) {
if (!node.valid && !node.d) {
invalidNodes.push(getNodeInfo(node));
}
if (node.type === "unknown") {
if (unknownNodes.indexOf(node.name) == -1) {
unknownNodes.push(node.name);
}
}
});
hasUnknown = unknownNodes.length > 0;
hasInvalid = invalidNodes.length > 0;
var unusedConfigNodes = [];
RED.nodes.eachConfig(function(node) {
if ((node._def.hasUsers !== false) && (node.users.length === 0)) {
unusedConfigNodes.push(getNodeInfo(node));
hasUnusedConfig = true;
}
});
var showWarning = false;
var notificationMessage;
var notificationButtons = [];
var notification;
if (hasUnknown && !ignoreDeployWarnings.unknown) {
showWarning = true;
notificationMessage = "<p>"+RED._('deploy.confirm.unknown')+"</p>"+
'<ul class="red-ui-deploy-dialog-confirm-list"><li>'+cropList(unknownNodes).map(function(n) { return sanitize(n) }).join("</li><li>")+"</li></ul><p>"+
RED._('deploy.confirm.confirm')+
"</p>";
notificationButtons= [
{
id: "red-ui-deploy-dialog-confirm-deploy-deploy",
text: RED._("deploy.confirm.button.confirm"),
class: "primary",
click: function() {
save(true);
notification.close();
}
}
];
} else if (hasInvalid && !ignoreDeployWarnings.invalid) {
showWarning = true;
invalidNodes.sort(sortNodeInfo);
notificationMessage = "<p>"+RED._('deploy.confirm.improperlyConfigured')+"</p>"+
'<ul class="red-ui-deploy-dialog-confirm-list"><li>'+cropList(invalidNodes.map(function(A) { return sanitize( (A.tab?"["+A.tab+"] ":"")+A.label+" ("+A.type+")")})).join("</li><li>")+"</li></ul><p>"+
RED._('deploy.confirm.confirm')+
"</p>";
notificationButtons= [
{
id: "red-ui-deploy-dialog-confirm-deploy-deploy",
text: RED._("deploy.confirm.button.confirm"),
class: "primary",
click: function() {
save(true);
notification.close();
}
}
];
}
if (showWarning) {
notificationButtons.unshift(
{
text: RED._("common.label.cancel"),
click: function() {
notification.close();
}
}
);
notification = RED.notify(notificationMessage,{
modal: true,
fixed: true,
buttons:notificationButtons
});
return;
}
}
var nns = RED.nodes.createCompleteNodeSet();
var startTime = Date.now();
$(".red-ui-deploy-button-content").css('opacity',0);
$(".red-ui-deploy-button-spinner").show();
$("#red-ui-header-button-deploy").addClass("disabled");
var data = {flows:nns};
if (!force) {
data.rev = RED.nodes.version();
}
deployInflight = true;
$("#red-ui-header-shade").show();
$("#red-ui-editor-shade").show();
$("#red-ui-palette-shade").show();
$("#red-ui-sidebar-shade").show();
$.ajax({
url:"flows",
type: "POST",
data: JSON.stringify(data),
contentType: "application/json; charset=utf-8",
headers: {
"Node-RED-Deployment-Type":deploymentType
}
}).done(function(data,textStatus,xhr) {
RED.nodes.dirty(false);
RED.nodes.version(data.rev);
RED.nodes.originalFlow(nns);
if (hasUnusedConfig) {
RED.notify(
'<p>'+RED._("deploy.successfulDeploy")+'</p>'+
'<p>'+RED._("deploy.unusedConfigNodes")+' <a href="#" onclick="RED.sidebar.config.show(true); return false;">'+RED._("deploy.unusedConfigNodesLink")+'</a></p>',"success",false,6000);
} else {
RED.notify('<p>'+RED._("deploy.successfulDeploy")+'</p>',"success");
}
RED.nodes.eachNode(function(node) {
if (node.changed) {
node.dirty = true;
node.changed = false;
}
if (node.moved) {
node.dirty = true;
node.moved = false;
}
if(node.credentials) {
delete node.credentials;
}
});
RED.nodes.eachConfig(function (confNode) {
confNode.changed = false;
if (confNode.credentials) {
delete confNode.credentials;
}
});
RED.nodes.eachSubflow(function(subflow) {
subflow.changed = false;
});
RED.nodes.eachWorkspace(function(ws) {
ws.changed = false;
});
// Once deployed, cannot undo back to a clean state
RED.history.markAllDirty();
RED.view.redraw();
RED.events.emit("deploy");
}).fail(function(xhr,textStatus,err) {
RED.nodes.dirty(true);
$("#red-ui-header-button-deploy").removeClass("disabled");
if (xhr.status === 401) {
RED.notify(RED._("deploy.deployFailed",{message:RED._("user.notAuthorized")}),"error");
} else if (xhr.status === 409) {
resolveConflict(nns, true);
} else if (xhr.responseText) {
RED.notify(RED._("deploy.deployFailed",{message:xhr.responseText}),"error");
} else {
RED.notify(RED._("deploy.deployFailed",{message:RED._("deploy.errors.noResponse")}),"error");
}
}).always(function() {
deployInflight = false;
var delta = Math.max(0,300-(Date.now()-startTime));
setTimeout(function() {
$(".red-ui-deploy-button-content").css('opacity',1);
$(".red-ui-deploy-button-spinner").hide();
$("#red-ui-header-shade").hide();
$("#red-ui-editor-shade").hide();
$("#red-ui-palette-shade").hide();
$("#red-ui-sidebar-shade").hide();
},delta);
});
}
const nns = RED.nodes.createCompleteNodeSet();
const startTime = Date.now();
deployButtonSetBusy();
const data = { flows: nns };
if (!force) {
data.rev = RED.nodes.version();
}
deployInflight = true;
shadeShow();
$.ajax({
url: "flows",
type: "POST",
data: JSON.stringify(data),
contentType: "application/json; charset=utf-8",
headers: {
"Node-RED-Deployment-Type": deploymentType
}
}).done(function (data, textStatus, xhr) {
RED.nodes.dirty(false);
RED.nodes.version(data.rev);
RED.nodes.originalFlow(nns);
if (hasUnusedConfig) {
let notification;
const opts = {
type: "success",
fixed: false,
timeout: 6000,
buttons: [
{
text: RED._("deploy.unusedConfigNodesButton"),
class: "pull-left",
click: function() {
notification.close();
RED.actions.invoke("core:search","is:config is:unused ");
}
},
{
text: RED._("common.label.close"),
class: "primary",
click: function () {
save(true);
notification.close();
}
}
]
}
notification = RED.notify(
'<p>' + RED._("deploy.successfulDeploy") + '</p>' +
'<p>' + RED._("deploy.unusedConfigNodes") + '</p>', opts);
} else {
RED.notify('<p>' + RED._("deploy.successfulDeploy") + '</p>', "success");
}
const flowsToLock = new Set()
function ensureUnlocked(id) {
const flow = id && (RED.nodes.workspace(id) || RED.nodes.subflow(id) || null);
const isLocked = flow ? flow.locked : false;
if (flow && isLocked) {
flow.locked = false;
flowsToLock.add(flow)
}
}
RED.nodes.eachNode(function (node) {
ensureUnlocked(node.z)
if (node.changed) {
node.dirty = true;
node.changed = false;
}
if (node.moved) {
node.dirty = true;
node.moved = false;
}
if (node.credentials) {
delete node.credentials;
}
});
RED.nodes.eachGroup(function (node) {
ensureUnlocked(node.z)
if (node.changed) {
node.dirty = true;
node.changed = false;
}
if (node.moved) {
node.dirty = true;
node.moved = false;
}
})
RED.nodes.eachJunction(function (node) {
ensureUnlocked(node.z)
if (node.changed) {
node.dirty = true;
node.changed = false;
}
if (node.moved) {
node.dirty = true;
node.moved = false;
}
})
RED.nodes.eachConfig(function (confNode) {
if (confNode.z) {
ensureUnlocked(confNode.z)
}
confNode.changed = false;
if (confNode.credentials) {
delete confNode.credentials;
}
});
RED.nodes.eachSubflow(function (subflow) {
subflow.changed = false;
});
RED.nodes.eachWorkspace(function (ws) {
if (ws.changed || ws.added) {
ensureUnlocked(ws.z)
ws.changed = false;
delete ws.added
RED.events.emit("flows:change", ws)
}
});
flowsToLock.forEach(flow => {
flow.locked = true
})
// Once deployed, cannot undo back to a clean state
RED.history.markAllDirty();
RED.view.redraw();
RED.events.emit("deploy");
}).fail(function (xhr, textStatus, err) {
RED.nodes.dirty(true);
$("#red-ui-header-button-deploy").removeClass("disabled");
if (xhr.status === 401) {
RED.notify(RED._("deploy.deployFailed", { message: RED._("user.notAuthorized") }), "error");
} else if (xhr.status === 409) {
resolveConflict(nns, true);
} else if (xhr.responseText) {
RED.notify(RED._("deploy.deployFailed", { message: xhr.responseText }), "error");
} else {
RED.notify(RED._("deploy.deployFailed", { message: RED._("deploy.errors.noResponse") }), "error");
}
}).always(function () {
const delta = Math.max(0, 300 - (Date.now() - startTime));
setTimeout(function () {
deployInflight = false;
deployButtonClearBusy()
shadeHide()
}, delta);
});
}
return {
init: init,

View File

@@ -0,0 +1,61 @@
RED.diagnostics = (function () {
function init() {
if (RED.settings.get('diagnostics.ui', true) === false) {
return;
}
RED.actions.add("core:show-system-info", function () { show(); });
}
function show() {
$.ajax({
headers: {
"Accept": "application/json"
},
cache: false,
url: 'diagnostics',
success: function (data) {
var json = JSON.stringify(data || {}, "", 4);
if (json === "{}") {
json = "{\n\n}";
}
RED.editor.editJSON({
title: RED._('diagnostics.title'),
value: json,
requireValid: true,
readOnly: true,
toolbarButtons: [
{
text: RED._('clipboard.export.copy'),
icon: 'fa fa-copy',
click: function () {
RED.clipboard.copyText(json, $(this), RED._('clipboard.copyMessageValue'))
}
},
{
text: RED._('clipboard.download'),
icon: 'fa fa-download',
click: function () {
var element = document.createElement('a');
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(json));
element.setAttribute('download', "system-info.json");
element.style.display = 'none';
document.body.appendChild(element);
element.click();
document.body.removeChild(element);
}
},
]
});
},
error: function (jqXHR, textStatus, errorThrown) {
console.log("Unexpected error loading system info:", jqXHR.status, textStatus, errorThrown);
}
});
}
return {
init: init,
};
})();

View File

@@ -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'))) &&
@@ -1376,6 +1387,7 @@ RED.diff = (function() {
function mergeDiff(diff) {
//console.log(diff);
var selectedTab = RED.workspaces.active();
var appliedDiff = applyDiff(diff);
var newConfig = appliedDiff.config;
@@ -1426,6 +1438,7 @@ RED.diff = (function() {
RED.view.redraw(true);
RED.palette.refresh();
RED.workspaces.refresh();
RED.workspaces.show(selectedTab, true);
RED.sidebar.config.refresh();
}

File diff suppressed because it is too large Load Diff

View File

@@ -47,6 +47,7 @@
var definition = {
show: function(options) {
var value = options.value;
var onCancel = options.cancel;
var onComplete = options.complete;
var type = "_buffer"
if ($("script[data-template-name='"+type+"']").length === 0) {
@@ -60,12 +61,14 @@
var trayOptions = {
title: options.title,
focusElement: options.focusElement,
width: "inherit",
buttons: [
{
id: "node-dialog-cancel",
text: RED._("common.label.cancel"),
click: function() {
if (onCancel) { onCancel(); }
RED.tray.close();
}
},
@@ -74,7 +77,8 @@
text: RED._("common.label.done"),
class: "primary",
click: function() {
onComplete(JSON.stringify(bufferBinValue));
bufferStringEditor.saveView();
if (onComplete) { onComplete(JSON.stringify(bufferBinValue),null,bufferStringEditor); }
RED.tray.close();
}
}
@@ -86,19 +90,20 @@
}
},
open: function(tray) {
var trayBody = tray.find('.red-ui-tray-body');
var dialogForm = RED.editor.buildEditForm(tray.find('.red-ui-tray-body'),'dialog-form',type,'editor');
bufferStringEditor = RED.editor.createEditor({
id: 'red-ui-editor-type-buffer-str',
value: "",
value: value||"",
stateId: RED.editor.generateViewStateId("buffer", options, ""),
focus: true,
mode:"ace/mode/text"
});
bufferStringEditor.getSession().setValue(value||"",-1);
bufferBinEditor = RED.editor.createEditor({
id: 'red-ui-editor-type-buffer-bin',
value: "",
stateId: false,
focus: false,
mode:"ace/mode/text",
readOnly: true
});

View File

@@ -0,0 +1,115 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
/**
* @namespace RED.editor.codeEditor
*/
RED.editor.codeEditor = (function() {
const MONACO = "monaco";
const ACE = "ace";
const defaultEditor = MONACO;
const DEFAULT_SETTINGS = { lib: defaultEditor, options: {} };
var selectedCodeEditor = null;
var initialised = false;
function init() {
var codeEditorSettings = RED.editor.codeEditor.settings;
var editorChoice = codeEditorSettings.lib === MONACO ? MONACO : ACE;
try {
var browser = RED.utils.getBrowserInfo();
selectedCodeEditor = RED.editor.codeEditor[editorChoice];
//fall back to default code editor if there are any issues
if (!selectedCodeEditor || (editorChoice === MONACO && (browser.ie || !window.monaco))) {
selectedCodeEditor = RED.editor.codeEditor[defaultEditor];
}
initialised = selectedCodeEditor.init();
} catch (error) {
selectedCodeEditor = null;
console.warn("Problem initialising '" + editorChoice + "' code editor", error);
}
if(!initialised) {
selectedCodeEditor = RED.editor.codeEditor[defaultEditor];
initialised = selectedCodeEditor.init();
}
$('<div id="red-ui-image-drop-target"><div data-i18n="[append]workspace.dropImageHere"><i class="fa fa-download"></i><br></div></div>').appendTo('#red-ui-editor');
$("#red-ui-image-drop-target").hide();
}
function create(options) {
//TODO: (quandry - for consideration)
// Below, I had to create a hidden element if options.id || options.element is not in the DOM
// I have seen 1 node calling `this.editor = RED.editor.createEditor()` with an
// invalid (non existing html element selector) (e.g. node-red-contrib-components does this)
// This causes monaco to throw an error when attempting to hook up its events to the dom & the rest of the 'oneditperapre'
// code is thus skipped.
// In ACE mode, creating an ACE editor (with an invalid ID) allows the editor to be created (but obviously there is no UI)
// Because one (or more) contrib nodes have left this bad code in place, how would we handle this?
// For compatibility, I have decided to create a hidden element so that at least an editor is created & errors do not occur.
// IMO, we should warn and exit as it is a coding error by the contrib author.
if (!options) {
console.warn("createEditor() options are missing");
options = {};
}
var editor = null;
if (this.editor.type === MONACO) {
// compatibility (see above note)
if (!options.element && !options.id) {
options.id = 'node-backwards-compatability-dummy-editor';
}
options.element = options.element || $("#" + options.id)[0];
if (!options.element) {
console.warn("createEditor() options.element or options.id is not valid", options);
$("#dialog-form").append('<div id="' + options.id + '" style="display: none;" />');
}
editor = this.editor.create(options);
} else {
editor = this.editor.create(options);//fallback to ACE
}
if (options.mode === "ace/mode/markdown") {
RED.editor.customEditTypes['_markdown'].postInit(editor, options);
}
return editor;
}
return {
init: init,
/**
* Get editor settings object
* @memberof RED.editor.codeEditor
*/
get settings() {
return RED.settings.get('codeEditor') || DEFAULT_SETTINGS;
},
/**
* Get user selected code editor
* @return {string} Returns
* @memberof RED.editor.codeEditor
*/
get editor() {
return selectedCodeEditor;
},
/**
* Create a editor ui component
* @param {object} options - the editor options
* @memberof RED.editor.codeEditor
*/
create: create
}
})();

View File

@@ -0,0 +1,205 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
/**
* @namespace RED.editor.codeEditor.ace
*/
RED.editor.codeEditor.ace = (function() {
const type = "ace";
var initialised = false;
var initOptions = {};
function init(options) {
initOptions = options || {};
initialised = true;
return initialised;
}
function create(options) {
var editorSettings = RED.editor.codeEditor.settings || {};
var el = options.element || $("#"+options.id)[0];
var toolbarRow = $("<div>").appendTo(el);
el = $("<div>").appendTo(el).addClass("red-ui-editor-text-container")[0];
var editor = window.ace.edit(el);
editor.setTheme(editorSettings.theme || initOptions.theme || "ace/theme/tomorrow");
var session = editor.getSession();
session.on("changeAnnotation", function () {
var annotations = session.getAnnotations() || [];
var i = annotations.length;
var len = annotations.length;
while (i--) {
if (/doctype first\. Expected/.test(annotations[i].text)) { annotations.splice(i, 1); }
else if (/Unexpected End of file\. Expected/.test(annotations[i].text)) { annotations.splice(i, 1); }
}
if (len > annotations.length) { session.setAnnotations(annotations); }
});
if (options.mode) {
session.setMode(options.mode);
}
if (options.foldStyle) {
session.setFoldStyle(options.foldStyle);
} else {
session.setFoldStyle('markbeginend');
}
if (options.options) {
editor.setOptions(options.options);
} else {
editor.setOptions({
enableBasicAutocompletion:true,
enableSnippets:true,
tooltipFollowsMouse: false
});
}
if (options.readOnly) {
editor.setOption('readOnly',options.readOnly);
editor.container.classList.add("ace_read-only");
}
if (options.hasOwnProperty('lineNumbers')) {
editor.renderer.setOption('showGutter',options.lineNumbers);
}
editor.$blockScrolling = Infinity;
if (options.value) {
session.setValue(options.value,-1);
}
if (options.globals) {
setTimeout(function() {
if (!!session.$worker) {
session.$worker.send("setOptions", [{globals: options.globals, maxerr:1000}]);
}
},100);
}
if (!options.stateId && options.stateId !== false) {
options.stateId = RED.editor.generateViewStateId("ace", options, (options.mode || options.title).split("/").pop());
}
if (options.mode === 'ace/mode/markdown') {
$(el).addClass("red-ui-editor-text-container-toolbar");
editor.toolbar = RED.editor.customEditTypes['_markdown'].buildToolbar(toolbarRow,editor);
if (options.expandable !== false) {
var expandButton = $('<button type="button" class="red-ui-button" style="float: right;"><i class="fa fa-expand"></i></button>').appendTo(editor.toolbar);
RED.popover.tooltip(expandButton, RED._("markdownEditor.expand"));
expandButton.on("click", function(e) {
e.preventDefault();
var value = editor.getValue();
RED.editor.editMarkdown({
value: value,
width: "Infinity",
stateId: options.stateId,
focus: true,
cancel: function () {
editor.focus();
},
complete: function(v,cursor) {
editor.setValue(v, -1);
setTimeout(function() {
editor.restoreView();
editor.focus();
},300);
}
})
});
}
var helpButton = $('<button type="button" class="red-ui-editor-text-help red-ui-button red-ui-button-small"><i class="fa fa-question"></i></button>').appendTo($(el).parent());
RED.popover.create({
target: helpButton,
trigger: 'click',
size: "small",
direction: "left",
content: RED._("markdownEditor.format"),
autoClose: 50
});
session.setUseWrapMode(true);
}
editor._destroy = editor.destroy;
editor.destroy = function() {
try {
editor.saveView();
editor._initState = null;
this._destroy();
} catch (e) { }
$(el).remove();
$(toolbarRow).remove();
}
editor.on("blur", function () {
editor.focusMemory = false;
editor.saveView();
})
editor.on("focus", function () {
if (editor._initState) {
editor.restoreView(editor._initState);
editor._initState = null;
}
})
editor.getView = function () {
var session = editor.getSession();
return {
selection: session.selection.toJSON(),
scrollTop: session.getScrollTop(),
scrollLeft: session.getScrollLeft(),
options: session.getOptions()
}
}
editor.saveView = function () {
if (!options.stateId) { return; } //only possible if created with a unique stateId
window._editorStateAce = window._editorStateAce || {};
var state = editor.getView();
window._editorStateAce[options.stateId] = state;
return state;
}
editor.restoreView = function (state) {
if (!options.stateId) { return; } //only possible if created with a unique stateId
window._editorStateAce = window._editorStateAce || {};
var _state = state || window._editorStateAce[options.stateId];
if (!_state) { return; } //no view state available
try {
var session = editor.getSession();
session.setOptions(_state.options);
session.selection.fromJSON(_state.selection);
session.setScrollTop(_state.scrollTop);
session.setScrollLeft(_state.scrollLeft);
editor._initState = _state;
} catch (error) {
delete window._editorStateMonaco[options.stateId];
}
};
editor.restoreView();
editor.type = type;
return editor;
}
return {
/**
* Editor type
* @memberof RED.editor.codeEditor.ace
*/
get type() { return type; },
/**
* Editor initialised
* @memberof RED.editor.codeEditor.ace
*/
get initialised() { return initialised; },
/**
* Initialise code editor
* @param {object} options - initialisation options
* @memberof RED.editor.codeEditor.ace
*/
init: init,
/**
* Create a code editor
* @param {object} options - the editor options
* @memberof RED.editor.codeEditor.ace
*/
create: create
}
})();

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
RED.colorPicker = (function() {
RED.editor.colorPicker = RED.colorPicker = (function() {
function create(options) {
var color = options.value;
@@ -76,6 +76,9 @@ RED.colorPicker = (function() {
var focusTarget = colorInput;
colorInput.on("change", function (e) {
var color = colorInput.val();
if (options.defaultValue && !color.match(/^([a-z]+|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{3})$/)) {
color = options.defaultValue;
}
colorHiddenInput.val(color).trigger('change');
refreshDisplay(color);
});

View File

@@ -0,0 +1,625 @@
RED.editor.envVarList = (function() {
var currentLocale = 'en-US';
var DEFAULT_ENV_TYPE_LIST = ['str','num','bool','json','bin','env'];
var DEFAULT_ENV_TYPE_LIST_INC_CRED = ['str','num','bool','json','bin','env','cred','jsonata'];
/**
* Create env var edit interface
* @param container - container
* @param node - subflow node
*/
function buildPropertiesList(envContainer, node) {
var isTemplateNode = (node.type === "subflow");
envContainer
.css({
'min-height':'150px',
'min-width':'450px'
})
.editableList({
header: isTemplateNode?$('<div><div><div></div><div data-i18n="common.label.name"></div><div data-i18n="editor-tab.defaultValue"></div><div></div></div></div>'):undefined,
addItem: function(container, i, opt) {
// If this is an instance node, these are properties unique to
// this instance - ie opt.parent will not be defined.
if (isTemplateNode) {
container.addClass("red-ui-editor-subflow-env-editable")
}
var envRow = $('<div/>').appendTo(container);
var nameField = null;
var valueField = null;
nameField = $('<input/>', {
class: "node-input-env-name",
type: "text",
placeholder: RED._("common.label.name")
}).attr("autocomplete","disable").appendTo(envRow).val(opt.name);
valueField = $('<input/>',{
style: "width:100%",
class: "node-input-env-value",
type: "text",
}).attr("autocomplete","disable").appendTo(envRow);
var types = (opt.ui && opt.ui.opts && opt.ui.opts.types);
if (!types) {
types = isTemplateNode ? DEFAULT_ENV_TYPE_LIST : DEFAULT_ENV_TYPE_LIST_INC_CRED;
}
valueField.typedInput({default:'str',types:types});
valueField.typedInput('type', opt.type);
if (opt.type === "cred") {
if (opt.value) {
valueField.typedInput('value', opt.value);
} else if (node.credentials && node.credentials[opt.name]) {
valueField.typedInput('value', node.credentials[opt.name]);
} else if (node.credentials && node.credentials['has_'+opt.name]) {
valueField.typedInput('value', "__PWRD__");
} else {
valueField.typedInput('value', "");
}
} else {
valueField.typedInput('value', opt.value);
}
opt.nameField = nameField;
opt.valueField = valueField;
var actionButton = $('<a/>',{href:"#",class:"red-ui-editableList-item-remove red-ui-button red-ui-button-small"}).appendTo(envRow);
$('<i/>',{class:"fa "+(opt.parent?"fa-reply":"fa-remove")}).appendTo(actionButton);
var removeTip = RED.popover.tooltip(actionButton,RED._("subflow.env.remove"));
actionButton.on("click", function(evt) {
evt.preventDefault();
removeTip.close();
container.parent().addClass("red-ui-editableList-item-deleting")
container.fadeOut(300, function() {
envContainer.editableList('removeItem',opt);
});
});
if (isTemplateNode) {
// Add the UI customisation row
// if `opt.ui` does not exist, then apply defaults. If these
// defaults do not change then they will get stripped off
// before saving.
if (opt.type === 'cred') {
opt.ui = opt.ui || {
icon: "",
type: "cred"
}
opt.ui.type = "cred";
} else {
opt.ui = opt.ui || {
icon: "",
type: "input",
opts: {types:DEFAULT_ENV_TYPE_LIST}
}
}
opt.ui.label = opt.ui.label || {};
opt.ui.type = opt.ui.type || "input";
if ((opt.ui.type === "cred") &&
opt.ui.opts &&
opt.ui.opts.types) {
opt.ui.type = "input";
}
var uiRow = $('<div/>').appendTo(container).hide();
// save current info for reverting on cancel
// var copy = $.extend(true, {}, ui);
$('<a href="#"><i class="fa fa-angle-right"></a>').prependTo(envRow).on("click", function (evt) {
evt.preventDefault();
if ($(this).hasClass('expanded')) {
uiRow.slideUp();
$(this).removeClass('expanded');
} else {
uiRow.slideDown();
$(this).addClass('expanded');
}
});
buildEnvEditRow(uiRow, opt.ui, nameField, valueField);
nameField.trigger('change');
}
},
sortable: ".red-ui-editableList-item-handle",
removable: false
});
var parentEnv = {};
var envList = [];
if (/^subflow:/.test(node.type)) {
var subflowDef = RED.nodes.subflow(node.type.substring(8));
if (subflowDef.env) {
subflowDef.env.forEach(function(env) {
var item = {
name:env.name,
parent: {
type: env.type,
value: env.value,
ui: env.ui
}
}
envList.push(item);
parentEnv[env.name] = item;
})
}
}
if (node.env) {
for (var i = 0; i < node.env.length; i++) {
var env = node.env[i];
if (parentEnv.hasOwnProperty(env.name)) {
parentEnv[env.name].type = env.type;
parentEnv[env.name].value = env.value;
} else {
envList.push({
name: env.name,
type: env.type,
value: env.value,
ui: env.ui
});
}
}
}
envList.forEach(function(env) {
if (env.parent && env.parent.ui && env.parent.ui.type === 'hide') {
return;
}
if (!isTemplateNode && env.parent) {
return;
}
envContainer.editableList('addItem', JSON.parse(JSON.stringify(env)));
});
}
/**
* Create UI edit interface for environment variable
* @param container - container
* @param env - env var definition
* @param nameField - name field of env var
* @param valueField - value field of env var
*/
function buildEnvEditRow(container, ui, nameField, valueField) {
container.addClass("red-ui-editor-subflow-env-ui-row")
var topRow = $('<div></div>').appendTo(container);
$('<div></div>').appendTo(topRow);
$('<div>').text(RED._("editor.icon")).appendTo(topRow);
$('<div>').text(RED._("editor.label")).appendTo(topRow);
$('<div>').text(RED._("editor.inputType")).appendTo(topRow);
var row = $('<div></div>').appendTo(container);
$('<div><i class="red-ui-editableList-item-handle fa fa-bars"></i></div>').appendTo(row);
var typeOptions = {
'input': {types:DEFAULT_ENV_TYPE_LIST},
'select': {opts:[]},
'spinner': {},
'cred': {}
};
if (ui.opts) {
typeOptions[ui.type] = ui.opts;
} else {
// Pick up the default values if not otherwise provided
ui.opts = typeOptions[ui.type];
}
var iconCell = $('<div></div>').appendTo(row);
var iconButton = $('<a href="#"></a>').appendTo(iconCell);
iconButton.on("click", function(evt) {
evt.preventDefault();
var icon = ui.icon || "";
var iconPath = (icon ? RED.utils.separateIconPath(icon) : {});
RED.editor.iconPicker.show(iconButton, null, iconPath, true, function (newIcon) {
iconButton.empty();
var path = newIcon || "";
var newPath = RED.utils.separateIconPath(path);
if (newPath) {
$('<i class="fa"></i>').addClass(newPath.file).appendTo(iconButton);
}
ui.icon = path;
});
})
if (ui.icon) {
var newPath = RED.utils.separateIconPath(ui.icon);
$('<i class="fa '+newPath.file+'"></i>').appendTo(iconButton);
}
var labelCell = $('<div></div>').appendTo(row);
var label = ui.label && ui.label[currentLocale] || "";
var labelInput = $('<input type="text">').val(label).appendTo(labelCell);
ui.labelField = labelInput;
labelInput.on('change', function(evt) {
ui.label = ui.label || {};
var val = $(this).val().trim();
if (val === "") {
delete ui.label[currentLocale];
} else {
ui.label[currentLocale] = val;
}
})
var labelIcon = $('<span class="red-ui-editor-subflow-env-lang-icon"><i class="fa fa-language"></i></span>').appendTo(labelCell);
RED.popover.tooltip(labelIcon,function() {
var langs = Object.keys(ui.label);
var content = $("<div>");
if (langs.indexOf(currentLocale) === -1) {
langs.push(currentLocale);
langs.sort();
}
langs.forEach(function(l) {
var row = $('<div>').appendTo(content);
$('<span>').css({display:"inline-block",width:"120px"}).text(RED._("languages."+l)+(l===currentLocale?"*":"")).appendTo(row);
$('<span>').text(ui.label[l]||"").appendTo(row);
});
return content;
})
nameField.on('change',function(evt) {
labelInput.attr("placeholder",$(this).val())
});
var inputCell = $('<div></div>').appendTo(row);
var inputCellInput = $('<input type="text">').css("width","100%").appendTo(inputCell);
if (ui.type === "input") {
inputCellInput.val(ui.opts.types.join(","));
}
var checkbox;
var selectBox;
inputCellInput.typedInput({
types: [
{
value:"input",
label:RED._("editor.inputs.input"), icon:"fa fa-i-cursor",showLabel:false,multiple:true,options:[
{value:"str",label:RED._("editor.types.str"),icon:"red/images/typedInput/az.svg"},
{value:"num",label:RED._("editor.types.num"),icon:"red/images/typedInput/09.svg"},
{value:"bool",label:RED._("editor.types.bool"),icon:"red/images/typedInput/bool.svg"},
{value:"json",label:RED._("editor.types.json"),icon:"red/images/typedInput/json.svg"},
{value: "bin",label: RED._("editor.types.bin"),icon: "red/images/typedInput/bin.svg"},
{value: "env",label: RED._("editor.types.env"),icon: "red/images/typedInput/env.svg"},
{value: "cred",label: RED._("editor.types.cred"),icon: "fa fa-lock"}
],
default: DEFAULT_ENV_TYPE_LIST,
valueLabel: function(container,value) {
container.css("padding",0);
var innerContainer = $('<div class="red-ui-editor-subflow-env-input-type"></div>').appendTo(container);
var input = $('<div class="placeholder-input">').appendTo(innerContainer);
$('<span><i class="fa fa-i-cursor"></i></span>').appendTo(input);
if (value.length) {
value.forEach(function(v) {
if (!/^fa /.test(v.icon)) {
$('<img>',{src:v.icon,style:"max-width:14px; padding: 0 3px; margin-top:-4px; margin-left: 1px"}).appendTo(input);
} else {
var s = $('<span>',{style:"max-width:14px; padding: 0 3px; margin-top:-4px; margin-left: 1px"}).appendTo(input);
$("<i>",{class: v.icon}).appendTo(s);
}
})
} else {
$('<span class="red-ui-editor-subflow-env-input-type-placeholder"></span>').text(RED._("editor.selectType")).appendTo(input);
}
}
},
{
value: "cred",
label: RED._("typedInput.type.cred"), icon:"fa fa-lock", showLabel: false,
valueLabel: function(container,value) {
container.css("padding",0);
var innerContainer = $('<div class="red-ui-editor-subflow-env-input-type">').css({
"border-top-right-radius": "4px",
"border-bottom-right-radius": "4px"
}).appendTo(container);
$('<div class="placeholder-input">').html("&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;").appendTo(innerContainer);
}
},
{
value:"select",
label:RED._("editor.inputs.select"), icon:"fa fa-tasks",showLabel:false,
valueLabel: function(container,value) {
container.css("padding","0");
selectBox = $('<select></select>').appendTo(container);
if (ui.opts && Array.isArray(ui.opts.opts)) {
ui.opts.opts.forEach(function(o) {
var label = lookupLabel(o.l, o.l["en-US"]||o.v, currentLocale);
// $('<option>').val((o.t||'str')+":"+o.v).text(label).appendTo(selectBox);
$('<option>').val(o.v).text(label).appendTo(selectBox);
})
}
selectBox.on('change', function(evt) {
var v = selectBox.val();
// var parts = v.split(":");
// var t = parts.shift();
// v = parts.join(":");
//
// valueField.typedInput("type",'str')
valueField.typedInput("value",v)
});
selectBox.val(valueField.typedInput("value"));
// selectBox.val(valueField.typedInput('type')+":"+valueField.typedInput("value"));
},
expand: {
icon: "fa-caret-down",
minWidth: 400,
content: function(container) {
var content = $('<div class="red-ui-editor-subflow-ui-edit-panel">').appendTo(container);
var optList = $('<ol>').appendTo(content).editableList({
header:$("<div><div>"+RED._("editor.select.label")+"</div><div>"+RED._("editor.select.value")+"</div></div>"),
addItem: function(row,index,itemData) {
var labelDiv = $('<div>').appendTo(row);
var label = lookupLabel(itemData.l, "", currentLocale);
itemData.label = $('<input type="text">').val(label).appendTo(labelDiv);
itemData.label.on('keydown', function(evt) {
if (evt.keyCode === 13) {
itemData.input.focus();
evt.preventDefault();
}
});
var labelIcon = $('<span class="red-ui-editor-subflow-env-lang-icon"><i class="fa fa-language"></i></span>').appendTo(labelDiv);
RED.popover.tooltip(labelIcon,function() {
return currentLocale;
})
itemData.input = $('<input type="text">').val(itemData.v).appendTo(row);
// Problem using a TI here:
// - this is in a popout panel
// - clicking the expand button in the TI will close the parent edit tray
// and open the type editor.
// - but it leaves the popout panel over the top.
// - there is no way to get back to the popout panel after closing the type editor
//.typedInput({default:itemData.t||'str', types:DEFAULT_ENV_TYPE_LIST});
itemData.input.on('keydown', function(evt) {
if (evt.keyCode === 13) {
// Enter or Tab
var index = optList.editableList('indexOf',itemData);
var length = optList.editableList('length');
if (index + 1 === length) {
var newItem = {};
optList.editableList('addItem',newItem);
setTimeout(function() {
if (newItem.label) {
newItem.label.focus();
}
},100)
} else {
var nextItem = optList.editableList('getItemAt',index+1);
if (nextItem.label) {
nextItem.label.focus()
}
}
evt.preventDefault();
}
});
},
sortable: true,
removable: true,
height: 160
})
if (ui.opts.opts.length > 0) {
ui.opts.opts.forEach(function(o) {
optList.editableList('addItem',$.extend(true,{},o))
})
} else {
optList.editableList('addItem',{})
}
return {
onclose: function() {
var items = optList.editableList('items');
var vals = [];
items.each(function (i,el) {
var data = el.data('data');
var l = data.label.val().trim();
var v = data.input.val();
// var t = data.input.typedInput('type');
// var v = data.input.typedInput('value');
if (l.length > 0) {
data.l = data.l || {};
data.l[currentLocale] = l;
}
data.v = v;
if (l.length > 0 || v.length > 0) {
var val = {l:data.l,v:data.v};
// if (t !== 'str') {
// val.t = t;
// }
vals.push(val);
}
});
ui.opts.opts = vals;
inputCellInput.typedInput('value',Date.now())
}
}
}
}
},
{
value:"checkbox",
label:RED._("editor.inputs.checkbox"), icon:"fa fa-check-square-o",showLabel:false,
valueLabel: function(container,value) {
container.css("padding",0);
checkbox = $('<input type="checkbox">').appendTo(container);
checkbox.on('change', function(evt) {
valueField.typedInput('value',$(this).prop('checked')?"true":"false");
})
checkbox.prop('checked',valueField.typedInput('value')==="true");
}
},
{
value:"spinner",
label:RED._("editor.inputs.spinner"), icon:"fa fa-sort-numeric-asc", showLabel:false,
valueLabel: function(container,value) {
container.css("padding",0);
var innerContainer = $('<div class="red-ui-editor-subflow-env-input-type"></div>').appendTo(container);
var input = $('<div class="placeholder-input">').appendTo(innerContainer);
$('<span><i class="fa fa-sort-numeric-asc"></i></span>').appendTo(input);
var min = ui.opts && ui.opts.min;
var max = ui.opts && ui.opts.max;
var label = "";
if (min !== undefined && max !== undefined) {
label = Math.min(min,max)+" - "+Math.max(min,max);
} else if (min !== undefined) {
label = "> "+min;
} else if (max !== undefined) {
label = "< "+max;
}
$('<span>').css("margin-left","15px").text(label).appendTo(input);
},
expand: {
icon: "fa-caret-down",
content: function(container) {
var content = $('<div class="red-ui-editor-subflow-ui-edit-panel">').appendTo(container);
content.css("padding","8px 5px")
var min = ui.opts.min;
var max = ui.opts.max;
var minInput = $('<input type="number" style="margin-bottom:0; width:60px">');
minInput.val(min);
var maxInput = $('<input type="number" style="margin-bottom:0; width:60px">');
maxInput.val(max);
$('<div class="form-row" style="margin-bottom:3px"><label>'+RED._("editor.spinner.min")+'</label></div>').append(minInput).appendTo(content);
$('<div class="form-row" style="margin-bottom:0"><label>'+RED._("editor.spinner.max")+'</label></div>').append(maxInput).appendTo(content);
return {
onclose: function() {
var min = minInput.val().trim();
var max = maxInput.val().trim();
if (min !== "") {
ui.opts.min = parseInt(min);
} else {
delete ui.opts.min;
}
if (max !== "") {
ui.opts.max = parseInt(max);
} else {
delete ui.opts.max;
}
inputCellInput.typedInput('value',Date.now())
}
}
}
}
},
{
value:"none",
label:RED._("editor.inputs.none"), icon:"fa fa-times",hasValue:false
},
{
value:"hide",
label:RED._("editor.inputs.hidden"), icon:"fa fa-ban",hasValue:false
}
],
default: 'none'
}).on("typedinputtypechange", function(evt,type) {
ui.type = $(this).typedInput("type");
ui.opts = typeOptions[ui.type];
if (ui.type === 'input') {
// In the case of 'input' type, the typedInput uses the multiple-option
// mode. Its value needs to be set to a comma-separately list of the
// selected options.
inputCellInput.typedInput('value',ui.opts.types.join(","))
} else {
// No other type cares about `value`, but doing this will
// force a refresh of the label now that `ui.opts` has
// been updated.
inputCellInput.typedInput('value',Date.now())
}
switch (ui.type) {
case 'input':
valueField.typedInput('types',ui.opts.types);
break;
case 'select':
valueField.typedInput('types',['str']);
break;
case 'checkbox':
valueField.typedInput('types',['bool']);
break;
case 'spinner':
valueField.typedInput('types',['num']);
break;
case 'cred':
valueField.typedInput('types',['cred']);
break;
default:
valueField.typedInput('types',DEFAULT_ENV_TYPE_LIST)
}
if (ui.type === 'checkbox') {
valueField.typedInput('type','bool');
} else if (ui.type === 'spinner') {
valueField.typedInput('type','num');
}
if (ui.type !== 'checkbox') {
checkbox = null;
}
}).on("change", function(evt,type) {
if (ui.type === 'input') {
var types = inputCellInput.typedInput('value');
ui.opts.types = (types === "") ? ["str"] : types.split(",");
valueField.typedInput('types',ui.opts.types);
}
});
valueField.on("change", function(evt) {
if (checkbox) {
checkbox.prop('checked',$(this).typedInput('value')==="true")
}
})
// Set the input to the right type. This will trigger the 'typedinputtypechange'
// event handler (just above ^^) to update the value if needed
inputCellInput.typedInput('type',ui.type)
}
function setLocale(l, list) {
currentLocale = l;
if (list) {
var items = list.editableList("items");
items.each(function (i, item) {
var entry = $(this).data('data');
var labelField = entry.ui.labelField;
labelField.val(lookupLabel(entry.ui.label, "", currentLocale));
if (labelField.timeout) {
clearTimeout(labelField.timeout);
delete labelField.timeout;
}
labelField.addClass("input-updated");
labelField.timeout = setTimeout(function() {
delete labelField.timeout
labelField.removeClass("input-updated");
},3000);
});
}
}
/**
* Lookup text for specific locale
* @param labels - dict of labels
* @param defaultLabel - fallback label if not found
* @param locale - target locale
* @returns {string} text for specified locale
*/
function lookupLabel(labels, defaultLabel, locale) {
if (labels) {
if (labels[locale]) {
return labels[locale];
}
if (locale) {
var lang = locale.substring(0, 2);
if (labels[lang]) {
return labels[lang];
}
}
}
return defaultLabel;
}
return {
create: buildPropertiesList,
setLocale: setLocale,
lookupLabel: lookupLabel,
DEFAULT_ENV_TYPE_LIST: DEFAULT_ENV_TYPE_LIST,
DEFAULT_ENV_TYPE_LIST_INC_CRED: DEFAULT_ENV_TYPE_LIST_INC_CRED
}
})();

View File

@@ -50,6 +50,7 @@
show: function(options) {
var expressionTestCacheId = options.parent||"_";
var value = options.value;
var onCancel = options.cancel;
var onComplete = options.complete;
var type = "_expression"
if ($("script[data-template-name='"+type+"']").length === 0) {
@@ -63,12 +64,14 @@
var trayOptions = {
title: options.title,
focusElement: options.focusElement,
width: "inherit",
buttons: [
{
id: "node-dialog-cancel",
text: RED._("common.label.cancel"),
click: function() {
if(onCancel) { onCancel(); }
RED.tray.close();
}
},
@@ -78,7 +81,8 @@
class: "primary",
click: function() {
$("#red-ui-editor-type-expression-help").text("");
onComplete(expressionEditor.getValue());
expressionEditor.saveView();
if (onComplete) { onComplete(expressionEditor.getValue(),expressionEditor.getCursorPosition(),expressionEditor); }
RED.tray.close();
}
}
@@ -110,6 +114,8 @@
id: 'red-ui-editor-type-expression',
value: "",
mode:"ace/mode/jsonata",
stateId: options.stateId,
focus: true,
options: {
enableBasicAutocompletion:true,
enableSnippets:true,
@@ -121,73 +127,75 @@
var currentFunctionMarker = null;
expressionEditor.getSession().setValue(value||"",-1);
expressionEditor.on("changeSelection", function() {
var c = expressionEditor.getCursorPosition();
var token = expressionEditor.getSession().getTokenAt(c.row,c.column);
if (token !== currentToken || (token && /paren/.test(token.type) && c.column !== currentTokenPos)) {
currentToken = token;
var r,p;
var scopedFunction = null;
if (token && token.type === 'keyword') {
r = c.row;
scopedFunction = token;
} else {
var depth = 0;
var next = false;
if (token) {
if (token.type === 'paren.rparen') {
// If this is a block of parens ')))', set
// depth to offset against the cursor position
// within the block
currentTokenPos = c.column;
depth = c.column - (token.start + token.value.length);
}
//ace only (monaco has jsonata tokeniser)
if(expressionEditor.type == "ace") {
expressionEditor.on("changeSelection", function() {
var c = expressionEditor.getCursorPosition();
var token = expressionEditor.getSession().getTokenAt(c.row,c.column);
if (token !== currentToken || (token && /paren/.test(token.type) && c.column !== currentTokenPos)) {
currentToken = token;
var r,p;
var scopedFunction = null;
if (token && token.type === 'keyword') {
r = c.row;
p = token.index;
scopedFunction = token;
} else {
r = c.row-1;
p = -1;
}
while ( scopedFunction === null && r > -1) {
var rowTokens = expressionEditor.getSession().getTokens(r);
if (p === -1) {
p = rowTokens.length-1;
var depth = 0;
var next = false;
if (token) {
if (token.type === 'paren.rparen') {
// If this is a block of parens ')))', set
// depth to offset against the cursor position
// within the block
currentTokenPos = c.column;
depth = c.column - (token.start + token.value.length);
}
r = c.row;
p = token.index;
} else {
r = c.row-1;
p = -1;
}
while (p > -1) {
var type = rowTokens[p].type;
if (next) {
if (type === 'keyword') {
scopedFunction = rowTokens[p];
// console.log("HIT",scopedFunction);
break;
while ( scopedFunction === null && r > -1) {
var rowTokens = expressionEditor.getSession().getTokens(r);
if (p === -1) {
p = rowTokens.length-1;
}
while (p > -1) {
var type = rowTokens[p].type;
if (next) {
if (type === 'keyword') {
scopedFunction = rowTokens[p];
// console.log("HIT",scopedFunction);
break;
}
next = false;
}
next = false;
if (type === 'paren.lparen') {
depth-=rowTokens[p].value.length;
} else if (type === 'paren.rparen') {
depth+=rowTokens[p].value.length;
}
if (depth < 0) {
next = true;
depth = 0;
}
// console.log(r,p,depth,next,rowTokens[p]);
p--;
}
if (type === 'paren.lparen') {
depth-=rowTokens[p].value.length;
} else if (type === 'paren.rparen') {
depth+=rowTokens[p].value.length;
if (!scopedFunction) {
r--;
}
if (depth < 0) {
next = true;
depth = 0;
}
// console.log(r,p,depth,next,rowTokens[p]);
p--;
}
if (!scopedFunction) {
r--;
}
}
expressionEditor.session.removeMarker(currentFunctionMarker);
if (scopedFunction) {
//console.log(token,.map(function(t) { return t.type}));
funcSelect.val(scopedFunction.value).trigger("change");
}
}
expressionEditor.session.removeMarker(currentFunctionMarker);
if (scopedFunction) {
//console.log(token,.map(function(t) { return t.type}));
funcSelect.val(scopedFunction.value).trigger("change");
}
}
});
});
}
dialogForm.i18n();
$("#red-ui-editor-type-expression-func-insert").on("click", function(e) {
e.preventDefault();
@@ -231,6 +239,8 @@
testDataEditor = RED.editor.createEditor({
id: 'red-ui-editor-type-expression-test-data',
value: expressionTestCache[expressionTestCacheId] || '{\n "payload": "hello world"\n}',
stateId: false,
focus: false,
mode:"ace/mode/json",
lineNumbers: false
});
@@ -245,7 +255,10 @@
var currentExpression = expressionEditor.getValue();
var expr;
var usesContext = false;
var legacyMode = /(^|[^a-zA-Z0-9_'"])msg([^a-zA-Z0-9_'"]|$)/.test(currentExpression);
var usesEnv = false;
var usesMoment = false;
var usesClone = false;
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);
@@ -257,6 +270,18 @@
usesContext = true;
return null;
});
expr.assign("env", function(name) {
usesEnv = true;
return null;
});
expr.assign("moment", function(name) {
usesMoment = true;
return null;
});
expr.assign("clone", function(name) {
usesClone = true;
return null;
});
} catch(err) {
testResultEditor.setValue(RED._("expressionEditor.errors.invalid-expr",{message:err.message}),-1);
return;
@@ -269,20 +294,37 @@
}
try {
var result = expr.evaluate(legacyMode?{msg:parsedData}:parsedData);
if (usesContext) {
testResultEditor.setValue(RED._("expressionEditor.errors.context-unsupported"),-1);
return;
}
var formattedResult;
if (result !== undefined) {
formattedResult = JSON.stringify(result,null,4);
} else {
formattedResult = RED._("expressionEditor.noMatch");
}
testResultEditor.setValue(formattedResult,-1);
} catch(err) {
expr.evaluate(legacyMode?{msg:parsedData}:parsedData, (err, result) => {
if (err) {
testResultEditor.setValue(RED._("expressionEditor.errors.eval",{message:err.message}),-1);
} else {
if (usesContext) {
testResultEditor.setValue(RED._("expressionEditor.errors.context-unsupported"),-1);
return;
}
if (usesEnv) {
testResultEditor.setValue(RED._("expressionEditor.errors.env-unsupported"),-1);
return;
}
if (usesMoment) {
testResultEditor.setValue(RED._("expressionEditor.errors.moment-unsupported"),-1);
return;
}
if (usesClone) {
testResultEditor.setValue(RED._("expressionEditor.errors.clone-unsupported"),-1);
return;
}
var formattedResult;
if (result !== undefined) {
formattedResult = JSON.stringify(result,null,4);
} else {
formattedResult = RED._("expressionEditor.noMatch");
}
testResultEditor.setValue(formattedResult,-1);
}
});
} catch(err) {
testResultEditor.setValue(RED._("expressionEditor.errors.eval",{message:err.message}),-1);
}
}
@@ -300,6 +342,8 @@
testResultEditor = RED.editor.createEditor({
id: 'red-ui-editor-type-expression-test-result',
value: "",
stateId: false,
focus: false,
mode:"ace/mode/json",
lineNumbers: false,
readOnly: true
@@ -343,6 +387,7 @@
}
expressionEditor.destroy();
testDataEditor.destroy();
testResultEditor.destroy();
},
show: function() {}
}

View File

@@ -0,0 +1,99 @@
RED.editor.iconPicker = (function() {
function showIconPicker(container, backgroundColor, iconPath, faOnly, done) {
var picker = $('<div class="red-ui-icon-picker">');
var searchDiv = $("<div>",{class:"red-ui-search-container"}).appendTo(picker);
searchInput = $('<input type="text">').attr("placeholder",RED._("editor.searchIcons")).appendTo(searchDiv).searchBox({
delay: 50,
change: function() {
var searchTerm = $(this).val().trim();
if (searchTerm === "") {
iconList.find(".red-ui-icon-list-module").show();
iconList.find(".red-ui-icon-list-icon").show();
} else {
iconList.find(".red-ui-icon-list-module").hide();
iconList.find(".red-ui-icon-list-icon").each(function(i,n) {
if ($(n).data('icon').indexOf(searchTerm) === -1) {
$(n).hide();
} else {
$(n).show();
}
});
}
}
});
var row = $('<div>').appendTo(picker);
var iconList = $('<div class="red-ui-icon-list">').appendTo(picker);
var metaRow = $('<div class="red-ui-icon-meta"></div>').appendTo(picker);
var summary = $('<span>').appendTo(metaRow);
var resetButton = $('<button type="button" class="red-ui-button red-ui-button-small">'+RED._("editor.useDefault")+'</button>').appendTo(metaRow).on("click", function(e) {
e.preventDefault();
iconPanel.hide();
done(null);
});
if (!backgroundColor && faOnly) {
iconList.addClass("red-ui-icon-list-dark");
}
setTimeout(function() {
var iconSets = RED.nodes.getIconSets();
Object.keys(iconSets).forEach(function(moduleName) {
if (faOnly && (moduleName !== "font-awesome")) {
return;
}
var icons = iconSets[moduleName];
if (icons.length > 0) {
// selectIconModule.append($("<option></option>").val(moduleName).text(moduleName));
var header = $('<div class="red-ui-icon-list-module"></div>').text(moduleName).appendTo(iconList);
$('<i class="fa fa-cube"></i>').prependTo(header);
icons.forEach(function(icon) {
var iconDiv = $('<div>',{class:"red-ui-icon-list-icon"}).appendTo(iconList);
var nodeDiv = $('<div>',{class:"red-ui-search-result-node"}).appendTo(iconDiv);
var icon_url = RED.settings.apiRootUrl+"icons/"+moduleName+"/"+icon;
iconDiv.data('icon',icon_url);
if (backgroundColor) {
nodeDiv.css({
'backgroundColor': backgroundColor
});
var borderColor = RED.utils.getDarkerColor(backgroundColor);
if (borderColor !== backgroundColor) {
nodeDiv.css('border-color',borderColor)
}
}
var iconContainer = $('<div/>',{class:"red-ui-palette-icon-container"}).appendTo(nodeDiv);
RED.utils.createIconElement(icon_url, iconContainer, true);
if (iconPath.module === moduleName && iconPath.file === icon) {
iconDiv.addClass("selected");
}
iconDiv.on("mouseover", function() {
summary.text(icon);
})
iconDiv.on("mouseout", function() {
summary.html("&nbsp;");
})
iconDiv.on("click", function() {
iconPanel.hide();
done(moduleName+"/"+icon);
})
})
}
});
setTimeout(function() {
spinner.remove();
},50);
},300);
var spinner = RED.utils.addSpinnerOverlay(iconList,true);
var iconPanel = RED.popover.panel(picker);
iconPanel.show({
target: container
})
picker.slideDown(100);
searchInput.trigger("focus");
}
return {
show: showIconPicker
}
})();

View File

@@ -21,6 +21,7 @@
var definition = {
show: function(options) {
var value = options.value;
var onCancel = options.cancel;
var onComplete = options.complete;
var type = "_js"
if ($("script[data-template-name='"+type+"']").length === 0) {
@@ -28,16 +29,16 @@
}
RED.view.state(RED.state.EDITING);
var expressionEditor;
var changeTimer;
var trayOptions = {
title: options.title,
focusElement: options.focusElement,
width: options.width||"inherit",
buttons: [
{
id: "node-dialog-cancel",
text: RED._("common.label.cancel"),
click: function() {
if (onCancel) { onCancel(); }
RED.tray.close();
}
},
@@ -46,7 +47,8 @@
text: RED._("common.label.done"),
class: "primary",
click: function() {
onComplete(expressionEditor.getValue(),expressionEditor.getCursorPosition());
expressionEditor.saveView();
if (onComplete) { onComplete(expressionEditor.getValue(), expressionEditor.getCursorPosition(), expressionEditor); }
RED.tray.close();
}
}
@@ -62,11 +64,12 @@
expressionEditor.resize();
},
open: function(tray) {
var trayBody = tray.find('.red-ui-tray-body');
var dialogForm = RED.editor.buildEditForm(tray.find('.red-ui-tray-body'),'dialog-form',type,'editor');
expressionEditor = RED.editor.createEditor({
id: 'node-input-js',
mode: options.mode || 'ace/mode/javascript',
stateId: options.stateId,
focus: true,
value: value,
globals: {
msg:true,
@@ -81,21 +84,19 @@
clearTimeout: true,
setInterval: true,
clearInterval: true
}
},
extraLibs: options.extraLibs
});
if (options.cursor) {
if (options.cursor && !expressionEditor._initState) {
expressionEditor.gotoLine(options.cursor.row+1,options.cursor.column,false);
}
dialogForm.i18n();
setTimeout(function() {
expressionEditor.focus();
},300);
},
close: function() {
expressionEditor.destroy();
if (options.onclose) {
options.onclose();
}
expressionEditor.destroy();
},
show: function() {}
}

View File

@@ -21,7 +21,9 @@
'<ul id="red-ui-editor-type-json-tabs"></ul>'+
'<div id="red-ui-editor-type-json-tab-raw" class="red-ui-editor-type-json-tab-content hide">'+
'<div class="form-row" style="margin-bottom: 3px; text-align: right;">'+
'<button id="node-input-json-reformat" class="red-ui-button red-ui-button-small"><span data-i18n="jsonEditor.format"></span></button>'+
'<span class="button-group">'+
'<button id="node-input-json-reformat" class="red-ui-button red-ui-button-small"><span data-i18n="jsonEditor.format"></span></button>'+
'<span class="button-group">'+
'</div>'+
'<div class="form-row node-text-editor-row">'+
'<div style="height: 200px;min-height: 150px;" class="node-text-editor" id="node-input-json"></div>'+
@@ -34,7 +36,7 @@
var activeTab;
function insertNewItem(parent,index,copyIndex) {
function insertNewItem(parent,index,copyIndex,readOnly) {
var newValue = "";
if (parent.children.length > 0) {
@@ -60,26 +62,26 @@
newKey = keyRoot+"-"+(keySuffix++);
}
}
var newItem = handleItem(newKey,newValue,parent.depth+1,parent);
var newItem = handleItem(newKey,newValue,parent.depth+1,parent,readOnly);
parent.treeList.insertChildAt(newItem, index, true);
parent.treeList.expand();
}
function showObjectMenu(button,item) {
function showObjectMenu(button,item,readOnly) {
var elementPos = button.offset();
var options = [];
if (item.parent) {
options.push({id:"red-ui-editor-type-json-menu-insert-above", icon:"fa fa-toggle-up", label:RED._('jsonEditor.insertAbove'),onselect:function(){
var index = item.parent.children.indexOf(item);
insertNewItem(item.parent,index,index);
insertNewItem(item.parent,index,index,readOnly);
}});
options.push({id:"red-ui-editor-type-json-menu-insert-below", icon:"fa fa-toggle-down", label:RED._('jsonEditor.insertBelow'),onselect:function(){
var index = item.parent.children.indexOf(item)+1;
insertNewItem(item.parent,index,index-1);
insertNewItem(item.parent,index,index-1,readOnly);
}});
}
if (item.type === 'array' || item.type === 'object') {
options.push({id:"red-ui-editor-type-json-menu-add-child", icon:"fa fa-plus", label:RED._('jsonEditor.addItem'),onselect:function(){
insertNewItem(item,item.children.length,item.children.length-1);
insertNewItem(item,item.children.length,item.children.length-1,readOnly);
}});
}
if (item.parent) {
@@ -121,7 +123,7 @@
newKey = keyRoot+"-"+(keySuffix++);
}
}
var newItem = handleItem(newKey,convertToObject(item),item.parent.depth+1,item.parent);
var newItem = handleItem(newKey,convertToObject(item),item.parent.depth+1,item.parent,readOnly);
var index = item.parent.children.indexOf(item)+1;
item.parent.treeList.insertChildAt(newItem, index, true);
@@ -171,24 +173,24 @@
menuOptionMenu.show();
}
function parseObject(obj,depth,parent) {
function parseObject(obj,depth,parent,readOnly) {
var result = [];
for (var prop in obj) {
if (obj.hasOwnProperty(prop)) {
result.push(handleItem(prop,obj[prop],depth,parent));
result.push(handleItem(prop,obj[prop],depth,parent,readOnly));
}
}
return result;
}
function parseArray(obj,depth,parent) {
function parseArray(obj,depth,parent,readOnly) {
var result = [];
var l = obj.length;
for (var i=0;i<l;i++) {
result.push(handleItem(i,obj[i],depth,parent));
result.push(handleItem(i,obj[i],depth,parent,readOnly));
}
return result;
}
function handleItem(key,val,depth,parent) {
function handleItem(key,val,depth,parent,readOnly) {
var item = {depth:depth, type: typeof val};
var container = $('<span class="red-ui-editor-type-json-editor-label">');
if (key != null) {
@@ -204,11 +206,14 @@
if (parent && parent.type === "array") {
keyLabel.addClass("red-ui-editor-type-json-editor-label-array-key")
}
if(readOnly) {
keyLabel.addClass("readonly")
}
keyLabel.on("click", function(evt) {
if (item.parent.type === 'array') {
return;
}
if (readOnly) { return; }
evt.preventDefault();
evt.stopPropagation();
var w = Math.max(150,keyLabel.width());
@@ -253,10 +258,10 @@
item.expanded = depth < 2;
item.type = "array";
item.deferBuild = depth >= 2;
item.children = parseArray(val,depth+1,item);
item.children = parseArray(val,depth+1,item,readOnly);
} else if (val !== null && item.type === "object") {
item.expanded = depth < 2;
item.children = parseObject(val,depth+1,item);
item.children = parseObject(val,depth+1,item,readOnly);
item.deferBuild = depth >= 2;
} else {
item.value = val;
@@ -287,7 +292,11 @@
//
var orphanedChildren;
var valueLabel = $('<span class="red-ui-editor-type-json-editor-label-value">').addClass(valClass).text(valValue).appendTo(container);
if (readOnly) {
valueLabel.addClass("readonly")
}
valueLabel.on("click", function(evt) {
if (readOnly) { return; }
evt.preventDefault();
evt.stopPropagation();
if (valType === 'str') {
@@ -302,8 +311,8 @@
types:[
'str','num','bool',
{value:"null",label:RED._("common.type.null"),hasValue:false},
{value:"array",label:RED._("common.type.array"),hasValue:false,icon:"red/images/typedInput/json.png"},
{value:"object",label:RED._("common.type.object"),hasValue:false,icon:"red/images/typedInput/json.png"}
{value:"array",label:RED._("common.type.array"),hasValue:false,icon:"red/images/typedInput/json.svg"},
{value:"object",label:RED._("common.type.object"),hasValue:false,icon:"red/images/typedInput/json.svg"}
],
default: valType
});
@@ -395,17 +404,19 @@
valueLabel.hide();
})
item.gutter = $('<span class="red-ui-editor-type-json-editor-item-gutter"></span>');
if (parent) {//red-ui-editor-type-json-editor-item-handle
$('<span class="red-ui-editor-type-json-editor-item-handle"><i class="fa fa-bars"></span>').appendTo(item.gutter);
} else {
$('<span></span>').appendTo(item.gutter);
if(!readOnly) {
if (parent) {
$('<span class="red-ui-editor-type-json-editor-item-handle"><i class="fa fa-bars"></span>').appendTo(item.gutter);
} else {
$('<span></span>').appendTo(item.gutter);
}
$('<button type="button" class="editor-button editor-button-small"><i class="fa fa-caret-down"></button>').appendTo(item.gutter).on("click", function(evt) {
evt.preventDefault();
evt.stopPropagation();
showObjectMenu($(this), item, readOnly);
});
}
$('<button type="button" class="editor-button editor-button-small"><i class="fa fa-caret-down"></button>').appendTo(item.gutter).on("click", function(evt) {
evt.preventDefault();
evt.stopPropagation();
showObjectMenu($(this), item);
});
item.element = container;
return item;
}
@@ -434,6 +445,7 @@
var definition = {
show: function(options) {
var value = options.value;
var onCancel = options.cancel;
var onComplete = options.complete;
var type = "_json"
if ($("script[data-template-name='"+type+"']").length === 0) {
@@ -455,15 +467,16 @@
}
}
var rootNode;
var trayOptions = {
title: options.title,
focusElement: options.focusElement,
width: options.width||700,
buttons: [
{
id: "node-dialog-cancel",
text: RED._("common.label.cancel"),
click: function() {
if (onCancel) { onCancel(); }
RED.tray.close();
}
},
@@ -485,7 +498,8 @@
} else if (activeTab === "json-raw") {
result = expressionEditor.getValue();
}
if (onComplete) { onComplete(result) }
expressionEditor.saveView();
if (onComplete) { onComplete(result,null,expressionEditor) }
RED.tray.close();
}
}
@@ -498,10 +512,29 @@
open: function(tray) {
var trayBody = tray.find('.red-ui-tray-body');
var dialogForm = RED.editor.buildEditForm(tray.find('.red-ui-tray-body'),'dialog-form',type,'editor');
var toolbarButtons = options.toolbarButtons || [];
if (toolbarButtons.length) {
toolbarButtons.forEach(function (button) {
var element = $('<button type="button" class="red-ui-button red-ui-button-small"> </button>')
.insertBefore("#node-input-json-reformat")
.on("click", function (evt) {
evt.preventDefault();
if (button.click !== undefined) {
button.click.call(element, evt);
}
});
if (button.id) { element.attr("id", button.id); }
if (button.title) { element.attr("title", button.title); }
if (button.icon) { element.append($("<i></i>").attr("class", button.icon)); }
if (button.label || button.text) {
element.append($("<span></span>").text(" " + (button.label || button.text)));
}
});
}
var container = $("#red-ui-editor-type-json-tab-ui-container").css({"height":"100%"});
var filterDepth = Infinity;
var list = $('<div class="red-ui-debug-msg-payload red-ui-editor-type-json-editor">').appendTo(container).treeList({
selectable: false,
rootSortable: false,
sortable: ".red-ui-editor-type-json-editor-item-handle",
}).on("treelistchangeparent", function(event, evt) {
@@ -528,13 +561,15 @@
})
});
expressionEditor = RED.editor.createEditor({
id: 'node-input-json',
value: "",
mode:"ace/mode/json"
value: value||"",
mode:"ace/mode/json",
readOnly: !!options.readOnly,
stateId: options.stateId,
focus: true
});
expressionEditor.getSession().setValue(value||"",-1);
if (options.requireValid) {
expressionEditor.getSession().on('change', function() {
clearTimeout(changeTimer);
@@ -571,7 +606,7 @@
var raw = expressionEditor.getValue().trim() ||"{}";
try {
var parsed = JSON.parse(raw);
rootNode = handleItem(null,parsed,0,null);
rootNode = handleItem(null,parsed,0,null,options.readOnly);
rootNode.class = "red-ui-editor-type-json-root-node"
list.treeList('data',[rootNode]);
} catch(err) {
@@ -589,23 +624,21 @@
tabs.addTab({
id: 'json-raw',
label: RED._('jsonEditor.rawMode'),
label: options.readOnly ? RED._('jsonEditor.rawMode-readonly') : RED._('jsonEditor.rawMode'),
content: $("#red-ui-editor-type-json-tab-raw")
});
tabs.addTab({
id: 'json-ui',
label: RED._('jsonEditor.uiMode'),
label: options.readOnly ? RED._('jsonEditor.uiMode-readonly') : RED._('jsonEditor.uiMode'),
content: $("#red-ui-editor-type-json-tab-ui")
});
finishedBuild = true;
},
close: function() {
// expressionEditor.destroy();
if (options.onclose) {
options.onclose();
}
expressionEditor.destroy();
},
show: function() {}
}

View File

@@ -14,6 +14,61 @@
* limitations under the License.
**/
(function() {
/**
* Converts dropped image file to date URL
*/
function file2base64Image(file, cb) {
var reader = new FileReader();
reader.onload = (function (fd) {
return function (e) {
cb(e.target.result);
};
})(file);
reader.readAsDataURL(file);
}
var initialized = false;
var currentEditor = null;
/**
* Initialize handler for image file drag events
*/
function initImageDrag(elem, editor) {
$(elem).on("dragenter", function (ev) {
ev.preventDefault();
$("#red-ui-image-drop-target").css({display:'table'}).focus();
currentEditor = editor;
});
if (!initialized) {
initialized = true;
$("#red-ui-image-drop-target").on("dragover", function (ev) {
ev.preventDefault();
}).on("dragleave", function (ev) {
$("#red-ui-image-drop-target").hide();
}).on("drop", function (ev) {
ev.preventDefault();
if ($.inArray("Files",ev.originalEvent.dataTransfer.types) != -1) {
var files = ev.originalEvent.dataTransfer.files;
if (files.length === 1) {
var file = files[0];
var name = file.name.toLowerCase();
if (name.match(/\.(apng|avif|gif|jpeg|png|svg|webp)$/)) {
file2base64Image(file, function (image) {
var session = currentEditor.getSession();
var img = `<img src="${image}"/>\n`;
var pos = session.getCursorPosition();
session.insert(pos, img);
$("#red-ui-image-drop-target").hide();
});
return;
}
}
}
$("#red-ui-image-drop-target").hide();
});
}
}
var toolbarTemplate = '<div style="margin-bottom: 5px">'+
'<span class="button-group">'+
@@ -54,24 +109,26 @@
var definition = {
show: function(options) {
var value = options.value;
var onCancel = options.cancel;
var onComplete = options.complete;
var type = "_markdown"
if ($("script[data-template-name='"+type+"']").length === 0) {
$(template).appendTo("#red-ui-editor-node-configs");
}
RED.view.state(RED.state.EDITING);
var expressionEditor;
var trayOptions = {
title: options.title,
focusElement: options.focusElement,
width: options.width||Infinity,
buttons: [
{
id: "node-dialog-cancel",
text: RED._("common.label.cancel"),
click: function() {
if (onCancel) { onCancel(); }
RED.tray.close();
}
},
@@ -80,7 +137,8 @@
text: RED._("common.label.done"),
class: "primary",
click: function() {
onComplete(expressionEditor.getValue(),expressionEditor.getCursorPosition());
expressionEditor.saveView();
if (onComplete) { onComplete(expressionEditor.getValue(),expressionEditor.getCursorPosition(), expressionEditor); }
RED.tray.close();
}
}
@@ -99,6 +157,8 @@
expressionEditor = RED.editor.createEditor({
id: 'red-ui-editor-type-markdown',
value: value,
stateId: options.stateId,
focus: true,
mode:"ace/mode/markdown",
expandable: false
});
@@ -109,6 +169,7 @@
var currentScrollTop = $(".red-ui-editor-type-markdown-panel-preview").scrollTop();
$(".red-ui-editor-type-markdown-panel-preview").html(RED.utils.renderMarkdown(expressionEditor.getValue()));
$(".red-ui-editor-type-markdown-panel-preview").scrollTop(currentScrollTop);
mermaid.init();
},200);
})
if (options.header) {
@@ -117,6 +178,7 @@
if (value) {
$(".red-ui-editor-type-markdown-panel-preview").html(RED.utils.renderMarkdown(expressionEditor.getValue()));
mermaid.init();
}
panels = RED.panels.create({
id:"red-ui-editor-type-markdown-panels",
@@ -143,17 +205,21 @@
});
RED.popover.tooltip($("#node-btn-markdown-preview"), RED._("markdownEditor.toggle-preview"));
if (options.cursor) {
expressionEditor.gotoLine(options.cursor.row+1,options.cursor.column,false);
}
if(!expressionEditor._initState) {
if (options.cursor) {
expressionEditor.gotoLine(options.cursor.row+1,options.cursor.column,false);
}
else {
expressionEditor.gotoLine(0, 0, false);
}
}
dialogForm.i18n();
},
close: function() {
expressionEditor.destroy();
if (options.onclose) {
options.onclose();
}
expressionEditor.destroy();
},
show: function() {}
}
@@ -168,7 +234,7 @@
'b': { before:"**", after: "**", tooltip: RED._("markdownEditor.bold")},
'i': { before:"_", after: "_", tooltip: RED._("markdownEditor.italic")},
'code': { before:"`", after: "`", tooltip: RED._("markdownEditor.code")},
'ol': { before:" * ", newline: true, tooltip: RED._("markdownEditor.ordered-list")},
'ol': { before:" 1. ", newline: true, tooltip: RED._("markdownEditor.ordered-list")},
'ul': { before:" - ", newline: true, tooltip: RED._("markdownEditor.unordered-list")},
'bq': { before:"> ", newline: true, tooltip: RED._("markdownEditor.quote")},
'link': { before:"[", after: "]()", tooltip: RED._("markdownEditor.link")},
@@ -210,7 +276,11 @@
}
})
return toolbar;
}
},
postInit: function (editor, options) {
var elem = $("#"+options.id);
initImageDrag(elem, editor);
}
}
RED.editor.registerTypeEditor("_markdown", definition);
})();

View File

@@ -0,0 +1,530 @@
;(function() {
RED.editor.registerEditPane("editor-tab-appearance", function(node) {
return {
label: RED._("editor-tab.appearance"),
name: RED._("editor-tab.appearance"),
iconClass: "fa fa-object-group",
create: function(container) {
this.content = container;
buildAppearanceForm(this.content,node);
if (node.type === 'subflow') {
this.defaultIcon = "node-red/subflow.svg";
} else {
var iconPath = RED.utils.getDefaultNodeIcon(node._def,node);
this.defaultIcon = iconPath.module+"/"+iconPath.file;
if (node.icon && node.icon !== this.defaultIcon) {
this.isDefaultIcon = false;
} else {
this.isDefaultIcon = true;
}
}
},
resize: function(size) {
},
close: function() {
},
show: function() {
refreshLabelForm(this.content, node);
},
apply: function(editState) {
if (updateLabels(node, editState.changes, editState.outputMap)) {
editState.changed = true;
}
if (!node._def.defaults || !node._def.defaults.hasOwnProperty("icon")) {
var icon = $("#red-ui-editor-node-icon").val()||"";
if (!this.isDefaultIcon) {
if ((node.icon && icon !== node.icon) || (!node.icon && icon !== "")) {
editState.changes.icon = node.icon;
node.icon = icon;
editState.changed = true;
}
} else {
if (icon !== "" && icon !== this.defaultIcon) {
editState.changes.icon = node.icon;
node.icon = icon;
editState.changed = true;
} else {
var iconPath = RED.utils.getDefaultNodeIcon(node._def, node);
var currentDefaultIcon = iconPath.module+"/"+iconPath.file;
if (this.defaultIcon !== currentDefaultIcon) {
editState.changes.icon = node.icon;
node.icon = currentDefaultIcon;
editState.changed = true;
}
}
}
}
if (node.type === "subflow") {
var newCategory = $("#subflow-appearance-input-category").val().trim();
if (newCategory === "_custom_") {
newCategory = $("#subflow-appearance-input-custom-category").val().trim();
if (newCategory === "") {
newCategory = node.category;
}
}
if (newCategory === 'subflows') {
newCategory = '';
}
if (newCategory != node.category) {
editState.changes['category'] = node.category;
node.category = newCategory;
editState.changed = true;
}
var oldColor = node.color;
var newColor = $("#red-ui-editor-node-color").val();
if (oldColor !== newColor) {
editState.changes.color = node.color;
node.color = newColor;
editState.changed = true;
RED.utils.clearNodeColorCache();
if (node.type === "subflow") {
var nodeDefinition = RED.nodes.getType(
"subflow:" + node.id
);
nodeDefinition["color"] = newColor;
}
}
}
var showLabel = node._def.hasOwnProperty("showLabel")?node._def.showLabel:true;
if (!$("#node-input-show-label").prop('checked')) {
// Not checked - hide label
if (showLabel) {
// Default to show label
if (node.l !== false) {
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.changed = true;
}
delete node.l;
}
} else {
// Checked - show label
if (showLabel) {
// Default to show label
if (node.hasOwnProperty('l') && !node.l) {
editState.changes.l = node.l;
editState.changed = true;
}
delete node.l;
} else {
if (!node.l) {
editState.changes.l = node.l;
editState.changed = true;
}
node.l = true;
}
}
}
};
});
function buildAppearanceForm(container,node) {
var dialogForm = $('<form class="dialog-form form-horizontal" autocomplete="off"></form>').appendTo(container);
var i,row;
if (node.type === "subflow") {
var categoryRow = $("<div/>", {
class: "form-row"
}).appendTo(dialogForm);
$("<label/>", {
for: "subflow-appearance-input-category",
"data-i18n": "editor:subflow.category"
}).appendTo(categoryRow);
var categorySelector = $("<select/>", {
id: "subflow-appearance-input-category"
}).css({
width: "250px"
}).appendTo(categoryRow);
$("<input/>", {
type: "text",
id: "subflow-appearance-input-custom-category"
}).css({
display: "none",
"margin-left": "10px",
width: "calc(100% - 250px)"
}).appendTo(categoryRow);
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")));
$("#subflow-appearance-input-category").on("change", function() {
var val = $(this).val();
if (val === "_custom_") {
$("#subflow-appearance-input-category").width(120);
$("#subflow-appearance-input-custom-category").show();
} else {
$("#subflow-appearance-input-category").width(250);
$("#subflow-appearance-input-custom-category").hide();
}
});
$("#subflow-appearance-input-category").val(node.category||"subflows");
var userCount = 0;
var subflowType = "subflow:"+node.id;
// RED.nodes.eachNode(function(n) {
// if (n.type === subflowType) {
// userCount++;
// }
// });
$("#red-ui-editor-subflow-user-count")
.text(RED._("subflow.subflowInstances", {count:node.instances.length})).show();
}
$('<div class="form-row">'+
'<label for="node-input-show-label-btn" data-i18n="editor.label"></label>'+
'<span style="margin-right: 2px;"/>'+
'<input type="checkbox" id="node-input-show-label"/>'+
'</div>').appendTo(dialogForm);
$("#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
node.l = node._def.hasOwnProperty("showLabel")?node._def.showLabel:true;
}
$("#node-input-show-label").prop("checked",node.l).trigger("change");
if (node.type === "subflow") {
// subflow template can select its color
var color = node.color ? node.color : "#DDAA99";
var colorRow = $("<div/>", {
class: "form-row"
}).appendTo(dialogForm);
$("<label/>").text(RED._("editor.color")).appendTo(colorRow);
var recommendedColors = [
"#DDAA99",
"#3FADB5", "#87A980", "#A6BBCF",
"#AAAA66", "#C0C0C0", "#C0DEED",
"#C7E9C0", "#D7D7A0", "#D8BFD8",
"#DAC4B4", "#DEB887", "#DEBD5C",
"#E2D96E", "#E6E0F8", "#E7E7AE",
"#E9967A", "#F3B567", "#FDD0A2",
"#FDF0C2", "#FFAAAA", "#FFCC66",
"#FFF0F0", "#FFFFFF"
];
RED.editor.colorPicker.create({
id: "red-ui-editor-node-color",
value: color,
defaultValue: "#DDAA99",
palette: recommendedColors,
sortPalette: function (a, b) {return a.l - b.l;}
}).appendTo(colorRow);
$("#red-ui-editor-node-color").on('change', function(ev) {
// Horribly out of scope...
var colour = $(this).val();
nodeDiv.css('backgroundColor',colour);
var borderColor = RED.utils.getDarkerColor(colour);
if (borderColor !== colour) {
nodeDiv.css('border-color',borderColor);
}
});
}
// If a node has icon property in defaults, the icon of the node cannot be modified. (e.g, ui_button node in dashboard)
if ((!node._def.defaults || !node._def.defaults.hasOwnProperty("icon"))) {
var iconRow = $('<div class="form-row"></div>').appendTo(dialogForm);
$('<label data-i18n="editor.settingIcon">').appendTo(iconRow);
var iconButton = $('<button type="button" class="red-ui-button red-ui-editor-node-appearance-button">').appendTo(iconRow);
$('<i class="fa fa-caret-down"></i>').appendTo(iconButton);
var nodeDiv = $('<div>',{class:"red-ui-search-result-node"}).appendTo(iconButton);
var colour = RED.utils.getNodeColor(node.type, node._def);
var icon_url = RED.utils.getNodeIcon(node._def,node);
nodeDiv.css('backgroundColor',colour);
var borderColor = RED.utils.getDarkerColor(colour);
if (borderColor !== colour) {
nodeDiv.css('border-color',borderColor);
}
var iconContainer = $('<div/>',{class:"red-ui-palette-icon-container"}).appendTo(nodeDiv);
RED.utils.createIconElement(icon_url, iconContainer, true);
iconButton.on("click", function(e) {
e.preventDefault();
var iconPath;
var icon = $("#red-ui-editor-node-icon").val()||"";
if (icon) {
iconPath = RED.utils.separateIconPath(icon);
} else {
iconPath = RED.utils.getDefaultNodeIcon(node._def, node);
}
var backgroundColor = RED.utils.getNodeColor(node.type, node._def);
if (node.type === "subflow") {
backgroundColor = $("#red-ui-editor-node-color").val();
}
RED.editor.iconPicker.show(iconButton,backgroundColor,iconPath,false,function(newIcon) {
$("#red-ui-editor-node-icon").val(newIcon||"");
var icon_url = RED.utils.getNodeIcon(node._def,{type:node.type,icon:newIcon});
RED.utils.createIconElement(icon_url, iconContainer, true);
});
});
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);
}
$('<div class="form-row"><span data-i18n="editor.portLabels"></span></div>').appendTo(dialogForm);
var inputCount = node.inputs || node._def.inputs || 0;
var outputCount = node.outputs || node._def.outputs || 0;
if (node.type === 'subflow') {
inputCount = node.in.length;
outputCount = node.out.length;
}
var inputLabels = node.inputLabels || [];
var outputLabels = node.outputLabels || [];
var inputPlaceholder = node._def.inputLabels?RED._("editor.defaultLabel"):RED._("editor.noDefaultLabel");
var outputPlaceholder = node._def.outputLabels?RED._("editor.defaultLabel"):RED._("editor.noDefaultLabel");
$('<div class="form-row"><span style="margin-left: 50px;" data-i18n="editor.labelInputs"></span><div id="red-ui-editor-node-label-form-inputs"></div></div>').appendTo(dialogForm);
var inputsDiv = $("#red-ui-editor-node-label-form-inputs");
if (inputCount > 0) {
for (i=0;i<inputCount;i++) {
buildLabelRow("input",i,inputLabels[i],inputPlaceholder).appendTo(inputsDiv);
}
} else {
buildLabelRow().appendTo(inputsDiv);
}
$('<div class="form-row"><span style="margin-left: 50px;" data-i18n="editor.labelOutputs"></span><div id="red-ui-editor-node-label-form-outputs"></div></div>').appendTo(dialogForm);
var outputsDiv = $("#red-ui-editor-node-label-form-outputs");
if (outputCount > 0) {
for (i=0;i<outputCount;i++) {
buildLabelRow("output",i,outputLabels[i],outputPlaceholder).appendTo(outputsDiv);
}
} else {
buildLabelRow().appendTo(outputsDiv);
}
}
function refreshLabelForm(container,node) {
var inputPlaceholder = node._def.inputLabels?RED._("editor.defaultLabel"):RED._("editor.noDefaultLabel");
var outputPlaceholder = node._def.outputLabels?RED._("editor.defaultLabel"):RED._("editor.noDefaultLabel");
var inputsDiv = $("#red-ui-editor-node-label-form-inputs");
var outputsDiv = $("#red-ui-editor-node-label-form-outputs");
var inputCount;
var formInputs = $("#node-input-inputs").val();
if (formInputs === undefined) {
if (node.type === 'subflow') {
inputCount = node.in.length;
} else {
inputCount = node.inputs || node._def.inputs || 0;
}
} else {
inputCount = Math.min(1,Math.max(0,parseInt(formInputs)));
if (isNaN(inputCount)) {
inputCount = 0;
}
}
var children = inputsDiv.children();
var childCount = children.length;
if (childCount === 1 && $(children[0]).hasClass('red-ui-editor-node-label-form-none')) {
childCount--;
}
if (childCount < inputCount) {
if (childCount === 0) {
// remove the 'none' placeholder
$(children[0]).remove();
}
for (i = childCount;i<inputCount;i++) {
buildLabelRow("input",i,"",inputPlaceholder).appendTo(inputsDiv);
}
} else if (childCount > inputCount) {
for (i=inputCount;i<childCount;i++) {
$(children[i]).remove();
}
if (inputCount === 0) {
buildLabelRow().appendTo(inputsDiv);
}
}
var outputCount;
var i;
var formOutputs = $("#node-input-outputs").val();
if (formOutputs === undefined) {
if (node.type === 'subflow') {
outputCount = node.out.length;
} else {
inputCount = node.outputs || node._def.outputs || 0;
}
} else if (isNaN(formOutputs)) {
var outputMap = JSON.parse(formOutputs);
var keys = Object.keys(outputMap);
children = outputsDiv.children();
childCount = children.length;
if (childCount === 1 && $(children[0]).hasClass('red-ui-editor-node-label-form-none')) {
childCount--;
}
outputCount = 0;
var rows = [];
keys.forEach(function(p) {
var row = $("#red-ui-editor-node-label-form-output-"+p).parent();
if (row.length === 0 && outputMap[p] !== -1) {
if (childCount === 0) {
$(children[0]).remove();
childCount = -1;
}
row = buildLabelRow("output",p,"",outputPlaceholder);
} else {
row.detach();
}
if (outputMap[p] !== -1) {
outputCount++;
rows.push({i:parseInt(outputMap[p]),r:row});
}
});
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 {
}
} else {
outputCount = Math.max(0,parseInt(formOutputs));
}
children = outputsDiv.children();
childCount = children.length;
if (childCount === 1 && $(children[0]).hasClass('red-ui-editor-node-label-form-none')) {
childCount--;
}
if (childCount < outputCount) {
if (childCount === 0) {
// remove the 'none' placeholder
$(children[0]).remove();
}
for (i = childCount;i<outputCount;i++) {
buildLabelRow("output",i,"").appendTo(outputsDiv);
}
} else if (childCount > outputCount) {
for (i=outputCount;i<childCount;i++) {
$(children[i]).remove();
}
if (outputCount === 0) {
buildLabelRow().appendTo(outputsDiv);
}
}
}
function buildLabelRow(type, index, value, placeHolder) {
var result = $('<div>',{class:"red-ui-editor-node-label-form-row"});
if (type === undefined) {
$('<span>').text(RED._("editor.noDefaultLabel")).appendTo(result);
result.addClass("red-ui-editor-node-label-form-none");
} else {
result.addClass("");
var id = "red-ui-editor-node-label-form-"+type+"-"+index;
$('<label>',{for:id}).text((index+1)+".").appendTo(result);
var input = $('<input>',{type:"text",id:id, placeholder: placeHolder}).val(value).appendTo(result);
var clear = $('<button type="button" class="red-ui-button red-ui-button-small"><i class="fa fa-times"></i></button>').appendTo(result);
clear.on("click", function(evt) {
evt.preventDefault();
input.val("");
});
}
return result;
}
function updateLabels(node, changes, outputMap) {
var inputLabels = $("#red-ui-editor-node-label-form-inputs").children().find("input");
var outputLabels = $("#red-ui-editor-node-label-form-outputs").children().find("input");
var hasNonBlankLabel = false;
var changed = false;
var newValue = inputLabels.map(function() {
var v = $(this).val();
hasNonBlankLabel = hasNonBlankLabel || v!== "";
return v;
}).toArray().slice(0,node.inputs);
if ((node.inputLabels === undefined && hasNonBlankLabel) ||
(node.inputLabels !== undefined && JSON.stringify(newValue) !== JSON.stringify(node.inputLabels))) {
changes.inputLabels = node.inputLabels;
node.inputLabels = newValue;
changed = true;
}
hasNonBlankLabel = false;
newValue = new Array(node.outputs);
outputLabels.each(function() {
var index = $(this).attr('id').substring("red-ui-editor-node-label-form-output-".length);
if (outputMap && outputMap.hasOwnProperty(index)) {
index = parseInt(outputMap[index]);
if (index === -1) {
return;
}
}
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;
});
if ((node.outputLabels === undefined && hasNonBlankLabel) ||
(node.outputLabels !== undefined && JSON.stringify(newValue) !== JSON.stringify(node.outputLabels))) {
changes.outputLabels = node.outputLabels;
node.outputLabels = newValue;
changed = true;
// trigger redraw of dirty port labels
if (node.type === "subflow") {
RED.view.redraw();
}
}
return changed;
}
})();

Some files were not shown because too many files have changed in this diff Show More