Commit Graph

1051 Commits

Author SHA1 Message Date
Knut Sveidqvist bd0210cdce 1473 Updated config handling 2020-06-15 01:11:56 +02:00
Chris Moran 6309dd1350
Merge branch 'develop' of https://github.com/mermaid-js/mermaid into mermaid-js-develop 2020-06-14 11:40:15 -04:00
Chris Moran 0ae001ed6d
Fixed issue with idea-multimarkdown.
- JavaFX does not support lookbehind
 - (?) It also appears that named regex groups are also unsupported for both mermaid and javafx

Update:
 - Fixed an issue where setLogLevel did not properly handle 'named' log levels
 - Backwards compatibility should be preserved, any/all %%{...}%% directives will be correctly processed by the grammar and properly ignored for any/all graph types that do not support them.

 - Multiline directives will render an error (as they should) if they are not accounted for in the .jison grammar
2020-06-14 11:34:39 -04:00
Knut Sveidqvist bb8efadb98
Merge pull request #1470 from vantoan8x/click_event_support_keypath_function
Chart Node click event support key-path value for function callback
2020-06-14 14:25:46 +02:00
Chris Moran 620c894929
Fixed issue causing idea-multimarkdown headaches: util changes. Reworking them. 2020-06-14 06:53:22 -04:00
Knut Sveidqvist cc9c69c931 #1466 Fixing notes for state diagrams (beta) 2020-06-13 13:44:45 +02:00
Knut Sveidqvist 6559cfd0e1 #1466 Handling line styles using the new rendering engine 2020-06-13 13:12:33 +02:00
Toan 28dcc781b4 Chart Node click event support key-path value for function callback 2020-06-13 17:41:52 +07:00
Chris Moran 04b4da0c75
## Work in progress.
Implemented directives per PR review comment:

%%{directive: json-encoded-arg-string}%%

example:

%%{init: { 'logLevel': 0, 'theme': 'dark' }}%%

Also changed wrap and config to directives:

%%{wrap}%%
%%{config: { 'fontSize': 18 }}%%
2020-06-11 15:35:00 -04:00
Toan 44675739a1 when window scroll, the tooltip show incorrect position coz its missing offset of window.scrollXY 2020-06-11 16:01:36 +07:00
Toan 6e13718cbd naming the link/connector edgeLabel and edgePath to let easy query and custom. 2020-06-11 11:42:14 +07:00
Justin Greywolf 67e167427c 1378-Added additional test 2020-06-09 14:54:08 -07:00
Justin Greywolf 969a4e7ba5 1378-refine legacy member parsing to cover additional cases 2020-06-09 14:25:03 -07:00
Justin Greywolf 0495103635 Fix regex and Fix incorrect test 2020-06-08 19:21:33 -07:00
Justin Greywolf 9091d686ed 1378-Update regex to match multiple parameters
removing node version changes
2020-06-08 18:42:29 -07:00
Justin Greywolf 47b5d7a2df 1378-accept multiple parameters with methods
sec
2020-06-08 18:42:29 -07:00
Chris Moran 4a253a7760
Merged with mainline develop 2020-06-08 14:58:42 -04:00
Chris Moran bd11663e0a
Added auto wrap option (and grammar) for sequenceDiagrams
Added inline config and init(ialization) grammar
Added reinitialize functionality to mermaidAPI (not to be confused with initialize)
Added actorFontWeight, noteFontWeight, messageFontWeight, wrapEnabled, wrapPadding
Added wrapLabel and breakWord functions to intelligently wrap text based on a pixel-based width instead of column-based
  - The implementation is largely from Carys Mills: https://medium.com/@CarysMills/wrapping-svg-text-without-svg-2-ecbfb58f7ba4
  - Made slight modifications for mermaid-js
