Compare commits
1937 Commits
Author | SHA1 | Date |
---|---|---|
Nick O'Leary | ee48a2f2bf | |
Nick O'Leary | 680d5b8216 | |
Nick O'Leary | c9320c190d | |
Nick O'Leary | 566c667c5d | |
Nick O'Leary | ec6e42e655 | |
Nick O'Leary | bba6b6f71d | |
Nick O'Leary | c261f6625a | |
Nick O'Leary | a489b270d1 | |
Nick O'Leary | 51cb61940d | |
Nick O'Leary | ce2f896b45 | |
Nick O'Leary | 6635ff9a69 | |
Nick O'Leary | 41797f8cef | |
Nick O'Leary | 797cea5394 | |
Mauricio Bonani | 2880d4120e | |
Nick O'Leary | 58dec7b9b0 | |
Nick O'Leary | b0f900e25d | |
Nick O'Leary | fc54848318 | |
Nick O'Leary | 2f9f8cda81 | |
Nick O'Leary | 667e7ab8dc | |
Nick O'Leary | 4e55408fed | |
Nick O'Leary | 88aa61ea77 | |
Nick O'Leary | 2ccdeb968c | |
Nick O'Leary | 90045683c9 | |
Nick O'Leary | eb49b01cbc | |
Nick O'Leary | 3a6062775e | |
Dave Conway-Jones | 718a7bfc26 | |
Franck | 27ca30aa82 | |
Zeger-Jan van de Weg | 01b0bf1a36 | |
Kazuhito Yokoi | e1cecc9601 | |
GogoVega | 4c13f5a0af | |
GogoVega | f5a9942d5e | |
Nick O'Leary | ee2d91fb4a | |
Nick O'Leary | 6ca41ba69d | |
GogoVega | 7f9d142038 | |
GogoVega | 44a1f83b26 | |
Nick O'Leary | d9bbac20f3 | |
Nick O'Leary | a48c57dd17 | |
Nick O'Leary | 77b235655c | |
Nick O'Leary | 8dc0261993 | |
Rotzbua | 65d2ad68d3 | |
Nick O'Leary | 52fde088e9 | |
Nick O'Leary | ab6d537c3e | |
Nick O'Leary | 3a6078a56a | |
Nick O'Leary | b0c3fefcab | |
Nick O'Leary | 2bc739194e | |
Nick O'Leary | afb06e8c9a | |
Nick O'Leary | 2c1274ff76 | |
Nick O'Leary | e18721a03e | |
Rotzbua | 25120e44ce | |
Rotzbua | aea32cc279 | |
Nick O'Leary | ce0feb2f42 | |
Rotzbua | 12a1c5c2f4 | |
Nick O'Leary | d307968880 | |
Nick O'Leary | 1f98d19f77 | |
Nick O'Leary | 9a934c941f | |
Nick O'Leary | dbc7284b97 | |
Nick O'Leary | de63e17a4d | |
Nick O'Leary | 1bad643b30 | |
Nick O'Leary | 57c44d4b18 | |
Nick O'Leary | 7d06133787 | |
Nick O'Leary | 261998201b | |
Nick O'Leary | 9a899b929e | |
Nick O'Leary | 46b15a51d4 | |
Rotzbua | 5fcace8776 | |
Nick O'Leary | a12826e719 | |
Nick O'Leary | 0dc024c722 | |
Nick O'Leary | f6f36c5599 | |
Nick O'Leary | 18bd318da2 | |
Nick O'Leary | e1712073c9 | |
Nick O'Leary | 2478a7194e | |
Nick O'Leary | 89b8e88df3 | |
Kazuhito Yokoi | a7e80f351a | |
Stephen McLaughlin | c39d3db121 | |
Kazuhito Yokoi | e7f9e61f2a | |
Kazuhito Yokoi | 3047ed1253 | |
Kazuhito Yokoi | cf0c7ce583 | |
Kazuhito Yokoi | 206211f9ef | |
Kazuhito Yokoi | 8220ff8a35 | |
Nick O'Leary | 927fc5424b | |
Nick O'Leary | 64b94c68d3 | |
Nick O'Leary | 3391d18942 | |
Kazuhito Yokoi | 1414fed776 | |
Nick O'Leary | f884cb015a | |
Kazuhito Yokoi | 7e6a96db87 | |
Nick O'Leary | 966bbe2856 | |
Nick O'Leary | 2137211d42 | |
Nick O'Leary | cc5533c183 | |
Nick O'Leary | 19787e5d28 | |
Kazuhito Yokoi | 6e46666895 | |
Kazuhito Yokoi | a87d7276c5 | |
Nick O'Leary | c630b4f770 | |
Nick O'Leary | f719e5ad49 | |
Nick O'Leary | 20557f20db | |
Kazuhito Yokoi | 66144c1eb5 | |
Nick O'Leary | 054d6870d5 | |
Nick O'Leary | 04aa4897fe | |
Kazuhito Yokoi | 72b22a4845 | |
Kazuhito Yokoi | 3fd2b5f4e1 | |
Kazuhito Yokoi | 8a4128defb | |
Nick O'Leary | 9542c22191 | |
Nick O'Leary | 15b8d79489 | |
Nick O'Leary | 97470e94f1 | |
Nick O'Leary | 37a518b655 | |
Nick O'Leary | 312b2f8ddb | |
Kazuhito Yokoi | 9caa6a3553 | |
Christian Vaas | 6c597bba5b | |
Kazuhito Yokoi | 0dd771351d | |
Kilian Hertel | f7b64b101e | |
Sam Machin | ec86ec188b | |
Sam Machin | 2b01a3fcd3 | |
DarshanDixit05 | 9540502d06 | |
DarshanDixit05 | 792dedb1f1 | |
Kazuhito Yokoi | 0bf1343442 | |
Nick O'Leary | 4d3e3a73fd | |
Nick O'Leary | 1ffef393c2 | |
Nick O'Leary | 8b7b3e22d7 | |
Nick O'Leary | 877aa75e4e | |
Nick O'Leary | d21c0758b1 | |
Manuel Buchner | 21be329008 | |
Stephen McLaughlin | e7b27ce7fb | |
Stephen McLaughlin | fb2c0e5441 | |
Stephen McLaughlin | 29898ea68f | |
Kazuhito Yokoi | 9dcb8a729c | |
Kazuhito Yokoi | b66237efa8 | |
Kazuhito Yokoi | 6d2f855227 | |
Kazuhito Yokoi | 638aa0372b | |
Stephen McLaughlin | d5baa402c8 | |
Nick O'Leary | ec7e594ec1 | |
Nick O'Leary | 3fad690d1e | |
Steve-Mcl | 15973768e2 | |
Stephen McLaughlin | 0d73a4b013 | |
Stephen McLaughlin | 50f11faf1f | |
Stephen McLaughlin | cfb7406fb8 | |
Steve-Mcl | 9008f063c3 | |
Steve-Mcl | 368ac4ed5c | |
Steve-Mcl | 6ac2e703a6 | |
Kazuhito Yokoi | cd9a5f112a | |
Kazuhito Yokoi | f3847a17f3 | |
Steve-Mcl | 1fa4aaf706 | |
Nick O'Leary | db108a37cf | |
Nick O'Leary | a3e41d4f35 | |
Kazuhito Yokoi | 80e33489d9 | |
Nick O'Leary | 271b1327c7 | |
Nick O'Leary | 5d990ff4c5 | |
Nick O'Leary | 69aacc6256 | |
Nick O'Leary | a5066d529f | |
Nick O'Leary | 5bf034f3c1 | |
Nick O'Leary | 0743ff371c | |
Nick O'Leary | 7481b78b16 | |
Steve-Mcl | bd589aa140 | |
Steve-Mcl | 8fa1d4def5 | |
Stephen McLaughlin | fe3626035c | |
Kazuhito Yokoi | c4019bd91d | |
Kazuhito Yokoi | 18e1b670ca | |
Kazuhito Yokoi | cd76c934b6 | |
Zeger-Jan van de Weg | db98641a32 | |
Nick O'Leary | 59745fec0b | |
Nick O'Leary | 8bcaea7830 | |
Nick O'Leary | 56ed32e4a1 | |
Nick O'Leary | 3209777aba | |
Nick O'Leary | 11f9ad8ca3 | |
Nick O'Leary | 26fc942c79 | |
Nick O'Leary | f196493402 | |
Nick O'Leary | 1c5fdb6ab6 | |
bvmensvoort | 3ed530ed9e | |
Nick O'Leary | 8db2972288 | |
Nick O'Leary | 51a0b68d8e | |
Steve-Mcl | 2fdbe12a7f | |
Nick O'Leary | 2448e137c8 | |
Nick O'Leary | 33899763ef | |
Steve-Mcl | d8f4f92e1d | |
Nick O'Leary | ce679f90ee | |
Nick O'Leary | 8fb379079b | |
Nick O'Leary | b382d048de | |
Nick O'Leary | 610cb170e7 | |
Nick O'Leary | 4d9fcaeebf | |
Nick O'Leary | aa0225f59f | |
Nick O'Leary | 2571949e90 | |
Kilian Hertel | 20d2c11154 | |
Nick O'Leary | 3f604e9d93 | |
Nick O'Leary | 234e92db12 | |
Nick O'Leary | 01c56f6515 | |
Nick O'Leary | 026be5a990 | |
Nick O'Leary | aafb86ef09 | |
Nick O'Leary | 1a24efe85d | |
Nick O'Leary | 1ad67d5c73 | |
Nick O'Leary | 0b3f7dbb1f | |
Nick O'Leary | e90007860c | |
Nick O'Leary | 3b38669c04 | |
Steve-Mcl | 74ab03288b | |
Steve-Mcl | 502dacd865 | |
Steve-Mcl | 31bc99cd61 | |
Steve-Mcl | 5435c9ebd2 | |
Steve-Mcl | ceb9a320ba | |
Steve-Mcl | ee8b2a0b58 | |
Steve-Mcl | 8202f1b7c6 | |
Steve-Mcl | 4808cac89d | |
bvmensvoort | c1ea3380eb | |
Stephen McLaughlin | 694fdebc71 | |
Steve-Mcl | 1cbd910e5d | |
Steve-Mcl | b102ef512e | |
Kilian Hertel | 220a621dc6 | |
BitCaesar | 0db288e6dc | |
Stephen McLaughlin | f8175fc325 | |
Stephen McLaughlin | 5eee38e7de | |
Nick O'Leary | fb5b470966 | |
Kilian Hertel | 876053f858 | |
GogoVega | 9714ef19de | |
HiroyasuNishiyama | 613a345771 | |
BitCaesar | 4fe29dd33f | |
Steve-Mcl | 4b24223290 | |
Steve-Mcl | a78da0db1e | |
Dave Conway-Jones | 5e4fce1e12 | |
GogoVega | 4cb2624a5d | |
GogoVega | 58e045f25d | |
Nick O'Leary | 26a770e490 | |
Nick O'Leary | dfe145a0ed | |
Steve-Mcl | 6cb4c9224d | |
Nick O'Leary | 4047612b96 | |
Nick O'Leary | 1978a360af | |
Nick O'Leary | 1f46b3fda9 | |
Nick O'Leary | 47a945d92e | |
Steve-Mcl | 59ec87a393 | |
Kazuhito Yokoi | 9423104dad | |
Nick O'Leary | 614834090e | |
Nick O'Leary | 2f9523a586 | |
Nick O'Leary | 3a9f38a873 | |
Nick O'Leary | 0697c26dd1 | |
Nick O'Leary | cfa25dc655 | |
Nick O'Leary | b3498a888d | |
Steve-Mcl | 0528c12782 | |
Steve-Mcl | e19b60b202 | |
Steve-Mcl | 0ed274f994 | |
Steve-Mcl | e8378b382b | |
Nick O'Leary | e6c12a0c54 | |
Nick O'Leary | 70620ad12d | |
Nick O'Leary | 991f13e704 | |
Nick O'Leary | 14bbe79651 | |
Nick O'Leary | 2388232179 | |
Nick O'Leary | 11ded1e497 | |
Nick O'Leary | 9479b56549 | |
Nick O'Leary | 90e32f52c9 | |
Nick O'Leary | ce6a4845f2 | |
Nick O'Leary | 0f5cf1d51c | |
Kilian Hertel | c2812b05a4 | |
Nick O'Leary | 5d698d66d0 | |
Nick O'Leary | 1a149592d6 | |
Nick O'Leary | 5e2e0b2e39 | |
Nick O'Leary | 7a4f48e4fb | |
Nick O'Leary | 2ae2ec2578 | |
Nick O'Leary | a790136164 | |
Nick O'Leary | e6c454bba5 | |
Nick O'Leary | b904c23e4d | |
Nick O'Leary | ece3eb2e7b | |
Nick O'Leary | 18610bb540 | |
Nick O'Leary | 69d643942c | |
Nick O'Leary | 6e1b298282 | |
Nick O'Leary | c2387777c9 | |
Nick O'Leary | 32a49a1ef1 | |
Nick O'Leary | 4b88775183 | |
Nick O'Leary | 29db82625f | |
Nick O'Leary | 2b6c9e3439 | |
Nick O'Leary | a7e0444e92 | |
Nick O'Leary | e9e32550df | |
Nick O'Leary | 59b059f06f | |
Nick O'Leary | 42166f5fc4 | |
Nick O'Leary | eefe69d136 | |
Nick O'Leary | aabaf7c5e2 | |
Nick O'Leary | 9ea4853c89 | |
Nick O'Leary | 3b5e21761b | |
Nick O'Leary | 2d76bf29cf | |
Nick O'Leary | a684ec235f | |
Nick O'Leary | c21f7abe4e | |
Nick O'Leary | 8c191263c0 | |
Nick O'Leary | 47005043a5 | |
Nick O'Leary | 1e36ba8429 | |
Nick O'Leary | 2679ff277c | |
Nick O'Leary | 0e52271ba9 | |
Nick O'Leary | 57359d1659 | |
Kilian Hertel | 2253417459 | |
wooferguy | 9e3f148273 | |
wooferguy | 7e9042e9f7 | |
Steve-Mcl | dee68b903c | |
Dave Conway-Jones | 67c5a248ad | |
xuyu0v0 | 940512fb2c | |
Kazuhito Yokoi | e8ddee24a9 | |
Kazuhito Yokoi | be4eab65f6 | |
Kazuhito Yokoi | fb5ffa1c31 | |
Kazuhito Yokoi | aff0bd3f6a | |
Kazuhito Yokoi | c0650cc0f5 | |
Stephen McLaughlin | 02c7d014cb | |
Nick O'Leary | e29479fd25 | |
Nick O'Leary | 46ae66c8b2 | |
Nick O'Leary | 20abe4a40c | |
Nick O'Leary | 55a9a29f76 | |
Nick O'Leary | 67dd7e30fa | |
Nick O'Leary | e9a08af73b | |
Nick O'Leary | 08b1ef2766 | |
Nick O'Leary | 667d8673d4 | |
Nick O'Leary | d44ea9d558 | |
Nick O'Leary | 86dfe86813 | |
Nick O'Leary | b129e11c8f | |
Nick O'Leary | 246409970d | |
Nick O'Leary | bd7b3bb4d7 | |
Nick O'Leary | 841f1849c8 | |
Nick O'Leary | 00e7e4d43c | |
Nick O'Leary | ee43a845aa | |
Nick O'Leary | a7cc66af93 | |
Nick O'Leary | f8701cfed0 | |
Nick O'Leary | 6b205bf303 | |
Nick O'Leary | 07729247ac | |
Nick O'Leary | 792b310fad | |
Mario Wolff | ed2c9d24e8 | |
Mario Wolff | f917212d67 | |
Gerwin van Beek | 6fbcec8b98 | |
Kazuhito Yokoi | c30e57c31d | |
Kazuhito Yokoi | 674c9f0405 | |
BitCaesar | e16d5cf83d | |
Mauricio Bonani | df3dc36874 | |
Kazuhito Yokoi | 7b71d8d212 | |
Kazuhito Yokoi | 2eaae4b83f | |
Kazuhito Yokoi | 3c66af9506 | |
Nick O'Leary | e5d579c1bb | |
Kazuhito Yokoi | ee811ca89b | |
Kazuhito Yokoi | 8e4933041d | |
Kazuhito Yokoi | 1f3559e14f | |
Steve-Mcl | 12ac260dce | |
Nick O'Leary | 53f99ecc23 | |
Nick O'Leary | 347410f744 | |
Kevin Godell | 7ae3e32abd | |
Kevin Godell | 54b2215164 | |
Kevin Godell | 889489e33e | |
Nick O'Leary | 4667e76c6b | |
Nick O'Leary | a10d07d1dc | |
Nick O'Leary | 9f1ac733b7 | |
Nick O'Leary | 33ea25922d | |
Nick O'Leary | b56bd7bb5e | |
Tim Janke | e7617de1ee | |
Steve-Mcl | 97fbad4dc5 | |
Steven Roebert | ddf6023983 | |
Steven Roebert | daa84c9415 | |
Stephen McLaughlin | 586006de4d | |
Stephen McLaughlin | af8ec9f02b | |
Nick O'Leary | dc6abb691e | |
Nick O'Leary | d273c38194 | |
Nick O'Leary | 940a246160 | |
Nick O'Leary | 6179d1eef2 | |
Nick O'Leary | 9f121f4c72 | |
Nick O'Leary | 4deca552fa | |
Nick O'Leary | 2d066307f4 | |
Nick O'Leary | 0fdf426a93 | |
Nick O'Leary | e47698bfd4 | |
Nick O'Leary | e91981207f | |
Nick O'Leary | 683ae4f067 | |
Nick O'Leary | 94bc887369 | |
Nick O'Leary | d1094da6c7 | |
Nick O'Leary | ee1e12eca3 | |
Nick O'Leary | 307fbef5b2 | |
Nick O'Leary | f54f500e2b | |
Nick O'Leary | fd66335bd4 | |
Nick O'Leary | 301343deb0 | |
Nick O'Leary | c046c8c4d3 | |
Nick O'Leary | 0ceca8fc17 | |
Nick O'Leary | 2ac3b50040 | |
Nick O'Leary | 70771bf3d6 | |
Nick O'Leary | 2ed17f0fff | |
Nick O'Leary | ca53712ee9 | |
Steve-Mcl | 69e139b75b | |
Steve-Mcl | d268661f29 | |
Steve-Mcl | ed379387df | |
Steve-Mcl | 1eddad82c8 | |
Nick O'Leary | d7defc011b | |
Nick O'Leary | 0e4a7829fe | |
Nick O'Leary | e7c6178391 | |
Nick O'Leary | 40b506b7b4 | |
Nick O'Leary | b19a679d00 | |
Nick O'Leary | 81d4c60cbd | |
Nick O'Leary | a95be2aa43 | |
Nick O'Leary | 5e9a815b06 | |
Nick O'Leary | 010c8eccc8 | |
Nick O'Leary | 4b89619ef1 | |
Nick O'Leary | e5054d306e | |
Nick O'Leary | 08eaa9274f | |
Nick O'Leary | 3306cdede5 | |
Nick O'Leary | e7f650a9eb | |
Nick O'Leary | 2804794f7a | |
Nick O'Leary | 781eaf058b | |
Nick O'Leary | b4c155bdb8 | |
Nick O'Leary | 7c3e045a57 | |
Nick O'Leary | f1fa1bbe4e | |
Nick O'Leary | d4f4c7b8c6 | |
Nick O'Leary | 5eb46c570d | |
Nick O'Leary | 9e6d501009 | |
Nick O'Leary | 27e258b19b | |
GogoVega | d3615c9661 | |
GogoVega | a57c449c25 | |
Nick O'Leary | 07f2f0cef3 | |
Tim Janke | c94f0896e1 | |
Tim Janke | 182361c176 | |
Tim Janke | 8dcc530f44 | |
Tim Janke | b5dfd62c99 | |
Hiroyasu Nishiyama | 662b1a8100 | |
Stephen McLaughlin | 24178beafc | |
Kazuhito Yokoi | e30df544db | |
Hiroyasu Nishiyama | 25b6e214dd | |
Nick O'Leary | 910f6134f6 | |
Nick O'Leary | 52b4b0419f | |
Nick O'Leary | bbc1a82c2a | |
Nick O'Leary | 6abe66934e | |
Nick O'Leary | 2ddbb44992 | |
Nick O'Leary | 363a8b8588 | |
Kazuhito Yokoi | 5ae56aaec7 | |
Kazuhito Yokoi | 37057d1da2 | |
Nick O'Leary | 6044871438 | |
Nick O'Leary | e612bb6a38 | |
Nick O'Leary | 196a9ae43a | |
Nick O'Leary | 81ea67d6da | |
Hiroyasu Nishiyama | 96cd823fea | |
Nick O'Leary | 196773d6ba | |
Nick O'Leary | d8dbe68425 | |
Nick O'Leary | 286c0b000f | |
Nick O'Leary | dec3164fdd | |
Nick O'Leary | c2772e5038 | |
Nick O'Leary | 43e4d09f72 | |
Nick O'Leary | 06e35baeaa | |
Nick O'Leary | c9d72d7a1d | |
Nick O'Leary | 7e0a783220 | |
Nick O'Leary | f853c9f1c3 | |
Nick O'Leary | 62e9572070 | |
Nick O'Leary | fea68c8acc | |
cliyr | ce9462e6aa | |
Hiroyasu Nishiyama | 929f0e90ac | |
Hiroyasu Nishiyama | 2e57d80959 | |
Kazuhito Yokoi | 81331e68d2 | |
Kazuhito Yokoi | 4fda59a585 | |
Kazuhito Yokoi | 4477b9ac18 | |
Kazuhito Yokoi | 78f93dc11a | |
sonntam | 4c7c855f2c | |
Marcus Sonntag | 8740ec5570 | |
Kazuhito Yokoi | ede3ac4282 | |
Kazuhito Yokoi | 3e4cad3a79 | |
Kazuhito Yokoi | bd0b0077a3 | |
Kazuhito Yokoi | 16f8b78b39 | |
bggbr | 892d21fb77 | |
Nick O'Leary | 90d1bb0ae4 | |
Nick O'Leary | adfc5b3e98 | |
Hiroyasu Nishiyama | f3d7016ab2 | |
Nick O'Leary | ae776547ce | |
Kazuhito Yokoi | da6885be62 | |
Nick O'Leary | c0fa4a077f | |
Nick O'Leary | df19e54555 | |
Nick O'Leary | 19139a4dce | |
Kazuhito Yokoi | 7d1c3133b3 | |
Kazuhito Yokoi | da9c0af854 | |
Nick O'Leary | 6d717a21cf | |
Nick O'Leary | fc251d005e | |
Nick O'Leary | 4624e28675 | |
Nick O'Leary | 3a1cc38aaf | |
Nick O'Leary | 68bb38b8d7 | |
Nick O'Leary | 2ca3b3e99d | |
Nick O'Leary | 67c8354f76 | |
Nick O'Leary | 384377782a | |
Nick O'Leary | 8382665bbb | |
Nick O'Leary | e799cfc16a | |
Nick O'Leary | 055d0081e1 | |
Nick O'Leary | 9035de32c8 | |
Nick O'Leary | af62a520d3 | |
Nick O'Leary | 1824108d09 | |
Nick O'Leary | 149e8ce9b0 | |
Nick O'Leary | f4661eec75 | |
Mauricio Bonani | 0f7a1a42e4 | |
Kazuhito Yokoi | 5bda221f9d | |
weibin | fd42becbdc | |
Nick O'Leary | 2759c1616c | |
Nick O'Leary | 55ac98c989 | |
Nick O'Leary | c42c6a7b08 | |
Nick O'Leary | b99bd38649 | |
Hiroyasu Nishiyama | 013ee2f1f4 | |
Hiroyasu Nishiyama | 7b79d79f84 | |
Hiroyasu Nishiyama | 66f9686e48 | |
Hiroyasu Nishiyama | 9b1b7437b3 | |
Hiroyasu Nishiyama | 720d44d53e | |
Nick O'Leary | 7dca148349 | |
Dave Conway-Jones | 47bacaf58a | |
Kazuhito Yokoi | ffff8aeb91 | |
Dave Conway-Jones | 9a856f50d7 | |
Hiroyasu Nishiyama | e7540de85d | |
Hiroyasu Nishiyama | ba9ddefbee | |
Hiroyasu Nishiyama | f1801f9662 | |
Nick O'Leary | ae92ea9476 | |
Nick O'Leary | c7017ee84b | |
Nick O'Leary | 0346294c59 | |
Nick O'Leary | 8d240ca797 | |
Nick O'Leary | a607ee90e0 | |
Nick O'Leary | 7dbbafec1b | |
Nick O'Leary | 428132ea3b | |
Nick O'Leary | c49330f9d1 | |
Nick O'Leary | 937c5fe893 | |
Dave Conway-Jones | d2c9f12c3a | |
Robin Schneider | 10324d8260 | |
Kazuhito Yokoi | 8f27dae7ea | |
Dave Conway-Jones | 94ae511a6d | |
Hiroyasu Nishiyama | 038f75e48f | |
Hiroyasu Nishiyama | b9fe4c5cd3 | |
Hiroyasu Nishiyama | 7e8b7602b4 | |
Dirk-Jan Faber | 7c306a8430 | |
Nick O'Leary | dd2bc44c2d | |
Nick O'Leary | 74794fea09 | |
Nick O'Leary | 1efd1a52a7 | |
Nick O'Leary | 928131cf08 | |
Nick O'Leary | 4d202a7a37 | |
Nick O'Leary | e0d71abdc6 | |
Nick O'Leary | 550eb6ee2f | |
Kazuhito Yokoi | a661bc1d23 | |
Mauricio Bonani | f737162697 | |
Nick O'Leary | ce57ba80eb | |
Hiroyasu Nishiyama | 99bd957ea0 | |
Nick O'Leary | 270eb56718 | |
Nick O'Leary | b3ce0c0079 | |
Nick O'Leary | e6cee58e0d | |
Nick O'Leary | 4adc6b269c | |
Nick O'Leary | 920b0178ec | |
Nick O'Leary | 3583b40e02 | |
Nick O'Leary | 7870830367 | |
Ben Hardill | 4c1d7ad2d2 | |
Ben Hardill | 661b07c856 | |
Ben Hardill | 5670bd8265 | |
Dave Conway-Jones | 93a1911232 | |
Dave Conway-Jones | 2429191838 | |
Dave Conway-Jones | f6901cd19f | |
Kazuhito Yokoi | 156c3984a7 | |
Kazuhito Yokoi | f91af2153a | |
GogoVega | c3f13eb428 | |
GogoVega | 91ae0206ac | |
GogoVega | 19b5eda98c | |
Kazuhito Yokoi | 805f8a5ee7 | |
GogoVega | 6cbfe3d736 | |
GogoVega | 2274319274 | |
Hiroyasu Nishiyama | 2ab8121a4a | |
Hiroyasu Nishiyama | 601a4ec70d | |
Hiroyasu Nishiyama | 707b831c30 | |
Hiroyasu Nishiyama | 72ae375e44 | |
Hiroyasu Nishiyama | 3c1ddb5c9d | |
Hiroyasu Nishiyama | 817db23146 | |
Hiroyasu Nishiyama | a8c820f558 | |
Hiroyasu Nishiyama | 6d09c81f11 | |
Hiroyasu Nishiyama | 192e537e5d | |
Steve-Mcl | 7b52ef34be | |
Kazuhito Yokoi | 7117472e73 | |
Kazuhito Yokoi | c24b123917 | |
Hiroyasu Nishiyama | 9eb8cf121c | |
Hiroyasu Nishiyama | 41ef9ae010 | |
Hiroyasu Nishiyama | 1674bbbde9 | |
Hiroyasu Nishiyama | 0fb739f7cd | |
Hiroyasu Nishiyama | 169fa940e4 | |
Hiroyasu Nishiyama | c9664cc425 | |
Hiroyasu Nishiyama | e61cdff655 | |
Hiroyasu Nishiyama | a479b8a5d7 | |
Kazuhito Yokoi | 26462e684b | |
Nick O'Leary | 113d42ef35 | |
Nick O'Leary | c18018f017 | |
Nick O'Leary | e804addf0a | |
Nick O'Leary | 04cea003b9 | |
Nick O'Leary | 65fcc56a56 | |
Nick O'Leary | c065d253e9 | |
Nick O'Leary | 4bb2b91ee6 | |
Nick O'Leary | b3f761776d | |
Nick O'Leary | dce1cccbde | |
Nick O'Leary | 3630056ed8 | |
Nick O'Leary | 2d6e1d7089 | |
Nick O'Leary | 71db79ba53 | |
GogoVega | a6934b3cba | |
GogoVega | 5be378e266 | |
GogoVega | a9b6eaa31f | |
GogoVega | 01f9ce0015 | |
GogoVega | f4309f5af6 | |
GogoVega | 1004ce564f | |
GogoVega | 5a1823d13e | |
GogoVega | 66fb66edbc | |
Steve-Mcl | 5bb66ed7d4 | |
Dave Conway-Jones | 95a7980ada | |
Dave Conway-Jones | 281e9d1357 | |
Nick O'Leary | 14e74afb07 | |
Nick O'Leary | 742f05f59d | |
Nick O'Leary | 79db4f8aa1 | |
Nick O'Leary | c4e216f839 | |
Nick O'Leary | 752fdfedf2 | |
Nick O'Leary | 2a49e7c8ef | |
Nick O'Leary | 02af01d2ca | |
Nick O'Leary | 07c05c1f2a | |
Nick O'Leary | ee4af4c7bf | |
Nick O'Leary | 3d565e74a5 | |
Nick O'Leary | 3cb84222f8 | |
Nick O'Leary | 1b013bb73b | |
Nick O'Leary | fd54e625d5 | |
GogoVega | e440694987 | |
GogoVega | b4a12edc61 | |
GogoVega | 2b04d6834f | |
GogoVega | 1191574e07 | |
Adam Lau | 77f6412d3b | |
Gauthier Dandele | 327eab6c0d | |
GogoVega | 0d8a0db883 | |
GogoVega | 9727062d60 | |
GogoVega | 09979d3270 | |
GogoVega | 116839d6f6 | |
lkaiy | bed6c48e99 | |
lkaiy | 4d09e90b90 | |
lkaiy | 1d91cc6fc1 | |
Stephen J. Carnam | c81cd5450f | |
Steveorevo | 0b663abe50 | |
Nick O'Leary | 3b27fb2aa7 | |
Nick O'Leary | 6bd67ae68c | |
Nick O'Leary | 14c362d4ba | |
Nick O'Leary | f28bc1bff7 | |
Nick O'Leary | de8a5ea262 | |
Nick O'Leary | 339013434b | |
Nick O'Leary | 8a3ad331d2 | |
Hiroyasu Nishiyama | e3892dc26d | |
Hiroyasu Nishiyama | b95df6d883 | |
Hiroyasu Nishiyama | 11ad03b21e | |
Hiroyasu Nishiyama | 9cb474ea9c | |
Hiroyasu Nishiyama | fce43b4e1d | |
Hiroyasu Nishiyama | 1d547500e8 | |
Hiroyasu Nishiyama | f23d0480e4 | |
Nick O'Leary | fe9c630572 | |
Nick O'Leary | ce94226c3c | |
Nick O'Leary | f12d36b5ed | |
Nick O'Leary | 3cb5259494 | |
Nick O'Leary | a351cd9d9f | |
Nick O'Leary | d8e01584f3 | |
Kazuhito Yokoi | dd76840568 | |
Dave Conway-Jones | 94690fad7a | |
Dave Conway-Jones | d693af9615 | |
Dave Conway-Jones | 4cc18c25fe | |
Kazuhito Yokoi | 8b398f49c0 | |
Nick O'Leary | 902ce68164 | |
Nick O'Leary | cd0474ce7b | |
Nick O'Leary | 946def022f | |
Nick O'Leary | fb499be979 | |
Nick O'Leary | c62a101635 | |
Nick O'Leary | 69a575097d | |
Nick O'Leary | b40551a8fa | |
Dave Conway-Jones | 5b27bcd781 | |
Kazuhito Yokoi | 75725a38df | |
Kazuhito Yokoi | c4e277853c | |
Nick O'Leary | 24b055b1b8 | |
Nick O'Leary | 7da3773f7f | |
Nick O'Leary | 32999ffa84 | |
Nick O'Leary | f06c53f1f1 | |
Nick O'Leary | a9eec28360 | |
Nick O'Leary | 5cda972872 | |
Nick O'Leary | 087946876b | |
Nick O'Leary | 318f0f1b7e | |
Nick O'Leary | f4d7b71984 | |
Stephen McLaughlin | 6d1a12af4b | |
Nick O'Leary | a40e5dbcd4 | |
Nick O'Leary | 7c79ca7878 | |
Nick O'Leary | 93c1600980 | |
Nick O'Leary | c3d1e6181f | |
Ashish Kurmi | 87e7f3a61c | |
Dave Conway-Jones | e724f216bf | |
Steve-Mcl | e6b379358a | |
Steve-Mcl | b0abba15a6 | |
Steve-Mcl | 81b4874a7c | |
Steve-Mcl | f11b9c1e18 | |
Steve-Mcl | e15ecc00ce | |
Dave Conway-Jones | 3e4c45ac6a | |
Dave Conway-Jones | fc657ecc71 | |
hae-iotplatform | 87cb61750f | |
hae-iotplatform | 3231247fb6 | |
Ben Hardill | 4115c13a65 | |
Kazuhito Yokoi | f872e2ab80 | |
Kazuhito Yokoi | a81b1aa0cb | |
Kazuhito Yokoi | efc0f1ab91 | |
Kazuhito Yokoi | ce31edc803 | |
Kazuhito Yokoi | 199caccbc3 | |
Nick O'Leary | 313bab37e2 | |
Nick O'Leary | f060309002 | |
Nick O'Leary | fc3d86e6ff | |
Nick O'Leary | 9fd4989142 | |
Kazuhito Yokoi | 7507a7b459 | |
Kazuhito Yokoi | d657817211 | |
Hiroyasu Nishiyama | 954649007c | |
Nick O'Leary | 0caa308757 | |
Nick O'Leary | b0d9903fe2 | |
Nick O'Leary | 6375f3c445 | |
Nick O'Leary | 2328f418be | |
Nick O'Leary | 22b6564847 | |
Nick O'Leary | 25c8bfefe2 | |
Nick O'Leary | 30f4524821 | |
Nick O'Leary | 9e4c3a7200 | |
Nick O'Leary | 5b7e84c1b0 | |
Nick O'Leary | e6097e4968 | |
Kazuhito Yokoi | 0f2829097b | |
Kazuhito Yokoi | e2a9f940e2 | |
Hiroyasu Nishiyama | 3eb2b2ac5d | |
Hiroyasu Nishiyama | ce7b0a3b5e | |
Hiroyasu Nishiyama | 7bd7c99dd4 | |
Hiroyasu Nishiyama | b0d12c4125 | |
Nick O'Leary | 1fa8f30550 | |
Kazuhito Yokoi | 745607b5bc | |
Kazuhito Yokoi | cc5a770b16 | |
Steve-Mcl | fbde0091de | |
Steve-Mcl | a533943a40 | |
Stephen McLaughlin | e11f17672c | |
Stephen McLaughlin | c038c99f9d | |
Stephen McLaughlin | 5f159c1fbd | |
Steve-Mcl | 6a19d8246c | |
Steve-Mcl | d6bb3a558f | |
Kazuhito Yokoi | cd8ca8981b | |
Nick O'Leary | 44300dbb34 | |
Nick O'Leary | a5d7f7acce | |
Nick O'Leary | a032c2e326 | |
Nick O'Leary | 9d770ed436 | |
Nick O'Leary | ae753940f3 | |
Bruno Feurer | eb53054f49 | |
Kazuhito Yokoi | d0d22c333c | |
NetHans | e147602a3a | |
Kazuhito Yokoi | 266ba17ebb | |
Kazuhito Yokoi | 0d0d5bafb0 | |
NetHans | b7a016edcf | |
NetHans | 371253a4f6 | |
NetHans | 08ce6cce97 | |
NetHans | d7a10328c0 | |
Ben Hardill | 58b951e134 | |
Ben Hardill | 30956b5441 | |
Steve-Mcl | 9540cfe749 | |
Steve-Mcl | 31b17faa2a | |
Steve-Mcl | 5c6b8e9e50 | |
Steve-Mcl | 5a36e8fb11 | |
Steve-Mcl | 7d4c857a43 | |
Steve-Mcl | 598bcf675f | |
Fabio Barcello S. Dos R. Muller | e7c657f82d | |
Fabio Barcello S. Dos R. Muller | 3bae92b356 | |
Nick O'Leary | 5365786386 | |
Nick O'Leary | c9b0a7c2dd | |
Nick O'Leary | 371d8042d6 | |
Nick O'Leary | be343cb21e | |
Nick O'Leary | e9eabd6881 | |
Nick O'Leary | abccdc7f21 | |
Nick O'Leary | 4ae914f729 | |
Nick O'Leary | 86ac955b79 | |
Nick O'Leary | 9734691cac | |
Nick O'Leary | d94f3a477d | |
Nick O'Leary | d53cd209f7 | |
Nick O'Leary | 65cacb39d2 | |
Stephen McLaughlin | b008a6a2aa | |
Nick O'Leary | 5c29feec63 | |
Nick O'Leary | d8e350d603 | |
Nick O'Leary | 14a3366850 | |
Mauricio Bonani | 5ea0c6fca1 | |
Mauricio Bonani | f454c29b8c | |
Hiroyasu Nishiyama | 1ddbeaa50f | |
Fabulous Muller | b937c37be3 | |
Fabulous Muller | 0908369dba | |
Dennis Neufeld | fe5132be1d | |
Dennis Neufeld | b50ba3e0e4 | |
Kazuhito Yokoi | 4fb40f9077 | |
Nick O'Leary | dc7fef6395 | |
Nick O'Leary | da65bf7292 | |
Nick O'Leary | 17d9c2577e | |
Steve-Mcl | bc7852c1cc | |
Nick O'Leary | 51d8792f62 | |
Nick O'Leary | bfdbeb0964 | |
Nick O'Leary | ede82ad0d5 | |
Nick O'Leary | f50dcb9e40 | |
Nick O'Leary | 676c5e5df5 | |
Nick O'Leary | d52be76c8a | |
Nick O'Leary | c6a517c88c | |
Nick O'Leary | 96eb8719b8 | |
Steve-Mcl | bcd31610f6 | |
Steve-Mcl | a4d66622a5 | |
Steve-Mcl | af4f07cb26 | |
Steve-Mcl | f7120b32f5 | |
Steve-Mcl | 273404e24d | |
Steve-Mcl | 1b53b5b927 | |
Steve-Mcl | 7c5413e568 | |
Nick O'Leary | 39b2fe45a5 | |
Nick O'Leary | 8d3c5d09f6 | |
Nick O'Leary | 5944fdb5dc | |
Nick O'Leary | e120bad779 | |
Nick O'Leary | d546a4a15b | |
Hiroyasu Nishiyama | 93a88a83a8 | |
Ben Hardill | 660a2e0ed6 | |
Nick O'Leary | 30ea300f65 | |
Nick O'Leary | 04f4d5274d | |
Nick O'Leary | 1f9695abd7 | |
Nick O'Leary | 1b94cc3ac0 | |
Nick O'Leary | 4698d5d2fc | |
Nick O'Leary | 92bc9d81c5 | |
Nick O'Leary | 952cfaec14 | |
Nick O'Leary | 637c44aa59 | |
Steve-Mcl | 6e5fc29dca | |
Steve-Mcl | 8bd02d0c36 | |
Steve-Mcl | c6cfbb8755 | |
Steve-Mcl | 75d3444391 | |
Steve-Mcl | c648e1e8d6 | |
Steve-Mcl | e2f42fddb5 | |
Nick O'Leary | f93fe684c0 | |
Nick O'Leary | ee378ea0c4 | |
Nick O'Leary | 613d34e6e6 | |
Nick O'Leary | 4c784af55d | |
Nick O'Leary | b28595c814 | |
Nick O'Leary | fca7beec01 | |
Stephen McLaughlin | f813f03a46 | |
Nick O'Leary | 6ff2232df3 | |
Nick O'Leary | e3b1f058cd | |
Nick O'Leary | 542e9cacc2 | |
Nick O'Leary | 0a0a7ca39b | |
Kazuhito Yokoi | cee287da99 | |
Stephen McLaughlin | c8e4df94f9 | |
Kazuhito Yokoi | c86e4f52a0 | |
Steve-Mcl | 44216310ca | |
Steve-Mcl | 5c69599e78 | |
Steve-Mcl | e4098d3991 | |
Steve-Mcl | 55a94d659b | |
Franck Mourre | 7a048d5b32 | |
Nick O'Leary | e14dd06a94 | |
Nick O'Leary | 62332a2b56 | |
Steve-Mcl | 639030924f | |
Nick O'Leary | 241b47fe19 | |
Nick O'Leary | 69beecf334 | |
Nick O'Leary | e308e02f9d | |
Nick O'Leary | 87258e485a | |
Nick O'Leary | 0682c346ea | |
Hiroyasu Nishiyama | 5ae566952b | |
Hiroyasu Nishiyama | 18f9ab0cda | |
Hiroyasu Nishiyama | bd4a5ac844 | |
Hiroyasu Nishiyama | 257b1f89f3 | |
Steve-Mcl | 962672564e | |
Steve-Mcl | 7216c6d62a | |
Steve-Mcl | 21d3261eec | |
Steve-Mcl | 03f758720c | |
Steve-Mcl | eaa85ae8d5 | |
Stephen McLaughlin | 8cb212d897 | |
Stephen McLaughlin | a38d3981df | |
Stephen McLaughlin | af08c077d2 | |
Stephen McLaughlin | 84e2489585 | |
Mauricio Bonani | 744375bd5d | |
Hiroyasu Nishiyama | 6c1f63bfbb | |
Mauricio Bonani | 7d0267c924 | |
Mauricio Bonani | daa9cb65e5 | |
Nick O'Leary | 7072265225 | |
Nick O'Leary | 8daade0021 | |
Nick O'Leary | b4d30b462f | |
Nick O'Leary | 18acd67b4f | |
Nick O'Leary | 78ed53f4fb | |
Nick O'Leary | d95314c754 | |
Hiroyasu Nishiyama | 277cc19ec3 | |
Hiroyasu Nishiyama | 67f4553213 | |
Nick O'Leary | b2bb656d30 | |
Nick O'Leary | ca20f41d0e | |
Nick O'Leary | 13e8aeae4e | |
Hiroyasu Nishiyama | 02308f9e2f | |
ralphwetzel | 0fdcbb4611 | |
Nick O'Leary | 829ccc3466 | |
Nick O'Leary | 9ac83cf62e | |
Nick O'Leary | f760354e82 | |
Nick O'Leary | e91e35d508 | |
Nick O'Leary | db7e196bf8 | |
Nick O'Leary | f5fe4f99f1 | |
Nick O'Leary | e2bff36395 | |
Nick O'Leary | 0a5d7c2100 | |
ralphwetzel | 4d42f8ec58 | |
ralphwetzel | 81e7b052da | |
ralphwetzel | be44b7e2c7 | |
ralphwetzel | d8a781632c | |
ralphwetzel | 3726d6fe3b | |
ralphwetzel | 6090a5b274 | |
Kazuhito Yokoi | d4fdf6be67 | |
Steve-Mcl | 1b6cbe5c23 | |
Nick O'Leary | 1d130a7857 | |
Nick O'Leary | f041159aa7 | |
Nick O'Leary | f438cbf633 | |
Nick O'Leary | 51684d18cf | |
Nick O'Leary | c13d2ac044 | |
Nick O'Leary | 6dd1adda2e | |
Nick O'Leary | 5d0d7391e7 | |
Nick O'Leary | d37da58e87 | |
Nick O'Leary | 1839c1972e | |
Stephen McLaughlin | b7bdcc4e57 | |
Nick O'Leary | b59a3b15f3 | |
Nick O'Leary | 7580f7491a | |
Nick O'Leary | f33848e16b | |
Mauricio Bonani | 9b4d3ad6bf | |
Mauricio Bonani | 7b06d4273a | |
Nick O'Leary | 95f7ea9fc0 | |
Nick O'Leary | 12b64d1906 | |
Nick O'Leary | 52db4b3321 | |
Nick O'Leary | 388c1b4ce4 | |
Nick O'Leary | b134cdb90d | |
Steve-Mcl | c120dffbf0 | |
Hiroyasu Nishiyama | 3578f1b254 | |
Nick O'Leary | a7e3548f22 | |
Nick O'Leary | 272e5380c2 | |
Dave Conway-Jones | b60fd36c6e | |
Dennis Neufeld | 5301798654 | |
Hiroyasu Nishiyama | f7e6d7d143 | |
Mauricio Bonani | b9649aed32 | |
Nick O'Leary | 4467c0df31 | |
Nick O'Leary | 7af3acde9e | |
Stephen McLaughlin | 68c1e49f62 | |
Steve-Mcl | 1e57190b8c | |
Steve-Mcl | 1b8a4577d5 | |
Steve-Mcl | 51baed4932 | |
Steve-Mcl | 2f1f587c50 | |
Kazuhito Yokoi | ab1e38dde8 | |
Nick O'Leary | dd0d1e700e | |
Nick O'Leary | 51ebb2579f | |
Nick O'Leary | d1d3b805f6 | |
Nick O'Leary | a6e247326b | |
Nick O'Leary | 823b7e2989 | |
Nick O'Leary | 5f40dc37a2 | |
Nick O'Leary | 5e5c05f0c6 | |
Nick O'Leary | ab1340d213 | |
Steve-Mcl | 6b6004ee70 | |
Steve-Mcl | 3cef2bb7e0 | |
Stephen McLaughlin | cc5a0a436c | |
Dave Conway-Jones | 495a81768d | |
Steve-Mcl | 125b37e98f | |
Steve-Mcl | f8ad75329d | |
Dave Conway-Jones | cb2efb14f7 | |
Steve-Mcl | 78327716a4 | |
庄建国 | cd71b3daf3 | |
Mauricio Bonani | 5393fa81b9 | |
Dennis Neufeld | d1efd2137a | |
Dennis Neufeld | fce8c3a8a0 | |
Hiroyasu Nishiyama | 4bd71da056 | |
Nick O'Leary | d2e84925f7 | |
ralphwetzel | d81523370e | |
ralphwetzel | 6939546f22 | |
Mauricio Bonani | 2ea10206fa | |
Mauricio Bonani | 8aa922c55f | |
Mauricio Bonani | d66def5530 | |
Hiroyasu Nishiyama | 42ecf54df6 | |
Hiroyasu Nishiyama | 10835968fb | |
Nick O'Leary | 1f5588b803 | |
Nick O'Leary | 202102ebf7 | |
Steve-Mcl | 9729c89f5d | |
Nick O'Leary | 71714733ad | |
Dennis Neufeld | 3fbbfce17c | |
Kazuhito Yokoi | ad0a08ea0e | |
Mauricio Bonani | 3a2fa4073a | |
Dennis Neufeld | 6c2297c365 | |
Kazuhito Yokoi | 5e592427e9 | |
Kazuhito Yokoi | 643541eebd | |
Kazuhito Yokoi | 13885493ac | |
Kazuhito Yokoi | 75c9353cbd | |
cow0w | 01d9affe61 | |
Kazuhito Yokoi | 3ad95bec3c | |
Kazuhito Yokoi | 418b3ee7d6 | |
Kazuhito Yokoi | 0000f2a34d | |
Nick O'Leary | fc5a5f1b73 | |
Nick O'Leary | 226ab406b2 | |
Nick O'Leary | 9eaf5d82b6 | |
Nick O'Leary | e3d6d242ac | |
Nick O'Leary | 53184715bc | |
Nick O'Leary | 1844633ff1 | |
Nick O'Leary | 7d7682b34e | |
Nick O'Leary | 83655a749c | |
Nick O'Leary | b9444e8197 | |
Nick O'Leary | 5ff70b2a36 | |
Nick O'Leary | 4ed559af95 | |
Nick O'Leary | ce529a9b9f | |
Nick O'Leary | 31e472145c | |
Nick O'Leary | 1664428429 | |
Nick O'Leary | 1780cb9b91 | |
Nick O'Leary | ad32677263 | |
Nick O'Leary | 0eba4bdd61 | |
Nick O'Leary | 28238eb5a7 | |
Nick O'Leary | cce4f6f7f7 | |
Nick O'Leary | 6bea3dabbb | |
Nick O'Leary | ea46947054 | |
Nick O'Leary | 22879f8c23 | |
Nick O'Leary | 77c4423059 | |
Steve-Mcl | 62a2a4a9f5 | |
Nick O'Leary | 59690328e2 | |
Nick O'Leary | e50ecd613f | |
Nick O'Leary | d873a6138a | |
Nick O'Leary | 8093ae8570 | |
Steve-Mcl | 98ebb02763 | |
Steve-Mcl | ba22b07dce | |
Hiroyasu Nishiyama | d1312703c5 | |
Kazuhito Yokoi | 8d99a42307 | |
Hiroyasu Nishiyama | 3ab93ecdd4 | |
Dave Conway-Jones | 6c0d6c5425 | |
Dominik Schmidt | 326f346936 | |
Stephen McLaughlin | 8762d0e164 | |
Hiroyasu Nishiyama | 2b91edeb74 | |
Nick O'Leary | 6c49d1aa3f | |
Nick O'Leary | f07f086d62 | |
Nick O'Leary | c28862f8c7 | |
Nick O'Leary | 9cfaf567be | |
Nick O'Leary | 53f453bf34 | |
Nick O'Leary | a16032a8ed | |
Nick O'Leary | 8cec0d8fcd | |
Hiroyasu Nishiyama | 6f6f67829b | |
Hiroyasu Nishiyama | 94471b6d07 | |
Hiroyasu Nishiyama | 7eed9c0584 | |
Kazuhito Yokoi | 3e717862a4 | |
Hiroyasu Nishiyama | 30d88bbe7e | |
Nick O'Leary | 551e73adef | |
Hiroyasu Nishiyama | 99d32c4758 | |
Nick O'Leary | 9e52c15829 | |
Nick O'Leary | 71a272f0a6 | |
Mauricio Bonani | 64061c3440 | |
Steve-Mcl | 1b4f2b9c53 | |
Stephen McLaughlin | d83516584d | |
Nick O'Leary | 3e34d0badb | |
Nick O'Leary | b2e8474df3 | |
Nick O'Leary | 73ff7e2de4 | |
Nick O'Leary | b5d8d34718 | |
Nick O'Leary | ac44d22cee | |
Nick O'Leary | 6e8fa12172 | |
Nick O'Leary | deb9c4ecc0 | |
Steve-Mcl | d4e6136b09 | |
Steve-Mcl | 68331fc40c | |
Hiroyasu Nishiyama | 3046798ec5 | |
Hiroyasu Nishiyama | c4332658ba | |
Hiroyasu Nishiyama | 50e3da0849 | |
Stephen McLaughlin | 62cd3b2061 | |
Hiroyasu Nishiyama | 7e6dfa7b92 | |
Hiroyasu Nishiyama | 7fbebbf361 | |
Kazuhito Yokoi | 121372802f | |
Nick O'Leary | 7924907384 | |
Stephen McLaughlin | 51d429f9ae | |
Stephen McLaughlin | 267aebb9cb | |
Mauricio Bonani | 3f9ebb588e | |
Kazuhito Yokoi | f424f07e54 | |
Kazuhito Yokoi | e5a21a3261 | |
Stephen McLaughlin | 6f0de7c80e | |
Stephen McLaughlin | 3ace7eeafd | |
Stephen McLaughlin | eb9f15e4e4 | |
Hiroyasu Nishiyama | bc80569fe9 | |
Hiroyasu Nishiyama | a147458120 | |
Kazuhito Yokoi | 6182e22d18 | |
Kazuhito Yokoi | dda84c5cd5 | |
Kazuhito Yokoi | 6c15fb6978 | |
Kazuhito Yokoi | b17b68c44b | |
Mauricio Bonani | afdb15dc58 | |
Nick O'Leary | 98b4b0dce0 | |
Nick O'Leary | 70f26e0bea | |
Nick O'Leary | b6ad396a6c | |
Nick O'Leary | e44bb57b0e | |
Stephen McLaughlin | 5c10b16b65 | |
Steve-Mcl | 7ec1d42808 | |
Stephen McLaughlin | 03e9e89558 | |
Nick O'Leary | 3057035dec | |
Nick O'Leary | 4af72cc7ba | |
Nick O'Leary | f6aee81651 | |
Nick O'Leary | a22f569ca0 | |
Nick O'Leary | 8043f5d865 | |
Stephen McLaughlin | 2ef50ab71f | |
Stephen McLaughlin | 192a4f5e7f | |
Stephen McLaughlin | 1af56a7f00 | |
Nick O'Leary | d2fab7fddd | |
Nick O'Leary | 1818b0281d | |
Stephen McLaughlin | 09973ba8cf | |
Stephen McLaughlin | dd3174c40f | |
Stephen McLaughlin | f0293b8f52 | |
Nick O'Leary | d549a9ad92 | |
Stephen McLaughlin | 0385c72a8f | |
Stephen McLaughlin | e223b20cbd | |
Phil Day | a0f7e92e40 | |
Phil Day | c87ff3ca26 | |
Phil Day | 82672a825d | |
Phil Day | 98d524e82d | |
Phil Day | 3d3090a8f2 | |
Steve-Mcl | 5561e89201 | |
Stephen McLaughlin | 9ed96de237 | |
Steve-Mcl | 0f2420576a | |
Steve-Mcl | d1b74675d9 | |
Hiroyasu Nishiyama | abb81a0bac | |
Hiroyasu Nishiyama | 05eb055b8c | |
Hiroyasu Nishiyama | e8ddd6d16d | |
Stephen McLaughlin | 8706998c8c | |
Hiroyasu Nishiyama | 06e0869767 | |
Nick O'Leary | 7841fc6d3e | |
Nick O'Leary | 1f7311deeb | |
Hiroyasu Nishiyama | 07a9e69e7b | |
Phil Day | 9bc8adc715 | |
Phil Day | 7845ebffc5 | |
Nick O'Leary | b985de6df2 | |
Steve-Mcl | 11f6491889 | |
Phil Day | b2ec040a8d | |
Stephen McLaughlin | 424a53da4e | |
Stephen McLaughlin | 963c289af7 | |
Kazuhito Yokoi | c5af71e0a2 | |
Nick O'Leary | 329008bf6d | |
Steve-Mcl | 531dbc5f83 | |
Stephen McLaughlin | 851a925956 | |
Stephen McLaughlin | 5d4e01eea6 | |
Stephen McLaughlin | 7484dc5b4c | |
Stephen McLaughlin | e04f5cb277 | |
Hiroyasu Nishiyama | c513cff843 | |
ralphwetzel | a4603a4396 | |
Kazuhito Yokoi | bc5eafce66 | |
Kazuhito Yokoi | 5fb811eb4c | |
Kazuhito Yokoi | 84a3884ffc | |
Kazuhito Yokoi | 50ae29a08c | |
Steve-Mcl | bf8bfa582a | |
Steve-Mcl | 492d1ef30e | |
Steve-Mcl | bd19c203e1 | |
Steve-Mcl | 1141f9de86 | |
Mauricio Bonani | 7955a17a17 | |
Kazuhito Yokoi | 58085e39d1 | |
ralphwetzel | bbc32c4cd0 | |
Nick O'Leary | 3841039728 | |
Nick O'Leary | f04d954882 | |
Nick O'Leary | 39602ff5f2 | |
Nick O'Leary | 55ecc7a92c | |
Nick O'Leary | 1148960d43 | |
Nick O'Leary | 415107fbf0 | |
Nick O'Leary | 437cc20198 | |
Nick O'Leary | 32f78a99fd | |
Nick O'Leary | 65c7855afd | |
Stephen McLaughlin | 7f68e341da | |
Nick O'Leary | a2f750ed1a | |
Nick O'Leary | b74a42cdf5 | |
Nick O'Leary | 95b35be541 | |
Nick O'Leary | ea747a3d58 | |
Stephen McLaughlin | 9b644e3c47 | |
Steve-Mcl | 3f776397d1 | |
Steve-Mcl | 1ec75035ba | |
Steve-Mcl | 97b7b7b968 | |
Steve-Mcl | 135427dcc8 | |
Nick O'Leary | a2de514c05 | |
Nick O'Leary | f1bada7fd8 | |
Nick O'Leary | ea5d25c794 | |
Nick O'Leary | 193e420eb3 | |
Steve-Mcl | 8a972ee543 | |
Mauricio Bonani | b51eb7326f | |
Steve-Mcl | be3b5b7fe2 | |
Stephen McLaughlin | 3a7a606f6a | |
Stephen McLaughlin | 294fc6b62f | |
Stephen McLaughlin | 662a44fccf | |
Nick O'Leary | b0a5d4fb6f | |
Stephen McLaughlin | 4fb8292618 | |
Nick O'Leary | 539e5899e3 | |
Nick O'Leary | bee9e20827 | |
Nick O'Leary | 12f527a120 | |
Nick O'Leary | bd626899df | |
Nick O'Leary | 54d036715f | |
Nick O'Leary | 54c87f81a6 | |
Nick O'Leary | 5de078dc61 | |
Nick O'Leary | ff57de0753 | |
Nick O'Leary | 9565aee3c5 | |
Steve-Mcl | f63da0c58b | |
Mauricio Bonani | 205dbc1a25 | |
Stephen McLaughlin | 12c309fd50 | |
Stephen McLaughlin | f04e3d5338 | |
Nick O'Leary | dc03d0b300 | |
Steve-Mcl | 3e16cc4912 | |
Steve-Mcl | fcdf252f03 | |
Steve-Mcl | b23fea9cb5 | |
Stephen McLaughlin | e714ff35c4 | |
Steve-Mcl | 4054d0eca7 | |
Steve-Mcl | 367f9b6232 | |
Steve-Mcl | 194eb4e266 | |
Stephen McLaughlin | f717eb7388 | |
Nick O'Leary | e8f20285af | |
Nick O'Leary | 0fec9c7c55 | |
Nick O'Leary | f8d0ed7ca6 | |
Stephen McLaughlin | 020eaef5ba | |
Nick O'Leary | 973b31521e | |
Stephen McLaughlin | 59e513f130 | |
Nick O'Leary | 62e730b621 | |
Nick O'Leary | f4bb62adbc | |
Nick O'Leary | 48a528a4b8 | |
Nick O'Leary | 5aba66ea78 | |
Nick O'Leary | c5efdf5ae3 | |
Nick O'Leary | 15958cd4a3 | |
Nick O'Leary | edcdc6c97c | |
Stephen McLaughlin | 143b807e9b | |
Nick O'Leary | 861379c227 | |
Nick O'Leary | 2fb9f62d0b | |
Nick O'Leary | 84e02fc144 | |
Nick O'Leary | 57ac90f837 | |
Nick O'Leary | 10a45ece76 | |
Nick O'Leary | c88a177cb2 | |
Rafael Muynarsk | a63dfc4650 | |
Rafael Muynarsk | 8924ac2783 | |
Steve-Mcl | 4fffa2d0ba | |
Steve-Mcl | 856d2ab266 | |
Steve-Mcl | 750d2c76f5 | |
Steve-Mcl | 47157049c0 | |
Steve-Mcl | 22000f10df | |
Nick O'Leary | d802ce1484 | |
Steve-Mcl | 4b10b9ffc3 | |
Steve-Mcl | 552408f488 | |
Nick O'Leary | 4884938036 | |
Ben Hardill | cdcc8cc59a | |
Nick O'Leary | f7bd600715 | |
Ben Hardill | 0014fec63f | |
Ben Hardill | 812efde342 | |
Ben Hardill | 889f0e1569 | |
Nick O'Leary | 3a26c5cd65 | |
Nick O'Leary | 12a25c37aa | |
Nick O'Leary | 4706e20a1d | |
Nick O'Leary | 14c23051ee | |
Nick O'Leary | 330ddfa3ad | |
Nick O'Leary | a1e9a14ef3 | |
Nick O'Leary | 958f57085f | |
Nick O'Leary | 646a786b75 | |
Nick O'Leary | c8516bc5f4 | |
Nick O'Leary | 58e87b3ddf | |
Nick O'Leary | ea0abb70a2 | |
Nick O'Leary | 908f9562f6 | |
Steve-Mcl | 8131d9a640 | |
Stephen McLaughlin | e092f41074 | |
Mauricio Bonani | 79a90dc476 | |
Mauricio Bonani | 25962dbf39 | |
Steve-Mcl | 8df53e441d | |
Stephen McLaughlin | 6f89efa40b | |
Stephen McLaughlin | d6a1b4e71f | |
Hiroyasu Nishiyama | a2c0e53f87 | |
Steve-Mcl | 013af7619e | |
Steve-Mcl | aa302ecc32 | |
Steve-Mcl | 99b049fe2d | |
Steve-Mcl | dbdd1b8671 | |
Steve-Mcl | 8ba6a7436e | |
Steve-Mcl | 6e35a9f682 | |
Stephen McLaughlin | 78f456911a | |
Steve-Mcl | 8f5d3dc49c | |
Steve-Mcl | 97678577fb | |
Stephen McLaughlin | ce67737cc9 | |
Steve-Mcl | b9919b0a9c | |
Hiroyasu Nishiyama | 226f45d8d5 | |
Hiroyasu Nishiyama | accbf6ecfc | |
Stephen McLaughlin | 0aa80d82d9 | |
Hiroyasu Nishiyama | ace5f81a17 | |
Steve-Mcl | 21a0b33645 | |
Steve-Mcl | 8b991e11a2 | |
Steve-Mcl | 8f013776df | |
Steve-Mcl | c30aedd309 | |
Steve-Mcl | 39f303fcd6 | |
Steve-Mcl | 76c0e140cf | |
Steve-Mcl | ccb3c991a6 | |
Stephen McLaughlin | a7932da207 | |
Stephen McLaughlin | 5fda20c330 | |
Nick O'Leary | 1be6e4565f | |
Nick O'Leary | e606d0b1de | |
Nick O'Leary | b4bcb7ace2 | |
Nick O'Leary | a63fee1223 | |
Nick O'Leary | ae76ff0aaf | |
Nick O'Leary | bba819ba84 | |
Nick O'Leary | d0d0da6cb7 | |
Steve-Mcl | 475113838a | |
Nick O'Leary | b8435efc97 | |
Steve-Mcl | 780e41d6a6 | |
Steve-Mcl | 6d0b55f753 | |
Mauricio Bonani | c9fa5c7284 | |
Mauricio Bonani | e97f4c4054 | |
Mauricio Bonani | 96d15b7505 | |
Mauricio Bonani | 2f77596034 | |
Mauricio Bonani | 5619c105aa | |
Mauricio Bonani | 9a6ee023b3 | |
Dave Conway-Jones | 77e2e44abc | |
Kazuhito Yokoi | 32bddfdd47 | |
Kazuhito Yokoi | c9aa654ef0 | |
Kazuhito Yokoi | 5e501857aa | |
Kazuhito Yokoi | 6b00aba039 | |
Kazuhito Yokoi | 14fa9cfa4b | |
Steve-Mcl | 5633c5224e | |
Steve-Mcl | 03763a1423 | |
Steve-Mcl | cf6df1556c | |
Steve-Mcl | cdc8a42393 | |
Steve-Mcl | a2fd705153 | |
Steve-Mcl | 3388f699a0 | |
Steve-Mcl | 5e197713ff | |
Sam Machin | 50718495da | |
Sam Machin | b7b604aed4 | |
Sam Machin | a1f5cabbba | |
Sam Machin | c2aae6ddf6 | |
Dave Conway-Jones | 8a40622815 | |
Nick O'Leary | cb88409102 | |
Steve-Mcl | b918b75414 | |
Nick O'Leary | 37f0e36c98 | |
Stephen McLaughlin | c8dc2327a3 | |
Stephen McLaughlin | f660973168 | |
Stephen McLaughlin | cf2e7744f3 | |
Sam Machin | 855d799b21 | |
Sam Machin | 97dd1d0f4f | |
Nick O'Leary | 5b5553b9a3 | |
Stephen McLaughlin | 702545e0b2 | |
Stephen McLaughlin | fa2787eb5d | |
Nick O'Leary | 0f37b326a0 | |
Steve-Mcl | 7f9f551cfe | |
Steve-Mcl | ecf1847dd2 | |
Steve-Mcl | 40a9dce869 | |
Steve-Mcl | a6696733fa | |
Sam Machin | d9bd736159 | |
ralphwetzel | 4f5f5d31a3 | |
ralphwetzel | fad1325427 | |
Mauricio Bonani | 8b6678a453 | |
Sam Machin | c7f48a83c0 | |
Sam Machin | af0f02d63e | |
Steve-Mcl | 497d63e67e | |
Sam Machin | 4d048af384 | |
Nick O'Leary | 3649f10600 | |
Nick O'Leary | 49e69a54bd | |
Nick O'Leary | a0acc89fcb | |
Nick O'Leary | 64d1a82920 | |
Nick O'Leary | 2396e28479 | |
Nick O'Leary | db1ad0df63 | |
Steve-Mcl | c5de18caae | |
Steve-Mcl | e57774e121 | |
Steve-Mcl | b7ee46d400 | |
Steve-Mcl | 6007132640 | |
Steve-Mcl | 31b3a4c342 | |
Stephen McLaughlin | 73ff852648 | |
Nick O'Leary | 6d50eb5737 | |
Nick O'Leary | 3c0b74005b | |
Nick O'Leary | 93ff667df1 | |
Bruno Henriques | a8579fa68a | |
Stephen McLaughlin | 10f77fdf1a | |
Steve-Mcl | 99d824a999 | |
Steve-Mcl | 97d2b5df15 | |
Steve-Mcl | 84a9cf7adf | |
Steve-Mcl | a49927f173 | |
Nick O'Leary | 6a5c50ff77 | |
Steve-Mcl | c948573c2d | |
Stephen McLaughlin | 5233bc501c | |
Steve-Mcl | ad96c6f838 | |
Nick O'Leary | 0e92f68b4a | |
Nick O'Leary | ac97e8c613 | |
Nick O'Leary | 95fe717ca7 | |
Steve-Mcl | 10b18de3e0 | |
Steve-Mcl | 08295eb807 | |
Steve-Mcl | fce4f0c116 | |
Steve-Mcl | cf1424976f | |
Steve-Mcl | 94e8fce40a | |
Steve-Mcl | ea671bf395 | |
Nick O'Leary | fdb868516f | |
Nick O'Leary | c75bebfc90 | |
Nick O'Leary | 3e102ef760 | |
Nick O'Leary | c07eddbd97 | |
Stephen McLaughlin | e85b925f40 | |
Steve-Mcl | 27761ba6f2 | |
Steve-Mcl | b665698e78 | |
Steve-Mcl | 97ebe33d68 | |
Steve-Mcl | 249f7e45fb | |
Dave Conway-Jones | c0612e6193 | |
Ariel Ferreira | 79a789c557 | |
Ariel Ferreira | 450888f542 | |
萧十一郎 | 380a08242a | |
Steve-Mcl | e653a933f1 | |
Dave Conway-Jones | bda5dffa34 | |
Steve-Mcl | 29df7e84a1 | |
Steve-Mcl | 19cf43a10e | |
Dave Conway-Jones | 0398ef3b90 | |
Dave Conway-Jones | 8c19daf949 | |
Steve-Mcl | e4f0688a02 | |
Dave Conway-Jones | 25f4fbf2bb | |
Nick O'Leary | 0533c08438 | |
Nick O'Leary | 5f0ea85f47 | |
Nick O'Leary | 6c7c1202ed | |
Steve-Mcl | 669aa769c2 | |
Nick O'Leary | fcf2994015 | |
Nick O'Leary | bee21ddc9e | |
Nick O'Leary | 263e68e677 | |
Steve-Mcl | 2b958f5724 | |
Nick O'Leary | 95f7177ef4 | |
Nick O'Leary | 006324b78e | |
Steve-Mcl | efd8c1229d | |
Hiroyasu Nishiyama | 0f1aea3e0d | |
Hiroyasu Nishiyama | 6a41cbebc9 | |
Nick O'Leary | fba95e6a42 | |
Nick O'Leary | bffb91f196 | |
Nick O'Leary | 4573b65639 | |
Nick O'Leary | 3d8505385a | |
Nick O'Leary | 95d3a8cc22 | |
Nick O'Leary | 99c053f86b | |
Nick O'Leary | f2dde705ef | |
Nick O'Leary | be11fda814 | |
Nick O'Leary | 0261105c52 | |
Nick O'Leary | 264047dc0c | |
Steve-Mcl | 4d84926ed2 | |
Nick O'Leary | da3211fee6 | |
Nick O'Leary | 1388b03cf2 | |
Hiroyasu Nishiyama | 9f98b4b082 | |
Steve-Mcl | b3f1401ab4 | |
Hiroyasu Nishiyama | e5e3832809 | |
Nick O'Leary | 2eff7da171 | |
Nick O'Leary | e9622bcfe8 | |
Dave Conway-Jones | 63ebadc526 | |
Steve-Mcl | fe47b07229 | |
Hiroyasu Nishiyama | dc73997be3 | |
Steve-Mcl | 62315fd478 | |
Hiroyasu Nishiyama | fb81121bd3 | |
Nick O'Leary | 5293563a6a | |
Alexandre Alapetite | 2e1e61dabe | |
Alexandre Alapetite | 280d63fde7 | |
Steve-Mcl | c6104195f6 | |
Alexandre Alapetite | e55cbb3e3d | |
Steve-Mcl | 56b85e4194 | |
Steve-Mcl | 6431c43d0e | |
Steve-Mcl | a62107fbd1 | |
Hiroyasu Nishiyama | 7959d18248 | |
Nick O'Leary | 2f66915a9f | |
Nick O'Leary | a508177e21 | |
Mario Wolff | 5a9d858604 | |
Dave Conway-Jones | 514da83961 | |
Nick O'Leary | b7bae18849 | |
Nick O'Leary | fbde247c72 | |
Nick O'Leary | 3a69af9034 | |
Nick O'Leary | 5c87a6cb76 | |
Nick O'Leary | 9c6bb434e8 | |
Nick O'Leary | d1bd303dfa | |
Nick O'Leary | 3813c32454 | |
Nick O'Leary | 3b00a692ee | |
Nick O'Leary | 3304ebe9d3 | |
Nick O'Leary | 513120cbfe | |
Hiroyasu Nishiyama | b06049d5a3 | |
Kazuhito Yokoi | 0f50355deb | |
Nick O'Leary | bd6e35fea2 | |
Nick O'Leary | a4fd63cd44 | |
Steve-Mcl | fdc4219b68 | |
Nick O'Leary | 5b428bb8e6 | |
Hiroyasu Nishiyama | c948ff88a5 | |
Nick O'Leary | 9b9a0d7060 | |
Nick O'Leary | 16578e3677 | |
Nick O'Leary | be7f84bc67 | |
Nick O'Leary | 033d26f2cb | |
Nick O'Leary | 4c0826b1c4 | |
Steve-Mcl | c4cc204c94 | |
Nick O'Leary | 3747db18b1 | |
Nick O'Leary | 4173625fca | |
Nick O'Leary | 0e7863a6fb | |
Nick O'Leary | 207ba00ad2 | |
Nick O'Leary | 87c89586a5 | |
Nick O'Leary | 1cea1ced82 | |
Nick O'Leary | 08732bac0f | |
Nick O'Leary | 283e8d3c08 | |
Nick O'Leary | 42a7165596 | |
Hiroyasu Nishiyama | aa3f5001d5 | |
Hiroyasu Nishiyama | 56580c4005 | |
Hiroyasu Nishiyama | ba304c9651 | |
Nick O'Leary | 703c5adba7 | |
Steve-Mcl | 8b85f6e0a6 | |
Nick O'Leary | c136d22382 | |
Nick O'Leary | 42358419ad | |
Nick O'Leary | ab2ced5c37 | |
Steve-Mcl | faf31be0dc | |
Nick O'Leary | ff4c67d068 | |
Steve-Mcl | 10b133db02 | |
Nick O'Leary | f0bf607b43 | |
Steve-Mcl | 8948ca5323 | |
Steve-Mcl | 9c3be51fe9 | |
Hiroyasu Nishiyama | 2da9161f29 | |
Hiroyasu Nishiyama | 983dad5b53 | |
Hiroyasu Nishiyama | 8b23d341b4 | |
Hiroyasu Nishiyama | 0ad60013aa | |
Hiroyasu Nishiyama | 289815e128 | |
Kazuhito Yokoi | f7ee83f1b9 | |
Nick O'Leary | f67aafa8d3 | |
Nick O'Leary | 4e5ddd57bf | |
Nick O'Leary | e0d4ecf835 | |
Nick O'Leary | 81a461115b | |
Nick O'Leary | d679b02658 | |
Hiroyasu Nishiyama | 5effcdb024 | |
Nick O'Leary | 211a5eb2bb | |
Nick O'Leary | c4465ba58d | |
Nick O'Leary | 7903c53876 | |
Nick O'Leary | dbefe6a560 | |
Nick O'Leary | 8b1f412255 | |
Nick O'Leary | a2e0074061 | |
Nick O'Leary | 5fc920087b | |
Nick O'Leary | 085233ab9b | |
Hiroyasu Nishiyama | 6657b2629f | |
Nick O'Leary | 310a279aaf | |
Hiroyasu Nishiyama | 58f3a76da7 | |
Hiroyasu Nishiyama | a2c9458b1b | |
Hiroyasu Nishiyama | 75bcd9e8d5 | |
Kazuhito Yokoi | 977e7ef395 | |
ralphwetzel | eb1b8b577f | |
ralphwetzel | 28f91685ce | |
Nick O'Leary | 81a4fe59d9 | |
Hiroyasu Nishiyama | e7189ab81f | |
Nick O'Leary | 346db89e66 | |
Hiroyasu Nishiyama | f786c7f144 | |
Nick O'Leary | 51f45293b8 | |
Nick O'Leary | 943b103001 | |
Nick O'Leary | f055d42277 | |
Nick O'Leary | fb7a2a8d5d | |
Nick O'Leary | 1e5ed2a2e3 | |
Nick O'Leary | e1467dfe23 | |
Nick O'Leary | c480f96d30 | |
Kazuhito Yokoi | cf613aafb2 | |
Nick O'Leary | 20dbf7c5f4 | |
Nick O'Leary | 47c912c25b | |
Nick O'Leary | 48fb1a8127 | |
Nick O'Leary | 6c1b55db16 | |
Nick O'Leary | df70c8a800 | |
Nick O'Leary | 82ae2e7118 | |
Nick O'Leary | 0cf9b5f3df | |
Nick O'Leary | 036a825892 | |
Nick O'Leary | 8b43b31c64 | |
Nick O'Leary | 3abef972a7 | |
Nick O'Leary | 30b00741b5 | |
Nick O'Leary | f86e743cce | |
Nick O'Leary | cb96fb735e | |
Nick O'Leary | 459a52d31d | |
Nick O'Leary | 44ef9a13d6 | |
Nick O'Leary | 0bb3652a63 | |
Nick O'Leary | 6a82d683a9 | |
Nick O'Leary | fad708e8de | |
Nick O'Leary | c6a38b8355 | |
Nick O'Leary | ee84eb666b | |
Nick O'Leary | 6d2793cac6 | |
Nick O'Leary | 86d518fc2e | |
Nick O'Leary | 25dba1a6d5 | |
Nick O'Leary | af949c62c2 | |
Nick O'Leary | ea20342d76 | |
Nick O'Leary | 7732d52583 | |
Nick O'Leary | c801bc5e6b | |
Nick O'Leary | ea43729063 | |
Nick O'Leary | e26bae8027 | |
Tobias Oort | 555f155cad | |
Nick O'Leary | f8c47f59bc | |
Nick O'Leary | f3997128b9 | |
Nick O'Leary | 154a4e23dd | |
Dave Conway-Jones | 52e4e0e569 | |
Nick O'Leary | 30f2b96c68 | |
Nick O'Leary | 58c94b7773 | |
Tobias Oort | 83203d5f5d | |
Dave Conway-Jones | f77d161643 | |
Nick O'Leary | 6580b139c0 | |
Nick O'Leary | 2743c7c6ac | |
Nick O'Leary | 062f76214e | |
Nick O'Leary | ce98ed98a2 | |
Nick O'Leary | dce9d93f6c | |
Nick O'Leary | f7e35a6cbe | |
Hiroyasu Nishiyama | 931335220f | |
Hiroyasu Nishiyama | 3ce35a8a4b | |
Hiroyasu Nishiyama | 9ac4e5cf6a | |
Tobias Oort | bd77d7eec3 | |
Steve-Mcl | b5e48aa509 | |
Kazuhito Yokoi | b14c42b6a4 | |
Kazuhito Yokoi | ba794ba58c | |
Kazuhito Yokoi | b00282590d | |
Ben Hardill | 44616c6872 | |
Nick O'Leary | aaa2b4c3db | |
Nick O'Leary | 8974d8e4df | |
Nick O'Leary | 699063cbb0 | |
Nick O'Leary | e76000b713 | |
Nick O'Leary | 332b372e31 | |
Nick O'Leary | cb3fcb7bfa | |
Nick O'Leary | bef641609e | |
Nick O'Leary | 24b52f09df | |
Nick O'Leary | 942b17b807 | |
Nick O'Leary | cf19d7f3ad | |
Nick O'Leary | ebd62a4112 | |
Nick O'Leary | 9af7357ca4 | |
Nick O'Leary | 0dbc35c252 | |
Dave Conway-Jones | c9f03f1ac5 | |
Dave Conway-Jones | 02bd292b8c | |
Dave Conway-Jones | e5f1029d0c | |
Dave Conway-Jones | cae247160f | |
Dave Conway-Jones | 6692b1992c | |
Dave Conway-Jones | 0937837b7f | |
Kunihiko Toumura | 828888490a | |
Kazuhito Yokoi | 91cb6ba73b | |
Nick O'Leary | 4ee4d32b2e | |
Kazuhito Yokoi | 8df630a2f5 | |
Dave Conway-Jones | 2cad42870e | |
Nick O'Leary | 43651135f3 | |
Dave Conway-Jones | 6ae42eb787 | |
Nick O'Leary | ecaf866613 | |
Nick O'Leary | 5ea3329b36 | |
Nick O'Leary | 7bb7149f4c | |
Nick O'Leary | 5856d043ca | |
Nick O'Leary | 7cd3e49f04 | |
Nick O'Leary | 173e75175e | |
Nick O'Leary | 800006dd76 | |
Nick O'Leary | a824b6910a | |
Nick O'Leary | dcea382b38 | |
Nick O'Leary | d9f976baea | |
Nick O'Leary | 1fa13efe19 | |
Nick O'Leary | 33af5cd7c6 | |
Nick O'Leary | 7cb8f97ef1 | |
Nick O'Leary | bf965a9cde | |
Nick O'Leary | 17ffff685a | |
Nick O'Leary | ae76271cff | |
Nick O'Leary | 8f3a96d615 | |
Nick O'Leary | 30e750dfe5 | |
Nick O'Leary | 682dff7c6f | |
Nick O'Leary | 85415eb8a8 | |
Nick O'Leary | 68a80b9244 | |
Hiroyasu Nishiyama | c331da7323 | |
Nick O'Leary | 04ffa06221 | |
Hiroyasu Nishiyama | 1f0690c6ec | |
Hiroyasu Nishiyama | 711467abcd | |
Nick O'Leary | 9439cd0e3d | |
Nick O'Leary | 314c19650d | |
Nick O'Leary | ed6afcd802 | |
Nick O'Leary | 082d4fe8e1 | |
Nick O'Leary | cd23b44506 | |
Nick O'Leary | 46b6b024b9 | |
Nick O'Leary | cb88cc35e5 | |
Nick O'Leary | 75c0c44809 | |
Nick O'Leary | a091b82ba9 | |
Nick O'Leary | a3b8f022e6 | |
Nick O'Leary | 279fcb7c51 | |
Mauricio Bonani | 49a9376073 | |
Nick O'Leary | 96840ede56 | |
Hiroyasu Nishiyama | 7e7f481f99 | |
Kazuhito Yokoi | 3edbf52bc6 | |
Nick O'Leary | fba6e801fc | |
Nick O'Leary | 720a163273 | |
Nick O'Leary | a9b12e5172 | |
Dave Conway-Jones | 6ac0c0a367 | |
Kazuhito Yokoi | 300402d253 | |
Kazuhito Yokoi | 0d9bfae503 | |
Nick O'Leary | bfe0d3b8a3 | |
Nick O'Leary | 5fdd9c0546 | |
Nick O'Leary | b6570a16b8 | |
Kazuhito Yokoi | 8e2d3ea16f | |
Kazuhito Yokoi | bc2c81f058 | |
Nick O'Leary | 3e0f080ea7 | |
Nick O'Leary | 679e07189d | |
Nick O'Leary | a38ebef100 | |
Nick O'Leary | b8ad6475e1 | |
Nick O'Leary | 0f0cb3ac6d | |
Nick O'Leary | d3efb9d7cc | |
Nick O'Leary | 84a237d3f5 | |
Nick O'Leary | e6de52eede | |
Nick O'Leary | 98aee964d7 | |
Nick O'Leary | 570e5442e0 | |
Ben Hardill | b77a2dc353 | |
Ben Hardill | 87af31de20 | |
Nick O'Leary | cfe201dbe1 | |
Nick O'Leary | 6ccdab35e0 | |
Nick O'Leary | 55b9f36b45 | |
Nick O'Leary | fbcb1130c9 | |
Nick O'Leary | d4f7a6d2bc | |
Nick O'Leary | 8a19f71abe | |
Nick O'Leary | fb153757b5 | |
Nick O'Leary | 4f175fc93e | |
Nick O'Leary | 2d4ca7cec0 | |
Nick O'Leary | bf0ea89969 | |
Nick O'Leary | 073f0c2a20 | |
Nick O'Leary | ba83be9062 | |
Ben Hardill | 2e7188ea4f | |
Nick O'Leary | 5a012182d9 | |
Nick O'Leary | b855438af6 | |
Nick O'Leary | 2ffea143e7 | |
Duncan Bellamy | 61d85b49e6 | |
Nick O'Leary | 35f617e96c | |
Nick O'Leary | 6b6ad47c35 | |
Nick O'Leary | e57183ed0e | |
Nick O'Leary | ecfd61a822 | |
Steve-Mcl | 153f87704b | |
Gerwin van Beek | 836f7d2163 | |
Nick O'Leary | d4d6f71cf4 | |
Nick O'Leary | 42a9da006e | |
Nick O'Leary | 2bd5c4f527 | |
Nick O'Leary | 6a49b5c106 | |
Nick O'Leary | 23e14d1b72 | |
Nick O'Leary | f4f11c8884 | |
Nick O'Leary | 2b220abdb7 | |
Nick O'Leary | c1d947ebe3 | |
Nick O'Leary | d695cf392e | |
Nick O'Leary | 21304a695c | |
Nick O'Leary | fa51b06c46 | |
Nick O'Leary | 7560bb8d7b | |
Nick O'Leary | fc9d65abcc | |
Dave Conway-Jones | a7413cccd0 | |
Nick O'Leary | 7610353f07 | |
Dave Conway-Jones | d3f978c90c | |
Kazuhito Yokoi | b55a8ef62a | |
Nick O'Leary | 8d79deffb5 | |
Nick O'Leary | 8158487c3e | |
Nick O'Leary | 0cc061196d | |
Nick O'Leary | d0ec055222 | |
Nick O'Leary | ae12ddd32b | |
Nick O'Leary | 31da3adaa9 | |
Nick O'Leary | 9fd5213f13 | |
Nick O'Leary | de882f5849 | |
Nick O'Leary | fded1e0021 | |
Nick O'Leary | 6cb06c146d | |
Nick O'Leary | b8f1386ad0 | |
Nick O'Leary | 2b38b5ea50 | |
Nick O'Leary | 2f707a6b16 | |
Nick O'Leary | d4c2fcd559 | |
Nick O'Leary | 082970cdb7 | |
Nick O'Leary | fe97c78977 | |
Nick O'Leary | 79394aa69f | |
Nick O'Leary | 21fd6e3c21 | |
Nick O'Leary | de4944cd83 | |
Nick O'Leary | 3fde5c27ed | |
Nick O'Leary | e1d492813e | |
Nick O'Leary | 48d0ee3b6d | |
Nick O'Leary | eebb64901c | |
Nick O'Leary | 60e0ed2af6 | |
Nick O'Leary | f030694ef4 | |
Nick O'Leary | e9ed13459a | |
Nick O'Leary | af1e38fdf7 | |
Nick O'Leary | b12900e680 | |
Nick O'Leary | 44aa1f4a5e | |
Nick O'Leary | 9425548a85 | |
Nick O'Leary | bfd4fc81fe | |
Nick O'Leary | 439af2a325 | |
Nick O'Leary | 3204b04455 | |
Nick O'Leary | bed1be14ba | |
Nick O'Leary | 7cd92faf0d | |
Nick O'Leary | be7e28af5d | |
Nick O'Leary | 8eaa762ec5 | |
Nick O'Leary | 953a9f7cd4 | |
Kazuhito Yokoi | 36f099d68b | |
Nick O'Leary | c8fd5090bd | |
Nick O'Leary | 155e1be494 | |
Nick O'Leary | cf5e125cb3 | |
Nick O'Leary | 764fc8477d | |
Nick O'Leary | d35e62f8cf | |
Nick O'Leary | 904babdd13 | |
Nick O'Leary | 154d3842a8 | |
Nick O'Leary | edb8a120bd | |
Nick O'Leary | cdfeba0b82 | |
Nick O'Leary | 8ce1465e9f | |
Nick O'Leary | a296b1c9c8 | |
Nick O'Leary | bb8d7058a4 | |
mailsvb | 816cfa1c7e | |
Nick O'Leary | 53938200fc | |
Nick O'Leary | 3885bb039d | |
Nick O'Leary | 4adad6e424 | |
Nick O'Leary | 5fb9531338 | |
Nick O'Leary | 273d9c76a7 | |
Nick O'Leary | 79a1d6c561 | |
Nick O'Leary | 4b0eb8475d | |
Nick O'Leary | 3dc874b517 | |
Nick O'Leary | 8a3da1ce8d | |
Nick O'Leary | 42d90542b5 | |
Nick O'Leary | 690a93d82d | |
Nick O'Leary | 8042fe4e2b | |
Nick O'Leary | a27ce375db | |
Nick O'Leary | db3688799d | |
Nick O'Leary | a88be35292 | |
Nick O'Leary | e2d7fcbfc2 | |
Nick O'Leary | 421d155586 | |
Nick O'Leary | 7f9e318214 | |
Nick O'Leary | 57386edb7c | |
Nick O'Leary | 94d5ba4550 | |
Nick O'Leary | 2a0b4ea828 | |
Nick O'Leary | 893ef227d4 | |
Nick O'Leary | 1fe6e5a00d | |
Nick O'Leary | 6c96cde73c | |
Steve-Mcl | 2b12834d53 | |
Steve-Mcl | 8a2e74b3b8 | |
Steve-Mcl | aa1721ab3d | |
Steve-Mcl | c0a256306b | |
Steve-Mcl | f0b03b4ada | |
Steve-Mcl | 5503f53af2 | |
Steve-Mcl | a89d294b27 | |
Nick O'Leary | 012e1cbcc5 | |
Nick O'Leary | 3759e0f778 | |
Nick O'Leary | 1c18641699 | |
Nick O'Leary | e50e2201b1 | |
Nick O'Leary | 1419729458 | |
Nick O'Leary | c14177b0e8 | |
Nick O'Leary | 126df969b3 | |
Nick O'Leary | f8ee92ba06 | |
Nick O'Leary | 81a278dd8c | |
Nick O'Leary | a98013806c | |
Nick O'Leary | 0171ffac6a | |
Nick O'Leary | 7544241316 | |
Nick O'Leary | 061afb3a94 | |
Nick O'Leary | 8a5eda9c1f | |
Nick O'Leary | f62040f0ec | |
Nick O'Leary | f2e51779e4 | |
Nick O'Leary | da114fa3a5 | |
Nick O'Leary | 3775a1657b | |
Nick O'Leary | 2bd7c4bc81 | |
Nick O'Leary | 253c489a33 | |
Nick O'Leary | ac84b6fe3f | |
Nick O'Leary | 8761e61439 | |
Nick O'Leary | 29e903e1c8 | |
Nick O'Leary | ec27e19e3f | |
Nick O'Leary | 5df0dae11a | |
Nick O'Leary | 7fffc1a36d | |
Nick O'Leary | f3d0179834 | |
Nick O'Leary | 8bf69c598a | |
Nick O'Leary | aa5fad6628 | |
Nick O'Leary | b0f1fad4e2 | |
Nick O'Leary | 3b6d0995b4 | |
Nick O'Leary | 0cbf4ac37d | |
Nick O'Leary | 9ccffee82c | |
Nick O'Leary | 1b38e2eedf | |
Nick O'Leary | ce87abe96e | |
Nick O'Leary | becbda8483 | |
Nick O'Leary | da210e2ae4 | |
Nick O'Leary | d4fc6feeba | |
Nick O'Leary | f1cbca8d76 | |
Nick O'Leary | dfd9364061 | |
Nick O'Leary | 1931395fdb | |
Nick O'Leary | b01fd24e15 | |
Nick O'Leary | c9d1329fc2 | |
Nick O'Leary | ab2d3bfd80 | |
Nick O'Leary | 36bb172f29 | |
Gerwin van Beek | 01e64be39d | |
Gerwin van Beek | 4ebe160f6c | |
Nick O'Leary | b427eca21f | |
Nick O'Leary | 3eb438c8d2 | |
Nick O'Leary | 068f425833 | |
Nick O'Leary | b3c84242dc | |
Nick O'Leary | 24672d91d8 | |
Nick O'Leary | 4422af26ec | |
Nick O'Leary | 5329e803e2 | |
Nick O'Leary | ad542b91fa | |
Nick O'Leary | e9e03c945b | |
Nick O'Leary | e20cfb3dae | |
Nick O'Leary | 48baac916c | |
Nick O'Leary | adadf38b08 | |
Nick O'Leary | d4e1469450 | |
Nick O'Leary | 2c456f044f | |
Nick O'Leary | 228c15ace3 | |
Nick O'Leary | a0d15e6e7b | |
Dave Conway-Jones | 2fe78cf971 | |
Nick O'Leary | 5ec3544340 | |
Nick O'Leary | 5443a17775 | |
Nick O'Leary | 40d60e4eb3 | |
Nick O'Leary | f3312a6403 | |
Nick O'Leary | e638b55b30 | |
Nick O'Leary | 5caa76a8b3 | |
Nick O'Leary | 901a5ce9d2 | |
Nick O'Leary | 6ab74951f4 | |
Nick O'Leary | c2625d696d | |
Ben Hardill | 77fb5ef2ab | |
Steve-Mcl | c20ca3399e | |
Steve-Mcl | 5825da9c76 | |
Nick O'Leary | e3853ae402 | |
Renato Junior | bd142a9710 | |
Dave Conway-Jones | 4f23847546 | |
Nick O'Leary | 85820c571d | |
Nick O'Leary | d9bed03025 | |
Nick O'Leary | d6e05962c9 | |
Casey Wilkes | d32636ed6b | |
Dave Conway-Jones | bbf066f030 | |
Casey Wilkes | a3d2f6592e | |
Nick O'Leary | 87b6327c5e | |
Nick O'Leary | abaebb329d | |
Nick O'Leary | 8970fe412d | |
Nick O'Leary | 9dc5ae21c4 | |
Nick O'Leary | 4132fb79a6 | |
Nick O'Leary | 9a4dc30604 | |
Nick O'Leary | 192b542fe4 | |
Kunihiko Toumura | 490547cd3d | |
Dave Conway-Jones | 17f9829498 | |
Nick O'Leary | 234e77fd06 | |
Nick O'Leary | 87ac831c8a | |
Nick O'Leary | 4e92492165 | |
Nick O'Leary | c3d0b1114f | |
Nick O'Leary | 4463a7d4ba | |
Nick O'Leary | 741fe3dd90 | |
Nick O'Leary | e910f3915d | |
Nick O'Leary | 39aafc5007 | |
Nick O'Leary | 9b83afae42 | |
Mauricio Bonani | bdf54f6cff | |
Mauricio Bonani | f2a9887a12 | |
bartbutenaers | 4f4d78bfab | |
Nick O'Leary | 3b460fb8fa | |
Nick O'Leary | ee15e9acc5 | |
Nick O'Leary | 48fce35fb3 | |
Amit Kumar Swami | 78899378c2 | |
Hiroyasu Nishiyama | 67404a327d | |
Sam Machin | 702dfa4b79 | |
Nick O'Leary | 2144407e41 | |
Nick O'Leary | b36dd62c50 | |
Nick O'Leary | 7026df7d96 | |
Nick O'Leary | ed8e7afdf6 | |
Hiroyasu Nishiyama | d78e5932f9 | |
Nick O'Leary | 26d83bb9ea | |
Nick O'Leary | 8e89b1bdf2 | |
Nick O'Leary | c880cc0987 | |
Nick O'Leary | 0874ba7a03 | |
Nick O'Leary | 7962278475 | |
Nick O'Leary | c8949f5eeb | |
Nick O'Leary | 8108b93c5f | |
Nick O'Leary | 9dbe531bf7 | |
Nick O'Leary | 46e2ff1001 | |
Nick O'Leary | d2cdc67ec7 | |
Nick O'Leary | 56121203bf | |
Nick O'Leary | e13133fd2b | |
Magnus Månsson | f20565fd16 | |
Magnus Månsson | cf2d5841f5 | |
Dominik Schmidt | 630d2ca926 | |
Nick O'Leary | 34cb93794c | |
Nick O'Leary | 122b5ba468 | |
Kunihiko Toumura | 401466d6c0 | |
bartbutenaers | 7f2627dbc8 | |
Hiroyasu Nishiyama | 6aecc3915c | |
Dave Conway-Jones | ef1b3aa7f5 | |
Sam Machin | 1aaab2a814 | |
Mauricio Bonani | e93734b209 | |
Mauricio Bonani | 9e5218f6b4 | |
Ben Hardill | 711ec39327 | |
Steve-Mcl | 08049252f2 | |
Nick O'Leary | f1e7ec0c6b | |
Nick O'Leary | 23765d9139 | |
Nick O'Leary | 43febe269c | |
Nick O'Leary | 40233c7702 | |
Nick O'Leary | 27ed81614b | |
Nick O'Leary | 889d23e9bd | |
Nick O'Leary | f8571023f6 | |
Nick O'Leary | 6364e00202 | |
Ben Hardill | a76c6f86c6 | |
Ben Hardill | 555e815402 | |
Steve-Mcl | 8a1d81989b | |
Nick O'Leary | ee9234b2c6 | |
Nick O'Leary | 735b9c5844 | |
Nick O'Leary | 064f3eb3bc | |
Nick O'Leary | f1775d4fd1 | |
Nick O'Leary | a9bc111c4f | |
Nick O'Leary | c100612473 | |
Ben Hardill | 26087f8dc7 | |
Mauricio Bonani | 36e75cb728 | |
Steve-Mcl | d7a2fc2be4 | |
Nick O'Leary | 142176f194 | |
Nick O'Leary | c5892fc17e | |
Nick O'Leary | 6e69cfbca4 | |
Nick O'Leary | 775181f761 | |
Nick O'Leary | 36e83d628e | |
Nick O'Leary | 5f6fcb2bc0 | |
Nick O'Leary | 7b106e5650 | |
Nick O'Leary | 79d9c83a2d | |
Nick O'Leary | 269669ba28 | |
Nick O'Leary | 4ef7240598 | |
Nick O'Leary | efdf689c31 | |
Nick O'Leary | f7606e92ca | |
Nick O'Leary | 6750be3ec9 | |
Nick O'Leary | 68fb5089f8 | |
Nick O'Leary | a8d093bacd | |
Nick O'Leary | 233a1995b3 | |
Nick O'Leary | 8ef3baaffb | |
Dave Conway-Jones | 4d26b806dd | |
Dave Conway-Jones | a2b95dbb39 | |
Dave Conway-Jones | d820f55358 |
|
@ -30,5 +30,5 @@ the [forum](https://discourse.nodered.org) or
|
|||
|
||||
- [ ] I have read the [contribution guidelines](https://github.com/node-red/node-red/blob/master/CONTRIBUTING.md)
|
||||
- [ ] For non-bugfix PRs, I have discussed this change on the forum/slack team.
|
||||
- [ ] I have run `grunt` to verify the unit tests pass
|
||||
- [ ] I have run `npm run test` to verify the unit tests pass
|
||||
- [ ] I have added suitable unit tests to cover the new/changed functionality
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
groups:
|
||||
github-actions:
|
||||
patterns:
|
||||
- "*"
|
|
@ -5,28 +5,31 @@ on:
|
|||
release:
|
||||
types: [published]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
generate:
|
||||
name: 'Update node-red-docker image'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out node-red repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: 'node-red'
|
||||
- name: Check out node-red-docker repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'node-red/node-red-docker'
|
||||
path: 'node-red-docker'
|
||||
- name: Check out node-red.github.io repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'node-red/node-red.github.io'
|
||||
path: 'node-red.github.io'
|
||||
- uses: actions/setup-node@v1
|
||||
- uses: actions/setup-node@v3
|
||||
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
|
||||
|
|
|
@ -6,16 +6,22 @@ on:
|
|||
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: [12, 14, 16]
|
||||
node-version: [16, 18, 20]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Install Dependencies
|
||||
|
@ -23,8 +29,8 @@ jobs:
|
|||
- name: Run tests
|
||||
run: |
|
||||
npm run test
|
||||
- name: Publish to coveralls.io
|
||||
if: ${{ matrix.node-version == 14 }}
|
||||
uses: coverallsapp/github-action@v1.1.2
|
||||
with:
|
||||
github-token: ${{ github.token }}
|
||||
# - name: Publish to coveralls.io
|
||||
# if: ${{ matrix.node-version == 16 }}
|
||||
# uses: coverallsapp/github-action@v1.1.2
|
||||
# with:
|
||||
# github-token: ${{ github.token }}
|
||||
|
|
|
@ -27,3 +27,4 @@ docs
|
|||
.vscode
|
||||
.nyc_output
|
||||
sync.ffs_db
|
||||
package-lock.json
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
3277
CHANGELOG.md
|
@ -16,6 +16,9 @@ behavior to the project's core team at team@nodered.org.
|
|||
Please raise any bug reports on the relevant project's issue tracker. Be sure to
|
||||
search the list to see if your issue has already been raised.
|
||||
|
||||
If your issue is more of a question on how to do something with Node-RED, please
|
||||
consider using the [community forum](https://discourse.nodered.org/).
|
||||
|
||||
A good bug report is one that make it easy for us to understand what you were
|
||||
trying to do and what went wrong.
|
||||
|
||||
|
@ -35,16 +38,17 @@ For feature requests, please raise them on the [forum](https://discourse.nodered
|
|||
## Pull-Requests
|
||||
|
||||
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.
|
||||
of existing code, please come and discuss it with us first. We prefer to
|
||||
do it that way to make sure your time and effort is well spent on something
|
||||
that fits with our goals.
|
||||
|
||||
All contributors need to sign the JS Foundation's Contributor License Agreement.
|
||||
It is an online process and quick to do. You can read the details of the agreement
|
||||
here: https://cla.js.foundation/node-red/node-red.
|
||||
|
||||
If you raise a pull-request without having signed the CLA, you will be prompted
|
||||
to do so automatically.
|
||||
If you've got a bug-fix or similar for us, then you are most welcome to
|
||||
get it raised - just make sure you link back to the issue it's fixing and
|
||||
try to include some tests!
|
||||
|
||||
All contributors need to sign the OpenJS Foundation's Contributor License Agreement.
|
||||
It is an online process and quick to do. If you raise a pull-request without
|
||||
having signed the CLA, you will be prompted to do so automatically.
|
||||
|
||||
### Code Branches
|
||||
|
||||
|
|
31
Gruntfile.js
|
@ -142,6 +142,7 @@ module.exports = function(grunt) {
|
|||
"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",
|
||||
|
@ -162,11 +163,13 @@ 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",
|
||||
|
@ -182,6 +185,7 @@ 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",
|
||||
|
@ -190,6 +194,7 @@ module.exports = function(grunt) {
|
|||
"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",
|
||||
|
@ -199,7 +204,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"
|
||||
},
|
||||
|
@ -219,7 +225,7 @@ module.exports = function(grunt) {
|
|||
"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
|
||||
|
@ -228,6 +234,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"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -326,6 +335,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'
|
||||
|
@ -392,7 +407,7 @@ module.exports = function(grunt) {
|
|||
{
|
||||
cwd: 'packages/node_modules/@node-red/editor-client/src',
|
||||
src: [
|
||||
'types/node/*.ts',
|
||||
'types/node/**/*.ts',
|
||||
'types/node-red/*.ts',
|
||||
],
|
||||
expand: true,
|
||||
|
@ -423,6 +438,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/'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -569,7 +590,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"+
|
||||
|
|
21
README.md
|
@ -1,17 +1,16 @@
|
|||
# Node-RED
|
||||
|
||||
http://nodered.org
|
||||
https://nodered.org
|
||||
|
||||
[![Build Status](https://travis-ci.org/node-red/node-red.svg?branch=master)](https://travis-ci.org/node-red/node-red)
|
||||
[![Coverage Status](https://coveralls.io/repos/node-red/node-red/badge.svg?branch=master)](https://coveralls.io/r/node-red/node-red?branch=master)
|
||||
[![Build Status](https://github.com/node-red/node-red/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/node-red/node-red/actions?query=branch%3Amaster)
|
||||
|
||||
Low-code programming for event-driven applications.
|
||||
|
||||
![Node-RED: Low-code programming for event-driven applications](http://nodered.org/images/node-red-screenshot.png)
|
||||
![Node-RED: Low-code programming for event-driven applications](https://nodered.org/images/node-red-screenshot.png)
|
||||
|
||||
## Quick Start
|
||||
|
||||
Check out http://nodered.org/docs/getting-started/ for full instructions on getting
|
||||
Check out https://nodered.org/docs/getting-started/ for full instructions on getting
|
||||
started.
|
||||
|
||||
1. `sudo npm install -g --unsafe-perm node-red`
|
||||
|
@ -20,7 +19,7 @@ started.
|
|||
|
||||
## Getting Help
|
||||
|
||||
More documentation can be found [here](http://nodered.org/docs).
|
||||
More documentation can be found [here](https://nodered.org/docs).
|
||||
|
||||
For further help, or general discussion, please use the [Node-RED Forum](https://discourse.nodered.org) or [slack team](https://nodered.org/slack).
|
||||
|
||||
|
@ -56,13 +55,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
|
||||
|
|
112
package.json
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"name": "node-red",
|
||||
"version": "2.0.1",
|
||||
"version": "3.1.0",
|
||||
"description": "Low-code programming for event-driven applications",
|
||||
"homepage": "http://nodered.org",
|
||||
"homepage": "https://nodered.org",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -26,76 +26,77 @@
|
|||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"acorn": "8.4.1",
|
||||
"acorn-walk": "8.1.1",
|
||||
"ajv": "8.6.0",
|
||||
"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",
|
||||
"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",
|
||||
"cronosjs": "1.7.1",
|
||||
"denque": "1.5.0",
|
||||
"express": "4.17.1",
|
||||
"express-session": "1.17.2",
|
||||
"denque": "2.1.0",
|
||||
"express": "4.18.2",
|
||||
"express-session": "1.17.3",
|
||||
"form-data": "4.0.0",
|
||||
"fs-extra": "10.0.0",
|
||||
"fs.notify": "0.0.4",
|
||||
"got": "11.8.2",
|
||||
"fs-extra": "11.1.1",
|
||||
"got": "12.6.0",
|
||||
"hash-sum": "2.0.0",
|
||||
"hpagent": "^0.1.2",
|
||||
"https-proxy-agent": "5.0.0",
|
||||
"i18next": "20.3.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.1",
|
||||
"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.8",
|
||||
"multer": "1.4.2",
|
||||
"memorystore": "1.6.7",
|
||||
"mime": "3.0.0",
|
||||
"moment": "2.29.4",
|
||||
"moment-timezone": "0.5.43",
|
||||
"mqtt": "4.3.7",
|
||||
"multer": "1.4.5-lts.1",
|
||||
"mustache": "4.2.0",
|
||||
"node-red-admin": "^2.2.0",
|
||||
"node-red-admin": "^3.1.0",
|
||||
"node-watch": "0.7.4",
|
||||
"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",
|
||||
"semver": "7.3.5",
|
||||
"tar": "6.1.0",
|
||||
"tough-cookie": "4.0.0",
|
||||
"uglify-js": "3.13.10",
|
||||
"uuid": "8.3.2",
|
||||
"ws": "7.5.1",
|
||||
"xml2js": "0.4.23"
|
||||
"raw-body": "2.5.2",
|
||||
"semver": "7.5.4",
|
||||
"tar": "6.1.13",
|
||||
"tough-cookie": "4.1.3",
|
||||
"uglify-js": "3.17.4",
|
||||
"uuid": "9.0.0",
|
||||
"ws": "7.5.6",
|
||||
"xml2js": "0.6.2"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"bcrypt": "5.0.1"
|
||||
"bcrypt": "5.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"dompurify": "2.2.9",
|
||||
"grunt": "1.4.1",
|
||||
"dompurify": "2.4.1",
|
||||
"grunt": "1.6.1",
|
||||
"grunt-chmod": "~1.1.1",
|
||||
"grunt-cli": "~1.4.3",
|
||||
"grunt-concurrent": "3.0.0",
|
||||
"grunt-contrib-clean": "~2.0.0",
|
||||
"grunt-contrib-clean": "2.0.1",
|
||||
"grunt-contrib-compress": "2.0.0",
|
||||
"grunt-contrib-concat": "~1.0.1",
|
||||
"grunt-contrib-copy": "~1.0.0",
|
||||
"grunt-contrib-jshint": "3.0.0",
|
||||
"grunt-contrib-uglify": "5.0.1",
|
||||
"grunt-contrib-watch": "~1.1.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": "6.0.0",
|
||||
"grunt-jsonlint": "2.1.3",
|
||||
|
@ -104,22 +105,23 @@
|
|||
"grunt-sass": "~3.1.0",
|
||||
"grunt-simple-mocha": "~0.4.1",
|
||||
"grunt-simple-nyc": "^3.0.1",
|
||||
"i18next-http-backend": "1.2.6",
|
||||
"i18next-http-backend": "1.4.1",
|
||||
"jquery-i18next": "1.2.1",
|
||||
"jsdoc-nr-template": "github:node-red/jsdoc-nr-template",
|
||||
"marked": "2.1.3",
|
||||
"marked": "4.3.0",
|
||||
"mermaid": "^10.4.0",
|
||||
"minami": "1.2.3",
|
||||
"mocha": "9.0.1",
|
||||
"node-red-node-test-helper": "^0.2.7",
|
||||
"nodemon": "2.0.8",
|
||||
"mocha": "9.2.2",
|
||||
"node-red-node-test-helper": "^0.3.2",
|
||||
"nodemon": "2.0.20",
|
||||
"proxy": "^1.0.2",
|
||||
"sass": "1.35.1",
|
||||
"sass": "1.62.1",
|
||||
"should": "13.2.3",
|
||||
"sinon": "11.1.1",
|
||||
"sinon": "11.1.2",
|
||||
"stoppable": "^1.1.0",
|
||||
"supertest": "6.1.3"
|
||||
"supertest": "6.3.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
"node": ">=14"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,8 +14,6 @@
|
|||
* limitations under the License.
|
||||
**/
|
||||
|
||||
var express = require("express");
|
||||
|
||||
var nodes = require("./nodes");
|
||||
var flows = require("./flows");
|
||||
var flow = require("./flow");
|
||||
|
@ -23,6 +21,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,24 +33,22 @@ 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]);
|
||||
}
|
||||
const needsPermission = auth.needsPermission;
|
||||
|
||||
const adminApp = apiUtil.createExpressApp(settings)
|
||||
|
||||
// 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);
|
||||
|
@ -95,6 +92,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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,9 +106,15 @@ async 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;
|
||||
}
|
||||
|
@ -141,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);
|
||||
});
|
||||
|
@ -173,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;
|
||||
|
@ -205,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
|
||||
);
|
||||
|
||||
}
|
||||
|
@ -216,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,
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -46,14 +46,15 @@ module.exports = {
|
|||
runtimeAPI = _runtimeAPI;
|
||||
needsPermission = auth.needsPermission;
|
||||
if (!settings.disableEditor) {
|
||||
info.init(runtimeAPI);
|
||||
info.init(settings, runtimeAPI);
|
||||
comms.init(server,settings,runtimeAPI);
|
||||
|
||||
var ui = require("./ui");
|
||||
|
||||
ui.init(runtimeAPI);
|
||||
|
||||
var editorApp = express();
|
||||
const editorApp = apiUtil.createExpressApp(settings)
|
||||
|
||||
if (settings.requireHttps === true) {
|
||||
editorApp.enable('trust proxy');
|
||||
editorApp.use(function (req, res, next) {
|
||||
|
@ -86,7 +87,7 @@ module.exports = {
|
|||
|
||||
//Projects
|
||||
var projects = require("./projects");
|
||||
projects.init(runtimeAPI);
|
||||
projects.init(settings, runtimeAPI);
|
||||
editorApp.use("/projects",projects.app());
|
||||
|
||||
// Locales
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
* limitations under the License.
|
||||
**/
|
||||
|
||||
var express = require("express");
|
||||
var apiUtils = require("../util");
|
||||
|
||||
var settings;
|
||||
var runtimeAPI;
|
||||
var needsPermission = require("../auth").needsPermission;
|
||||
|
||||
|
@ -77,11 +77,12 @@ function getProjectRemotes(req,res) {
|
|||
})
|
||||
}
|
||||
module.exports = {
|
||||
init: function(_runtimeAPI) {
|
||||
init: function(_settings, _runtimeAPI) {
|
||||
settings = _settings;
|
||||
runtimeAPI = _runtimeAPI;
|
||||
},
|
||||
app: function() {
|
||||
var app = express();
|
||||
var app = apiUtils.createExpressApp(settings)
|
||||
|
||||
app.use(function(req,res,next) {
|
||||
runtimeAPI.projects.available().then(function(available) {
|
||||
|
@ -122,6 +123,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) {
|
||||
|
|
|
@ -18,9 +18,9 @@ var runtimeAPI;
|
|||
var sshkeys = require("./sshkeys");
|
||||
|
||||
module.exports = {
|
||||
init: function(_runtimeAPI) {
|
||||
init: function(settings, _runtimeAPI) {
|
||||
runtimeAPI = _runtimeAPI;
|
||||
sshkeys.init(runtimeAPI);
|
||||
sshkeys.init(settings, runtimeAPI);
|
||||
},
|
||||
userSettings: function(req, res) {
|
||||
var opts = {
|
||||
|
|
|
@ -17,21 +17,15 @@
|
|||
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;
|
||||
}
|
||||
var settings;
|
||||
|
||||
module.exports = {
|
||||
init: function(_runtimeAPI) {
|
||||
init: function(_settings, _runtimeAPI) {
|
||||
runtimeAPI = _runtimeAPI;
|
||||
settings = _settings;
|
||||
},
|
||||
app: function() {
|
||||
var app = express();
|
||||
const app = apiUtils.createExpressApp(settings);
|
||||
|
||||
// List all SSH keys
|
||||
app.get("/", function(req,res) {
|
||||
|
|
|
@ -19,23 +19,28 @@ var util = require("util");
|
|||
var path = require("path");
|
||||
var fs = require("fs");
|
||||
var clone = require("clone");
|
||||
const apiUtil = require("../util")
|
||||
|
||||
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"
|
||||
}
|
||||
},
|
||||
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: ""
|
||||
}
|
||||
};
|
||||
var settings;
|
||||
|
||||
var theme = null;
|
||||
var themeContext = clone(defaultContext);
|
||||
|
@ -74,7 +79,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;
|
||||
}
|
||||
}
|
||||
|
@ -88,12 +93,20 @@ function serveFilesFromTheme(themeValue, themeApp, directory, baseDirectory) {
|
|||
}
|
||||
|
||||
module.exports = {
|
||||
init: function(settings, _runtimeAPI) {
|
||||
init: function(_settings, _runtimeAPI) {
|
||||
settings = _settings;
|
||||
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 = ((theme.codeEditor || {}).lib === "monaco") ? "vendor/monaco/monaco-bootstrap.js" : "";
|
||||
themeContext.asset.vendorMonaco = "vendor/monaco/monaco-bootstrap.js"
|
||||
if (theme.codeEditor && theme.codeEditor.lib === 'ace') {
|
||||
themeContext.asset.vendorMonaco = ''
|
||||
}
|
||||
activeTheme = theme.theme;
|
||||
},
|
||||
|
||||
|
@ -102,7 +115,15 @@ module.exports = {
|
|||
var url;
|
||||
themeSettings = {};
|
||||
|
||||
themeApp = express();
|
||||
themeApp = apiUtil.createExpressApp(settings);
|
||||
|
||||
const defaultServerSettings = {
|
||||
"x-powered-by": false
|
||||
}
|
||||
const serverSettings = Object.assign({},defaultServerSettings,settings.httpServerOptions||{});
|
||||
for (const eOption in serverSettings) {
|
||||
themeApp.set(eOption, serverSettings[eOption]);
|
||||
}
|
||||
|
||||
if (theme.page) {
|
||||
|
||||
|
@ -123,9 +144,13 @@ 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
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -216,6 +241,11 @@ module.exports = {
|
|||
if (theme.theme) {
|
||||
themeSettings.theme = theme.theme;
|
||||
}
|
||||
|
||||
if (theme.hasOwnProperty("tours")) {
|
||||
themeSettings.tours = theme.tours;
|
||||
}
|
||||
|
||||
return themeApp;
|
||||
},
|
||||
context: async function() {
|
||||
|
@ -246,6 +276,69 @@ module.exports = {
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -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'))
|
||||
};
|
||||
|
|
|
@ -37,7 +37,6 @@ var adminApp;
|
|||
var server;
|
||||
var editor;
|
||||
|
||||
|
||||
/**
|
||||
* Initialise the module.
|
||||
* @param {Object} settings The runtime settings
|
||||
|
@ -49,7 +48,7 @@ var editor;
|
|||
function init(settings,_server,storage,runtimeAPI) {
|
||||
server = _server;
|
||||
if (settings.httpAdminRoot !== false) {
|
||||
adminApp = express();
|
||||
adminApp = apiUtil.createExpressApp(settings);
|
||||
|
||||
var cors = require('cors');
|
||||
var corsHandler = cors({
|
||||
|
@ -64,14 +63,6 @@ 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';
|
||||
|
@ -90,6 +81,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);
|
||||
}
|
||||
|
@ -134,10 +127,11 @@ async function stop() {
|
|||
editor.stop();
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
init: init,
|
||||
start: start,
|
||||
stop: stop,
|
||||
init,
|
||||
start,
|
||||
stop,
|
||||
|
||||
/**
|
||||
* @memberof @node-red/editor-api
|
||||
|
|
|
@ -14,10 +14,9 @@
|
|||
* limitations under the License.
|
||||
**/
|
||||
|
||||
const express = require("express");
|
||||
|
||||
var log = require("@node-red/util").log; // TODO: separate module
|
||||
var i18n = require("@node-red/util").i18n; // TODO: separate module
|
||||
|
||||
const { log, i18n } = require("@node-red/util");
|
||||
|
||||
module.exports = {
|
||||
errorHandler: function(err,req,res,next) {
|
||||
|
@ -64,5 +63,17 @@ module.exports = {
|
|||
path: req.path,
|
||||
ip: (req.headers && req.headers['x-forwarded-for']) || (req.connection && req.connection.remoteAddress) || undefined
|
||||
}
|
||||
},
|
||||
createExpressApp: function(settings) {
|
||||
const app = express();
|
||||
|
||||
const defaultServerSettings = {
|
||||
"x-powered-by": false
|
||||
}
|
||||
const serverSettings = Object.assign({},defaultServerSettings,settings.httpServerOptions||{});
|
||||
for (let eOption in serverSettings) {
|
||||
app.set(eOption, serverSettings[eOption]);
|
||||
}
|
||||
return app
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@node-red/editor-api",
|
||||
"version": "2.0.1",
|
||||
"version": "3.1.0",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./lib/index.js",
|
||||
"repository": {
|
||||
|
@ -16,25 +16,25 @@
|
|||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"@node-red/util": "2.0.1",
|
||||
"@node-red/editor-client": "2.0.1",
|
||||
"@node-red/util": "3.1.0",
|
||||
"@node-red/editor-client": "3.1.0",
|
||||
"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.2",
|
||||
"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": "7.5.1"
|
||||
"passport": "0.6.0",
|
||||
"ws": "7.5.6"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"bcrypt": "5.0.1"
|
||||
"bcrypt": "5.1.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
@ -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": "Wä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"
|
||||
}
|
||||
}
|
||||
|
|
0
packages/node_modules/@node-red/editor-client/locales/de/infotips.json
vendored
Executable file → Normal file
2
packages/node_modules/@node-red/editor-client/locales/de/jsonata.json
vendored
Executable file → Normal file
|
@ -205,7 +205,7 @@
|
|||
},
|
||||
"$formatNumber": {
|
||||
"args": "number, picture [, options]",
|
||||
"desc": "Wandelt `number` in eine Zeichenfolge um und formatiert sie in eine dezimale Darstellung, wie im `picture`-String-Parameter vorgegeben.\n\nDas Verhalten dieser Funktion ist mit der XPath/XQuery-Funktion fn:formatnummer konsistent, wie sie in der XPath F&O 3.1-Spezifikation definiert ist. Der `picture`-String-Parameter definiert, wie die Zahl formatiert ist und hat die gleiche Syntax wie fn:format-number.\n\nDer optionale dritte Parameter `options` wird verwendet, um die standardmäßigen länderspezifischen Formatierungszeichen, wie z.B. das Dezimaltrennzeichen, zu überschreiben. Wenn dieser Parameter vorgegeben wird, muss es sich um ein Objekt handeln, das Name/Wert-Paare enthält, die im Abschnitt mit dem Dezimalformat der XPath F&O 3.1-Spezifikation vorgegeben sind."
|
||||
"desc": "Wandelt `number` in eine Zeichenfolge um und formatiert sie in eine dezimale Darstellung, wie im `picture`-String-Parameter vorgegeben.\n\nDas Verhalten dieser Funktion ist mit der XPath/XQuery-Funktion `fn:formatnummer` konsistent, wie sie in der XPath F&O 3.1-Spezifikation definiert ist. Der `picture`-String-Parameter definiert, wie die Zahl formatiert ist und hat die gleiche Syntax wie `fn:format-number`.\n\nDer optionale dritte Parameter `options` wird verwendet, um die standardmäßigen länderspezifischen Formatierungszeichen, wie z.B. das Dezimaltrennzeichen, zu überschreiben. Wenn dieser Parameter vorgegeben wird, muss es sich um ein Objekt handeln, das Name/Wert-Paare enthält, die im Abschnitt mit dem Dezimalformat der XPath F&O 3.1-Spezifikation vorgegeben sind."
|
||||
},
|
||||
"$formatBase": {
|
||||
"args": "number [, radix]",
|
||||
|
|
228
packages/node_modules/@node-red/editor-client/locales/en-US/editor.json
vendored
Executable file → Normal 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,9 +127,10 @@
|
|||
"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",
|
||||
|
@ -116,14 +142,31 @@
|
|||
"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__",
|
||||
|
@ -139,6 +182,10 @@
|
|||
}
|
||||
},
|
||||
"notification": {
|
||||
"state": {
|
||||
"flowsStopped": "Flows stopped",
|
||||
"flowsStarted": "Flows started"
|
||||
},
|
||||
"warning": "<strong>Warning</strong>: __message__",
|
||||
"warnings": {
|
||||
"undeployedChanges": "node has undeployed changes",
|
||||
|
@ -146,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>",
|
||||
|
@ -187,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": {
|
||||
|
@ -226,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",
|
||||
|
@ -265,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"
|
||||
},
|
||||
|
@ -318,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",
|
||||
|
@ -362,6 +416,7 @@
|
|||
},
|
||||
"errors": {
|
||||
"noNodesSelected": "<strong>Cannot create subflow</strong>: no nodes selected",
|
||||
"acrossMultipleGroups": "Cannot create subflow across multiple groups",
|
||||
"multipleInputsToSelection": "<strong>Cannot create subflow</strong>: multiple inputs to selection"
|
||||
}
|
||||
},
|
||||
|
@ -403,7 +458,7 @@
|
|||
"inputType": "Input type",
|
||||
"selectType": "select types...",
|
||||
"loadCredentials": "Loading node credentials",
|
||||
"inputs" : {
|
||||
"inputs": {
|
||||
"input": "input",
|
||||
"select": "select",
|
||||
"checkbox": "checkbox",
|
||||
|
@ -450,11 +505,14 @@
|
|||
"unassigned": "Unassigned",
|
||||
"global": "global",
|
||||
"workspace": "workspace",
|
||||
"selectAll": "Select all nodes",
|
||||
"selectAllConnected": "Select all connected nodes",
|
||||
"editor": "edit dialog",
|
||||
"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)",
|
||||
|
@ -464,10 +522,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",
|
||||
|
@ -519,11 +581,13 @@
|
|||
"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",
|
||||
"palette": "Palette",
|
||||
"allCatalogs": "All Catalogs",
|
||||
"times": {
|
||||
"seconds": "seconds ago",
|
||||
"minutes": "minutes ago",
|
||||
|
@ -563,6 +627,7 @@
|
|||
"tab-nodes": "Nodes",
|
||||
"tab-install": "Install",
|
||||
"sort": "sort:",
|
||||
"sortRelevance": "relevance",
|
||||
"sortAZ": "a-z",
|
||||
"sortRecent": "recent",
|
||||
"more": "+ __count__ more",
|
||||
|
@ -578,19 +643,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",
|
||||
|
@ -624,26 +689,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",
|
||||
|
@ -653,7 +715,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",
|
||||
|
@ -669,8 +732,8 @@
|
|||
"filtered": "__count__ hidden"
|
||||
},
|
||||
"context": {
|
||||
"name":"Context Data",
|
||||
"label":"context",
|
||||
"name": "Context Data",
|
||||
"label": "context",
|
||||
"none": "none selected",
|
||||
"refresh": "refresh to load",
|
||||
"empty": "empty",
|
||||
|
@ -708,9 +771,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",
|
||||
|
@ -864,8 +927,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",
|
||||
|
@ -883,6 +958,9 @@
|
|||
"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__"
|
||||
}
|
||||
},
|
||||
|
@ -900,6 +978,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",
|
||||
|
@ -926,13 +1006,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",
|
||||
|
@ -1061,7 +1144,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?"
|
||||
|
@ -1093,7 +1177,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"
|
||||
|
@ -1108,13 +1192,49 @@
|
|||
"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-expr": "Invalid JSONata expression: __error__",
|
||||
"invalid-prop": "Invalid property expression",
|
||||
"invalid-num": "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"
|
||||
}
|
||||
}
|
||||
|
|
38
packages/node_modules/@node-red/editor-client/locales/en-US/infotips.json
vendored
Executable file → Normal 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"
|
||||
}
|
||||
}
|
||||
|
|
102
packages/node_modules/@node-red/editor-client/locales/en-US/jsonata.json
vendored
Executable file → Normal file
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"$string": {
|
||||
"args": "arg[, prettify]",
|
||||
"desc": "Casts the `arg` parameter to a string using the following casting rules:\n\n - Strings are unchanged\n - Functions are converted to an empty string\n - Numeric infinity and NaN throw an error because they cannot be represented as a JSON number\n - All other values are converted to a JSON string using the `JSON.stringify` function. If `prettify` is true, then \"prettified\" JSON is produced. i.e One line per field and lines will be indented based on the field depth."
|
||||
"desc": "Casts the `arg` parameter to a string using the following casting rules:\n\n - Strings are unchanged\n - Functions are converted to an empty string\n - Numeric infinity and NaN throw an error because they cannot be represented as a JSON number\n - All other values are converted to a JSON string using the `JSON.stringify` function. If `prettify` is true, then \"prettified\" JSON is produced. i.e One line per field and lines will be indented based on the field depth."
|
||||
},
|
||||
"$length": {
|
||||
"args": "str",
|
||||
|
@ -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":"$[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"
|
||||
"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]",
|
||||
|
@ -201,11 +201,11 @@
|
|||
},
|
||||
"$fromMillis": {
|
||||
"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."
|
||||
"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 according 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]",
|
||||
"desc": "Casts the `number` to a string and formats it to a decimal representation as specified by the `picture` string.\n\n The behaviour of this function is consistent with the XPath/XQuery function fn:format-number as defined in the XPath F&O 3.1 specification. The picture string parameter defines how the number is formatted and has the same syntax as fn:format-number.\n\nThe optional third argument `options` is used to override the default locale specific formatting characters such as the decimal separator. If supplied, this argument must be an object containing name/value pairs specified in the decimal format section of the XPath F&O 3.1 specification."
|
||||
"desc": "Casts the `number` to a string and formats it to a decimal representation as specified by the `picture` string.\n\n The behaviour of this function is consistent with the XPath/XQuery function `fn:format-number` as defined in the XPath F&O 3.1 specification. The `picture` string parameter defines how the number is formatted and has the same syntax as `fn:format-number`.\n\nThe optional third argument `options` is used to override the default locale specific formatting characters such as the decimal separator. If supplied, this argument must be an object containing name/value pairs specified in the decimal format section of the XPath F&O 3.1 specification."
|
||||
},
|
||||
"$formatBase": {
|
||||
"args": "number [, radix]",
|
||||
|
@ -233,15 +233,15 @@
|
|||
},
|
||||
"$error": {
|
||||
"args": "[str]",
|
||||
"desc": "Throws an error with a message. The optional `str` will replace the default message of `$error() function evaluated`"
|
||||
"desc": "Throws an error with a message. The optional `str` will replace the default message of `$error() function evaluated`"
|
||||
},
|
||||
"$assert": {
|
||||
"args": "arg, str",
|
||||
"desc": "If `arg` is true the function returns undefined. If `arg` is false an exception is thrown with `str` as the message of the exception."
|
||||
"desc": "If `arg` is `true` the function returns `undefined`. If `arg` is `false` an exception is thrown with `str` as the message of the exception."
|
||||
},
|
||||
"$single": {
|
||||
"args": "array, function",
|
||||
"desc": "Returns the one and only value in the `array` parameter that satisfies the `function` predicate (i.e. the `function` returns Boolean `true` when passed the value). Throws an exception if the number of matching values is not exactly one.\n\nThe function should be supplied in the following signature: `function(value [, index [, array]])` where value is each input of the array, index is the position of that value and the whole array is passed as the third argument"
|
||||
"desc": "Returns the one and only value in the `array` parameter that satisfies the `function` predicate (i.e. the `function` returns Boolean `true` when passed the value). Throws an exception if the number of matching values is not exactly one.\n\nThe function should be supplied in the following signature: `function(value [, index [, array]])` where value is each input of the array, index is the position of that value and the whole array is passed as the third argument"
|
||||
},
|
||||
"$encodeUrlComponent": {
|
||||
"args": "str",
|
||||
|
@ -249,15 +249,15 @@
|
|||
},
|
||||
"$encodeUrl": {
|
||||
"args": "str",
|
||||
"desc": "Encodes a Uniform Resource Locator (URL) by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character. \n\nExample: `$encodeUrl(\"https://mozilla.org/?x=шеллы\")` => `\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\"`"
|
||||
"desc": "Encodes a Uniform Resource Locator (URL) by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character.\n\nExample: `$encodeUrl(\"https://mozilla.org/?x=шеллы\")` => `\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\"`"
|
||||
},
|
||||
"$decodeUrlComponent": {
|
||||
"args": "str",
|
||||
"desc": "Decodes a Uniform Resource Locator (URL) component previously created by encodeUrlComponent. \n\nExample: `$decodeUrlComponent(\"%3Fx%3Dtest\")` => `\"?x=test\"`"
|
||||
"desc": "Decodes a Uniform Resource Locator (URL) component previously created by encodeUrlComponent.\n\nExample: `$decodeUrlComponent(\"%3Fx%3Dtest\")` => `\"?x=test\"`"
|
||||
},
|
||||
"$decodeUrl": {
|
||||
"args": "str",
|
||||
"desc": "Decodes a Uniform Resource Locator (URL) previously created by encodeUrl. \n\nExample: `$decodeUrl(\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\")` => `\"https://mozilla.org/?x=шеллы\"`"
|
||||
"desc": "Decodes a Uniform Resource Locator (URL) previously created by encodeUrl.\n\nExample: `$decodeUrl(\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\")` => `\"https://mozilla.org/?x=шеллы\"`"
|
||||
},
|
||||
"$distinct": {
|
||||
"args": "array",
|
||||
|
@ -270,5 +270,9 @@
|
|||
"$moment": {
|
||||
"args": "[str]",
|
||||
"desc": "Gets a date object using the Moment library."
|
||||
},
|
||||
"$clone": {
|
||||
"args": "value",
|
||||
"desc": "Safely clone an object."
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,278 @@
|
|||
{
|
||||
"$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<object>",
|
||||
"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."
|
||||
},
|
||||
"$clone": {
|
||||
"args": "valeur",
|
||||
"desc": "Cloner un objet en toute sécurité."
|
||||
}
|
||||
}
|
|
@ -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,6 +130,7 @@
|
|||
"editPalette": "パレットの管理",
|
||||
"other": "その他",
|
||||
"showTips": "ヒントを表示",
|
||||
"showWelcomeTours": "新バージョンのガイドツアーを表示",
|
||||
"help": "Node-REDウェブサイト",
|
||||
"projects": "プロジェクト",
|
||||
"projects-new": "新規",
|
||||
|
@ -116,14 +142,31 @@
|
|||
"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__ としてログインしました",
|
||||
|
@ -139,6 +182,10 @@
|
|||
}
|
||||
},
|
||||
"notification": {
|
||||
"state": {
|
||||
"flowsStopped": "フローを停止しました",
|
||||
"flowsStarted": "フローを開始しました"
|
||||
},
|
||||
"warning": "<strong>警告</strong>: __message__",
|
||||
"warnings": {
|
||||
"undeployedChanges": "ノードの変更をデプロイしていません",
|
||||
|
@ -187,7 +234,8 @@
|
|||
"create-default-package": "デフォルトパッケージファイルの作成",
|
||||
"no-thanks": "不要",
|
||||
"create-default-project": "デフォルトプロジェクトファイルの作成",
|
||||
"show-merge-conflicts": "マージ競合を表示"
|
||||
"show-merge-conflicts": "マージ競合を表示",
|
||||
"unknownNodesButton": "不明なノードを検索する"
|
||||
}
|
||||
},
|
||||
"clipboard": {
|
||||
|
@ -265,13 +313,19 @@
|
|||
"modifiedFlowsDesc": "変更したノードを含むフローのみデプロイ",
|
||||
"modifiedNodes": "変更したノード",
|
||||
"modifiedNodesDesc": "変更したノードのみデプロイ",
|
||||
"startFlows": "開始",
|
||||
"startFlowsDesc": "フローを開始",
|
||||
"stopFlows": "停止",
|
||||
"stopFlowsDesc": "フローを停止",
|
||||
"restartFlows": "フローを再起動",
|
||||
"restartFlowsDesc": "デプロイされた現在のフローを再起動",
|
||||
"successfulDeploy": "デプロイが成功しました",
|
||||
"successfulRestart": "フローの再起動が成功しました",
|
||||
"deployFailed": "デプロイが失敗しました: __message__",
|
||||
"unusedConfigNodes": "使われていない設定ノードがあります。",
|
||||
"unusedConfigNodesLink": "設定を参照する",
|
||||
"unusedConfigNodesButton": "未使用の構成ノードを検索",
|
||||
"unknownNodesButton": "不明なノードを検索する",
|
||||
"invalidNodesButton": "無効なノードを検索する",
|
||||
"errors": {
|
||||
"noResponse": "サーバの応答がありません"
|
||||
},
|
||||
|
@ -362,6 +416,7 @@
|
|||
},
|
||||
"errors": {
|
||||
"noNodesSelected": "<strong>サブフローを作成できません</strong>: ノードが選択されていません",
|
||||
"acrossMultipleGroups": "複数のグループをまたがるサブフローは作成できません",
|
||||
"multipleInputsToSelection": "<strong>サブフローを作成できません</strong>: 複数の入力が選択されています"
|
||||
}
|
||||
},
|
||||
|
@ -450,24 +505,31 @@
|
|||
"unassigned": "未割当",
|
||||
"global": "グローバル",
|
||||
"workspace": "ワークスペース",
|
||||
"editor": "編集ダイアログ",
|
||||
"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": "ライブラリ",
|
||||
|
@ -519,11 +581,13 @@
|
|||
"nodeEnabled_plural": "ノードを有効化しました:",
|
||||
"nodeDisabled": "ノードを無効化しました:",
|
||||
"nodeDisabled_plural": "ノードを無効化しました:",
|
||||
"nodeUpgraded": "ノードモジュール __module__ をバージョン __version__ へ更新しました"
|
||||
"nodeUpgraded": "ノードモジュール __module__ をバージョン __version__ へ更新しました",
|
||||
"unknownNodeRegistered": "ノードの読み込みエラー: <ul><li>__type__<br>__error__</li></ul>"
|
||||
},
|
||||
"editor": {
|
||||
"title": "パレットの管理",
|
||||
"palette": "パレット",
|
||||
"allCatalogs": "全カタログ",
|
||||
"times": {
|
||||
"seconds": "数秒前",
|
||||
"minutes": "数分前",
|
||||
|
@ -563,6 +627,7 @@
|
|||
"tab-nodes": "現在のノード",
|
||||
"tab-install": "ノードを追加",
|
||||
"sort": "並べ替え:",
|
||||
"sortRelevance": "関連順",
|
||||
"sortAZ": "辞書順",
|
||||
"sortRecent": "日付順",
|
||||
"more": "+ さらに __count__ 個",
|
||||
|
@ -637,13 +702,10 @@
|
|||
"globalConfig": "グローバル設定ノード",
|
||||
"triggerAction": "アクションを実行",
|
||||
"find": "ワークスペース内を検索",
|
||||
"search": {
|
||||
"configNodes": "設定ノード",
|
||||
"unusedConfigNodes": "未使用の設定ノード",
|
||||
"invalidNodes": "不正なノード",
|
||||
"uknownNodes": "未知のノード",
|
||||
"unusedSubflows": "未使用のサブフロー"
|
||||
}
|
||||
"copyItemUrl": "要素のURLをコピー",
|
||||
"copyURL2Clipboard": "URLをクリップボードにコピーしました",
|
||||
"showFlow": "表示",
|
||||
"hideFlow": "非表示"
|
||||
},
|
||||
"help": {
|
||||
"name": "ヘルプ",
|
||||
|
@ -653,7 +715,8 @@
|
|||
"showHelp": "ヘルプを表示",
|
||||
"showInOutline": "アウトラインに表示",
|
||||
"showTopics": "トピックを表示",
|
||||
"noHelp": "ヘルプのトピックが未選択"
|
||||
"noHelp": "ヘルプのトピックが未選択",
|
||||
"changeLog": "更新履歴"
|
||||
},
|
||||
"config": {
|
||||
"name": "設定ノードを表示",
|
||||
|
@ -813,7 +876,7 @@
|
|||
"pushFailed": "リモートに新しいコミットがあるため、プッシュに失敗しました。プルしてマージしてから、再度プッシュしてください。",
|
||||
"push": "プッシュ",
|
||||
"pull": "プル",
|
||||
"unablePull": "<p>リモートの変更のプル失敗:ステージングされていないローカルの変更を上書きされてしまいます。</p><p>変更をコミットしてから再度実行してください。</p>",
|
||||
"unablePull": "<p>リモートの変更のプル失敗:ステージングされていないローカルの変更が上書きされてしまいます。</p><p>変更をコミットしてから再度実行してください。</p>",
|
||||
"showUnstagedChanges": "ステージングされていない変更を表示",
|
||||
"connectionFailed": "リモートリポジトリに接続できません: ",
|
||||
"pullUnrelatedHistory": "<p>リモートに関連のないコミット履歴があります。</p><p>本当に変更をプルしてローカルリポジトリに反映しますか?</p>",
|
||||
|
@ -864,8 +927,20 @@
|
|||
"addTitle": "要素を追加"
|
||||
},
|
||||
"search": {
|
||||
"history": "検索履歴",
|
||||
"clear": "全て削除",
|
||||
"empty": "一致したものが見つかりませんでした",
|
||||
"addNode": "ノードを追加..."
|
||||
"addNode": "ノードを追加...",
|
||||
"options": {
|
||||
"configNodes": "設定ノード",
|
||||
"unusedConfigNodes": "未使用の設定ノード",
|
||||
"invalidNodes": "不正なノード",
|
||||
"uknownNodes": "未知のノード",
|
||||
"unusedSubflows": "未使用のサブフロー",
|
||||
"hiddenFlows": "非表示のフロー",
|
||||
"modifiedNodes": "修正したノードやフロー",
|
||||
"thisFlow": "現在のフロー"
|
||||
}
|
||||
},
|
||||
"expressionEditor": {
|
||||
"functions": "関数",
|
||||
|
@ -882,8 +957,11 @@
|
|||
"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": {
|
||||
|
@ -900,6 +978,8 @@
|
|||
"format": "JSONフォーマット",
|
||||
"rawMode": "JSONを編集",
|
||||
"uiMode": "ビジュアルエディタ",
|
||||
"rawMode-readonly": "JSON",
|
||||
"uiMode-readonly": "ビジュアル",
|
||||
"insertAbove": "上に挿入",
|
||||
"insertBelow": "下に挿入",
|
||||
"addItem": "要素を追加",
|
||||
|
@ -926,7 +1006,10 @@
|
|||
"quote": "引用",
|
||||
"link": "リンク",
|
||||
"horizontal-rule": "区切り線",
|
||||
"toggle-preview": "プレビュー表示切替え"
|
||||
"toggle-preview": "プレビュー表示切替え",
|
||||
"mermaid": {
|
||||
"summary": "Mermaid図"
|
||||
}
|
||||
},
|
||||
"bufferEditor": {
|
||||
"title": "バッファエディタ",
|
||||
|
@ -1061,7 +1144,8 @@
|
|||
"not-git": "Gitリポジトリではありません",
|
||||
"no-resource": "リポジトリが見つかりません",
|
||||
"cant-get-ssh-key-path": "エラー! 選択したSSHキーのパスを取得できません。",
|
||||
"unexpected_error": "予期しないエラー"
|
||||
"unexpected_error": "予期しないエラー",
|
||||
"clearContext": "プロジェクトを切り替る際にコンテキストを初期化"
|
||||
},
|
||||
"delete": {
|
||||
"confirm": "プロジェクトを削除しても良いですか?"
|
||||
|
@ -1108,13 +1192,202 @@
|
|||
"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-prop": "プロパティ式が不正",
|
||||
"invalid-num": "数値が不正",
|
||||
"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": "ノードのヘルプを表示"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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}} を押すとプロパティ設定画面が表示されます。"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
},
|
||||
"$now": {
|
||||
"args": "$[picture [, timezone]]",
|
||||
"desc": "ISO 8601互換形式の時刻を生成し、文字列として返します。pictureおよびtimezoneパラメータが指定されている場合、現在時刻を`$fromMillis()`関数の説明に従ってフォーマットします。"
|
||||
"desc": "ISO 8601互換形式の時刻を生成し、文字列として返します。`picture` および `timezone` パラメータが指定されている場合、現在時刻を `$fromMillis()` 関数の説明に従ってフォーマットします。"
|
||||
},
|
||||
"$base64encode": {
|
||||
"args": "string",
|
||||
|
@ -117,11 +117,11 @@
|
|||
},
|
||||
"$boolean": {
|
||||
"args": "arg",
|
||||
"desc": "以下のルールを用いて、ブーリアン型へ型変換します。:\n\n - `Boolean` : 変換しない\n - `string`: 空 : `false`\n - `string`: 空でない : `true`\n - `number`: `0` : `false`\n - `number`: 0でない : `true`\n - `null` : `false`\n - `array`: 空 : `false`\n - `array`: `true` に型変換された要素を持つ: `true`\n - `array`: 全ての要素が `false` に型変換: `false`\n - `object`: 空 : `false`\n - `object`: 空でない : `true`\n - `function` : `false`"
|
||||
"desc": "以下のルールを用いて、真偽型へ型変換します。:\n\n - `Boolean` : 変換しない\n - `string`: 空 : `false`\n - `string`: 空でない : `true`\n - `number`: `0` : `false`\n - `number`: 0でない : `true`\n - `null` : `false`\n - `array`: 空 : `false`\n - `array`: `true` に型変換された要素を持つ: `true`\n - `array`: 全ての要素が `false` に型変換: `false`\n - `object`: 空 : `false`\n - `object`: 空でない : `true`\n - `function` : `false`"
|
||||
},
|
||||
"$not": {
|
||||
"args": "arg",
|
||||
"desc": "引数の否定をブーリアン型で返します。 `arg` は最初にブーリアン型に型変換されます。"
|
||||
"desc": "引数の否定を真偽型で返します。 `arg` は最初に真偽型に型変換されます。"
|
||||
},
|
||||
"$exists": {
|
||||
"args": "arg",
|
||||
|
@ -137,7 +137,7 @@
|
|||
},
|
||||
"$sort": {
|
||||
"args": "array [, function]",
|
||||
"desc": "配列 `array` 内の値を並び変えた配列を返します。\n\n比較関数 `function` を用いる場合、比較関数は以下のとおり2つの引数を持つ必要があります。\n\n`function(left, right)`\n\n比較関数は、leftとrightの2つの値を比較するために、値を並び替える処理で呼び出されます。もし、求められる並び順にてleftの値をrightの値より後ろに置きたい場合は、比較関数は置き換えを表すブーリアン型の `true` を返す必要があります。一方、置き換えが不要の場合は `false` を返す必要があります。"
|
||||
"desc": "配列 `array` 内の値を並び変えた配列を返します。\n\n比較関数 `function` を用いる場合、比較関数は以下のとおり2つの引数を持つ必要があります。\n\n`function(left, right)`\n\n比較関数は、`left` と `right` の2つの値を比較するために、値を並び替える処理で呼び出されます。もし、求められる並び順にて `left` の値を `right` の値より後ろに置きたい場合は、比較関数は置き換えを表す真偽型の `true` を返す必要があります。一方、置き換えが不要の場合は `false` を返す必要があります。"
|
||||
},
|
||||
"$reverse": {
|
||||
"args": "array",
|
||||
|
@ -205,7 +205,7 @@
|
|||
},
|
||||
"$formatNumber": {
|
||||
"args": "number, picture [, options]",
|
||||
"desc": "`number` を文字列へ変換し、文字列 `picture` に指定した数値表現になるよう書式を変更します。\n\nこの関数の動作は、XPath F&O 3.1の仕様に定義されているXPath/XQuery関数のfn:format-numberの動作と同じです。引数の文字列 picture は、fn:format-numberと同じ構文で数値の書式を定義します。\n\n任意の第三引数 `options` は、小数点記号の様な既定のロケール固有の書式設定文字を上書きするために使用します。この引数を指定する場合、XPath F&O 3.1の仕様の数値形式の項に記述されているname/valueペアを含むオブジェクトでなければなりません。"
|
||||
"desc": "`number` を文字列へ変換し、文字列 `picture` に指定した数値表現になるよう書式を変更します。\n\nこの関数の動作は、XPath F&O 3.1の仕様に定義されているXPath/XQuery関数の `fn:format-number` の動作と同じです。引数の文字列 `picture` は、 `fn:format-number` と同じ構文で数値の書式を定義します。\n\n任意の第三引数 `options` は、小数点記号の様な既定のロケール固有の書式設定文字を上書きするために使用します。この引数を指定する場合、XPath F&O 3.1の仕様の数値形式の項に記述されているname/valueペアを含むオブジェクトでなければなりません。"
|
||||
},
|
||||
"$formatBase": {
|
||||
"args": "number [, radix]",
|
||||
|
@ -237,7 +237,7 @@
|
|||
},
|
||||
"$assert": {
|
||||
"args": "arg, str",
|
||||
"desc": "`arg`が真の場合、undefinedを返します。偽の場合、`str`をメッセージとする例外を送出します。"
|
||||
"desc": "`arg`が真の場合、`undefined`を返します。偽の場合、`str`をメッセージとする例外を送出します。"
|
||||
},
|
||||
"$single": {
|
||||
"args": "array, function",
|
||||
|
@ -257,7 +257,7 @@
|
|||
},
|
||||
"$decodeUrl": {
|
||||
"args": "str",
|
||||
"desc": "encodeUrlで置換したUniform Resource Locator (URL)要素をデコードします。 \n\n例: `$decodeUrl(\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\")` => `\"https://mozilla.org/?x=шеллы\"`"
|
||||
"desc": "encodeUrlで置換したUniform Resource Locator (URL)要素をデコードします。\n\n例: `$decodeUrl(\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\")` => `\"https://mozilla.org/?x=шеллы\"`"
|
||||
},
|
||||
"$distinct": {
|
||||
"args": "array",
|
||||
|
@ -270,5 +270,9 @@
|
|||
"$moment": {
|
||||
"args": "[str]",
|
||||
"desc": "Momentライブラリを使用して日付オブジェクトを取得します。"
|
||||
},
|
||||
"$clone": {
|
||||
"args": "value",
|
||||
"desc": "オブジェクトを安全に複製します。"
|
||||
}
|
||||
}
|
||||
|
|
2005
packages/node_modules/@node-red/editor-client/locales/ko/editor.json
vendored
Executable file → Normal file
46
packages/node_modules/@node-red/editor-client/locales/ko/infotips.json
vendored
Executable file → Normal file
|
@ -1,23 +1,23 @@
|
|||
{
|
||||
"info": {
|
||||
"tip0": "{{core:delete-selection}}를 사용하여 선택된 노드나 링크를 삭제할 수 있습니다.",
|
||||
"tip1": "{{core:search}}를 활용하여 노드를 검색할 수 있습니다.",
|
||||
"tip2": "{{core:toggle-sidebar}}를 사용하여 사이드바를 표시/비표시 전환 할 수 있습니다.",
|
||||
"tip3": "{{core:manage-palette}}를 사용하여 노드 팔레트를 관리 할 수 있습니다.",
|
||||
"tip4": "플로우 안의 설정노드가 사이드바에 표시됩니다. 메뉴 혹은 {{core:show-config-tab}}를 사용하여 엑세스 할 수 있습니다.",
|
||||
"tip5": "설정에서 이 팁을 활성화/비활성화 할 수 있습니다.",
|
||||
"tip6": "[left] [up] [down] [right] 키를 사용하여 선택된 노드를 움직일 수 있습니다. [shift]키를 누른 채로 움직이면 이동폭이 늘어납니다.",
|
||||
"tip7": "노드를 와이어 사이로 드래그 하여 연결할 수도 있습니다.",
|
||||
"tip8": "{{core:show-export-dialog}}를 사용하여 선택한 노드 또는 현재탭을 내보낼 수 있습니다.",
|
||||
"tip9": "JSON파일을 에디터로 드래그하거나 {{core:show-import-dialog}}를 사용하여 플로우 가져올 수 있습니다.",
|
||||
"tip10": "[shift] [click] 하고서 드래그하여 선택한 와이어를 이동할 수 있습니다.",
|
||||
"tip11": "{{core:show-info-tab}}를 사용하여 정보탭을 표시하거나 {{core:show-debug-tab}}를 사용하여 디버그탭을 표시할 수 있습니다.",
|
||||
"tip12": "작업공간에서 [ctrl] [click]을 사용하여 빠른추가 대회상자를 열 수 있습니다.",
|
||||
"tip13": "[ctrl]을 누른 상태로 노드의 포트를 클릭하여 빠르게 연결할 수 있습니다.",
|
||||
"tip14": "[shift]를 누른 상태로 노드를 클릭하여 연결된 모든 노드를 선택할 수 있습니다.",
|
||||
"tip15": "[ctrl]을 누른 상태로 노드를 클릭하여 현재 선택영역에 노드를 추가/제거 할 수 있습니다.",
|
||||
"tip16": "{{core:show-previous-tab}}와 {{core:show-next-tab}}를 사용하여 탭을 전환할 수 있습니다.",
|
||||
"tip17": "노드 편집 창에서 {{core : confirm-edit-tray}}로 변경 사항을 확인하거나 {{core : cancel-edit-tray}}로 취소 할 수 있습니다.",
|
||||
"tip18": "{{core : edit-selected-node}}를 누르면 현재 선택 영역의 첫 번째 노드가 편집됩니다."
|
||||
}
|
||||
}
|
||||
{
|
||||
"info": {
|
||||
"tip0": "{{core:delete-selection}}를 사용하여 선택된 노드나 링크를 삭제할 수 있습니다.",
|
||||
"tip1": "{{core:search}}를 활용하여 노드를 검색할 수 있습니다.",
|
||||
"tip2": "{{core:toggle-sidebar}}를 사용하여 사이드바를 표시/비표시 전환 할 수 있습니다.",
|
||||
"tip3": "{{core:manage-palette}}를 사용하여 노드 팔레트를 관리 할 수 있습니다.",
|
||||
"tip4": "플로우 안의 설정노드가 사이드바에 표시됩니다. 메뉴 혹은 {{core:show-config-tab}}를 사용하여 엑세스 할 수 있습니다.",
|
||||
"tip5": "설정에서 이 팁을 활성화/비활성화 할 수 있습니다.",
|
||||
"tip6": "[left] [up] [down] [right] 키를 사용하여 선택된 노드를 움직일 수 있습니다. [shift]키를 누른 채로 움직이면 이동폭이 늘어납니다.",
|
||||
"tip7": "노드를 와이어 사이로 드래그 하여 연결할 수도 있습니다.",
|
||||
"tip8": "{{core:show-export-dialog}}를 사용하여 선택한 노드 또는 현재탭을 내보낼 수 있습니다.",
|
||||
"tip9": "JSON파일을 에디터로 드래그하거나 {{core:show-import-dialog}}를 사용하여 플로우 가져올 수 있습니다.",
|
||||
"tip10": "[shift] [click] 하고서 드래그하여 선택한 와이어를 이동할 수 있습니다.",
|
||||
"tip11": "{{core:show-info-tab}}를 사용하여 정보탭을 표시하거나 {{core:show-debug-tab}}를 사용하여 디버그탭을 표시할 수 있습니다.",
|
||||
"tip12": "작업공간에서 [ctrl] [click]을 사용하여 빠른추가 대회상자를 열 수 있습니다.",
|
||||
"tip13": "[ctrl]을 누른 상태로 노드의 포트를 클릭하여 빠르게 연결할 수 있습니다.",
|
||||
"tip14": "[shift]를 누른 상태로 노드를 클릭하여 연결된 모든 노드를 선택할 수 있습니다.",
|
||||
"tip15": "[ctrl]을 누른 상태로 노드를 클릭하여 현재 선택영역에 노드를 추가/제거 할 수 있습니다.",
|
||||
"tip16": "{{core:show-previous-tab}}와 {{core:show-next-tab}}를 사용하여 탭을 전환할 수 있습니다.",
|
||||
"tip17": "노드 편집 창에서 {{core : confirm-edit-tray}}로 변경 사항을 확인하거나 {{core : cancel-edit-tray}}로 취소 할 수 있습니다.",
|
||||
"tip18": "{{core : edit-selected-node}}를 누르면 현재 선택 영역의 첫 번째 노드가 편집됩니다."
|
||||
}
|
||||
}
|
||||
|
|
444
packages/node_modules/@node-red/editor-client/locales/ko/jsonata.json
vendored
Executable file → Normal file
|
@ -1,222 +1,222 @@
|
|||
{
|
||||
"$string": {
|
||||
"args": "arg",
|
||||
"desc": "다음과 같은 규칙을 사용하여 인수 *arg*를 문자열로 변환합니다. \n\n - 문자열은 변경되지 않습니다. \n - 함수는 빈 문자열로 변환됩니다. \n - 무한대와 NaN은 JSON수치로 표현할 수 없기 때문에 오류처리 됩니다. \n - 다른 모든 값은 `JSON.stringify` 함수를 사용하여 JSON 문자열로 변환됩니다."
|
||||
},
|
||||
"$length": {
|
||||
"args": "str",
|
||||
"desc": "문자열 `str`의 문자 수를 반환합니다. `str`가 문자열이 아닌 경우 에러를 반환합니다."
|
||||
},
|
||||
"$substring": {
|
||||
"args": "str, start[, length]",
|
||||
"desc": "(zero-offset)의 `start`에서 시작하는 첫번째 인수 `str`의 문자열을 반환합니다. 만약 `length`가 지정된 경우, 부분 문자열은 최대 `length`의 크기를 갖습니다. 만약 `start` 인수가 음수이면 `str`의 끝에서부터의 문자수를 나타냅니다."
|
||||
},
|
||||
"$substringBefore": {
|
||||
"args": "str, chars",
|
||||
"desc": "`str`에 `chars`문자가 처음으로 나오기 전까지의 부분문자열을 반환합니다. 만약 `chars`가 없으면 `str`을 반환합니다."
|
||||
},
|
||||
"$substringAfter": {
|
||||
"args": "str, chars",
|
||||
"desc": "`str`에 `chars`문자가 처음으로 나온 이후의 부분문자열을 반환합니다. 만약 `chars`가 없으면 `str`을 반환합니다."
|
||||
},
|
||||
"$uppercase": {
|
||||
"args": "str",
|
||||
"desc": "`str`의 문자를 대문자로 반환합니다."
|
||||
},
|
||||
"$lowercase": {
|
||||
"args": "str",
|
||||
"desc": "`str`의 문자를 소문자로 반환합니다."
|
||||
},
|
||||
"$trim": {
|
||||
"args": "str",
|
||||
"desc": "다음의 순서대로 `str`의 모든 공백을 자르고 정규화 합니다:\n\n - 모든 탭, 캐리지 리턴 및 줄 바꿈은 공백으로 대체됩니다. \n- 연속된 공백은 하나로 줄입니다.\n- 후행 및 선행 공백은 삭제됩니다.\n\n 만일 `str`이 지정되지 않으면 (예: 이 함수를 인수없이 호출), context값을 `str`의 값으로 사용합니다. `str`이 문자열이 아니면 에러가 발생합니다."
|
||||
},
|
||||
"$contains": {
|
||||
"args": "str, pattern",
|
||||
"desc": "`str`이 `pattern`과 일치하면 `true`를, 일치하지 않으면 `false`를 반환합니다. 만약 `str`이 지정되지 않으면 (예: 이 함수를 인수없이 호출), context값을 `str`의 값으로 사용합니다. `pattern` 인수는 문자열이나 정규표현으로 할 수 있습니다."
|
||||
},
|
||||
"$split": {
|
||||
"args": "str[, separator][, limit]",
|
||||
"desc": "`str`인수를 분할하여 부분문자열로 배열합니다. `str`이 문자열이 아니면 에러가 발생합니다. 생략가능한 인수 `separator`는 `str`을 분할하는 문자를 문자열 또는 정규표현으로 지정합니다. `separator`를 지정하지 않은 경우, 공백의 문자열로 간주하여 `str`은 단일 문자의 배열로 분리됩니다. `separator`가 문자열이 아니면 에러가 발생합니다. 생략가능한 인수 'limit`는 결과의 배열이 갖는 부분문자열의 최대수를 지정합니다. 이 수를 넘는 부분문자열은 파기됩니다. `limit`가 지정되지 않으면`str`은 결과 배열의 크기의 제한없이 완전히 분리됩니다. `limit`이 음수인 경우 에러가 발생합니다."
|
||||
},
|
||||
"$join": {
|
||||
"args": "array[, separator]",
|
||||
"desc": "문자열의 배열을 생략가능한 인수 `separator`로 구분한 하나의 문자열로 연결합니다. 배열 `array`가 문자열이 아닌 요소를 포함하는 경우, 에러가 발생합니다. `separator`를 지정하지 않은 경우, 공백의 문자열로 간주합니다(예: 문자열간의 `separator`없음). `separator`가 문자열이 아닌 경우, 에러가 발생합니다."
|
||||
},
|
||||
"$match": {
|
||||
"args": "str, pattern [, limit]",
|
||||
"desc": "`str`문자열에 `pattern`를 적용하여, 오브젝트 배열을 반환합니다. 배열요소의 오브젝트는 `str`중 일치하는 부분의 정보를 보유합니다."
|
||||
},
|
||||
"$replace": {
|
||||
"args": "str, pattern, replacement [, limit]",
|
||||
"desc": "`str`문자열에서 `pattern` 패턴을 검색하여, `replacement`로 대체합니다.\n\n임의이ㅡ 인수 `limit`는 대체 횟수의 상한값을 지정합니다."
|
||||
},
|
||||
"$now": {
|
||||
"args": "",
|
||||
"desc": "ISO 8601 호환 형식으로 타임 스탬프를 생성하고 이를 문자열로 반환합니다."
|
||||
},
|
||||
"$base64encode": {
|
||||
"args": "string",
|
||||
"desc": "ASCII 문자열을 base 64 표현으로 변환합니다. 문자열의 각 문자는 이진 데이터의 바이트로 처리됩니다. 이렇게 하려면 문자열의 모든 문자가 URI로 인코딩 된 문자열을 포함하고, 0x00에서 0xFF 범위에 있어야합니다. 해당 범위를 벗어난 유니 코드 문자는 지원되지 않습니다"
|
||||
},
|
||||
"$base64decode": {
|
||||
"args": "string",
|
||||
"desc": "UTF-8코드페이지를 이용하여, Base 64형식의 바이트값을 문자열로 변환합니다."
|
||||
},
|
||||
"$number": {
|
||||
"args": "arg",
|
||||
"desc": "`arg`를 다음과 같은 규칙을 사요하여 숫자로 변환합니다. :\n\n - 숫자는 변경되지 않습니다.\n – 올바른 JSON의 숫자는 숫자 그대로 변환됩니다.\n – 그 외의 형식은 에러를 발생합니다."
|
||||
},
|
||||
"$abs": {
|
||||
"args": "number",
|
||||
"desc": "`number`의 절대값을 반환합니다."
|
||||
},
|
||||
"$floor": {
|
||||
"args": "number",
|
||||
"desc": "`number`를 `number`보다 같거나 작은 정수로 내림하여 반환합니다."
|
||||
},
|
||||
"$ceil": {
|
||||
"args": "number",
|
||||
"desc": "`number`를 `number`와 같거나 큰 정수로 올림하여 반환합니다."
|
||||
},
|
||||
"$round": {
|
||||
"args": "number [, precision]",
|
||||
"desc": "인수 `number`를 반올림한 값을 반환합니다. 임의의 인수 `precision`에는 반올립에서 사용할 소수점이하의 자릿수를 지정합니다."
|
||||
},
|
||||
"$power": {
|
||||
"args": "base, exponent",
|
||||
"desc": "기수 `base`의 값을 지수 `exponent`만큼의 거듭 제곱으로 반환합니다."
|
||||
},
|
||||
"$sqrt": {
|
||||
"args": "number",
|
||||
"desc": "인수 `number`의 제곱근을 반환합니다."
|
||||
},
|
||||
"$random": {
|
||||
"args": "",
|
||||
"desc": "0이상 1미만의 의사난수를 반환합니다."
|
||||
},
|
||||
"$millis": {
|
||||
"args": "",
|
||||
"desc": "Unix Epoch (1970 년 1 월 1 일 UTC)부터 경과된 밀리 초 수를 숫자로 반환합니다. 평가대상식에 포함되는 $millis()의 모든 호출은 모두 같은 값을 반환합니다."
|
||||
},
|
||||
"$sum": {
|
||||
"args": "array",
|
||||
"desc": "숫자 배열 `array`의 합계를 반환합니다. `array`에 숫자가 아닌 요소가 있는 경우, 에러가 발생합니다."
|
||||
},
|
||||
"$max": {
|
||||
"args": "array",
|
||||
"desc": "숫자 배열 `array`에서 최대값을 반환합니다. `array`에 숫자가 아닌 요소가 있는 경우, 에러가 발생합니다."
|
||||
},
|
||||
"$min": {
|
||||
"args": "array",
|
||||
"desc": "숫자 배열 `array`에서 최소값을 반환합니다. `array`에 숫자가 아닌 요소가 있는 경우, 에러가 발생합니다."
|
||||
},
|
||||
"$average": {
|
||||
"args": "array",
|
||||
"desc": "숫자 배열 `array`에서 평균값을 반환합니다. `array`에 숫자가 아닌 요소가 있는 경우, 에러가 발생합니다."
|
||||
},
|
||||
"$boolean": {
|
||||
"args": "arg",
|
||||
"desc": "`arg` 값을 다음의 규칙에 의해 Boolean으로 변환합니다::\n\n - `Boolean` : 변환하지 않음\n - `string`: 비어있음 : `false`\n - `string`: 비어있지 않음 : `true`\n - `number`: `0` : `false`\n - `number`: 0이 아님 : `true`\n - `null` : `false`\n - `array`: 비어있음 : `false`\n - `array`: `true`로 변환된 요소를 가짐 : `true`\n - `array`: 모든 요소가 `false`로 변환 : `false`\n - `object`: 비어있음 : `false`\n - `object`: 비어있지 않음 : `true`\n - `function` : `false`"
|
||||
},
|
||||
"$not": {
|
||||
"args": "arg",
|
||||
"desc": "인수의 부정을 Boolean으로 변환합니다. `arg`는 가장먼저boolean으로 변환됩니다."
|
||||
},
|
||||
"$exists": {
|
||||
"args": "arg",
|
||||
"desc": "`arg` 식의 평가값이 존재하는 경우 `true`, 식의 평가결과가 미정의인 경우 (예: 존재하지 않는 참조필드로의 경로)는 `false`를 반환합니다."
|
||||
},
|
||||
"$count": {
|
||||
"args": "array",
|
||||
"desc": "`array`의 요소 갯수를 반환합니다."
|
||||
},
|
||||
"$append": {
|
||||
"args": "array, array",
|
||||
"desc": "두개의 `array`를 병합합니다."
|
||||
},
|
||||
"$sort": {
|
||||
"args": "array [, function]",
|
||||
"desc": "배열 `array`의 모든 값을 순서대로 정렬하여 반환합니다. \n\n 비교함수 `function`을 이용하는 경우, 비교함수는 아래와 같은 두개의 인수를 가져야 합니다. \n\n `function(left,right)` \n\n 비교함수는 left와 right의 두개의 값을 비교하기에, 값을 정렬하는 처리에서 호출됩니다. 만약 요구되는 정렬에서 left값을 right값보다 뒤로 두고싶은 경우에는, 비교함수는 치환을 나타내는 Boolean형의 ``true`를, 그렇지 않은 경우에는 `false`를 반환해야 합니다."
|
||||
},
|
||||
"$reverse": {
|
||||
"args": "array",
|
||||
"desc": "`array`에 포함된 모든 값의 순서를 역순으로 변환하여 반환합니다."
|
||||
},
|
||||
"$shuffle": {
|
||||
"args": "array",
|
||||
"desc": "`array`에 포함된 모든 값의 순서를 랜덤으로 반환합니다."
|
||||
},
|
||||
"$zip": {
|
||||
"args": "array, ...",
|
||||
"desc": "배열 `array1` ... arrayN`의 위치 0, 1, 2…. 의 값으로 구성된 convolved (zipped) 배열을 반환합니다."
|
||||
},
|
||||
"$keys": {
|
||||
"args": "object",
|
||||
"desc": "`object` 키를 포함하는 배열을 반환합니다. 인수가 오브젝트의 배열이면 반환되는 배열은 모든 오브젝트에있는 모든 키의 중복되지 않은 목록이 됩니다."
|
||||
},
|
||||
"$lookup": {
|
||||
"args": "object, key",
|
||||
"desc": "`object` 내의 `key`가 갖는 값을 반환합니다. 최초의 인수가 객체의 배열 인 경우, 배열 내의 모든 오브젝트를 검색하여, 존재하는 모든 키가 갖는 값을 반환합니다."
|
||||
},
|
||||
"$spread": {
|
||||
"args": "object",
|
||||
"desc": "`object`의 키/값 쌍별로 각 요소가 하나인 오브젝트 배열로 분할합니다. 만일 오브젝트 배열인 경우, 배열의 결과는 각 오브젝트에서 얻은 키/값 쌍의 오브젝트를 갖습니다."
|
||||
},
|
||||
"$merge": {
|
||||
"args": "array<object>",
|
||||
"desc": "`object`배열을 하나의 `object`로 병합합니다. 병합결과의 오브젝트는 입력배열내의 각 오브젝트의 키/값 쌍을 포함합니다. 입력 오브젝트가 같은 키를 가질경우, 반환 된 `object`에는 배열 마지막의 오브젝트의 키/값이 격납됩니다. 입력 배열이 오브젝트가 아닌 요소를 포함하는 경우, 에러가 발생합니다."
|
||||
},
|
||||
"$sift": {
|
||||
"args": "object, function",
|
||||
"desc": "함수 `function`을 충족시키는 `object` 인수 키/값 쌍만 포함하는 오브젝트를 반환합니다. \n\n 함수 `function` 다음과 같은 인수를 가져야 합니다 : \n\n `function(value [, key [, object]])`"
|
||||
},
|
||||
"$each": {
|
||||
"args": "object, function",
|
||||
"desc": "`object`의 각 키/값 쌍에, 함수`function`을 적용한 값의 배열을 반환합니다."
|
||||
},
|
||||
"$map": {
|
||||
"args": "array, function",
|
||||
"desc": "`array`의 각 값에 `function`을 적용한 결과로 이루어진 배열을 반환합니다. \n\n 함수 `function`은 다음과 같은 인수를 가져야 합니다. \n\n `function(value[, index[, array]])`"
|
||||
},
|
||||
"$filter": {
|
||||
"args": "array, function",
|
||||
"desc": "`array`의 값중, 함수 `function`의 조건을 만족하는 값으로 이루어진 배열을 반환합니다. \n\n 함수 `function`은 다음과 같은 형식을 가져야 합니다. \n\n `function(value[, index[, array]])`"
|
||||
},
|
||||
"$reduce": {
|
||||
"args": "array, function [, init]",
|
||||
"desc": "배열의 각 요소값에 함수 `function`을 연속적으로 적용하여 얻어지는 집계값을 반환합니다. `function`의 적용에는 직전의 `function`의 적용결과와 요소값이 인수로 주어집니다. \n\n 함수 `function`은 인수를 두개 뽑아, 배열의 각 요소 사이에 배치하는 중치연산자처럼 작용해야 합니다. \n\n 임의의 인수 `init`에는 집약시의 초기값을 설정합니다."
|
||||
},
|
||||
"$flowContext": {
|
||||
"args": "string[, string]",
|
||||
"desc": "플로우 컨텍스트 속성을 취득합니다."
|
||||
},
|
||||
"$globalContext": {
|
||||
"args": "string[, string]",
|
||||
"desc": "플로우의 글로벌 컨텍스트 속성을 취득합니다."
|
||||
},
|
||||
"$pad": {
|
||||
"args": "string, width [, char]",
|
||||
"desc": "문자수가 인수 `width`의 절대값이상이 되도록, 필요한 경우 여분의 패딩을 사용하여 `string`의 복사본을 반환합니다. \n\n `width`가 양수인 경우, 오른쪽으로 채워지고, 음수이면 왼쪽으로 채워집니다. \n\n 임의의 `char`인수에는 이 함수에서 사용할 패딩을 지정합니다. 지정하지 않는 경우에는, 기본값으로 공백을 사용합니다."
|
||||
},
|
||||
"$fromMillis": {
|
||||
"args": "number",
|
||||
"desc": "Unix Epoch (1970 년 1 월 1 일 UTC) 이후의 밀리 초를 나타내는 숫자를 ISO 8601 형식의 타임 스탬프 문자열로 변환합니다."
|
||||
},
|
||||
"$formatNumber": {
|
||||
"args": "number, picture [, options]",
|
||||
"desc": "`number`를 문자열로 변환하고 `picture` 문자열에 지정된 표현으로 서식을 변경합니다. \n\n 이 함수의 동작은 XPath F&O 3.1사양에 정의된 XPath/XQuery함수의 fn:format-number의 동작과 같습니다. 인수의 문자열 picture은 fn:format-number 과 같은 구문으로 수치의 서식을 정의합니다. \n\n 임의의 제3 인수 `option`은 소수점기호와 같은 기본 로케일 고유의 서식설정문자를 덮어쓰는데에 사용됩니다. 이 인수를 지정할 경우, XPath F&O 3.1사양의 수치형식에 기술되어있는 name/value 쌍을 포함하는 오브젝트여야 합니다."
|
||||
},
|
||||
"$formatBase": {
|
||||
"args": "number [, radix]",
|
||||
"desc": "`number`를 인수 `radix`에 지정한 값을 기수로하는 문자열로 변환합니다. `radix`가 지정되지 않은 경우, 기수 10이 기본값으로 설정됩니다. `radix`에는 2~36의 값을 설정할 수 있고, 그 외의 값의 경우에는 에러가 발생합니다."
|
||||
},
|
||||
"$toMillis": {
|
||||
"args": "timestamp",
|
||||
"desc": "ISO 8601 형식의 `timestamp`를 Unix Epoch (1970 년 1 월 1 일 UTC) 이후의 밀리 초 수로 변환합니다. 문자열이 올바른 형식이 아닌 경우 에러가 발생합니다."
|
||||
},
|
||||
"$env": {
|
||||
"args": "arg",
|
||||
"desc": "환경변수를 값으로 반환합니다.\n\n 이 함수는 Node-RED 정의 함수입니다."
|
||||
}
|
||||
}
|
||||
{
|
||||
"$string": {
|
||||
"args": "arg",
|
||||
"desc": "다음과 같은 규칙을 사용하여 인수 *arg*를 문자열로 변환합니다.\n\n - 문자열은 변경되지 않습니다.\n - 함수는 빈 문자열로 변환됩니다.\n - 무한대와 NaN은 JSON수치로 표현할 수 없기 때문에 오류처리 됩니다.\n - 다른 모든 값은 `JSON.stringify` 함수를 사용하여 JSON 문자열로 변환됩니다."
|
||||
},
|
||||
"$length": {
|
||||
"args": "str",
|
||||
"desc": "문자열 `str`의 문자 수를 반환합니다. `str`가 문자열이 아닌 경우 에러를 반환합니다."
|
||||
},
|
||||
"$substring": {
|
||||
"args": "str, start[, length]",
|
||||
"desc": "(zero-offset)의 `start`에서 시작하는 첫번째 인수 `str`의 문자열을 반환합니다. 만약 `length`가 지정된 경우, 부분 문자열은 최대 `length`의 크기를 갖습니다. 만약 `start` 인수가 음수이면 `str`의 끝에서부터의 문자수를 나타냅니다."
|
||||
},
|
||||
"$substringBefore": {
|
||||
"args": "str, chars",
|
||||
"desc": "`str`에 `chars`문자가 처음으로 나오기 전까지의 부분문자열을 반환합니다. 만약 `chars`가 없으면 `str`을 반환합니다."
|
||||
},
|
||||
"$substringAfter": {
|
||||
"args": "str, chars",
|
||||
"desc": "`str`에 `chars`문자가 처음으로 나온 이후의 부분문자열을 반환합니다. 만약 `chars`가 없으면 `str`을 반환합니다."
|
||||
},
|
||||
"$uppercase": {
|
||||
"args": "str",
|
||||
"desc": "`str`의 문자를 대문자로 반환합니다."
|
||||
},
|
||||
"$lowercase": {
|
||||
"args": "str",
|
||||
"desc": "`str`의 문자를 소문자로 반환합니다."
|
||||
},
|
||||
"$trim": {
|
||||
"args": "str",
|
||||
"desc": "다음의 순서대로 `str`의 모든 공백을 자르고 정규화 합니다:\n\n - 모든 탭, 캐리지 리턴 및 줄 바꿈은 공백으로 대체됩니다.\n- 연속된 공백은 하나로 줄입니다.\n- 후행 및 선행 공백은 삭제됩니다.\n\n 만일 `str`이 지정되지 않으면 (예: 이 함수를 인수없이 호출), context값을 `str`의 값으로 사용합니다. `str`이 문자열이 아니면 에러가 발생합니다."
|
||||
},
|
||||
"$contains": {
|
||||
"args": "str, pattern",
|
||||
"desc": "`str`이 `pattern`과 일치하면 `true`를, 일치하지 않으면 `false`를 반환합니다. 만약 `str`이 지정되지 않으면 (예: 이 함수를 인수없이 호출), context값을 `str`의 값으로 사용합니다. `pattern` 인수는 문자열이나 정규표현으로 할 수 있습니다."
|
||||
},
|
||||
"$split": {
|
||||
"args": "str[, separator][, limit]",
|
||||
"desc": "`str`인수를 분할하여 부분문자열로 배열합니다. `str`이 문자열이 아니면 에러가 발생합니다. 생략가능한 인수 `separator`는 `str`을 분할하는 문자를 문자열 또는 정규표현으로 지정합니다. `separator`를 지정하지 않은 경우, 공백의 문자열로 간주하여 `str`은 단일 문자의 배열로 분리됩니다. `separator`가 문자열이 아니면 에러가 발생합니다. 생략가능한 인수 'limit`는 결과의 배열이 갖는 부분문자열의 최대수를 지정합니다. 이 수를 넘는 부분문자열은 파기됩니다. `limit`가 지정되지 않으면`str`은 결과 배열의 크기의 제한없이 완전히 분리됩니다. `limit`이 음수인 경우 에러가 발생합니다."
|
||||
},
|
||||
"$join": {
|
||||
"args": "array[, separator]",
|
||||
"desc": "문자열의 배열을 생략가능한 인수 `separator`로 구분한 하나의 문자열로 연결합니다. 배열 `array`가 문자열이 아닌 요소를 포함하는 경우, 에러가 발생합니다. `separator`를 지정하지 않은 경우, 공백의 문자열로 간주합니다(예: 문자열간의 `separator`없음). `separator`가 문자열이 아닌 경우, 에러가 발생합니다."
|
||||
},
|
||||
"$match": {
|
||||
"args": "str, pattern [, limit]",
|
||||
"desc": "`str`문자열에 `pattern`를 적용하여, 오브젝트 배열을 반환합니다. 배열요소의 오브젝트는 `str`중 일치하는 부분의 정보를 보유합니다."
|
||||
},
|
||||
"$replace": {
|
||||
"args": "str, pattern, replacement [, limit]",
|
||||
"desc": "`str`문자열에서 `pattern` 패턴을 검색하여, `replacement`로 대체합니다.\n\n임의이ㅡ 인수 `limit`는 대체 횟수의 상한값을 지정합니다."
|
||||
},
|
||||
"$now": {
|
||||
"args": "",
|
||||
"desc": "ISO 8601 호환 형식으로 타임 스탬프를 생성하고 이를 문자열로 반환합니다."
|
||||
},
|
||||
"$base64encode": {
|
||||
"args": "string",
|
||||
"desc": "ASCII 문자열을 base 64 표현으로 변환합니다. 문자열의 각 문자는 이진 데이터의 바이트로 처리됩니다. 이렇게 하려면 문자열의 모든 문자가 URI로 인코딩 된 문자열을 포함하고, 0x00에서 0xFF 범위에 있어야합니다. 해당 범위를 벗어난 유니 코드 문자는 지원되지 않습니다"
|
||||
},
|
||||
"$base64decode": {
|
||||
"args": "string",
|
||||
"desc": "UTF-8코드페이지를 이용하여, Base 64형식의 바이트값을 문자열로 변환합니다."
|
||||
},
|
||||
"$number": {
|
||||
"args": "arg",
|
||||
"desc": "`arg`를 다음과 같은 규칙을 사요하여 숫자로 변환합니다. :\n\n - 숫자는 변경되지 않습니다.\n – 올바른 JSON의 숫자는 숫자 그대로 변환됩니다.\n – 그 외의 형식은 에러를 발생합니다."
|
||||
},
|
||||
"$abs": {
|
||||
"args": "number",
|
||||
"desc": "`number`의 절대값을 반환합니다."
|
||||
},
|
||||
"$floor": {
|
||||
"args": "number",
|
||||
"desc": "`number`를 `number`보다 같거나 작은 정수로 내림하여 반환합니다."
|
||||
},
|
||||
"$ceil": {
|
||||
"args": "number",
|
||||
"desc": "`number`를 `number`와 같거나 큰 정수로 올림하여 반환합니다."
|
||||
},
|
||||
"$round": {
|
||||
"args": "number [, precision]",
|
||||
"desc": "인수 `number`를 반올림한 값을 반환합니다. 임의의 인수 `precision`에는 반올립에서 사용할 소수점이하의 자릿수를 지정합니다."
|
||||
},
|
||||
"$power": {
|
||||
"args": "base, exponent",
|
||||
"desc": "기수 `base`의 값을 지수 `exponent`만큼의 거듭 제곱으로 반환합니다."
|
||||
},
|
||||
"$sqrt": {
|
||||
"args": "number",
|
||||
"desc": "인수 `number`의 제곱근을 반환합니다."
|
||||
},
|
||||
"$random": {
|
||||
"args": "",
|
||||
"desc": "0이상 1미만의 의사난수를 반환합니다."
|
||||
},
|
||||
"$millis": {
|
||||
"args": "",
|
||||
"desc": "Unix Epoch (1970 년 1 월 1 일 UTC)부터 경과된 밀리 초 수를 숫자로 반환합니다. 평가대상식에 포함되는 $millis()의 모든 호출은 모두 같은 값을 반환합니다."
|
||||
},
|
||||
"$sum": {
|
||||
"args": "array",
|
||||
"desc": "숫자 배열 `array`의 합계를 반환합니다. `array`에 숫자가 아닌 요소가 있는 경우, 에러가 발생합니다."
|
||||
},
|
||||
"$max": {
|
||||
"args": "array",
|
||||
"desc": "숫자 배열 `array`에서 최대값을 반환합니다. `array`에 숫자가 아닌 요소가 있는 경우, 에러가 발생합니다."
|
||||
},
|
||||
"$min": {
|
||||
"args": "array",
|
||||
"desc": "숫자 배열 `array`에서 최소값을 반환합니다. `array`에 숫자가 아닌 요소가 있는 경우, 에러가 발생합니다."
|
||||
},
|
||||
"$average": {
|
||||
"args": "array",
|
||||
"desc": "숫자 배열 `array`에서 평균값을 반환합니다. `array`에 숫자가 아닌 요소가 있는 경우, 에러가 발생합니다."
|
||||
},
|
||||
"$boolean": {
|
||||
"args": "arg",
|
||||
"desc": "`arg` 값을 다음의 규칙에 의해 Boolean으로 변환합니다::\n\n - `Boolean` : 변환하지 않음\n - `string`: 비어있음 : `false`\n - `string`: 비어있지 않음 : `true`\n - `number`: `0` : `false`\n - `number`: 0이 아님 : `true`\n - `null` : `false`\n - `array`: 비어있음 : `false`\n - `array`: `true`로 변환된 요소를 가짐 : `true`\n - `array`: 모든 요소가 `false`로 변환 : `false`\n - `object`: 비어있음 : `false`\n - `object`: 비어있지 않음 : `true`\n - `function` : `false`"
|
||||
},
|
||||
"$not": {
|
||||
"args": "arg",
|
||||
"desc": "인수의 부정을 Boolean으로 변환합니다. `arg`는 가장먼저boolean으로 변환됩니다."
|
||||
},
|
||||
"$exists": {
|
||||
"args": "arg",
|
||||
"desc": "`arg` 식의 평가값이 존재하는 경우 `true`, 식의 평가결과가 미정의인 경우 (예: 존재하지 않는 참조필드로의 경로)는 `false`를 반환합니다."
|
||||
},
|
||||
"$count": {
|
||||
"args": "array",
|
||||
"desc": "`array`의 요소 갯수를 반환합니다."
|
||||
},
|
||||
"$append": {
|
||||
"args": "array, array",
|
||||
"desc": "두개의 `array`를 병합합니다."
|
||||
},
|
||||
"$sort": {
|
||||
"args": "array [, function]",
|
||||
"desc": "배열 `array`의 모든 값을 순서대로 정렬하여 반환합니다.\n\n 비교함수 `function`을 이용하는 경우, 비교함수는 아래와 같은 두개의 인수를 가져야 합니다.\n\n `function(left,right)`\n\n 비교함수는 `left`와 `right`의 두개의 값을 비교하기에, 값을 정렬하는 처리에서 호출됩니다. 만약 요구되는 정렬에서 left값을 `right`값보다 뒤로 두고싶은 경우에는, 비교함수는 치환을 나타내는 Boolean형의 `true`를, 그렇지 않은 경우에는 `false`를 반환해야 합니다."
|
||||
},
|
||||
"$reverse": {
|
||||
"args": "array",
|
||||
"desc": "`array`에 포함된 모든 값의 순서를 역순으로 변환하여 반환합니다."
|
||||
},
|
||||
"$shuffle": {
|
||||
"args": "array",
|
||||
"desc": "`array`에 포함된 모든 값의 순서를 랜덤으로 반환합니다."
|
||||
},
|
||||
"$zip": {
|
||||
"args": "array, ...",
|
||||
"desc": "배열 `array1` ... arrayN`의 위치 0, 1, 2…. 의 값으로 구성된 convolved (zipped) 배열을 반환합니다."
|
||||
},
|
||||
"$keys": {
|
||||
"args": "object",
|
||||
"desc": "`object` 키를 포함하는 배열을 반환합니다. 인수가 오브젝트의 배열이면 반환되는 배열은 모든 오브젝트에있는 모든 키의 중복되지 않은 목록이 됩니다."
|
||||
},
|
||||
"$lookup": {
|
||||
"args": "object, key",
|
||||
"desc": "`object` 내의 `key`가 갖는 값을 반환합니다. 최초의 인수가 객체의 배열 인 경우, 배열 내의 모든 오브젝트를 검색하여, 존재하는 모든 키가 갖는 값을 반환합니다."
|
||||
},
|
||||
"$spread": {
|
||||
"args": "object",
|
||||
"desc": "`object`의 키/값 쌍별로 각 요소가 하나인 오브젝트 배열로 분할합니다. 만일 오브젝트 배열인 경우, 배열의 결과는 각 오브젝트에서 얻은 키/값 쌍의 오브젝트를 갖습니다."
|
||||
},
|
||||
"$merge": {
|
||||
"args": "array<object>",
|
||||
"desc": "`object`배열을 하나의 `object`로 병합합니다. 병합결과의 오브젝트는 입력배열내의 각 오브젝트의 키/값 쌍을 포함합니다. 입력 오브젝트가 같은 키를 가질경우, 반환 된 `object`에는 배열 마지막의 오브젝트의 키/값이 격납됩니다. 입력 배열이 오브젝트가 아닌 요소를 포함하는 경우, 에러가 발생합니다."
|
||||
},
|
||||
"$sift": {
|
||||
"args": "object, function",
|
||||
"desc": "함수 `function`을 충족시키는 `object` 인수 키/값 쌍만 포함하는 오브젝트를 반환합니다.\n\n 함수 `function` 다음과 같은 인수를 가져야 합니다 :\n\n `function(value [, key [, object]])`"
|
||||
},
|
||||
"$each": {
|
||||
"args": "object, function",
|
||||
"desc": "`object`의 각 키/값 쌍에, 함수`function`을 적용한 값의 배열을 반환합니다."
|
||||
},
|
||||
"$map": {
|
||||
"args": "array, function",
|
||||
"desc": "`array`의 각 값에 `function`을 적용한 결과로 이루어진 배열을 반환합니다.\n\n 함수 `function`은 다음과 같은 인수를 가져야 합니다.\n\n `function(value[, index[, array]])`"
|
||||
},
|
||||
"$filter": {
|
||||
"args": "array, function",
|
||||
"desc": "`array`의 값중, 함수 `function`의 조건을 만족하는 값으로 이루어진 배열을 반환합니다.\n\n 함수 `function`은 다음과 같은 형식을 가져야 합니다.\n\n `function(value[, index[, array]])`"
|
||||
},
|
||||
"$reduce": {
|
||||
"args": "array, function [, init]",
|
||||
"desc": "배열의 각 요소값에 함수 `function`을 연속적으로 적용하여 얻어지는 집계값을 반환합니다. `function`의 적용에는 직전의 `function`의 적용결과와 요소값이 인수로 주어집니다.\n\n 함수 `function`은 인수를 두개 뽑아, 배열의 각 요소 사이에 배치하는 중치연산자처럼 작용해야 합니다.\n\n 임의의 인수 `init`에는 집약시의 초기값을 설정합니다."
|
||||
},
|
||||
"$flowContext": {
|
||||
"args": "string[, string]",
|
||||
"desc": "플로우 컨텍스트 속성을 취득합니다."
|
||||
},
|
||||
"$globalContext": {
|
||||
"args": "string[, string]",
|
||||
"desc": "플로우의 글로벌 컨텍스트 속성을 취득합니다."
|
||||
},
|
||||
"$pad": {
|
||||
"args": "string, width [, char]",
|
||||
"desc": "문자수가 인수 `width`의 절대값이상이 되도록, 필요한 경우 여분의 패딩을 사용하여 `string`의 복사본을 반환합니다.\n\n `width`가 양수인 경우, 오른쪽으로 채워지고, 음수이면 왼쪽으로 채워집니다.\n\n 임의의 `char`인수에는 이 함수에서 사용할 패딩을 지정합니다. 지정하지 않는 경우에는, 기본값으로 공백을 사용합니다."
|
||||
},
|
||||
"$fromMillis": {
|
||||
"args": "number",
|
||||
"desc": "Unix Epoch (1970 년 1 월 1 일 UTC) 이후의 밀리 초를 나타내는 숫자를 ISO 8601 형식의 타임 스탬프 문자열로 변환합니다."
|
||||
},
|
||||
"$formatNumber": {
|
||||
"args": "number, picture [, options]",
|
||||
"desc": "`number`를 문자열로 변환하고 `picture` 문자열에 지정된 표현으로 서식을 변경합니다.\n\n 이 함수의 동작은 XPath F&O 3.1사양에 정의된 XPath/XQuery함수의 `fn:format-number`의 동작과 같습니다. 인수의 문자열 `picture`은 `fn:format-number` 과 같은 구문으로 수치의 서식을 정의합니다.\n\n 임의의 제3 인수 `option`은 소수점기호와 같은 기본 로케일 고유의 서식설정문자를 덮어쓰는데에 사용됩니다. 이 인수를 지정할 경우, XPath F&O 3.1사양의 수치형식에 기술되어있는 name/value 쌍을 포함하는 오브젝트여야 합니다."
|
||||
},
|
||||
"$formatBase": {
|
||||
"args": "number [, radix]",
|
||||
"desc": "`number`를 인수 `radix`에 지정한 값을 기수로하는 문자열로 변환합니다. `radix`가 지정되지 않은 경우, 기수 10이 기본값으로 설정됩니다. `radix`에는 2~36의 값을 설정할 수 있고, 그 외의 값의 경우에는 에러가 발생합니다."
|
||||
},
|
||||
"$toMillis": {
|
||||
"args": "timestamp",
|
||||
"desc": "ISO 8601 형식의 `timestamp`를 Unix Epoch (1970 년 1 월 1 일 UTC) 이후의 밀리 초 수로 변환합니다. 문자열이 올바른 형식이 아닌 경우 에러가 발생합니다."
|
||||
},
|
||||
"$env": {
|
||||
"args": "arg",
|
||||
"desc": "환경변수를 값으로 반환합니다.\n\n 이 함수는 Node-RED 정의 함수입니다."
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
|
@ -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<object>",
|
||||
"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
|
@ -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": "Китайский (традиционный)"
|
||||
|
|
0
packages/node_modules/@node-red/editor-client/locales/ru/infotips.json
vendored
Executable file → Normal file
86
packages/node_modules/@node-red/editor-client/locales/ru/jsonata.json
vendored
Executable file → Normal file
|
@ -52,52 +52,52 @@
|
|||
"desc": "Находит вхождения шаблона `pattern` в строке `str` и заменяет их на строку `replacement`.\n\nНеобязательный параметр `limit` - это максимальное количество замен."
|
||||
},
|
||||
"$now": {
|
||||
"args":"",
|
||||
"desc":"Создает отметку времени в формате, совместимом с ISO 8601, и возвращает ее как строку."
|
||||
"args": "",
|
||||
"desc": "Создает отметку времени в формате, совместимом с ISO 8601, и возвращает ее как строку."
|
||||
},
|
||||
"$base64encode": {
|
||||
"args":"string",
|
||||
"desc":"Преобразует ASCII-строку в base-64 кодировку. Каждый символ в строке обрабатывается как байт двоичных данных. Для этого необходимо, чтобы все символы в строке находились в диапазоне от 0x00 до 0xFF, который включает все символы строк в URI-кодировке. Символы Юникода за пределами этого диапазона не поддерживаются."
|
||||
"args": "string",
|
||||
"desc": "Преобразует ASCII-строку в base-64 кодировку. Каждый символ в строке обрабатывается как байт двоичных данных. Для этого необходимо, чтобы все символы в строке находились в диапазоне от 0x00 до 0xFF, который включает все символы строк в URI-кодировке. Символы Юникода за пределами этого диапазона не поддерживаются."
|
||||
},
|
||||
"$base64decode": {
|
||||
"args":"string",
|
||||
"desc":"Преобразует байты в кодировке base-64 в строку, используя кодовую страницу Юникод UTF-8."
|
||||
"args": "string",
|
||||
"desc": "Преобразует байты в кодировке base-64 в строку, используя кодовую страницу Юникод UTF-8."
|
||||
},
|
||||
"$number": {
|
||||
"args": "arg",
|
||||
"desc": "Преобразует параметр `arg` в число с использованием следующих правил приведения:\n\n - Числа возвращаются как есть\n - Строки, которые содержат последовательность символов, представляющих допустимое в JSON число, преобразуются в это число\n - Все остальные значения вызывают ошибку."
|
||||
},
|
||||
"$abs": {
|
||||
"args":"number",
|
||||
"desc":"Возвращает абсолютное значение числа `number`."
|
||||
"args": "number",
|
||||
"desc": "Возвращает абсолютное значение числа `number`."
|
||||
},
|
||||
"$floor": {
|
||||
"args":"number",
|
||||
"desc":"Возвращает значение числа `number`, округленное до ближайшего целого числа, которое меньше или равно `number`."
|
||||
"args": "number",
|
||||
"desc": "Возвращает значение числа `number`, округленное до ближайшего целого числа, которое меньше или равно `number`."
|
||||
},
|
||||
"$ceil": {
|
||||
"args":"number",
|
||||
"desc":"Возвращает значение числа `number`, округленное до ближайшего целого числа, которое больше или равно `number`."
|
||||
"args": "number",
|
||||
"desc": "Возвращает значение числа `number`, округленное до ближайшего целого числа, которое больше или равно `number`."
|
||||
},
|
||||
"$round": {
|
||||
"args":"number [, precision]",
|
||||
"desc":"Возвращает значение числа `number`, округленное до количества десятичных знаков, указанных необязательным параметром `precision`."
|
||||
"args": "number [, precision]",
|
||||
"desc": "Возвращает значение числа `number`, округленное до количества десятичных знаков, указанных необязательным параметром `precision`."
|
||||
},
|
||||
"$power": {
|
||||
"args":"base, exponent",
|
||||
"desc":"Возвращает значение числа `base`, возведенное в степень `exponent`."
|
||||
"args": "base, exponent",
|
||||
"desc": "Возвращает значение числа `base`, возведенное в степень `exponent`."
|
||||
},
|
||||
"$sqrt": {
|
||||
"args":"number",
|
||||
"desc":"Возвращает квадратный корень из значения числа `number`."
|
||||
"args": "number",
|
||||
"desc": "Возвращает квадратный корень из значения числа `number`."
|
||||
},
|
||||
"$random": {
|
||||
"args":"",
|
||||
"desc":"Возвращает псевдослучайное число, которе больше или равно нулю и меньше единицы."
|
||||
"args": "",
|
||||
"desc": "Возвращает псевдослучайное число, которе больше или равно нулю и меньше единицы."
|
||||
},
|
||||
"$millis": {
|
||||
"args":"",
|
||||
"desc":"Возвращает число миллисекунд с начала Unix-эпохи (1 января 1970 года по Гринвичу) в виде числа. Все вызовы `$millis()` в пределах выполнения выражения будут возвращать одно и то же значение."
|
||||
"args": "",
|
||||
"desc": "Возвращает число миллисекунд с начала Unix-эпохи (1 января 1970 года по Гринвичу) в виде числа. Все вызовы `$millis()` в пределах выполнения выражения будут возвращать одно и то же значение."
|
||||
},
|
||||
"$sum": {
|
||||
"args": "array",
|
||||
|
@ -117,7 +117,7 @@
|
|||
},
|
||||
"$boolean": {
|
||||
"args": "arg",
|
||||
"desc": "Приводит аргумент к логическому значению, используя следующие правила: \n\n - Логические значения возвращаются как есть\n - пустая строка: `false`\n - непустая строка: `true`\n - число равное `0`: `false`\n - ненулевое число: `true`\n - `null` : `false`\n - пустой массив: `false`\n - массив, который содержит хотя бы один элемент, приводимый к `true`: `true`\n - массив, все элементы которого приводятся к `false`: `false`\n - пустой объект: `false`\n - непустой объект: `true`\n - функция: `false`"
|
||||
"desc": "Приводит аргумент к логическому значению, используя следующие правила:\n\n - Логические значения возвращаются как есть\n - пустая строка: `false`\n - непустая строка: `true`\n - число равное `0`: `false`\n - ненулевое число: `true`\n - `null` : `false`\n - пустой массив: `false`\n - массив, который содержит хотя бы один элемент, приводимый к `true`: `true`\n - массив, все элементы которого приводятся к `false`: `false`\n - пустой объект: `false`\n - непустой объект: `true`\n - функция: `false`"
|
||||
},
|
||||
"$not": {
|
||||
"args": "arg",
|
||||
|
@ -136,20 +136,20 @@
|
|||
"desc": "Присоединяет один массив к другому"
|
||||
},
|
||||
"$sort": {
|
||||
"args":"array [, function]",
|
||||
"desc":"Возвращает массив, содержащий все значения параметра `array`, но отсортированные по порядку.\n\nЕсли указан компаратор `function`, то это должна быть функция, которая принимает два параметра:\n\n`function(val1, val2)`\n\nЭту функцию вызывает алгоритм сортировки для сравнения двух значений: val1 и val2. Если значение val1 следует поместить после значения val2 в желаемом порядке сортировки, то функция должна возвращать логическое значение `true`, чтобы обозначить замену. В противном случае она должна вернуть `false`."
|
||||
"args": "array [, function]",
|
||||
"desc": "Возвращает массив, содержащий все значения параметра `array`, но отсортированные по порядку.\n\nЕсли указан компаратор `function`, то это должна быть функция, которая принимает два параметра:\n\n`function(val1, val2)`\n\nЭту функцию вызывает алгоритм сортировки для сравнения двух значений: val1 и val2. Если значение val1 следует поместить после значения val2 в желаемом порядке сортировки, то функция должна возвращать логическое значение `true`, чтобы обозначить замену. В противном случае она должна вернуть `false`."
|
||||
},
|
||||
"$reverse": {
|
||||
"args":"array",
|
||||
"desc":"Возвращает массив, содержащий все значения из параметра `array`, но в обратном порядке."
|
||||
"args": "array",
|
||||
"desc": "Возвращает массив, содержащий все значения из параметра `array`, но в обратном порядке."
|
||||
},
|
||||
"$shuffle": {
|
||||
"args":"array",
|
||||
"desc":"Возвращает массив, содержащий все значения из параметра `array`, но перемешанный в случайном порядке."
|
||||
"args": "array",
|
||||
"desc": "Возвращает массив, содержащий все значения из параметра `array`, но перемешанный в случайном порядке."
|
||||
},
|
||||
"$zip": {
|
||||
"args":"array, ...",
|
||||
"desc":"Возвращает свернутый (сжатый) массив, содержащий сгруппированные массивы значений из аргументов `array1` … `arrayN` по индексам 0, 1, 2...."
|
||||
"args": "array, ...",
|
||||
"desc": "Возвращает свернутый (сжатый) массив, содержащий сгруппированные массивы значений из аргументов `array1` … `arrayN` по индексам 0, 1, 2...."
|
||||
},
|
||||
"$keys": {
|
||||
"args": "object",
|
||||
|
@ -168,24 +168,24 @@
|
|||
"desc": "Объединяет массив объектов в один объект, содержащий все пары ключ / значение каждого из объектов входного массива. Если какой-либо из входных объектов содержит один и тот же ключ, возвращаемый объект будет содержать значение последнего в массиве. Вызывает ошибку, если входной массив содержит элемент, который не является объектом."
|
||||
},
|
||||
"$sift": {
|
||||
"args":"object, function",
|
||||
"desc":"Возвращает объект, который содержит только пары ключ / значение из параметра `object`, которые удовлетворяют предикату `function`, переданному в качестве второго параметра.\n\n`function`, которая передается в качестве второго параметра, должна иметь следующую сигнатуру:\n\n`function(value [, key [, object]])`"
|
||||
"args": "object, function",
|
||||
"desc": "Возвращает объект, который содержит только пары ключ / значение из параметра `object`, которые удовлетворяют предикату `function`, переданному в качестве второго параметра.\n\n`function`, которая передается в качестве второго параметра, должна иметь следующую сигнатуру:\n\n`function(value [, key [, object]])`"
|
||||
},
|
||||
"$each": {
|
||||
"args":"object, function",
|
||||
"desc":"Возвращает массив, который содержит значения, возвращаемые функцией `function` при применении к каждой паре ключ/значение из объекта `object`."
|
||||
"args": "object, function",
|
||||
"desc": "Возвращает массив, который содержит значения, возвращаемые функцией `function` при применении к каждой паре ключ/значение из объекта `object`."
|
||||
},
|
||||
"$map": {
|
||||
"args":"array, function",
|
||||
"desc":"Возвращает массив, содержащий результаты применения функции `function` к каждому значению массива `array`.\n\nФункция `function`, указанная в качестве второго параметра, должна иметь следующую сигнатуру:\n\n`function(value [, index [, array]])`"
|
||||
"args": "array, function",
|
||||
"desc": "Возвращает массив, содержащий результаты применения функции `function` к каждому значению массива `array`.\n\nФункция `function`, указанная в качестве второго параметра, должна иметь следующую сигнатуру:\n\n`function(value [, index [, array]])`"
|
||||
},
|
||||
"$filter": {
|
||||
"args":"array, function",
|
||||
"desc":"Возвращает массив, содержащий только те значения из массива `array`, которые удовлетворяют предикату `function`.\n\nФункция `function`, указанная в качестве второго параметра, должна иметь следующую сигнатуру:\n\n`function(value [, index [, array]])`"
|
||||
"args": "array, function",
|
||||
"desc": "Возвращает массив, содержащий только те значения из массива `array`, которые удовлетворяют предикату `function`.\n\nФункция `function`, указанная в качестве второго параметра, должна иметь следующую сигнатуру:\n\n`function(value [, index [, array]])`"
|
||||
},
|
||||
"$reduce": {
|
||||
"args":"array, function [, init]",
|
||||
"desc":"Возвращает агрегированное значение, полученное в результате последовательного применения функции `function` к каждому значению в массиве в сочетании с результатом от предыдущего применения функции.\n\nФункция должна принимать два аргумента и вести себя как инфиксный оператор между каждым значением в массиве `array`. Сигнатура `function` должна иметь форму: `myfunc($accumulator, $value[, $index[, $array]])`\n\nНеобязательный параметр `init` используется в качестве начального значения в агрегации."
|
||||
"args": "array, function [, init]",
|
||||
"desc": "Возвращает агрегированное значение, полученное в результате последовательного применения функции `function` к каждому значению в массиве в сочетании с результатом от предыдущего применения функции.\n\nФункция должна принимать два аргумента и вести себя как инфиксный оператор между каждым значением в массиве `array`. Сигнатура `function` должна иметь форму: `myfunc($accumulator, $value[, $index[, $array]])`\n\nНеобязательный параметр `init` используется в качестве начального значения в агрегации."
|
||||
},
|
||||
"$flowContext": {
|
||||
"args": "string[, string]",
|
||||
|
@ -237,7 +237,7 @@
|
|||
},
|
||||
"$assert": {
|
||||
"args": "arg, str",
|
||||
"desc": "Если значение `arg` равно true, функция возвращает значение undefined. Если значение `arg` равно false, генерируется исключение с `str` в качестве сообщения об исключении."
|
||||
"desc": "Если значение `arg` равно `true`, функция возвращает значение undefined. Если значение `arg` равно `false`, генерируется исключение с `str` в качестве сообщения об исключении."
|
||||
},
|
||||
"$single": {
|
||||
"args": "array, function",
|
||||
|
@ -257,7 +257,7 @@
|
|||
},
|
||||
"$decodeUrl": {
|
||||
"args": "str",
|
||||
"desc": "Декодирует компонент Uniform Resource Locator (URL), ранее созданный с помощью encodeUrl. \n\nПример: `$decodeUrl(\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\")` => `\"https://mozilla.org/?x=шеллы\"`"
|
||||
"desc": "Декодирует компонент Uniform Resource Locator (URL), ранее созданный с помощью encodeUrl.\n\nПример: `$decodeUrl(\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\")` => `\"https://mozilla.org/?x=шеллы\"`"
|
||||
},
|
||||
"$distinct": {
|
||||
"args": "array",
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
},
|
||||
"$boolean": {
|
||||
"args": "arg",
|
||||
"desc": "用下述规则将数据转换成布尔值。:\n\n - 不转换布尔值 `Boolean` 。\n – 将空的字符串 `string` 转换为 `false` \n – 将不为空的字符串 `string` 转换为 `true` \n – 将为0的数字 `number` 转换成 `false` \n –将不为0的数字 `number` 转换成 `true` \n –将 `null` 转换成 `false` \n –将空的数组 `array` 转换成 `false` \n –如果数组 `array` 中含有可以转换成 `true` 的要素则转换成 `true` \n –如果 `array` 中没有可转换成 `true` 的要素则转换成 `false` \n – 空的对象 `object` 转换成 `false` \n – 非空的对象 `object` 转换成 `true` \n –将函数 `function` 转换成 `false` "
|
||||
"desc": "用下述规则将数据转换成布尔值。:\n\n - 不转换布尔值 `Boolean` 。\n – 将空的字符串 `string` 转换为 `false`\n – 将不为空的字符串 `string` 转换为 `true`\n – 将为0的数字 `number` 转换成 `false`\n –将不为0的数字 `number` 转换成 `true`\n –将 `null` 转换成 `false`\n –将空的数组 `array` 转换成 `false`\n –如果数组 `array` 中含有可以转换成 `true` 的要素则转换成 `true`\n –如果 `array` 中没有可转换成 `true` 的要素则转换成 `false`\n – 空的对象 `object` 转换成 `false`\n – 非空的对象 `object` 转换成 `true`\n –将函数 `function` 转换成 `false`"
|
||||
},
|
||||
"$not": {
|
||||
"args": "arg",
|
||||
|
@ -137,7 +137,7 @@
|
|||
},
|
||||
"$sort": {
|
||||
"args": "array [, function]",
|
||||
"desc": "输出排序后的数组 `array` 。\n\n如果使用了比较函数 `function` ,则下述两个参数需要被指定。\n\n `function(left, right)` \n\n该比较函数是为了比较left和right两个值而被排序算法调用的。如果用户希望left的值被置于right的值之后,那么该函数必须输出布尔值 `true` 来表示位置交换。而在不需要位置交换时函数必须输出 `false` 。"
|
||||
"desc": "输出排序后的数组 `array` 。\n\n如果使用了比较函数 `function` ,则下述两个参数需要被指定。\n\n `function(left, right)`\n\n该比较函数是为了比较`left`和`right`两个值而被排序算法调用的。如果用户希望`left`的值被置于`right`的值之后,那么该函数必须输出布尔值 `true` 来表示位置交换。而在不需要位置交换时函数必须输出 `false` 。"
|
||||
},
|
||||
"$reverse": {
|
||||
"args": "array",
|
||||
|
@ -169,7 +169,7 @@
|
|||
},
|
||||
"$sift": {
|
||||
"args": "object, function",
|
||||
"desc": "输出参数 `object` 中符合 `function` 的键值对。\n\n `function` 必须含有下述参数。\n\n `function(value [, key [, object]])` "
|
||||
"desc": "输出参数 `object` 中符合 `function` 的键值对。\n\n `function` 必须含有下述参数。\n\n `function(value [, key [, object]])`"
|
||||
},
|
||||
"$each": {
|
||||
"args": "object, function",
|
||||
|
@ -177,7 +177,7 @@
|
|||
},
|
||||
"$map": {
|
||||
"args": "array, function",
|
||||
"desc": "将函数 `function` 应用于数组 `array` 中所有的值并输出由返回值组成的数组。\n\n `function` 中必须含有下述参数。\n\n`function(value [, index [, array]])` "
|
||||
"desc": "将函数 `function` 应用于数组 `array` 中所有的值并输出由返回值组成的数组。\n\n `function` 中必须含有下述参数。\n\n`function(value [, index [, array]])`"
|
||||
},
|
||||
"$filter": {
|
||||
"args": "array, function",
|
||||
|
@ -237,7 +237,7 @@
|
|||
},
|
||||
"$assert": {
|
||||
"args": "arg, str",
|
||||
"desc": "如果 `arg` 为真,则该函数返回。 如果arg为假,则抛出带有str的异常作为异常消息。"
|
||||
"desc": "如果 `arg` 为真,则该函数返回。 如果`arg`为假,则抛出带有`str`的异常作为异常消息。"
|
||||
},
|
||||
"$single": {
|
||||
"args": "array, function",
|
||||
|
@ -253,11 +253,11 @@
|
|||
},
|
||||
"$decodeUrlComponent": {
|
||||
"args": "str",
|
||||
"desc": "解码以前由encodeUrlComponent创建的统一资源定位器(URL)组件。 \n\n示例: `$decodeUrlComponent(\"%3Fx%3Dtest\")` => `\"?x=test\"`"
|
||||
"desc": "解码以前由encodeUrlComponent创建的统一资源定位器(URL)组件。\n\n示例: `$decodeUrlComponent(\"%3Fx%3Dtest\")` => `\"?x=test\"`"
|
||||
},
|
||||
"$decodeUrl": {
|
||||
"args": "str",
|
||||
"desc": "解码先前由encodeUrl创建的统一资源定位符(URL)。 \n\n示例: `$decodeUrl(\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\")` => `\"https://mozilla.org/?x=шеллы\"`"
|
||||
"desc": "解码先前由encodeUrl创建的统一资源定位符(URL)。\n\n示例: `$decodeUrl(\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\")` => `\"https://mozilla.org/?x=шеллы\"`"
|
||||
},
|
||||
"$distinct": {
|
||||
"args": "array",
|
||||
|
@ -265,7 +265,7 @@
|
|||
},
|
||||
"$type": {
|
||||
"args": "value",
|
||||
"desc": "以字符串形式返回 `值` 的类型。 如果该 `值` 未定义,则将返回 `未定义` "
|
||||
"desc": "以字符串形式返回 `值` 的类型。 如果该 `值` 未定义,则将返回 `未定义`"
|
||||
},
|
||||
"$moment": {
|
||||
"args": "[str]",
|
||||
|
|
|
@ -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": "繁體中文"
|
||||
}
|
||||
|
|
|
@ -137,7 +137,7 @@
|
|||
},
|
||||
"$sort": {
|
||||
"args": "array [, function]",
|
||||
"desc": "輸出排序後的陣列`array`。\n\n如果使用了比較函數`function`,則下述兩個參數需要被指定。\n\n`function(left, right)`\n\n該比較函數是為了比較left和right兩個值而被排序演算法調用的。如果使用者希望left的值被置於right的值之後,那麼該函數必須輸出布林值`true`來表示位置交換。而在不需要位置交換時函數必須輸出`false`。"
|
||||
"desc": "輸出排序後的陣列`array`。\n\n如果使用了比較函數`function`,則下述兩個參數需要被指定。\n\n`function(left, right)`\n\n該比較函數是為了比較`left`和`right`兩個值而被排序演算法調用的。如果使用者希望left的值被置於`right`的值之後,那麼該函數必須輸出布林值`true`來表示位置交換。而在不需要位置交換時函數必須輸出`false`。"
|
||||
},
|
||||
"$reverse": {
|
||||
"args": "array",
|
||||
|
@ -237,7 +237,7 @@
|
|||
},
|
||||
"$assert": {
|
||||
"args": "arg, str",
|
||||
"desc": "如果`arg`為真,則該函數返回。 如果arg為假,則拋出帶有str的異常作為異常消息。"
|
||||
"desc": "如果`arg`為真,則該函數返回。 如果`arg`為假,則拋出帶有`str`的異常作為異常消息。"
|
||||
},
|
||||
"$single": {
|
||||
"args": "array, function",
|
||||
|
@ -253,11 +253,11 @@
|
|||
},
|
||||
"$decodeUrlComponent": {
|
||||
"args": "str",
|
||||
"desc": "解碼以前由encodeUrlComponent創建的統一資源定位器(URL)組件。 \n\n示例: `$decodeUrlComponent(\"%3Fx%3Dtest\")` => `\"?x=test\"`"
|
||||
"desc": "解碼以前由encodeUrlComponent創建的統一資源定位器(URL)組件。\n\n示例: `$decodeUrlComponent(\"%3Fx%3Dtest\")` => `\"?x=test\"`"
|
||||
},
|
||||
"$decodeUrl": {
|
||||
"args": "str",
|
||||
"desc": "解碼先前由encodeUrl創建的統一資源定位符(URL)。 \n\n示例: `$decodeUrl(\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\")` => `\"https://mozilla.org/?x=шеллы\"`"
|
||||
"desc": "解碼先前由encodeUrl創建的統一資源定位符(URL)。\n\n示例: `$decodeUrl(\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\")` => `\"https://mozilla.org/?x=шеллы\"`"
|
||||
},
|
||||
"$distinct": {
|
||||
"args": "array",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@node-red/editor-client",
|
||||
"version": "2.0.1",
|
||||
"version": "3.1.0",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -14,5 +14,5 @@
|
|||
"name": "Dave Conway-Jones"
|
||||
}
|
||||
],
|
||||
"main": "./lib/index.js"
|
||||
"main": "./index.js"
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 90 B |
|
@ -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 |
Before Width: | Height: | Size: 192 B |
|
@ -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 |
|
@ -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 |
|
@ -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 |
|
@ -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 |
|
@ -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;
|
||||
|
@ -101,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--) {
|
||||
|
@ -267,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++) {
|
||||
|
@ -333,7 +378,8 @@ 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;
|
||||
}
|
||||
|
@ -376,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;
|
||||
|
@ -389,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 = {};
|
||||
|
@ -464,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",
|
||||
|
@ -477,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;
|
||||
|
@ -486,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]);
|
||||
}
|
||||
}
|
||||
|
@ -558,11 +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 = {
|
||||
|
@ -589,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") {
|
||||
|
@ -658,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();
|
||||
|
@ -665,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();
|
||||
|
@ -681,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ RED.i18n = (function() {
|
|||
apiRootUrl = options.apiRootUrl||"";
|
||||
var preferredLanguage = localStorage.getItem("editor-language") || detectLanguage();
|
||||
var opts = {
|
||||
compatibilityJSON: 'v3',
|
||||
backend: {
|
||||
loadPath: apiRootUrl+'locales/__ns__?lng=__lng__',
|
||||
},
|
||||
|
@ -37,6 +38,8 @@ RED.i18n = (function() {
|
|||
defaultNS: "editor",
|
||||
fallbackLng: ['en-US'],
|
||||
returnObjects: true,
|
||||
keySeparator: ".",
|
||||
nsSeparator: ":",
|
||||
interpolation: {
|
||||
unescapeSuffix: 'HTML',
|
||||
escapeValue: false,
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,53 @@ 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
|
||||
RED.view.select(nodeToShow.id)
|
||||
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
|
||||
RED.view.select(nodeToShow.id)
|
||||
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 +313,7 @@ var RED = (function() {
|
|||
});
|
||||
}
|
||||
|
||||
function completeLoad() {
|
||||
function completeLoad(showProjectWelcome) {
|
||||
var persistentNotifications = {};
|
||||
RED.comms.subscribe("notification/#",function(topic,msg) {
|
||||
var parts = topic.split("/");
|
||||
|
@ -280,6 +326,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 +350,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 +367,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 +392,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 +507,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 +530,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 +569,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,24 +611,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) {
|
||||
// data will be strictly markdown. Any HTML should be escaped.
|
||||
data = RED.utils.sanitize(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() {
|
||||
|
@ -559,6 +644,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},
|
||||
|
@ -566,6 +670,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"});
|
||||
|
@ -608,7 +731,7 @@ var RED = (function() {
|
|||
}
|
||||
menuOptions.push({id:"menu-item-help",
|
||||
label: RED.settings.theme("menu.menu-item-help.label",RED._("menu.label.help")),
|
||||
href: RED.settings.theme("menu.menu-item-help.url","http://nodered.org/docs")
|
||||
href: RED.settings.theme("menu.menu-item-help.url","https://nodered.org/docs")
|
||||
});
|
||||
menuOptions.push({id:"menu-item-node-red-version", label:"v"+RED.settings.version, onselect: "core:show-about" });
|
||||
|
||||
|
@ -626,7 +749,6 @@ var RED = (function() {
|
|||
RED.user.init();
|
||||
RED.notifications.init();
|
||||
RED.library.init();
|
||||
RED.keyboard.init();
|
||||
RED.palette.init();
|
||||
RED.eventLog.init();
|
||||
|
||||
|
@ -650,21 +772,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();
|
||||
}
|
||||
|
||||
|
@ -676,7 +798,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>'+
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
})()
|
|
@ -19,7 +19,6 @@ RED.settings = (function () {
|
|||
|
||||
var loadedSettings = {};
|
||||
var userSettings = {};
|
||||
var settingsDirty = false;
|
||||
var pendingSave;
|
||||
|
||||
var hasLocalStorage = function () {
|
||||
|
@ -34,8 +33,8 @@ RED.settings = (function () {
|
|||
if (!hasLocalStorage()) {
|
||||
return;
|
||||
}
|
||||
if (key === "auth-tokens") {
|
||||
localStorage.setItem(key, JSON.stringify(value));
|
||||
if (key.startsWith("auth-tokens")) {
|
||||
localStorage.setItem(key+this.authTokensSuffix, JSON.stringify(value));
|
||||
} else {
|
||||
RED.utils.setMessageProperty(userSettings,key,value);
|
||||
saveUserSettings();
|
||||
|
@ -53,8 +52,8 @@ RED.settings = (function () {
|
|||
if (!hasLocalStorage()) {
|
||||
return undefined;
|
||||
}
|
||||
if (key === "auth-tokens") {
|
||||
return JSON.parse(localStorage.getItem(key));
|
||||
if (key.startsWith("auth-tokens")) {
|
||||
return JSON.parse(localStorage.getItem(key+this.authTokensSuffix));
|
||||
} else {
|
||||
var v;
|
||||
try { v = RED.utils.getMessageProperty(userSettings,key); } catch(err) {}
|
||||
|
@ -72,8 +71,8 @@ RED.settings = (function () {
|
|||
if (!hasLocalStorage()) {
|
||||
return;
|
||||
}
|
||||
if (key === "auth-tokens") {
|
||||
localStorage.removeItem(key);
|
||||
if (key.startsWith("auth-tokens")) {
|
||||
localStorage.removeItem(key+this.authTokensSuffix);
|
||||
} else {
|
||||
delete userSettings[key];
|
||||
saveUserSettings();
|
||||
|
@ -100,6 +99,8 @@ RED.settings = (function () {
|
|||
|
||||
var init = function (options, done) {
|
||||
var accessTokenMatch = /[?&]access_token=(.*?)(?:$|&)/.exec(window.location.search);
|
||||
var path=window.location.pathname.slice(0,-1);
|
||||
RED.settings.authTokensSuffix=path.replace(/\//g, '-');
|
||||
if (accessTokenMatch) {
|
||||
var accessToken = accessTokenMatch[1];
|
||||
RED.settings.set("auth-tokens",{access_token: accessToken});
|
||||
|
@ -126,7 +127,7 @@ RED.settings = (function () {
|
|||
load(done);
|
||||
}
|
||||
|
||||
var load = function(done) {
|
||||
var refreshSettings = function(done) {
|
||||
$.ajax({
|
||||
headers: {
|
||||
"Accept": "application/json"
|
||||
|
@ -136,6 +137,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");
|
||||
}
|
||||
|
@ -148,18 +166,8 @@ RED.settings = (function () {
|
|||
console.log("D3",d3.version);
|
||||
console.groupEnd();
|
||||
loadUserSettings(done);
|
||||
},
|
||||
error: function(jqXHR,textStatus,errorThrown) {
|
||||
if (jqXHR.status === 401) {
|
||||
if (/[?&]access_token=(.*?)(?:$|&)/.test(window.location.search)) {
|
||||
window.location.search = "";
|
||||
}
|
||||
RED.user.login(function() { load(done); });
|
||||
} else {
|
||||
console.log("Unexpected error loading settings:",jqXHR.status,textStatus);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
};
|
||||
|
||||
function loadUserSettings(done) {
|
||||
|
@ -220,14 +228,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
|
||||
}
|
||||
})();
|
||||
|
|
|
@ -47,7 +47,7 @@ RED.actionList = (function() {
|
|||
var searchDiv = $("<div>",{class:"red-ui-search-container"}).appendTo(dialog);
|
||||
searchInput = $('<input type="text" data-i18n="[placeholder]keyboard.filterActions">').appendTo(searchDiv).searchBox({
|
||||
change: function() {
|
||||
filterTerm = $(this).val().trim();
|
||||
filterTerm = $(this).val().trim().toLowerCase();
|
||||
filterTerms = filterTerm.split(" ");
|
||||
searchResults.editableList('filter');
|
||||
searchResults.find("li.selected").removeClass("selected");
|
||||
|
@ -160,18 +160,19 @@ RED.actionList = (function() {
|
|||
createDialog();
|
||||
}
|
||||
dialog.slideDown(300);
|
||||
searchInput.searchBox('value',v)
|
||||
searchInput.searchBox('value',v);
|
||||
searchResults.editableList('empty');
|
||||
results = [];
|
||||
var actions = RED.actions.list();
|
||||
actions.sort(function(A,B) {
|
||||
return A.id.localeCompare(B.id);
|
||||
var Akey = A.label;
|
||||
var Bkey = B.label;
|
||||
return Akey.localeCompare(Bkey);
|
||||
});
|
||||
actions.forEach(function(action) {
|
||||
action.label = action.id.replace(/:/,": ").replace(/-/g," ").replace(/(^| )./g,function() { return arguments[0].toUpperCase()});
|
||||
action._label = action.label.toLowerCase();
|
||||
searchResults.editableList('addItem',action)
|
||||
})
|
||||
searchResults.editableList('addItem',action);
|
||||
});
|
||||
RED.events.emit("actionList:open");
|
||||
visible = true;
|
||||
}
|
||||
|
|
|
@ -1,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
|
||||
}
|
||||
|
|
|
@ -37,13 +37,13 @@ RED.clipboard = (function() {
|
|||
// IE11 workaround
|
||||
// IE does not support data uri scheme for downloading data
|
||||
var blob = new Blob([data], {
|
||||
type: "data:text/plain;charset=utf-8"
|
||||
type: "data:application/json;charset=utf-8"
|
||||
});
|
||||
navigator.msSaveBlob(blob, file);
|
||||
}
|
||||
else {
|
||||
var element = document.createElement('a');
|
||||
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(data));
|
||||
element.setAttribute('href', 'data:application/json;charset=utf-8,' + encodeURIComponent(data));
|
||||
element.setAttribute('download', file);
|
||||
element.style.display = 'none';
|
||||
document.body.appendChild(element);
|
||||
|
@ -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));
|
||||
|
@ -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,6 +718,7 @@ 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) {
|
||||
|
@ -712,7 +731,7 @@ RED.clipboard = (function() {
|
|||
nodes.unshift(parentNode);
|
||||
nodes = RED.nodes.createExportableNodeSet(nodes);
|
||||
} else if (type === 'full') {
|
||||
nodes = RED.nodes.createCompleteNodeSet(false);
|
||||
nodes = RED.nodes.createCompleteNodeSet({ credentials: false });
|
||||
}
|
||||
if (nodes !== null) {
|
||||
if (format === "red-ui-clipboard-dialog-export-fmt-full") {
|
||||
|
@ -738,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();
|
||||
|
@ -931,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({
|
||||
|
@ -945,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') {
|
||||
|
@ -972,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);
|
||||
}
|
||||
|
@ -1227,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);
|
||||
|
||||
|
@ -1251,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();
|
||||
}
|
||||
})
|
||||
|
@ -1267,27 +1296,29 @@ RED.clipboard = (function() {
|
|||
hideDropTarget();
|
||||
})
|
||||
.on("drop",function(event) {
|
||||
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);
|
||||
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.
|
||||
}
|
||||
} catch(err) {
|
||||
// Ensure any errors throw above doesn't stop the drop target from
|
||||
// being hidden.
|
||||
}
|
||||
hideDropTarget();
|
||||
event.preventDefault();
|
||||
|
|
126
packages/node_modules/@node-red/editor-client/src/js/ui/common/autoComplete.js
vendored
Normal 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);
|
|
@ -160,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;
|
||||
}
|
||||
|
@ -417,6 +417,9 @@
|
|||
} else {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
cancel: function() {
|
||||
this.element.sortable("cancel");
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
|
|
|
@ -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
|
||||
}
|
||||
})();
|
||||
|
|
|
@ -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();
|
||||
|
@ -333,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();
|
||||
})
|
||||
|
@ -352,6 +584,7 @@ RED.popover = (function() {
|
|||
}
|
||||
}
|
||||
}
|
||||
menu.options(menuOptions);
|
||||
return menu;
|
||||
},
|
||||
panel: function(content) {
|
||||
|
@ -377,15 +610,18 @@ RED.popover = (function() {
|
|||
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) {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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,6 +97,74 @@ 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;
|
||||
|
||||
|
@ -112,14 +183,14 @@ RED.tabs = (function() {
|
|||
// Assume this is wheel event which might not trigger
|
||||
// the scroll event, so do things manually
|
||||
var sl = scrollContainer.scrollLeft();
|
||||
sl -= evt.originalEvent.deltaY;
|
||||
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) {
|
||||
|
@ -337,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"});
|
||||
|
@ -362,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"));
|
||||
}
|
||||
|
@ -378,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;
|
||||
|
@ -446,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();
|
||||
|
@ -486,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--;
|
||||
|
@ -507,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) {
|
||||
|
@ -536,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);
|
||||
}
|
||||
|
@ -663,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")
|
||||
|
@ -672,21 +829,31 @@ RED.tabs = (function() {
|
|||
event.preventDefault();
|
||||
removeTab(tab.id);
|
||||
});
|
||||
RED.popover.tooltip(closeLink,RED._("workspace.closeFlow"));
|
||||
}
|
||||
|
||||
$('<span class="red-ui-tabs-fade"></span>').appendTo(li);
|
||||
// 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);
|
||||
}
|
||||
|
@ -787,22 +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');}));
|
||||
|
|
|
@ -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 = [];
|
||||
|
@ -313,7 +342,7 @@
|
|||
if (child.depth !== parent.depth+1) {
|
||||
child.depth = parent.depth+1;
|
||||
// var labelPaddingWidth = ((child.gutter ? child.gutter[0].offsetWidth + 2 : 0) + (child.depth * 20));
|
||||
var labelPaddingWidth = ((child.gutter?child.gutter.width()+2:0)+(child.depth*20));
|
||||
var labelPaddingWidth = (((child.gutter&&!child.gutter.hasClass("red-ui-treeList-gutter-float"))?child.gutter.width()+2:0)+(child.depth*20));
|
||||
child.treeList.labelPadding.width(labelPaddingWidth+'px');
|
||||
if (child.element) {
|
||||
$(child.element).css({
|
||||
|
@ -462,6 +491,9 @@
|
|||
container.addClass("expanded");
|
||||
}
|
||||
item.treeList.collapse = function() {
|
||||
if (item.collapsible === false) {
|
||||
return
|
||||
}
|
||||
if (!item.children) {
|
||||
return;
|
||||
}
|
||||
|
@ -532,10 +564,12 @@
|
|||
}).appendTo(label)
|
||||
|
||||
}
|
||||
var labelPaddingWidth = (item.gutter?item.gutter.width()+2:0)+(depth*20);
|
||||
// var labelPaddingWidth = (item.gutter ? item.gutter[0].offsetWidth + 2 : 0) + (depth * 20)
|
||||
|
||||
var labelPaddingWidth = ((item.gutter&&!item.gutter.hasClass("red-ui-treeList-gutter-float"))?item.gutter.width()+2:0)+(depth*20);
|
||||
|
||||
item.treeList.labelPadding = $('<span>').css({
|
||||
display: "inline-block",
|
||||
"flex-shrink": 0,
|
||||
width: labelPaddingWidth+'px'
|
||||
}).appendTo(label);
|
||||
|
||||
|
@ -581,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();
|
||||
|
@ -632,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) {
|
||||
|
@ -640,6 +714,7 @@
|
|||
}
|
||||
}
|
||||
selectWrapper.appendTo(label)
|
||||
item.treeList.radio = cb;
|
||||
} else {
|
||||
label.on("click", function(e) {
|
||||
if (!that.options.multi) {
|
||||
|
@ -647,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);
|
||||
}
|
||||
|
@ -798,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)
|
||||
}
|
||||
|
@ -805,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")
|
||||
}
|
||||
|
|
|
@ -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", {
|
||||
|
@ -298,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);
|
||||
|
@ -328,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");
|
||||
|
||||
|
@ -339,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);
|
||||
|
@ -380,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();
|
||||
}
|
||||
|
@ -405,11 +570,11 @@
|
|||
})
|
||||
|
||||
// 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();
|
||||
|
@ -426,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);
|
||||
}
|
||||
|
@ -508,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);
|
||||
}
|
||||
|
@ -579,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) {
|
||||
|
@ -676,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') {
|
||||
|
@ -688,8 +856,10 @@
|
|||
});
|
||||
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)
|
||||
|
@ -698,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) {
|
||||
|
@ -712,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) {
|
||||
|
@ -720,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) {
|
||||
|
@ -765,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);
|
||||
}
|
||||
|
@ -778,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);
|
||||
|
@ -836,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);
|
||||
|
@ -862,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)) {
|
||||
|
@ -906,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 {
|
||||
|
@ -938,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) {
|
||||
|
@ -952,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) {
|
||||
|
@ -1042,6 +1270,9 @@
|
|||
},
|
||||
disabled: function() {
|
||||
return this.uiSelect.attr("disabled") === "disabled";
|
||||
},
|
||||
focus: function() {
|
||||
this.input.focus();
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
|
|
|
@ -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', label: RED._("keyboard.undoChange"), disabled: RED.history.list().length === 0 },
|
||||
{ onselect: 'core:redo', label: RED._("keyboard.redoChange"), 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', label: RED._("keyboard.selectAll") },
|
||||
)
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
})()
|
|
@ -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,"&").replace(/</g,"<").replace(/>/g,">")
|
||||
}
|
||||
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,
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
})();
|
|
@ -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'))) &&
|
||||
|
@ -978,9 +989,10 @@ RED.diff = (function() {
|
|||
}
|
||||
if (localNode && remoteNode && typeof localNode[d] === "string") {
|
||||
if (/\n/.test(localNode[d]) || /\n/.test(remoteNode[d])) {
|
||||
$('<button class="red-ui-button red-ui-button-small red-ui-diff-text-diff-button"><i class="fa fa-file-o"> <i class="fa fa-caret-left"></i> <i class="fa fa-caret-right"></i> <i class="fa fa-file-o"></i></button>').on("click", function() {
|
||||
var textDiff = $('<button class="red-ui-button red-ui-button-small red-ui-diff-text-diff-button"><i class="fa fa-file-o"> <i class="fa fa-caret-left"></i> <i class="fa fa-caret-right"></i> <i class="fa fa-file-o"></i></button>').on("click", function() {
|
||||
showTextDiff(localNode[d],remoteNode[d]);
|
||||
}).appendTo(propertyNameCell);
|
||||
RED.popover.tooltip(textDiff, RED._("diff.compareChanges"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1376,6 +1388,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 +1439,7 @@ RED.diff = (function() {
|
|||
RED.view.redraw(true);
|
||||
RED.palette.refresh();
|
||||
RED.workspaces.refresh();
|
||||
RED.workspaces.show(selectedTab, true);
|
||||
RED.sidebar.config.refresh();
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
});
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
const MONACO = "monaco";
|
||||
const ACE = "ace";
|
||||
const defaultEditor = ACE;
|
||||
const defaultEditor = MONACO;
|
||||
const DEFAULT_SETTINGS = { lib: defaultEditor, options: {} };
|
||||
var selectedCodeEditor = null;
|
||||
var initialised = false;
|
||||
|
@ -45,15 +45,18 @@
|
|||
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)
|
||||
//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
|
||||
// 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.
|
||||
// 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.
|
||||
|
@ -64,6 +67,7 @@
|
|||
options = {};
|
||||
}
|
||||
|
||||
var editor = null;
|
||||
if (this.editor.type === MONACO) {
|
||||
// compatibility (see above note)
|
||||
if (!options.element && !options.id) {
|
||||
|
@ -74,12 +78,16 @@
|
|||
console.warn("createEditor() options.element or options.id is not valid", options);
|
||||
$("#dialog-form").append('<div id="' + options.id + '" style="display: none;" />');
|
||||
}
|
||||
return this.editor.create(options);
|
||||
editor = this.editor.create(options);
|
||||
} else {
|
||||
return this.editor.create(options);//fallback to ACE
|
||||
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,
|
||||
/**
|
||||
|
@ -91,7 +99,7 @@
|
|||
},
|
||||
/**
|
||||
* Get user selected code editor
|
||||
* @return {string} Returns
|
||||
* @return {string} Returns
|
||||
* @memberof RED.editor.codeEditor
|
||||
*/
|
||||
get editor() {
|
||||
|
@ -104,4 +112,4 @@
|
|||
*/
|
||||
create: create
|
||||
}
|
||||
})();
|
||||
})();
|
||||
|
|
|
@ -80,6 +80,9 @@ RED.editor.codeEditor.ace = (function() {
|
|||
}
|
||||
},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);
|
||||
|
@ -92,11 +95,15 @@ RED.editor.codeEditor.ace = (function() {
|
|||
RED.editor.editMarkdown({
|
||||
value: value,
|
||||
width: "Infinity",
|
||||
cursor: editor.getCursorPosition(),
|
||||
stateId: options.stateId,
|
||||
focus: true,
|
||||
cancel: function () {
|
||||
editor.focus();
|
||||
},
|
||||
complete: function(v,cursor) {
|
||||
editor.setValue(v, -1);
|
||||
editor.gotoLine(cursor.row+1,cursor.column,false);
|
||||
setTimeout(function() {
|
||||
editor.restoreView();
|
||||
editor.focus();
|
||||
},300);
|
||||
}
|
||||
|
@ -117,11 +124,56 @@ RED.editor.codeEditor.ace = (function() {
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
function setMode(mode, cb)
|
||||
function getRange();
|
||||
function replace(range, text)
|
||||
function selectAll
|
||||
function selectAll
|
||||
function clearSelection
|
||||
function getSelectedText()
|
||||
function destroy()
|
||||
|
@ -54,22 +54,26 @@ RED.editor.codeEditor.monaco = (function() {
|
|||
var initialised = false;
|
||||
const type = "monaco";
|
||||
const monacoThemes = ["vs","vs-dark","hc-black"]; //TODO: consider setting hc-black autmatically based on acessability?
|
||||
let userSelectedTheme;
|
||||
|
||||
//TODO: get from externalModules.js For now this is enough for feature parity with ACE (and then some).
|
||||
const knownModules = {
|
||||
"assert": {package: "node", module: "assert", path: "node/assert.d.ts" },
|
||||
"assert/strict": {package: "node", module: "assert/strict", path: "node/assert/strict.d.ts" },
|
||||
"async_hooks": {package: "node", module: "async_hooks", path: "node/async_hooks.d.ts" },
|
||||
"buffer": {package: "node", module: "buffer", path: "node/buffer.d.ts" },
|
||||
"child_process": {package: "node", module: "child_process", path: "node/child_process.d.ts" },
|
||||
"cluster": {package: "node", module: "cluster", path: "node/cluster.d.ts" },
|
||||
"console": {package: "node", module: "console", path: "node/console.d.ts" },
|
||||
"constants": {package: "node", module: "constants", path: "node/constants.d.ts" },
|
||||
"crypto": {package: "node", module: "crypto", path: "node/crypto.d.ts" },
|
||||
"dgram": {package: "node", module: "dgram", path: "node/dgram.d.ts" },
|
||||
"diagnostics_channel.d": {package: "node", module: "diagnostics_channel", path: "node/diagnostics_channel.d.ts" },
|
||||
"dns": {package: "node", module: "dns", path: "node/dns.d.ts" },
|
||||
"dns/promises": {package: "node", module: "dns/promises", path: "node/dns/promises.d.ts" },
|
||||
"domain": {package: "node", module: "domain", path: "node/domain.d.ts" },
|
||||
"events": {package: "node", module: "events", path: "node/events.d.ts" },
|
||||
"fs": {package: "node", module: "fs", path: "node/fs.d.ts" },
|
||||
"fs/promises": {package: "node", module: "fs/promises", path: "node/fs/promises.d.ts" },
|
||||
"globals": {package: "node", module: "globals", path: "node/globals.d.ts" },
|
||||
"http": {package: "node", module: "http", path: "node/http.d.ts" },
|
||||
"http2": {package: "node", module: "http2", path: "node/http2.d.ts" },
|
||||
|
@ -83,8 +87,13 @@ RED.editor.codeEditor.monaco = (function() {
|
|||
"querystring": {package: "node", module: "querystring", path: "node/querystring.d.ts" },
|
||||
"readline": {package: "node", module: "readline", path: "node/readline.d.ts" },
|
||||
"stream": {package: "node", module: "stream", path: "node/stream.d.ts" },
|
||||
"stream/consumers": {package: "node", module: "stream/consumers", path: "node/stream/consumers.d.ts" },
|
||||
"stream/promises": {package: "node", module: "stream/promises", path: "node/stream/promises.d.ts" },
|
||||
"stream/web": {package: "node", module: "stream/web", path: "node/stream/web.d.ts" },
|
||||
"string_decoder": {package: "node", module: "string_decoder", path: "node/string_decoder.d.ts" },
|
||||
"test": {package: "node", module: "test", path: "node/test.d.ts" },
|
||||
"timers": {package: "node", module: "timers", path: "node/timers.d.ts" },
|
||||
"timers/promises": {package: "node", module: "timers/promises", path: "node/timers/promises.d.ts" },
|
||||
"tls": {package: "node", module: "tls", path: "node/tls.d.ts" },
|
||||
"trace_events": {package: "node", module: "trace_events", path: "node/trace_events.d.ts" },
|
||||
"tty": {package: "node", module: "tty", path: "node/tty.d.ts" },
|
||||
|
@ -99,7 +108,7 @@ RED.editor.codeEditor.monaco = (function() {
|
|||
"node-red-util": {package: "node-red", module: "util", path: "node-red/util.d.ts" },
|
||||
"node-red-func": {package: "node-red", module: "func", path: "node-red/func.d.ts" },
|
||||
}
|
||||
const defaultServerSideTypes = [ knownModules["node-red-util"], knownModules["node-red-func"], knownModules["globals"], knownModules["console"], knownModules["buffer"] ];
|
||||
const defaultServerSideTypes = [ knownModules["node-red-util"], knownModules["node-red-func"], knownModules["globals"], knownModules["console"], knownModules["buffer"], knownModules["timers"] , knownModules["util"] ];
|
||||
|
||||
const modulesCache = {};
|
||||
|
||||
|
@ -153,9 +162,9 @@ RED.editor.codeEditor.monaco = (function() {
|
|||
|
||||
function init(options) {
|
||||
|
||||
//Handles orphaned models
|
||||
//Handles orphaned models
|
||||
//ensure loaded models that are not explicitly destroyed by a call to .destroy() are disposed
|
||||
RED.events.on("editor:close",function() {
|
||||
RED.events.on("editor:close",function() {
|
||||
let models = window.monaco ? monaco.editor.getModels() : null;
|
||||
if(models && models.length) {
|
||||
console.warn("Cleaning up monaco models left behind. Any node that calls createEditor() should call .destroy().")
|
||||
|
@ -170,7 +179,7 @@ RED.editor.codeEditor.monaco = (function() {
|
|||
|
||||
options = options || {};
|
||||
window.MonacoEnvironment = window.MonacoEnvironment || {};
|
||||
window.MonacoEnvironment.getWorkerUrl = function (moduleId, label) {
|
||||
window.MonacoEnvironment.getWorkerUrl = window.MonacoEnvironment.getWorkerUrl || function (moduleId, label) {
|
||||
if (label === 'json') { return './vendor/monaco/dist/json.worker.js'; }
|
||||
if (label === 'css' || label === 'scss') { return './vendor/monaco/dist/css.worker.js'; }
|
||||
if (label === 'html' || label === 'handlebars') { return './vendor/monaco/dist/html.worker.js'; }
|
||||
|
@ -181,19 +190,35 @@ RED.editor.codeEditor.monaco = (function() {
|
|||
var editorSettings = RED.editor.codeEditor.settings || {};
|
||||
var editorOptions = editorSettings.options || {};
|
||||
|
||||
if (editorOptions.theme) {
|
||||
if (!monacoThemes.includes(editorOptions.theme)) {
|
||||
var customTheme = 'vendor/monaco/dist/theme/' + editorOptions.theme + '.json';
|
||||
$.get(customTheme, function (theme) {
|
||||
monacoThemes.push(editorOptions.theme);//add to list of loaded themes
|
||||
if ((theme.rules && Array.isArray(theme.rules)) || theme.colors) {
|
||||
monaco.editor.defineTheme(editorOptions.theme, theme);
|
||||
monaco.editor.setTheme(editorOptions.theme);
|
||||
//if editorOptions.theme is an object (set in theme.js context()), use the plugin theme name as the monaco theme name
|
||||
//if editorOptions.theme is a string, it should be the name of a pre-set theme, load that
|
||||
try {
|
||||
const addTheme = function (themeThemeName, theme) {
|
||||
if ((theme.rules && Array.isArray(theme.rules)) || theme.colors) {
|
||||
monacoThemes.push(themeThemeName); //add to list of loaded themes
|
||||
monaco.editor.defineTheme(themeThemeName, theme);
|
||||
monaco.editor.setTheme(themeThemeName);
|
||||
userSelectedTheme = themeThemeName;
|
||||
}
|
||||
};
|
||||
if (editorOptions.theme) {
|
||||
if (typeof editorOptions.theme == "object" && RED.settings.editorTheme.theme) {
|
||||
let themeThemeName = editorOptions.theme.name || RED.settings.editorTheme.theme;
|
||||
addTheme(themeThemeName, editorOptions.theme);
|
||||
} else if (typeof editorOptions.theme == "string") {
|
||||
let themeThemeName = editorOptions.theme;
|
||||
if (!monacoThemes.includes(themeThemeName)) {
|
||||
$.get('vendor/monaco/dist/theme/' + themeThemeName + '.json', function (theme) {
|
||||
addTheme(themeThemeName, theme);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn(error);
|
||||
}
|
||||
|
||||
|
||||
//Helper function to simplify snippet setup
|
||||
function createMonacoCompletionItem(label, insertText, documentation, range, kind) {
|
||||
if (Array.isArray(documentation)) { documentation = documentation.join("\n"); }
|
||||
|
@ -560,7 +585,7 @@ RED.editor.codeEditor.monaco = (function() {
|
|||
createMonacoCompletionItem("set (flow context)", 'flow.set("${1:name}", ${1:value});','Set a value in flow context',range),
|
||||
createMonacoCompletionItem("get (global context)", 'global.get("${1:name}");','Get a value from global context',range),
|
||||
createMonacoCompletionItem("set (global context)", 'global.set("${1:name}", ${1:value});','Set a value in global context',range),
|
||||
createMonacoCompletionItem("get (env)", 'env.get("${1:name}");','Get env variable value',range),
|
||||
createMonacoCompletionItem("get (env)", 'env.get("${1|NR_NODE_ID,NR_NODE_NAME,NR_NODE_PATH,NR_GROUP_ID,NR_GROUP_NAME,NR_FLOW_ID,NR_FLOW_NAME|}");','Get env variable value',range),
|
||||
createMonacoCompletionItem("cloneMessage (RED.util)", 'RED.util.cloneMessage(${1:msg});',
|
||||
["```typescript",
|
||||
"RED.util.cloneMessage<T extends registry.NodeMessage>(msg: T): T",
|
||||
|
@ -653,6 +678,8 @@ RED.editor.codeEditor.monaco = (function() {
|
|||
noSyntaxValidation: false,
|
||||
diagnosticCodesToIgnore: [
|
||||
1108, //return not inside function
|
||||
1375, //'await' expressions are only allowed at the top level of a file when that file is a module
|
||||
1378, //Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher
|
||||
//2304, //Cannot find name - this one is heavy handed and prevents user seeing stupid errors. Would provide better ACE feature parity (i.e. no need for declaration of vars) but misses lots of errors. Lets be bold & leave it out!
|
||||
2307, //Cannot find module 'xxx' or its corresponding type declarations
|
||||
2322, //Type 'unknown' is not assignable to type 'string'
|
||||
|
@ -728,13 +755,25 @@ RED.editor.codeEditor.monaco = (function() {
|
|||
mode = "html";
|
||||
break;
|
||||
case "appcache":
|
||||
case "sh":
|
||||
case "bash":
|
||||
mode = "shell";
|
||||
break;
|
||||
case "batchfile":
|
||||
mode = "bat";
|
||||
break;
|
||||
case "protobuf":
|
||||
mode = "proto";
|
||||
break;
|
||||
//TODO: add other compatability types.
|
||||
}
|
||||
return mode;
|
||||
}
|
||||
|
||||
|
||||
if(!options.stateId && options.stateId !== false) {
|
||||
options.stateId = RED.editor.generateViewStateId("monaco", options, (options.mode || options.title || "").split("/").pop());
|
||||
}
|
||||
var el = options.element || $("#"+options.id)[0];
|
||||
var toolbarRow = $("<div>").appendTo(el);
|
||||
el = $("<div>").appendTo(el).addClass("red-ui-editor-text-container")[0];
|
||||
|
@ -742,12 +781,16 @@ RED.editor.codeEditor.monaco = (function() {
|
|||
var editorOptions = $.extend({}, editorSettings.options, options);
|
||||
editorOptions.language = convertAceModeToMonacoLang(options.mode);
|
||||
|
||||
if(userSelectedTheme) {
|
||||
editorOptions.theme = userSelectedTheme;//use user selected theme for this session
|
||||
}
|
||||
|
||||
//by default, set javascript editors to text mode.
|
||||
//when element becomes visible, it will be (re) set to javascript mode
|
||||
//this is to ensure multiple editors sharing the model dont present its
|
||||
//this is to ensure multiple editors sharing the model dont present its
|
||||
//consts & lets to each other
|
||||
if(editorOptions.language == "javascript") {
|
||||
editorOptions._language = editorOptions.language;
|
||||
editorOptions._language = editorOptions.language;
|
||||
editorOptions.language = "text"
|
||||
}
|
||||
|
||||
|
@ -921,6 +964,15 @@ RED.editor.codeEditor.monaco = (function() {
|
|||
/*********** Create the monaco editor ***************/
|
||||
var ed = monaco.editor.create(el, editorOptions);
|
||||
|
||||
//Unbind ctrl-Enter (default action is to insert a newline in editor) This permits the shortcut to close the tray.
|
||||
try {
|
||||
ed._standaloneKeybindingService.addDynamicKeybinding(
|
||||
'-editor.action.insertLineAfter', // command ID prefixed by '-'
|
||||
null, // keybinding
|
||||
() => {} // need to pass an empty handler
|
||||
);
|
||||
} catch (error) { }
|
||||
|
||||
ed.nodered = {
|
||||
refreshModuleLibs: refreshModuleLibs //expose this for function node externalModules refresh
|
||||
}
|
||||
|
@ -967,7 +1019,7 @@ RED.editor.codeEditor.monaco = (function() {
|
|||
if (cb && typeof cb == "function") {
|
||||
cb();
|
||||
}
|
||||
if(resize) {
|
||||
if(resize) {
|
||||
this.resize(); //cause a call to layout()
|
||||
}
|
||||
}
|
||||
|
@ -1066,6 +1118,7 @@ RED.editor.codeEditor.monaco = (function() {
|
|||
try {
|
||||
var m = this.getModel();
|
||||
if(m && !m.isDisposed()) {
|
||||
ed._initState = null;
|
||||
m.dispose();
|
||||
}
|
||||
this.setModel(null);
|
||||
|
@ -1115,19 +1168,19 @@ RED.editor.codeEditor.monaco = (function() {
|
|||
// Warning: 4
|
||||
// Error: 8
|
||||
ed.getAnnotations = function getAnnotations() {
|
||||
var aceCompatibleMarkers = [];
|
||||
let aceCompatibleMarkers;
|
||||
try {
|
||||
var _model = ed.getModel();
|
||||
const _model = ed.getModel();
|
||||
if (_model !== null) {
|
||||
var id = _model.getModeId(); // e.g. javascript
|
||||
var ra = _model._associatedResource.authority; //e.g. model
|
||||
var rp = _model._associatedResource.path; //e.g. /18
|
||||
var rs = _model._associatedResource.scheme; //e.g. inmemory
|
||||
var modelMarkers = monaco.editor.getModelMarkers(_model) || [];
|
||||
var thisEditorsMarkers = modelMarkers.filter(function (marker) {
|
||||
var _ra = marker.resource.authority; //e.g. model
|
||||
var _rp = marker.resource.path; //e.g. /18
|
||||
var _rs = marker.resource.scheme; //e.g. inmemory
|
||||
const id = _model.getLanguageId(); // e.g. javascript
|
||||
const ra = _model.uri.authority; // e.g. model
|
||||
const rp = _model.uri.path; // e.g. /18
|
||||
const rs = _model.uri.scheme; // e.g. inmemory
|
||||
const modelMarkers = monaco.editor.getModelMarkers(_model) || [];
|
||||
const thisEditorsMarkers = modelMarkers.filter(function (marker) {
|
||||
const _ra = marker.resource.authority; // e.g. model
|
||||
const _rp = marker.resource.path; // e.g. /18
|
||||
const _rs = marker.resource.scheme; // e.g. inmemory
|
||||
return marker.owner == id && _ra === ra && _rp === rp && _rs === rs;
|
||||
})
|
||||
aceCompatibleMarkers = thisEditorsMarkers.map(function (marker) {
|
||||
|
@ -1158,7 +1211,10 @@ RED.editor.codeEditor.monaco = (function() {
|
|||
return { row: p.lineNumber-1, column: p.column-1 };
|
||||
}
|
||||
|
||||
ed.setTheme = monaco.editor.setTheme;
|
||||
ed.setTheme = function(theme) {
|
||||
monaco.editor.setTheme(theme);
|
||||
userSelectedTheme = theme;//remember users choice for this session
|
||||
}
|
||||
|
||||
ed.on = function (name, cb) {
|
||||
switch (name) {
|
||||
|
@ -1208,17 +1264,10 @@ RED.editor.codeEditor.monaco = (function() {
|
|||
//#endregion "ACE compatability"
|
||||
|
||||
//final setup
|
||||
if (options.cursor) {
|
||||
var row = options.cursor.row || options.cursor.lineNumber;
|
||||
var col = options.cursor.column || options.cursor.col;
|
||||
ed.gotoLine(row, col);
|
||||
}
|
||||
if (options.focus) {
|
||||
ed.focus();
|
||||
}
|
||||
ed.focusMemory = options.focus;
|
||||
ed._mode = editorOptions.language;
|
||||
|
||||
//as models are signleton, consts and let are avialable to other javascript instances
|
||||
//as models are signleton, consts and let are avialable to other javascript instances
|
||||
//so when not focused, set editor mode to text temporarily to avoid multiple defs
|
||||
|
||||
if(editorOptions._language) {
|
||||
|
@ -1227,11 +1276,12 @@ RED.editor.codeEditor.monaco = (function() {
|
|||
}
|
||||
|
||||
ed.onDidBlurEditorWidget(function() {
|
||||
ed.focusMemory = false;
|
||||
ed.saveView();
|
||||
if(isVisible(el) == false) {
|
||||
onVisibilityChange(false, 0, el);
|
||||
}
|
||||
});
|
||||
|
||||
ed.onDidFocusEditorWidget(function() {
|
||||
onVisibilityChange(true, 10, el);
|
||||
});
|
||||
|
@ -1240,15 +1290,15 @@ RED.editor.codeEditor.monaco = (function() {
|
|||
try {
|
||||
var options = {
|
||||
root: $(element).closest("div.red-ui-tray-content")[0] || document,
|
||||
attributes: true,
|
||||
childList: true,
|
||||
attributes: true,
|
||||
childList: true,
|
||||
};
|
||||
var observer = new IntersectionObserver(function(entries, observer) {
|
||||
entries.forEach(function(entry) {
|
||||
callback(entry.intersectionRatio > 0, 5, entry.target);
|
||||
});
|
||||
}, options);
|
||||
observer.observe(element);
|
||||
observer.observe(element);
|
||||
} catch (e1) {
|
||||
//browser not supporting IntersectionObserver? then fall back to polling!
|
||||
try {
|
||||
|
@ -1265,19 +1315,35 @@ RED.editor.codeEditor.monaco = (function() {
|
|||
}
|
||||
|
||||
function onVisibilityChange(visible, delay, element) {
|
||||
if(visible) {
|
||||
if(ed._mode == "javascript" && ed._tempMode == "text") {
|
||||
ed._tempMode = "";
|
||||
setTimeout(function() {
|
||||
if(element.parentElement) { //ensure el is still in DOM
|
||||
delay = delay || 50;
|
||||
if (visible) {
|
||||
if (ed.focusMemory) {
|
||||
setTimeout(function () {
|
||||
if (element.parentElement) { //ensure el is still in DOM
|
||||
ed.focus();
|
||||
}
|
||||
}, 300)
|
||||
}
|
||||
if (ed._initState) {
|
||||
setTimeout(function () {
|
||||
if (element.parentElement) { //ensure el is still in DOM
|
||||
ed.restoreViewState(ed._initState);
|
||||
ed._initState = null;
|
||||
}
|
||||
}, delay);
|
||||
}
|
||||
if (ed._mode == "javascript" && ed._tempMode == "text") {
|
||||
ed._tempMode = "";
|
||||
setTimeout(function () {
|
||||
if (element.parentElement) { //ensure el is still in DOM
|
||||
ed.setMode('javascript', undefined, false);
|
||||
}
|
||||
}, delay || 50);
|
||||
}, delay);
|
||||
}
|
||||
} else if(ed._mode == "javascript" && ed._tempMode != "text") {
|
||||
if(element.parentElement) { //ensure el is still in DOM
|
||||
} else if (ed._mode == "javascript" && ed._tempMode != "text") {
|
||||
if (element.parentElement) { //ensure el is still in DOM
|
||||
ed.setMode('text', undefined, false);
|
||||
ed._tempMode = "text";
|
||||
ed._tempMode = "text";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1294,15 +1360,19 @@ RED.editor.codeEditor.monaco = (function() {
|
|||
expandButton.on("click", function (e) {
|
||||
e.preventDefault();
|
||||
var value = ed.getValue();
|
||||
ed.saveView();
|
||||
RED.editor.editMarkdown({
|
||||
value: value,
|
||||
width: "Infinity",
|
||||
cursor: ed.getCursorPosition(),
|
||||
stateId: options.stateId,
|
||||
cancel: function () {
|
||||
ed.focus();
|
||||
},
|
||||
complete: function (v, cursor) {
|
||||
ed.setValue(v, -1);
|
||||
ed.gotoLine(cursor.row + 1, cursor.column, false);
|
||||
setTimeout(function () {
|
||||
ed.focus();
|
||||
ed.restoreView();
|
||||
}, 300);
|
||||
}
|
||||
})
|
||||
|
@ -1318,7 +1388,37 @@ RED.editor.codeEditor.monaco = (function() {
|
|||
autoClose: 50
|
||||
});
|
||||
}
|
||||
|
||||
ed.getView = function () {
|
||||
return ed.saveViewState();
|
||||
}
|
||||
ed.saveView = function (debuginfo) {
|
||||
if (!options.stateId) { return; } //only possible if created with a unique stateId
|
||||
window._editorStateMonaco = window._editorStateMonaco || {};
|
||||
var state = ed.getView();
|
||||
window._editorStateMonaco[options.stateId] = state;
|
||||
return state;
|
||||
}
|
||||
ed.restoreView = function (state) {
|
||||
if (!options.stateId) { return; } //only possible if created with a unique stateId
|
||||
window._editorStateMonaco = window._editorStateMonaco || {};
|
||||
var _state = state || window._editorStateMonaco[options.stateId];
|
||||
if (!_state) { return; } //no view state available
|
||||
try {
|
||||
if (ed.type) { //is editor already initialised?
|
||||
ed.restoreViewState(_state);
|
||||
} else {
|
||||
ed._initState = _state;
|
||||
}
|
||||
} catch (error) {
|
||||
delete window._editorStateMonaco[options.stateId];
|
||||
}
|
||||
};
|
||||
ed.restoreView();
|
||||
if (options.cursor && !ed._initState) {
|
||||
var row = options.cursor.row || options.cursor.lineNumber;
|
||||
var col = options.cursor.column || options.cursor.col;
|
||||
ed.gotoLine(row, col);
|
||||
}
|
||||
ed.type = type;
|
||||
return ed;
|
||||
}
|
||||
|
@ -1353,4 +1453,4 @@ RED.editor.codeEditor.monaco = (function() {
|
|||
*/
|
||||
create: create
|
||||
}
|
||||
})();
|
||||
})();
|
||||
|
|
|
@ -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);
|
||||
});
|
625
packages/node_modules/@node-red/editor-client/src/js/ui/editors/envVarList.js
vendored
Normal 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("••••••••").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
|
||||
}
|
||||
})();
|
|
@ -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,
|
||||
|
@ -233,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
|
||||
});
|
||||
|
@ -247,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);
|
||||
|
@ -259,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;
|
||||
|
@ -271,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, null, (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);
|
||||
}
|
||||
}
|
||||
|
@ -302,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
|
||||
|
|
99
packages/node_modules/@node-red/editor-client/src/js/ui/editors/iconPicker.js
vendored
Normal 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(" ");
|
||||
})
|
||||
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
|
||||
}
|
||||
})();
|
|
@ -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() {}
|
||||
}
|
||||
|
|
|
@ -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,17 +624,15 @@
|
|||
|
||||
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() {
|
||||
if (options.onclose) {
|
||||
|
|
|
@ -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);
|
||||
RED.editor.mermaid.render()
|
||||
},200);
|
||||
})
|
||||
if (options.header) {
|
||||
|
@ -117,6 +178,7 @@
|
|||
|
||||
if (value) {
|
||||
$(".red-ui-editor-type-markdown-panel-preview").html(RED.utils.renderMarkdown(expressionEditor.getValue()));
|
||||
RED.editor.mermaid.render()
|
||||
}
|
||||
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);
|
||||
})();
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
RED.editor.mermaid = (function () {
|
||||
let initializing = false
|
||||
let loaded = false
|
||||
let pendingEvals = []
|
||||
let diagramIds = 0
|
||||
|
||||
function render(selector = '.mermaid') {
|
||||
// $(selector).hide()
|
||||
if (!loaded) {
|
||||
pendingEvals.push(selector)
|
||||
|
||||
if (!initializing) {
|
||||
initializing = true
|
||||
$.getScript(
|
||||
'vendor/mermaid/mermaid.min.js',
|
||||
function (data, stat, jqxhr) {
|
||||
mermaid.initialize({
|
||||
startOnLoad: false
|
||||
})
|
||||
loaded = true
|
||||
while(pendingEvals.length > 0) {
|
||||
const pending = pendingEvals.shift()
|
||||
render(pending)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
} else {
|
||||
const nodes = document.querySelectorAll(selector)
|
||||
|
||||
nodes.forEach(async node => {
|
||||
if (!node.getAttribute('mermaid-processed')) {
|
||||
const mermaidContent = node.innerText
|
||||
node.setAttribute('mermaid-processed', true)
|
||||
try {
|
||||
const { svg } = await mermaid.render('mermaid-render-'+Date.now()+'-'+(diagramIds++), mermaidContent);
|
||||
node.innerHTML = svg
|
||||
} catch (err) {
|
||||
$('<div>').css({
|
||||
fontSize: '0.8em',
|
||||
border: '1px solid var(--red-ui-border-color-error)',
|
||||
padding: '5px',
|
||||
marginBottom: '10px',
|
||||
}).text(err.toString()).prependTo(node)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
return {
|
||||
render: render,
|
||||
};
|
||||
})();
|
530
packages/node_modules/@node-red/editor-client/src/js/ui/editors/panes/appearance.js
vendored
Normal 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" 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;
|
||||
}
|
||||
|
||||
|
||||
})();
|
67
packages/node_modules/@node-red/editor-client/src/js/ui/editors/panes/description.js
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
;(function() {
|
||||
|
||||
RED.editor.registerEditPane("editor-tab-description", function(node) {
|
||||
return {
|
||||
label: RED._("editor-tab.description"),
|
||||
name: RED._("editor-tab.description"),
|
||||
iconClass: "fa fa-file-text-o",
|
||||
|
||||
create: function(container) {
|
||||
this.editor = buildDescriptionForm(container,node);
|
||||
},
|
||||
resize: function(size) {
|
||||
this.editor.resize();
|
||||
},
|
||||
close: function() {
|
||||
this.editor.destroy();
|
||||
this.editor = null;
|
||||
},
|
||||
show: function() {
|
||||
this.editor.focus();
|
||||
},
|
||||
apply: function(editState) {
|
||||
var oldInfo = node.info;
|
||||
var newInfo = this.editor.getValue();
|
||||
if (!!oldInfo) {
|
||||
// Has existing info property
|
||||
if (newInfo.trim() === "") {
|
||||
// New value is blank - remove the property
|
||||
editState.changed = true;
|
||||
editState.changes.info = oldInfo;
|
||||
delete node.info;
|
||||
} else if (newInfo !== oldInfo) {
|
||||
// New value is different
|
||||
editState.changed = true;
|
||||
editState.changes.info = oldInfo;
|
||||
node.info = newInfo;
|
||||
}
|
||||
} else {
|
||||
// No existing info
|
||||
if (newInfo.trim() !== "") {
|
||||
// New value is not blank
|
||||
editState.changed = true;
|
||||
editState.changes.info = undefined;
|
||||
node.info = newInfo;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function buildDescriptionForm(container,node) {
|
||||
var dialogForm = $('<form class="dialog-form form-horizontal" autocomplete="off"></form>').appendTo(container);
|
||||
var toolbarRow = $('<div></div>').appendTo(dialogForm);
|
||||
var row = $('<div class="form-row node-text-editor-row" style="position:relative; padding-top: 4px; height: 100%"></div>').appendTo(dialogForm);
|
||||
var editorId = "node-info-input-info-editor-"+Math.floor(1000*Math.random());
|
||||
$('<div style="height: 100%" class="node-text-editor" id="'+editorId+'" ></div>').appendTo(row);
|
||||
var nodeInfoEditor = RED.editor.createEditor({
|
||||
id: editorId,
|
||||
mode: 'ace/mode/markdown',
|
||||
stateId: RED.editor.generateViewStateId("node", node, "nodeinfo"),
|
||||
value: node.info || ""
|
||||
});
|
||||
node.infoEditor = nodeInfoEditor;
|
||||
return nodeInfoEditor;
|
||||
}
|
||||
|
||||
})();
|
75
packages/node_modules/@node-red/editor-client/src/js/ui/editors/panes/envVarProperties.js
vendored
Normal file
|
@ -0,0 +1,75 @@
|
|||
;(function() {
|
||||
|
||||
RED.editor.registerEditPane("editor-tab-envProperties", function(node) {
|
||||
return {
|
||||
label: RED._("editor-tab.envProperties"),
|
||||
name: RED._("editor-tab.envProperties"),
|
||||
iconClass: "fa fa-list",
|
||||
create: function(container) {
|
||||
var form = $('<form class="dialog-form form-horizontal"></form>').appendTo(container);
|
||||
var listContainer = $('<div class="form-row node-input-env-container-row"></div>').appendTo(form);
|
||||
this.list = $('<ol></ol>').appendTo(listContainer);
|
||||
RED.editor.envVarList.create(this.list, node);
|
||||
},
|
||||
resize: function(size) {
|
||||
this.list.editableList('height',size.height);
|
||||
},
|
||||
close: function() {
|
||||
|
||||
},
|
||||
apply: function(editState) {
|
||||
var old_env = node.env;
|
||||
var new_env = [];
|
||||
if (/^subflow:/.test(node.type)) {
|
||||
new_env = RED.subflow.exportSubflowInstanceEnv(node);
|
||||
}
|
||||
|
||||
// Get the values from the Properties table tab
|
||||
var items = this.list.editableList('items');
|
||||
items.each(function (i,el) {
|
||||
var data = el.data('data');
|
||||
var item;
|
||||
if (data.nameField && data.valueField) {
|
||||
item = {
|
||||
name: data.nameField.val(),
|
||||
value: data.valueField.typedInput("value"),
|
||||
type: data.valueField.typedInput("type")
|
||||
}
|
||||
if (item.name.trim() !== "") {
|
||||
new_env.push(item);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if (new_env && new_env.length > 0) {
|
||||
new_env.forEach(function(prop) {
|
||||
if (prop.type === "cred") {
|
||||
node.credentials = node.credentials || {_:{}};
|
||||
node.credentials[prop.name] = prop.value;
|
||||
node.credentials['has_'+prop.name] = (prop.value !== "");
|
||||
if (prop.value !== '__PWRD__') {
|
||||
editState.changed = true;
|
||||
}
|
||||
delete prop.value;
|
||||
}
|
||||
});
|
||||
}
|
||||
if (!old_env && new_env.length === 0) {
|
||||
delete node.env;
|
||||
} else if (!isSameObj(old_env, new_env)) {
|
||||
editState.changes.env = node.env;
|
||||
if (new_env.length === 0) {
|
||||
delete node.env;
|
||||
} else {
|
||||
node.env = new_env;
|
||||
}
|
||||
editState.changed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
function isSameObj(env0, env1) {
|
||||
return (JSON.stringify(env0) === JSON.stringify(env1));
|
||||
}
|
||||
})();
|