Compare commits

..

77 Commits

Author SHA1 Message Date
Nick O'Leary
f91762ec8f Merge pull request #3832 from node-red/update-gen-pub-script
Update gen pub script
2022-08-04 14:09:28 +01:00
Nick O'Leary
7f698610df Update generate-publish-script with latest release number 2022-08-04 14:08:04 +01:00
Nick O'Leary
bee06f64f5 Merge pull request #3831 from node-red/release-223
Update changelog
2022-08-04 14:01:45 +01:00
Nick O'Leary
53af4231af Update changelog 2022-08-04 14:00:37 +01:00
Nick O'Leary
2ea4b15dca Merge pull request #3829 from Steve-Mcl/backport-3776
Allow HTTP Headers not in spec (backport to v2.x)
2022-08-04 13:49:43 +01:00
Nick O'Leary
ce09f56dcc Update packages/node_modules/@node-red/nodes/locales/en-US/messages.json 2022-08-04 13:49:04 +01:00
Ben Hardill
6c648e4bab Allow HTTP Headers not in spec
potential fix for #3772
2022-08-04 13:48:03 +01:00
Nick O'Leary
72661aa159 Merge pull request #3828 from Steve-Mcl/backport-3762
Fix storing subflow credential type when input has multiple types (backport to v2.x)
2022-08-04 13:00:33 +01:00
Nick O'Leary
16e79d6bd2 Merge pull request #3827 from Steve-Mcl/backport-3754
Fix change node, not handling from field properly when using context (backport to v2.x)
2022-08-04 13:00:16 +01:00
Nick O'Leary
726fac97d2 Merge pull request #3826 from Steve-Mcl/backport-3728
Do not remove unknown credentials of Subflow Modules (backport to v2.x)
2022-08-04 13:00:06 +01:00
Nick O'Leary
efc3882961 Merge pull request #3825 from Steve-Mcl/backport-3716
Fix CSV node to handle \n when outputting text fields (backport to v2.x)
2022-08-04 12:59:15 +01:00
Nick O'Leary
489c456271 Merge pull request #3824 from Steve-Mcl/backport-3709
Fix delay rate limit last timing when empty (backport to v2.x)
2022-08-04 12:59:06 +01:00
Nick O'Leary
970be7b5f2 Merge pull request #3823 from Steve-Mcl/backport-3715
Ensure 'hidden flow' count doesn't include subflows (backport to v2.x)
2022-08-04 12:58:49 +01:00
Nick O'Leary
b94fdd2f79 Merge pull request #3822 from Steve-Mcl/backport-3703
Fix credential type input item of subflow template (backport to v2.x)
2022-08-04 12:58:39 +01:00
Nick O'Leary
66f6bc59fa Merge pull request #3821 from Steve-Mcl/backport-3670
Join-reduce keep existing msg properties (backport to v2.x)
2022-08-04 12:58:21 +01:00
Stephen McLaughlin
455f2dc800 delete console.log artefact 2022-08-04 12:35:34 +01:00
Nick O'Leary
aed2b8e46d Fix storing subflow credential type when input has multiple types
Fixes #3749
2022-08-04 10:39:04 +01:00
Franck Mourre
633afbbb44 Fix change node, not handling from field properly when using context 2022-08-04 10:00:09 +01:00
Nick O'Leary
6c797e35cf Update packages/node_modules/@node-red/runtime/lib/nodes/credentials.js 2022-08-04 09:57:14 +01:00
Nick O'Leary
30b8a95421 Do not remove unknown credentials of Subflow Modules
Fixes #3641
2022-08-04 09:57:14 +01:00
Dave Conway-Jones
7665971b52 Fix CSV node to handle \n when outputting text fields
and add tests
2022-08-04 09:56:26 +01:00
Dave Conway-Jones
ba6dc3117f Delay node - add example for simple queue with release 2022-08-04 09:55:04 +01:00
Dave Conway-Jones
73fcc05a54 Fix delay rate limit last timing when empty 2022-08-04 09:55:04 +01:00
Nick O'Leary
fd409b0636 Ensure 'hidden flow' count doesn't include subflows
Fixes #3707
2022-08-04 09:53:04 +01:00
Hiroyasu Nishiyama
29287149b4 remove line break to prevent jshint error 2022-08-04 09:43:45 +01:00
Hiroyasu Nishiyama
18c0ec990a fix type selector of subflow environment variable 2022-08-04 09:43:45 +01:00
Hiroyasu Nishiyama
ee2b151b7a fix credential type input item of subflow template 2022-08-04 09:43:44 +01:00
Steve-Mcl
2d7a068644 Join-reduce keep existing msg properties
see https://discourse.nodered.org/t/no-response-object-after-split-join/63919
2022-08-04 09:39:43 +01:00
Nick O'Leary
5c5855751c Merge pull request #3735 from kazuhitoyokoi/v2.x-backports
Backports to v2.x
2022-07-04 21:03:03 +01:00
Kazuhito Yokoi
396b3b64ff Fix typo in message catalog (Backport node-red#3724 to v2.x) 2022-07-04 21:38:25 +09:00
Kazuhito Yokoi
48e33a472b Fix use default button for node icon (Backport node-red#3714 to v2.x) 2022-07-04 21:35:44 +09:00
Nick O'Leary
a7375e4e8f Merge pull request #3705 from kazuhitoyokoi/v2.x-addjpn
Backports to v2.x
2022-06-27 14:15:26 +01:00
Kazuhito Yokoi
42732db2b0 Fix typos in message catalog (Backport node-red#3622 to v2.x) 2022-06-26 11:20:05 +09:00
Kazuhito Yokoi
7c830856df Remove unnecessary spaces (Backport node-red#3688 to v2.x) 2022-06-26 11:16:01 +09:00
Kazuhito Yokoi
5dad33dc77 Change indents from tabs to 4 spaces (Backport node-red#3512 to v2.x) 2022-06-26 11:06:12 +09:00
Kazuhito Yokoi
cbdb988d02 Fix indents in other code except message catalog (Backport node-red#3622 to v2.x) 2022-06-26 10:57:17 +09:00
Kazuhito Yokoi
e944dfecc2 Add Japanese translations (Backport node-red#3688 to v2.x) 2022-06-26 10:08:22 +09:00
Kazuhito Yokoi
b2c2b9bd14 Add Japanese translations (Backport node-red#3576 to v2.x) 2022-06-26 09:48:42 +09:00
Nick O'Leary
0ed7f6ce4e Merge pull request #3665 from Steve-Mcl/backport-3647
Fix to extend escaped subflow category characters (backport #3647 to v2.x)
2022-06-16 11:16:54 +01:00
Nick O'Leary
74e3b9e9ed Merge pull request #3664 from Steve-Mcl/backport-3643
Reset mouse state when switching tabs (Backport #3643 to v2.x)
2022-06-16 11:16:34 +01:00
Nick O'Leary
7fd884c68f Merge pull request #3663 from Steve-Mcl/backport-3646
Fix to sanitize tab name (Backport #3646 to v2.x)
2022-06-16 11:16:18 +01:00
Nick O'Leary
3f29283724 Merge pull request #3662 from Steve-Mcl/backport-3645
Fix ESM module loading in Function node (Backport #3645 to v2.x)
2022-06-16 11:15:55 +01:00
Nick O'Leary
ea303495b0 Merge pull request #3661 from Steve-Mcl/backport-3633
fix new folder menu of save to library dialog (backport #3633 to v2.x)
2022-06-16 11:14:43 +01:00
Nick O'Leary
9d39709038 Merge pull request #3660 from Steve-Mcl/backport-3632
Fix JSONata evaluation of inject button (Backport 3632 to v2.x)
2022-06-16 11:14:26 +01:00
Nick O'Leary
facb6143c3 Merge pull request #3659 from Steve-Mcl/backport-3624
fix buffer parse error message of evaluateNodeProperty (backports #3624 for v2.x)
2022-06-16 11:14:13 +01:00
Nick O'Leary
68a2786ff2 Merge pull request #3658 from Steve-Mcl/backport-3630
Dont delete TCP socket twice (backport Backport: #3630 to v2.x)
2022-06-16 11:13:17 +01:00
Nick O'Leary
b2b31670f8 Merge pull request #3657 from Steve-Mcl/backport-3611
Ensure ACE worker options are set (Backport 3611 to v2.x)
2022-06-16 11:13:02 +01:00
Nick O'Leary
355fb724f8 Merge pull request #3656 from Steve-Mcl/backport-3548
Fix browser console error Uncaught TypeError when searching certain terms (Backport #3548 to v2.x)
2022-06-16 11:12:47 +01:00
Nick O'Leary
d925f12aea Merge pull request #3655 from Steve-Mcl/dup-hist-event
Remove duplicate history add of ungroup event (backport #3581to v2.x)
2022-06-16 11:12:11 +01:00
Nick O'Leary
428ed090f3 Merge pull request #3654 from Steve-Mcl/mqtt-backport
Mqtt fixes in v3 for v2.x (backports #3563 #3594 #3626 to v2.x)
2022-06-16 11:11:50 +01:00
Steve-Mcl
9946132658 extend escaped subflow category characters
@HiroyasuNishiyama commit 30d88bbe7e

Co-authored-by: HiroyasuNishiyama <hiroyasu.nishiyama.uq@hitachi.com>
2022-06-14 07:47:54 +01:00
Steve-Mcl
30f08a9f17 Track mouse release outside workspace so current action completes
manual cherry pick a16032a
2022-06-14 07:39:19 +01:00
Nick O'Leary
83f1729d83 Reset mouse state when switching tabs
Fixes #3639
2022-06-14 07:35:11 +01:00
Hiroyasu Nishiyama
3667de18a9 sanitize tab name 2022-06-13 14:56:57 +01:00
Nick O'Leary
bda8e86ea4 Fix ESM module loading in Function node
Fixes #3627
2022-06-13 14:53:06 +01:00
Hiroyasu Nishiyama
7920fa1dd4 fix new folder menu of save to library dialog 2022-06-13 14:48:16 +01:00
Hiroyasu Nishiyama
cb06690553 update test for inject node 2022-06-13 13:52:28 +01:00
Hiroyasu Nishiyama
4b4e5a0861 fix JSONata evaluation of inject button 2022-06-13 13:52:28 +01:00
Hiroyasu Nishiyama
e5952f082e fix buffer parse error message of evaluateNodeProperty 2022-06-13 13:48:22 +01:00
Stephen McLaughlin
c7994b6393 Dont delete TCP socket twice 2022-06-13 13:40:50 +01:00
Steve-Mcl
39ac6b0d46 fix typo 2022-06-13 13:33:30 +01:00
Stephen McLaughlin
e22bf22b61 Ensure ACE worker options are set
fixes #3610
2022-06-13 13:25:43 +01:00
Steve-Mcl
92dd80ac49 declare undeclared loop var 2022-06-13 13:21:46 +01:00
Steve-Mcl
9442e2a993 Prevent error when uses search term is used
fixes #3578
2022-06-13 13:21:46 +01:00
Nick O'Leary
6df7f50f9f Remove duplicate history add of ungroup event
Fixes #3581
2022-06-13 13:16:57 +01:00
Steve-Mcl
933cad888f add changes from #3563
Add client and Runtime MQTT topic validation and fix subsequent connection lockup
(that arises due to bad birth/will topic)
backport-2.x
2022-06-13 12:57:22 +01:00
Stephen McLaughlin
8133c5e834 define noproxy variable 2022-06-13 12:16:10 +01:00
Stephen McLaughlin
e7f6549cb6 Remove unnecessary call to clientRemoveListeners
Also, merge the non JSDOC comment into the JSDOC comment
2022-06-13 12:15:27 +01:00
Phil Day
2ded07c765 call client.end with force=true on timeout 2022-06-13 12:15:27 +01:00
Phil Day
6a799e7e2a Update packages/node_modules/@node-red/nodes/core/network/10-mqtt.js
Co-authored-by: Stephen McLaughlin <44235289+Steve-Mcl@users.noreply.github.com>
2022-06-13 12:15:27 +01:00
Phil Day
1d40378f8c Update packages/node_modules/@node-red/nodes/core/network/10-mqtt.js
Co-authored-by: Stephen McLaughlin <44235289+Steve-Mcl@users.noreply.github.com>
2022-06-13 12:15:27 +01:00
Phil Day
bcab1cf096 Update packages/node_modules/@node-red/nodes/core/network/10-mqtt.js
Co-authored-by: Stephen McLaughlin <44235289+Steve-Mcl@users.noreply.github.com>
2022-06-13 12:15:27 +01:00
Phil Day
03484fd5cd Updated to cover the removal of individual event handlers 2022-06-13 12:15:27 +01:00
Phil Day
1eea371124 Revent change of grunt version 2022-06-13 12:15:27 +01:00
Phil Day
02d9ad479d Track which event handlers we add to the mqtt client so we can removed them cleanly 2022-06-13 12:15:23 +01:00
Phil Day
3be75fa822 Add Force parameter mqtt client.end() when called in disconnect 2022-06-13 12:14:38 +01:00
Stephen McLaughlin
ca204dea2d Use new validation option to return better label
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
2022-06-13 12:11:42 +01:00
390 changed files with 24079 additions and 34113 deletions

View File

@@ -26,7 +26,7 @@ jobs:
path: 'node-red.github.io'
- uses: actions/setup-node@v1
with:
node-version: '16'
node-version: '12'
- run: node ./node-red/.github/scripts/update-node-red-docker.js
- name: Create Docker Pull Request
uses: peter-evans/create-pull-request@v2

View File

@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14, 16]
node-version: [12, 14, 16]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}

View File

@@ -1,214 +1,18 @@
#### 3.0.2: Maintenance Release
#### 2.2.3: Maintenance Release
Editor
- Fix workspace chart bottom property (#3812) @bonanitech
- Update german translation (#3802) @Dennis14e
- Support color reset to the default in subflow and group (#3801) @kazuhitoyokoi
- Allow generateNodeNames to handle names containing regex control chars (#3817) @knolleary
- Hide scrollbars until they're needed (#3808) @bonanitech
- Include junctions/groups when exporting subflows plus related fixes (#3816) @knolleary
- remove console.log (#3820) @Steve-Mcl
Runtime
- Register subflow module instance node with parent flow (#3818) @knolleary
Nodes
- HTTP Request: Allow HTTP Headers not in spec (#3776) @hardillb
#### 3.0.1: Maintenance Release
Editor
- Allow codeEditor theme to be set even if `codeEditor` is not set in settings.js (#3794) @Steve-Mcl
- Sys info (diagnostics report) amendments (#3793) @Steve-Mcl
- Allow `mode` and `title` to be omitted in `options` argument for `createEditor` (#3791) @Steve-Mcl
- Fix focus issues (#3789) @Steve-Mcl
- Ensure all typedInput buttons have button type set (#3788) @knolleary
- Do not flag hasUsers=false nodes as unused in search (#3787) @knolleary
- Properly position quick-add dialog in all cases (#3786) @knolleary
- Ensure quick-add dialog does not obscure ghost node when shifted (#3785) @knolleary
- Remove use of Object.hasOwn (#3784) @knolleary
#### 3.0.0: Milestone Release
Editor
- Use theme page and header values if settings.js values are not present (#3767) @Steve-Mcl
- Focus editor for undo after some actions in menu (#3759) @kazuhitoyokoi
- Ensure node icon shade has properly rounded corners (#3763) @knolleary
- Fix storing subflow credential type when input has multiple types (#3762) @knolleary
- Ensure global-config and flow-config have info in the hierarchy popover (#3752) @Steve-Mcl
- Include dirty state in history event (#3748) @Steve-Mcl
- Fix display direction of context sub-menu (#3746) @knolleary
- Fix clear pinned paths of debug sidebar menu (#3745) @HiroyasuNishiyama
- prevent exception generating tooltip for deleted nodes (#3742) @Steve-Mcl
- Fix context menu issues ready for v3 beta.5 (#3741) @Steve-Mcl
- Do not generate new node-ids when pasting a cut flow (#3729) @knolleary
- Fix to prevent node from moving out of workspace (#3731) @HiroyasuNishiyama
- Don't let themes change disabled config node background color (#3736) @bonanitech
- Move colors left behind in #3692 to CSS variables (#3737) @bonanitech
- Fix handling of global debug message (#3733) @HiroyasuNishiyama
- Fix label overflow @ config-node palette (#3730) @ralphwetzel
- Fix defaulting to monaco if settings does not contain codeEditor (#3732) @knolleary
- Disable keyboard shortcut mapping when showing Edit[..]Dialog (#3700) @ralphwetzel
- Update add-junction menu to work in more cases (#3727) @knolleary
- Ensure importMap is not null when using import UI (#3723) @Steve-Mcl
- Add Japanese translations for v3.0-beta.4 (#3724) @kazuhitoyokoi
- Fix "split with" on virtual links (#3766) @Steve-Mcl
Runtime
- Do not remove unknown credentials of Subflow Modules (#3728) @knolleary
- Add missing entries from beta.4 changelog (#3721) @knolleary
Nodes
- Change: Fix change node, not handling from field properly when using context (#3754) @Fadoli
- Link Call: Fix linkcall registry bugs (#3751) @Steve-Mcl
- WebSocket: Fix close timeout of websocket node (#3734) @HiroyasuNishiyama
#### 3.0.0-beta.4: Beta Release
Editor
- Move all colours to CSS variables (#3692) @bonanitech
- Fix clicking on node in workspace to hide context menu (#3696) @knolleary
- Fix credential type input item of subflow template (#3703) @HiroyasuNishiyama
- Add option flag `reimport` to `importNodes` (#3718) @Steve-Mcl
- Update german translation (#3691) @Dennis14e
- List welcome tours in help sidebar (#3717) @knolleary
- Ensure 'hidden flow' count doesn't include subflows (#3715) @knolleary
- Fix Chinese translate (#3706) @hotlong
- Fix use default button for node icon (#3714) @kazuhitoyokoi
- Fix select boxes vertical alignment (#3698) @bonanitech
- Ensure workspace clean after undoing dropped node (#3708) @Steve-Mcl
- Use solid colour as config node icon background to hide text overflow (#3710) @Steve-Mcl
- Increase quick-add height to reveal 2 most recent entries (#3711) @Steve-Mcl
- Set default editor to monaco in absence of user preference (#3702) @knolleary
- Add Japanese translations for v3.0-beta.3 (#3688) @kazuhitoyokoi
- Fix handling of spacebar inside JSON visual editor (#3687) @knolleary
- Fix menu padding to handle both icons and submenus (#3686) @knolleary
- Include scroll offset when positioning quick-add dialog (#3685) @knolleary
Runtime
- Allow flows to be stopped and started manually (#3719) @knolleary
- Import default export if node is a transpiled es module (#3669) @dschmidt
- Leave Monaco theme commented out by default (#3704) @bonanitech
Nodes
- CSV: Fix CSV node to handle when outputting text fields (#3716) @dceejay
- Delay: Fix delay rate limit last timing when empty (#3709) @dceejay
- Link: Ensure link-call cache is updated when link-in is modified (#3695) @Steve-Mcl
- Join: Join node in reduce mode doesn't keep existing msg properties (#3670) @dceejay
- Template: Add support for evalulating {{env.<var>}} within a template node (#3690) @cow0w
#### 3.0.0-beta.3: Beta Release
Editor
- Add Right-Click content menu (#3678) @knolleary
- Fix disable junction (#3671) @HiroyasuNishiyama
- Add Japanese translations for v2.2.3 (#3672) @kazuhitoyokoi
- Reset mouse state when switching tabs (#3643) @knolleary
- Fix uncorrect fix of junction to subflow conversion (#3666) @HiroyasuNishiyama
- Fix undoing junction to subflow (#3653) @HiroyasuNishiyama
- Fix conversion of junction to subflow (#3652) @HiroyasuNishiyama
- Fix to include junction to exported nodes (#3650) @HiroyasuNishiyama
- Fix z-index value for shade to cover nodes in palette (#3649) @kazuhitoyokoi
- Fix to extend escaped subflow category characters (#3647) @HiroyasuNishiyama
- Fix to sanitize tab name (#3646) @HiroyasuNishiyama
- Fix selector placement (#3644) @bonanitech
- Add Japanese translations for v3.0-beta.2 (#3622) @kazuhitoyokoi
- Fix new folder menu of save to library dialog (#3633) @HiroyasuNishiyama
- Fix layer of palette node (#3638) @HiroyasuNishiyama
- Fix to place a node dragged from palette within the workspace (#3637) @HiroyasuNishiyama
- Fix typo in CSS (#3628) @bonanitech
- Use the correct variable for the gutter text color (#3615) @bonanitech
Runtime
- Support loading node modules from `nodesdir` (#3676) @Steve-Mcl
- fix buffer parse error message of evaluateNodeProperty (#3624) @HiroyasuNishiyama
Nodes
- File: Further simplify file node filename entry UX (v3) (#3677) @Steve-Mcl
- Function: Fix initial cursor position of init/finalize tab of function node (#3674) @HiroyasuNishiyama
- Function: Fix ESM module loading in Function node (#3645) @knolleary
- Inject: Fix JSONata evaluation of inject button (#3632) @HiroyasuNishiyama
- TCP: Dont delete TCP socket twice (#3630) @Steve-Mcl
- MQTT Node: define noproxy variable (#3626) @Steve-Mcl
- Debug: i18n debug sidebar node label (#3623) @HiroyasuNishiyama
#### 3.0.0-beta.2: Beta Release
**Migration from 2.x**
- The 'slice wires' action has changed from Ctrl-RightMouseButton to Alt-LeftMouseButton
Editor
- Rework Junctions to be more node like in their event handling (#3607) @knolleary
- Change slicing / slice-junction operations over to mouse button 0 (Left Mouse Button) (#3609) @Steve-Mcl
- Do not slice-junction link node wires (#3608) @knolleary
- Handle many-to-one slicing of wires (#3604) @knolleary
- Ensure ACE worker options are set (#3611) @Steve-Mcl
- Remove duplicate history add of ungroup event (#3605) @knolleary
- use text width instead of number of characters for deciding select fi… (#3603) @HiroyasuNishiyama
- Update Japanese info of link call node reflecting update of English info (#3600) @HiroyasuNishiyama
- Fix typedInput label not visible on themes (#3580) @bonanitech
- Fix project switching when junctions are present (#3595) @Steve-Mcl
- Fix junction: when wiring from a regular nodes INPUT, backwards to a junction (#3591) @Steve-Mcl
- Fix error initialising flow tab editor (#3585) @Steve-Mcl
- Add Japanese translations for v3.0-beta.1 (#3576) @kazuhitoyokoi
- Fix image paths where `red/image/typedInput/XXXX.png` should be `red/image/typedInput/XXXX.svg` (#3592) @kazuhitoyokoi
- Fix browser console error Uncaught TypeError when searching certain terms (#3584) @Steve-Mcl
Runtime
- fix error on system-info action (#3589) @HiroyasuNishiyama
Nodes
- I18n switch rule selector (#3602) @HiroyasuNishiyama
- Handle removal of event handlers to allow mqtt client.end() to work (#3594) @PhilDay-CT
- update link-call node info according to current behavior (#3597) @HiroyasuNishiyama
#### 3.0.0-beta.1: Beta Release
**Migration from 2.x**
- Node-RED now requires Node.js 14.x or later.
- New installs of Node-RED will default to the monaco editor.
Editor
- Add Junctions (#3462) @knolleary
- Allow node name to be auto-generated when added (#3478, #3538) @knolleary
- Set monaco as default code editor as of v3.x (#3543) @Steve-Mcl
- Update Monaco to V0.33.0 (#3522) @Steve-Mcl
- Auto-complete Improvements (#3521) @Steve-Mcl
- Add a tooltip to debug sidebar messages to reveal full path to node (#3503) @knolleary
- Fix down arrow triggering menu in search box (#3507) @Steve-Mcl
- Add Japanese translations for v3.0 (#3512) @kazuhitoyokoi
- Add feature: Continuous search tools (search previous, search next) (#3405) @Steve-Mcl
- Add feature: split-wire-to-links (#3399, #3476) @Steve-Mcl
- Add copy button to node properties tables (#3390) @knolleary
- Add info-tab search options dropdown to the regular search (#3395) @Steve-Mcl
- New Feature: Add ability to find modified nodes/flows. (#3392) @Steve-Mcl
- Code editor ux improvements around remembering state of each code editor in a flow (#3553) @Steve-Mcl
- Make it easier to apply themes on SVG icons (#3515) @bonanitech
- Add support of property validation message (#3438) @HiroyasuNishiyama
- Ensure node validation tooltip is closed when field becomes valid (#3570) @knolleary
- Add "search for" buttons to notifications (#3567) @Steve-Mcl
- Fix storing subflow credential type when input has multiple types (backport to v2.x) (#3828) @Steve-Mcl
- Fix markdown editor to mark up orderedlists correctly
- Ensure 'hidden flow' count doesn't include subflows (backport to v2.x) (#3823) @Steve-Mcl
- Fix credential type input item of subflow template (backport to v2.x) (#3822) @Steve-Mcl
- Fix to extend escaped subflow category characters (backport #3647 to v2.x) (#3665) @Steve-Mcl
- Reset mouse state when switching tabs (Backport #3643 to v2.x) (#3664) @Steve-Mcl
- Fix to sanitize tab name (Backport #3646 to v2.x) (#3663) @Steve-Mcl
- fix new folder menu of save to library dialog (backport #3633 to v2.x) (#3661) @Steve-Mcl
- Ensure ACE worker options are set (Backport 3611 to v2.x) (#3657) @Steve-Mcl
- Fix browser console error Uncaught TypeError when searching certain terms (Backport #3548 to v2.x) (#3656) @Steve-Mcl
- Remove duplicate history add of ungroup event (backport #3581to v2.x) (#3655) @Steve-Mcl
- Don't let themes change node config colors (#3564) @bonanitech
- Fix gap between typedInput containers borders (#3560) @bonanitech
- Fix recording removed links in edit history (#3547) @knolleary
@@ -220,42 +24,560 @@ Editor
- Prevent shortcut deploy when deploy button shaded (#3517) @Steve-Mcl
- Fix: Sidebar "Configuration" filter button tooltip (#3500) @ralphwetzel
- Add the ability to customize diff colors even more (#3499) @bonanitech
- Do JSON comparison of old value/new value in editor (#3481) @Steve-Mcl
- Fix nodes losing their wires when in an iframe (#3484) @zettca
- do JSON comparison of old value/new value (#3481) @Steve-Mcl
- fix nodes losing their wires when in an iframe (#3484) @zettca
- Improve scroll into view (#3468) @Steve-Mcl
- Do not show 1st tab if hidden when loading (#3464) @Steve-Mcl
- Dont show 1st tab if hidden when loading (#3464) @Steve-Mcl
Runtime
- Fix importing external module from node-red module (#3541) @knolleary
- Add support for multiple static paths with optional static root (#3542) @Steve-Mcl
- Store external token when authenticating if provided (#3460) @ArFe
- Support OAuth/OpenID logout (#3388) @mw75
- Allow adminAuth to auto-login users when using passport strategy (#3519) @knolleary
- Add runtime diagnostics admin endpoint (#3511) @Steve-Mcl
- Do not remove unknown credentials of Subflow Modules (backport to v2.x) (#3826) @Steve-Mcl
- Backports to v2.x (#3735) @kazuhitoyokoi
- Backports to v2.x (#3705) @kazuhitoyokoi
- fix buffer parse error message of evaluateNodeProperty (backports #3624 for v2.x) (#3659) @Steve-Mcl
- Don't start if user has no home directory (#3540) @hardillb
- Error on invalid encrypted credentials (#3498) @sammachin
Nodes
- Debug: Add message count option to Debug status (#3544 #3551) @rafaelmuynarsk @knolleary
- File: Change basic Filename field to a typedInput (#3533) @Steve-Mcl
- HTTP Request: Add UI for Http Request node headers (#3488) @Steve-Mcl
- Inject: let inject optionally fire at start in only at time mode. (#3385) @dceejay
- Link Call: Dynamic link call (#3463) @Steve-Mcl
- Link Call: Display link targets of nodes in a regular flow, for Link Call nodes inside a subflow (#3528) @Steve-Mcl
- MQTT: MQTT payload auto parsing improvements (#3530) @Steve-Mcl
- MQTT: Add client and Runtime MQTT topic validation (#3563) @Steve-Mcl [dev]
- MQTT: save and restore v5 config user props (#3562) @Steve-Mcl
- MQTT: Fix incorrect MQTT status (#3552) @Steve-Mcl
- MQTT: fix reference error of msg.status in debug node (#3526) @HiroyasuNishiyama
- MQTT: Add unit tests for MQTT nodes (#3497) @Steve-Mcl
- MQTT: fix typo of will properties (#3502) @Steve-Mcl
- MQTT: ensure mqtt v5 props can be set false (#3472) @Steve-Mcl
- Switch: add check for NaN in is of type number to be false (#3409) @dceejay
- TCP: TCP node better split (#3465) @dceejay
- Watch: Update Watch node to use node-watch module (#3559 #3569) @knolleary
- WebSocket: call done after ws disconnects (#3531) @Steve-Mcl
- Allow HTTP Headers not in spec (backport to v2.x) (#3829) @Steve-Mcl
- Fix change node, not handling from field properly when using context (backport to v2.x) (#3827) @Steve-Mcl
- undo regression to tcp-in node
- Fix CSV node to handle when outputting text fields (backport to v2.x) (#3825) @Steve-Mcl
- Fix delay rate limit last timing when empty (backport to v2.x) (#3824) @Steve-Mcl
- Join-reduce keep existing msg properties (backport to v2.x) (#3821) @Steve-Mcl
- Fix ESM module loading in Function node (Backport #3645 to v2.x) (#3662) @Steve-Mcl
- Fix JSONata evaluation of inject button (Backport 3632 to v2.x) (#3660) @Steve-Mcl
- Dont delete TCP socket twice (backport Backport: #3630 to v2.x) (#3658) @Steve-Mcl
- Mqtt fixes in v3 for v2.x (backports #3563 #3594 #3626 to v2.x) (#3654) @Steve-Mcl
- MQTT Node - save and restore v5 config user props (#3562) @Steve-Mcl
- Fix incorrect MQTT status (#3552) @Steve-Mcl
- fix reference error of msg.status in debug node (#3526) @HiroyasuNishiyama
- call done after ws disconnects (#3531) @Steve-Mcl
- Add unit tests for MQTT nodes (#3497) @Steve-Mcl
- fix typo of will properties (properies) (#3502) @Steve-Mcl
- fix: ensure mqtt v5 props can be set false (#3472) @Steve-Mcl
#### 2.2.2: Maintenance Release
Nodes
- Fix "close timed out" error when performing full deploy or modifying broker node. (#3451) @Steve-Mcl
#### 2.2.1: Maintenance Release
Editor
- Handle mixed-cased filter terms in keyboard shortcut dialog (#3444) @knolleary
- Prevent duplicate links being added between nodes (#3442) @knolleary
- Fix to hide tooltip after removing subflow tab (#3391) @HiroyasuNishiyama
- Fix node validation to be applied to config node (#3397) @HiroyasuNishiyama
- Fix: Dont add wires to undo buffer twice (#3437) @Steve-Mcl
Runtime
- Improve module location parsing (of stack info) when adding hook (#3447) @Steve-Mcl
- Fix substitution of NR_NODE_PATH (#3445) @HiroyasuNishiyama
- Remove console.log when ignoring disabled module (#3439) @knolleary
- Improve "Unexpected Node Error" logging (#3446) @Steve-Mcl
Nodes
- Debug: Fix no-prototype-builtins bug in debug node and utils (#3394) @Alkarex
- Delay: Fix Japanese message of delay node (#3434)
- Allow nbRateUnits to be undefined when validating (#3443) @knolleary
- Coding help for recently added node-red Predefined Environment Variables (#3440) @Steve-Mcl
#### 2.2.0: Milestone Release
Editor
- Add editorTheme.tours property to default settings file (#3375) @knolleary
- Remember Zoom level and Sidebar tab selection between sessions (#3361) @knolleary
- Fix timing issue when merging background changes fixes #3364 (#3373) @Steve-Mcl
- Use a nodes palette label in help tree (#3372) @Steve-Mcl
- Subflow: Add labels to OUTPUT nodes (#3352) @ralphwetzel
- Fix vertical align subflow port (#3370) @knolleary
- Make actions list i18n ready and Japanese translation (#3359) @HiroyasuNishiyama
- Update tour for 2.2.0 (#3378) @knolleary
- Include paletteLabel when building search index (#3380) @Steve-Mcl
- Fix opening/closing subflow template not to make subflow changed (#3382) @HiroyasuNishiyama
- Add Japanese translations for v2.2.0 (#3353, #3381) @kazuhitoyokoi
Runtime
- Add support for accessing node id & name as environment variable (#3356) @HiroyasuNishiyama
- Clear context contents when switching projects (#3243) @knolleary
Nodes
- MQTT: reject invalid topics (#3374) @Steve-Mcl
- Function: Expose node.path property (#3371) @knolleary
- Function: Update `node` declarations in func.d.ts (#3377) @Steve-Mcl
#### 2.2.0-beta.1: Beta Release
Editor
- Add search history to main search box (#3262) @knolleary
- Check availability of type of config node on deploy (#3304) @k-toumura
- Add wire-slice mode to delete wires with Ctrl-RHClick-Drag (#3340) @knolleary
- Wiring keyboard shortcuts (#3288) @knolleary
- Snap nodes on grid using either edge as reference (#3289) @knolleary
- Detach node action (#3338) @knolleary
- Highlight links when selecting nodes (#3323) @knolleary
- Allow multiple links to be selected by ctrl-click (#3294) @knolleary
Nodes
- JSON: Let JSON node attempt to parse buffer if it contains a valid string (#3296) @dceejay
- Remove use of verbose flag in core nodes - and use node.debug level instead (#3300) @dceejay
- TCP: Add TLS option to tcp client nodes (#3307) @dceejay
- WebSocket: Implemented support for Websocket Subprotocols in WS Client Node. (#3333) @tobiasoort
#### 2.1.6: Maintenance Release
Editor
- Revert copy-text change and apply alternative fix (#3363) @knolleary
- Update marked to latest (#3362) @knolleary
- fix to make start of property error tooltip messages aligned (#3358) @HiroyasuNishiyama
Nodes
- Inject: fix JSON propety validation of inject node (#3349) @HiroyasuNishiyama
- Delay: fix unit value validation of delay node (#3351) @HiroyasuNishiyama
#### 2.1.5: Maintenance Release
Runtime
- Handle reporting error location when stack is truncated (#3346) @knolleary
- Initialize passport when only adminAuth.tokens is set (#3343) @knolleary
- Add log logging (#3342) @knolleary
Editor
- Fix copy buttons on the debug window (another method) (#3331) @kazuhitoyokoi
- Add Japanese translations for hidden flow (#3302) @kazuhitoyokoi
- Improve jsonata legacy mode detection regex (#3345) @knolleary
- Fix generating flow name with incrementing number (#3347) @knolleary
- resume focus after import/export dialog close (#3337) @HiroyasuNishiyama
- Fix findPreviousVisibleTab action (#3321) @knolleary
- Fix storing hidden tab state when not hidden via action (#3312) @knolleary
- Avoid adding empty env properties to tabs/groups (#3311) @knolleary
- Fix hide icon in tour guide (#3301) @kazuhitoyokoi
Nodes
- File: Update file node examples according to node name change (#3335) @HiroyasuNishiyama
- Filter (RBE): Fix for filter node narrrowbandEq mode start condition failure (#3339) @dceejay
- Function: Prevent function scrollbar from obscuring expand button (#3348) @knolleary
- Function: load extralibs when expanding monaco. fixes #3319 (#3334) @Steve-Mcl
- Function: Update Function to use correct api to access env vars (#3310) @knolleary
- HTTP Request: Fix basic auth with empty username or password (#3325) @hardillb
- Inject: Fix incorrect clearing of blank payload property in Inject node (#3322) @knolleary
- Link Call: add link call example (#3336) @HiroyasuNishiyama
- WebSocket: Only setup ws client heartbeat once it is connected (#3344) @knolleary
- Update Japanese translations in node help (#3332) @kazuhitoyokoi
#### 2.1.4: Maintenance Release
Runtime
- fix env var access using $parent for groups (#3278) @HiroyasuNishiyama
- Add proper error handling for 404 errors when serving debug files (#3277) @knolleary
- Add Japanese translations for Node-RED v2.1.0-beta.1 (#3179) @kazuhitoyokoi
- Include full user object on login audit events (#3269) @knolleary
- Remove styling from de locale files (#3237) @knolleary
Editor
- Change tab hide button icon to an eye and add search option (#3282) @knolleary
- Fix i18n handling of namespaces with spaces in (#3281) @knolleary
- Trigger change event when autoComplete fills in input (#3280) @knolleary
- Apply CN i18n fix (#3279) @knolleary
- fix select menu label of config node to use paletteLabel (#3273) @HiroyasuNishiyama
- fix removed tab not to cause node conflict (#3275) @HiroyasuNishiyama
- Group diff fix (#3239) @knolleary
- Only toggle disabled workspace flag if on activeWorkspace (#3252) @knolleary
- Do not show status for disabled nodes (#3253) @knolleary
- Set dimension value for tour guide (#3265) @kazuhitoyokoi
- Avoid redundant initialisation of TypedInput type (#3263) @knolleary
- Don't let themes change flow port label color (#3270) @bonanitech
- Fix treeList gutter calculation to handle floating gutters (#3238) @knolleary
Nodes
- Debug: Handle RegExp types in Debug sidebar (#3251) @knolleary
- Delay: fix 2nd output when in rate limit per topic modes (#3261) @dceejay
- Link: fix to show link target when selected (#3267) @HiroyasuNishiyama
- Inject: Do not modify inject node props in oneditprepare (#3242) @knolleary
- HTTP Request: HTTP Basic Auth should always add : between username and password even if empty (#3236) @hardillb
#### 2.1.3: Maintenance Release
Runtime
- Update gen-publish script to update 'next' tag for main releases
- Add environment variable to enable/disable tours (#3221) @hardillb
- Fix loading non-default language files leaving runtime in wrong locale (#3225) @knolleary
Editor
- Refresh editor settings whenever a node is added or enabled (#3227) @knolleary
- Revert spinner css change that made it shrink in some cases (#3229) @knolleary
- Fix import notification message when importing config nodes (#3224) @knolleary
- Handle changing types of TypedInput repeatedly (#3223) @knolleary
#### 2.1.2: Maintenance Release
Runtime
- node-red-pi: Remove bash dependency (#3216) @a16bitsysop
Editor
- Improved regex for markdown renderer (#3213) @GerwinvBeek
- Fix TypedInput initialisation (#3220) @knolleary
Nodes
- MQTT: fix datatype in node config not used. fixes #3215 (#3219) @Steve-Mcl
#### 2.1.1: Maintenance Release
Editor
- Ensure tourGuide popover doesn't fall offscreen (#3212) @knolleary
- Fix issue with old inject nodes that migrated topic to 'string' type (#3210) @knolleary
- Add cache-busting query params to index.mst (#3211) @knolleary
- Fix TypedInput validation of type without options (#3207) @knolleary
#### 2.1.0: Milestone Release
Editor
- Position popover properly on a scrolled page
- Fixes from 2.1.0-beta.2 (#3202) @knolleary
Nodes
- Link Out: Fix saving link out node links (#3201) @knolleary
- Switch: Refix #3170 - copy switch rule type when adding new rule
- TCP Request: Add string option to TCP request node output (#3204) @dceejay
#### 2.1.0-beta.2: Beta Release
Editor
- Fix switching projects (#3199) @knolleary
- Use locale setting when installing/enabling node (#3198) @knolleary
- Do not show projects-wecome dialog until welcome tour completes (#3197) @knolleary
- Fix converting selection to subflow (#3196) @knolleary
- Avoid conflicts with native browser cmd-ctrl type shortcuts (#3195) @knolleary
- Ensure message tools stay attached to top-level entry in Debug/Context (#3186) @knolleary
- Ensure tab state updates properly when toggling enable state (#3175) @knolleary
- Improve handling of long labels in TreeList (#3176) @knolleary
- Shift-click tab scroll arrows to jump to start/end (#3177) @knolleary
Runtime
- Update package dependencies
- Update to latest node-red-admin
Nodes
- Dynamic MQTT connections (#3189)
- Link: Filter out Link Out Return nodes in Link In edit dialog Fixes #3187
- Link: Fix link call label (#3200) @knolleary
- Debug: Redesign debug filter options and make them persistant (#3183) @knolleary
- Inject: Widen Inject interval box for >1 digit (#3184) @knolleary
- Switch: Fix rule focus when switch 'otherwise' rule is used (#3185) @knolleary
#### 2.1.0-beta.1: Beta Release
Editor
- Add Tour Guide component (#3136) @knolleary
- Allow tabs to be hidden (#3120) @knolleary
- Add align actions to editor (#3110) @knolleary
- Add support of environment variable for tab & group (#3112) @HiroyasuNishiyama
- Add autoComplete widget and add to TypedInput for msg. props (#3171) @knolleary
- Render node documentation to node-red style guide when written in markdown. (#3169) @Steve-Mcl
- Allow colouring of tab icon svg (#3140) @harmonic7
- Restore tab selection after merging conflicts (#3151) @GerwinvBeek
- Fix serving of theme files on Windows (#3154) @knolleary
- Ensure config-node select inherits width properly from input (#3155) @knolleary
- Do better remembering TypedInput values whilst switching types (#3159) @knolleary
- Update monaco to 0.28.1 (#3153) @knolleary
- Improve themeing of tourGuide (#3161) @knolleary
- Allow a node to specify a filter for the config nodes it can pick from (#3160) @knolleary
- Allow RED.notify.update to modify any notification setting (#3163) @knolleary
- Fix typo in ko editor.json Fixes #3119
- Improve RED.actions api to ensure actions cannot be overridden
- Ensure treeList row has suitable min-height when no content Fixes #3109
- Refactor edit dialogs to use separate edit panes
- Ensure type select button is not focussable when TypedInput only has one type
- Place close tab link in front of fade
Runtime
- Improve error reporting with oauth login strategies (#3148) @knolleary
- Add allowUpdate feature to externalModules.palette (#3143) @knolleary
- Improve node install error reporting (#3158) @knolleary
- Improve unit test coverage (#3168) @knolleary
- Allow coreNodesDir to be set to false (#3149) @hardillb
- Update package dependencies
- uncaughtException debug improvements (#3146) @renatojuniorrs
Nodes
- Change: Add option to deep-clone properties in Change node (#3156) @knolleary
- Delay: Add push to front of rate limit queue. (#3069) @dceejay
- File: Add paletteLabel to file nodes to make read/write more obvious (#3157) @knolleary
- HTTP Request: Extend HTTP request node to log detailed timing information (#3116) @k-toumura
- HTTP Response: Fix sizing of HTTP Response header fields (#3164) @knolleary
- Join: Support for msg.restartTimeout (#3121) @magma1447
- Link Call: Add Link Call node (#3152) @knolleary
- Switch: Copy previous rule type when adding rule to switch node (#3170) @knolleary
- Delay node: add option to send intermediate messages on separate output (#3166) @knolleary
- Typo in http request set method translation (#3173) @mailsvb
#### 2.0.6: Maintenance Release
Editor
- Fix typo in ko editor.json Fixes #3119
- Change fade color when hovering an inactive tab (#3106) @bonanitech
- Ensure treeList row has suitable min-height when no content Fixes #3109
Runtime
- Update tar to latest (#3128) @aksswami
- Give passport verify callback the same arity as the original callback (#3117) @dschmidt
- Handle HTTPS Key and certificate as string or buffer (#3115) @bartbutenaers
#### 2.0.5: Maintenance Release
Editor
- Remove default ctrl-enter keybinding from monaco editor Fixes #3093
Runtime
- Update tar dependency
- Add support for maintenance streams in generate-publish-script
Nodes
- Fix regression in Join node when manual joining array with msg.parts present Fixes #3096
#### 2.0.4: Maintenance Release
Editor
- Fix tab fade CSS for when using themes (#3085) @bonanitech
- Handle just-copied-but-not-deployed node with credentials in editor Fixes #3090
Nodes
- Filter: Fix RBE node handling of default topi property Fixes #3087
- HTTP Request: Handle partially encoded url query strings in request node
- HTTP Request: Fix support for supplied CA certs (#3089) @hardillb
- HTTP Request: Ensure TLS Cert is used (#3092) @hardillb
- Inject: Fix inject now button unable to send empty props
- Inject: Inject now button success notification should use label with updated props
#### 2.0.3: Maintenance Release
Nodes
- HTML: Fix HTML parsing when body is included in the select tag Fixes #3079
- HTTP Request: Preserve case of user-provided http headers in request node Fixes #3081
- HTTP Request: Set decompress to false for HTTP Request to keep 1.x compatibility Fixes #3083
- HTTP Request: Add unit tests for HTTP Request encodeURI and error response
- HTTP Request: Do not throw HTTP errors in request node Fixes #3082
- HTTP Request: Ensure uri is properly encoded before passing to got module Fixes #3080
#### 2.0.2: Maintenance Release
Runtime
- Use file:// url with dynamic import
- Detect if agent-base has patched https.request and undo it Fixes #3072
Editor
- Fix tab fade css because Safari Fixes #3073
- Fix error closing library dialog with monaco
- Handle other error types in Manage Palette view
Nodes
- HTTP Request node - ignore invalid cookies rather than fail request Fixes #3075
- Fix msg.reset handling in Delay node Fixes #3074
#### 2.0.1: Maintenance Release
Nodes
- Function: Ensure default module export is exposed in Function node
#### 2.0.0: Milestone Release
**Migration from 1.x**
- Node-RED now requires Node.js 12.x or later.
- The following nodes have had significant dependency updates. Unless stated,
they should be fully backward compatible.
- RBE: Relabelled as 'filter' to make it more discoverable and made part of
the core palette, rather than as a separate module.
- Tail: This node has been removed from the default palette. You can reinstall it
from node-red-node-tail
- HTTP Request: Reimplemented with a different underlying module. We have
tried to maintain 100% functional compatibility, but it is possible
some edge cases remain.
- JSON: The schema validation option no longer supports JSON-Schema draft-04
- HTML: Its underlying module has had a major version update. Should be fully
backward compatible.
- `functionExternalModules` is now enabled by default for new installs.
If you have an existing settings file that contains this setting, you will
need to set it to `true` yourself.
The external modules will now get installed in your Node-RED user directory,
(`~/.node-red`) rather than in a subdirectory. This means all dependencies will
be listed in your top-level `package.json`. If you have existing external modules,
they will get reinstalled to the new location when you first run Node-RED 2.0.
Runtime
- Fix missing dependencies (#3052, #2057) @kazuhitoyokoi
- Ensure node.types is defined if node html file missing
- Fix reporting of type_already_registered error
- Move install location of external modules (#3064) @knolleary
Editor
- Update translations (#3063) @kazuhitoyokoi
- Add a slight fade to tab labels that overflow
- Show config node details when selected in outliner
- Fix layout of info outliner for subflow entries
Nodes
- Delay: let `msg.flush` specify how many messages to flush from node (#3059) @dceejay
- Function: external modules is now enabled by default (#3065) @knolleary
- Function: external modules now supports both ES6 and CJS modules (#3065) @knolleary
- WebSocket: add option for client node to send automatic pings (#3056) @knolleary
##### 2.0.0-beta.2: Beta Release
Runtime
- Add `node-red admin init` (via `node-red-admin@2.1.0`)
- Move to GH Actions rather than Travis for build (#3042) @knolleary
Editor
- Include hasUser=false config nodes when exporting whole flow (#3048)
- Emit nodes:change for any updated config node when node deleted/added
- Fix padding of compact notification Closes #3045
- Ensure any html in changelog is escaped before displaying
- Add support for Map/Set property types on Debug (#3040) @knolleary
- Add 'theme' to default settings file
- Add RED.view.annotations api (#3032) @knolleary
- Update monaco editor to V0.25.2 (#3031) @Steve-Mcl
- Lower tray zIndex when overlay tray being opened Fixes #3019
- Reduce z-Index of Function expand buttons to prevent overlap Part of #3019
- Ensure RED.clipboard.import displays the right library Fixes #3021
- Batch messages sent over comms to prevent flooding (#3025) @knolleary
- Allow RED.popover.panel to specify a closeButton to ignore click events on
- Use browser default language for initial page load
- Add css var for node font color
- Fix label padding of toggleButton
- Give sidebar open tab a bit more room for its label
- Various Monaco updates (#3015) @Steve-Mcl
- Log readOnly on startup (#3024) @sammachin
- Translation updates (#3020 #3022) @HiroyasuNishiyama @kazuhitoyokoi
Nodes
- HTTP Request: Fix proxy handling (#3044) @hardillb
- HTTP Request: Handle basic auth with @ in username (#3017) @hardillb
- Add Japanese translation for file-in node (#3037 #3039) @kazuhitoyokoi
- File In: Add option for file-in node to include all properties (default off) (#3035) @dceejay
- Exec: add windowsHide option to hide windows under Windows (#3026) @natcl
- Support loading external module sub path Fixes #3023
##### 2.0.0-beta.1: Beta Release
Runtime
- [MAJOR] Set minimum node version to 12.
- [MAJOR] Fix flowfile name to flows.json in settings (#2951) @dceejay
- [MAJOR] Update to latest i18n in editor and runtime (#2940) @knolleary
- [MAJOR] Deprecate usage of httpRoot (#2953) @knolleary
- Add pre/postInstall hooks to npm install handling (#2936) @knolleary
- Add engine-strict flag to npm install args (#2965) @nileio
- Restructure default settings.js to be more organised (#3012) @knolleary
- Ensure httpServerOptions gets applied to ALL the express apps
- Allow RED.settings.set to replace string property with object property
- Update debug tests to handle compact comms format
- Updates to encode/decode message when passed over debug comms link
- Remove all input event listeners on a node once it is closed
- Move hooks to util package
- Rework hooks structure to be a linkedlist
- Update dependencies (#2922) @knolleary
Editor
- [MAJOR] Change node id generation to give fixed length values without '.' (#2987) @knolleary
- [MAJOR] Add Monaco code editor (#2971) @Steve-Mcl
- Update to latest Monaco (#3007) @Steve-Mcl
- Update Node-RED Function typings in Monaco (#3008) @Steve-Mcl
- Add css named variables for certain key colours (#2994) @knolleary
- Improve contrast of export dialog JSON font color
- Switch editableList buttons from <a> to <button> elements
- Add option to RED.nodes.createCompleteNodeSet to include node dimensions
- Fix css of node help table of contents elements
- Improve red-ui-node-icon css and add red-ui-node-icon-small modifier class
- Add RED.hooks to editor
- Add viewAddPort viewRemovePort viewAddNode viewRemoveNode hooks to view
- Use paletteLabel if set in help sidebar
- Add missing args from JSONata $now signature
Nodes
- [MAJOR] Relabel RBE node as 'filter' and move into core. Also remove tail (#2944) @dceejay
- [MAJOR] HTTP Request: migrate to 'got' module (#2952) @knolleary
- [MAJOR] Move Inject node to CronosJS module (#2959) @knolleary
- [MAJOR] JSON: Update ajv to 8.2.0 - drop support for JSON-Schema draft-04 (#2969) @knolleary
- [MAJOR] HTML node: cheerio update to 1.x (#3011) @knolleary
- Join: change default manual mode to object (#2931) @knolleary
- File node: Add fileWorkingDirectory (#2932) @knolleary
- Delay node enhancements (#2294) @kazuhitoyokoi (#2949) @dceejay
- Add Japanese translations for delay node enhancements (#2958) @kazuhitoyokoi
- Inject node: reorder TypedInput options (#2961) @dceejay
- HTTP Request: update to work with proxies (#2983) @hardillb (#3009) @hardillb
- HTTP Request: fix msg.responseUrl (#2986) @hardillb
- TLS: Add ALPN support to TLS node (#2988) @hardillb
- Inject: add "Inject now" button to edit dialog (#2990) @Steve-Mcl
#### Older Releases

View File

@@ -142,7 +142,6 @@ 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",
@@ -166,7 +165,6 @@ module.exports = function(grunt) {
"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/workspaces.js",
@@ -193,7 +191,6 @@ 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",

View File

@@ -1,6 +1,6 @@
{
"name": "node-red",
"version": "3.0.2",
"version": "2.2.3",
"description": "Low-code programming for event-driven applications",
"homepage": "http://nodered.org",
"license": "Apache-2.0",
@@ -26,57 +26,56 @@
}
],
"dependencies": {
"acorn": "8.7.1",
"acorn": "8.7.0",
"acorn-walk": "8.2.0",
"ajv": "8.11.0",
"ajv": "8.10.0",
"async-mutex": "0.3.2",
"basic-auth": "2.0.1",
"bcryptjs": "2.4.3",
"body-parser": "1.20.0",
"body-parser": "1.19.1",
"cheerio": "1.0.0-rc.10",
"clone": "2.1.2",
"content-type": "1.0.4",
"cookie": "0.5.0",
"cookie": "0.4.2",
"cookie-parser": "1.4.6",
"cors": "2.8.5",
"cronosjs": "1.7.1",
"denque": "2.1.0",
"express": "4.18.1",
"express-session": "1.17.3",
"denque": "2.0.1",
"express": "4.17.2",
"express-session": "1.17.2",
"form-data": "4.0.0",
"fs-extra": "10.1.0",
"got": "11.8.5",
"fs-extra": "10.0.0",
"fs.notify": "0.0.4",
"got": "11.8.3",
"hash-sum": "2.0.0",
"hpagent": "1.0.0",
"https-proxy-agent": "5.0.1",
"i18next": "21.8.16",
"hpagent": "0.1.2",
"https-proxy-agent": "5.0.0",
"i18next": "21.6.11",
"iconv-lite": "0.6.3",
"is-utf8": "0.2.1",
"js-yaml": "4.1.0",
"js-yaml": "3.14.1",
"json-stringify-safe": "5.0.1",
"jsonata": "1.8.6",
"lodash.clonedeep": "^4.5.0",
"media-typer": "1.1.0",
"memorystore": "1.6.7",
"mime": "3.0.0",
"moment": "2.29.4",
"moment-timezone": "0.5.34",
"mqtt": "4.3.7",
"multer": "1.4.5-lts.1",
"mqtt": "4.3.5",
"multer": "1.4.4",
"mustache": "4.2.0",
"node-red-admin": "^3.0.0",
"node-watch": "0.7.3",
"node-red-admin": "^2.2.3",
"nopt": "5.0.0",
"oauth2orize": "1.11.1",
"on-headers": "1.0.2",
"passport": "0.6.0",
"passport": "0.5.2",
"passport-http-bearer": "1.0.1",
"passport-oauth2-client-password": "0.1.2",
"raw-body": "2.5.1",
"semver": "7.3.7",
"raw-body": "2.4.3",
"semver": "7.3.5",
"tar": "6.1.11",
"tough-cookie": "4.0.0",
"uglify-js": "3.16.3",
"uglify-js": "3.15.1",
"uuid": "8.3.2",
"ws": "7.5.6",
"xml2js": "0.4.23"
@@ -85,18 +84,18 @@
"bcrypt": "5.0.1"
},
"devDependencies": {
"dompurify": "2.3.10",
"grunt": "1.5.3",
"dompurify": "2.3.6",
"grunt": "1.5.2",
"grunt-chmod": "~1.1.1",
"grunt-cli": "~1.4.3",
"grunt-concurrent": "3.0.0",
"grunt-contrib-clean": "2.0.1",
"grunt-contrib-clean": "~2.0.0",
"grunt-contrib-compress": "2.0.0",
"grunt-contrib-concat": "2.1.0",
"grunt-contrib-copy": "1.0.0",
"grunt-contrib-jshint": "3.2.0",
"grunt-contrib-uglify": "5.2.2",
"grunt-contrib-watch": "1.1.0",
"grunt-contrib-concat": "~1.0.1",
"grunt-contrib-copy": "~1.0.0",
"grunt-contrib-jshint": "3.1.1",
"grunt-contrib-uglify": "5.0.1",
"grunt-contrib-watch": "~1.1.0",
"grunt-jsdoc": "2.4.1",
"grunt-jsdoc-to-markdown": "6.0.0",
"grunt-jsonlint": "2.1.3",
@@ -105,22 +104,22 @@
"grunt-sass": "~3.1.0",
"grunt-simple-mocha": "~0.4.1",
"grunt-simple-nyc": "^3.0.1",
"i18next-http-backend": "1.4.1",
"i18next-http-backend": "1.3.2",
"jquery-i18next": "1.2.1",
"jsdoc-nr-template": "github:node-red/jsdoc-nr-template",
"marked": "4.0.18",
"marked": "4.0.12",
"minami": "1.2.3",
"mocha": "9.2.2",
"node-red-node-test-helper": "^0.3.0",
"nodemon": "2.0.19",
"mocha": "9.2.0",
"node-red-node-test-helper": "^0.2.7",
"nodemon": "2.0.15",
"proxy": "^1.0.2",
"sass": "1.54.2",
"sass": "1.49.7",
"should": "13.2.3",
"sinon": "11.1.2",
"stoppable": "^1.1.0",
"supertest": "6.2.4"
"supertest": "6.2.2"
},
"engines": {
"node": ">=14"
"node": ">=12"
}
}

View File

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

View File

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

View File

@@ -23,7 +23,6 @@ var context = require("./context");
var auth = require("../auth");
var info = require("./settings");
var plugins = require("./plugins");
var diagnostics = require("./diagnostics");
var apiUtil = require("../util");
@@ -35,7 +34,6 @@ module.exports = {
context.init(runtimeAPI);
info.init(settings,runtimeAPI);
plugins.init(runtimeAPI);
diagnostics.init(settings, runtimeAPI);
var needsPermission = auth.needsPermission;
@@ -54,12 +52,6 @@ module.exports = {
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);
@@ -103,8 +95,6 @@ module.exports = {
adminApp.get("/plugins", needsPermission("plugins.read"), plugins.getAll, apiUtil.errorHandler);
adminApp.get("/plugins/messages", needsPermission("plugins.read"), plugins.getCatalogs, apiUtil.errorHandler);
adminApp.get("/diagnostics", needsPermission("diagnostics.read"), diagnostics.getReport, apiUtil.errorHandler);
return adminApp;
}
}

View File

@@ -106,15 +106,9 @@ async function login(req,res) {
urlPrefix += "/";
}
response = {
"type":"strategy"
"type":"strategy",
"prompts":[{type:"button",label:mergedAdminAuth.strategy.label, url: urlPrefix + "auth/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;
}
@@ -191,7 +185,7 @@ function genericStrategy(adminApp,strategy) {
}
};
options.verify.apply(this,args);
options.verify.apply(null,args);
} else {
var profile = arguments[arguments.length - 2];
return completeVerify(profile,originalDone);

View File

@@ -92,16 +92,10 @@ var passwordTokenExchange = function(client, username, password, scope, done) {
loginAttempts = loginAttempts.filter(function(logEntry) {
return logEntry.user !== username;
});
// 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});
});
}
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);

View File

@@ -101,10 +101,7 @@ module.exports = {
}
themeSettings = null;
theme = settings.editorTheme || {};
themeContext.asset.vendorMonaco = "vendor/monaco/monaco-bootstrap.js"
if (theme.codeEditor && theme.codeEditor.lib === 'ace') {
themeContext.asset.vendorMonaco = ''
}
themeContext.asset.vendorMonaco = ((theme.codeEditor || {}).lib === "monaco") ? "vendor/monaco/monaco-bootstrap.js" : "";
activeTheme = theme.theme;
},
@@ -266,69 +263,9 @@ 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
}
if(theme.codeEditor) {
theme.codeEditor.options = Object.assign({}, themePlugin.monacoOptions, theme.codeEditor.options);
}
// check and load header settings from theme
if (themePlugin.header) {
if (themePlugin.header.image && !theme.header.image) {
const result = serveFilesFromTheme(
[themePlugin.header.image],
themeApp,
"/header/",
themePlugin.path
)
if(result && result.length > 0) {
// update themeContext header image
themeContext.header.image = result[0]
}
}
// if the plugin has a title AND the users settings.js does NOT have a title
if (themePlugin.header.title && !theme.header.title) {
themeContext.header.title = themePlugin.header.title || themeContext.header.title
}
// if the plugin has a header url AND the users settings.js does NOT
if (themePlugin.header.url && !theme.header.url) {
themeContext.header.url = themePlugin.header.url || themeContext.header.url
}
}
theme.codeEditor = theme.codeEditor || {}
theme.codeEditor.options = Object.assign({}, themePlugin.monacoOptions, theme.codeEditor.options);
}
activeThemeInitialised = true;
}

View File

@@ -1,6 +1,6 @@
{
"name": "@node-red/editor-api",
"version": "3.0.2",
"version": "2.2.3",
"license": "Apache-2.0",
"main": "./lib/index.js",
"repository": {
@@ -16,22 +16,22 @@
}
],
"dependencies": {
"@node-red/util": "3.0.2",
"@node-red/editor-client": "3.0.2",
"@node-red/util": "2.2.3",
"@node-red/editor-client": "2.2.3",
"bcryptjs": "2.4.3",
"body-parser": "1.20.0",
"body-parser": "1.19.1",
"clone": "2.1.2",
"cors": "2.8.5",
"express-session": "1.17.3",
"express": "4.18.1",
"express-session": "1.17.2",
"express": "4.17.2",
"memorystore": "1.6.7",
"mime": "3.0.0",
"multer": "1.4.5-lts.1",
"multer": "1.4.4",
"mustache": "4.2.0",
"oauth2orize": "1.11.1",
"passport-http-bearer": "1.0.1",
"passport-oauth2-client-password": "0.1.2",
"passport": "0.6.0",
"passport": "0.5.2",
"ws": "7.5.6"
},
"optionalDependencies": {

View File

@@ -44,8 +44,7 @@
"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>",
"loadingProject": "Lade Projekt"
"importError": "<p>Fehler beim Laden von Flows.</p><p>__message__</p>"
},
"workspace": {
"defaultName": "Flow __number__",
@@ -54,16 +53,7 @@
"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",
@@ -75,8 +65,6 @@
"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",
@@ -94,7 +82,6 @@
"palette": {
"show": "Palette anzeigen"
},
"edit": "Bearbeiten",
"settings": "Einstellungen",
"userSettings": "Einstellungen",
"nodes": "Nodes",
@@ -105,7 +92,7 @@
"search": "Flows durchsuchen",
"searchInput": "Flows durchsuchen",
"subflows": "Subflow",
"createSubflow": "Hinzufügen",
"createSubflow": "Erstellen",
"selectionToSubflow": "Auswahl in Subflow umwandeln",
"flows": "Flow",
"add": "Hinzufügen",
@@ -117,43 +104,24 @@
"editPalette": "Palette verwalten",
"other": "Sonstige",
"showTips": "Tipps anzeigen",
"showWelcomeTours": "Geführte Touren für neue Versionen anzeigen",
"help": "Node-RED-Website",
"projects": "Projekte",
"projects": "Projekt",
"projects-new": "Neu",
"projects-open": "Öffnen",
"projects-settings": "Einstellungen",
"showNodeLabelDefault": "Zeige Namen von neu hinzugefügten Nodes",
"codeEditor": "Code-Editor",
"groups": "Gruppen",
"groups": "Gruppe",
"groupSelection": "Auswahl gruppieren",
"ungroupSelection": "Gruppe auflösen",
"groupMergeSelection": "Auswahl der Gruppe hinzufügen",
"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"
"groupRemoveSelection": "Auswahl aus der Gruppe entfernen"
}
},
"actions": {
"toggle-navigator": "Navigator ein-/ausblenden",
"zoom-out": "Verkleinern",
"zoom-reset": "Vergrößerung rücksetzen",
"zoom-in": "Vergrößern",
"search-flows": "Flows durchsuchen",
"search-prev": "Vorherige",
"search-next": "Nächste",
"search-counter": "\"__term__\" __result__ von __count__"
"zoom-in": "Vergrößern"
},
"user": {
"loggedInAs": "Angemeldet als __name__",
@@ -163,52 +131,48 @@
"loginFailed": "Anmeldung fehlgeschlagen",
"notAuthorized": "Nicht berechtigt",
"errors": {
"settings": "Sie müssen angemeldet sein, um auf die Einstellungen zugreifen zu können",
"settings": "Sie müssen angemeldet sein, um auf die Einstellungen zuzugreifen 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": {
"state": {
"flowsStopped": "Flows gestoppt",
"flowsStarted": "Flows gestartet"
},
"warning": "<strong>Warnung</strong>: __message__",
"warning": "<strong>Warnung:</strong> __message__",
"warnings": {
"undeployedChanges": "Node hat nicht übernommene (deploy) Änderungen",
"nodeActionDisabled": "Node-Aktionen deaktiviert",
"nodeActionDisabledSubflow": "Node-Aktionen innerhalb des Subflows deaktiviert",
"nodeActionDisabledSubflow": "Node-Aktionen deaktiviert im Subflow",
"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 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>",
"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>",
"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. Wiederherstellung der Verbindung in __time__s.",
"lostConnectionTry": "Jetzt versuchen",
"lostConnectionReconnect": "Verbindung zum Server verloren. Verbindung wird in __time__ s versucht wieder herzustellen.",
"lostConnectionTry": "Jetzt testen",
"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 lokalen Branch '__project__'",
"merge-abort": "Git-Merge abgebrochen",
"change-branch": "Wechsel in den Branch '__project__'",
"merge-abort": "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": "Git-Merge abgeschlossen",
"setupCredentials": "Credentials einrichten",
"merge-complete": "Merge abgeschlossen",
"setupCredentials": "Berechtigungen einrichten",
"setupProjectFiles": "Projektdateien einrichten",
"no": "Nein, Danke",
"createDefault": "Standardprojektdateien erstellen",
@@ -216,13 +180,12 @@
},
"label": {
"manage-project-dep": "Projektabhängigkeiten verwalten",
"setup-cred": "Credentials einrichten",
"setup-cred": "Berechtigungen 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",
"unknownNodesButton": "Nach unbekannten Nodes suchen"
"show-merge-conflicts": "Merge-Konflikte anzeigen"
}
},
"clipboard": {
@@ -240,17 +203,17 @@
"subflow_plural": "__count__ Subflows",
"replacedNodes": "__count__ Node ersetzt",
"replacedNodes_plural": "__count__ Nodes ersetzt",
"pasteNodes": "Flow-JSON einfügen oder",
"pasteNodes": "Flow-JSON hier einfügen oder",
"selectFile": "Datei für Import auswählen",
"importNodes": "Import",
"exportNodes": "Export",
"download": "Download",
"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:",
"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:",
"nodeCopied": "__count__ Node kopiert",
"nodeCopied_plural": "__count__ Nodes kopiert",
"groupCopied": "__count__ Gruppe kopiert",
@@ -266,11 +229,11 @@
"all": "Alle Flows",
"compact": "Kompakt",
"formatted": "Formatiert",
"copy": "In Zwischenablage kopieren",
"copy": "In Zwischenablage exportieren",
"export": "In Bibliothek exportieren",
"exportAs": "Exportiere als",
"overwrite": "Ersetzen",
"exists": "<p><b>\"__file__\"</b> existiert bereits.</p><p>Soll sie ersetzt werden?</p>"
"exists": "<p>'__file__' existiert bereits.</p><p>Soll sie ersetzt werden?</p>"
},
"import": {
"import": "Importiere in",
@@ -300,19 +263,13 @@
"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.",
"unusedConfigNodesButton": "Suche nach unbenutzten Konfigurations-Nodes",
"unknownNodesButton": "Suche nach unbekannten Nodes",
"invalidNodesButton": "Suche nach ungültigen Nodes",
"unusedConfigNodesLink": "Hier klicken, um sie anzuschauen.",
"errors": {
"noResponse": "Keine Antwort vom Server"
},
@@ -385,7 +342,7 @@
"confirmDelete": "Sind Sie sicher mit dem Löschen dieses Subflows?",
"info": "Beschreibung",
"category": "Kategorie",
"module": "Modul",
"module": "Module",
"license": "Lizenz",
"licenseNone": "Keine",
"licenseOther": "Andere",
@@ -395,10 +352,10 @@
"keys": "Schlüsselwörter",
"keysPlaceholder": "Komma-getrennte Schlüsselwörter",
"author": "Author",
"authorPlaceholder": "Ihr Name <email@example.com>",
"authorPlaceholder": "Dein Name <email@beispiel.de>",
"desc": "Beschreibung",
"env": {
"restore": "Subflow-Standard wiederherstellen",
"restore": "Stelle auf Subflow-Standard zurück",
"remove": "Entferne Umgebungsvariable"
},
"errors": {
@@ -407,9 +364,9 @@
}
},
"group": {
"editGroup": "Bearbeite Gruppe: __name__",
"editGroup": "Editiere Gruppe: __name__",
"errors": {
"cannotCreateDiffGroups": "Kann keine Gruppe mit Nodes von anderen Gruppen erstellen",
"cannotCreateDiffGroups": "Kann keine Gruppe erzeugen mit Nodes von verschiedenen Gruppen",
"cannotAddSubflowPorts": "Kann keine Subflow-Anschlüsse zu einer Gruppe hinzufügen"
}
},
@@ -423,7 +380,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",
@@ -443,10 +400,10 @@
"icon": "Icon",
"inputType": "Eingangstyp",
"selectType": "Wähle Typen ...",
"loadCredentials": "Lade Node-Credentials",
"loadCredentials": "Lade Node-Berechtigungen",
"inputs": {
"input": "Eingang",
"select": "Auswahl",
"select": "hle",
"checkbox": "Checkbox",
"spinner": "Spinner",
"none": "Kein",
@@ -459,7 +416,7 @@
"json": "JSON",
"bin": "buffer",
"env": "Umgebungsvariable",
"cred": "Credentials"
"cred": "Berechtigung"
},
"menu": {
"input": "Eingang",
@@ -479,7 +436,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-Credentials fehlgeschlagen"
"credentialLoadFailed": "Laden der Node-Berechtigungen fehlgeschlagen"
}
},
"keyboard": {
@@ -489,27 +446,23 @@
"shortcut": "Tastenkürzel",
"scope": "Geltungsbereich",
"unassigned": "Nicht zugeordnet",
"global": "Global",
"global": "global",
"workspace": "Arbeitsbereich",
"selectAll": "Alles auswählen",
"selectNone": "Alles abwählen",
"selectAll": "Alle Nodes auswä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": "Nodes importieren",
"exportNode": "Nodes exportieren",
"importNode": "Node importieren",
"exportNode": "Node 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": "Nodes einfügen",
"copyGroupStyle": "Gruppenstil kopieren",
"pasteGroupStyle": "Gruppenstil einfügen",
"pasteNode": "Node einfügen",
"undoChange": "Letzte Änderung rückgängig machen",
"redoChange": "Letzte Änderung wiederholen",
"searchBox": "Suchfeld öffnen",
"managePalette": "Palette verwalten",
"actionList": "Aktionsliste"
@@ -535,7 +488,7 @@
"palette": {
"noInfo": "Keine Informationen verfügbar",
"filter": "Nodes filtern",
"search": "Module durchsuchen",
"search": "Modules durchsuchen",
"addCategory": "Neu hinzufügen ...",
"label": {
"subflows": "Subflows",
@@ -564,8 +517,7 @@
"nodeEnabled_plural": "Nodes aktiviert:",
"nodeDisabled": "Node deaktiviert:",
"nodeDisabled_plural": "Nodes deaktiviert:",
"nodeUpgraded": "Upgrade von Node-Modul __module__ auf Version __version__ durchgeführt",
"unknownNodeRegistered": "Fehler beim Laden des Nodes: <ul><li>__type__<br>__error__</li></ul>"
"nodeUpgraded": "Upgrade von Node-Modul __module__ auf Version __version__ durchgeführt"
},
"editor": {
"title": "Palette verwalten",
@@ -681,8 +633,15 @@
"outline": "Entwurf",
"empty": "leer",
"globalConfig": "Globale Konfigurations-Nodes",
"triggerAction": "Aktion auslösen",
"find": "Suche im Arbeitsbereich"
"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"
}
},
"help": {
"name": "Hilfe",
@@ -692,8 +651,7 @@
"showHelp": "Hilfe zeigen",
"showInOutline": "Zeige im Editor",
"showTopics": "Zeige Hilfethemen",
"noHelp": "Kein Hilfethema ausgewählt",
"changeLog": "Änderungsprotokoll"
"noHelp": "Kein Hilfethema ausgewählt"
},
"config": {
"name": "Konfigurations-Node",
@@ -747,7 +705,7 @@
"addToProject": "Zu Projekt hinzufügen",
"files": "Dateien",
"flow": "Flow",
"credentials": "Credentials",
"credentials": "Berechtigungen",
"package": "Paket",
"packageCreate": "Datei wird erstellt beim Speichern der Änderungen",
"fileNotExist": "Datei existiert nicht",
@@ -760,7 +718,7 @@
"changeTheEncryptionKey": "Schlüssel ändern",
"currentKey": "Aktueller Schlüssel",
"newKey": "Neuer Schlüssel",
"credentialsAlert": "Dadurch werden alle vorhandenen Credentials gelöscht",
"credentialsAlert": "Dadurch werden alle vorhandenen Berechtigungen gelöscht",
"versionControl": "Versionsverwaltung (Git)",
"branches": "Branches",
"noBranches": "Keine Branches",
@@ -785,7 +743,7 @@
"userName": "Benutzername",
"email": "E-Mail",
"workflow": "Arbeitsablauf",
"workfowTip": "Wählen Sie Ihren bevorzugten Git-Arbeitsablauf (Workflow)",
"workfowTip": "Wähle deinen bevorzugten Git-Arbeitsablauf",
"workflowManual": "Manuell",
"workflowManualTip": "Alle Änderungen müssen manuell übertragen werden (commit) über die Seitenleiste 'Projekthistorie'",
"workflowAuto": "Automatisch",
@@ -896,7 +854,7 @@
"date": "timestamp",
"jsonata": "JSONata",
"env": "Umgebungsvariable",
"cred": "Credentials"
"cred": "Berechtigung"
}
},
"editableList": {
@@ -904,20 +862,8 @@
"addTitle": "Element hinzufügen"
},
"search": {
"history": "Suchhistorie",
"clear": "Leeren",
"empty": "Keine Übereinstimmungen gefunden",
"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"
}
"addNode": "Node hinzufügen ..."
},
"expressionEditor": {
"functions": "Funktionen",
@@ -938,9 +884,6 @@
"eval": "Fehler beim Auswerten des Ausdrucks\n__message__"
}
},
"monaco": {
"setTheme": "Thema auswählen"
},
"jsEditor": {
"title": "JavaScript-Editor"
},
@@ -950,10 +893,8 @@
"jsonEditor": {
"title": "JSON-Editor",
"format": "JSON formatieren",
"rawMode": "Bearbeite JSON",
"rawMode": "JSON-Editor",
"uiMode": "Visueller Editor",
"rawMode-readonly": "JSON",
"uiMode-readonly": "Visuell",
"insertAbove": "Oberhalb einfügen",
"insertBelow": "Unterhalb einfügen",
"addItem": "Element hinzufügen",
@@ -1024,7 +965,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",
@@ -1036,7 +977,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 Credentials",
"credential-key": "Schlüssel für Berechtigungen",
"cant-get-ssh-key": "Fehler! Der ausgewählte SSH-Schlüsselpfad kann nicht abgerufen werden",
"already-exists2": "bereits vorhanden",
"git-error": "Git-Fehler",
@@ -1048,27 +989,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 Credential-Dateien werden in das Projekt kopiert.",
"desc2": "Ihre vorhandenen Flow- und Berechtigungs-Dateien werden in das Projekt kopiert.",
"flow-file": "Flow-Datei",
"credentials-file": "Datei mit Credentials"
"credentials-file": "Datei mit Berechtigungen"
},
"encryption-config": {
"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.",
"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.",
"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 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.",
"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.",
"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": "Credentials",
"credentials": "Berechtigung",
"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 Credentials wird nicht verschlüsselt und ihr Inhalt kann leicht gelesen werden",
"desc8": "Die Datei mit den Berechtigungen wird nicht verschlüsselt, und ihr Inhalt kann leicht gelesen werden",
"create-project-files": "Projektdateien erstellen",
"create-project": "Projekt erstellen",
"already-exists": "bereits vorhanden",
@@ -1082,7 +1023,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": "Projekte",
"projects": "Projekt",
"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",
@@ -1093,12 +1034,12 @@
"desc": "Beschreibung",
"opt": "Optional",
"flow-file": "Flow-Datei",
"credentials": "Credentials",
"credentials": "Berechtigungen",
"enable-encryption": "Verschlüsselung aktivieren",
"disable-encryption": "Verschlüsselung deaktivieren",
"encryption-key": "Schlüssel",
"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",
"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",
"git-url": "Git-Repository-URL",
"protocols": "https://, ssh:// oder file://",
"auth-failed": "Authentifizierung fehlgeschlagen",
@@ -1108,15 +1049,14 @@
"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 Credentials",
"credentials-encryption-key": "Schlüssel für Berechtigungen",
"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",
"clearContext": "Kontextdaten löschen beim Projektwechsel"
"unexpected_error": "unerwarteter_Fehler"
},
"delete": {
"confirm": "Sind Sie sicher, dass dieses Projekt gelöscht werden soll?"
@@ -1163,44 +1103,13 @@
"preview": "Vorschau",
"defaultValue": "Standardwert"
},
"tourGuide": {
"takeATour": "Tour starten",
"start": "Start",
"next": "Nächste",
"welcomeTours": "Welcome Tours"
},
"diagnostics": {
"title": "System-Informationen"
},
"languages": {
"de": "Deutsch",
"en-US": "Englisch",
"ja": "Japanisch",
"ko": "Koreanisch",
"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"
"de": "German",
"en-US": "English",
"ja": "Japanese",
"ko": "Korean",
"ru": "Russian",
"zh-CN": "Chinese(Simplified)",
"zh-TW": "Chinese(Traditional)"
}
}

View File

@@ -3,7 +3,7 @@
"label": {
"name": "Name",
"ok": "Ok",
"done": "Done",
"done":"Done",
"cancel": "Cancel",
"delete": "Delete",
"close": "Close",
@@ -66,7 +66,7 @@
"listSubflows": "List subflows",
"status": "Status",
"enabled": "Enabled",
"disabled": "Disabled",
"disabled":"Disabled",
"info": "Description",
"selectNodes": "Click nodes to select"
},
@@ -114,7 +114,7 @@
"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",
@@ -130,30 +130,26 @@
"ungroupSelection": "Ungroup selection",
"groupMergeSelection": "Merge selection",
"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"
"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",
"search-flows": "Search flows",
"search-prev": "Previous",
"search-next": "Next",
"search-counter": "\"__term__\" __result__ of __count__"
"zoom-in": "Zoom in"
},
"user": {
"loggedInAs": "Logged in as __name__",
@@ -169,10 +165,6 @@
}
},
"notification": {
"state": {
"flowsStopped": "Flows stopped",
"flowsStarted": "Flows started"
},
"warning": "<strong>Warning</strong>: __message__",
"warnings": {
"undeployedChanges": "node has undeployed changes",
@@ -180,10 +172,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>",
@@ -221,8 +213,7 @@
"create-default-package": "Create default package file",
"no-thanks": "No thanks",
"create-default-project": "Create default project files",
"show-merge-conflicts": "Show merge conflicts",
"unknownNodesButton": "Search for unknown nodes"
"show-merge-conflicts": "Show merge conflicts"
}
},
"clipboard": {
@@ -261,11 +252,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",
@@ -300,19 +291,13 @@
"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.",
"unusedConfigNodesButton": "Search unused config nodes",
"unknownNodesButton": "Search for unknown nodes",
"invalidNodesButton": "Search for invalid nodes",
"unusedConfigNodes":"You have some unused configuration nodes.",
"unusedConfigNodesLink":"Click here to see them",
"errors": {
"noResponse": "no response from server"
},
@@ -359,8 +344,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",
@@ -444,7 +429,7 @@
"inputType": "Input type",
"selectType": "select types...",
"loadCredentials": "Loading node credentials",
"inputs": {
"inputs" : {
"input": "input",
"select": "select",
"checkbox": "checkbox",
@@ -512,8 +497,7 @@
"redoChange": "Redo",
"searchBox": "Open search box",
"managePalette": "Manage palette",
"actionList": "Action list",
"splitWireWithLinks": "Split selection with Link nodes"
"actionList":"Action list"
},
"library": {
"library": "Library",
@@ -625,19 +609,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",
@@ -671,19 +655,27 @@
"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"
"find": "Find in workspace",
"search": {
"configNodes": "Configuration nodes",
"unusedConfigNodes": "Unused configuration nodes",
"invalidNodes": "Invalid nodes",
"uknownNodes": "Unknown nodes",
"unusedSubflows": "Unused subflows",
"hiddenFlows": "Hidden flows"
}
},
"help": {
"name": "Help",
@@ -693,8 +685,7 @@
"showHelp": "Show help",
"showInOutline": "Show in outline",
"showTopics": "Show topics",
"noHelp": "No help topic selected",
"changeLog": "Change Log"
"noHelp": "No help topic selected"
},
"config": {
"name": "Configuration nodes",
@@ -710,8 +701,8 @@
"filtered": "__count__ hidden"
},
"context": {
"name": "Context Data",
"label": "context",
"name":"Context Data",
"label":"context",
"none": "none selected",
"refresh": "refresh to load",
"empty": "empty",
@@ -749,9 +740,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",
@@ -908,17 +899,7 @@
"history": "Search history",
"clear": "clear all",
"empty": "No matches found",
"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"
}
"addNode": "add a node..."
},
"expressionEditor": {
"functions": "Functions",
@@ -936,9 +917,6 @@
"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__"
}
},
@@ -956,8 +934,6 @@
"format": "format JSON",
"rawMode": "Edit JSON",
"uiMode": "Visual editor",
"rawMode-readonly": "JSON",
"uiMode-readonly": "Visual",
"insertAbove": "Insert above",
"insertBelow": "Insert below",
"addItem": "Add item",
@@ -990,7 +966,7 @@
"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",
@@ -1152,7 +1128,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"
@@ -1170,13 +1146,9 @@
"tourGuide": {
"takeATour": "Take a tour",
"start": "Start",
"next": "Next",
"welcomeTours": "Welcome Tours"
"next": "Next"
},
"diagnostics": {
"title": "System Info"
},
"languages": {
"languages" : {
"de": "German",
"en-US": "English",
"ja": "Japanese",
@@ -1184,27 +1156,5 @@
"ru": "Russian",
"zh-CN": "Chinese(Simplified)",
"zh-TW": "Chinese(Traditional)"
},
"validator": {
"errors": {
"invalid-json": "Invalid JSON data: __error__",
"invalid-json-prop": "__prop__: invalid JSON data: __error__",
"invalid-prop": "Invalid property expression",
"invalid-prop-prop": "__prop__: invalid property expression",
"invalid-num": "Invalid number",
"invalid-num-prop": "__prop__: invalid number",
"invalid-regexp": "Invalid input pattern",
"invalid-regex-prop": "__prop__: invalid input pattern",
"missing-required-prop": "__prop__: property value missing",
"invalid-config": "__prop__: invalid configuration node",
"missing-config": "__prop__: missing configuration node",
"validation-error": "__prop__: validation error: __node__, __id__: __error__"
}
},
"contextMenu": {
"insert": "Insert",
"node": "Node",
"junction": "Junction",
"linkNodes": "Link Nodes"
}
}

View File

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

View File

@@ -52,52 +52,52 @@
"desc": "Finds occurrences of `pattern` within `str` and replaces them with `replacement`.\n\nThe optional `limit` parameter is the maximum number of replacements."
},
"$now": {
"args": "$[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]",

View File

@@ -149,11 +149,7 @@
"toggle-navigator": "ナビゲータの表示/非表示を切替",
"zoom-out": "縮小",
"zoom-reset": "拡大/縮小を初期化",
"zoom-in": "拡大",
"search-flows": "フローを検索",
"search-prev": "前へ",
"search-next": "次へ",
"search-counter": "\"__term__\" __count__ 件中の __result__ 件目"
"zoom-in": "拡大"
},
"user": {
"loggedInAs": "__name__ としてログインしました",
@@ -169,10 +165,6 @@
}
},
"notification": {
"state": {
"flowsStopped": "フローを停止しました",
"flowsStarted": "フローを開始しました"
},
"warning": "<strong>警告</strong>: __message__",
"warnings": {
"undeployedChanges": "ノードの変更をデプロイしていません",
@@ -221,8 +213,7 @@
"create-default-package": "デフォルトパッケージファイルの作成",
"no-thanks": "不要",
"create-default-project": "デフォルトプロジェクトファイルの作成",
"show-merge-conflicts": "マージ競合を表示",
"unknownNodesButton": "不明なノードを検索する"
"show-merge-conflicts": "マージ競合を表示"
}
},
"clipboard": {
@@ -300,19 +291,13 @@
"modifiedFlowsDesc": "変更したノードを含むフローのみデプロイ",
"modifiedNodes": "変更したノード",
"modifiedNodesDesc": "変更したノードのみデプロイ",
"startFlows": "開始",
"startFlowsDesc": "フローを開始",
"stopFlows": "停止",
"stopFlowsDesc": "フローを停止",
"restartFlows": "フローを再起動",
"restartFlowsDesc": "デプロイされた現在のフローを再起動",
"successfulDeploy": "デプロイが成功しました",
"successfulRestart": "フローの再起動が成功しました",
"deployFailed": "デプロイが失敗しました: __message__",
"unusedConfigNodes": "使われていない設定ノードがあります。",
"unusedConfigNodesButton": "未使用の構成ノードを検索",
"unknownNodesButton": "不明なノードを検索する",
"invalidNodesButton": "無効なノードを検索する",
"unusedConfigNodesLink": "設定を参照する",
"errors": {
"noResponse": "サーバの応答がありません"
},
@@ -512,8 +497,7 @@
"redoChange": "変更操作をやり直し",
"searchBox": "ノードを検索",
"managePalette": "パレットの管理",
"actionList": "動作一覧",
"splitWireWithLinks": "選択したワイヤーをlinkードで分離"
"actionList": "動作一覧"
},
"library": {
"library": "ライブラリ",
@@ -683,7 +667,15 @@
"empty": "空",
"globalConfig": "グローバル設定ノード",
"triggerAction": "アクションを実行",
"find": "ワークスペース内を検索"
"find": "ワークスペース内を検索",
"search": {
"configNodes": "設定ノード",
"unusedConfigNodes": "未使用の設定ノード",
"invalidNodes": "不正なノード",
"uknownNodes": "未知のノード",
"unusedSubflows": "未使用のサブフロー",
"hiddenFlows": "非表示のフロー"
}
},
"help": {
"name": "ヘルプ",
@@ -693,8 +685,7 @@
"showHelp": "ヘルプを表示",
"showInOutline": "アウトラインに表示",
"showTopics": "トピックを表示",
"noHelp": "ヘルプのトピックが未選択",
"changeLog": "更新履歴"
"noHelp": "ヘルプのトピックが未選択"
},
"config": {
"name": "設定ノードを表示",
@@ -908,17 +899,7 @@
"history": "検索履歴",
"clear": "全て削除",
"empty": "一致したものが見つかりませんでした",
"addNode": "ノードを追加...",
"options": {
"configNodes": "設定ノード",
"unusedConfigNodes": "未使用の設定ノード",
"invalidNodes": "不正なノード",
"uknownNodes": "未知のノード",
"unusedSubflows": "未使用のサブフロー",
"hiddenFlows": "非表示のフロー",
"modifiedNodes": "修正したノードやフロー",
"thisFlow": "現在のフロー"
}
"addNode": "ノードを追加..."
},
"expressionEditor": {
"functions": "関数",
@@ -935,11 +916,8 @@
"errors": {
"invalid-expr": "不正なJSONata式:\n __message__",
"invalid-msg": "不正なJSONメッセージ例:\n __message__",
"context-unsupported": "$flowContext や $globalContextの\nコンテキスト関数をテストできません",
"env-unsupported": "$env関数はテストできません",
"moment-unsupported": "$moment関数はテストできません",
"clone-unsupported": "$clone関数はテストできません",
"eval": "式評価エラー:\n __message__"
"context-unsupported": "$flowContext や $globalContextの\nコンテキスト機能をテストできません",
"eval": "表現評価エラー:\n __message__"
}
},
"monaco": {
@@ -956,8 +934,6 @@
"format": "JSONフォーマット",
"rawMode": "JSONを編集",
"uiMode": "ビジュアルエディタ",
"rawMode-readonly": "JSON",
"uiMode-readonly": "ビジュアル",
"insertAbove": "上に挿入",
"insertBelow": "下に挿入",
"addItem": "要素を追加",
@@ -1170,11 +1146,7 @@
"tourGuide": {
"takeATour": "ツアーを開始",
"start": "開始",
"next": "次へ",
"welcomeTours": "ウェルカムツアー"
},
"diagnostics": {
"title": "システム情報"
"next": "次へ"
},
"languages": {
"de": "ドイツ語",
@@ -1185,28 +1157,6 @@
"zh-CN": "中国語(簡体)",
"zh-TW": "中国語(繁体)"
},
"validator": {
"errors": {
"invalid-json": "JSONデータが不正: __error__",
"invalid-json-prop": "__prop__: JSONデータが不正: __error__",
"invalid-prop": "プロパティ式が不正",
"invalid-prop-prop": "__prop__: プロパティ式が不正",
"invalid-num": "数値が不正",
"invalid-num-prop": "__prop__: 数値が不正",
"invalid-regexp": "入力パターンが不正",
"invalid-regex-prop": "__prop__: 入力パターンが不正",
"missing-required-prop": "__prop__: プロパティが未設定",
"invalid-config": "__prop__: 設定ノードが不正",
"missing-config": "__prop__: 設定ノードが存在しません",
"validation-error": "__prop__: チェックエラー: __node__, __id__: __error__"
}
},
"contextMenu": {
"insert": "挿入",
"node": "ノード",
"junction": "分岐点",
"linkNodes": "Linkード"
},
"action-list": {
"toggle-show-tips": "ヒント表示切替",
"show-about": "Node-REDの説明を表示",
@@ -1224,7 +1174,6 @@
"hide-all-flows": "全てのフローを非表示",
"show-all-flows": "全てのフローを表示",
"show-last-hidden-flow": "最後に非表示にしたフローを表示",
"list-modified-nodes": "修正したフローを表示",
"list-hidden-flows": "非表示フローを表示",
"list-flows": "フロー一覧",
"list-subflows": "サブフロー一覧",
@@ -1291,8 +1240,6 @@
"distribute-selection-vertically": "選択を上下に整列",
"wire-series-of-nodes": "ノードを一続きに接続",
"wire-node-to-multiple": "ノードを複数に接続",
"split-wire-with-link-nodes": "ワイヤーをlinkードで分割",
"generate-node-names": "ノード名を生成",
"show-user-settings": "ユーザ設定を表示",
"show-help": "ヘルプを表示",
"toggle-palette": "パレットの表示切替",
@@ -1319,9 +1266,7 @@
"show-library-import-dialog": "ライブラリ読み込みダイアログを表示",
"show-examples-import-dialog": "サンプル読み込みダイアログを表示",
"search": "検索",
"search-previous": "前を検索",
"search-next": "次を検索",
"show-action-list": "動作一覧を表示",
"show-action-list": "アクション一覧を表示",
"confirm-edit-tray": "編集を完了",
"cancel-edit-tray": "編集をキャンセル",
"show-remote-diff": "リモートとの変更差分を表示",
@@ -1331,8 +1276,8 @@
"set-deploy-type-to-modified-flows": "デプロイを「変更したフロー」に設定",
"set-deploy-type-to-modified-nodes": "デプロイを「変更したノード」に設定",
"show-debug-tab": "デバッグタブを表示",
"clear-debug-messages": "デバッグメッセージを削除",
"clear-filtered-debug-messages": "フィルタしたデバッグメッセージを削除",
"clear-debug-messages": "デバッグメッセージをクリア",
"clear-filtered-debug-messages": "フィルタしたデバッグメッセージをクリア",
"activate-selected-debug-nodes": "選択したデバッグノードを有効化",
"activate-all-debug-nodes": "全てのデバッグノードを有効化",
"activate-all-flow-debug-nodes": "フロー内の全デバッグノードを有効化",
@@ -1343,13 +1288,9 @@
"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": "フローを停止"
"show-version-control-tab": "バージョンコントロールタブを表示"
}
}

View File

@@ -141,8 +141,7 @@
"create-default-package": "기본 패키지 파일 생성",
"no-thanks": "괜찮습니다",
"create-default-project": "기본 프로젝트 파일 생성",
"show-merge-conflicts": "병합 충돌 보여주기",
"unknownNodesButton": "알 수 없는 노드 검색"
"show-merge-conflicts": "병합 충돌 보여주기"
}
},
"clipboard": {
@@ -204,9 +203,7 @@
"successfulRestart": "플로우 재시작을 성공했습니다",
"deployFailed": "배포 실패 : __message__",
"unusedConfigNodes": "사용되지 않는 설정노드가 있습니다",
"unusedConfigNodesButton":"사용하지 않는 구성 노드 검색",
"unknownNodesButton":"알 수 없는 노드 검색",
"invalidNodesButton":"잘못된 노드 검색",
"unusedConfigNodesLink": "여기를 클릭하면 볼 수 있습니다",
"errors": {
"noResponse": "서버의 응답이 없습니다"
},

View File

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

View File

@@ -97,7 +97,7 @@
"rename": "重命名",
"delete": "删除",
"keyboardShortcuts": "键盘快捷方式",
"login": "登",
"login": "登",
"logout": "退出",
"editPalette": "节点管理",
"other": "其他",
@@ -122,16 +122,16 @@
"zoom-in": "放大"
},
"user": {
"loggedInAs": "作为 __name__ 登",
"loggedInAs": "作为 __name__ 登",
"username": "账号",
"password": "密码",
"login": "登",
"loginFailed": "登失败",
"login": "登",
"loginFailed": "登失败",
"notAuthorized": "未授权",
"errors": {
"settings": "设置信息需要登后才能访问",
"deploy": "改动需要登后才能部署",
"notAuthorized": "此操作需要登后才能执行"
"settings": "设置信息需要登后才能访问",
"deploy": "改动需要登后才能部署",
"notAuthorized": "此操作需要登后才能执行"
}
},
"notification": {
@@ -182,8 +182,7 @@
"create-default-package": "创建默认的包文件",
"no-thanks": "不了,谢谢",
"create-default-project": "创建默认项目文件",
"show-merge-conflicts": "显示合并冲突",
"unknownNodesButton": "搜索未知节点"
"show-merge-conflicts": "显示合并冲突"
}
},
"clipboard": {
@@ -265,9 +264,7 @@
"successfulRestart": "成功重启流程",
"deployFailed": "部署失败: __message__",
"unusedConfigNodes": "您有一些未使用的配置节点",
"unusedConfigNodesButton":"搜索未使用的配置节点",
"unknownNodesButton":"搜索未知节点",
"invalidNodesButton":"搜索无效节点",
"unusedConfigNodesLink": "点击此处查看它们",
"errors": {
"noResponse": "服务器没有响应"
},
@@ -617,7 +614,14 @@
"empty": "空的",
"globalConfig": "全局配置节点",
"triggerAction": "触发动作",
"find": "在工作区中查找"
"find": "在工作区中查找",
"search": {
"configNodes": "配置节点",
"unusedConfigNodes": "未使用的配置节点",
"invalidNodes": "无效的节点",
"uknownNodes": "未知的节点",
"unusedSubflows": "未使用的子流程"
}
},
"help": {
"name": "帮助",
@@ -838,14 +842,7 @@
},
"search": {
"empty": "找不到匹配",
"addNode": "添加一个节点...",
"options": {
"configNodes": "配置节点",
"unusedConfigNodes": "未使用的配置节点",
"invalidNodes": "无效的节点",
"uknownNodes": "未知的节点",
"unusedSubflows": "未使用的子流程"
}
"addNode": "添加一个节点..."
},
"expressionEditor": {
"functions": "功能",

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@node-red/editor-client",
"version": "3.0.2",
"version": "2.2.3",
"license": "Apache-2.0",
"repository": {
"type": "git",

View File

@@ -76,7 +76,7 @@ oop.inherits(NRJavaScriptWorker, Mirror);
(function() {
this.setOptions = function(options) {
o.options = {
this.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)) {
o.options[opt] = options[opt];
this.options[opt] = options[opt];
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

View File

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

Before

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

View File

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

Before

Width:  |  Height:  |  Size: 127 B

View File

@@ -1,4 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 271 B

View File

@@ -1,4 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 256 B

View File

@@ -13,23 +13,10 @@
* 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;
@@ -114,23 +101,6 @@ 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--) {
@@ -297,21 +267,6 @@ 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++) {
@@ -522,7 +477,6 @@ 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;
@@ -532,7 +486,7 @@ RED.history = (function() {
});
inverseEv.subflows = [];
for (i=0;i<ev.nodes.length;i++) {
inverseEv.subflows.push(nodeOrJunction(ev.nodes[i]));
inverseEv.subflows.push(RED.nodes.node(ev.nodes[i]));
RED.nodes.remove(ev.nodes[i]);
}
}

View File

@@ -3,12 +3,16 @@
"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 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 h": "core:show-help-tab",
"ctrl-g d": "core:show-debug-tab",
"ctrl-g c": "core:show-config-tab",
"ctrl-g x": "core:show-context-tab",
"ctrl-e": "core:show-export-dialog",
"ctrl-i": "core:show-import-dialog",
@@ -19,8 +23,11 @@
"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"
"ctrl-shift-p":"core:show-action-list",
"alt-w": "core:hide-flow",
"alt-shift-w": "core:show-last-hidden-flow"
},
"red-ui-sidebar-node-config": {
"backspace": "core:delete-config-selection",
@@ -83,19 +90,6 @@
"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"
"alt-a v": "core:distribute-selection-vertically"
}
}

View File

@@ -13,11 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
**/
/**
* An Interface to nodes and utility functions for creating/adding/deleting nodes and links
* @namespace RED.nodes
*/
RED.nodes = (function() {
var PORT_TYPE_INPUT = 1;
@@ -38,9 +33,6 @@ RED.nodes = (function() {
var groups = {};
var groupsByZ = {};
var junctions = {};
var junctionsByZ = {};
var initialLoad;
var dirty = false;
@@ -738,10 +730,6 @@ RED.nodes = (function() {
moveGroupToTab(node,z);
return;
}
if (node.type === "junction") {
moveJunctionToTab(node,z);
return;
}
var oldZ = node.z;
allNodes.moveNode(node,z);
var nl = nodeLinks[node.id];
@@ -776,39 +764,6 @@ RED.nodes = (function() {
RED.events.emit("groups:change",group);
}
function moveJunctionToTab(junction, z) {
var index = junctionsByZ[junction.z].indexOf(junction);
junctionsByZ[junction.z].splice(index,1);
junctionsByZ[z] = junctionsByZ[z] || [];
junctionsByZ[z].push(junction);
var oldZ = junction.z;
junction.z = z;
var nl = nodeLinks[junction.id];
if (nl) {
nl.in.forEach(function(l) {
var idx = linkTabMap[oldZ].indexOf(l);
if (idx != -1) {
linkTabMap[oldZ].splice(idx, 1);
}
if ((l.source.z === z) && linkTabMap[z]) {
linkTabMap[z].push(l);
}
});
nl.out.forEach(function(l) {
var idx = linkTabMap[oldZ].indexOf(l);
if (idx != -1) {
linkTabMap[oldZ].splice(idx, 1);
}
if ((l.target.z === z) && linkTabMap[z]) {
linkTabMap[z].push(l);
}
});
}
RED.events.emit("junctions:change",junction);
}
function removeLink(l) {
var index = links.indexOf(l);
if (index != -1) {
@@ -859,7 +814,6 @@ RED.nodes = (function() {
var removedNodes = [];
var removedLinks = [];
var removedGroups = [];
var removedJunctions = [];
if (ws) {
delete workspaces[id];
delete linkTabMap[id];
@@ -878,16 +832,11 @@ RED.nodes = (function() {
}
}
}
removedJunctions = RED.nodes.junctions(id)
for (i=0;i<removedNodes.length;i++) {
var result = removeNode(removedNodes[i].id);
removedLinks = removedLinks.concat(result.links);
}
for (i=0;i<removedJunctions.length;i++) {
var result = removeJunction(removedJunctions[i])
removedLinks = removedLinks.concat(result.links)
}
// Must get 'removedGroups' in the right order.
// - start with the top-most groups
@@ -907,7 +856,7 @@ RED.nodes = (function() {
allNodes.removeTab(id);
RED.events.emit('flows:remove',ws);
}
return {nodes:removedNodes,links:removedLinks, groups: removedGroups, junctions: removedJunctions};
return {nodes:removedNodes,links:removedLinks, groups: removedGroups};
}
function addSubflow(sf, createNewIds) {
@@ -1164,7 +1113,7 @@ RED.nodes = (function() {
delete node.env;
}
}
if (n._def.category != "config" || n.type === 'junction') {
if (n._def.category != "config") {
node.x = n.x;
node.y = n.y;
if (exportDimensions) {
@@ -1325,6 +1274,7 @@ RED.nodes = (function() {
} else {
nodeSet = [sf];
}
console.log(nodeSet);
return createExportableNodeSet(nodeSet);
}
/**
@@ -1360,10 +1310,6 @@ RED.nodes = (function() {
exportedConfigNodes[n.id] = true;
}
});
subflowSet = subflowSet.concat(RED.nodes.junctions(subflowId))
subflowSet = subflowSet.concat(RED.nodes.groups(subflowId))
var exportableSubflow = createExportableNodeSet(subflowSet, exportedIds, exportedSubflows, exportedConfigNodes);
nns = exportableSubflow.concat(nns);
}
@@ -1430,11 +1376,6 @@ RED.nodes = (function() {
nns.push(convertNode(groups[i], opts));
}
}
for (i in junctions) {
if (junctions.hasOwnProperty(i)) {
nns.push(convertNode(junctions[i], opts));
}
}
for (i in configNodes) {
if (configNodes.hasOwnProperty(i)) {
nns.push(convertNode(configNodes[i], opts));
@@ -1516,7 +1457,6 @@ RED.nodes = (function() {
tabs: {},
subflows: {},
groups: {},
junctions: {},
configs: {},
nodes: {},
all: [],
@@ -1532,8 +1472,6 @@ RED.nodes = (function() {
imported.subflows[n.id] = n;
} else if (n.type === "group") {
imported.groups[n.id] = n;
} else if (n.type === "junction") {
imported.junctions[n.id] = n;
} else if (n.hasOwnProperty("x") && n.hasOwnProperty("y")) {
imported.nodes[n.id] = n;
} else {
@@ -1542,7 +1480,7 @@ RED.nodes = (function() {
var nodeZ = n.z || "__global__";
imported.zMap[nodeZ] = imported.zMap[nodeZ] || [];
imported.zMap[nodeZ].push(n)
if (allNodes.hasNode(n.id) || configNodes[n.id] || workspaces[n.id] || subflows[n.id] || groups[n.id] || junctions[n.id]) {
if (allNodes.hasNode(n.id) || configNodes[n.id] || workspaces[n.id] || subflows[n.id] || groups[n.id]) {
imported.conflicted[n.id] = n;
}
})
@@ -1651,20 +1589,21 @@ RED.nodes = (function() {
* Options:
* - generateIds - whether to replace all node ids
* - addFlow - whether to import nodes to a new tab
* - reimport - if node has a .z property, dont overwrite it
* Only applicible when `generateIds` is false
* - importToCurrent
* - importMap - how to resolve any conflicts.
* - id:import - import as-is
* - id:copy - import with new id
* - id:replace - import over the top of existing
*/
function importNodes(newNodesObj,options) { // createNewIds,createMissingWorkspace) {
const defOpts = { generateIds: false, addFlow: false, reimport: false, importMap: {} }
options = Object.assign({}, defOpts, options)
options.importMap = options.importMap || {}
const createNewIds = options.generateIds;
const reimport = (!createNewIds && !!options.reimport)
const createMissingWorkspace = options.addFlow;
options = options || {
generateIds: false,
addFlow: false,
}
options.importMap = options.importMap || {};
var createNewIds = options.generateIds;
var createMissingWorkspace = options.addFlow;
var i;
var n;
var newNodes;
@@ -1707,7 +1646,7 @@ RED.nodes = (function() {
if (!options.generateIds) {
if (!options.importMap[id]) {
// No conflict resolution for this node
var existing = allNodes.getNode(id) || configNodes[id] || workspaces[id] || subflows[id] || groups[id] || junctions[id];
var existing = allNodes.getNode(id) || configNodes[id] || workspaces[id] || subflows[id] || groups[id];
if (existing) {
existingNodes.push({existing:existing, imported:n});
}
@@ -1761,7 +1700,6 @@ RED.nodes = (function() {
n.type != "tab" &&
n.type != "subflow" &&
n.type != "group" &&
n.type != 'junction' &&
!registry.getNodeType(n.type) &&
n.type.substring(0,8) != "subflow:" &&
unknownTypes.indexOf(n.type)==-1) {
@@ -1834,7 +1772,6 @@ RED.nodes = (function() {
var new_nodes = [];
var new_links = [];
var new_groups = [];
var new_junctions = [];
var new_group_set = new Set();
var nid;
var def;
@@ -1965,8 +1902,7 @@ RED.nodes = (function() {
}
}
} else {
const keepNodesCurrentZ = reimport && n.z && RED.workspaces.contains(n.z)
if (!keepNodesCurrentZ && n.z && !workspace_map[n.z] && !subflow_map[n.z]) {
if (n.z && !workspace_map[n.z] && !subflow_map[n.z]) {
n.z = activeWorkspace;
}
}
@@ -2027,15 +1963,12 @@ RED.nodes = (function() {
changed:false,
_config:{}
}
if (n.type !== "group" && n.type !== 'junction') {
if (n.type !== "group") {
node.wires = n.wires||[];
node.inputLabels = n.inputLabels;
node.outputLabels = n.outputLabels;
node.icon = n.icon;
}
if (n.type === 'junction') {
node.wires = n.wires||[];
}
if (n.hasOwnProperty('l')) {
node.l = n.l;
}
@@ -2067,8 +2000,7 @@ RED.nodes = (function() {
node.id = getID();
} else {
node.id = n.id;
const keepNodesCurrentZ = reimport && node.z && RED.workspaces.contains(node.z)
if (!keepNodesCurrentZ && (node.z == null || (!workspace_map[node.z] && !subflow_map[node.z]))) {
if (node.z == null || (!workspace_map[node.z] && !subflow_map[node.z])) {
if (createMissingWorkspace) {
if (missingWorkspace === null) {
missingWorkspace = RED.workspaces.add(null,true);
@@ -2105,15 +2037,6 @@ RED.nodes = (function() {
node.outputs = subflow.out.length;
node.inputs = subflow.in.length;
node.env = n.env;
} else if (n.type === 'junction') {
node._def = {defaults:{}}
node._config.x = node.x
node._config.y = node.y
node.inputs = 1
node.outputs = 1
node.w = 0;
node.h = 0;
} else {
if (!node._def) {
if (node.x && node.y) {
@@ -2197,9 +2120,7 @@ RED.nodes = (function() {
node_map[n.id] = node;
// If an 'unknown' config node, it will not have been caught by the
// proper config node handling, so needs adding to new_nodes here
if (node.type === 'junction') {
new_junctions.push(node)
} else if (node.type === "unknown" || node._def.category !== "config") {
if (node.type === "unknown" || node._def.category !== "config") {
new_nodes.push(node);
} else if (node.type === "group") {
new_groups.push(node);
@@ -2210,12 +2131,8 @@ RED.nodes = (function() {
}
// Remap all wires and config node references
for (i=0;i<new_nodes.length+new_junctions.length;i++) {
if (i<new_nodes.length) {
n = new_nodes[i];
} else {
n = new_junctions[i - new_nodes.length]
}
for (i=0;i<new_nodes.length;i++) {
n = new_nodes[i];
if (n.wires) {
for (var w1=0;w1<n.wires.length;w1++) {
var wires = (Array.isArray(n.wires[w1]))?n.wires[w1]:[n.wires[w1]];
@@ -2354,12 +2271,6 @@ RED.nodes = (function() {
addGroup(n);
}
for (i=0;i<new_junctions.length;i++) {
var junction = new_junctions[i];
addJunction(junction);
}
// Now the nodes have been fully updated, add them.
for (i=0;i<new_nodes.length;i++) {
var node = new_nodes[i];
@@ -2390,7 +2301,6 @@ RED.nodes = (function() {
nodes:new_nodes,
links:new_links,
groups:new_groups,
junctions: new_junctions,
workspaces:new_workspaces,
subflows:new_subflows,
missingWorkspace: missingWorkspace,
@@ -2497,8 +2407,6 @@ RED.nodes = (function() {
workspacesOrder = [];
groups = {};
groupsByZ = {};
junctions = {};
junctionsByZ = {};
var subflowIds = Object.keys(subflows);
subflowIds.forEach(function(id) {
@@ -2548,30 +2456,6 @@ RED.nodes = (function() {
RED.events.emit("groups:remove",group);
}
function addJunction(junction) {
junctionsByZ[junction.z] = junctionsByZ[junction.z] || []
junctionsByZ[junction.z].push(junction)
junctions[junction.id] = junction;
if (!nodeLinks[junction.id]) {
nodeLinks[junction.id] = {in:[],out:[]};
}
RED.events.emit("junctions:add", junction)
}
function removeJunction(junction) {
var i = junctionsByZ[junction.z].indexOf(junction)
junctionsByZ[junction.z].splice(i, 1)
if (junctionsByZ[junction.z].length === 0) {
delete junctionsByZ[junction.z]
}
delete junctions[junction.id]
delete nodeLinks[junction.id];
RED.events.emit("junctions:remove", junction)
var removedLinks = links.filter(function(l) { return (l.source === junction) || (l.target === junction); });
removedLinks.forEach(removeLink);
return { links: removedLinks }
}
function getNodeHelp(type) {
var helpContent = "";
var helpElement = $("script[data-help-name='"+type+"']");
@@ -2767,7 +2651,7 @@ RED.nodes = (function() {
// Force the redraw to be synchronous so the view updates
// *now* and removes the unknown node
RED.view.redraw(true, true);
var result = importNodes(reimportList,{generateIds:false, reimport: true});
var result = importNodes(reimportList,{generateIds:false});
var newNodeMap = {};
result.nodes.forEach(function(n) {
newNodeMap[n.id] = n;
@@ -2800,6 +2684,7 @@ RED.nodes = (function() {
getType: registry.getNodeType,
getNodeHelp: getNodeHelp,
convertNode: convertNode,
add: addNode,
remove: removeNode,
clear: clear,
@@ -2845,11 +2730,6 @@ RED.nodes = (function() {
group: function(id) { return groups[id] },
groups: function(z) { return groupsByZ[z]?groupsByZ[z].slice():[] },
addJunction: addJunction,
removeJunction: removeJunction,
junction: function(id) { return junctions[id] },
junctions: function(z) { return junctionsByZ[z]?junctionsByZ[z].slice():[] },
eachNode: function(cb) {
allNodes.eachNode(cb);
},

View File

@@ -297,10 +297,6 @@ 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();
@@ -336,6 +332,7 @@ var RED = (function() {
id: notificationId
}
if (notificationId === "runtime-state") {
RED.events.emit("runtime-state",msg);
if (msg.error === "safe-mode") {
options.buttons = [
{
@@ -361,14 +358,6 @@ 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();
@@ -476,9 +465,9 @@ 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) {
@@ -626,10 +615,7 @@ var RED = (function() {
null,
{id: "menu-item-edit-select-all", label:RED._("keyboard.selectAll"), onselect: "core:select-all-nodes"},
{id: "menu-item-edit-select-connected", label:RED._("keyboard.selectAllConnected"), onselect: "core:select-connected-nodes"},
{id: "menu-item-edit-select-none", label:RED._("keyboard.selectNone"), onselect: "core:select-none"},
null,
{id: "menu-item-edit-split-wire-with-links", label:RED._("keyboard.splitWireWithLinks"), onselect: "core:split-wire-with-link-nodes"},
{id: "menu-item-edit-select-none", label:RED._("keyboard.selectNone"), onselect: "core:select-none"}
]});
menuOptions.push({id:"menu-item-view-menu",label:RED._("menu.label.view.view"),options:[
@@ -741,7 +727,6 @@ var RED = (function() {
RED.search.init();
RED.actionList.init();
RED.editor.init();
RED.diagnostics.init();
RED.diff.init();
@@ -750,7 +735,6 @@ var RED = (function() {
RED.keyboard.init(buildMainMenu);
RED.nodes.init();
RED.runtime.init()
RED.comms.connect();
$("#red-ui-main-container").show();
@@ -766,7 +750,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" tabindex="-1"></div>'+
'<div id="red-ui-editor-stack"></div>'+
'<div id="red-ui-palette"></div>'+
'<div id="red-ui-sidebar"></div>'+
'<div id="red-ui-sidebar-separator"></div>'+

View File

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

View File

@@ -21,34 +21,6 @@ RED.actions = (function() {
function getAction(name) {
return actions[name].handler;
}
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();
@@ -59,7 +31,7 @@ RED.actions = (function() {
}
function listActions() {
var result = [];
var missing = [];
Object.keys(actions).forEach(function(action) {
var def = actions[action];
var shortcut = RED.keyboard.getShortcut(action);
@@ -70,8 +42,28 @@ RED.actions = (function() {
isUser = !!RED.keyboard.getUserShortcut(action);
}
if (!def.label) {
def.label = getActionLabel(action)
var name = action;
var options = def.options;
var key = options ? options.label : undefined;
if (!key) {
key = "action-list." +name.replace(/^.*:/,"");
}
var label = RED._(key);
if (label === key) {
// no translation. convert `name` to description
label = name.replace(/(^.+:([a-z]))|(-([a-z]))/g, function() {
if (arguments[5] === 0) {
return arguments[2].toUpperCase();
} else {
return " "+arguments[4].toUpperCase();
}
});
missing.push(key);
}
def.label = label;
}
//console.log("; missing:", missing);
result.push({
id:action,
scope:shortcut?shortcut.scope:undefined,
@@ -87,7 +79,6 @@ RED.actions = (function() {
add: addAction,
remove: removeAction,
get: getAction,
getLabel: getActionLabel,
invoke: invokeAction,
list: listActions
}

View File

@@ -709,7 +709,6 @@ 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) {
@@ -988,7 +987,6 @@ RED.clipboard = (function() {
try {
RED.view.importNodes(newNodes, importOptions);
} catch(error) {
console.log(error.importConfig)
// Thrown for import_conflict
confirmImport(error.importConfig, newNodes, importOptions);
}

View File

@@ -9,14 +9,12 @@
*
* 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
* 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
*
* The auto-complete options should be an array of objects in the form:
* {
@@ -28,11 +26,10 @@
$.widget( "nodered.autoComplete", {
_create: function() {
const that = this;
var 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.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();
@@ -74,8 +71,8 @@
this.completionMenuShown = true;
},
_updateCompletions: function(val) {
const that = this;
if (val.trim().length < this.options.minLength) {
var that = this;
if (val.trim() === "") {
if (this.completionMenuShown) {
this.menu.hide();
}
@@ -99,7 +96,7 @@
}
}
if (this.options.search.length === 2) {
const requestId = 1+Math.floor(Math.random()*10000);
var requestId = 1+Math.floor(Math.random()*10000);
this.pendingRequest = requestId;
this.options.search(val,function(completions) { displayResults(completions,requestId);})
} else {
@@ -115,12 +112,4 @@
}
}
});
function parseInteger(input, def, min, max) {
if(input == null) { return (def || 0); }
min = min == null ? Number.NEGATIVE_INFINITY : min;
max = max == null ? Number.POSITIVE_INFINITY : max;
let n = parseInt(input);
if(isNaN(n) || n < min || n > max) { n = def || 0; }
return n;
}
})(jQuery);

View File

@@ -160,7 +160,7 @@
this.element.css("maxHeight",null);
}
if (this.options.height !== 'auto') {
this.uiContainer.css("overflow-y","auto");
this.uiContainer.css("overflow-y","scroll");
if (!isNaN(this.options.height)) {
this.uiHeight = this.options.height;
}

View File

@@ -16,7 +16,6 @@
RED.menu = (function() {
var menuItems = {};
let menuItemCount = 0
function createMenuItem(opt) {
var item;
@@ -60,16 +59,15 @@ 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'+(opt.direction!=='right'?" pull-left":"")+'"></i>';
linkContent += '<i class="fa fa-check-square'+(opt.direction!=='right'?" pull-left":"")+'"></i>';
linkContent += '<i class="fa fa-square pull-left"></i>';
linkContent += '<i class="fa fa-check-square pull-left"></i>';
}
if (opt.icon !== undefined) {
@@ -79,15 +77,12 @@ 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">'+label+'</span>'+
linkContent += '<span class="red-ui-menu-label-container"><span class="red-ui-menu-label">'+opt.label+'</span>'+
'<span class="red-ui-menu-sublabel">'+opt.sublabel+'</span></span>'
} else {
linkContent += '<span class="red-ui-menu-label"><span>'+label+'</span></span>'
linkContent += '<span class="red-ui-menu-label"><span>'+opt.label+'</span></span>'
}
linkContent += '</a>';
@@ -131,45 +126,19 @@ RED.menu = (function() {
});
}
if (opt.options) {
item.addClass("red-ui-menu-dropdown-submenu"+(opt.direction!=='right'?" pull-left":""));
item.addClass("red-ui-menu-dropdown-submenu 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");
}
}
@@ -178,9 +147,7 @@ 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);
@@ -206,22 +173,9 @@ 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);
@@ -229,21 +183,13 @@ 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);
}
@@ -252,9 +198,6 @@ RED.menu = (function() {
} else {
console.log("No callback for",id,opt.onselect);
}
if (opt.onpostselect) {
opt.onpostselect.call(opt,args)
}
}
function isSelected(id) {
@@ -306,14 +249,6 @@ 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) {
@@ -370,7 +305,6 @@ RED.menu = (function() {
isSelected: isSelected,
toggleSelected: toggleSelected,
setDisabled: setDisabled,
setVisible: setVisible,
addItem: addItem,
removeItem: removeItem,
setAction: setAction,

View File

@@ -359,7 +359,6 @@ RED.popover = (function() {
setTimeout(closePopup,delay.hide);
}
});
if (trigger === 'hover') {
target.on('mouseenter',function(e) {
clearTimeout(timer);
@@ -471,11 +470,6 @@ RED.popover = (function() {
popover.setAction = function(newAction) {
action = newAction;
}
popover.delete = function() {
popover.close(true)
target.off("mouseenter");
target.off("mouseleave");
};
return popover;
},
@@ -610,13 +604,10 @@ 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 = isAbsolutePosition?{left:xPos, top: yPos}:target.offset();
var targetWidth = isAbsolutePosition?0:target.width();
var targetHeight = isAbsolutePosition?0:target.outerHeight();
var pos = target.offset();
var targetWidth = target.width();
var targetHeight = target.outerHeight();
var panelHeight = panel.height();
var panelWidth = panel.width();

View File

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

View File

@@ -670,7 +670,7 @@ RED.tabs = (function() {
}
var link = $("<a/>",{href:"#"+tab.id, class:"red-ui-tab-label"}).appendTo(li);
if (tab.icon) {
$('<i>',{class:"red-ui-tab-icon", style:"mask-image: url("+tab.icon+"); -webkit-mask-image: url("+tab.icon+");"}).appendTo(link);
$('<img src="'+tab.icon+'" class="red-ui-tab-icon"/>').appendTo(link);
} else if (tab.iconClass) {
$('<i>',{class:"red-ui-tab-icon "+tab.iconClass}).appendTo(link);
}

View File

@@ -21,7 +21,6 @@
* - 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
@@ -119,7 +118,6 @@
switch(evt.keyCode) {
case 32: // SPACE
case 13: // ENTER
if (!that.options.selectable) { return }
if (evt.altKey || evt.ctrlKey || evt.metaKey || evt.shiftKey) {
return
}

View File

@@ -55,46 +55,34 @@
}
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);
let v = opt.value;
var i = v.toLowerCase().indexOf(val.toLowerCase());
if (i > -1) {
var pre = v.substring(0,i);
var matchedVal = v.substring(i,i+val.length);
var post = v.substring(i+val.length)
var el = $('<div/>',{style:"white-space:nowrap; overflow: hidden; flex-grow:1"});
$('<span/>').text(pre).appendTo(el);
$('<span/>',{style:"font-weight: bold"}).text(matchedVal).appendTo(el);
$('<span/>').text(post).appendTo(el);
var element = $('<div>',{style: "display: flex"});
el.appendTo(element);
if (opt.source) {
$('<div>').css({
"font-size": "0.8em"
}).text(opt.source.join(",")).appendTo(element);
}
matches.push({
value: optVal,
value: v,
label: element,
i: (valMatch.found ? valMatch.index : srcMatch.index)
});
i:i
})
}
})
matches.sort(function(A,B){return A.i-B.i})
@@ -105,36 +93,6 @@
// 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"]},
@@ -142,28 +100,38 @@
{ value: "req.params", source: ["http in"]},
{ value: "req.cookies", source: ["http in"]},
{ value: "req.files", source: ["http in"]},
{ value: "complete", source: ["join"] },
{ value: "contentType", source: ["mqtt"] },
{ value: "cookies", source: ["http in","http request"] },
{ value: "correlationData", source: ["mqtt"] },
{ value: "delay", source: ["delay","trigger"] },
{ value: "encoding", source: ["file"] },
{ value: "error", source: ["catch"] },
{ value: "filename", source: ["file","file in"] },
{ value: "flush", source: ["delay"] },
{ value: "followRedirects", source: ["http request"] },
{ value: "headers", source: ["http in"," http request"] },
{ value: "kill", source: ["exec"] },
{ value: "messageExpiryInterval", source: ["mqtt"] },
{ value: "method", source: ["http-request"] },
{ value: "options", source: ["xml"] },
{ value: "parts", source: ["split","join"] },
{ value: "pid", source: ["exec"] },
{ value: "qos", source: ["mqtt"] },
{ value: "rate", source: ["delay"] },
{ value: "rejectUnauthorized", source: ["http request"] },
{ 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: "statusCode", source: ["http in"] },
{ value: "template", source: ["template"] },
{ value: "toFront", source: ["delay"] },
{ value: "topic", source: ["inject","mqtt","rbe"] },
{ value: "url", source: ["http request"] },
{ value: "userProperties", source: ["mqtt"] },
{ value: "_session", source: ["websocket out","tcp out"] },
{ value: "userProperties", source: ["mqtt"] }
]
var allOptions = {
msg: {value:"msg",label:"msg.",validate:RED.utils.validatePropertyExpression, autoComplete: autoComplete(msgCompletions)},
@@ -198,8 +166,6 @@
}
RED.editor.editJSON({
value: value,
stateId: RED.editor.generateViewStateId("typedInput", that, "json"),
focus: true,
complete: function(v) {
var value = v;
try {
@@ -222,8 +188,6 @@
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"));
}
@@ -238,8 +202,6 @@
var that = this;
RED.editor.editBuffer({
value: this.value(),
stateId: RED.editor.generateViewStateId("typedInput", that, "bin"),
focus: true,
complete: function(v) {
that.value(v);
}
@@ -501,7 +463,7 @@
this.options.types = this.options.types||Object.keys(allOptions);
}
this.selectTrigger = $('<button type="button" class="red-ui-typedInput-type-select" tabindex="0"></button>').prependTo(this.uiSelect);
this.selectTrigger = $('<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);
@@ -570,7 +532,7 @@
})
// explicitly set optionSelectTrigger display to inline-block otherwise jQ sets it to 'inline'
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.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.optionSelectLabel = $('<span class="red-ui-typedInput-option-label"></span>').prependTo(this.optionSelectTrigger);
// RED.popover.tooltip(this.optionSelectLabel,function() {
// return that.optionValue;
@@ -591,7 +553,7 @@
that.uiSelect.addClass('red-ui-typedInput-focus');
});
this.optionExpandButton = $('<button type="button" tabindex="0" class="red-ui-typedInput-option-expand" style="display:inline-block"></button>').appendTo(this.uiSelect);
this.optionExpandButton = $('<button tabindex="0" class="red-ui-typedInput-option-expand" style="display:inline-block"></button>').appendTo(this.uiSelect);
this.optionExpandButtonIcon = $('<i class="red-ui-typedInput-icon fa fa-ellipsis-h"></i>').appendTo(this.optionExpandButton);
this.type(this.typeField.val() || this.options.default||this.typeList[0].value);
@@ -675,7 +637,7 @@
if (opt.icon.indexOf("<") === 0) {
$(opt.icon).prependTo(op);
} else if (opt.icon.indexOf("/") !== -1) {
$('<i>',{class:"red-ui-typedInput-icon", style:"mask-image: url("+opt.icon+"); -webkit-mask-image: url("+opt.icon+");"}).prependTo(op);
$('<img>',{src:mapDeprecatedIcon(opt.icon),style:"margin-right: 4px; height: 18px;"}).prependTo(op);
} else {
$('<i>',{class:"red-ui-typedInput-icon "+opt.icon}).prependTo(op);
}
@@ -1026,7 +988,10 @@
$(opt.icon).prependTo(this.selectLabel);
}
else if (opt.icon.indexOf("/") !== -1) {
$('<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);
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);
}
else {
$('<i>',{class:"red-ui-typedInput-icon "+opt.icon,style:"min-width: 13px; margin-right: 4px;"}).prependTo(this.selectLabel);
@@ -1182,8 +1147,7 @@
this.elementDiv.show();
if (opt.autoComplete) {
this.input.autoComplete({
search: opt.autoComplete,
minLength: 0
search: opt.autoComplete
})
}
}

View File

@@ -1,203 +0,0 @@
RED.contextMenu = (function () {
let menu;
function createMenu() {
// menu = RED.popover.menu({
// options: [
// {
// label: 'delete selection',
// onselect: function() {
// RED.actions.invoke('core:delete-selection')
// RED.view.focus()
// }
// },
// { label: 'world' }
// ],
// width: 200,
// })
}
function disposeMenu() {
$(document).off("mousedown.red-ui-workspace-context-menu");
if (menu) {
menu.remove();
}
menu = null;
}
function show(options) {
if (menu) {
menu.remove()
}
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 canRemoveFromGroup = hasSelection && !!selection.nodes[0].g
const offset = $("#red-ui-workspace-chart").offset()
// addX/addY must be the position in the workspace accounting for both scroll and scale
// The +5 is because we display the contextMenu -5,-5 to actual click position
let addX = (options.x + 5 - offset.left + $("#red-ui-workspace-chart").scrollLeft()) / RED.view.scale()
let addY = (options.y + 5 - offset.top + $("#red-ui-workspace-chart").scrollTop()) / RED.view.scale()
const menuItems = [
{ onselect: 'core:show-action-list', onpostselect: function () { } },
{
label: RED._("contextMenu.insert"),
options: [
{
label: RED._("contextMenu.node"),
onselect: function () {
RED.view.showQuickAddDialog({
position: [addX, addY],
touchTrigger: true,
splice: isSingleLink ? selection.links[0] : undefined,
// spliceMultiple: isMultipleLinks
})
},
onpostselect: function() {
// ensure quick add dialog search input has focus
$('#red-ui-type-search-input').trigger('focus')
}
},
(hasLinks) ? { // has least 1 wire selected
label: RED._("contextMenu.junction"),
onselect: 'core:split-wires-with-junctions',
disabled: !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
}
const historyEvent = {
dirty: RED.nodes.dirty(),
t: 'add',
junctions: [nn]
}
RED.nodes.addJunction(nn);
RED.history.push(historyEvent);
RED.nodes.dirty(true);
RED.view.select({nodes: [nn] });
RED.view.redraw(true)
}
},
{
label: RED._("contextMenu.linkNodes"),
onselect: 'core:split-wire-with-link-nodes',
disabled: !hasLinks
}
]
}
]
menuItems.push(
null,
{ onselect: 'core:undo', disabled: RED.history.list().length === 0 },
{ onselect: 'core:redo', disabled: RED.history.listRedo().length === 0 },
null,
{ onselect: 'core:cut-selection-to-internal-clipboard', label: RED._("keyboard.cutNode"), disabled: !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: !RED.view.clipboard() },
{ onselect: 'core:delete-selection', disabled: !canDelete },
{ onselect: 'core:show-export-dialog', label: RED._("menu.label.export") },
{ onselect: 'core:select-all-nodes' }
)
if (hasSelection) {
menuItems.push(
null,
isGroup ?
{ onselect: 'core:ungroup-selection', disabled: !isGroup }
: { onselect: 'core:group-selection', disabled: !hasSelection }
)
if (canRemoveFromGroup) {
menuItems.push({ onselect: 'core:remove-selection-from-group', label: RED._("menu.label.groupRemoveSelection") })
}
}
var direction = "right";
var MENU_WIDTH = 500; // can not use menu width here
if ((options.x -$(document).scrollLeft()) >
($(window).width() -MENU_WIDTH)) {
direction = "left";
}
menu = RED.menu.init({
direction: direction,
onpreselect: function() {
disposeMenu()
},
onpostselect: function () {
RED.view.focus()
},
options: menuItems
});
menu.attr("id", "red-ui-workspace-context-menu");
menu.css({
position: "absolute"
})
menu.appendTo("body");
// TODO: prevent the menu from overflowing the window.
var top = options.y
var left = options.x
if (top + menu.height() - $(document).scrollTop() > $(window).height()) {
top -= (top + menu.height()) - $(window).height() + 22;
}
if (left + menu.width() - $(document).scrollLeft() > $(window).width()) {
left -= (left + menu.width()) - $(window).width() + 18;
}
menu.css({
top: top + "px",
left: left + "px"
})
$(".red-ui-menu.red-ui-menu-dropdown").hide();
$(document).on("mousedown.red-ui-workspace-context-menu", function (evt) {
if (menu && menu[0].contains(evt.target)) {
return
}
disposeMenu()
});
menu.show();
// set focus to first item so that pressing escape key closes the menu
$("#red-ui-workspace-context-menu :first(ul) > a").trigger("focus")
}
// Allow escape key hook and other editor events to close context menu
RED.keyboard.add("red-ui-workspace-context-menu", "escape", function () { RED.contextMenu.hide() })
RED.events.on("editor:open", function () { RED.contextMenu.hide() });
RED.events.on("search:open", function () { RED.contextMenu.hide() });
RED.events.on("type-search:open", function () { RED.contextMenu.hide() });
RED.events.on("actionList:open", function () { RED.contextMenu.hide() });
RED.events.on("view:selection-changed", function () { RED.contextMenu.hide() });
return {
show: show,
hide: disposeMenu
}
})()

View File

@@ -63,18 +63,16 @@ 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");
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 });
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"},
]
});
} else if (type == "simple") {
var label = options.label || RED._("deploy.deploy");
var icon = 'red/images/deploy-full-o.svg';
@@ -102,10 +100,6 @@ 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); });
@@ -276,73 +270,18 @@ RED.deploy = (function() {
function sanitize(html) {
return html.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")
}
function shadeShow() {
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;
$("#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",
@@ -368,10 +307,15 @@ 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() {
deployButtonClearBusy();
deployInflight = false;
$(".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);
});
}
@@ -439,14 +383,6 @@ RED.deploy = (function() {
"</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"),
@@ -466,14 +402,6 @@ RED.deploy = (function() {
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"),
@@ -506,14 +434,21 @@ RED.deploy = (function() {
const nns = RED.nodes.createCompleteNodeSet();
const startTime = Date.now();
deployButtonSetBusy();
$(".red-ui-deploy-button-content").css('opacity', 0);
$(".red-ui-deploy-button-spinner").show();
$("#red-ui-header-button-deploy").addClass("disabled");
const data = { flows: nns };
if (!force) {
data.rev = RED.nodes.version();
}
deployInflight = true;
shadeShow();
$("#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",
@@ -527,33 +462,9 @@ RED.deploy = (function() {
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(
RED.notify(
'<p>' + RED._("deploy.successfulDeploy") + '</p>' +
'<p>' + RED._("deploy.unusedConfigNodes") + '</p>', opts);
'<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");
}
@@ -599,11 +510,15 @@ RED.deploy = (function() {
RED.notify(RED._("deploy.deployFailed", { message: RED._("deploy.errors.noResponse") }), "error");
}
}).always(function () {
deployInflight = false;
const delta = Math.max(0, 300 - (Date.now() - startTime));
setTimeout(function () {
deployInflight = false;
deployButtonClearBusy()
shadeHide()
$(".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);
});
}

View File

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

View File

@@ -110,11 +110,7 @@ RED.editor = (function() {
var result = [];
for (var prop in definition) {
if (definition.hasOwnProperty(prop)) {
var valid = validateNodeProperty(node, definition, prop, properties[prop]);
if ((typeof valid) === "string") {
result.push(valid);
}
else if(!valid) {
if (!validateNodeProperty(node, definition, prop, properties[prop])) {
result.push(prop);
}
}
@@ -128,7 +124,7 @@ RED.editor = (function() {
* @param definition - the node property definitions (either def.defaults or def.creds)
* @param property - the property name being validated
* @param value - the property value being validated
* @returns {boolean|string} whether the node proprty is valid. `true`: valid `false|String`: invalid
* @returns {boolean} whether the node proprty is valid
*/
function validateNodeProperty(node,definition,property,value) {
var valid = true;
@@ -140,74 +136,22 @@ RED.editor = (function() {
if (/^\$\{[a-zA-Z_][a-zA-Z0-9_]*\}$/.test(value)) {
return true;
}
var label = null;
if (("label" in definition[property]) &&
((typeof definition[property].label) == "string")) {
label = definition[property].label;
}
if ("required" in definition[property] && definition[property].required) {
valid = value !== "";
if (!valid && label) {
return RED._("validator.errors.missing-required-prop", {
prop: label
});
}
}
if (valid && "validate" in definition[property]) {
try {
var opt = {};
if (label) {
opt.label = label;
}
valid = definition[property].validate.call(node,value, opt);
// If the validator takes two arguments, it is a 3.x validator that
// can return a String to mean 'invalid' and provide a reason
if ((definition[property].validate.length === 2) &&
((typeof valid) === "string")) {
return valid;
} else {
// Otherwise, a 2.x returns a truth-like/false-like value that
// we should cooerce to a boolean.
valid = !!valid
}
valid = definition[property].validate.call(node,value);
} catch(err) {
console.log("Validation error:",node.type,node.id,"property: "+property,"value:",value,err);
return RED._("validator.errors.validation-error", {
prop: property,
node: node.type,
id: node.id,
error: err.message
});
}
}
if (valid && definition[property].type && RED.nodes.getType(definition[property].type) && !("validate" in definition[property])) {
if (!value || value == "_ADD_") {
valid = definition[property].hasOwnProperty("required") && !definition[property].required;
if (!valid && label) {
return RED._("validator.errors.missing-required-prop", {
prop: label
});
}
} else {
var configNode = RED.nodes.node(value);
if (configNode) {
if ((configNode.valid == null) || configNode.valid) {
return true;
}
if (label) {
return RED._("validator.errors.invalid-config", {
prop: label
});
}
}
else {
if (label) {
return RED._("validator.errors.missing-config", {
prop: label
});
}
}
return false;
valid = (configNode && (configNode.valid == null || configNode.valid));
}
}
return valid;
@@ -235,26 +179,10 @@ RED.editor = (function() {
if (defaults[property].hasOwnProperty("format") && defaults[property].format !== "" && input[0].nodeName === "DIV") {
value = input.text();
}
var valid = validateNodeProperty(node, defaults, property,value);
if (((typeof valid) === "string") || !valid) {
if (!validateNodeProperty(node, defaults, property,value)) {
input.addClass("input-error");
if ((typeof valid) === "string") {
var tooltip = input.data("tooltip");
if (tooltip) {
tooltip.setContent(valid);
}
else {
tooltip = RED.popover.tooltip(input, valid);
input.data("tooltip", tooltip);
}
}
} else {
input.removeClass("input-error");
var tooltip = input.data("tooltip");
if (tooltip) {
input.data("tooltip", null);
tooltip.delete();
}
}
}
}
@@ -421,11 +349,20 @@ RED.editor = (function() {
* @param prefix - the prefix to use in the input element ids (node-input|node-config-input)
*/
function attachPropertyChangeHandler(node,definition,property,prefix) {
$("#"+prefix+"-"+property).on("change keyup paste", function(event) {
if (!$(this).attr("skipValidation")) {
validateNodeEditor(node,prefix);
}
});
var input = $("#"+prefix+"-"+property);
if (definition !== undefined && "format" in definition[property] && definition[property].format !== "" && input[0].nodeName === "DIV") {
$("#"+prefix+"-"+property).on('change keyup', function(event) {
if (!$(this).attr("skipValidation")) {
validateNodeEditor(node,prefix);
}
});
} else {
$("#"+prefix+"-"+property).on("change", function(event) {
if (!$(this).attr("skipValidation")) {
validateNodeEditor(node,prefix);
}
});
}
}
/**
@@ -859,7 +796,6 @@ RED.editor = (function() {
if (buildingEditDialog) { return }
buildingEditDialog = true;
var editing_node = node;
var removeInfoEditorOnClose = false;
var skipInfoRefreshOnClose = false;
var activeEditPanes = [];
@@ -1055,14 +991,6 @@ RED.editor = (function() {
}
if (!node._def.defaults || !node._def.defaults.hasOwnProperty('info')) {
nodeEditPanes.push('editor-tab-description');
removeInfoEditorOnClose = true;
if(node.infoEditor) {
//As 'editor-tab-description' adds `node.infoEditor` store original & set a
//flag to NOT remove this property
node.infoEditor__orig = node.infoEditor;
delete node.infoEditor;
removeInfoEditorOnClose = false;
}
}
nodeEditPanes.push("editor-tab-appearance");
@@ -1078,17 +1006,8 @@ RED.editor = (function() {
if (RED.view.state() != RED.state.IMPORT_DRAGGING) {
RED.view.state(RED.state.DEFAULT);
}
if (editing_node) {
if (editing_node.infoEditor__orig) {
editing_node.infoEditor = editing_node.infoEditor__orig;
delete editing_node.infoEditor__orig;
}
if (removeInfoEditorOnClose) {
delete editing_node.infoEditor;
}
if (!skipInfoRefreshOnClose) {
RED.sidebar.info.refresh(editing_node);
}
if (editing_node && !skipInfoRefreshOnClose) {
RED.sidebar.info.refresh(editing_node);
}
RED.workspaces.refresh();
@@ -1105,10 +1024,6 @@ RED.editor = (function() {
if (editing_node) {
RED.sidebar.info.refresh(editing_node);
RED.sidebar.help.show(editing_node.type, false);
//ensure focused element is NOT body (for keyboard scope to operate correctly)
if (document.activeElement.tagName === 'BODY') {
$('#red-ui-editor-stack').trigger('focus')
}
}
}
}
@@ -1952,48 +1867,6 @@ RED.editor = (function() {
}
}
/** Genrate a consistent but unique ID for saving and restoring the code editors view state */
function generateViewStateId(source, thing, suffix) {
try {
thing = thing || {};
const thingOptions = typeof thing.options === "object" ? thing.options : {};
let stateId;
if (thing.hasOwnProperty("stateId")) {
stateId = thing.stateId
} else if (thingOptions.hasOwnProperty("stateId")) {
stateId = thing.stateId
}
if (stateId === false) { return false; }
if (!stateId) {
let id;
const selection = RED.view.selection();
if (source === "node" && thing.id) {
id = thing.id;
} else if (selection.nodes && selection.nodes.length) {
id = selection.nodes[0].id;
} else {
return false; //cant obtain Id.
}
//Use a string builder to build an ID
const sb = [id];
//get the index of the el - there may be more than one editor.
const el = $(thing.element || thingOptions.element);
if(el.length) {
sb.push(el.closest(".form-row").index());
sb.push(el.index());
}
if (source == "typedInput") {
sb.push(el.closest("li").index());//for when embeded in editable list
if (!suffix && thing.propertyType) { suffix = thing.propertyType }
}
stateId = sb.join("/");
}
if (stateId && suffix) { stateId += "/" + suffix; }
return stateId;
} catch (error) {
return false;
}
}
return {
init: function() {
if(window.ace) { window.ace.config.set('basePath', 'vendor/ace'); }
@@ -2010,7 +1883,6 @@ RED.editor = (function() {
});
RED.editor.codeEditor.init();
},
generateViewStateId: generateViewStateId,
edit: showEditDialog,
editConfig: showEditConfigNodeDialog,
editFlow: showEditFlowDialog,

View File

@@ -47,7 +47,6 @@
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) {
@@ -61,14 +60,12 @@
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();
}
},
@@ -77,8 +74,7 @@
text: RED._("common.label.done"),
class: "primary",
click: function() {
bufferStringEditor.saveView();
if (onComplete) { onComplete(JSON.stringify(bufferBinValue),null,bufferStringEditor); }
onComplete(JSON.stringify(bufferBinValue));
RED.tray.close();
}
}
@@ -90,20 +86,19 @@
}
},
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||"",
stateId: RED.editor.generateViewStateId("buffer", options, ""),
focus: true,
value: "",
mode:"ace/mode/text"
});
bufferStringEditor.getSession().setValue(value||"",-1);
bufferBinEditor = RED.editor.createEditor({
id: 'red-ui-editor-type-buffer-bin',
value: "",
stateId: false,
focus: false,
mode:"ace/mode/text",
readOnly: true
});

View File

@@ -21,7 +21,7 @@
const MONACO = "monaco";
const ACE = "ace";
const defaultEditor = MONACO;
const defaultEditor = ACE;
const DEFAULT_SETTINGS = { lib: defaultEditor, options: {} };
var selectedCodeEditor = null;
var initialised = false;
@@ -48,12 +48,12 @@
}
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.
@@ -79,7 +79,7 @@
return this.editor.create(options);//fallback to ACE
}
}
return {
init: init,
/**
@@ -91,7 +91,7 @@
},
/**
* Get user selected code editor
* @return {string} Returns
* @return {string} Returns
* @memberof RED.editor.codeEditor
*/
get editor() {
@@ -104,4 +104,4 @@
*/
create: create
}
})();
})();

View File

@@ -80,9 +80,6 @@ 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);
@@ -95,15 +92,11 @@ RED.editor.codeEditor.ace = (function() {
RED.editor.editMarkdown({
value: value,
width: "Infinity",
stateId: options.stateId,
focus: true,
cancel: function () {
editor.focus();
},
cursor: editor.getCursorPosition(),
complete: function(v,cursor) {
editor.setValue(v, -1);
editor.gotoLine(cursor.row+1,cursor.column,false);
setTimeout(function() {
editor.restoreView();
editor.focus();
},300);
}
@@ -124,56 +117,11 @@ 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;
}

View File

@@ -100,7 +100,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"] , knownModules["util"] ];
const defaultServerSideTypes = [ knownModules["node-red-util"], knownModules["node-red-func"], knownModules["globals"], knownModules["console"], knownModules["buffer"] ];
const modulesCache = {};
@@ -171,7 +171,7 @@ RED.editor.codeEditor.monaco = (function() {
options = options || {};
window.MonacoEnvironment = window.MonacoEnvironment || {};
window.MonacoEnvironment.getWorkerUrl = window.MonacoEnvironment.getWorkerUrl || function (moduleId, label) {
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'; }
@@ -747,25 +747,13 @@ 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];
@@ -1110,7 +1098,6 @@ RED.editor.codeEditor.monaco = (function() {
try {
var m = this.getModel();
if(m && !m.isDisposed()) {
ed._initState = null;
m.dispose();
}
this.setModel(null);
@@ -1164,7 +1151,7 @@ RED.editor.codeEditor.monaco = (function() {
try {
var _model = ed.getModel();
if (_model !== null) {
var id = _model._languageId; // e.g. javascript
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
@@ -1256,7 +1243,14 @@ RED.editor.codeEditor.monaco = (function() {
//#endregion "ACE compatability"
//final setup
ed.focusMemory = options.focus;
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._mode = editorOptions.language;
//as models are signleton, consts and let are avialable to other javascript instances
@@ -1268,12 +1262,11 @@ 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);
});
@@ -1307,33 +1300,17 @@ RED.editor.codeEditor.monaco = (function() {
}
function onVisibilityChange(visible, delay, element) {
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") {
if(visible) {
if(ed._mode == "javascript" && ed._tempMode == "text") {
ed._tempMode = "";
setTimeout(function () {
if (element.parentElement) { //ensure el is still in DOM
setTimeout(function() {
if(element.parentElement) { //ensure el is still in DOM
ed.setMode('javascript', undefined, false);
}
}, delay);
}, delay || 50);
}
} 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";
}
@@ -1352,19 +1329,15 @@ 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",
stateId: options.stateId,
cancel: function () {
ed.focus();
},
cursor: ed.getCursorPosition(),
complete: function (v, cursor) {
ed.setValue(v, -1);
ed.gotoLine(cursor.row + 1, cursor.column, false);
setTimeout(function () {
ed.focus();
ed.restoreView();
}, 300);
}
})
@@ -1380,37 +1353,7 @@ 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;
}

View File

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

View File

@@ -50,7 +50,6 @@
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) {
@@ -64,14 +63,12 @@
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();
}
},
@@ -81,8 +78,7 @@
class: "primary",
click: function() {
$("#red-ui-editor-type-expression-help").text("");
expressionEditor.saveView();
if (onComplete) { onComplete(expressionEditor.getValue(),expressionEditor.getCursorPosition(),expressionEditor); }
onComplete(expressionEditor.getValue());
RED.tray.close();
}
}
@@ -114,8 +110,6 @@
id: 'red-ui-editor-type-expression',
value: "",
mode:"ace/mode/jsonata",
stateId: options.stateId,
focus: true,
options: {
enableBasicAutocompletion:true,
enableSnippets:true,
@@ -239,8 +233,6 @@
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
});
@@ -255,9 +247,6 @@
var currentExpression = expressionEditor.getValue();
var expr;
var usesContext = false;
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 {
@@ -270,18 +259,6 @@
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;
@@ -299,18 +276,6 @@
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) {
@@ -337,8 +302,6 @@
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

View File

@@ -21,7 +21,6 @@
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) {
@@ -29,16 +28,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();
}
},
@@ -47,8 +46,7 @@
text: RED._("common.label.done"),
class: "primary",
click: function() {
expressionEditor.saveView();
if (onComplete) { onComplete(expressionEditor.getValue(), expressionEditor.getCursorPosition(), expressionEditor); }
onComplete(expressionEditor.getValue(),expressionEditor.getCursorPosition());
RED.tray.close();
}
}
@@ -64,12 +62,11 @@
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,
@@ -87,16 +84,19 @@
},
extraLibs: options.extraLibs
});
if (options.cursor && !expressionEditor._initState) {
if (options.cursor) {
expressionEditor.gotoLine(options.cursor.row+1,options.cursor.column,false);
}
dialogForm.i18n();
setTimeout(function() {
expressionEditor.focus();
},300);
},
close: function() {
expressionEditor.destroy();
if (options.onclose) {
options.onclose();
}
expressionEditor.destroy();
},
show: function() {}
}

View File

@@ -21,9 +21,7 @@
'<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;">'+
'<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">'+
'<button id="node-input-json-reformat" class="red-ui-button red-ui-button-small"><span data-i18n="jsonEditor.format"></span></button>'+
'</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>'+
@@ -36,7 +34,7 @@
var activeTab;
function insertNewItem(parent,index,copyIndex,readOnly) {
function insertNewItem(parent,index,copyIndex) {
var newValue = "";
if (parent.children.length > 0) {
@@ -62,26 +60,26 @@
newKey = keyRoot+"-"+(keySuffix++);
}
}
var newItem = handleItem(newKey,newValue,parent.depth+1,parent,readOnly);
var newItem = handleItem(newKey,newValue,parent.depth+1,parent);
parent.treeList.insertChildAt(newItem, index, true);
parent.treeList.expand();
}
function showObjectMenu(button,item,readOnly) {
function showObjectMenu(button,item) {
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,readOnly);
insertNewItem(item.parent,index,index);
}});
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,readOnly);
insertNewItem(item.parent,index,index-1);
}});
}
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,readOnly);
insertNewItem(item,item.children.length,item.children.length-1);
}});
}
if (item.parent) {
@@ -123,7 +121,7 @@
newKey = keyRoot+"-"+(keySuffix++);
}
}
var newItem = handleItem(newKey,convertToObject(item),item.parent.depth+1,item.parent,readOnly);
var newItem = handleItem(newKey,convertToObject(item),item.parent.depth+1,item.parent);
var index = item.parent.children.indexOf(item)+1;
item.parent.treeList.insertChildAt(newItem, index, true);
@@ -173,24 +171,24 @@
menuOptionMenu.show();
}
function parseObject(obj,depth,parent,readOnly) {
function parseObject(obj,depth,parent) {
var result = [];
for (var prop in obj) {
if (obj.hasOwnProperty(prop)) {
result.push(handleItem(prop,obj[prop],depth,parent,readOnly));
result.push(handleItem(prop,obj[prop],depth,parent));
}
}
return result;
}
function parseArray(obj,depth,parent,readOnly) {
function parseArray(obj,depth,parent) {
var result = [];
var l = obj.length;
for (var i=0;i<l;i++) {
result.push(handleItem(i,obj[i],depth,parent,readOnly));
result.push(handleItem(i,obj[i],depth,parent));
}
return result;
}
function handleItem(key,val,depth,parent,readOnly) {
function handleItem(key,val,depth,parent) {
var item = {depth:depth, type: typeof val};
var container = $('<span class="red-ui-editor-type-json-editor-label">');
if (key != null) {
@@ -206,14 +204,11 @@
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());
@@ -258,10 +253,10 @@
item.expanded = depth < 2;
item.type = "array";
item.deferBuild = depth >= 2;
item.children = parseArray(val,depth+1,item,readOnly);
item.children = parseArray(val,depth+1,item);
} else if (val !== null && item.type === "object") {
item.expanded = depth < 2;
item.children = parseObject(val,depth+1,item,readOnly);
item.children = parseObject(val,depth+1,item);
item.deferBuild = depth >= 2;
} else {
item.value = val;
@@ -292,11 +287,7 @@
//
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') {
@@ -311,8 +302,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.svg"},
{value:"object",label:RED._("common.type.object"),hasValue:false,icon:"red/images/typedInput/json.svg"}
{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"}
],
default: valType
});
@@ -404,19 +395,17 @@
valueLabel.hide();
})
item.gutter = $('<span class="red-ui-editor-type-json-editor-item-gutter"></span>');
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);
});
}
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);
}
$('<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;
}
@@ -445,7 +434,6 @@
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) {
@@ -467,16 +455,15 @@
}
}
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();
}
},
@@ -498,8 +485,7 @@
} else if (activeTab === "json-raw") {
result = expressionEditor.getValue();
}
expressionEditor.saveView();
if (onComplete) { onComplete(result,null,expressionEditor) }
if (onComplete) { onComplete(result) }
RED.tray.close();
}
}
@@ -512,29 +498,10 @@
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) {
@@ -561,15 +528,13 @@
})
});
expressionEditor = RED.editor.createEditor({
id: 'node-input-json',
value: value||"",
mode:"ace/mode/json",
readOnly: !!options.readOnly,
stateId: options.stateId,
focus: true
value: "",
mode:"ace/mode/json"
});
expressionEditor.getSession().setValue(value||"",-1);
if (options.requireValid) {
expressionEditor.getSession().on('change', function() {
clearTimeout(changeTimer);
@@ -606,7 +571,7 @@
var raw = expressionEditor.getValue().trim() ||"{}";
try {
var parsed = JSON.parse(raw);
rootNode = handleItem(null,parsed,0,null,options.readOnly);
rootNode = handleItem(null,parsed,0,null);
rootNode.class = "red-ui-editor-type-json-root-node"
list.treeList('data',[rootNode]);
} catch(err) {
@@ -624,15 +589,17 @@
tabs.addTab({
id: 'json-raw',
label: options.readOnly ? RED._('jsonEditor.rawMode-readonly') : RED._('jsonEditor.rawMode'),
label: RED._('jsonEditor.rawMode'),
content: $("#red-ui-editor-type-json-tab-raw")
});
tabs.addTab({
id: 'json-ui',
label: options.readOnly ? RED._('jsonEditor.uiMode-readonly') : RED._('jsonEditor.uiMode'),
label: RED._('jsonEditor.uiMode'),
content: $("#red-ui-editor-type-json-tab-ui")
});
finishedBuild = true;
},
close: function() {
if (options.onclose) {

View File

@@ -54,26 +54,24 @@
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();
}
},
@@ -82,8 +80,7 @@
text: RED._("common.label.done"),
class: "primary",
click: function() {
expressionEditor.saveView();
if (onComplete) { onComplete(expressionEditor.getValue(),expressionEditor.getCursorPosition(), expressionEditor); }
onComplete(expressionEditor.getValue(),expressionEditor.getCursorPosition());
RED.tray.close();
}
}
@@ -102,8 +99,6 @@
expressionEditor = RED.editor.createEditor({
id: 'red-ui-editor-type-markdown',
value: value,
stateId: options.stateId,
focus: true,
mode:"ace/mode/markdown",
expandable: false
});
@@ -148,17 +143,17 @@
});
RED.popover.tooltip($("#node-btn-markdown-preview"), RED._("markdownEditor.toggle-preview"));
if (options.cursor && !expressionEditor._initState) {
if (options.cursor) {
expressionEditor.gotoLine(options.cursor.row+1,options.cursor.column,false);
}
dialogForm.i18n();
},
close: function() {
expressionEditor.destroy();
if (options.onclose) {
options.onclose();
}
expressionEditor.destroy();
},
show: function() {}
}

View File

@@ -235,7 +235,6 @@
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);

View File

@@ -8,6 +8,7 @@
create: function(container) {
this.editor = buildDescriptionForm(container,node);
RED.e = this.editor;
},
resize: function(size) {
this.editor.resize();
@@ -57,9 +58,11 @@
var nodeInfoEditor = RED.editor.createEditor({
id: editorId,
mode: 'ace/mode/markdown',
stateId: RED.editor.generateViewStateId("node", node, "nodeinfo"),
value: node.info || ""
value: ""
});
if (node.info) {
nodeInfoEditor.getSession().setValue(node.info, -1);
}
node.infoEditor = nodeInfoEditor;
return nodeInfoEditor;
}

View File

@@ -21,7 +21,6 @@
var definition = {
show: function(options) {
var value = options.value;
var onCancel = options.cancel;
var onComplete = options.complete;
var type = "_text"
if ($("script[data-template-name='"+type+"']").length === 0) {
@@ -29,16 +28,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();
}
},
@@ -47,8 +46,7 @@
text: RED._("common.label.done"),
class: "primary",
click: function() {
expressionEditor.saveView();
if (onComplete) { onComplete(expressionEditor.getValue(),expressionEditor.getCursorPosition(),expressionEditor);}
onComplete(expressionEditor.getValue(),expressionEditor.getCursorPosition());
RED.tray.close();
}
}
@@ -57,27 +55,31 @@
var rows = $("#dialog-form>div:not(.node-text-editor-row)");
var editorRow = $("#dialog-form>div.node-text-editor-row");
var height = $("#dialog-form").height();
// for (var i=0;i<rows.size();i++) {
// height -= $(rows[i]).outerHeight(true);
// }
// height -= (parseInt($("#dialog-form").css("marginTop"))+parseInt($("#dialog-form").css("marginBottom")));
$(".node-text-editor").css("height",height+"px");
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-text',
value: value||"",
stateId: options.stateId,
mode:"ace/mode/"+(options.mode||"text"),
focus: true,
value: "",
mode:"ace/mode/"+(options.mode||"text")
});
if (options.cursor && !expressionEditor._initState) {
expressionEditor.getSession().setValue(value||"",-1);
if (options.cursor) {
expressionEditor.gotoLine(options.cursor.row+1,options.cursor.column,false);
}
},
close: function() {
expressionEditor.destroy();
if (options.onclose) {
options.onclose();
}
expressionEditor.destroy();
},
show: function() {}
}

View File

@@ -101,7 +101,6 @@ RED.group = (function() {
RED.editor.colorPicker.create({
id:"node-input-style-stroke",
value: style.stroke || defaultGroupStyle.stroke || "#a4a4a4",
defaultValue: "#a4a4a4",
palette: colorPalette,
cellPerRow: colorCount,
cellWidth: 16,
@@ -113,7 +112,6 @@ RED.group = (function() {
RED.editor.colorPicker.create({
id:"node-input-style-fill",
value: style.fill || defaultGroupStyle.fill ||"none",
defaultValue: "none",
palette: colorPalette,
cellPerRow: colorCount,
cellWidth: 16,
@@ -131,7 +129,6 @@ RED.group = (function() {
RED.editor.colorPicker.create({
id:"node-input-style-color",
value: style.color || defaultGroupStyle.color ||"#a4a4a4",
defaultValue: "#a4a4a4",
palette: colorPalette,
cellPerRow: colorCount,
cellWidth: 16,
@@ -311,7 +308,6 @@ RED.group = (function() {
RED.history.push(historyEvent);
RED.view.select({nodes:[group]});
RED.nodes.dirty(true);
RED.view.focus();
}
}
}
@@ -334,7 +330,6 @@ RED.group = (function() {
RED.history.push(historyEvent);
RED.view.select({nodes:newSelection})
RED.nodes.dirty(true);
RED.view.focus();
}
}
@@ -354,10 +349,8 @@ RED.group = (function() {
}
if (n.type === 'group') {
RED.events.emit("groups:change",n)
} else if (n.type !== 'junction') {
RED.events.emit("nodes:change",n)
} else {
RED.events.emit("junctions:change",n)
RED.events.emit("nodes:change",n)
}
})
RED.nodes.removeGroup(g);
@@ -429,7 +422,6 @@ RED.group = (function() {
});
RED.history.push(historyEvent);
RED.nodes.dirty(true);
RED.view.focus();
}
}
@@ -457,7 +449,6 @@ RED.group = (function() {
}
}
RED.view.select({nodes:selection.nodes})
RED.view.focus();
}
}
function createGroup(nodes) {
@@ -553,10 +544,8 @@ RED.group = (function() {
group.h = Math.max(group.h,n.y+n.h/2+25-group.y);
if (n.type === 'group') {
RED.events.emit("groups:change",n)
} else if (n.type !== 'junction') {
RED.events.emit("nodes:change",n)
} else {
RED.events.emit("junctions:change",n)
RED.events.emit("nodes:change",n)
}
}
}
@@ -591,10 +580,8 @@ RED.group = (function() {
}
if (n.type === 'group') {
RED.events.emit("groups:change",n)
} else if (n.type !== 'junction') {
RED.events.emit("nodes:change",n)
} else {
RED.events.emit("junctions:change",n)
RED.events.emit("nodes:change",n)
}
}
markDirty(group);

View File

@@ -265,18 +265,13 @@ RED.keyboard = (function() {
if (partialState) {
partialState = null;
return resolveKeyEvent(evt);
} else if (Object.keys(handler).length > 0) {
partialState = handler;
evt.preventDefault();
return null;
} else {
return null;
}
if (Object.keys(handler).length > 0) {
// check if there's a potential combined handler initiated by this keyCode
for (let h in handler) {
if (matchHandlerToEvent(evt,handler[h]) > -1) {
partialState = handler;
evt.preventDefault();
break;
}
}
}
return null;
} else {
var depth = Infinity;
var matchedHandler;

View File

@@ -175,19 +175,9 @@ RED.palette = (function() {
$('<button type="button" onclick="RED.workspaces.show(\''+type.substring(8).replace(/'/g,"\\'")+'\'); return false;" class="red-ui-button red-ui-button-small" style="float: right; margin-left: 5px;"><i class="fa fa-pencil"></i></button>').appendTo(popOverContent)
}
const safeType = type.replace(/'/g,"\\'");
const wrapStr = function (str) {
if(str.indexOf(' ') >= 0) {
return '"' + str + '"'
}
return str
}
var safeType = type.replace(/'/g,"\\'");
$('<button type="button"; return false;" class="red-ui-button red-ui-button-small" style="float: right; margin-left: 5px;"><i class="fa fa-search"></i></button>')
.appendTo(popOverContent)
.on('click', function() {
RED.search.show('type:' + wrapStr(safeType))
})
$('<button type="button" onclick="RED.search.show(\'type:'+safeType+'\'); return false;" class="red-ui-button red-ui-button-small" style="float: right; margin-left: 5px;"><i class="fa fa-search"></i></button>').appendTo(popOverContent)
$('<button type="button" onclick="RED.sidebar.help.show(\''+safeType+'\'); return false;" class="red-ui-button red-ui-button-small" style="float: right; margin-left: 5px;"><i class="fa fa-book"></i></button>').appendTo(popOverContent)
$('<p>',{style:"font-size: 0.8em"}).text(metaData).appendTo(popOverContent);
@@ -234,7 +224,14 @@ RED.palette = (function() {
var d = $('<div>',{class:"red-ui-palette-node"}).attr("data-palette-type",nt).data('category',rootCategory);
var label = RED.utils.getPaletteLabel(nt, def);///^(.*?)([ -]in|[ -]out)?$/.exec(nt)[1];
var label = nt;///^(.*?)([ -]in|[ -]out)?$/.exec(nt)[1];
if (typeof def.paletteLabel !== "undefined") {
try {
label = (typeof def.paletteLabel === "function" ? def.paletteLabel.call(def) : def.paletteLabel)||"";
} catch(err) {
console.log("Definition error: "+nt+".paletteLabel",err);
}
}
$('<div/>', {
class: "red-ui-palette-label"+(((!def.align && def.inputs !== 0 && def.outputs === 0) || "right" === def.align) ? " red-ui-palette-label-right" : "")

View File

@@ -120,7 +120,6 @@ RED.projects.settings = (function() {
title: RED._('sidebar.project.editDescription'),
header: $('<span><i class="fa fa-book"></i> README.md</span>'),
value: activeProject.description,
stateId: "sidebar.project.editDescription",
complete: function(v) {
container.empty();
var spinner = utils.addSpinnerOverlay(container);

View File

@@ -545,7 +545,7 @@ RED.projects = (function() {
var sshwarningRow = $('<div class="red-ui-projects-dialog-screen-create-row-auth-error-no-keys"></div>').hide().appendTo(subrow);
$('<div class="form-row"><i class="fa fa-warning"></i> '+RED._("projects.clone-project.ssh-key-desc")+'</div>').appendTo(sshwarningRow);
subrow = $('<div style="text-align: center">').appendTo(sshwarningRow);
$('<button type="button" class="red-ui-button red-ui-projects-dialog-button">'+RED._("projects.clone-project.ssh-key-add")+'</button>').appendTo(subrow).on("click", function(e) {
$('<button class="red-ui-button red-ui-projects-dialog-button">'+RED._("projects.clone-project.ssh-key-add")+'</button>').appendTo(subrow).on("click", function(e) {
e.preventDefault();
dialog.dialog( "close" );
RED.userSettings.show('gitconfig');
@@ -1171,11 +1171,11 @@ RED.projects = (function() {
row = $('<div class="form-row button-group"></div>').appendTo(container);
var openProject = $('<button type="button" data-type="open" class="red-ui-button red-ui-projects-dialog-button red-ui-projects-dialog-screen-create-type toggle"><i class="fa fa-archive fa-2x"></i><i style="position: absolute;" class="fa fa-folder-open"></i><br/>'+RED._("projects.create.open")+'</button>').appendTo(row);
var createAsEmpty = $('<button type="button" data-type="empty" class="red-ui-button red-ui-projects-dialog-button red-ui-projects-dialog-screen-create-type toggle"><i class="fa fa-archive fa-2x"></i><i style="position: absolute;" class="fa fa-asterisk"></i><br/>'+RED._("projects.create.create")+'</button>').appendTo(row);
// var createAsCopy = $('<button type="button" data-type="copy" class="red-ui-button red-ui-projects-dialog-button red-ui-projects-dialog-screen-create-type toggle"><i class="fa fa-archive fa-2x"></i><i class="fa fa-long-arrow-right fa-2x"></i><i class="fa fa-archive fa-2x"></i><br/>Copy existing</button>').appendTo(row);
var createAsClone = $('<button type="button" data-type="clone" class="red-ui-button red-ui-projects-dialog-button red-ui-projects-dialog-screen-create-type toggle"><i class="fa fa-archive fa-2x"></i><i style="position: absolute;" class="fa fa-git"></i><br/>'+RED._("projects.create.clone")+'</button>').appendTo(row);
// var createAsClone = $('<button type="button" data-type="clone" class="red-ui-button red-ui-projects-dialog-button red-ui-projects-dialog-screen-create-type toggle"><i class="fa fa-git fa-2x"></i><i class="fa fa-arrows-h fa-2x"></i><i class="fa fa-archive fa-2x"></i><br/>Clone Repository</button>').appendTo(row);
var openProject = $('<button data-type="open" class="red-ui-button red-ui-projects-dialog-button red-ui-projects-dialog-screen-create-type toggle"><i class="fa fa-archive fa-2x"></i><i style="position: absolute;" class="fa fa-folder-open"></i><br/>'+RED._("projects.create.open")+'</button>').appendTo(row);
var createAsEmpty = $('<button data-type="empty" class="red-ui-button red-ui-projects-dialog-button red-ui-projects-dialog-screen-create-type toggle"><i class="fa fa-archive fa-2x"></i><i style="position: absolute;" class="fa fa-asterisk"></i><br/>'+RED._("projects.create.create")+'</button>').appendTo(row);
// var createAsCopy = $('<button data-type="copy" class="red-ui-button red-ui-projects-dialog-button red-ui-projects-dialog-screen-create-type toggle"><i class="fa fa-archive fa-2x"></i><i class="fa fa-long-arrow-right fa-2x"></i><i class="fa fa-archive fa-2x"></i><br/>Copy existing</button>').appendTo(row);
var createAsClone = $('<button data-type="clone" class="red-ui-button red-ui-projects-dialog-button red-ui-projects-dialog-screen-create-type toggle"><i class="fa fa-archive fa-2x"></i><i style="position: absolute;" class="fa fa-git"></i><br/>'+RED._("projects.create.clone")+'</button>').appendTo(row);
// var createAsClone = $('<button data-type="clone" class="red-ui-button red-ui-projects-dialog-button red-ui-projects-dialog-screen-create-type toggle"><i class="fa fa-git fa-2x"></i><i class="fa fa-arrows-h fa-2x"></i><i class="fa fa-archive fa-2x"></i><br/>Clone Repository</button>').appendTo(row);
row.find(".red-ui-projects-dialog-screen-create-type").on("click", function(evt) {
evt.preventDefault();
container.find(".red-ui-projects-dialog-screen-create-type").removeClass('selected');
@@ -1271,7 +1271,7 @@ RED.projects = (function() {
var credentialsLeftBox = $('<div class="red-ui-projects-dialog-credentials-box-left">').appendTo(credentialsBox);
var credentialsEnabledBox = $('<div class="form-row red-ui-projects-dialog-credentials-box-enabled"></div>').appendTo(credentialsLeftBox);
$('<label class="red-ui-projects-edit-form-inline-label"><input type="radio" name="projects-encryption-type" value="enabled" checked> <i class="fa fa-lock"></i> <span>'+RED._("projects.encryption-config.enable")+'</span></label>').appendTo(credentialsEnabledBox);
$('<label class="red-ui-projects-edit-form-inline-label"><input type="radio" name="projects-encryption-type" value="enabled"> <i class="fa fa-lock"></i> <span>'+RED._("projects.encryption-config.enable")+'</span></label>').appendTo(credentialsEnabledBox);
var credentialsDisabledBox = $('<div class="form-row red-ui-projects-dialog-credentials-box-disabled disabled"></div>').appendTo(credentialsLeftBox);
$('<label class="red-ui-projects-edit-form-inline-label"><input type="radio" name="projects-encryption-type" value="disabled"> <i class="fa fa-unlock"></i> <span>'+RED._("projects.encryption-config.disable")+'</span></label>').appendTo(credentialsDisabledBox);
@@ -1397,7 +1397,7 @@ RED.projects = (function() {
var sshwarningRow = $('<div class="red-ui-projects-dialog-screen-create-row-auth-error-no-keys"></div>').hide().appendTo(subrow);
$('<div class="form-row"><i class="fa fa-warning"></i> '+RED._("projects.create.desc2")+'</div>').appendTo(sshwarningRow);
subrow = $('<div style="text-align: center">').appendTo(sshwarningRow);
$('<button type="button" class="red-ui-button red-ui-projects-dialog-button">'+RED._("projects.create.add-ssh-key")+'</button>').appendTo(subrow).on("click", function(e) {
$('<button class="red-ui-button red-ui-projects-dialog-button">'+RED._("projects.create.add-ssh-key")+'</button>').appendTo(subrow).on("click", function(e) {
e.preventDefault();
$('#red-ui-projects-dialog-cancel').trigger("click");
RED.userSettings.show('gitconfig');
@@ -1631,14 +1631,14 @@ RED.projects = (function() {
function deleteProject(row,name,done) {
var cover = $('<div class="red-ui-projects-dialog-project-list-entry-delete-confirm"></div>').on("click", function(evt) { evt.stopPropagation(); }).appendTo(row);
$('<span>').text(RED._("projects.delete.confirm")).appendTo(cover);
$('<button type="button" class="red-ui-button red-ui-projects-dialog-button">'+RED._("common.label.cancel")+'</button>')
$('<button class="red-ui-button red-ui-projects-dialog-button">'+RED._("common.label.cancel")+'</button>')
.appendTo(cover)
.on("click", function(e) {
e.stopPropagation();
cover.remove();
done(true);
});
$('<button type="button" class="red-ui-button red-ui-projects-dialog-button primary">'+RED._("common.label.delete")+'</button>')
$('<button class="red-ui-button red-ui-projects-dialog-button primary">'+RED._("common.label.delete")+'</button>')
.appendTo(cover)
.on("click", function(e) {
e.stopPropagation();
@@ -1822,7 +1822,7 @@ RED.projects = (function() {
header.addClass("selectable");
var tools = $('<div class="red-ui-projects-dialog-project-list-entry-tools"></div>').appendTo(header);
$('<button type="button" class="red-ui-button red-ui-projects-dialog-button red-ui-button-small" style="float: right;"><i class="fa fa-trash"></i></button>')
$('<button class="red-ui-button red-ui-projects-dialog-button red-ui-button-small" style="float: right;"><i class="fa fa-trash"></i></button>')
.appendTo(tools)
.on("click", function(e) {
e.stopPropagation();

View File

@@ -25,8 +25,6 @@ RED.search = (function() {
var searchHistory = [];
var index = {};
var currentResults = [];
var activeResults = [];
var currentIndex = 0;
var previousActiveElement;
function indexProperty(node,label,property) {
@@ -106,62 +104,44 @@ RED.search = (function() {
return val;
}
function extractType(val, flags) {
// extracts: type:XYZ & type:"X Y Z"
const regEx = /(?:type):\s*(?:"([^"]+)"|([^" ]+))/;
let m
while ((m = regEx.exec(val)) !== null) {
// avoid infinite loops with zero-width matches
if (m.index === regEx.lastIndex) {
regEx.lastIndex++;
}
val = val.replace(m[0]," ").trim()
const flag = m[2] || m[1] // quoted entries in capture group 1, unquoted in capture group 2
flags.type = flags.type || [];
flags.type.push(flag);
}
return val;
}
function search(val) {
const results = [];
const flags = {};
var results = [];
var keys = [];
var typeFilter;
var m = /(?:^| )type:([^ ]+)/.exec(val);
if (m) {
val = val.replace(/(?:^| )type:[^ ]+/,"");
typeFilter = m[1];
}
var flags = {};
val = extractFlag(val,"invalid",flags);
val = extractFlag(val,"unused",flags);
val = extractFlag(val,"config",flags);
val = extractFlag(val,"subflow",flags);
val = extractFlag(val,"hidden",flags);
val = extractFlag(val,"modified",flags);
val = extractValue(val,"flow",flags);// flow:current or flow:<flow-id>
val = extractValue(val,"uses",flags);// uses:<node-id>
val = extractType(val,flags);// type:<node-type>
// uses:<node-id>
val = extractValue(val,"uses",flags);
var hasFlags = Object.keys(flags).length > 0;
val = val.trim();
const hasFlags = Object.keys(flags).length > 0;
const hasTypeFilter = flags.type && flags.type.length > 0
if (flags.flow && flags.flow.indexOf("current") >= 0) {
let idx = flags.flow.indexOf("current");
flags.flow[idx] = RED.workspaces.active();//convert 'current' to active flow ID
}
if (flags.flow && flags.flow.length) {
flags.flow = [ ...new Set(flags.flow) ]; //deduplicate
}
if (val.length > 0 || hasFlags) {
if (val.length > 0 || typeFilter || hasFlags) {
val = val.toLowerCase();
let i;
let j;
let list = [];
const nodes = {};
let keys = [];
var i;
var j;
var list = [];
var nodes = {};
if (flags.uses) {
keys = flags.uses;
} else {
keys = Object.keys(index);
}
for (i=0;i<keys.length;i++) {
const key = keys[i];
const kpos = val ? keys[i].indexOf(val) : -1;
if (kpos > -1 || (val === "" && hasFlags)) {
const ids = Object.keys(index[key]||{});
var key = keys[i];
var kpos = keys[i].indexOf(val);
if (kpos > -1) {
var ids = Object.keys(index[key]||{});
for (j=0;j<ids.length;j++) {
var node = index[key][ids[j]];
var isConfigNode = node.node._def.category === "config" && node.node.type !== 'group';
@@ -169,7 +149,7 @@ RED.search = (function() {
continue;
}
if (flags.hasOwnProperty("invalid")) {
const nodeIsValid = !node.node.hasOwnProperty("valid") || node.node.valid;
var nodeIsValid = !node.node.hasOwnProperty("valid") || node.node.valid;
if (flags.invalid === nodeIsValid) {
continue;
}
@@ -184,11 +164,6 @@ RED.search = (function() {
continue;
}
}
if (flags.hasOwnProperty("modified")) {
if (!node.node.changed && !node.node.moved) {
continue;
}
}
if (flags.hasOwnProperty("hidden")) {
// Only tabs can be hidden
if (node.node.type !== 'tab') {
@@ -199,27 +174,18 @@ RED.search = (function() {
}
}
if (flags.hasOwnProperty("unused")) {
const isUnused = (node.node.type === 'subflow' && node.node.instances.length === 0) ||
(isConfigNode && node.node.users.length === 0 && node.node._def.hasUsers !== false)
var isUnused = (node.node.type === 'subflow' && node.node.instances.length === 0) ||
(isConfigNode && node.node.users.length === 0)
if (flags.unused !== isUnused) {
continue;
}
}
if (flags.hasOwnProperty("flow")) {
if (flags.flow.indexOf(node.node.z || node.node.id) < 0) {
continue;
}
}
let typeIndex = -1
if(hasTypeFilter) {
typeIndex = flags.type.indexOf(node.node.type)
}
if (!hasTypeFilter || typeIndex > -1) {
nodes[node.node.id] = nodes[node.node.id] || {
if (!typeFilter || node.node.type === typeFilter) {
nodes[node.node.id] = nodes[node.node.id] = {
node: node.node,
label: node.label
};
nodes[node.node.id].index = Math.min(nodes[node.node.id].index || Infinity, typeIndex > -1 ? typeIndex : kpos);
nodes[node.node.id].index = Math.min(nodes[node.node.id].index||Infinity,kpos);
}
}
}
@@ -295,8 +261,9 @@ RED.search = (function() {
} else {
searchResults.editableList('addItem',{});
}
},
options: getSearchOptions()
}
});
var copySearchContainer = $('<button type="button" class="red-ui-button red-ui-button-small"><i class="fa fa-caret-right"></button>').appendTo(searchDiv).on('click', function(evt) {
evt.preventDefault();
@@ -357,8 +324,7 @@ RED.search = (function() {
}
} else if (!$(children[selected]).hasClass("red-ui-search-historyHeader")) {
if (currentResults.length > 0) {
currentIndex = Math.max(0,selected);
reveal(currentResults[currentIndex].node);
reveal(currentResults[Math.max(0,selected)].node);
}
}
}
@@ -442,7 +408,6 @@ RED.search = (function() {
div.on("click", function(evt) {
evt.preventDefault();
currentIndex = i;
reveal(node);
});
}
@@ -458,59 +423,13 @@ RED.search = (function() {
if (existingIndex > -1) {
searchHistory.splice(existingIndex,1);
}
searchHistory.unshift(searchVal);
$("#red-ui-view-searchtools-search").data("term", searchVal);
activeResults = Object.assign([], currentResults);
hide(null, activeResults.length > 0);
searchHistory.unshift(searchInput.val());
hide();
RED.view.reveal(node.id);
}
function revealPrev() {
if (disabled) {
updateSearchToolbar();
return;
}
if (!searchResults || !activeResults.length) {
show();
return;
}
if (currentIndex > 0) {
currentIndex--;
} else {
currentIndex = activeResults.length - 1;
}
const n = activeResults[currentIndex];
if (n && n.node && n.node.id) {
RED.view.reveal(n.node.id);
$("#red-ui-view-searchtools-prev").trigger("focus");
}
updateSearchToolbar();
}
function revealNext() {
if (disabled) {
updateSearchToolbar();
return;
}
if (!searchResults || !activeResults.length) {
show();
return;
}
if (currentIndex < activeResults.length - 1) {
currentIndex++
} else {
currentIndex = 0;
}
const n = activeResults[currentIndex];
if (n && n.node && n.node.id) {
RED.view.reveal(n.node.id);
$("#red-ui-view-searchtools-next").trigger("focus");
}
updateSearchToolbar();
}
function show(v) {
if (disabled) {
updateSearchToolbar();
return;
}
if (!visible) {
@@ -537,7 +456,7 @@ RED.search = (function() {
searchInput.trigger("focus");
}
function hide(el, keepSearchToolbar) {
function hide() {
if (visible) {
visible = false;
$("#red-ui-header-shade").hide();
@@ -551,37 +470,13 @@ RED.search = (function() {
});
}
RED.events.emit("search:close");
if (previousActiveElement && (!keepSearchToolbar || !activeResults.length)) {
if (previousActiveElement) {
$(previousActiveElement).trigger("focus");
previousActiveElement = null;
}
previousActiveElement = null;
}
if(!keepSearchToolbar) {
clearActiveSearch();
}
updateSearchToolbar();
if(keepSearchToolbar && activeResults.length) {
$("#red-ui-view-searchtools-next").trigger("focus");
}
}
function updateSearchToolbar() {
if (!disabled && currentIndex >= 0 && activeResults && activeResults.length) {
let term = $("#red-ui-view-searchtools-search").data("term") || "";
if (term.length > 16) {
term = term.substring(0, 12) + "..."
}
const i18nSearchCounterData = {
term: term,
result: (currentIndex + 1),
count: activeResults.length
}
$("#red-ui-view-searchtools-counter").text(RED._('actions.search-counter', i18nSearchCounterData));
$("#view-search-tools > :not(:first-child)").show(); //show other tools
} else {
clearActiveSearch();
$("#view-search-tools > :not(:first-child)").hide(); //hide all but search button
}
}
function clearIndex() {
index = {};
}
@@ -603,29 +498,9 @@ RED.search = (function() {
addItemToIndex(item);
}
function clearActiveSearch() {
activeResults = [];
currentIndex = 0;
$("#red-ui-view-searchtools-search").data("term", "");
}
function getSearchOptions() {
return [
{label:RED._("search.options.configNodes"), value:"is:config"},
{label:RED._("search.options.unusedConfigNodes"), value:"is:config is:unused"},
{label:RED._("search.options.modifiedNodes"), value:"is:modified"},
{label:RED._("search.options.invalidNodes"), value: "is:invalid"},
{label:RED._("search.options.uknownNodes"), value: "type:unknown"},
{label:RED._("search.options.unusedSubflows"), value:"is:subflow is:unused"},
{label:RED._("search.options.hiddenFlows"), value:"is:hidden"},
{label:RED._("search.options.thisFlow"), value:"flow:current"},
]
}
function init() {
RED.actions.add("core:search",show);
RED.actions.add("core:search-previous",revealPrev);
RED.actions.add("core:search-next",revealNext);
RED.events.on("editor:open",function() { disabled = true; });
RED.events.on("editor:close",function() { disabled = false; });
@@ -636,21 +511,11 @@ RED.search = (function() {
RED.keyboard.add("red-ui-search","escape",hide);
RED.keyboard.add("view-search-tools","escape",function() {
clearActiveSearch();
updateSearchToolbar();
});
$("#red-ui-header-shade").on('mousedown',hide);
$("#red-ui-editor-shade").on('mousedown',hide);
$("#red-ui-palette-shade").on('mousedown',hide);
$("#red-ui-sidebar-shade").on('mousedown',hide);
$("#red-ui-view-searchtools-close").on("click", function close() {
clearActiveSearch();
updateSearchToolbar();
});
$("#red-ui-view-searchtools-close").trigger("click");
RED.events.on("workspace:clear", clearIndex);
@@ -676,8 +541,7 @@ RED.search = (function() {
init: init,
show: show,
hide: hide,
search: search,
getSearchOptions: getSearchOptions
search: search
};
})();

View File

@@ -29,6 +29,5 @@ RED.state = {
GROUP_DRAGGING: 12,
GROUP_RESIZE: 13,
DETACHED_DRAGGING: 14,
SLICING: 15,
SLICING_JUNCTION: 16
SLICING: 15
}

View File

@@ -31,7 +31,6 @@ RED.statusBar = (function() {
function addWidget(options) {
widgets[options.id] = options;
var el = $('<span class="red-ui-statusbar-widget"></span>');
el.prop('id', options.id);
options.element.appendTo(el);
if (options.align === 'left') {
leftBucket.append(el);

View File

@@ -506,13 +506,6 @@ RED.subflow = (function() {
RED.nodes.groups(id).forEach(function(n) {
removedGroups.push(n);
})
var removedJunctions = RED.nodes.junctions(id)
for (var i=0;i<removedJunctions.length;i++) {
var removedEntities = RED.nodes.removeJunction(removedJunctions[i])
removedLinks = removedLinks.concat(removedEntities.links)
}
var removedConfigNodes = [];
for (var i=0;i<removedNodes.length;i++) {
var removedEntities = RED.nodes.remove(removedNodes[i].id);
@@ -543,7 +536,6 @@ RED.subflow = (function() {
nodes:removedNodes,
links:removedLinks,
groups: removedGroups,
junctions: removedJunctions,
subflows: [activeSubflow]
}
}
@@ -612,14 +604,6 @@ RED.subflow = (function() {
return x;
}
function nodeOrJunction(id) {
var node = RED.nodes.node(id);
if (node) {
return node;
}
return RED.nodes.junction(id);
}
function convertToSubflow() {
var selection = RED.view.selection();
if (!selection.nodes) {
@@ -808,15 +792,14 @@ RED.subflow = (function() {
subflow.in.forEach(function(input) {
input.wires.forEach(function(wire) {
var link = {source: input, sourcePort: 0, target: nodeOrJunction(wire.id) }
var link = {source: input, sourcePort: 0, target: RED.nodes.node(wire.id) }
new_links.push(link);
RED.nodes.addLink(link);
});
});
subflow.out.forEach(function(output,i) {
output.wires.forEach(function(wire) {
var link = {source: nodeOrJunction(wire.id), sourcePort: wire.port , target: output }
var link = {source: RED.nodes.node(wire.id), sourcePort: wire.port , target: output }
new_links.push(link);
RED.nodes.addLink(link);
});
@@ -832,7 +815,7 @@ RED.subflow = (function() {
n.links = n.links.filter(function(id) {
var isLocalLink = nodes.hasOwnProperty(id);
if (!isLocalLink) {
var otherNode = nodeOrJunction(id);
var otherNode = RED.nodes.node(id);
if (otherNode && otherNode.links) {
var i = otherNode.links.indexOf(n.id);
if (i > -1) {
@@ -848,6 +831,7 @@ RED.subflow = (function() {
RED.nodes.moveNodeToTab(n, subflow.id);
}
var historyEvent = {
t:'createSubflow',
nodes:[subflowInstance.id],
@@ -885,7 +869,6 @@ RED.subflow = (function() {
RED.nodes.dirty(true);
RED.view.updateActive();
RED.view.select(null);
RED.view.focus();
}

View File

@@ -15,8 +15,6 @@
**/
RED.sidebar.config = (function() {
let flashingConfigNode;
let flashingConfigNodeTimer;
var content = document.createElement("div");
content.className = "red-ui-sidebar-node-config";
@@ -147,7 +145,6 @@ RED.sidebar.config = (function() {
var entry = $('<li class="red-ui-palette-node_id_'+node.id.replace(/\./g,"-")+'"></li>').appendTo(list);
var nodeDiv = $('<div class="red-ui-palette-node-config red-ui-palette-node"></div>').appendTo(entry);
entry.data('node',node.id);
nodeDiv.data('node',node.id);
var label = $('<div class="red-ui-palette-label"></div>').text(label).appendTo(nodeDiv);
if (node.d) {
nodeDiv.addClass("red-ui-palette-node-config-disabled");
@@ -353,32 +350,6 @@ RED.sidebar.config = (function() {
RED.popover.tooltip($('#red-ui-sidebar-config-filter-unused'), RED._("sidebar.config.showAllUnusedConfigNodes"));
}
function flashConfigNode(el) {
if(flashingConfigNode && flashingConfigNode.length) {
//cancel current flashing node before flashing new node
clearInterval(flashingConfigNodeTimer);
flashingConfigNodeTimer = null;
flashingConfigNode.children("div").removeClass('highlighted');
flashingConfigNode = null;
}
if(!el || !el.children("div").length) { return; }
flashingConfigNodeTimer = setInterval(function(flashEndTime) {
if (flashEndTime >= Date.now()) {
const highlighted = el.children("div").hasClass("highlighted");
el.children("div").toggleClass('highlighted', !highlighted)
} else {
clearInterval(flashingConfigNodeTimer);
flashingConfigNodeTimer = null;
flashingConfigNode = null;
el.children("div").removeClass('highlighted');
}
}, 100, Date.now() + 2200);
flashingConfigNode = el;
el.children("div").addClass('highlighted');
}
function show(id) {
if (typeof id === 'boolean') {
if (id) {
@@ -403,7 +374,19 @@ RED.sidebar.config = (function() {
} else if (y<0) {
scrollWindow.animate({scrollTop: '+='+(y-10)},150);
}
flashConfigNode(node, id);
var flash = 21;
var flashFunc = function() {
if ((flash%2)===0) {
node.removeClass('node_highlighted');
} else {
node.addClass('node_highlighted');
}
flash--;
if (flash >= 0) {
setTimeout(flashFunc,100);
}
}
flashFunc();
},100);
}
RED.sidebar.show("config");

View File

@@ -20,8 +20,10 @@ RED.sidebar.help = (function() {
var helpSection;
var panels;
var panelRatio;
var helpTopics = [];
var treeList;
var tocPanel;
var helpIndex = {};
function resizeStack() {
var h = $(content).parent().height() - toolbar.outerHeight();
@@ -50,7 +52,7 @@ RED.sidebar.help = (function() {
tocPanel = $("<div>", {class: "red-ui-sidebar-help-toc"}).appendTo(stackContainer);
var helpPanel = $("<div>").css({
"overflow-y": "auto"
"overflow-y": "scroll"
}).appendTo(stackContainer);
panels = RED.panels.create({
@@ -95,10 +97,7 @@ RED.sidebar.help = (function() {
var pendingContentLoad;
treeList.on('treelistselect', function(e,item) {
pendingContentLoad = item;
if (item.tour) {
RED.tourGuide.run(item.tour);
}
else if (item.nodeType) {
if (item.nodeType) {
showNodeTypeHelp(item.nodeType);
} else if (item.content) {
helpSection.empty();
@@ -190,6 +189,7 @@ RED.sidebar.help = (function() {
}
function refreshHelpIndex() {
helpTopics = [];
var modules = RED.nodes.registry.getModuleList();
var moduleNames = Object.keys(modules);
moduleNames.sort();
@@ -198,32 +198,15 @@ RED.sidebar.help = (function() {
label: RED._("sidebar.help.nodeHelp"),
children: [],
expanded: true
};
var tours = RED.tourGuide.list().map(function (item) {
return {
icon: "fa fa-play-circle-o",
label: item.label,
tour: item.path,
};
});
}
var helpData = [
{
label: "Node-RED",
children: [
{
id: 'changelog',
label: RED._("sidebar.help.changeLog"),
content: getChangelog
},
{
label: RED._("tourGuide.welcomeTours"),
children: tours
}
]
id: 'changelog',
label: "Node-RED v"+RED.settings.version,
content: getChangelog
},
nodeHelp
];
]
var subflows = RED.nodes.registry.getNodeTypes().filter(function(t) {return /subflow/.test(t)});
if (subflows.length > 0) {
nodeHelp.children.push({
@@ -387,7 +370,7 @@ RED.sidebar.help = (function() {
var node = selection.nodes[0];
if (node.type === "subflow" && node.direction) {
// ignore subflow virtual ports
} else if (node.type !== 'group' && node.type !== 'junction'){
} else if (node.type !== 'group'){
showNodeTypeHelp(node.type);
}
}

View File

@@ -268,7 +268,14 @@ RED.sidebar.info.outliner = (function() {
}
},
options: RED.search.getSearchOptions()
options: [
{label:RED._("sidebar.info.search.configNodes"), value:"is:config"},
{label:RED._("sidebar.info.search.unusedConfigNodes"), value:"is:config is:unused"},
{label:RED._("sidebar.info.search.invalidNodes"), value: "is:invalid"},
{label:RED._("sidebar.info.search.uknownNodes"), value: "type:unknown"},
{label:RED._("sidebar.info.search.unusedSubflows"), value:"is:subflow is:unused"},
{label:RED._("sidebar.info.search.hiddenFlows"), value:"is:hidden"},
]
});
projectInfo = $('<div class="red-ui-treeList-label red-ui-info-outline-project"><span class="red-ui-treeList-icon"><i class="fa fa-archive"></i></span></div>').hide().appendTo(container)
@@ -280,18 +287,15 @@ RED.sidebar.info.outliner = (function() {
data:getFlowData()
})
treeList.on('treelistselect', function(e,item) {
var node = RED.nodes.node(item.id) || RED.nodes.group(item.id) || RED.nodes.workspace(item.id) || RED.nodes.subflow(item.id);
var node = RED.nodes.node(item.id) || RED.nodes.group(item.id);
if (node) {
RED.sidebar.info.refresh(node);
// if (node.type === 'group' || node._def.category !== "config") {
// // RED.view.select({nodes:[node]})
// } else if (node._def.category === "config") {
// RED.sidebar.info.refresh(node);
// } else {
// // RED.view.select({nodes:[]})
// }
} else {
RED.sidebar.info.refresh(null);
if (node.type === 'group' || node._def.category !== "config") {
// RED.view.select({nodes:[node]})
} else if (node._def.category === "config") {
RED.sidebar.info.refresh(node);
} else {
// RED.view.select({nodes:[]})
}
}
})
treeList.on('treelistconfirm', function(e,item) {

View File

@@ -98,7 +98,7 @@ RED.sidebar.info = (function() {
propertiesPanelContent = $("<div>").css({
"flex":"1 1 auto",
"overflow-y":"auto",
"overflow-y":"scroll",
}).appendTo(propertiesPanel);
@@ -163,7 +163,6 @@ RED.sidebar.info = (function() {
});
return el;
}
function refresh(node) {
if (node === undefined) {
refreshSelection();
@@ -272,7 +271,7 @@ RED.sidebar.info = (function() {
objectType = "group";
}
$(propRow.children()[0]).text(RED._("sidebar.info."+objectType))
RED.utils.createObjectElement(node.id,{sourceId: node.id}).appendTo(propRow.children()[1]);
RED.utils.createObjectElement(node.id).appendTo(propRow.children()[1]);
if (node.type === "tab" || node.type === "subflow") {
// If nothing is selected, but we're on a flow or subflow tab.
@@ -302,8 +301,8 @@ RED.sidebar.info = (function() {
if (typeCounts.groups > 0) {
$('<div>').text(RED._("clipboard.group",{count:typeCounts.groups})).appendTo(counts);
}
} else if (node.type === 'junction') {
propertiesPanelHeaderHelp.hide();
} else {
propertiesPanelHeaderHelp.show();
@@ -366,7 +365,7 @@ RED.sidebar.info = (function() {
}
} else {
RED.utils.createObjectElement(val,{sourceId: node.id}).appendTo(propRow.children()[1]);
RED.utils.createObjectElement(val).appendTo(propRow.children()[1]);
}
}
}
@@ -432,7 +431,6 @@ RED.sidebar.info = (function() {
}
function setInfoText(infoText,target) {
var info = addTargetToExternalLinks($('<div class="red-ui-help"><span class="red-ui-text-bidi-aware" dir=\"'+RED.text.bidi.resolveBaseTextDir(infoText)+'">'+infoText+'</span></div>')).appendTo(target);
info.find(".red-ui-text-bidi-aware").contents().filter(function() { return this.nodeType === 3 && this.textContent.trim() !== "" }).wrap( "<span></span>" );
@@ -449,7 +447,6 @@ RED.sidebar.info = (function() {
$(this).toggleClass('expanded',!isExpanded);
})
}
var tips = (function() {
var enabled = true;
var startDelay = 1000;

View File

@@ -433,30 +433,9 @@ RED.tourGuide = (function() {
})
}
function listTour() {
return [
{
id: "3_0",
label: "3.0",
path: "./tours/welcome.js"
},
{
id: "2_2",
label: "2.2",
path: "./tours/2.2/welcome.js"
},
{
id: "2_1",
label: "2.1",
path: "./tours/2.1/welcome.js"
}
];
}
return {
load: loadTour,
run: run,
list: listTour,
reset: function() {
RED.settings.set("editor.tours.welcome",'');
}

View File

@@ -169,13 +169,7 @@
raiseTrayZ();
handleWindowResize();//cause call to monaco layout
},200);
if(!options.hasOwnProperty("focusElement")) {
//focusElement is not inside options - default to focusing 1st
body.find(":focusable:first").trigger("focus");
} else if(options.focusElement !== false) {
//focusElement IS specified, focus that instead (if not false)
$(options.focusElement).trigger("focus");
}
body.find(":focusable:first").trigger("focus");
},150);
el.css({right:0});

View File

@@ -104,9 +104,7 @@ RED.typeSearch = (function() {
var index = Math.max(0,selected);
if (index < children.length) {
var n = $(children[index]).find(".red-ui-editableList-item-content").data('data');
if (!/^_action_:/.test(n.type)) {
typesUsed[n.type] = Date.now();
}
typesUsed[n.type] = Date.now();
if (n.def.outputs === 0) {
confirm(n);
} else {
@@ -173,27 +171,18 @@ RED.typeSearch = (function() {
var div = $('<div>',{class:"red-ui-search-result"}).appendTo(container);
var nodeDiv = $('<div>',{class:"red-ui-search-result-node"}).appendTo(div);
if (object.type === "junction") {
nodeDiv.addClass("red-ui-palette-icon-junction");
} else if (/^_action_:/.test(object.type)) {
nodeDiv.addClass("red-ui-palette-icon-junction")
} else {
var colour = RED.utils.getNodeColor(object.type,def);
nodeDiv.css('backgroundColor',colour);
}
var colour = RED.utils.getNodeColor(object.type,def);
var icon_url = RED.utils.getNodeIcon(def);
nodeDiv.css('backgroundColor',colour);
var iconContainer = $('<div/>',{class:"red-ui-palette-icon-container"}).appendTo(nodeDiv);
RED.utils.createIconElement(icon_url, iconContainer, false);
if (!/^_action_:/.test(object.type) && object.type !== "junction") {
if (def.inputs > 0) {
$('<div/>',{class:"red-ui-search-result-node-port"}).appendTo(nodeDiv);
}
if (def.outputs > 0) {
$('<div/>',{class:"red-ui-search-result-node-port red-ui-search-result-node-output"}).appendTo(nodeDiv);
}
if (def.inputs > 0) {
$('<div/>',{class:"red-ui-search-result-node-port"}).appendTo(nodeDiv);
}
if (def.outputs > 0) {
$('<div/>',{class:"red-ui-search-result-node-port red-ui-search-result-node-output"}).appendTo(nodeDiv);
}
var contentDiv = $('<div>',{class:"red-ui-search-result-description"}).appendTo(div);
@@ -214,9 +203,7 @@ RED.typeSearch = (function() {
}
function confirm(def) {
hide();
if (!/^_action_:/.test(def.type)) {
typesUsed[def.type] = Date.now();
}
typesUsed[def.type] = Date.now();
addCallback(def.type);
}
@@ -269,8 +256,8 @@ RED.typeSearch = (function() {
moveCallback = opts.move;
RED.events.emit("type-search:open");
//shade.show();
if ($("#red-ui-main-container").height() - opts.y - 195 < 0) {
opts.y = opts.y - 275;
if ($("#red-ui-main-container").height() - opts.y - 150 < 0) {
opts.y = opts.y - 235;
}
dialog.css({left:opts.x+"px",top:opts.y+"px"}).show();
searchResultsDiv.slideDown(300);
@@ -325,10 +312,9 @@ RED.typeSearch = (function() {
function applyFilter(filter,type,def) {
return !filter ||
(
(!filter.spliceMultiple) &&
(!filter.type || type === filter.type) &&
(!filter.input || type === 'junction' || def.inputs > 0) &&
(!filter.output || type === 'junction' || def.outputs > 0)
(!filter.input || def.inputs > 0) &&
(!filter.output || def.outputs > 0)
)
}
function refreshTypeList(opts) {
@@ -337,16 +323,9 @@ RED.typeSearch = (function() {
searchInput.searchBox('value','').focus();
selected = -1;
var common = [
'inject','debug','function','change','switch','junction'
'inject','debug','function','change','switch'
].filter(function(t) { return applyFilter(opts.filter,t,RED.nodes.getType(t)); });
// if (opts.filter && opts.filter.input && opts.filter.output && !opts.filter.type) {
// if (opts.filter.spliceMultiple) {
// common.push('_action_:core:split-wires-with-junctions')
// }
// common.push('_action_:core:split-wire-with-link-nodes')
// }
var recentlyUsed = Object.keys(typesUsed);
recentlyUsed.sort(function(a,b) {
return typesUsed[b]-typesUsed[a];
@@ -369,11 +348,6 @@ RED.typeSearch = (function() {
var index = 0;
for(i=0;i<common.length;i++) {
var itemDef = RED.nodes.getType(common[i]);
if (common[i] === 'junction') {
itemDef = { inputs:1, outputs: 1, label: 'junction', type: 'junction'}
} else if (/^_action_:/.test(common[i]) ) {
itemDef = { inputs:1, outputs: 1, label: common[i], type: common[i]}
}
if (itemDef) {
item = {
type: common[i],

View File

@@ -365,16 +365,7 @@ RED.utils = (function() {
}
}
/**
* Create a DOM element representation of obj - as used by Debug sidebar etc
*
* @params obj - the data to display
* @params options - a bag of options
*
* - If you want the Copy Value button, then set `sourceId`
* - If you want the Copy Path button, also set `path` to the value to be copied
*/
function createObjectElement(obj,options) {
function buildMessageElement(obj,options) {
options = options || {};
var key = options.key;
var typeHint = options.typeHint;
@@ -564,7 +555,7 @@ RED.utils = (function() {
if (fullLength <= 10) {
for (i=0;i<fullLength;i++) {
row = $('<div class="red-ui-debug-msg-object-entry collapsed"></div>').appendTo(arrayRows);
subElements[path+"["+i+"]"] = createObjectElement(
subElements[path+"["+i+"]"] = buildMessageElement(
data[i],
{
key: ""+i,
@@ -594,7 +585,7 @@ RED.utils = (function() {
return function() {
for (var i=min;i<=max;i++) {
var row = $('<div class="red-ui-debug-msg-object-entry collapsed"></div>').appendTo(parent);
subElements[path+"["+i+"]"] = createObjectElement(
subElements[path+"["+i+"]"] = buildMessageElement(
data[i],
{
key: ""+i,
@@ -650,7 +641,7 @@ RED.utils = (function() {
newPath += "[\""+keys[i].replace(/"/,"\\\"")+"\"]"
}
}
subElements[newPath] = createObjectElement(
subElements[newPath] = buildMessageElement(
data[keys[i]],
{
key: keys[i],
@@ -1028,12 +1019,8 @@ RED.utils = (function() {
return "font-awesome/fa-object-ungroup";
} else if (node && node.type === 'group') {
return "font-awesome/fa-object-group"
} else if ((node && node.type === 'junction') || (def.type === "junction") ) {
return "font-awesome/fa-circle-o"
} else if (def.category === 'config') {
return RED.settings.apiRootUrl+"icons/node-red/cog.svg"
} else if ((node && /^_action_:/.test(node.type)) || /^_action_:/.test(def.type)) {
return "font-awesome/fa-cogs"
} else if (node && node.type === 'tab') {
return "red-ui-icons/red-ui-icons-flow"
// return RED.settings.apiRootUrl+"images/subflow_tab.svg"
@@ -1097,8 +1084,6 @@ RED.utils = (function() {
l = node.label || defaultLabel
} else if (node.type === 'group') {
l = node.name || defaultLabel
} else if (node.type === 'junction') {
l = 'junction'
} else {
l = node._def.label;
try {
@@ -1111,18 +1096,6 @@ RED.utils = (function() {
return RED.text.bidi.enforceTextDirectionWithUCC(l);
}
function getPaletteLabel(nodeType, def) {
var label = nodeType;
if (typeof def.paletteLabel !== "undefined") {
try {
label = (typeof def.paletteLabel === "function" ? def.paletteLabel.call(def) : def.paletteLabel)||"";
} catch(err) {
console.log("Definition error: "+nodeType+".paletteLabel",err);
}
}
return label
}
var nodeColorCache = {};
function clearNodeColorCache() {
nodeColorCache = {};
@@ -1265,8 +1238,6 @@ RED.utils = (function() {
nodeDiv.addClass("red-ui-palette-icon-selection");
} else if (node.type === "group") {
nodeDiv.addClass("red-ui-palette-icon-group");
} else if (node.type === "junction") {
nodeDiv.addClass("red-ui-palette-icon-junction");
} else if (node.type === 'tab') {
nodeDiv.addClass("red-ui-palette-icon-flow");
} else {
@@ -1398,7 +1369,7 @@ RED.utils = (function() {
}
return {
createObjectElement: createObjectElement,
createObjectElement: buildMessageElement,
getMessageProperty: getMessageProperty,
setMessageProperty: setMessageProperty,
normalisePropertyExpression: normalisePropertyExpression,
@@ -1408,7 +1379,6 @@ RED.utils = (function() {
getNodeIcon: getNodeIcon,
getNodeLabel: getNodeLabel,
getNodeColor: getNodeColor,
getPaletteLabel: getPaletteLabel,
clearNodeColorCache: clearNodeColorCache,
addSpinnerOverlay: addSpinnerOverlay,
decodeObject: decodeObject,

View File

@@ -105,9 +105,6 @@ RED.view.tools = (function() {
$(document).one('keyup',endKeyboardMove);
endMoveSet = true;
}
var dim = RED.view.dimensions();
var space_width = dim.width;
var space_height = dim.height;
var minX = 0;
var minY = 0;
var node;
@@ -123,12 +120,6 @@ RED.view.tools = (function() {
node.n.dirty = true;
node.n.x += dx;
node.n.y += dy;
if ((node.n.x +node.n.w/2) >= space_width) {
node.n.x = space_width -node.n.w/2;
}
if ((node.n.y +node.n.h/2) >= space_height) {
node.n.y = space_height -node.n.h/2;
}
node.n.dirty = true;
if (node.n.type === "group") {
RED.group.markDirty(node.n);
@@ -345,17 +336,17 @@ RED.view.tools = (function() {
}
// function addNode() {
// var selection = RED.view.selection();
// if (selection.nodes && selection.nodes.length === 1 && selection.nodes[0].outputs > 0) {
// var selectedNode = selection.nodes[0];
// RED.view.showQuickAddDialog([
// selectedNode.x + selectedNode.w + 50,selectedNode.y
// ])
// } else {
// RED.view.showQuickAddDialog();
// }
// }
function addNode() {
var selection = RED.view.selection();
if (selection.nodes && selection.nodes.length === 1 && selection.nodes[0].outputs > 0) {
var selectedNode = selection.nodes[0];
RED.view.showQuickAddDialog([
selectedNode.x + selectedNode.w + 50,selectedNode.y
])
} else {
RED.view.showQuickAddDialog();
}
}
function gotoNearestNode(direction) {
@@ -818,380 +809,6 @@ RED.view.tools = (function() {
}
}
/**
* Splits selected wires and re-joins them with link-out+link-in
* @param {Object || Object[]} wires The wire(s) to split and replace with link-out, link-in nodes.
*/
function splitWiresWithLinkNodes(wires) {
let wiresToSplit = wires || (RED.view.selection().links && RED.view.selection().links.filter(e => !e.link));
if (!wiresToSplit) {
return
}
if (!Array.isArray(wiresToSplit)) {
wiresToSplit = [wiresToSplit];
}
if (wiresToSplit.length < 1) {
return; //nothing selected
}
const history = {
t: 'multi',
events: [],
dirty: RED.nodes.dirty()
}
const nodeSrcMap = {};
const nodeTrgMap = {};
const _gridSize = RED.view.gridSize();
for (let wireIdx = 0; wireIdx < wiresToSplit.length; wireIdx++) {
const wire = wiresToSplit[wireIdx];
//get source and target nodes of this wire link
const nSrc = wire.source;
const nTrg = wire.target;
var updateNewNodePosXY = function (origNode, newNode, alignLeft, snap, yOffset) {
const nnSize = RED.view.calculateNodeDimensions(newNode);
newNode.w = nnSize[0];
newNode.h = nnSize[1];
const coords = { x: origNode.x || 0, y: origNode.y || 0, w: origNode.w || RED.view.node_width, h: origNode.h || RED.view.node_height };
const x = coords.x - (coords.w/2.0);
if (alignLeft) {
coords.x = x - _gridSize - (newNode.w/2.0);
} else {
coords.x = x + coords.w + _gridSize + (newNode.w/2.0);
}
newNode.x = coords.x;
newNode.y = coords.y;
if (snap !== false) {
const offsets = RED.view.tools.calculateGridSnapOffsets(newNode);
newNode.x -= offsets.x;
newNode.y -= offsets.y;
}
newNode.y += (yOffset || 0);
}
const srcPort = (wire.sourcePort || 0);
let linkOutMapId = nSrc.id + ':' + srcPort;
let nnLinkOut = nodeSrcMap[linkOutMapId];
//Create a Link Out if one is not already present
if(!nnLinkOut) {
const nLinkOut = RED.view.createNode("link out"); //create link node
nnLinkOut = nLinkOut.node;
nodeSrcMap[linkOutMapId] = nnLinkOut;
let yOffset = 0;
if(nSrc.outputs > 1) {
const CENTER_PORT = (((nSrc.outputs-1) / 2) + 1);
const offsetCount = Math.abs(CENTER_PORT - (srcPort + 1));
yOffset = (_gridSize * 2 * offsetCount);
if((srcPort + 1) < CENTER_PORT) {
yOffset = -yOffset;
}
updateNewNodePosXY(nSrc, nnLinkOut, false, false, yOffset);
} else {
updateNewNodePosXY(nSrc, nnLinkOut, false, RED.view.snapGrid, yOffset);
}
//add created node
RED.nodes.add(nnLinkOut);
RED.editor.validateNode(nnLinkOut);
history.events.push(nLinkOut.historyEvent);
//connect node to link node
const link = {
source: nSrc,
sourcePort: wire.sourcePort || 0,
target: nnLinkOut
};
RED.nodes.addLink(link);
history.events.push({
t: 'add',
links: [link],
});
}
let nnLinkIn = nodeTrgMap[nTrg.id];
//Create a Link In if one is not already present
if(!nnLinkIn) {
const nLinkIn = RED.view.createNode("link in"); //create link node
nnLinkIn = nLinkIn.node;
nodeTrgMap[nTrg.id] = nnLinkIn;
updateNewNodePosXY(nTrg, nnLinkIn, true, RED.view.snapGrid, 0);
//add created node
RED.nodes.add(nnLinkIn);
RED.editor.validateNode(nnLinkIn);
history.events.push(nLinkIn.historyEvent);
//connect node to link node
const link = {
source: nnLinkIn,
sourcePort: 0,
target: nTrg
};
RED.nodes.addLink(link);
history.events.push({
t: 'add',
links: [link],
});
}
//connect the link out/link in virtual wires
if(nnLinkIn.links.indexOf(nnLinkOut.id) == -1) {
nnLinkIn.links.push(nnLinkOut.id);
}
if(nnLinkOut.links.indexOf(nnLinkIn.id) == -1) {
nnLinkOut.links.push(nnLinkIn.id);
}
//delete the original wire
RED.nodes.removeLink(wire);
history.events.push({
t: "delete",
links: [wire]
});
}
//add all history events to stack
RED.history.push(history);
//select all downstream of new link-in nodes so user can drag to new location
RED.view.clearSelection();
RED.view.select({nodes: Object.values(nodeTrgMap) });
selectConnected("down");
//update the view
RED.nodes.dirty(true);
RED.view.redraw(true);
}
/**
* Calculate the required offsets to snap a node
* @param {Object} node The node to calculate grid snap offsets for
* @param {Object} [options] Options: `align` can be "nearest", "left" or "right"
* @returns `{x:number, y:number}` as the offsets to deduct from `x` and `y`
*/
function calculateGridSnapOffsets(node, options) {
options = options || { align: "nearest" };
const gridOffset = { x: 0, y: 0 };
const gridSize = RED.view.gridSize();
const offsetLeft = node.x - (gridSize * Math.round((node.x - node.w / 2) / gridSize) + node.w / 2);
const offsetRight = node.x - (gridSize * Math.round((node.x + node.w / 2) / gridSize) - node.w / 2);
gridOffset.x = offsetRight;
if (options.align === "right") {
//skip - already set to right
} else if (options.align === "left" || Math.abs(offsetLeft) < Math.abs(offsetRight)) {
gridOffset.x = offsetLeft;
}
gridOffset.y = node.y - (gridSize * Math.round(node.y / gridSize));
return gridOffset;
}
/**
* Generate names for the select nodes.
* - it only sets the name if it is currently blank
* - it uses `<paletteLabel> <N>` - where N is the next available integer that
* doesn't clash with any existing nodes of that type
* @param {Object} node The node to set the name of - if not provided, uses current selection
* @param {{ renameBlank: boolean, renameClash: boolean, generateHistory: boolean }} options Possible options are `renameBlank`, `renameClash` and `generateHistory`
*/
function generateNodeNames(node, options) {
options = Object.assign({
renameBlank: true,
renameClash: true,
generateHistory: true
}, options)
let nodes = node;
if (node) {
if (!Array.isArray(node)) {
nodes = [ node ]
}
} else {
nodes = RED.view.selection().nodes;
}
if (nodes && nodes.length > 0) {
// Generate history event if using the workspace selection,
// or if the provided node already exists
const generateHistory = options.generateHistory && (!node || !!RED.nodes.node(node.id))
const historyEvents = []
const typeIndex = {}
let changed = false;
nodes.forEach(n => {
const nodeDef = n._def || RED.nodes.getType(n.type)
if (nodeDef && nodeDef.defaults && nodeDef.defaults.name) {
const paletteLabel = RED.utils.getPaletteLabel(n.type, nodeDef)
const defaultNodeNameRE = new RegExp('^'+paletteLabel.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')+' (\\d+)$')
if (!typeIndex.hasOwnProperty(n.type)) {
const existingNodes = RED.nodes.filterNodes({type: n.type})
let maxNameNumber = 0;
existingNodes.forEach(n => {
let match = defaultNodeNameRE.exec(n.name)
if (match) {
let nodeNumber = parseInt(match[1])
if (nodeNumber > maxNameNumber) {
maxNameNumber = nodeNumber
}
}
})
typeIndex[n.type] = maxNameNumber + 1
}
if ((options.renameBlank && n.name === '') || (options.renameClash && defaultNodeNameRE.test(n.name))) {
if (generateHistory) {
historyEvents.push({
t:'edit',
node: n,
changes: { name: n.name },
dirty: RED.nodes.dirty(),
changed: n.changed
})
}
n.name = paletteLabel+" "+typeIndex[n.type]
n.dirty = true
typeIndex[n.type]++
changed = true
}
}
})
if (changed) {
if (historyEvents.length > 0) {
RED.history.push({
t: 'multi',
events: historyEvents
})
}
RED.nodes.dirty(true)
RED.view.redraw()
}
}
}
function addJunctionsToWires(wires) {
let wiresToSplit = wires || (RED.view.selection().links && RED.view.selection().links.filter(e => !e.link));
if (!wiresToSplit) {
return
}
if (!Array.isArray(wiresToSplit)) {
wiresToSplit = [wiresToSplit];
}
if (wiresToSplit.length === 0) {
return;
}
var removedLinks = new Set()
var addedLinks = []
var addedJunctions = []
var groupedLinks = {}
wiresToSplit.forEach(function(l) {
var sourceId = l.source.id+":"+l.sourcePort
groupedLinks[sourceId] = groupedLinks[sourceId] || []
groupedLinks[sourceId].push(l)
groupedLinks[l.target.id] = groupedLinks[l.target.id] || []
groupedLinks[l.target.id].push(l)
});
var linkGroups = Object.keys(groupedLinks)
linkGroups.sort(function(A,B) {
return groupedLinks[B].length - groupedLinks[A].length
})
const wasDirty = RED.nodes.dirty()
linkGroups.forEach(function(gid) {
var links = groupedLinks[gid]
var junction = {
_def: {defaults:{}},
type: 'junction',
z: RED.workspaces.active(),
id: RED.nodes.id(),
x: 0,
y: 0,
w: 0, h: 0,
outputs: 1,
inputs: 1,
dirty: true
}
links = links.filter(function(l) { return !removedLinks.has(l) })
if (links.length === 0) {
return
}
let pointCount = 0
links.forEach(function(l) {
if (l._sliceLocation) {
junction.x += l._sliceLocation.x
junction.y += l._sliceLocation.y
delete l._sliceLocation
pointCount++
} else {
junction.x += l.source.x + l.source.w/2 + l.target.x - l.target.w/2
junction.y += l.source.y + l.target.y
pointCount += 2
}
})
junction.x = Math.round(junction.x/pointCount)
junction.y = Math.round(junction.y/pointCount)
if (RED.view.snapGrid) {
let gridSize = RED.view.gridSize()
junction.x = (gridSize*Math.round(junction.x/gridSize));
junction.y = (gridSize*Math.round(junction.y/gridSize));
}
var nodeGroups = new Set()
RED.nodes.addJunction(junction)
addedJunctions.push(junction)
let newLink
if (gid === links[0].source.id+":"+links[0].sourcePort) {
newLink = {
source: links[0].source,
sourcePort: links[0].sourcePort,
target: junction
}
} else {
newLink = {
source: junction,
sourcePort: 0,
target: links[0].target
}
}
addedLinks.push(newLink)
RED.nodes.addLink(newLink)
links.forEach(function(l) {
removedLinks.add(l)
RED.nodes.removeLink(l)
let newLink
if (gid === l.target.id) {
newLink = {
source: l.source,
sourcePort: l.sourcePort,
target: junction
}
} else {
newLink = {
source: junction,
sourcePort: 0,
target: l.target
}
}
addedLinks.push(newLink)
RED.nodes.addLink(newLink)
nodeGroups.add(l.source.g || "__NONE__")
nodeGroups.add(l.target.g || "__NONE__")
})
if (nodeGroups.size === 1) {
var group = nodeGroups.values().next().value
if (group !== "__NONE__") {
RED.group.addToGroup(RED.nodes.group(group), junction)
}
}
})
if (addedJunctions.length > 0) {
RED.history.push({
dirty: wasDirty,
t: 'add',
links: addedLinks,
junctions: addedJunctions,
removedLinks: Array.from(removedLinks)
})
RED.nodes.dirty(true)
RED.view.select({nodes: addedJunctions });
}
RED.view.redraw(true);
}
return {
init: function() {
RED.actions.add("core:show-selected-node-labels", function() { setSelectedNodeLabelState(true); })
@@ -1253,11 +870,6 @@ RED.view.tools = (function() {
RED.actions.add("core:wire-series-of-nodes", function() { wireSeriesOfNodes() })
RED.actions.add("core:wire-node-to-multiple", function() { wireNodeToMultiple() })
RED.actions.add("core:split-wire-with-link-nodes", function () { splitWiresWithLinkNodes() });
RED.actions.add("core:split-wires-with-junctions", function () { addJunctionsToWires() });
RED.actions.add("core:generate-node-names", generateNodeNames )
// RED.actions.add("core:add-node", function() { addNode() })
},
/**
@@ -1269,8 +881,7 @@ RED.view.tools = (function() {
* @param {Number} dx
* @param {Number} dy
*/
moveSelection: moveSelection,
calculateGridSnapOffsets: calculateGridSnapOffsets
moveSelection: moveSelection
}
})();

File diff suppressed because it is too large Load Diff

View File

@@ -24,9 +24,6 @@ RED.workspaces = (function() {
var hideStack = [];
var viewStackPos = 0;
let flashingTab;
let flashingTabTimer;
function addToViewStack(id) {
if (viewStackPos !== viewStack.length) {
viewStack.splice(viewStackPos);
@@ -444,9 +441,6 @@ RED.workspaces = (function() {
}
}
})
RED.actions.add("core:list-modified-nodes",function() {
RED.actions.invoke("core:search","is:modified ");
})
RED.actions.add("core:list-hidden-flows",function() {
RED.actions.invoke("core:search","is:hidden ");
})
@@ -547,31 +541,6 @@ RED.workspaces = (function() {
workspace_tabs.order(order);
}
function flashTab(tabId) {
if(flashingTab && flashingTab.length) {
//cancel current flashing node before flashing new node
clearInterval(flashingTabTimer);
flashingTabTimer = null;
flashingTab.removeClass('highlighted');
flashingTab = null;
}
let tab = $("#red-ui-tab-" + tabId);
if(!tab || !tab.length) { return; }
flashingTabTimer = setInterval(function(flashEndTime) {
if (flashEndTime >= Date.now()) {
const highlighted = tab.hasClass("highlighted");
tab.toggleClass('highlighted', !highlighted)
} else {
clearInterval(flashingTabTimer);
flashingTabTimer = null;
flashingTab = null;
tab.removeClass('highlighted');
}
}, 100, Date.now() + 2200);
flashingTab = tab;
tab.addClass('highlighted');
}
return {
init: init,
add: addWorkspace,
@@ -604,7 +573,7 @@ RED.workspaces = (function() {
isHidden: function(id) {
return hideStack.includes(id)
},
show: function(id,skipStack,unhideOnly,flash) {
show: function(id,skipStack,unhideOnly) {
if (!workspace_tabs.contains(id)) {
var sf = RED.nodes.subflow(id);
if (sf) {
@@ -626,9 +595,6 @@ RED.workspaces = (function() {
}
workspace_tabs.activateTab(id);
}
if(flash) {
flashTab(id.replace(".","-"))
}
},
refresh: function() {
RED.nodes.eachWorkspace(function(ws) {

View File

@@ -118,26 +118,20 @@ RED.user = (function() {
});
} else if (data.type == "strategy") {
var sessionMessage = /[?&]session_message=(.*?)(?:$|&)/.exec(window.location.search);
RED.sessionMessages = RED.sessionMessages || [];
if (sessionMessage) {
RED.sessionMessages.push(decodeURIComponent(sessionMessage[1]));
if (history.pushState) {
var newurl = window.location.protocol+"//"+window.location.host+window.location.pathname
window.history.replaceState({ path: newurl }, "", newurl);
} else {
window.location.search = "";
}
}
if (RED.sessionMessages.length === 0 && data.autoLogin) {
document.location = data.loginRedirect
return
}
i = 0;
for (;i<data.prompts.length;i++) {
var field = data.prompts[i];
var sessionMessage = /[?&]session_message=(.*?)(?:$|&)/.exec(window.location.search);
if (sessionMessage) {
RED.sessionMessages = RED.sessionMessages || [];
RED.sessionMessages.push(sessionMessage[1]);
if (history.pushState) {
var newurl = window.location.protocol+"//"+window.location.host+window.location.pathname
window.history.replaceState({ path: newurl }, "", newurl);
} else {
window.location.search = "";
}
}
if (RED.sessionMessages) {
var sessionMessages = $("<div/>",{class:"form-row",style:"text-align: center"}).appendTo("#node-dialog-login-fields");
RED.sessionMessages.forEach(function (msg) {

View File

@@ -14,72 +14,22 @@
* limitations under the License.
**/
RED.validators = {
number: function(blankAllowed,mopt){
return function(v, opt) {
if ((blankAllowed&&(v===''||v===undefined)) || (v!=='' && !isNaN(v))) {
number: function(blankAllowed){return function(v) { return (blankAllowed&&(v===''||v===undefined)) || (v!=='' && !isNaN(v));}},
regex: function(re){return function(v) { return re.test(v);}},
typedInput: function(ptypeName,isConfig) { return function(v) {
var ptype = $("#node-"+(isConfig?"config-":"")+"input-"+ptypeName).val() || this[ptypeName];
if (ptype === 'json') {
try {
JSON.parse(v);
return true;
} catch(err) {
return false;
}
if (opt && opt.label) {
return RED._("validator.errors.invalid-num-prop", {
prop: opt.label
});
}
return opt ? RED._("validator.errors.invalid-num") : false;
};
},
regex: function(re, mopt) {
return function(v, opt) {
if (re.test(v)) {
return true;
}
if (opt && opt.label) {
return RED._("validator.errors.invalid-regex-prop", {
prop: opt.label
});
}
return opt ? RED._("validator.errors.invalid-regexp") : false;
};
},
typedInput: function(ptypeName,isConfig,mopt) {
return function(v, opt) {
var ptype = $("#node-"+(isConfig?"config-":"")+"input-"+ptypeName).val() || this[ptypeName];
if (ptype === 'json') {
try {
JSON.parse(v);
return true;
} catch(err) {
if (opt && opt.label) {
return RED._("validator.errors.invalid-json-prop", {
error: err.message,
prop: opt.label,
});
}
return opt ? RED._("validator.errors.invalid-json", {
error: err.message
}) : false;
}
} else if (ptype === 'msg' || ptype === 'flow' || ptype === 'global' ) {
if (RED.utils.validatePropertyExpression(v)) {
return true;
}
if (opt && opt.label) {
return RED._("validator.errors.invalid-prop-prop", {
prop: opt.label
});
}
return opt ? RED._("validator.errors.invalid-prop") : false;
} else if (ptype === 'num') {
if (/^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$/.test(v)) {
return true;
}
if (opt && opt.label) {
return RED._("validator.errors.invalid-num-prop", {
prop: opt.label
});
}
return opt ? RED._("validator.errors.invalid-num") : false;
}
return true;
};
}
} else if (ptype === 'msg' || ptype === 'flow' || ptype === 'global' ) {
return RED.utils.validatePropertyExpression(v);
} else if (ptype === 'num') {
return /^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$/.test(v);
}
return true;
}}
};

View File

@@ -2,48 +2,48 @@
.ace_read-only {
.ace_scroller {
background: var(--red-ui-text-editor-background-disabled);
color: var(--red-ui-text-editor-color-disabled);
background: $text-editor-background-disabled;
color: $text-editor-color-disabled;
}
.ace_cursor {
color: transparent !important;
}
}
.ace_gutter {
background: var(--red-ui-text-editor-gutter-background);
background: $text-editor-gutter-background;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
.ace_scroller {
background: var(--red-ui-text-editor-background);
background: $text-editor-background;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
color: var(--red-ui-text-editor-color);
color: $text-editor-color;
}
.ace_marker-layer .ace_active-line {
background: var(--red-ui-text-editor-active-line-background);
background: $text-editor-active-line-background;
}
.ace_marker-layer .ace_selection {
background: var(--red-ui-text-editor-selection-background);
background: $text-editor-selection-background;
border-radius: 1px;
}
.ace_gutter-cell {
color: var(--red-ui-text-editor-gutter-color);
color: $text-editor-color;
}
.ace_gutter-active-line {
background: var(--red-ui-text-editor-gutter-active-line-background);
background: $text-editor-gutter-active-line-background;
}
.ace_tooltip {
font-family: var(--red-ui-primary-font);
font-family: $primary-font;
line-height: 1.4em;
max-width: 400px;
white-space: normal;
background-image: none;
background: var(--red-ui-popover-background);
color: var(--red-ui-popover-color);
background: $popover-background;
color: $popover-color;
border-radius: 4px;
@include component-shadow;
border-color: var(--red-ui-popover-background);
border-color: $popover-background;
}
.ace_content {
line-height: 1;
@@ -55,14 +55,14 @@
#red-ui-event-log-editor {
.ace_scroller {
background: var(--red-ui-event-log-background);
color: var(--red-ui-event-log-color);
background: $event-log-background;
color: $event-log-color;
}
.ace_marker-layer .ace_active-line {
background: var(--red-ui-event-log-active-line-background);
background: $event-log-active-line-background;
}
.ace_marker-layer .ace_selection {
background: var(--red-ui-event-log-selection-background);
background: $event-log-selection-background;
}
}
}

View File

@@ -20,12 +20,12 @@ body {
}
.red-ui-editor {
font-size: var(--red-ui-primary-font-size);
font-family: var(--red-ui-primary-font);
font-size: $primary-font-size;
font-family: $primary-font;
padding: 0;
margin: 0;
background: var(--red-ui-primary-background);
color: var(--red-ui-primary-text-color);
background: $primary-background;
color: $primary-text-color;
line-height: 20px;
}
@@ -44,7 +44,7 @@ body {
#red-ui-palette-shade, #red-ui-editor-shade, #red-ui-header-shade, #red-ui-sidebar-shade {
@include shade;
z-index: 5;
z-index: 2;
}
#red-ui-sidebar-shade {
left: -8px;
@@ -63,15 +63,15 @@ body {
.red-ui-icon-picker {
a {
text-decoration: none;
color: var(--red-ui-primary-text-color);
color: $primary-text-color;
}
a:hover,
a:focus {
text-decoration: none;
color: var(--red-ui-primary-text-color);
color: $primary-text-color;
}
a:focus {
outline: 1px solid var(--red-ui-form-input-focus-color);
outline: 1px solid $form-input-focus-color;
}
p {
@@ -130,7 +130,7 @@ body {
hr {
margin: 20px 0;
border: 0;
border-top: 1px solid var(--red-ui-tertiary-border-color);
border-top: 1px solid $tertiary-border-color;
}
@@ -142,30 +142,23 @@ body {
line-height: 14px;
vertical-align: text-top;
margin-top: 0px;
-webkit-mask-image: url(images/spin.svg);
mask-image: url(images/spin.svg);
-webkit-mask-size: contain;
mask-size: contain;
-webkit-mask-position: 50% 50%;
mask-position: 50% 50%;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
background-color: var(--red-ui-spinner-color);
}
background: url(images/spin.svg) no-repeat 50% 50%;
background-size: contain
}
.red-ui-font-code {
font-family: var(--red-ui-monospace-font);
font-size: var(--red-ui-primary-font-size);
color: var(--red-ui-text-color-code);
font-family: $monospace-font;
font-size: $primary-font-size;
color: $text-color-code;
white-space: nowrap;
}
code {
font-family: var(--red-ui-monospace-font);
font-size: var(--red-ui-primary-font-size);
font-family: $monospace-font;
font-size: $primary-font-size;
padding: 0px;
margin: 1px;
color: var(--red-ui-text-color-code);
color: $text-color-code;
white-space: nowrap;
}
@@ -177,8 +170,8 @@ body {
word-break: break-all;
word-wrap: break-word;
white-space: pre-wrap;
background-color:var(--red-ui-tertiary-background);
border: 1px solid var(--red-ui-tertiary-border-color);
background-color:$tertiary-background;
border: 1px solid $tertiary-border-color;
border-radius: 2px;
}
@@ -217,8 +210,8 @@ body {
blockquote {
padding: 0 0 0 15px;
margin: 0 0 20px;
border-left: 4px solid var(--red-ui-secondary-border-color);
color: var(--red-ui-secondary-text-color);
border-left: 4px solid $secondary-border-color;
color: $secondary-text-color;
p {
font-size: 14px;
@@ -244,7 +237,7 @@ body {
right: 1px;
text-align: center;
padding: 40px;
background: var(--red-ui-secondary-background);
background: $secondary-background;
&:before {
content: '';
display: inline-block;
@@ -258,14 +251,14 @@ body {
width: 80px;
}
&.red-ui-component-spinner-sidebar {
background: var(--red-ui-secondary-background);
background: $secondary-background;
padding:0;
img {
width: 40px;
}
}
&.projects-version-control-spinner-sidebar {
background: var(--red-ui-secondary-background);
background: $secondary-background;
padding:0;
img {
width: 20px;

View File

@@ -112,13 +112,9 @@ $tab-text-color-disabled-inactive: $secondary-text-color-disabled-inactive;
$tab-badge-color: $tertiary-text-color;
$tab-background: $secondary-background;
$tab-background-active: $secondary-background;
$tab-background-active-alpha: rgba($tab-background-active, 0.001);
$tab-background-selected: $secondary-background-selected;
$tab-background-selected-alpha: rgba($tab-background-selected, 0.001);
$tab-background-inactive: $secondary-background-inactive;
$tab-background-inactive-alpha: rgba($tab-background-inactive, 0.001);
$tab-background-hover: $secondary-background-hover;
$tab-background-hover-alpha: rgba($tab-background-hover, 0.001);
$palette-header-background: $primary-background;
$palette-header-color: $header-text-color;
@@ -217,7 +213,6 @@ $node-icon-border-color: #000;
$node-icon-border-color-opacity: 0.1;
$node-config-background: #f3f3f3;
$node-config-icon-container-disabled: #aaa;
$node-link-port-background: #eee;
@@ -305,14 +300,6 @@ $group-default-label-color: #a4a4a4;
$tourGuide-border: #c56c6c;
$tourGuide-heading-color: #c56c6c;
$grip-color: #ccc;
$icons-flow-color: #808080;
$spinner-color: #999;
$tab-icon-color: #dedede;
// Deprecated
$text-color-green: $text-color-success;
$info-text-code-color: $text-color-code;

View File

@@ -17,7 +17,7 @@
.red-ui-debug-window {
padding:0;
margin:0;
background: var(--red-ui-secondary-background);
background: $secondary-background;
line-height: 20px;
.red-ui-debug-msg-payload {
font-size: 14px;
@@ -30,7 +30,7 @@
bottom: 0px;
left:0px;
right: 0px;
overflow-y: auto;
overflow-y: scroll;
}
.red-ui-debug-filter-box {
position:absolute;
@@ -38,15 +38,15 @@
left: 0px;
right: 0px;
z-index: 20;
background: var(--red-ui-tertiary-background);
background: $tertiary-background;
padding: 10px;
border-bottom: 1px solid var(--red-ui-secondary-border-color);
box-shadow: 0 2px 6px var(--red-ui-shadow);
border-bottom: 1px solid $secondary-border-color;
box-shadow: 0 2px 6px $shadow;
}
#red-ui-sidebar-debug-filter-node-list-row {
.red-ui-treeList-label.disabled {
font-style: italic;
color: var(--red-ui-secondary-text-color-disabled);
color: $secondary-text-color-disabled;
}
.red-ui-treeList-label {
@@ -57,22 +57,22 @@
background: inherit;
}
&.focus, &.focus .red-ui-treeList-sublabel-text {
background: var(--red-ui-list-item-background-hover) !important;
background: $list-item-background-hover !important;
}
}
}
.red-ui-debug-msg {
position: relative;
border-bottom: 1px solid var(--red-ui-debug-message-border);
border-left: 8px solid var(--red-ui-debug-message-border);
border-right: 8px solid var(--red-ui-debug-message-border);
border-bottom: 1px solid $debug-message-border;
border-left: 8px solid $debug-message-border;
border-right: 8px solid $debug-message-border;
padding: 2px;
&>.red-ui-debug-msg-meta .red-ui-debug-msg-tools {
display: none;
}
&.red-ui-debug-msg-hover {
border-right-color: var(--red-ui-debug-message-border-hover);
border-right-color: $debug-message-border-hover;
&>.red-ui-debug-msg-meta .red-ui-debug-msg-tools {
display: inline-block;
}
@@ -86,7 +86,7 @@
display: inline-block;
}
&:hover {
background: var(--red-ui-debug-message-background-hover);
background: $debug-message-background-hover;
&>.red-ui-debug-msg-tools {
.red-ui-debug-msg-tools-copy {
display: inline-block;
@@ -120,23 +120,20 @@
}
.red-ui-debug-msg-meta {
background: var(--red-ui-debug-message-background);
background: $debug-message-background;
font-size: 11px;
color: var(--red-ui-secondary-text-color-inactive);
overflow-wrap: anywhere;
color: $secondary-text-color-inactive;
}
.red-ui-debug-msg-date {
padding: 1px 10px 1px 0px;
white-space: nowrap;
padding: 1px 5px 1px 1px;
}
.red-ui-debug-msg-topic {
display: block;
color: var(--red-ui-debug-message-text-color-meta);
color: $debug-message-text-color-meta;
}
.red-ui-debug-msg-name {
padding: 1px 0px;
color: var(--red-ui-secondary-text-color-inactive);
white-space: nowrap;
padding: 1px 5px;
color: $secondary-text-color-inactive;
}
.red-ui-debug-msg-tools {
position: absolute;
@@ -152,39 +149,39 @@
.red-ui-debug-msg-payload {
display: block;
padding: 2px;
background: var(--red-ui-debug-message-background);
font-family: var(--red-ui-monospace-font);
background: $debug-message-background;
font-family: $monospace-font;
font-size: 13px !important;
}
.red-ui-debug-msg-level-log {
border-left-color: var(--red-ui-debug-message-border);
border-right-color: var(--red-ui-debug-message-border);
border-left-color: $debug-message-border;
border-right-color: $debug-message-border;
}
.red-ui-debug-msg-level-30 {
border-left-color: var(--red-ui-debug-message-border-warning);
border-right-color: var(--red-ui-debug-message-border-warning);
border-left-color: $debug-message-border-warning;
border-right-color: $debug-message-border-warning;
}
.red-ui-debug-msg-level-20 {
border-left-color: var(--red-ui-debug-message-border-error);
border-right-color: var(--red-ui-debug-message-border-error);
border-left-color: $debug-message-border-error;
border-right-color: $debug-message-border-error;
}
.red-ui-debug-msg-object-entry {
position: relative;
padding-left: 15px;
}
.red-ui-debug-msg-element {
color: var(--red-ui-debug-message-text-color);
color: $debug-message-text-color;
line-height: 1.3em;
overflow-wrap: break-word;
}
.red-ui-debug-msg-object-key {
color: var(--red-ui-debug-message-text-color-object-key);
color: $debug-message-text-color-object-key;
}
.red-ui-debug-msg-object-value {
}
.red-ui-debug-msg-object-handle {
color: var(--red-ui-secondary-text-color);
color: $secondary-text-color;
font-size: 1em;
width: 1em;
text-align: center;
@@ -219,17 +216,17 @@
display:none;
}
.red-ui-debug-msg-object-entry pre {
font-family: var(--red-ui-monospace-font);
font-family: $monospace-font;
font-size: 13px;
line-height: 1.2em;
margin: 0 0 0 -1em;
}
.red-ui-debug-msg-type-other { color: var(--red-ui-debug-message-text-color-msg-type-other); }
.red-ui-debug-msg-type-string { color: var(--red-ui-debug-message-text-color-msg-type-string); }
.red-ui-debug-msg-type-null { color: var(--red-ui-debug-message-text-color-msg-type-null); font-style: italic;}
.red-ui-debug-msg-type-meta { color: var(--red-ui-debug-message-text-color-msg-type-meta); font-style: italic;}
.red-ui-debug-msg-type-number { color: var(--red-ui-debug-message-text-color-msg-type-number); }
.red-ui-debug-msg-type-other { color: $debug-message-text-color-msg-type-other; }
.red-ui-debug-msg-type-string { color: $debug-message-text-color-msg-type-string; }
.red-ui-debug-msg-type-null { color: $debug-message-text-color-msg-type-null; font-style: italic;}
.red-ui-debug-msg-type-meta { color: $debug-message-text-color-msg-type-meta; font-style: italic;}
.red-ui-debug-msg-type-number { color: $debug-message-text-color-msg-type-number; };
.red-ui-debug-msg-type-number-toggle { cursor: pointer;}
.red-ui-debug-msg-type-string {
@@ -241,14 +238,14 @@
padding: 4px 2px 2px;
position: relative;
&.red-ui-debug-msg-row-pinned {
background: var(--red-ui-secondary-background-selected);
background: $secondary-background-selected;
}
}
.red-ui-debug-msg-expandable {
cursor: pointer;
}
.red-ui-debug-msg-expandable:hover .red-ui-debug-msg-object-handle {
color:var(--red-ui-secondary-text-color-hover);
color:$secondary-text-color-hover;
}
.red-ui-debug-msg-buffer-opts {

View File

@@ -23,11 +23,11 @@
.red-ui-editableList-container {
border-radius:1px;
padding:0;
background: var(--red-ui-tertiary-background);
background: $tertiary-background;
}
.red-ui-diff-list {
li {
background: var(--red-ui-tertiary-background);
background: $tertiary-background;
padding: 0px;
border: none;
min-height: 0;
@@ -62,29 +62,29 @@
white-space: nowrap;
text-overflow: ellipsis;
width: 50%;
background: var(--red-ui-tertiary-background);
background: $tertiary-background;
text-align: center;
border-top: 1px solid var(--red-ui-secondary-border-color);
border-color:var(--red-ui-secondary-border-color);
border-left: 1px solid var(--red-ui-secondary-border-color);
border-top: 1px solid $secondary-border-color;
border-color:$secondary-border-color;
border-left: 1px solid $secondary-border-color;
}
div:last-child {
border-right: 1px solid var(--red-ui-secondary-border-color);
border-right: 1px solid $secondary-border-color;
}
}
.red-ui-diff-dialog-toolbar {
box-sizing: border-box;
color: var(--red-ui-secondary-text-color);
color: $secondary-text-color;
text-align: right;
padding: 8px 10px;
background: var(--red-ui-primary-background);
border-bottom: 1px solid var(--red-ui-secondary-border-color);
background: $primary-background;
border-bottom: 1px solid $secondary-border-color;
white-space: nowrap;
}
.red-ui-diff-list-flow {
background: var(--red-ui-secondary-background);
border: 1px solid var(--red-ui-secondary-border-color);
background: $secondary-background;
border: 1px solid $secondary-border-color;
border-radius: 1px;
overflow: hidden;
@@ -114,10 +114,10 @@
font-size: 0.9em;
&:first-child {
border-top: 1px solid var(--red-ui-tertiary-border-color);
border-top: 1px solid $tertiary-border-color;
}
&:not(:last-child) {
border-bottom: 1px solid var(--red-ui-tertiary-border-color);
border-bottom: 1px solid $tertiary-border-color;
}
&.collapsed {
@@ -150,8 +150,8 @@
width: 100%;
}
td, th {
border-top: 1px solid var(--red-ui-secondary-border-color);
border-left: 1px solid var(--red-ui-secondary-border-color);
border-top: 1px solid $secondary-border-color;
border-left: 1px solid $secondary-border-color;
&:first-child {
border-left: none;
}
@@ -166,7 +166,7 @@
overflow:hidden;
}
&:hover {
background: var(--red-ui-secondary-background-selected);
background: $secondary-background-selected;
}
}
@@ -212,7 +212,7 @@
cursor: pointer;
padding: 0;
&:hover {
background: var(--red-ui-secondary-background-selected);
background: $secondary-background-selected;
}
}
.red-ui-diff-list-flow-title-meta {
@@ -223,7 +223,7 @@
.red-ui-diff-list-node-header {
cursor: pointer;
&:hover {
background: var(--red-ui-secondary-background-selected);
background: $secondary-background-selected;
}
}
.red-ui-diff-list-node-icon {
@@ -232,9 +232,9 @@
margin: 5px;
width: 18px;
height: 15px;
background: var(--red-ui-form-input-background);
background: $form-input-background;
border-radius: 2px;
border: 1px solid var(--red-ui-node-border);
border: 1px solid $node-border;
background-position: 5% 50%;
background-repeat: no-repeat;
background-size: contain;
@@ -267,7 +267,7 @@
.red-ui-diff-status-deleted {
cursor: default !important;
.red-ui-diff-status {
color: var(--red-ui-diff-state-deleted);
color: $diff-state-deleted;
}
.red-ui-diff-list-node-node {
opacity: 0.5;
@@ -280,28 +280,28 @@
.red-ui-diff-status-added {
cursor: default !important;
.red-ui-diff-status {
color: var(--red-ui-diff-state-added);
color: $diff-state-added;
}
}
.red-ui-diff-status-moved {
.red-ui-diff-status {
color: var(--red-ui-diff-state-moved);
color: $diff-state-moved;
}
}
.red-ui-diff-status-changed {
.red-ui-diff-status {
color: var(--red-ui-diff-state-changed);
color: $diff-state-changed;
}
}
.red-ui-diff-status-unchanged {
.red-ui-diff-status {
color: var(--red-ui-diff-state-unchanged);
color: $diff-state-unchanged;
}
}
.red-ui-diff-status-conflict {
.red-ui-diff-status {
color: var(--red-ui-diff-state-conflict);
color: $diff-state-conflict;
}
}
.red-ui-diff-list-node-title {
@@ -312,7 +312,7 @@
}
.red-ui-diff-list-node-properties {
margin: 0;
color: var(--red-ui-primary-text-color);
color: $primary-text-color;
}
.red-ui-diff-status {
display: inline-block;
@@ -329,7 +329,7 @@
}
.red-ui-diff-list-node-description {
color: var(--red-ui-form-text-color);
color: $form-text-color;
margin-right: 5px;
padding-top: 5px;
display: inline-block;
@@ -340,11 +340,11 @@
}
}
.red-ui-diff-state-added { color: var(--red-ui-diff-state-added); }
.red-ui-diff-state-deleted { color: var(--red-ui-diff-state-deleted); }
.red-ui-diff-state-changed { color: var(--red-ui-diff-state-changed); }
.red-ui-diff-state-unchanged { color: var(--red-ui-diff-state-unchanged); }
.red-ui-diff-state-conflicted { color: var(--red-ui-diff-state-conflicted); }
.red-ui-diff-state-added { color: $diff-state-added; }
.red-ui-diff-state-deleted { color: $diff-state-deleted; }
.red-ui-diff-state-changed { color: $diff-state-changed; }
.red-ui-diff-state-unchanged { color: $diff-state-unchanged; }
.red-ui-diff-state-conflicted { color: $diff-state-conflicted; }
.red-ui-diff-list-node-cell {
@@ -353,19 +353,19 @@
box-sizing: border-box;
width: calc( (100% - 20px) / 2);
height: 32px;
border-left: 1px solid var(--red-ui-secondary-border-color);
border-left: 1px solid $secondary-border-color;
padding-top: 2px;
white-space: nowrap;
overflow: hidden;
position: relative;
}
.red-ui-diff-empty {
background: var(--red-ui-secondary-background-disabled);
background: $secondary-background-disabled;
background: repeating-linear-gradient(
20deg,
var(--red-ui-secondary-background), var(--red-ui-secondary-background) 5px,
var(--red-ui-secondary-background-disabled) 5px,
var(--red-ui-secondary-background-disabled) 10px
$secondary-background, $secondary-background 5px,
$secondary-background-disabled 5px,
$secondary-background-disabled 10px
);
}
.red-ui-diff-list-node-cell:first-child {
@@ -425,10 +425,10 @@
background: none;
}
&.red-ui-diff-status-changed {
background: var(--red-ui-diff-state-changed-background);
background: $diff-state-changed-background;
}
&.red-ui-diff-status-conflict {
background: var(--red-ui-diff-state-conflict-background);
background: $diff-state-conflict-background;
}
}
@@ -439,42 +439,42 @@ label.red-ui-diff-selectbox {
bottom:0;
width: 35px;
text-align: center;
border-left: 1px solid var(--red-ui-secondary-border-color);
border-left: 1px solid $secondary-border-color;
margin:0;
input[type="radio"] {
margin-top: 8px;
}
&:hover {
background: var(--red-ui-secondary-background-hover);
background: $secondary-background-hover;
}
}
.red-ui-diff-list-node-conflict.red-ui-diff-select-remote {
.red-ui-diff-list-node-remote {
background: var(--red-ui-diff-state-added-background);
background: $diff-state-added-background;
label {
border-left-color: var(--red-ui-diff-state-added-border);
border-left-color: $diff-state-added-border;
}
}
.red-ui-diff-list-node-local {
background: var(--red-ui-diff-state-deleted-background);
background: $diff-state-deleted-background;
label {
border-left-color: var(--red-ui-diff-state-deleted-border);
border-left-color: $diff-state-deleted-border;
}
}
}
.red-ui-diff-list-node-conflict.red-ui-diff-select-local {
.red-ui-diff-list-node-local {
background: var(--red-ui-diff-state-added-background);
background: $diff-state-added-background;
label {
border-left-color: var(--red-ui-diff-state-added-border);
border-left-color: $diff-state-added-border;
}
}
.red-ui-diff-list-node-remote {
background: var(--red-ui-diff-state-deleted-background);
background: $diff-state-deleted-background;
label {
border-left-color: var(--red-ui-diff-state-deleted-border);
border-left-color: $diff-state-deleted-border;
}
}
}
@@ -500,10 +500,10 @@ ul.red-ui-deploy-dialog-confirm-list {
width: 30px;
margin-right: 10px;
&.fa-check {
color: var(--red-ui-text-color-success);
color: $text-color-success;
}
&.fa-exclamation {
color: var(--red-ui-secondary-text-color);
color: $secondary-text-color;
}
}
div {
@@ -529,7 +529,7 @@ ul.red-ui-deploy-dialog-confirm-list {
table.red-ui-diff-text-content {
margin: 10px;
border: 1px solid var(--red-ui-secondary-border-color);
border: 1px solid $secondary-border-color;
border-radius: 3px;
table-layout: fixed;
width: calc(100% - 20px);
@@ -538,88 +538,88 @@ ul.red-ui-deploy-dialog-confirm-list {
word-wrap: break-word;
}
td.lineno {
font-family: var(--red-ui-monospace-font);
font-family: $monospace-font;
text-align: right;
color: var(--red-ui-tertiary-text-color);
background: var(--red-ui-tertiary-background);
color: $tertiary-text-color;
background: $tertiary-background;
padding: 1px 5px;
&.added {
background: var(--red-ui-diff-state-added-header-background);
background: $diff-state-added-header-background;
}
&.removed {
background: var(--red-ui-diff-state-deleted-header-background);
background: $diff-state-deleted-header-background;
}
}
td.lineno:nth-child(3) {
border-left: 1px solid var(--red-ui-secondary-border-color);
border-left: 1px solid $secondary-border-color;
}
td.linetext {
font-family: var(--red-ui-monospace-font);
font-family: $monospace-font;
white-space: pre-wrap;
padding: 1px 5px;
border-left: 1px solid var(--red-ui-tertiary-border-color);
border-left: 1px solid $tertiary-border-color;
span.prefix {
width: 30px;
display: inline-block;
text-align: center;
color: var(--red-ui-diff-state-prefix-color);
color: $diff-state-prefix-color;
}
&.added {
border-left-color: var(--red-ui-diff-state-added-header-border);
border-left-color: $diff-state-added-header-border;
}
&.removed {
border-left-color: var(--red-ui-diff-state-deleted-header-border);
border-left-color: $diff-state-deleted-header-border;
}
}
td.blank {
background: var(--red-ui-tertiary-background);
background: $tertiary-background;
}
td.added {
background: var(--red-ui-diff-state-added-background);
color: var(--red-ui-diff-state-color);
background: $diff-state-added-background;
color: $diff-state-color;
}
td.removed {
background: var(--red-ui-diff-state-deleted-background);
color: var(--red-ui-diff-state-color);
background: $diff-state-deleted-background;
color: $diff-state-color;
}
tr.mergeHeader td {
color: var(--red-ui-diff-merge-header-color);
background: var(--red-ui-diff-merge-header-background);
color: $diff-merge-header-color;
background: $diff-merge-header-background;
height: 26px;
vertical-align: middle;
}
tr.mergeHeader-separator td {
color: var(--red-ui-diff-merge-header-color);
background: var(--red-ui-diff-merge-header-border-color);
color: $diff-merge-header-color;
background: $diff-merge-header-border-color;
height: 0px;
}
tr.mergeHeader-ours td {
border-top: 2px solid var(--red-ui-diff-merge-header-border-color);
border-top: 2px solid $diff-merge-header-border-color;
}
tr.mergeHeader-theirs td {
border-bottom: 2px solid var(--red-ui-diff-merge-header-border-color);
border-bottom: 2px solid $diff-merge-header-border-color;
}
td.unchanged {
background: var(--red-ui-diff-state-unchanged-background);
color: var(--red-ui-diff-state-unchanged);
background: $diff-state-unchanged-background;
color: $diff-state-unchanged;
}
tr.unchanged {
background: var(--red-ui-diff-state-unchanged-background);
background: $diff-state-unchanged-background;
}
tr.start-block {
border-top: 1px solid var(--red-ui-secondary-border-color);
border-top: 1px solid $secondary-border-color;
}
tr.end-block {
border-bottom: 1px solid var(--red-ui-secondary-border-color);
border-bottom: 1px solid $secondary-border-color;
}
tr.red-ui-diff-text-file-header td {
.filename {
font-family: var(--red-ui-monospace-font);
font-family: $monospace-font;
}
background: var(--red-ui-primary-background);
background: $primary-background;
padding: 5px 10px 5px 0;
color: var(--red-ui-primary-text-color);
color: $primary-text-color;
cursor: pointer;
i.red-ui-diff-list-chevron {
width: 30px;
@@ -631,17 +631,17 @@ ul.red-ui-deploy-dialog-confirm-list {
}
}
tr.red-ui-diff-text-commit-header td {
background: var(--red-ui-primary-background);
background: $primary-background;
padding: 5px 10px;
color: var(--red-ui-primary-text-color);
color: $primary-text-color;
h3 {
font-size: 1.4em;
margin: 0;
}
.commit-summary {
border-top: 1px solid var(--red-ui-secondary-border-color);
border-top: 1px solid $secondary-border-color;
padding-top: 5px;
color: var(--red-ui-secondary-text-color);
color: $secondary-text-color;
}
.commit-body {
margin-bottom:15px;
@@ -651,20 +651,20 @@ ul.red-ui-deploy-dialog-confirm-list {
}
tr.red-ui-diff-text-header > td:not(.red-ui-diff-flow-diff) {
font-family: var(--red-ui-monospace-font);
font-family: $monospace-font;
padding: 5px 10px;
text-align: left;
color: var(--red-ui-diff-text-header-color);
background: var(--red-ui-diff-text-header-background);
color: $diff-text-header-color;
background: $diff-text-header-background;
height: 30px;
vertical-align: middle;
border-top: 1px solid var(--red-ui-secondary-border-color);
border-bottom: 1px solid var(--red-ui-secondary-border-color);
border-top: 1px solid $secondary-border-color;
border-bottom: 1px solid $secondary-border-color;
}
tr.red-ui-diff-text-expand td {
cursor: pointer;
&:hover {
background: var(--red-ui-diff-text-header-background);
background: $diff-text-header-background;
}
}
}

View File

@@ -18,7 +18,7 @@
position: absolute;
top: 0; bottom: 0;
left: 0; right: 0;
background: var(--red-ui-dnd-background);
background: $dnd-background;
display:table;
width: 100%;
height: 100%;
@@ -30,7 +30,7 @@
vertical-align: middle;
text-align: center;
font-size: 40px;
color: var(--red-ui-dnd-color);
color: $dnd-color;
i {
pointer-events: none;
font-size: 80px;

View File

@@ -15,8 +15,8 @@
**/
.red-ui-menu-dropdown {
font-family: var(--red-ui-primary-font);
font-size: var(--red-ui-primary-font-size);
font-family: $primary-font;
font-size: $primary-font-size;
position: absolute;
top: 100%;
width: 230px;
@@ -28,9 +28,9 @@
margin-left: 0px !important;
padding: 5px 0;
list-style: none;
background: var(--red-ui-menuBackground);
border: 1px solid var(--red-ui-secondary-border-color);
box-shadow: 0 5px 10px var(--red-ui-shadow);
background: $menuBackground;
border: 1px solid $secondary-border-color;
box-shadow: 0 5px 10px $shadow;
&.pull-right {
right: 0;
@@ -41,7 +41,7 @@
height: 1px;
margin: 9px 1px;
overflow: hidden;
background-color: var(--red-ui-menuDivider);
background-color: $menuDivider;
}
& > li > a,
& > li > a:focus {
@@ -50,45 +50,27 @@
clear: both;
font-weight: normal;
line-height: 20px;
color: var(--red-ui-menuColor);
color: $menuColor;
white-space: normal !important;
outline: none;
}
& > li.pull-left > a,
& > li.pull-left > a:focus {
padding: 4px 12px 4px 32px;
}
&.red-ui-menu-dropdown-noicons > li > a,
&.red-ui-menu-dropdown-noicons > li > a:focus {
padding: 4px 12px 4px 12px;
}
&.red-ui-menu-dropdown-submenus.red-ui-menu-dropdown-direction-right > li > a,
&.red-ui-menu-dropdown-submenus.red-ui-menu-dropdown-direction-right > li > a:focus {
padding-right: 20px;
}
&.red-ui-menu-dropdown-submenus.red-ui-menu-dropdown-direction-left > li > a,
&.red-ui-menu-dropdown-submenus.red-ui-menu-dropdown-direction-left > li > a:focus {
padding-left: 20px;
}
& > .active > a,
& > .active > a:hover,
& > .active > a:focus {
color: var(--red-ui-menuActiveColor);
color: $menuActiveColor;
text-decoration: none;
background-color: var(--red-ui-menuActiveBackground);
background-color: $menuActiveBackground;
outline: 0;
}
& > .disabled > a,
& > .disabled > a:hover,
& > .disabled > a:focus {
color: var(--red-ui-menuDisabledColor);
color: $menuDisabledColor;
.red-ui-popover-key {
color: var(--red-ui-menuDisabledColor);
border-color: var(--red-ui-menuDisabledColor);
color: $menuDisabledColor;
border-color: $menuDisabledColor;
}
}
@@ -136,8 +118,8 @@
padding: 0;
font-size: 13px;
// float: right;
color: var(--red-ui-menuColor);
border-color: var(--red-ui-menuColor);
color: $menuColor;
border-color: $menuColor;
}
}
@@ -154,17 +136,17 @@
.red-ui-menu-dropdown > li > a:focus,
.red-ui-menu-dropdown-submenu:hover > a,
.red-ui-menu-dropdown-submenu:focus > a {
color: var(--red-ui-menuHoverColor);
color: $menuHoverColor;
text-decoration: none;
background-color: var(--red-ui-menuHoverBackground);
background-color: $menuHoverBackground;
}
.red-ui-menu-dropdown-submenu {
position: relative;
& > .red-ui-menu-dropdown {
top: 0;
left: calc(100% - 5px);
margin-top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
}
&.open > .red-ui-menu-dropdown,
@@ -179,7 +161,7 @@
margin-top: 5px;
margin-right: -10px;
border-color: transparent;
border-left-color: var(--red-ui-menuCaret);
border-left-color: $menuCaret;
border-style: solid;
border-width: 5px 0 5px 5px;
content: " ";
@@ -193,50 +175,32 @@
}
}
.red-ui-menu-dropdown-submenu.pull-left>a:after {
.red-ui-menu-dropdown-submenu>a:after {
display: none;
}
.red-ui-menu-dropdown-submenu.pull-left>a:before {
.red-ui-menu-dropdown-submenu>a:before {
display: block;
float: left;
width: 0;
height: 0;
margin-top: 5px;
margin-left: -15px;
margin-left: -30px;
/* Caret Arrow */
border-color: transparent;
border-right-color: var(--red-ui-menuCaret);
border-right-color: $menuCaret;
border-style: solid;
border-width: 5px 5px 5px 0;
content: " ";
}
.red-ui-menu-dropdown-direction-right {
.red-ui-menu-dropdown-submenu>a:after {
display: none;
}
.red-ui-menu-dropdown-submenu>a:before {
display: block;
float: right;
width: 0;
height: 0;
margin-top: 5px;
margin-right: -15px;
/* Caret Arrow */
border-color: transparent;
border-left-color: var(--red-ui-menuCaret);
border-style: solid;
border-width: 5px 0 5px 5px;
content: " ";
}
}
.red-ui-menu-dropdown-submenu.disabled > a:before {
border-right-color: var(--red-ui-menuCaret);
border-right-color: $menuCaret;
}
// Menu NG
ul.red-ui-menu:not(.red-ui-menu-dropdown) {
font-family: var(--red-ui-primary-font);
font-family: $primary-font;
font-size: 12px;
list-style-type: none;
padding: 0;
@@ -247,14 +211,14 @@ ul.red-ui-menu:not(.red-ui-menu-dropdown) {
clear: both;
font-weight: normal;
line-height: 20px;
color: var(--red-ui-menuColor);
color: $menuColor;
white-space: nowrap;
text-decoration: none;
&:hover,&:focus {
color: var(--red-ui-menuHoverColor);
color: $menuHoverColor;
text-decoration: none;
background-color: var(--red-ui-menuHoverBackground);
background-color: $menuHoverBackground;
border: none;
outline: none;
}

View File

@@ -32,9 +32,9 @@
width: auto;
right: -1000px;
bottom: 0;
background: var(--red-ui-secondary-background);
border-left: 1px solid var(--red-ui-secondary-border-color);
border-bottom: 1px solid var(--red-ui-primary-border-color);
background: $secondary-background;
border-left: 1px solid $secondary-border-color;
border-bottom: 1px solid $primary-border-color;
box-sizing: content-box;
}
.red-ui-tray.open {
@@ -67,8 +67,8 @@
position: relative;
box-sizing: border-box;
font-weight: bold;
border-bottom: 1px solid var(--red-ui-secondary-border-color);
background: var(--red-ui-palette-header-background);
border-bottom: 1px solid $secondary-border-color;
background: $palette-header-background;
&:after {
content: "";
display: table;
@@ -88,8 +88,8 @@
height: 26px;
line-height: 26px;
&.toggle:not(.selected) {
color: var(--red-ui-workspace-button-color-selected) !important;
background: var(--red-ui-workspace-button-background-active);
color: $workspace-button-color-selected !important;
background: $workspace-button-background-active;
}
}
@@ -116,8 +116,8 @@
}
.red-ui-tray-titlebar {
color: var(--red-ui-header-text-color);
border-bottom: 1px solid var(--red-ui-secondary-border-color);
color: $header-text-color;
border-bottom: 1px solid $secondary-border-color;
padding: 8px;
}
.red-ui-editor ul.red-ui-tray-breadcrumbs {
@@ -131,7 +131,7 @@
margin:0;
&:not(:last-child) {
color: var(--red-ui-workspace-button-color);
color: $workspace-button-color;
font-weight: normal;
&:after {
@@ -149,29 +149,13 @@
bottom: 0px;
width: 7px;
left: -9px;
background-color: var(--red-ui-primary-background);
background: $primary-background url(images/grip.png) no-repeat 50% 50%;
cursor: col-resize;
border-left: 1px solid var(--red-ui-primary-border-color);
box-shadow: -1px 0 6px var(--red-ui-shadow);
border-left: 1px solid $primary-border-color;
box-shadow: -1px 0 6px $shadow;
&:before {
content: '';
display: block;
width: 100%;
height: 100%;
-webkit-mask-image: url(images/grip.svg);
mask-image: url(images/grip.svg);
-webkit-mask-size: auto;
mask-size: auto;
-webkit-mask-position: 50% 50%;
mask-position: 50% 50%;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
background-color: var(--red-ui-grip-color);
}
&.red-ui-tray-resize-maximised {
background: var(--red-ui-primary-background);
background: $primary-background;
cursor: default;
}
}
@@ -182,10 +166,10 @@ button.red-ui-tray-resize-button {
height: 37px;
line-height: 35px;
border: none;
border-bottom: 1px solid var(--red-ui-secondary-border-color);
border-bottom: 1px solid $secondary-border-color;
margin: 0;
background: var(--red-ui-primary-background);
color: var(--red-ui-workspace-button-color);
background: $primary-background;
color: $workspace-button-color;
}
.red-ui-editor .red-ui-tray {
@@ -203,16 +187,16 @@ button.red-ui-tray-resize-button {
}
.input-error {
border-color: var(--red-ui-form-input-border-error-color) !important;
border-color: $form-input-border-error-color !important;
}
.input-updated {
border-color: var(--red-ui-node-selected-color) !important;
border-color: $node-selected-color !important;
}
.form-row {
clear: both;
color: var(--red-ui-form-text-color);
color: $form-text-color;
margin-bottom:12px;
}
.form-row label {
@@ -223,10 +207,10 @@ button.red-ui-tray-resize-button {
width:70%;
}
.form-tips {
background: var(--red-ui-form-tips-background);
background: $form-tips-background;
padding: 8px;
border-radius: 2px;
border: 1px solid var(--red-ui-secondary-border-color);
border: 1px solid $secondary-border-color;
max-width: 450px;
}
.form-tips code {
@@ -238,7 +222,7 @@ button.red-ui-tray-resize-button {
}
.form-warning {
border-color: var(--red-ui-text-color-error);
border-color: $text-color-error;
}
}
@@ -255,11 +239,11 @@ button.red-ui-tray-resize-button {
}
}
.red-ui-editor-text-container {
border:1px solid var(--red-ui-tertiary-border-color);
border:1px solid $tertiary-border-color;
border-radius:5px;
overflow: hidden;
font-size: var(--red-ui-primary-font-size !important);
font-family: var(--red-ui-monospace-font !important);
font-size: $primary-font-size !important;
font-family: $monospace-font !important;
height: 100%;
&.red-ui-editor-text-container-toolbar {
@@ -302,7 +286,7 @@ button.red-ui-button-small
#red-ui-editor-config-scope-warning {
display: inline-block;
margin-right: 5px;
color: var(--red-ui-text-color-warning);
color: $text-color-warning;
vertical-align: middle;
}
#red-ui-editor-config-scope {
@@ -358,18 +342,18 @@ button.red-ui-button-small
padding: 20px 20px 10px;
&:last-child {
padding-top: 60px;
background: var(--red-ui-primary-background);
background: $primary-background;
}
}
}
.red-ui-editor-type-markdown-panel-preview {
padding: 10px;
border:1px solid var(--red-ui-secondary-border-color);
border:1px solid $secondary-border-color;
border-radius:5px;
height: calc(100% - 21px);
overflow-y: auto;
background: var(--red-ui-secondary-background);
overflow-y: scroll;
background: $secondary-background;
}
#red-ui-clipboard-hidden {
@@ -402,7 +386,7 @@ button.red-ui-button-small
span {
padding-left: 50px;
width: 100px;
color: var(--red-ui-secondary-text-color);
color: $secondary-text-color;
}
}
@@ -427,14 +411,14 @@ button.red-ui-button.red-ui-editor-node-appearance-button {
.red-ui-group-layout-picker {
padding: 5px;
background: var(--red-ui-secondary-background);
background: $secondary-background;
}
.red-ui-group-layout-picker-cell-text {
position: absolute;
width: 14px;
height: 2px;
border-top: 2px solid var(--red-ui-secondary-text-color);
border-bottom: 2px solid var(--red-ui-secondary-text-color);
border-top: 2px solid $secondary-text-color;
border-bottom: 2px solid $secondary-text-color;
margin: 2px;
&.red-ui-group-layout-text-pos-nw { top: 0; left: 0; }
@@ -451,7 +435,7 @@ button.red-ui-button.red-ui-editor-node-appearance-button {
background-color: #FFF;
background-size: 100% 100%;
background-position: 0 0, 50% 50%;
background-image: linear-gradient(45deg, transparent 45%, var(--red-ui-secondary-border-color) 45%, var(--red-ui-secondary-border-color) 55%, transparent 55%, transparent),linear-gradient(-45deg, transparent 45%, var(--red-ui-secondary-border-color) 45%, var(--red-ui-secondary-border-color) 55%, transparent 55%, transparent);
background-image: linear-gradient(45deg, transparent 45%, $secondary-border-color 45%, $secondary-border-color 55%, transparent 55%, transparent),linear-gradient(-45deg, transparent 45%, $secondary-border-color 45%, $secondary-border-color 55%, transparent 55%, transparent);
border: none;
}
}
@@ -475,17 +459,17 @@ button.red-ui-group-layout-picker-none {
width: 100%;
margin-bottom: 0;
border: none;
border-bottom: 1px solid var(--red-ui-form-input-border-color);
border-bottom: 1px solid $form-input-border-color;
}
small {
color: var(--red-ui-secondary-text-color);
color: $secondary-text-color;
margin-left: 5px;
margin-right: 4px;
display: inline-block;
min-width: 35px;
text-align: right;
}
background: var(--red-ui-primary-background);
background: $primary-background;
}
.red-ui-editor-node-appearance-button {
.red-ui-search-result-node {
@@ -496,7 +480,7 @@ button.red-ui-group-layout-picker-none {
padding: 0;
border-style: solid;
border-width: 1px;
border-color: var(--red-ui-secondary-border-color);
border-color: $secondary-border-color;
}
.red-ui-color-picker-swatch {
position: absolute;
@@ -509,7 +493,7 @@ button.red-ui-group-layout-picker-none {
background-color: #FFF;
background-size: 100% 100%;
background-position: 0 0, 50% 50%;
background-image: linear-gradient(45deg, transparent 45%, var(--red-ui-secondary-border-color) 45%, var(--red-ui-secondary-border-color) 55%, transparent 55%, transparent),linear-gradient(-45deg, transparent 45%, var(--red-ui-secondary-border-color) 45%, var(--red-ui-secondary-border-color) 55%, transparent 55%, transparent)
background-image: linear-gradient(45deg, transparent 45%, $secondary-border-color 45%, $secondary-border-color 55%, transparent 55%, transparent),linear-gradient(-45deg, transparent 45%, $secondary-border-color 45%, $secondary-border-color 55%, transparent 55%, transparent)
}
.red-ui-search-result-node .red-ui-color-picker-cell-none {
border-radius: 4px;
@@ -536,7 +520,7 @@ button.red-ui-group-layout-picker-none {
top:0;right:0;left:0;bottom:0;
background-image:linear-gradient(90deg, transparent 0%, #f00 100%);
background-size: 100% 100%;
border: 1px solid var(--red-ui-primary-border-color);
border: 1px solid $primary-border-color;
}
div.red-ui-button-small.red-ui-color-picker-opacity-slider-handle {
@@ -547,9 +531,9 @@ div.red-ui-button-small.red-ui-color-picker-opacity-slider-handle {
width: 10px;
height: 22px;
padding: 0;
border: 1px solid var(--red-ui-primary-border-color);
border: 1px solid $primary-border-color;
border-radius: 1px;
background: var(--red-ui-secondary-background);
background: $secondary-background;
box-sizing: border-box;
}
.red-ui-icon-picker {
@@ -562,15 +546,15 @@ div.red-ui-button-small.red-ui-color-picker-opacity-slider-handle {
.red-ui-icon-list {
width: 308px;
height: 200px;
overflow-y: auto;
overflow-y: scroll;
line-height: 0px;
position: relative;
&.red-ui-icon-list-dark {
.red-ui-palette-icon-fa {
color: var(--red-ui-secondary-text-color);
color: $secondary-text-color;
}
.red-ui-palette-icon-container {
background: var(--red-ui-secondary-background);
background: $secondary-background;
border-radius: 4px;
}
}
@@ -583,10 +567,10 @@ div.red-ui-button-small.red-ui-color-picker-opacity-slider-handle {
border-radius: 4px;
&:hover {
background: var(--red-ui-list-item-background-hover);
background: $list-item-background-hover;
}
&.selected {
background: var(--red-ui-list-item-background-selected);
background: $list-item-background-selected;
.red-ui-search-result-node {
// border-color: white;
}
@@ -597,22 +581,22 @@ div.red-ui-button-small.red-ui-color-picker-opacity-slider-handle {
}
}
.red-ui-icon-list-module {
background: var(--red-ui-palette-header-background);
background: $palette-header-background;
font-size: 0.9em;
padding: 3px;
color: var(--red-ui-secondary-text-color);
color: $secondary-text-color;
clear: both;
i {
margin-right: 5px;
}
}
.red-ui-icon-meta {
border-top: 1px solid var(--red-ui-secondary-border-color);
background: var(--red-ui-tertiary-background);
border-top: 1px solid $secondary-border-color;
background: $tertiary-background;
height: 24px;
span {
padding: 4px;
color: var(--red-ui-secondary-text-color);
color: $secondary-text-color;
font-size: 0.9em;
line-height: 24px;
}
@@ -630,7 +614,7 @@ div.red-ui-button-small.red-ui-color-picker-opacity-slider-handle {
.red-ui-editor-type-json-editor {
height: calc(100% - 10px);
.red-ui-treeList-container {
background: var(--red-ui-secondary-background);
background: $secondary-background;
}
.red-ui-treeList-label {
padding-top: 0;
@@ -647,7 +631,7 @@ div.red-ui-button-small.red-ui-color-picker-opacity-slider-handle {
vertical-align: middle;
}
&:hover, &:hover .red-ui-treeList-sublabel-text {
background: var(--red-ui-secondary-background-disabled);
background: $secondary-background-disabled;
.red-ui-editor-type-json-editor-item-gutter {
> span, > button {
display: inline-block;
@@ -656,11 +640,11 @@ div.red-ui-button-small.red-ui-color-picker-opacity-slider-handle {
}
&.selected {
.red-ui-editor-type-json-editor-item-gutter {
background: var(--red-ui-secondary-background-hover);
background: $secondary-background-hover;
}
&:hover {
.red-ui-editor-type-json-editor-item-gutter {
background: var(--red-ui-secondary-background-selected);
background: $secondary-background-selected;
}
}
}
@@ -698,13 +682,9 @@ div.red-ui-button-small.red-ui-color-picker-opacity-slider-handle {
border: 2px solid rgba(0,0,0,0);
border-radius: 3px;
&:not(.red-ui-editor-type-json-editor-label-array-key):hover {
border-color: var(--red-ui-list-item-background-hover);
border-color: $list-item-background-hover;
border-style: dashed;
}
&.readonly {
cursor: pointer;
pointer-events: none;
}
}
.red-ui-editor-type-json-editor-item-gutter {
width: 48px;
@@ -712,8 +692,8 @@ div.red-ui-button-small.red-ui-color-picker-opacity-slider-handle {
height: 100%;
line-height: 35px;
color: var(--red-ui-tertiary-text-color);
background: var(--red-ui-secondary-background-disabled);
color: $tertiary-text-color;
background: $secondary-background-disabled;
> span {
display: inline-block;
height: 35px;
@@ -724,10 +704,6 @@ div.red-ui-button-small.red-ui-color-picker-opacity-slider-handle {
> span, > button {
display: none;
}
&.readonly {
cursor: pointer;
pointer-events: none;
}
}
@@ -755,7 +731,7 @@ button.red-ui-toggleButton.toggle {
}
>div:first-child {
font-size: 0.9em;
color: var(--red-ui-tertiary-text-color);
color: $tertiary-text-color;
margin: 3px 0 -4px;
>div {
padding-left: 3px;
@@ -767,15 +743,15 @@ button.red-ui-toggleButton.toggle {
line-height: 30px;
display: inline-block;
box-sizing: border-box;
// border-left: 2px dashed var(--red-ui-secondary-border-color);
// border-bottom: 2px dashed var(--red-ui-secondary-border-color);
// border: 1px dashed var(--red-ui-secondary-border-color);
// border-left: 2px dashed $secondary-border-color;
// border-bottom: 2px dashed $secondary-border-color;
// border: 1px dashed $secondary-border-color;
border-right: none;
&:not(:first-child) {
padding: 3px;
}
// &:last-child {
// border-right: 1px dashed var(--red-ui-secondary-border-color);
// border-right: 1px dashed $secondary-border-color;
// }
.placeholder-input {
position: relative;
@@ -800,8 +776,8 @@ button.red-ui-toggleButton.toggle {
height: 100%;
width: 20px;
text-align:center;
border-right: 1px solid var(--red-ui-secondary-border-color);
background: var(--red-ui-tertiary-background);
border-right: 1px solid $secondary-border-color;
background: $tertiary-background;
}
}
input[type="checkbox"] {
@@ -817,13 +793,13 @@ button.red-ui-toggleButton.toggle {
.red-ui-editableList-item-handle {
position:relative;
top: 0px;
color: var(--red-ui-tertiary-text-color);
color: $tertiary-text-color;
}
}
>div:nth-child(2) {
margin: 4px;
height: 32px;
border: 1px dashed var(--red-ui-secondary-border-color);
border: 1px dashed $secondary-border-color;
text-align: center;
a {
display: block;
@@ -831,7 +807,7 @@ button.red-ui-toggleButton.toggle {
height: 100%;
line-height: 32px;
&:hover {
background: var(--red-ui-secondary-background-hover);
background: $secondary-background-hover;
}
i {
height: 100%;
@@ -851,7 +827,7 @@ button.red-ui-toggleButton.toggle {
span.red-ui-editor-subflow-env-lang-icon {
position: absolute;
display: inline-block;
background: var(--red-ui-secondary-background);
background: $secondary-background;
opacity: 0.8;
width: 20px;
line-height: 32px;
@@ -864,12 +840,12 @@ span.red-ui-editor-subflow-env-lang-icon {
}
.red-ui-editor-subflow-env-input-type {
background: var(--red-ui-secondary-background);
background: $secondary-background;
height: 100%;
box-sizing: border-box;
}
.red-ui-editor-subflow-env-input-type-placeholder {
color: var(--red-ui-tertiary-text-color);
color: $tertiary-text-color;
padding-left: 4px;
}
@@ -886,7 +862,7 @@ span.red-ui-editor-subflow-env-lang-icon {
// border-top: none;
// }
// &.ui-sortable-helper {
// border: 2px dashed var(--red-ui-secondary-border-color);
// border: 2px dashed $secondary-border-color;
// .red-ui-editableList-item-content {
// >div {
// border: none;
@@ -901,15 +877,15 @@ span.red-ui-editor-subflow-env-lang-icon {
// >div>div {
// display: inline-block;
// box-sizing: border-box;
// border-left: 1px dashed var(--red-ui-secondary-border-color);
// border-bottom: 1px dashed var(--red-ui-secondary-border-color);
// border-left: 1px dashed $secondary-border-color;
// border-bottom: 1px dashed $secondary-border-color;
// }
// >div:first-child {
// font-size: 0.9em;
// display: grid;
// grid-template-columns: 25px auto 20px;
// >div {
// border-top: 1px dashed var(--red-ui-secondary-border-color);
// border-top: 1px dashed $secondary-border-color;
// padding: 1px;
// }
// >div:nth-child(3) {
@@ -929,9 +905,9 @@ span.red-ui-editor-subflow-env-lang-icon {
// // line-height: 30px;
// // box-sizing: border-box;
// //
// // border-left: 2px dashed var(--red-ui-secondary-border-color);
// // border-left: 2px dashed $secondary-border-color;
// border-top: none;
// // border-bottom: 2px dashed var(--red-ui-secondary-border-color);
// // border-bottom: 2px dashed $secondary-border-color;
// &:not(:first-child) {
// padding: 6px 3px;
// }
@@ -963,7 +939,7 @@ span.red-ui-editor-subflow-env-lang-icon {
// height: 100%;
// line-height: 45px;
// &:hover {
// background: var(--red-ui-secondary-background-hover);
// background: $secondary-background-hover;
// }
// }
// }
@@ -993,11 +969,11 @@ span.red-ui-editor-subflow-env-lang-icon {
// }
.red-ui-editor-subflow-ui-edit-panel {
padding-bottom: 3px;
background: var(--red-ui-primary-background);
background: $primary-background;
.red-ui-editableList-border {
border: none;
border-radius: 0;
border-bottom: 1px solid var(--red-ui-secondary-border-color);
border-bottom: 1px solid $secondary-border-color;
}
.red-ui-editableList-container {
}
@@ -1005,10 +981,10 @@ span.red-ui-editor-subflow-env-lang-icon {
margin-left: 2px;
}
.red-ui-editableList-header {
background: var(--red-ui-primary-background);
background: $primary-background;
display: grid;
grid-template-columns: 50% 50%;
color: var(--red-ui-secondary-text-color);
color: $secondary-text-color;
div:first-child {
padding-left: 23px;
}
@@ -1019,7 +995,7 @@ span.red-ui-editor-subflow-env-lang-icon {
.red-ui-editableList-container {
padding: 0 1px;
li {
background: var(--red-ui-secondary-background);
background: $secondary-background;
// border-bottom: none;
padding: 0;
.red-ui-editableList-item-content {
@@ -1034,14 +1010,14 @@ span.red-ui-editor-subflow-env-lang-icon {
margin-bottom: 0;
border:none;
width: 100%;
border-right: 1px solid var(--red-ui-secondary-border-color);
border-right: 1px solid $secondary-border-color;
border-radius: 0;
&:focus {
box-shadow: 0 0 0 1px inset var(--red-ui-form-input-focus-color);
box-shadow: 0 0 0 1px inset $form-input-focus-color;
}
&:first-child {
border-left: 1px solid var(--red-ui-secondary-border-color);
border-left: 1px solid $secondary-border-color;
}
}
button.red-ui-typedInput-type-select, button.red-ui-typedInput-option-expand, button.red-ui-typedInput-option-trigger {
@@ -1131,7 +1107,7 @@ span.red-ui-editor-subflow-env-lang-icon {
border-top-left-radius: 4px;
border-top-right-radius: 4px;
background: var(--red-ui-tertiary-background);
background: $tertiary-background;
padding: 0;
>div {
display: grid;

View File

@@ -16,14 +16,14 @@
.nr-ui-view-lasso {
stroke-width: 1px;
stroke: var(--red-ui-view-lasso-stroke);
fill: var(--red-ui-view-lasso-fill);
stroke: $view-lasso-stroke;
fill: $view-lasso-fill;
stroke-dasharray: 10 5;
}
.nr-ui-view-slice {
stroke-width: 1px;
stroke: var(--red-ui-view-lasso-stroke);
stroke: $view-lasso-stroke;
fill: none;
stroke-dasharray: 10 5;
}
@@ -33,11 +33,11 @@
font-style: italic;
}
.red-ui-flow-node-label-white {
fill: var(--red-ui-view-background) !important;
fill: $view-background !important;
}
.red-ui-flow-node-label {
stroke-width: 0;
fill: var(--red-ui-node-label-color);
fill: $node-label-color;
font-size: 14px;
pointer-events: none;
-webkit-touch-callout: none;
@@ -54,7 +54,7 @@
.red-ui-flow-port-label {
stroke-width: 0;
fill: var(--red-ui-node-port-label-color);
fill: $node-port-label-color;
font-size: 16px;
dominant-baseline: middle;
text-anchor: middle;
@@ -65,7 +65,7 @@
.red-ui-flow-node {
stroke: var(--red-ui-node-border);
stroke: $node-border;
cursor: move;
stroke-width: 1;
}
@@ -80,7 +80,7 @@
opacity: 0.9;
.red-ui-flow-node {
stroke-width: 2;
stroke: var(--red-ui-node-selected-color) !important;
stroke: $node-selected-color !important;
stroke-dasharray: 10, 4;
}
}
@@ -95,53 +95,53 @@
}
&.red-ui-flow-group-active-hovered:not(.red-ui-flow-group-hovered) {
.red-ui-flow-group-outline-select {
stroke: var(--red-ui-link-link-color);
stroke: $link-link-color;
}
}
}
.red-ui-flow-group-outline {
fill: none;
stroke: var(--red-ui-node-selected-color);
stroke: $node-selected-color;
stroke-opacity: 0;
stroke-width: 12;
pointer-events: stroke;
}
.red-ui-flow-group-outline-select {
fill: none;
stroke: var(--red-ui-node-selected-color);
stroke: $node-selected-color;
pointer-events: stroke;
stroke-opacity: 0;
stroke-width: 3;
&.red-ui-flow-group-outline-select-background {
stroke: var(--red-ui-view-background);
stroke: $view-background;
stroke-width: 6;
}
}
.red-ui-flow-group-body {
pointer-events: none;
fill: var(--red-ui-group-default-fill);
fill-opacity: var(--red-ui-group-default-fill-opacity);
fill: $group-default-fill;
fill-opacity: $group-default-fill-opacity;
stroke-width: 2;
stroke: var(--red-ui-group-default-stroke);
stroke-opacity: var(--red-ui-group-default-stroke-opacity);
stroke: $group-default-stroke;
stroke-opacity: $group-default-stroke-opacity;
}
.red-ui-flow-group-label {
@include disable-selection;
fill: var(--red-ui-group-default-label-color);
fill: $group-default-label-color;
}
.red-ui-flow-node-unknown {
stroke-dasharray:10,4;
stroke: var(--red-ui-node-border-unknown);
stroke: $node-border-unknown;
}
.red-ui-flow-node-placeholder {
stroke-dasharray:10,4;
stroke: var(--red-ui-node-border-placeholder);
fill: var(--red-ui-node-background-placeholder);
stroke: $node-border-placeholder;
fill: $node-background-placeholder;
opacity: 0.5;
stroke-width: 2;
}
@@ -152,19 +152,19 @@
.fa-lg {
@include disable-selection;
stroke: none;
fill: var(--red-ui-node-icon-color);
fill: $node-icon-color;
text-anchor: middle;
font-family: FontAwesome;
}
}
.red-ui-flow-node-icon-shade {
stroke: none;
fill: var(--red-ui-node-icon-background-color-fill);
fill-opacity: var(--red-ui-node-icon-background-color-opacity);
fill: $node-icon-background-color-fill;
fill-opacity: $node-icon-background-color-opacity;
}
.red-ui-flow-node-icon-shade-border {
stroke-opacity: var(--red-ui-node-icon-border-color-opacity);
stroke: var(--red-ui-node-icon-border-color);
stroke-opacity: $node-icon-border-color-opacity;
stroke: $node-icon-border-color;
stroke-width: 1;
}
@@ -176,39 +176,32 @@
cursor: default;
}
}
&.red-ui-flow-node-button-stopped {
opacity: 0.4;
.red-ui-flow-node-button-button {
cursor: default;
pointer-events: none;
}
}
}
.red-ui-flow-node-button-button {
cursor: pointer;
}
.red-ui-flow-node-button-background {
fill: var(--red-ui-node-background-placeholder);
fill: $node-background-placeholder;
}
.red-ui-flow-port {
stroke: var(--red-ui-node-border);
stroke: $node-border;
stroke-width: 1;
fill: var(--red-ui-node-port-background);
fill: $node-port-background;
cursor: crosshair;
}
.red-ui-flow-node-error {
fill: var(--red-ui-node-status-error-background);
stroke: var(--red-ui-node-status-error-border);
fill: $node-status-error-background;
stroke: $node-status-error-border;
stroke-width:1px;
cursor: default;
stroke-linejoin: round;
stroke-linecap: round;
}
.red-ui-flow-node-changed {
fill: var(--red-ui-node-status-changed-background);
stroke: var(--red-ui-node-status-changed-border);
fill: $node-status-changed-background;
stroke: $node-status-changed-border;
cursor: default;
stroke-width:1px;
stroke-linejoin: round;
@@ -221,13 +214,13 @@ g.red-ui-flow-node-selected {
}
.red-ui-flow-node,.red-ui-flow-subflow-port {
stroke-width: 2;
stroke: var(--red-ui-node-selected-color) !important;
stroke: $node-selected-color !important;
}
}
.red-ui-flow-node-highlighted {
border-color: var(--red-ui-node-selected-color) !important;
border-color: $node-selected-color !important;
border-style: dashed !important;
stroke: var(--red-ui-node-selected-color);
stroke: $node-selected-color;
stroke-width: 3;
stroke-dasharray: 8, 4;
}
@@ -243,7 +236,7 @@ g.red-ui-flow-node-selected {
.red-ui-flow-link-line {
stroke-dasharray: 10,8 !important;
stroke-width: 2 !important;
stroke: var(--red-ui-link-disabled-color);
stroke: $link-disabled-color;
}
.red-ui-flow-port {
fill-opacity: 1;
@@ -261,7 +254,7 @@ g.red-ui-flow-node-selected {
&.red-ui-flow-link-line {
stroke-dasharray: 10,8 !important;
stroke-width: 2 !important;
stroke: var(--red-ui-link-disabled-color);
stroke: $link-disabled-color;
}
.red-ui-flow-port {
fill-opacity: 1;
@@ -270,49 +263,49 @@ g.red-ui-flow-node-selected {
}
@each $current-color in red green yellow blue grey gray {
.red-ui-flow-node-status-dot-#{""+$current-color} {
fill: var(--red-ui-node-status-colors-#{"" + $current-color});
stroke: var(--red-ui-node-status-colors-#{"" + $current-color});
fill: map-get($node-status-colors,$current-color);
stroke: map-get($node-status-colors,$current-color);
}
.red-ui-flow-node-status-ring-#{""+$current-color} {
fill: var(--red-ui-view-background);
stroke: var(--red-ui-node-status-colors-#{"" + $current-color});
fill: $view-background;
stroke: map-get($node-status-colors,$current-color);
}
}
.red-ui-flow-node-status-label {
@include disable-selection;
stroke-width: 0;
fill: var(--red-ui-secondary-text-color);
fill: $secondary-text-color;
font-size:9pt;
text-anchor:start;
}
.red-ui-flow-port-hovered {
stroke: var(--red-ui-port-selected-color);
fill: var(--red-ui-port-selected-color);
stroke: $port-selected-color;
fill: $port-selected-color;
}
.red-ui-flow-subflow-port {
fill: var(--red-ui-node-background-placeholder);
stroke: var(--red-ui-node-border);
fill: $node-background-placeholder;
stroke: $node-border;
}
.red-ui-flow-drag-line {
stroke: var(--red-ui-node-selected-color) !important;
stroke: $node-selected-color !important;
stroke-width: 3;
fill: none;
pointer-events: none;
}
.red-ui-flow-link-line {
stroke: var(--red-ui-link-color);
stroke: $link-color;
stroke-width: 3;
fill: none;
pointer-events: none;
}
.red-ui-flow-link-link {
stroke-width: 2;
stroke: var(--red-ui-link-link-color);
stroke: $link-link-color;
fill: none;
stroke-dasharray: 25,4;
}
@@ -321,19 +314,19 @@ g.red-ui-flow-node-selected {
}
.red-ui-flow-link-port {
fill: var(--red-ui-node-link-port-background);
stroke: var(--red-ui-link-link-color);
fill: $node-link-port-background;
stroke: $link-link-color;
stroke-width: 1;
}
.red-ui-flow-link-group-active .red-ui-flow-link-port {
stroke: var(--red-ui-link-link-active-color);
stroke: $link-link-active-color;
}
.red-ui-flow-link-group:hover {
cursor: pointer;
}
.red-ui-flow-link-outline {
stroke: var(--red-ui-view-background);
stroke: $view-background;
stroke-opacity: 0.4;
stroke-width: 5;
cursor: crosshair;
@@ -341,7 +334,7 @@ g.red-ui-flow-node-selected {
pointer-events: none;
}
.red-ui-flow-link-background {
stroke: var(--red-ui-view-background);
stroke: $view-background;
opacity: 0;
stroke-width: 20;
cursor: crosshair;
@@ -352,10 +345,10 @@ g.red-ui-flow-node-selected {
}
g.red-ui-flow-link-selected path.red-ui-flow-link-line {
stroke: var(--red-ui-node-selected-color);
stroke: $node-selected-color;
}
g.red-ui-flow-link-unknown path.red-ui-flow-link-line {
stroke: var(--red-ui-link-unknown-color);
stroke: $link-unknown-color;
stroke-width: 2;
stroke-dasharray: 10, 4;
}
@@ -371,67 +364,18 @@ g.red-ui-flow-link-unknown path.red-ui-flow-link-line {
pointer-events: none;
path:first-child {
fill: var(--red-ui-popover-background);
stroke: var(--red-ui-popover-background);
fill: $popover-background;
stroke: $popover-background;
stroke-width: 1;
}
}
.red-ui-flow-port-tooltip-label {
stroke-width: 0;
fill: var(--red-ui-popover-color);
font-family: var(--red-ui-primary-font);
fill: $popover-color;
font-family: $primary-font;
font-size: 12px;
pointer-events: none;
-webkit-touch-callout: none;
white-space: pre;
@include disable-selection;
}
.red-ui-flow-junction-dragging {
.red-ui-flow-junction-background {
background: red !important
}
}
.red-ui-flow-junction:not(.red-ui-flow-junction-dragging):hover {
.red-ui-flow-junction-background {
transform: scale(1.4);
stroke-width: 0.6;
}
.red-ui-flow-junction-port {
opacity: 1;
pointer-events: auto;
}
.red-ui-flow-junction-port-input {
transform: translate(-10px,0)
}
.red-ui-flow-junction-port-output {
transform: translate(10px,0)
}
}
.red-ui-flow-junction-port {
stroke: var(--red-ui-node-border);
stroke-width: 1;
fill: var(--red-ui-node-port-background);
cursor: crosshair;
transition: transform 0.1s;
opacity: 0;
pointer-events: none;
}
.red-ui-flow-junction-background {
stroke: var(--red-ui-node-border);
stroke-width: 1;
fill: var(--red-ui-node-port-background);
cursor: crosshair;
transform: scale(1);
transition: transform 0.1s;
&:hover {
}
}
.red-ui-flow-junction-hovered {
stroke: var(--red-ui-port-selected-color);
fill: var(--red-ui-port-selected-color);
}
.red-ui-flow-junction.selected .red-ui-flow-junction-background {
stroke: var(--red-ui-port-selected-color);
// fill: var(--red-ui-port-selected-color);
}

View File

@@ -99,13 +99,13 @@
margin-bottom: 20px;
font-size: 21px;
line-height: 40px;
color: var(--red-ui-tertiary-text-color);
color: $tertiary-text-color;
border: 0;
border-bottom: 1px solid var(--red-ui-secondary-border-color);
border-bottom: 1px solid $secondary-border-color;
}
legend small {
color: var(--red-ui-tertiary-text-color);
color: $tertiary-text-color;
}
@@ -125,7 +125,7 @@
button,
select,
textarea {
font-family: var(--red-ui-primary-font);
font-family: $primary-font;
}
label {
@@ -159,7 +159,7 @@
margin-bottom: 10px;
font-size: 14px;
line-height: 20px;
color: var(--red-ui-form-text-color);
color: $form-text-color;
vertical-align: middle;
border-radius: 4px;
}
@@ -193,8 +193,8 @@
div[contenteditable="true"],
.uneditable-input,
.placeholder-input {
background-color: var(--red-ui-form-input-background);
border: 1px solid var(--red-ui-form-input-border-color);
background-color: $form-input-background;
border: 1px solid $form-input-border-color;
}
textarea:focus,
@@ -214,7 +214,7 @@
input[type="color"]:focus,
div[contenteditable="true"]:focus,
.uneditable-input:focus {
border-color: var(--red-ui-form-input-focus-color);
border-color: $form-input-focus-color;
outline: 0;
outline: thin dotted \9;
}
@@ -245,8 +245,8 @@
select {
width: 220px;
background-color: var(--red-ui-form-input-background);
border: 1px solid var(--red-ui-form-input-border-color);
background-color: $form-input-background;
border: 1px solid $form-input-border-color;
}
select[multiple],
@@ -258,16 +258,16 @@
input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus {
outline: 2px auto var(--red-ui-form-input-focus-color);
outline: 2px auto $form-input-focus-color;
outline-offset: -3px;
}
.uneditable-input,
.uneditable-textarea {
color: var(--red-ui-form-text-color-disabled);
color: $form-text-color-disabled;
cursor: not-allowed;
background-color: var(--red-ui-form-input-background-disabled);
border-color: var(--red-ui-form-input-border-color);
background-color: $form-input-background-disabled;
border-color: $form-input-border-color;
}
.uneditable-input {
@@ -282,19 +282,19 @@
input:-moz-placeholder,
textarea:-moz-placeholder {
color: var(--red-ui-form-placeholder-color);
color: $form-placeholder-color;
}
input:-ms-input-placeholder,
div[contenteditable="true"]:-ms-input-placeholder,
textarea:-ms-input-placeholder {
color: var(--red-ui-form-placeholder-color);
color: $form-placeholder-color;
}
input::-webkit-input-placeholder,
div[contenteditable="true"]::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
color: var(--red-ui-form-placeholder-color);
color: $form-placeholder-color;
}
.radio,
@@ -384,7 +384,7 @@
}
label.disabled {
color: var(--red-ui-form-text-color-disabled);
color: $form-text-color-disabled;
cursor: default;
}
@@ -395,8 +395,8 @@
select[readonly],
textarea[readonly] {
cursor: not-allowed;
color: var(--red-ui-form-text-color-disabled);
background-color: var(--red-ui-form-input-background-disabled);
color: $form-text-color-disabled;
background-color: $form-input-background-disabled;
}
input[type="radio"][disabled],
@@ -410,21 +410,21 @@
div[contenteditable="true"]:invalid,
textarea:invalid,
select:invalid {
border-color: var(--red-ui-form-input-border-error-color);
border-color: $form-input-border-error-color;
}
input:focus:invalid,
div[contenteditable="true"]:focus:invalid,
textarea:focus:invalid,
select:focus:invalid {
border-color: var(--red-ui-form-input-border-error-color);
border-color: $form-input-border-error-color;
}
input:focus:invalid:focus,
div[contenteditable="true"]:focus:invalid:focus,
textarea:focus:invalid:focus,
select:focus:invalid:focus {
border-color: var(--red-ui-form-input-border-error-color);
border-color: $form-input-border-error-color;
}
.input-append,
@@ -488,8 +488,8 @@
font-weight: normal;
line-height: 20px;
text-align: center;
background-color: var(--red-ui-form-button-background);
border: 1px solid var(--red-ui-form-input-border-color);
background-color: $form-button-background;
border: 1px solid $form-input-border-color;
}
.input-append .add-on,

View File

@@ -24,10 +24,10 @@
left: 0;
width: 100%;
height: 40px;
background: var(--red-ui-header-background);
background: $header-background;
box-sizing: border-box;
padding: 0px 0px 0px 20px;
color: var(--red-ui-header-menu-color);
color: $header-menu-color;
font-size: 14px;
span.red-ui-header-logo {
@@ -81,17 +81,17 @@
font-size: 20px;
padding: 0px 12px;
text-decoration: none;
color: var(--red-ui-header-menu-color);
color: $header-menu-color;
margin: auto 5px;
vertical-align: middle;
border-left: 2px solid var(--red-ui-header-background);
border-right: 2px solid var(--red-ui-header-background);
border-left: 2px solid $header-background;
border-right: 2px solid $header-background;
&:hover {
border-color: var(--red-ui-header-menu-item-hover);
border-color: $header-menu-item-hover;
}
&:active, &.active {
background: var(--red-ui-header-button-background-active);
background: $header-button-background-active;
}
&:focus {
outline: none;
@@ -116,18 +116,18 @@
}
.red-ui-deploy-button {
background: var(--red-ui-deploy-button-background);
color: var(--red-ui-deploy-button-color);
background: $deploy-button-background;
color: $deploy-button-color;
&:hover {
background: var(--red-ui-deploy-button-background-hover);
background: $deploy-button-background-hover;
}
&:focus {
outline: none;
}
&:active {
background: var(--red-ui-deploy-button-background-active);
color: var(--red-ui-deploy-button-color-active);
background: $deploy-button-background-active;
color: $deploy-button-color-active;
}
}
@@ -149,21 +149,21 @@
padding: 4px 12px;
&.disabled {
cursor: default;
background: var(--red-ui-deploy-button-background-disabled);
color: var(--red-ui-deploy-button-color-disabled);
background: $deploy-button-background-disabled;
color: $deploy-button-color-disabled;
.red-ui-deploy-button-content>img {
opacity: 0.3;
}
&+ #red-ui-header-button-deploy-options {
background: var(--red-ui-deploy-button-background-disabled);
color: var(--red-ui-deploy-button-color-active);
background: $deploy-button-background-disabled;
color: $deploy-button-color-active;
}
&+ #red-ui-header-button-deploy-options:hover {
background: var(--red-ui-deploy-button-background-disabled-hover);
background: $deploy-button-background-disabled-hover;
}
&+ #red-ui-header-button-deploy-options:active {
background: var(--red-ui-deploy-button-background-disabled);
background: $deploy-button-background-disabled;
}
}
@@ -174,24 +174,24 @@
.red-ui-deploy-button-group.open {
#red-ui-header-button-deploy-options {
background: var(--red-ui-header-button-background-active) !important;
background: $header-button-background-active !important;
}
}
li.open .button {
background: var(--red-ui-header-button-background-active);
border-color: var(--red-ui-header-button-background-active);
background: $header-button-background-active;
border-color: $header-button-background-active;
}
ul.red-ui-menu-dropdown {
background: var(--red-ui-header-menu-background);
border: 1px solid var(--red-ui-header-menu-background);
background: $header-menu-background;
border: 1px solid $header-menu-background;
width: 260px !important;
margin-top: 0;
li a {
color: var(--red-ui-header-menu-color);
padding: 3px 10px 3px 30px;
color: $header-menu-color;
padding: 3px 10px 3px 40px;
img {
max-width: 100%;
margin-right: 10px;
@@ -199,11 +199,11 @@
border: 3px solid transparent;
}
.red-ui-popover-key {
color: var(--red-ui-header-menu-color-disabled) !important;
border-color: var(--red-ui-header-menu-color-disabled) !important;
color: $header-menu-color-disabled !important;
border-color: $header-menu-color-disabled !important;
}
&.active img {
border: 3px solid var(--red-ui-header-menu-item-border-active);
border: 3px solid $header-menu-item-border-active;
}
span.red-ui-menu-label-container {
@@ -217,9 +217,9 @@
text-indent: 0px;
}
span.red-ui-menu-sublabel {
color: var(--red-ui-header-menu-sublabel-color);
color: $header-menu-sublabel-color;
font-size: 13px;
display: block;
display: inline-block;
text-indent: 0px;
}
}
@@ -228,13 +228,13 @@
> li > a:focus,
> li:hover > a,
> li:focus > a {
background: var(--red-ui-header-menu-item-hover) !important;
background: $header-menu-item-hover !important;
}
li.red-ui-menu-divider {
background: var(--red-ui-headerMenuItemDivider);
background: $headerMenuItemDivider;
}
li.disabled a {
color: var(--red-ui-header-menu-color-disabled);
color: $header-menu-color-disabled;
}
> li.disabled > a:hover,
> li.disabled > a:focus {
@@ -242,8 +242,7 @@
}
}
.red-ui-menu-dropdown-submenu>a:before {
border-right-color: var(--red-ui-headerMenuCaret);
margin-left: -25px !important;
border-right-color: $headerMenuCaret;
}
/* Deploy menu customisations */
@@ -251,7 +250,7 @@
width: 300px !important;
li a {
padding: 10px 30px;
color: var(--red-ui-header-menu-heading-color);
color: $header-menu-heading-color;
span.red-ui-menu-label {
font-size: 16px;
display: inline-block;
@@ -264,7 +263,7 @@
}
/* User menu customisations */
#usermenu-item-username > .red-ui-menu-label {
color: var(--red-ui-header-menu-heading-color);
color: $header-menu-heading-color;
}
#red-ui-header-button-user .user-profile {

View File

@@ -16,27 +16,25 @@
.ui-widget {
font-size: 14px !important;
font-family: var(--red-ui-primary-font);
font-family: $primary-font;
}
.ui-widget input, .ui-widget div[contenteditable="true"], .ui-widget select, .ui-widget textarea, .ui-widget button {
font-size: 14px !important;
font-family: var(--red-ui-primary-font);
font-family: $primary-font;
}
.ui-widget input, .ui-widget div[contenteditable="true"] {
box-shadow: none;
}
.ui-widget.ui-widget-content {
border: 1px solid var(--red-ui-tertiary-border-color);
border: 1px solid $tertiary-border-color;
}
.ui-widget-content {
border: 1px solid var(--red-ui-secondary-border-color);
background: var(--red-ui-secondary-background);
color: var(--red-ui-primary-text-color);
border: 1px solid $secondary-border-color;
}
.ui-widget-header {
color: var(--red-ui-header-text-color);
color: $header-text-color;
}
/* jQuery Theme overrides */
@@ -52,7 +50,7 @@
.ui-dialog {
border-radius: 1px;
background: var(--red-ui-secondary-background);
background: $secondary-background;
padding: 0;
@include component-shadow;
}
@@ -64,20 +62,20 @@
}
.ui-dialog .ui-dialog-titlebar {
padding: 10px;
background: var(--red-ui-primary-background);
background: $primary-background;
border: none;
border-bottom: 1px solid var(--red-ui-primary-border-color);
border-bottom: 1px solid $primary-border-color;
border-radius: 0;
}
.ui-dialog .ui-dialog-buttonpane.ui-widget-content {
background: var(--red-ui-tertiary-background);
background: $tertiary-background;
}
.ui-corner-all {
border-radius: 1px;
}
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
background: var(--red-ui-primary-background);
background: $primary-background;
}
.ui-dialog-no-close .ui-dialog-titlebar-close {
display: none;
@@ -97,8 +95,8 @@
padding: 6px 14px;
margin-right: 8px;
border-radius: 2px;
color: var(--red-ui-workspace-button-color);
background: var(--red-ui-workspace-button-background);
color: $workspace-button-color;
background: $workspace-button-background;
&.leftButton {
float: left;
@@ -109,18 +107,18 @@
}
&.primary {
border-color: var(--red-ui-workspace-button-background-primary);
color: var(--red-ui-workspace-button-color-primary) !important;
background: var(--red-ui-workspace-button-background-primary);
border-color: $workspace-button-background-primary;
color: $workspace-button-color-primary !important;
background: $workspace-button-background-primary;
&:not(.disabled):hover {
border-color: var(--red-ui-workspace-button-background-primary-hover);
background: var(--red-ui-workspace-button-background-primary-hover);
color: var(--red-ui-workspace-button-color-primary) !important;
border-color: $workspace-button-background-primary-hover;
background: $workspace-button-background-primary-hover;
color: $workspace-button-color-primary !important;
}
&.disabled {
border-color: var(--red-ui-form-input-border-color);
color: var(--red-ui-workspace-button-color-disabled) !important;
background: var(--red-ui-workspace-button-background);
border-color: $form-input-border-color;
color: $workspace-button-color-disabled !important;
background: $workspace-button-background;
}
}
&.disabled {
@@ -144,10 +142,10 @@
.ui-spinner {
border-radius: 4px;
padding: 0;
border: 1px solid var(--red-ui-form-input-border-color);
border: 1px solid $form-input-border-color;
}
.ui-spinner input {
background: var(--red-ui-form-input-background);
background: $form-input-background;
margin: 0 17px 0 0;
padding: 6px;
border: none;
@@ -171,18 +169,8 @@
.ui-button,
html .ui-button.ui-state-disabled:hover,
html .ui-button.ui-state-disabled:active {
border: 1px solid var(--red-ui-secondary-border-color);
background: var(--red-ui-form-button-background);
}
.ui-state-default a,
.ui-state-default a:link,
.ui-state-default a:visited,
a.ui-button,
a:link.ui-button,
a:visited.ui-button,
.ui-button{
color: var(--red-ui-primary-text-color);
border: 1px solid $secondary-border-color;
background: $form-button-background;
}
.ui-state-hover,
@@ -192,9 +180,9 @@ a:visited.ui-button,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus,
.ui-button:hover, .ui-button:focus {
border: 1px solid var(--red-ui-secondary-border-color);
background: var(--red-ui-workspace-button-background-hover);
color: var(--red-ui-workspace-button-color-hover);
border: 1px solid $secondary-border-color;
background: $workspace-button-background-hover;
color: $workspace-button-color-hover;
}
.ui-state-active,
@@ -203,10 +191,10 @@ a:visited.ui-button,
a.ui-button:active,
.ui-button:active,
.ui-button.ui-state-active:hover {
border: 1px solid var(--red-ui-secondary-border-color);
background: var(--red-ui-workspace-button-background-active);
border: 1px solid $secondary-border-color;
background: $workspace-button-background-active;
font-weight: normal;
color: var(--red-ui-workspace-button-color-active);
color: $workspace-button-color-active;
}
.ui-state-active .ui-icon, .ui-button:active .ui-icon {

View File

@@ -23,9 +23,9 @@
}
.keyboard-shortcut-list-header {
padding:0 5px 0 5px;
border-bottom: 1px solid var(--red-ui-primary-border-color);
border-bottom: 1px solid $primary-border-color;
div {
color: var(--red-ui-header-text-color) !important;
color: $header-text-color !important;
}
.red-ui-searchBox-container {
width: calc(100% - 20px);
@@ -49,7 +49,7 @@
}
}
li:hover {
background: var(--red-ui-list-item-background-hover);
background: $list-item-background-hover;
}
}
.keyboard-shortcut-entry {
@@ -78,13 +78,13 @@
width: calc(100% - 160px - 100px - 10px);
overflow: hidden;
i {
color: var(--red-ui-tertiary-text-color);
color: $tertiary-text-color;
margin-right: 5px;
}
}
.keyboard-shortcut-entry-scope {
width:100px;
color: var(--red-ui-tertiary-text-color);
color: $tertiary-text-color;
vertical-align: middle;
text-align: right;
}
@@ -94,13 +94,13 @@
}
}
.keyboard-shortcut-entry-unassigned {
color: var(--red-ui-tertiary-text-color);
color: $tertiary-text-color;
.keyboard-shortcut-entry-key {
font-style: italic;
}
}
.keyboard-shortcut-entry-expanded {
background: var(--red-ui-list-item-background-selected);
background: $list-item-background-selected;
.keyboard-shortcut-entry-key {
width: 150px;
}
@@ -115,12 +115,12 @@
}
}
.help-key {
border: 1px solid var(--red-ui-tertiary-border-color);
border: 1px solid $tertiary-border-color;
padding: 4px;
border-radius: 3px;
background: var(--red-ui-tertiary-background);
font-family: var(--red-ui-monospace-font);
box-shadow: var(--red-ui-shade-color 1px 1px 1px);
background: $tertiary-background;
font-family: $monospace-font;
box-shadow: $shade-color 1px 1px 1px;
}
.help-key-block {
white-space: nowrap;

View File

@@ -18,13 +18,13 @@
pre {
margin: 10px 0;
border: none;
color: var(--red-ui-primary-text-color);
color: $primary-text-color;
span {
padding: 5px 0;
}
span.error {
padding: 5px;
border: 1px solid var(--red-ui-form-input-border-error-color);
border: 1px solid $form-input-border-error-color;
margin: 0 1px;
}
}
@@ -52,16 +52,16 @@
.red-ui-clipboard-dialog-tab-clipboard {
textarea {
color: var(--red-ui-secondary-text-color-active) !important;
color: $secondary-text-color-active !important;
resize: none;
width: 100%;
border-radius: 4px;
font-family: var(--red-ui-monospace-font !important);
font-family: $monospace-font !important;
font-size: 13px !important;
height: 100%;
line-height: 1.3em;
padding: 6px 10px;
background: var(--red-ui-clipboard-textarea-background);
background: $clipboard-textarea-background;
}
}
@@ -80,7 +80,7 @@
right: 0;
bottom: 0;
padding: 0;
background: var(--red-ui-form-input-background);
background: $form-input-background;
&>div {
height: 100%;
box-sizing: border-box;
@@ -89,7 +89,7 @@
.red-ui-clipboard-dialog-box {
height: 400px;
position:relative;
border:1px solid var(--red-ui-primary-border-color);
border:1px solid $primary-border-color;
}
#red-ui-clipboard-dialog-export-tab-library-filename {
@@ -111,7 +111,7 @@
.red-ui-clipboard-dialog-tabs-content>div.red-ui-clipboard-dialog-export-tab-library-browser {
height: calc(100% - 60px);
margin-bottom: 13px;
border-bottom: 1px solid var(--red-ui-primary-border-color);
border-bottom: 1px solid $primary-border-color;
box-sizing: border-box;
}
#red-ui-clipboard-dialog-import-tab-library-browser {
@@ -124,7 +124,7 @@
position: relative;
height: 100%;
.red-ui-treeList-container {
background: var(--red-ui-secondary-background);
background: $secondary-background;
border: none;
border-radius: 0;
li {
@@ -149,14 +149,14 @@
#red-ui-library-dialog-save-browser {
height: calc(100% - 60px);
border: 1px solid var(--red-ui-primary-border-color);
border: 1px solid $primary-border-color;
margin-bottom: 10px;
}
#red-ui-library-dialog-load-browser {
// border: 1px solid var(--red-ui-primary-border-color);
// border: 1px solid $primary-border-color;
}
#red-ui-library-dialog-load-panes {
border: 1px solid var(--red-ui-primary-border-color);
border: 1px solid $primary-border-color;
}
@@ -180,15 +180,15 @@
position: relative;
li:not(:first-child) .red-ui-clipboard-dialog-import-conflicts-item-header {
// border-top: 1px solid var(--red-ui-secondary-border-color);
// border-top: 1px solid $secondary-border-color;
}
}
.red-ui-clipboard-dialog-import-conflicts-item-header {
background: var(--red-ui-tertiary-background);
background: $tertiary-background;
& > span:first-child {
color: var(--red-ui-header-text-color);
color: $header-text-color;
padding-left: 4px;
font-size: 12px;
}
@@ -199,7 +199,7 @@
bottom: 0;
right: 0px;
text-align: center;
color: var(--red-ui-form-text-color);
color: $form-text-color;
.form-row & label {
padding: 2px 0;
line-height: 23px;
@@ -210,7 +210,7 @@
height: 100%;
width: 80px;
text-align: center;
border-left: 1px solid var(--red-ui-secondary-border-color);
border-left: 1px solid $secondary-border-color;
}
input[type="checkbox"] {
display: inline-block;
@@ -265,7 +265,7 @@
span:nth-child(3), span:nth-child(4) {
flex-grow: 0;
padding-right: 5px;
color: var(--red-ui-secondary-text-color);
color: $secondary-text-color;
font-size: 0.9em;
}
}

View File

@@ -31,33 +31,33 @@
}
@mixin component-border {
border: 1px solid var(--red-ui-primary-border-color);
border: 1px solid $primary-border-color;
box-sizing: border-box;
}
@mixin reset-a-style {
color: var(--red-ui-workspace-button-color) !important;
background: var(--red-ui-workspace-button-background);
color: $workspace-button-color !important;
background: $workspace-button-background;
text-decoration: none;
&.disabled, &:disabled {
cursor: default;
color: var(--red-ui-workspace-button-color-disabled) !important;
color: $workspace-button-color-disabled !important;
}
&:hover, &:focus {
text-decoration: none;
}
&:not(.disabled):not(:disabled):hover {
color: var(--red-ui-workspace-button-color-hover) !important;
background: var(--red-ui-workspace-button-background-hover);
&:not(.disabled):not(:disabled):hover, {
color: $workspace-button-color-hover !important;
background: $workspace-button-background-hover;
}
&:not(.disabled):not(:disabled):focus {
color: var(--red-ui-workspace-button-color-focus) !important;
color: $workspace-button-color-focus !important;
}
&:not(.disabled):not(:disabled):active {
color: var(--red-ui-workspace-button-color-active) !important;
background: var(--red-ui-workspace-button-background-active);
color: $workspace-button-color-active !important;
background: $workspace-button-background-active;
text-decoration: none;
}
}
@@ -68,14 +68,14 @@
box-sizing: border-box;
display: inline-block;
border: 1px solid var(--red-ui-form-input-border-color);
border: 1px solid $form-input-border-color;
text-align: center;
margin:0;
cursor:pointer;
&.selected:not(.disabled):not(:disabled) {
color: var(--red-ui-workspace-button-color-selected) !important;
background: var(--red-ui-workspace-button-background-active);
color: $workspace-button-color-selected !important;
background: $workspace-button-background-active;
}
.button-group &:not(:first-child) {
border-left: none;
@@ -108,23 +108,23 @@
}
&:focus {
outline: 1px solid var(--red-ui-workspace-button-color-focus-outline);
outline: 1px solid $workspace-button-color-focus-outline;
outline-offset: 1px;
}
&.primary {
border-color: var(--red-ui-workspace-button-background-primary);
color: var(--red-ui-workspace-button-color-primary) !important;
background: var(--red-ui-workspace-button-background-primary);
border-color: $workspace-button-background-primary;
color: $workspace-button-color-primary !important;
background: $workspace-button-background-primary;
&.disabled, &.ui-state-disabled {
background: none;
color: var(--red-ui-workspace-button-color) !important;
border-color: var(--red-ui-form-input-border-color);
color: $workspace-button-color !important;
border-color: $form-input-border-color;
}
&:not(.disabled):not(.ui-button-disabled):hover {
border-color: var(--red-ui-workspace-button-background-primary-hover);
background: var(--red-ui-workspace-button-background-primary-hover);
color: var(--red-ui-workspace-button-color-primary) !important;
border-color: $workspace-button-background-primary-hover;
background: $workspace-button-background-primary-hover;
color: $workspace-button-color-primary !important;
}
}
&.secondary {
@@ -151,7 +151,7 @@
margin-bottom: 1px;
&.selected:not(.disabled):not(:disabled) {
border-bottom-width: 2px;
border-bottom-color: var(--red-ui-form-input-border-selected-color);
border-bottom-color: $form-input-border-selected-color;
margin-bottom: 0;
cursor: default;
}
@@ -166,7 +166,7 @@
padding: 6px 14px;
margin-right: 8px;
&:not(.disabled):hover {
//color: var(--red-ui-workspace-button-color);
//color: $workspace-button-color;
}
&.disabled {
background: none;
@@ -187,8 +187,8 @@
}
@mixin component-footer {
border-top: 1px solid var(--red-ui-primary-border-color);
background: var(--red-ui-primary-background);
border-top: 1px solid $primary-border-color;
background: $primary-background;
text-align: right;
position: absolute;
bottom: 0;
@@ -231,7 +231,7 @@
}
@mixin component-shadow {
box-shadow: 1px 1px 4px var(--red-ui-shadow);
box-shadow: 1px 1px 4px $shadow;
}
@@ -241,7 +241,7 @@
left: 0;
bottom: 0;
right: 0;
background: var(--red-ui-shade-color);
background: $shade-color;
z-index: 5;
}
.red-ui-shade {

View File

@@ -27,10 +27,10 @@
position: relative;
padding: 8px 18px 0px;
margin-bottom: 4px;
box-shadow: 0 1px 1px 1px var(--red-ui-shadow);
background-color: var(--red-ui-secondary-background);
color: var(--red-ui-primary-text-color);
border: 1px solid var(--red-ui-notification-border-default);
box-shadow: 0 1px 1px 1px $shadow;
background-color: $secondary-background;
color: $primary-text-color;
border: 1px solid $notification-border-default;
border-left-width: 16px;
overflow: hidden;
.ui-dialog-buttonset {
@@ -50,13 +50,13 @@
}
.red-ui-notification-success {
border-color: var(--red-ui-notification-border-success);
border-color: $notification-border-success;
}
.red-ui-notification-warning {
border-color: var(--red-ui-notification-border-warning);
border-color: $notification-border-warning;
}
.red-ui-notification-error {
border-color: var(--red-ui-notification-border-error);
border-color: $notification-border-error;
}
.red-ui-notification-compact {

View File

@@ -27,7 +27,7 @@
left:0;
padding: 0;
box-sizing:border-box;
background: var(--red-ui-secondary-background);
background: $secondary-background;
.red-ui-editableList-container {
border: none;
@@ -37,27 +37,27 @@
li {
// border: none;
// border-top: 1px solid var(--red-ui-primary-border-color);
// border-top: 1px solid $primary-border-color;
padding: 0px;
.red-ui-button {
min-width: 60px;
}
.disabled {
// background: var(--red-ui-secondary-background-inactive;//f3f3f3);
// background: $secondary-background-inactive;//f3f3f3;
.red-ui-palette-module-name {
font-style: italic;
color: var(--red-ui-tertiary-text-color);
color: $tertiary-text-color;
}
.red-ui-palette-module-version {
color: var(--red-ui-tertiary-text-color);
color: $tertiary-text-color;
}
.red-ui-palette-module-errors .fa-warning {
opacity: 0.5;
}
ul.red-ui-palette-module-error-list li {
color: var(--red-ui-tertiary-text-color);
color: $tertiary-text-color;
}
@@ -66,7 +66,7 @@
padding: 12px 16px;
}
&:last-child {
// border-bottom: 1px solid var(--red-ui-primary-border-color);
// border-bottom: 1px solid $primary-border-color;
}
}
@@ -79,14 +79,14 @@
bottom:0
}
.red-ui-palette-editor-toolbar {
background: var(--red-ui-primary-background);
background: $primary-background;
box-sizing: border-box;
padding: 8px 10px;
border-bottom: 1px solid var(--red-ui-primary-border-color);
border-bottom: 1px solid $primary-border-color;
text-align: right;
}
.red-ui-palette-module-shade-status {
color: var(--red-ui-secondary-text-color);
color: $secondary-text-color;
}
.red-ui-palette-module-updated {
margin-left: 10px;
@@ -98,7 +98,7 @@
.red-ui-palette-module-description {
margin-left: 20px;
font-size: 0.9em;
color: var(--red-ui-secondary-text-color);
color: $secondary-text-color;
}
.red-ui-palette-module-link {
}
@@ -120,7 +120,7 @@
}
}
.red-ui-palette-module-set {
border:1px solid var(--red-ui-secondary-border-color);
border:1px solid $secondary-border-color;
border-radius: 0;
padding: 5px;
position: relative;
@@ -138,7 +138,7 @@
}
.red-ui-palette-module-type {
color: var(--red-ui-secondary-text-color);
color: $secondary-text-color;
padding-left: 5px;
font-size: 0.9em;
@include enable-selection;
@@ -150,8 +150,8 @@
border-radius: 3px;
vertical-align: middle;
margin-right: 5px;
background: var(--red-ui-primary-background);
border: 1px dashed var(--red-ui-secondary-border-color);
background: $primary-background;
border: 1px dashed $secondary-border-color;
}
.red-ui-palette-module-set-button-group {
position: absolute;
@@ -160,35 +160,35 @@
}
.red-ui-palette-module-set-disabled {
background: var(--red-ui-list-item-background-disabled);
background: $list-item-background-disabled;
.red-ui-palette-module-type {
color: var(--red-ui-secondary-text-color-disabled-active);
color: $secondary-text-color-disabled-active;
}
}
.red-ui-palette-module-more {
padding: 0 !important;
margin-top: 10px;
margin-bottom: 10px;
background: var(--red-ui-tab-background-inactive);
background: $tab-background-inactive;
a {
display: block;
text-align: center;
padding: 12px 8px;
color: var(--red-ui-text-color-code);
color: $text-color-code;
&:hover {
text-decoration: none;
background: var(--red-ui-tab-background-hover);
background: $tab-background-hover;
}
}
}
}
.red-ui-palette-module-meta {
color: var(--red-ui-secondary-text-color);
color: $secondary-text-color;
position: relative;
&.disabled {
color: var(--red-ui-secondary-text-color-disabled);
color: $secondary-text-color-disabled;
}
.fa {
@@ -198,7 +198,7 @@
}
}
.red-ui-palette-module-name {
color: var(--red-ui-primary-text-color);
color: $primary-text-color;
white-space: nowrap;
@include enable-selection;
}
@@ -216,7 +216,7 @@
}
}
.red-ui-palette-module-meta .fa-warning {
color: var(--red-ui-text-color-warning);
color: $text-color-warning;
}
ul.red-ui-palette-module-error-list {
display: inline-block;
@@ -264,9 +264,9 @@ button.red-ui-palette-editor-upload-button {
right: 0;
top: 44px;
padding: 20px;
background: var(--red-ui-secondary-background);
border-bottom: 1px var(--red-ui-secondary-border-color solid);
box-shadow: 1px 1px 4px var(--red-ui-shadow);
background: $secondary-background;
border-bottom: 1px $secondary-border-color solid;
box-shadow: 1px 1px 4px $shadow;
.placeholder-input {
width: calc(100% - 180px);

View File

@@ -20,7 +20,7 @@
top: 0px;
bottom: 0px;
left:0px;
background: var(--red-ui-primary-background);
background: $primary-background;
width: 180px;
text-align: center;
@include disable-selection;
@@ -55,26 +55,26 @@
.red-ui-palette-search {
position: relative;
overflow: hidden;
background: var(--red-ui-secondary-background);
background: $secondary-background;
text-align: center;
height: 35px;
padding: 3px;
border-bottom: 1px solid var(--red-ui-primary-border-color);
border-bottom: 1px solid $primary-border-color;
box-sizing:border-box;
}
.red-ui-palette-category {
border-bottom: 1px solid var(--red-ui-secondary-border-color);
border-bottom: 1px solid $secondary-border-color;
}
.red-ui-palette-content {
background: var(--red-ui-palette-content-background);
background: $palette-content-background;
padding: 3px;
}
.red-ui-palette-header {
position: relative;
background: var(--red-ui-palette-header-background);
color: var(--red-ui-palette-header-color);
background: $palette-header-background;
color: $palette-header-color;
cursor: pointer;
text-align: left;
padding: 9px;
@@ -83,7 +83,7 @@
overflow: hidden;
user-select: none;
&:hover {
background: var(--red-ui-palette-header-background) !important;
background: $palette-header-background !important;
}
}
.red-ui-palette-header > i {
@@ -106,7 +106,7 @@
clear: both;
}
.red-ui-palette-label {
color: var(--red-ui-node-label-color);
color: $node-label-color;
font-size: 13px;
margin: 4px 0 4px 32px;
line-height: 20px;
@@ -121,17 +121,16 @@
.red-ui-palette-node {
// display: inline-block;
cursor: move;
background: var(--red-ui-secondary-background);
background: $secondary-background;
margin: 10px auto;
height: 25px;
border-radius: 5px;
border: 1px solid var(--red-ui-node-border);
border: 1px solid $node-border;
background-position: 5% 50%;
background-repeat: no-repeat;
width: 120px;
background-size: contain;
position: relative;
z-index: 4;
&:not(.red-ui-palette-node-config):not(.red-ui-palette-node-small):first-child {
margin-top: 15px;
}
@@ -141,7 +140,7 @@
}
.red-ui-palette-node:hover {
border-color: transparent;
box-shadow: 0 0 0 2px var(--red-ui-node-selected-color);
box-shadow: 0 0 0 2px $node-selected-color;
}
.red-ui-palette-port {
position: absolute;
@@ -149,11 +148,11 @@
left: -5px;
box-sizing: border-box;
-moz-box-sizing: border-box;
background: var(--red-ui-node-port-background);
background: $node-port-background;
border-radius: 3px;
width: 10px;
height: 10px;
border: 1px solid var(--red-ui-node-border);
border: 1px solid $node-border;
}
.red-ui-palette-port-output {
left:auto;
@@ -161,7 +160,7 @@
}
.red-ui-palette-node:hover .red-ui-palette-port {
background-color: var(--red-ui-node-port-background-hover);
background-color: $node-port-background-hover;
}
.red-ui-palette-icon-container {
position: absolute;
@@ -170,16 +169,14 @@
bottom:0;
left:0;
width: 30px;
border-right: 1px solid var(--red-ui-node-icon-background-color);
border-radius: 4px 0px 0px 4px;
background-color: var(--red-ui-node-icon-background-color);
border-right: 1px solid $node-icon-background-color;
background-color: $node-icon-background-color;
}
.red-ui-palette-icon-container-right {
left: auto;
right: 0;
border-right: none;
border-left: 1px solid var(--red-ui-node-icon-background-color);
border-radius: 0px 4px 4px 0px;
border-left: 1px solid $node-icon-background-color;
}
.red-ui-palette-icon {
display: inline-block;
@@ -192,7 +189,6 @@
.red-ui-search-result-node {
&.red-ui-palette-icon-flow,
&.red-ui-palette-icon-group,
&.red-ui-palette-icon-junction,
&.red-ui-palette-icon-selection {
background: none;
border-color: transparent;
@@ -200,7 +196,7 @@
background: none;
}
.red-ui-palette-icon-fa {
color: var(--red-ui-secondary-text-color);
color: $secondary-text-color;
font-size: 18px;
}
}
@@ -251,12 +247,12 @@
// width: 30px;
// height: 25px;
border-radius: 3px;
border: 1px solid var(--red-ui-node-border);
border: 1px solid $node-border;
background-position: 5% 50%;
background-repeat: no-repeat;
background-size: contain;
position: relative;
background-color: var(--red-ui-node-icon-background-color);
background-color: $node-icon-background-color;
text-align: center;
.red-ui-palette-icon {
@@ -272,7 +268,6 @@
&.red-ui-palette-icon-flow,
&.red-ui-palette-icon-group,
&.red-ui-palette-icon-junction,
&.red-ui-palette-icon-selection {
background: none;
border-color: transparent;
@@ -280,7 +275,7 @@
background: none;
}
.red-ui-palette-icon-fa {
color: var(--red-ui-secondary-text-color);
color: $secondary-text-color;
font-size: 16px;
}
}
@@ -308,7 +303,6 @@
&.red-ui-palette-icon-flow {
margin-top: -2px;
}
&.red-ui-palette-icon-junction .red-ui-palette-icon-fa,
&.red-ui-palette-icon-group .red-ui-palette-icon-fa {
font-size: 14px;
}
@@ -320,5 +314,5 @@
.red-ui-node-label {
white-space: nowrap;
margin-left: 4px;
color: var(--red-ui-secondary-text-color);
color: $secondary-text-color;
}

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