Fixed dark theme color inconsistencies for sequence diagrams
Removed !important from sequence scss as this prevents any client overrides
Fixed various invalid css values in sequence scss which prevented proper rendering of various elements
Added detectInit to utils for initialization json detection
Updated detectType to support the existence or absence of the intialization configuration
Updated calculateTextWidth to include fontWeight
2020-06-08 14:48:03 -04:00
Knut Sveidqvist db3377e170 Lint fixes 2020-06-06 12:53:19 +02:00
Knut Sveidqvist 85a8feec9d Also fix for error handling when setting mermaid.parseError 2020-06-06 12:42:35 +02:00
Knut Sveidqvist 8958b2aa1b
Merge pull request #1432 from mermaid-js/1418_html_labels_rendering_engine
1418 html labels rendering engine
2020-05-27 22:34:26 +02:00
Knut Sveidqvist 8603cf89b0 #1418 Fix for descriptions in states 2020-05-27 22:18:59 +02:00
Knut Sveidqvist 7a7e8fe741
Merge pull request #1425 from spopida/bug/1415_erd_empty_label_not_working
Ensure empty quoted relationship labels are accepted in ER diagrams
2020-05-27 19:30:21 +02:00
Adrian Hall f1c05bc909 Ensure empty quoted relationship labels are accepted in ER diagrams 2020-05-23 13:33:44 +01:00
Knut Sveidqvist ef24020b14
Merge pull request #1411 from ivan-danilov/sequence-over-notes-position-fix
Fixed SequenceDiagram over note horizontal position
2020-05-22 09:33:54 +02:00
Ivan Danilov 61249b0887 Fixed SequenceDiagram over note horizontal position
Previous expression with noteWidth does not make sense as noteWidth is
not used in case of note over two participants - forceWidth is used
instead. It tried to be symmetrical over cases A,B and B,A but failed.

Can be seen with messages over conf.width size (cannot reproduce in the
live editor as it seems to use not the last version where the code
does not use noteWidth).

The changed code explicitly calculates which of the actors is the
"left" one and starts rendering half margin to the left of its cetral
line.
2020-05-13 21:50:25 -07:00
Knut Sveidqvist 6d076284e8 #1408 Removing crypto-random-string and he 2020-05-13 19:14:18 +02:00
Knut Sveidqvist d7d248fd04
Merge pull request #1388 from mermaid-js/1386_finetuning_rendering_engine
1386 finetuning rendering engine
2020-05-13 17:36:12 +02:00
Knut Sveidqvist 1fc6603f41
Merge branch 'develop' into feature/remove-lodash 2020-05-13 17:34:26 +02:00
Adrian Hall 053a86c0d4 Do explicit imports for d3 instead of wildcards 2020-05-11 07:10:04 +01:00
hikerpig 28ea68fe7f Replace lodash with specific implementations, #1389 2020-05-07 21:35:34 +08:00
Knut Sveidqvist 9a3ec31191 #1386 Adding support for click events and links 2020-05-06 18:51:12 +02:00
Knut Sveidqvist a8f9e3f0b0 #1386 Adding some docs and adjusted sizing for state diagrams 2020-05-03 13:31:09 +02:00
Adrian Hall d068a460bd Change ERD fontSize config to an integer to prevent NaN errors 2020-04-30 15:55:14 +01:00
Knut Sveidqvist 0933268e61
Merge pull request #1371 from jgreywolf/1234-RefactorClassDiagramScaling
1234 refactor class diagram scaling
2020-04-26 17:23:14 +02:00
Knut Sveidqvist 3aa5fc0cc2
Merge pull request #1365 from dany74q/feature/sequence-diagrams-improvements
Feature/sequence diagrams improvements
2020-04-26 17:21:55 +02:00
Knut Sveidqvist 397f57accb
Merge pull request #1334 from russellgeraghty/feature/user-journey
Feature/user journey
2020-04-26 17:17:33 +02:00
Knut Sveidqvist e3b1944e31
Merge pull request #1370 from mermaid-js/feature/1295_generic_rendering_engine
Feature/1295 generic rendering engine
2020-04-26 16:55:11 +02:00
Justin Greywolf 08e015a951 1234-RefactorDiagramScaling
Changed implementation to ensure that viewport is aligned correctly, rather than increasing size
2020-04-26 06:10:18 -07:00
Justin Greywolf ef17f4eacb 1274-adjust diagram viewbox 2020-04-26 05:51:03 -07:00
Knut Sveidqvist fd37edc53f #1295 Adding support for forks and joins 2020-04-26 10:07:25 +02:00
Knut Sveidqvist 5662c06a33 #1295 Adding support for multiline descriptions for states 2020-04-26 09:47:47 +02:00
Knut Sveidqvist 0aede618ec #1295 Adding support for multiline descriptions for states 2020-04-25 17:01:20 +02:00
Knut Sveidqvist b646672d3e #1295 Fix for statediagram labels 2020-04-25 14:12:35 +02:00
Danny Shemesh 862f20ef20 Added cypress e2e tests for suggested improvements
This commits adds e2e tests for the suggested improvements.
I've went over the generated screenshots and they look good to me.
2020-04-23 18:31:22 +03:00
Danny Shemesh 5c902001b9 Merge branch 'develop' of github.com:mermaid-js/mermaid into develop 2020-04-23 17:08:25 +03:00
Danny Shemesh 5f6887b316 Sequence diagram fixes & improvements
This commit fixes some bugs, and I believe, improves upon the current
implementation.

