Commit Graph

1064 Commits

Author SHA1 Message Date
Knut Sveidqvist 4ad354a561 #1216 Fix for issue when mermaid freezes the browser tab due to large diagrams 2020-01-25 13:35:11 +01:00
Justin Greywolf 587592449a 1179 Add ability to use generics for members
Created new class to handle parsing of members with regex to handle determining type of member and the different elements within.  Also moved addTSpan in drawClass method to this new file.  Finally, I added a "catch all" section in case something fails in the regex to make sure everything gets formatted correctly.

Added more tests and documentation

updating gitignore

Tired of constantly having to ignore files and stash/pop when switching between branches
2020-01-24 16:01:04 -08:00
Marc Faber d2d4a24229 #487 Set text color for flowchart nodes according to style definitions 2020-01-24 01:24:47 +01:00
Marc Faber c38f053294 #1212 Class definition is not applied to flowchart nodes with links 2020-01-19 18:10:14 +01:00
Knut Sveidqvist 921d274579
Merge pull request #1208 from mermaid-js/feature/Issue-1206_Parsing_Crashing_Browser_In_Class_Diagram
Feature/issue 1206 parsing crashing browser in class diagram
2020-01-15 20:55:21 +01:00
Ashish Jain 99469f8404 #1206 Added test case to verify parsing fails to allow EOF until first '{' is closed 2020-01-15 20:34:41 +01:00
Ashish Jain 417d2c0336 #1206 Added test case to verify parsing fails to allow another '{' until first one is closed 2020-01-15 20:33:23 +01:00
Ashish Jain 2a3de1a090 #1206 Updated the classDiagram JISON to not allow EOF or another '{' until first one is closed 2020-01-15 20:29:13 +01:00
Knut Sveidqvist d9318c5af3 #1205 Adding parsing exception for then an inactive participant is inactivated 2020-01-15 20:27:31 +01:00
Justin Greywolf 0e02cf5c86
Merge pull request #1195 from fgrandel/bug/1193_allow_multiple_relations
fix(#1193): render multiple relations
2020-01-15 09:29:02 -08:00
Knut Sveidqvist 45277affe8
Merge pull request #1204 from GDFaber/bug/1196_keep_flowchart_label_text_when_style_is_applied
Keep flowchart node label text (if already defined) when a style is applied
2020-01-15 18:27:48 +01:00
Knut Sveidqvist c564a843fa
Merge pull request #1202 from GDFaber/bug/1200_unify_regex_for_br_tags
Unify regex for finding <br> tags throughout mermaid
2020-01-15 16:53:06 +01:00
Knut Sveidqvist efa810da91
Merge pull request #1199 from GDFaber/bug/fix_mermaidAPI_configuration_example_in_the_docs
Fix mermaidAPI configuration example in the docs
2020-01-15 16:50:11 +01:00
Knut Sveidqvist c0e1c90497
Merge pull request #1198 from GDFaber/bug/add_docs_and_defaults_for_node_spacing
Add docs and default values for node spacing in mermaidAPI
2020-01-15 16:48:58 +01:00
Marc Faber b1bfdec473 #1196 Keep flowchart node label text (if already defined) when a style is applied 2020-01-14 23:37:30 +01:00
Justin Greywolf 244f423baf
Merge pull request #1194 from fgrandel/bug/1192_relation_cut_off
fix(#1192): relation got cut off
2020-01-14 09:35:00 -08:00
Marc Faber 5493fadc9e #1200 Unify regex for finding <br> tags throughout mermaid 2020-01-13 22:04:47 +01:00
Marc Faber 36f9eca33e Example 2 is not shown in mermaidAPI configuration section of the docs 2020-01-12 14:38:57 +01:00
Marc Faber 4dd90e56b1 Add docs and default values for node spacing in mermaidAPI 2020-01-12 14:09:24 +01:00
Justin Greywolf fa1331ffd5 Fix after removing other code 2020-01-10 10:24:04 -08:00
Justin Greywolf 57b5b9a7a6 Added conditional to fallback to old style 2020-01-10 09:50:21 -08:00
Justin Greywolf 58fbfc3c38 1119 Support method return types
Small refactor to split out logic for determining method display text and style. Updated documentation
Used regex to parse method statements in class diagrams to extract discrete elements to set display appropriately. Added tests and updated docs
2020-01-10 09:50:21 -08:00
Justin Greywolf 0af5e0b795 Address code style issues 2020-01-10 09:50:21 -08:00
Justin Greywolf d7771eb4b6 1119 Add ability to define return type for methods
Updated ClassRenderer to check for `[]` to indicate return type for method. Small refactor to split out logic for determining method display text and style. Updated documentation
2020-01-10 09:50:21 -08:00
Florian Grandel 75890f88fa fix(#1193): render multiple relations 2020-01-09 17:00:34 +01:00
Florian Grandel 9a6b07e1e1 fix(#1192): relation got cut off 2020-01-09 16:24:47 +01:00
Knut Sveidqvist ce02d1dc98
Merge pull request #1190 from mermaid-js/Issue-1092_Mangled_Multiple_Class_Diagrams
#1092 Fix for mangling of multiple classDiagrams
2020-01-08 21:05:42 +01:00
Ashish Jain 48c345a403 #1092 Fix for mangling of multiple classDiagrams 2020-01-08 20:48:57 +01:00
Marc Faber ffbf9f265f #1182: remove "newDagreD3" switch from the flowchart renderer 2020-01-08 20:27:33 +01:00
Knut Sveidqvist 144f65c459
Merge pull request #1176 from GDFaber/feature/1152_flowchart_node_spacing
Feature/Add node spacing to flowchart configuration
2020-01-08 18:16:03 +01:00
Marc Faber 1cfd93640c #743 handle multiline section titles in gantt diagrams 2020-01-08 13:50:58 +01:00
Marc Faber b3934c9788 #1152 add node spacing to flowchart configuration 2020-01-05 22:03:53 +01:00
Knut Sveidqvist 37ae863443
Merge pull request #1170 from jgreywolf/1064-ClickEventInClassDiagram
1064 click event in class diagram
2020-01-05 12:07:34 +01:00
Knut Sveidqvist f57356006d
Merge pull request #1171 from mermaid-js/feature/Issue-1146_Dashed_Line_For_Class_Diagram
Feature/issue 1146 dashed line for class diagram
2020-01-05 12:02:36 +01:00
Justin Greywolf 38097c9095 code style 2020-01-02 11:27:56 -08:00
Justin Greywolf 7f31e624ca Addressing code style issues 2020-01-02 11:24:06 -08:00
Justin Greywolf e6fbfcb1e8 1064 Adding tooltip and function calls to click evens in class diagrams 2020-01-02 11:06:29 -08:00
Ashish Jain 190353785e #1146 Added jest test for dash line (dependecy) parsing 2020-01-02 19:51:25 +01:00
Ashish Jain f2a5d92398 #1146 Added stroke-dasharray style for Dependency relation 2020-01-02 19:29:17 +01:00
Ashish Jain b14c768fa2 #1146 Fix for dashed line (Dependency) support for classDiagram 2020-01-02 19:25:31 +01:00
Knut Sveidqvist 4e6aad5115 #834 Using & as a separator for the multiple nodes 2020-01-02 18:52:50 +01:00
Knut Sveidqvist 7bd1408de0
Merge pull request #1165 from jgreywolf/1064-ClickEventInClassDiagram
1064 click event in class diagram
2020-01-02 08:10:48 -08:00
Justin Greywolf d63eb396e1 Fix code style issues 2020-01-02 07:59:36 -08:00
Knut Sveidqvist a1626927cc
Merge pull request #1136 from keenanjt33/feature/921_callback_params
Gantt: Add support for callback with parameters
2020-01-01 00:29:00 -08:00
Knut Sveidqvist 75e2abe242
Merge pull request #1166 from GDFaber/feature/flowchart_add_cylindric_shape
#1154 Flow diagram DB shape request
2020-01-01 00:24:56 -08:00
Knut Sveidqvist 2db8075e3f
Merge pull request #1163 from GDFaber/bug/891_make_link_clickable_on_the_entire_node
Bug/Clicking on a link only works directly on the node text
2019-12-31 07:58:47 -08:00
Knut Sveidqvist 413876644c
Merge pull request #1162 from sdankel/bug/1060_date_infinite_loop
Fix infinite loop caused by date iteration
2019-12-31 07:57:16 -08:00
Knut Sveidqvist d5e9f2e23e
Merge pull request #1156 from gene1wood/extend_br_tag_regex
Extend the `br` tag regex
2019-12-31 07:56:21 -08:00
Marc Faber bc59d015e6 #1154 Flow diagram DB shape request 2019-12-31 16:30:03 +01:00
Justin Greywolf 2decf94ad0 1064- Add click functionality to class diagrams
modified interaction functionality from flowcharts to work with class diagrams
2019-12-30 17:27:20 -08:00
Christian Klemm 5d7ef149aa
Merge pull request #1161 from wfnuser/fix/typos-in-flowDb
Error typos in flowDb
2019-12-26 16:26:02 +01:00
Marc Faber 7ce0974767 #891 Clicking on a link only works directly on the node text 2019-12-26 15:38:53 +01:00
Sophie Dankel 7b12c7a07d Fix infinite loop caused by date iteration 2019-12-24 19:01:29 -08:00
wfnuser 4eedeebd46 other/typos in flowDb 2019-12-24 16:14:42 +08:00
Gene Wood b4f9dd46a9
Add tests for <br \t> case
This adds tests for the case where
* multiple pieces of whitespace are used
* one of those whitespace characters is a tab
2019-12-23 08:52:15 -08:00
Gene Wood 3abd77a1e6
Extend the `br` tag regex
This extends the `br` tag regex to accommodate an arbitrary amount of
any type of whitespace instead of a single space character, which holds
more closely to the HTML spec[1]

This extends the fix to #702 added in #1153

[1]: http://www.w3.org/TR/REC-xml/#sec-starttags
2019-12-23 08:02:11 -08:00
Knut Sveidqvist d96b79a9ba
Merge pull request #1153 from GDFaber/bug/702_br_tags_in_sequence_diagrams
Bug/702 br tags in sequence diagrams
2019-12-23 10:04:30 +01:00
Marc Faber 233520b797 #702 improve handling of different "br" tag notations for multiline texts in sequence diagrams 2019-12-21 20:39:32 +01:00
Matthew Schott ec742d3180 fix git graph not clearing 2019-12-20 14:48:36 -05:00
Nacho 1bc62cfba4
Merge pull request #1150 2019-12-19 13:45:21 -05:00
erinleck@gmail.com 028d9a2667 changes tick contrast for gantt chart 2019-12-19 09:52:46 -07:00
Knut Sveidqvist a4e7305d52 #834 Adding unit tests and rendering tests 2019-12-18 19:13:56 +01:00
Knut Sveidqvist 5716d163ec
Merge branch 'develop' into other/1143_utilze_browser_console_object_better 2019-12-18 18:41:14 +01:00
Knut Sveidqvist 42ef035241 #834 Using space as separator, simplfifying the grammar some more, reomving some logging 2019-12-18 18:36:34 +01:00
Knut Sveidqvist 6598b1b10d #1143 Adding support in grammar for multiple nodes in dependency declarations 2019-12-15 18:10:52 +01:00
Knut Sveidqvist 4ff4058244 #1142 Simplified arrows/edges in the grammar 2019-12-15 13:34:35 +01:00
Knut Sveidqvist 26fac9507e #1143 Fixing up the color putput of the logger 2019-12-15 09:50:24 +01:00
Knut Sveidqvist aa2f9622f8 Merge branch 'issue-552' of https://github.com/itprdev/mermaid into itprdev-issue-552 2019-12-11 21:10:11 +01:00
Knut Sveidqvist 5eb50cb2b6
Merge pull request #1132 from GDFaber/develop_Bugfixes_linkStyle_910_1088
Flow: Bugfixes for link style
2019-12-11 20:04:32 +01:00
Knut Sveidqvist f6ef6ff7db
Merge pull request #1130 from GDFaber/develop
Flow: Add stadium shape for nodes
2019-12-11 19:48:47 +01:00
Justin Greywolf de8c6d5572 Merge branch 'develop' into 1104(b)-SupportForAbstractMethodInClassDiagram 2019-12-11 10:31:27 -08:00
Knut Sveidqvist 5b4e95484e
Merge pull request #1120 from jgreywolf/1063-GenericTypeSupportInClassDiagrams
Class: Generic type support
2019-12-11 19:09:19 +01:00
Keenan Tullis d504e00e18 Adds simple tests for parsing callbacks wrt args 2019-12-10 18:27:06 -05:00
Justin Greywolf 74c8e7fad9 another style fix 2019-12-10 15:21:25 -08:00
Justin Greywolf 4b781d3827 remove extra space 2019-12-10 15:18:26 -08:00
Justin Greywolf 9fbcc5c32d Code style fix 2019-12-10 15:12:37 -08:00
Keenan Tullis c7ec8190fb Gantt callback: default to node id as callback arg 2019-12-10 15:25:28 -05:00
Justin Greywolf 2eaa7f1ab6 Generic Type support for classes
Fixed typos after refactor
2019-12-10 11:39:25 -08:00
Marc Faber 608445e64f #910 set correct position and style for edge labels when using linkStyle, #1088 handle multiline texts in edge labels when using linkStyle 2019-12-10 03:51:37 +01:00
Marc Faber 1f4be77662 Revert "#910 set correct position and style for edge labels when using linkStyle, #1088 handle multiline texts in edge labels when using linkStyle" - Sorry, forgot to push to a new branch.
This reverts commit 0deae4abf9.
2019-12-10 03:48:12 +01:00
Marc Faber 0deae4abf9 #910 set correct position and style for edge labels when using linkStyle, #1088 handle multiline texts in edge labels when using linkStyle 2019-12-10 03:34:40 +01:00
Justin Greywolf 5b2f9351c7 Add support for abstract methods
Added logic to allow rendering of a method name with italics or underline based on modifier at beginning of name to set css style
2019-12-09 18:13:06 -08:00
Justin Greywolf 6fdf30357c 1104-Add support to designate a method as abstract
Added logic to allow rendering of a method name with italics or underline based on modifier at beginning of name to set css style
2019-12-09 17:41:26 -08:00
Marc Faber 9a0df5afb0 #723 Add stadium shape for flowchart nodes 2019-12-08 16:51:47 +01:00
Knut Sveidqvist d23ce9fb63 #935 Fix for stylink of links. Default theme colors are picked up and styling via themeCSS works 2019-12-08 10:10:03 +01:00
Knut Sveidqvist ab191abd5a #903 Fix for broken build 2019-12-07 15:06:44 +01:00
Knut Sveidqvist c2e5e94b37 #903 Allowing >,< and = characters in svg. Updating xss tests to handle both htmlLabels and non htmlLabels 2019-12-07 12:19:45 +01:00
Justin Greywolf 6a9b251be1 Fix code style errors 2019-12-06 20:35:22 -08:00
Justin Greywolf 2a41280076 Add support for Generic class definitions
Added support in parser to translate characters surrounded by `~` into generic type definition ie: `Class01~T~` would turn into `Class01<T>`
2019-12-05 12:59:22 -08:00
Knut Sveidqvist 9fe0aa0604
Merge pull request #1116 from mermaid-js/bug/1110_state_diagram_rendering_composit_state
Bug/1110 state diagram rendering composit state
2019-12-04 19:15:06 +01:00
Knut Sveidqvist 5c71a3c85b #1110 Fix for transparent rect under edge title, was misaligned 2019-12-04 18:20:28 +01:00
Knut Sveidqvist 94e768dd01 #1110 Cleanup and removal of loggings 2019-12-04 18:04:56 +01:00
Knut Sveidqvist 0fb91d6bcc #1110 Fixing height issue 2019-12-03 23:38:51 +01:00
Knut Sveidqvist 02854881b4 #1110 Zoom in a bit 2019-12-03 22:48:55 +01:00
Christian Klemm 4254781391
Adjusted imports 2019-12-03 22:09:43 +01:00
Knut Sveidqvist 5a38562bfc #1110 Handling case with concurrency lines 2019-12-03 20:59:17 +01:00
Knut Sveidqvist fcd1e106a5 #1110 Handling case when title is less wide then subgraph 2019-12-02 21:22:22 +01:00
Knut Sveidqvist 346328156a #1110 Adding tests for this case and some calcuations for width 2019-12-02 21:10:37 +01:00
Knut Sveidqvist de8f8b02dc Merge branch 'master' into develop 2019-12-01 07:54:02 +01:00
Knut Sveidqvist eec45dfff9 Merge branch 'release/8.4.3' 2019-12-01 07:52:44 +01:00
Knut Sveidqvist cb07a729e5
Merge pull request #1098 from mermaid-js/feature/1053_documentation-update
Feature/1053 documentation update
2019-12-01 00:42:41 +01:00
Itprdev 78e4fead49 Feature request 552. Gnatt chart task with multiple dependencies 2019-11-28 16:53:33 +02:00
Knut Sveidqvist bea2e73b82 #1065 Updated dependency of dagre-d3 to unofficial release 2019-11-27 19:09:14 +01:00
Justin Greywolf 753bd7e1d9 Update class diagrams to handle comments
updated regex in parser to correctly handle comments in class diagrams.  Also updated flowchart parser to remove unused elements for comments, as well as modifying the regex to match
2019-11-26 11:23:07 -08:00
Justin Greywolf b57492c1c6 Initial checkin 2019-11-26 11:22:21 -08:00
Knut Sveidqvist 5736d523dd
Merge pull request #1081 from jgreywolf/Bug1061-CannotMarkMembersAsProtectedInClassDiagram
Bug/1061 Cannot mark members as protected in class diagram
2019-11-21 20:54:15 +01:00
Knut Sveidqvist 9a87ff684d Removed logging 2019-11-20 19:33:42 +01:00
Knut Sveidqvist f79fc21bfc Merge branch 'develop' into bug/1078_handling_of_arrowMarkerAbsolute 2019-11-20 19:22:10 +01:00
Knut Sveidqvist 087e5eaa32 #1055 Fix for tests 2019-11-20 19:21:19 +01:00
Knut Sveidqvist cbd27831df #1078 Lint fixes 2019-11-20 19:14:32 +01:00
Knut Sveidqvist f6028b63b6 #1078 Using the configuration of the arrowMarkerAbsolute 2019-11-20 19:06:46 +01:00
Justin Greywolf a60e01db97 Corrected typo in test 2019-11-19 13:02:08 -08:00
Justin Greywolf 68c2ea38c9 Bug1061-CannotMarkMembersAsProtectedInClassDiagram
Using # to indicate protected status of a member or method causing parser error when not used inside class declaration brackets {}.  Removed '#' from `LABEL` regex
2019-11-19 12:49:59 -08:00
Knut Sveidqvist 3f8f9f6711 #1055 Better selectors 2019-11-08 20:15:48 +01:00
Knut Sveidqvist d01f494277 Merge branch 'master' into develop 2019-11-08 19:32:54 +01:00
Erik Ellingsen 1542e15a1b Introduction and getting started howtos 2019-11-07 23:15:53 +01:00
Knut Sveidqvist 48ce7a9b78 #1023 Fix for tests 2019-11-07 19:19:44 +01:00
Knut Sveidqvist 09bf54f9af #1038 Updated prefix for the internal dom id 2019-11-07 19:14:06 +01:00
knsv a3017b8456 Merge branch 'release/8.4.1' 2019-11-06 10:52:10 -08:00
MATSUDA Takashi aac915b285 #1044 fix: Multiple class diagrams are not rendered correctly 2019-11-05 18:00:52 +09:00
Louis Frament 427aea73e7 test pass with underscore in a class name 2019-10-29 17:39:15 +01:00
Louis Frament c4436b7a1e
ALPHA pattern now include underscore 2019-10-29 17:20:25 +01:00
Knut Sveidqvist 034a7c424d #1033 Better handling of multiline notes 2019-10-27 17:16:29 +01:00
Knut Sveidqvist b113436055 #1033 Fix for diagram bounds and viewbox 2019-10-27 16:58:32 +01:00
Knut Sveidqvist e550d974da
Merge pull request #1032 from knsv/bug/1031_stricter_code_checks
Fix for Bug/1031 stricter code checks
2019-10-27 15:33:48 +01:00
Knut Sveidqvist bc34ef4b66
Merge pull request #1028 from knsv/Issue-1027_Pie-Chart-Legends
#1027  Updated Pie chart to render percentages and labels separately …
2019-10-27 15:26:54 +01:00
Knut Sveidqvist a5cc1e804b #1031 Adding stricter code checks 2019-10-27 15:24:56 +01:00
Knut Sveidqvist 8f8638fb7c #1029 Linting fixes 2019-10-24 19:46:42 +02:00
Knut Sveidqvist d1c74070ab #1029 Fix for issues after switching to master branch of dagre-d3 2019-10-24 19:33:13 +02:00
Knut Sveidqvist 66152b42ae #1023 New line in transition labels, basic support 2019-10-23 21:16:59 +02:00
Ashish Jain 76c8737485 #1027 Updated Pie chart to render percentages and labels separately as legends 2019-10-23 21:00:33 +02:00
Knut Sveidqvist 4a1eb55127 #1022 Fix for long names for state diagrams 2019-10-23 19:22:36 +02:00
Knut Sveidqvist c87637c6f4 #1024 Removal of leftover loggings 2019-10-23 18:47:41 +02:00
Pirate Praveen ca5e60b38b Use dagre-d3 master branch (for d3v5) 2019-10-21 22:46:20 +05:30
Sakis bal 2a2fd7a8b1 Small gramatical mistake 2019-10-21 22:46:18 +05:30
knsv 0157f665a3 Merge branch 'release/8.4.0' 2019-10-19 07:59:04 -07:00
Knut Sveidqvist 7adb80b35b Fixes after verification, font-family set to label of transitions in statediagram 2019-10-19 14:43:26 +02:00
Knut Sveidqvist dc88e7a2c2 Fixes after verification, documentation of stateDiagram 2019-10-19 14:42:34 +02:00
Sakis bal 1b813d371d
Small gramatical mistake 2019-10-16 10:08:24 +03:00
Knut Sveidqvist 0ce42e6185
Merge pull request #994 from edekadigital/bug-478
#478 API crashes on 2nd render() call
2019-10-15 19:40:29 +02:00
Knut Sveidqvist 3709d9d5c8
Merge pull request #996 from edekadigital/bug-783
#783 Hard to customize font-size for gantt charts
2019-10-15 19:38:20 +02:00
Knut Sveidqvist e65f916ba5
Merge pull request #992 from edekadigital/enhancement-958
#958 Cannot center-justify text in nodes
2019-10-15 18:54:28 +02:00
Knut Sveidqvist f9c8ce1ac7 Merge branch 'master' into develop 2019-10-15 18:50:11 +02:00
Knut Sveidqvist b881e5c69c
Merge pull request #991 from christopherkade/feature/divided-flow-tests
#906 Divided flow unit tests
2019-10-15 18:43:39 +02:00
Knut Sveidqvist 51a89c80aa
Merge pull request #985 from knsv/bug/984_bracket_syntax_properties_reversed_order
bug/984 Class diagram: properties with bracket syntax are reversed in order
2019-10-15 18:39:20 +02:00
Kolja Markwardt 069b4854f8 #478 API crashes on 2nd render() call
- remove element from DOM before rendering to avoid conflicts in case of rerendering
2019-10-15 17:36:02 +02:00
Kolja Markwardt f089c45115 #958 Cannot center-justify text in nodes
- changed fit() to it() to reactivate test
2019-10-15 16:02:11 +02:00
Kolja Markwardt 90fe015d68 #958 Cannot center-justify text in nodes
- assign text-align style to text node to allow aligning of node text
2019-10-15 16:02:11 +02:00
Kolja Markwardt 96c86fd4b2 #783 Hard to customize font-size for gantt charts
- deselect theme style if font-size is set on the taskText element (e.g. via gantt-config)
2019-10-15 15:59:36 +02:00
christopherkade 89b6ccf47d #906 Divided flow unit tests 2019-10-14 16:17:43 +02:00