In no particular order, it adds:

1. Control over note font size, family and alignment (now defaults to
center)
2. Dynamic actor resizing - actor's width will now scale if its
description is bigger than the static configured width
3. Dynamic actor margins - the margin between actors will now be
dynamically calculated by taking into account the width of connecting
messages or notes
4. Fixed a small visual annoyance where a loop arrow would intersect
with the text it loops on
5. Fixed a bug where if global config -> fontFamily wasn't defined, it
would override the actorFontFamily with an undefined
6. Removed some stale / commented out code
7. Added missing config variables to the global config object in mermaidAPI.js
8. Added messageFontSize, messageFontFamily to control message (non-note)
font settings
9. Memoized the actor widths in a pre-calculation that takes notes and
signals lengths into account
10. Removed redundant console.log lines
11. Extracted out actor width & margin calculation to getMaxMessageWidthPerActor, and
calculateActorMargins
2020-04-23 16:50:00 +03:00
Danny Shemesh 197d006860 Extracted out the commonly used line break regex
This commit extract the commonly used /br\s*\/?>/gi regex to common.js,
in order to keep the code more DRY.
2020-04-23 07:55:28 +03:00
Danny Shemesh 49f8aac6a9 Fixed outdated doc strings
This commit fixes some outdated docstrings, replacing the description
and @params where necessary.
2020-04-23 07:55:09 +03:00
Danny Shemesh 22dd50a047 Extracted out the commonly used line break regex
This commit extract the commonly used /br\s*\/?>/gi regex to common.js,
in order to keep the code more DRY.
2020-04-23 07:20:47 +03:00
Knut Sveidqvist 59f3d2a11e #1295 Fix for edges in subgraphs and handling of concurrent states in statediagram-v2 2020-04-22 20:03:41 +02:00
Russell Geraghty 249a14f84a Merge remote-tracking branch 'upstream/develop' into feature/user-journey 2020-04-17 07:30:53 +01:00
Knut Sveidqvist c3f2e8dde1 #1295 Render fix for flowchart, correct marker handling and some cleanup 2020-04-16 19:44:11 +02:00
Russell Geraghty 433f88b459 Merge remote-tracking branch 'upstream/develop' into feature/user-journey 2020-04-13 20:08:20 +01:00
Knut Sveidqvist 704d56d193 #1295 Updates mermaid-graphlib 2020-04-13 16:25:10 +02:00
Knut Sveidqvist 5f4da6e0bc Merge branch 'develop' into feature/1295_generic_rendering_engine 2020-04-11 18:53:47 +02:00
Knut Sveidqvist 22e17172dd #1295 Recursive rendering, draft 2020-04-11 17:16:01 +02:00
Knut Sveidqvist 6ec731e263
Merge pull request #1345 from GDFaber/feature/1343_add_flowchart_subroutine_shape
Add flowchart subroutine node shape
2020-04-11 14:12:20 +02:00
Knut Sveidqvist 7cd8b6f938
Merge pull request #1336 from GDFaber/feature/1290_hide_or_style_gantt_today_marker
#1290 Hide/style today marker in gantt diagram
2020-04-11 14:04:31 +02:00
Knut Sveidqvist a4a19845d4
Merge pull request #1335 from GDFaber/bug/1271_fix_autonumber_position_for_multiline_texts
#1271 Fix autonumber positioning in sequence diagrams with multiline texts
2020-04-11 14:01:24 +02:00
Knut Sveidqvist fffb0eafde
Merge pull request #1332 from Soptq/stateRenderer
Add useMaxWidth to stateRenderer
2020-04-11 11:58:22 +02:00
Marc Faber 7f67435cb9 #1343 Add flowchart subroutine node shape 2020-04-10 00:14:41 +02:00
Marc Faber dcfa903176 #1290 Hide/style today marker in gantt diagram 2020-04-05 01:59:18 +02:00
Marc Faber fc70a8e145 #1271 Fix autonumber positioning in sequence diagrams with multiline texts 2020-04-04 21:53:31 +02:00
Russell Geraghty f081527731 User journey handler 2020-04-04 16:38:30 +01:00
Knut Sveidqvist 365c741864 #1295 Fix for intersection calculation for edges to clusters and adding concurrency in stateDiagrams as clusters 2020-04-02 19:35:12 +02:00
Adrian Hall 9d5303c59d Prevent un-labelled edges that are left of the left-most vertex from being cut off the diagram 2020-04-02 15:29:12 +01:00
Soptq c527392e21
Add useMaxWidth to stateRenderer 2020-04-01 15:12:45 +08:00
Knut Sveidqvist 933cc333cc #1295 Backwards compatability 2020-03-30 22:08:48 +02:00
Knut Sveidqvist e72c3b2c86 #1295 Re-enabling state diagram tests 2020-03-30 21:40:14 +02:00
Knut Sveidqvist a5af248715 Merge branch 'develop' into feature/1295_generic_rendering_engine 2020-03-30 19:15:17 +02:00
Knut Sveidqvist 240077ffe8 #1295 Adding note support to state diagrams 2020-03-29 14:20:49 +02:00
Adrian Hall eee9a1661f Merge branch 'develop' into feature/1309_erDiagram_PlantUML 2020-03-29 08:55:19 +01:00
Adrian Hall 9199546dca Alter ERD syntax for compatibility with PlantUML 2020-03-29 08:42:20 +01:00
Knut Sveidqvist 5fbb69e7c5 #1295 Styling of composite states 2020-03-28 17:34:23 +01:00
Knut Sveidqvist 85f47e1693 #1295 Styling of start/end nodes, arrows and regular states 2020-03-28 13:59:41 +01:00
Knut Sveidqvist 391dc06013 Merge branch 'develop' into feature/1295_generic_rendering_engine 2020-03-25 20:28:10 +01:00
Knut Sveidqvist 598b392878 #1295 Lint fixes 2020-03-25 20:26:53 +01:00
Knut Sveidqvist 159a3a3706 #1295 Start shape and handling of setting a unique start id per cluster level 2020-03-25 20:16:27 +01:00
Raphael Medaer cbdb2e6e6f
Align left/center/right multiline messages 2020-03-24 22:17:11 +01:00
Raphael Medaer d409da2201
Multiline sequence message
This commit allow user to write multiline messages in sequence diagram.
For instance:

```
sequenceDiagram
	Alice->>+John: Hello John<br>How are you?<br>I mean...<br>Are you OK today?
	Alice->>+John: John, can you hear me?
	John-->>-Alice: Hi Alice, I can hear you!<br>Keep calm!<br>I'm there.
	John-->>-Alice: And I feel great!
```
2020-03-24 18:26:56 +01:00
Knut Sveidqvist c7aa67b07a #1295 Lint fix 2020-03-22 23:06:32 +01:00
Knut Sveidqvist 5b302ae2e6 #1295 Applying new rendering engine for stateDiagrams 2020-03-22 21:45:14 +01:00
Knut Sveidqvist 02b19fed27 Merge branch 'develop' into feature/1295_generic_rendering_engine 2020-03-22 14:44:43 +01:00
Knut Sveidqvist 17f06564a2 #1295 Added the flowchart shapes 2020-03-18 22:08:19 +01:00
Adrian Hall d3f78299e7 Add integration tests, basic docs, and fix multi-diagram bug 2020-03-18 16:53:26 +00:00
Adrian Hall a3b97f7c24 Remove roleB - only roleA is labelled 2020-03-17 10:16:19 +00:00
Adrian Hall 4f50e36e5b Tidy up for lint 2020-03-17 09:48:32 +00:00
Adrian Hall a0bbbe1404 Merge branch 'develop' into feature/117_er_diagram 2020-03-17 09:28:10 +00:00
Adrian Hall 50f983871b Add labels to relationships (needs further tidy up) 2020-03-17 09:25:16 +00:00
Adrian Hall 2d3b02df6a Minor tidy up 2020-03-16 10:08:43 +00:00
Knut Sveidqvist 4010c89899 #1295 'arrow' renamed to 'arrow_point' 2020-03-16 08:02:32 +01:00
Knut Sveidqvist 215e930da4 #1295 Markers implmented, the gereric pattern and diagram specific for flowcharts. 2020-03-16 07:55:02 +01:00
Knut Sveidqvist 5b74d75011 #1295 Arrow head start 2020-03-14 18:13:34 +01:00
Knut Sveidqvist 963a0ce6ef #1295 Edges between subgraphs 2020-03-14 17:38:35 +01:00
Knut Sveidqvist 5f5e453fb3 Small for for merge issue 2020-03-14 08:56:47 +01:00
Knut Sveidqvist 35ea4d1a00 Merge branch 'develop' into feature/1295_generic_rendering_engine 2020-03-14 08:44:49 +01:00
Knut Sveidqvist 10583610bd Lint fixes 2020-03-14 08:36:49 +01:00
Adrian Hall 1e498eccb6 Change rendering algorithm 2020-03-11 22:17:11 +00:00
Knut Sveidqvist 7bd5529bb7 1295 Support for subgraphs with wide labels 2020-03-11 19:52:57 +01:00
Knut Sveidqvist 1b64af143e #1295 Drawing edges between nodes 2020-03-11 17:36:30 +01:00
Adrian Hall bab4649a1e Use markers with rounded crows feet 2020-03-10 13:48:53 +00:00
Adrian Hall 29b6e00071 clean up for eslint 2020-03-09 12:36:43 +00:00
Adrian Hall 9aacc85a16 Working experimental version using markers 2020-03-08 22:22:33 +00:00
Knut Sveidqvist aa32d454c9 #1295 First draft of generic renderer applied to flowcharts. 2020-03-08 09:49:41 +01:00
Adrian Hall 061045016f Minor tidy up of prototype code 2020-03-07 11:05:56 +00:00
Knut Sveidqvist 25e2d78311 #1295 Start renderer 2020-03-04 20:35:59 +01:00
Adrian Hall 1e2d014ac9 Basic rendering for ER diagrams 2020-03-03 21:44:18 +00:00
Adrian Hall 6985391437 Minor clean up for eslint 2020-03-02 11:46:07 +00:00
Adrian Hall e90f58a0a7 Merge branch 'develop' into feature/117_er_diagram 2020-03-02 10:48:32 +00:00
Adrian Hall 0555fca5d8 Initial parsing logic for ER diagrams 2020-03-02 10:03:55 +00:00
GDFaber 94ace2348f
Revert "Multiline comments" 2020-02-29 21:32:20 +01:00
Knut Sveidqvist de11dc43ab
Merge pull request #1285 from mermaid-js/bug/1269_fix_label_background_on_safari
Bug/1269 fix label background on safari
2020-02-29 15:49:23 +01:00
Knut Sveidqvist 756927b6f8 #1269 Fix for build issue - lint 2020-02-29 15:39:21 +01:00
Erik Ellingsen e62027b73c Multiline comments 2020-02-27 00:02:25 +01:00
Knut Sveidqvist 0ee9c69ddf #1269 Work around for inaccurate bounding box results in Safari. Fix for multiple lines 2020-02-26 20:53:08 +01:00
Knut Sveidqvist dd5e6c18d5 #1269 Work around for inaccurate bounding box results in Safari. 2020-02-26 20:01:53 +01:00
Knut Sveidqvist 8758bd57ca
Merge pull request #1274 from GDFaber/bug/apply_default_class_to_flowchart_nodes
Fix applying default class to flowchart nodes
2020-02-25 19:20:52 +01:00
Marc Faber d67e49400f #684 Fix applying default class to flowchart nodes 2020-02-24 01:31:39 +01:00
Justin Greywolf 6d74c5663f 1169- break out getRows
Moved getRows function from `state/stateRenderer.js` and `state/shapes.js` into `common/common.js`. Broke out section into small one line functions for replacing line breaks, then moved the `sanitize` function from `utils.js` to this new module as there is shared functionality
2020-02-21 13:49:05 -08:00
Knut Sveidqvist 89c1853977 #1261 Removed calls to console.log 2020-02-21 09:50:04 +01:00
Knut Sveidqvist f8137ea7c1 #1257 Adding the autonumber keyword + tests and docs 2020-02-16 15:26:08 +01:00
Knut Sveidqvist 00d2a1fe9f Merge branch 'develop' of github.com:mermaid-js/mermaid into develop 2020-02-05 19:42:13 +01:00
Knut Sveidqvist 18d0d435c6
Merge pull request #1241 from jgreywolf/1240-ClassDiagramRefactor
1240 class diagram refactor
2020-02-05 19:42:01 +01:00
Knut Sveidqvist f298c154e2 Merge branch 'develop' of github.com:mermaid-js/mermaid into develop 2020-02-05 19:40:18 +01:00
Knut Sveidqvist 822df37f8c #1224 Possibility to style text color of nodes and subgraphs as well as apply classes to subgraphs 2020-02-05 19:39:50 +01:00
Marc Faber a0e7789d50 #962 added color setting for default link style 2020-02-04 22:07:10 +01:00
Justin Greywolf c825b37cc6 1240-refactor for class renderer
prep for future functionality work
2020-02-03 16:04:59 -08:00
Marc Faber 2dd4aa31e5 #962 moved "style from array" function to utils.js, added unit test 2020-02-04 00:24:50 +01:00
Marc Faber c95adfaf74 #962 Set text color for flowchart link labels according to linkStyle definitions 2020-02-02 22:59:59 +01:00
Knut Sveidqvist 963a0fcd77
Merge branch 'develop' into 1179-SupportGenericTypesForMembers 2020-01-29 21:08:31 +01:00
Knut Sveidqvist c43f791b29 #1223 Removing/updating some logging, adding current.html to .gitignore 2020-01-29 20:44:15 +01:00
Knut Sveidqvist 4709195a1d #1223 Adding support for multiple transitions to a node from another node 2020-01-29 19:57:59 +01:00
Knut Sveidqvist 0082c23a90 #1217 Better matchingof words beginning with as as matching token AS in stateDiagram's state definition. 2020-01-29 19:05:51 +01:00
Knut Sveidqvist d571c7e08e
Merge pull request #1225 from jgreywolf/1058-ClassDiagramScaling
1058 class diagram scaling
2020-01-27 20:14:39 +01:00
Knut Sveidqvist ea29b67c5c
Merge pull request #1221 from mermaid-js/bug/1216_dodging_huge_diagrams
#1216 Fix for issue when mermaid freezes the browser tab due to large…
2020-01-27 20:01:54 +01:00
Justin Greywolf 0921007d92 1058-Set diagram dimensions appropriately
Make sure height and width are set so that all of the diagram is displayed
2020-01-27 10:27:05 -08:00
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
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
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 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
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 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
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 087e5eaa32 #1055 Fix for tests 2019-11-20 19:21:19 +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
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