Commit Graph

1064 Commits

Author SHA1 Message Date
Brian Mearns 054901cb79 Fixes #848 - Use more secure PRNG
Math.random() is not cryptogaphically secure, but the crypto-random-string
package provides what is needed with a cryptographically secure pseudo-random
number generator.
2019-10-01 21:29:42 -04:00
Knut Sveidqvist 94afcfb6f9 #945 Rendering of state descriptions 2019-09-29 15:50:43 +02:00
Volkan Unsal 682faa4f9d Add useMaxWidth to flowRenderer 2019-09-29 09:31:41 -04:00
Knut Sveidqvist 3cffd1e3ed #945 Rendering of labels and new label positioning algorithm 2019-09-28 13:31:10 +02:00
Marc Faber 095233e6cf Flowchart parsing issue with CRLF #894 2019-09-27 01:05:25 +02:00
Knut Sveidqvist 13baa43081 #945 Rendering from diagram data 2019-09-25 21:29:32 +02:00
Knut Sveidqvist fad76ad534 #945 Rendering of start & end node 2019-09-25 21:01:21 +02:00
Nacho 6110640fc2
Merge pull request #940
Use https in githu urls
2019-09-23 09:44:20 -04:00
nothingismagick 6c243488fa
revert to http 2019-09-23 12:06:22 +02:00
nothingismagick 4f218435e3
revert to http 2019-09-23 12:05:13 +02:00
nothingismagick 7ca13fd163
revert to http 2019-09-23 12:04:39 +02:00
knsv 2306534248 #945 Handling of dimples state definitions 2019-09-22 03:30:36 -07:00
knsv 2f0248e6d5 #945 Handling of note statements 2019-09-22 02:38:04 -07:00
knsv 3a8564de92 #945 Handling of fork statements 2019-09-21 23:19:03 -07:00
knsv 1aa8b9b804 #945 Handling recursive logn descriptions for states with quotes 2019-09-21 11:31:09 -07:00
knsv 921d5464a1 #945 Handling recursive logn descriptions for states with quotes 2019-09-21 09:12:02 -07:00
knsv 9993b90a20 #945 Handling recursive state statements 2019-09-21 08:54:18 -07:00
knsv 6f054519e7 #945 Handling simple state statements 2019-09-21 08:50:32 -07:00
knsv 51bf4a4c5c #945 Parsing happy case and scale/hide statements 2019-09-21 08:19:55 -07:00
knsv be2e467583 Release 8.3.1. Reseting the flow parser between parsings 2019-09-19 15:00:21 -07:00
knsv f39e120952 #941 Fix for issue with directions iin flowchart 2019-09-19 13:56:41 -07:00
Daniel Thompson-Yvetot f30f607b0c
feat(https): use https in SVGs 2019-09-19 20:53:42 +02:00
knsv d8397f146b #937 Handling direction keywords in node ids 2019-09-18 12:56:24 -07:00
Jan Verbeek e192454f54 Correctly document htmlLabels as true by default
The "mermaidAPI configuration defaults" section in the documentation
listed `htmlLabels` as `false`, but the real default is `true`, as
seen in the code and elsewhere in the documentation.
2019-09-18 13:05:08 +02:00
knsv 7e5802e799 #931 Last code standard fixes 2019-09-12 12:59:13 -07:00
knsv 0e8164d805 #931 Compliacne with code standard 2019-09-12 12:58:57 -07:00
knsv f9b30bdb43 #931 Reformatting for compliacne with code standard 2019-09-12 12:58:32 -07:00
knsv 34de31195f #931 Aligning with code standard 2019-09-12 12:58:04 -07:00
knsv cf05a8d8fa #931 Updating code to align witn new code standard 2019-09-12 12:57:36 -07:00
knsv a2e3f3d900 #931 Reformatting code for gitGraph 2019-09-12 12:56:54 -07:00
knsv e67b8c86d6 #931 Aligning code standard 2019-09-12 12:55:31 -07:00
knsv e14922f15c #931 Aligning code standard 2019-09-12 12:55:20 -07:00
knsv ad5669b523 #931 Aligning code standard 2019-09-12 12:55:10 -07:00
knsv f2a6ba80b5 #931 Aligning code standard 2019-09-12 12:54:59 -07:00
Ashish Jain 398d66bda9 #22 Update SCSS for pie chart specific title class 2019-09-11 21:39:39 +02:00
Ashish Jain 42fc23cff2 #22 Basic Pie Chart 2019-09-11 21:20:28 +02:00
Knut Sveidqvist ec7324e12e Restore documention written in autoigenerated file 2019-09-11 20:03:22 +02:00
knsv e37f5a6eb2 #926 Applying the color styling on the label instead of the node 2019-09-08 02:56:06 -07:00
knsv 21aa8c5f15 #922 Fix for click binding on nodes with ids starting with a number 2019-09-03 11:31:47 -07:00
knsv 2cb54293f8 Lint fixes 2019-09-01 02:18:00 -07:00
knsv 5610185050 #918 Removed som logging 2019-09-01 00:45:24 -07:00
knsv 699bd61045 #918 Fix for issue with nodes starting with a number in a subgraph 2019-09-01 00:44:48 -07:00
Knut Sveidqvist c43d58d3c9 #916 Allow chaining of vertice in flowcharts 2019-08-28 20:25:54 +02:00
Eduardas Michelsonas c6efddee87 #755 lint fixes 2019-08-28 20:13:37 +02:00
Eduardas Michelsonas f6377e6125 #755 2019-08-28 20:09:45 +02:00
Knut Sveidqvist 4ae48f4284 #915 Reviving the possibility to use underscore in text in vertices 2019-08-28 17:34:57 +02:00
knsv a48a306fe8 #914 Fix for issue identifying node wehen the id of the node starts with a digit 2019-08-27 12:16:11 -07:00
Knut Sveidqvist 06a91d8564 #835 Backwords compatible syntax for associating classes with nodes/vertices 2019-08-26 20:10:44 +02:00
Knut Sveidqvist a3142aad69 Adding some test pages 2019-08-20 20:07:12 +02:00
Knut Sveidqvist 980749536b Fix for issue with bindFunctions being called when there are none. 2019-08-20 18:42:19 +02:00
Knut Sveidqvist c4d2be7a0d
Merge branch 'master' into bug/subgraphs_number_in_id_and_space_in_titles_895_and_900 2019-08-16 12:52:17 +02:00
Knut Sveidqvist ef51f543a3 Fix for test 2019-08-16 12:42:42 +02:00
Knut Sveidqvist 4eda2aa36d #900 Handling ids starting with a number and styling for other nodes as well 2019-08-16 12:38:34 +02:00
Knut Sveidqvist a35892da4f Fix for issue #895 2019-08-15 08:57:49 +02:00
Knut Sveidqvist 23b567e11b #900 Fix for subgraph ids starting with a number 2019-08-14 20:00:06 +02:00
Ashish Jain abdbf2cb8a Bug fix handling non-click graphs 2019-08-14 19:25:52 +02:00
Ashish Jain ca97ac11e1 Fix for failing yarn dev on Standard syntax check for mermaidAPI.js 2019-08-14 18:33:10 +02:00
knsv 7b335fb62e #901 Fixed the issue with multiple calls to bind the click functions. Also sanitized the tooltips so that no tags are allowed in them for (#847). 2019-08-11 03:26:44 -07:00
knsv a6f21c2b91 Re-enabling all tests 2019-08-08 01:19:14 -07:00
Alexander Sage 78dd0e6ddc remove dev code 2019-08-03 15:10:53 -07:00
Alexander Sage cfea52f570 chore: integrate jison into webpack build 2019-08-03 15:05:43 -07:00
knsv 533b55bb68 Merge of feat: sequence diagram background rect #889 2019-07-25 12:04:01 -07:00
Alexander Sage 8f6d148481 chore: added test for background rect dimensions 2019-07-23 21:28:48 -07:00
Alexander Sage 671a892b52 fix: removed it.only 2019-07-23 21:08:33 -07:00
Alexander Sage 5c25c5563a chore: Added e2e snapshot tests 2019-07-23 21:07:01 -07:00
Alexander Sage 8b05eeaa59 chore: Added unit tests around drawBackgroundRect and drawRect 2019-07-23 19:15:54 -07:00
Alexander Sage 1b001cf1e8 chore: Added unit tests around drawBackgroundRect and drawRect 2019-07-23 19:11:31 -07:00
ashishjain0512 855bad2f40 Added sequenceDiagram.js 2019-07-23 06:54:45 -07:00
ashishjain0512 b6d9407246 Added Jest test case for handling underscore in vertex name 2019-07-23 06:51:18 -07:00
ashishjain0512 957687ed39 Added Jest test for use-case A[text]-->B[test2].class 2019-07-23 06:49:44 -07:00
ashishjain0512 db86cfa7d9 Added Jest test case for use-case A[text].class-->B[test2] 2019-07-23 06:47:03 -07:00
ashishjain0512 afa95172b6 Added new Jest test case for usecase A[text].class 2019-07-23 06:45:35 -07:00
ashishjain0512 2e0843c226 Added Jest test case for 'should be possible to apply a class to a vertex directly' use-case 2019-07-23 06:41:45 -07:00
ashishjain0512 b312901705 Updated JISON for flow diagram to allow . class in vertex declaration 2019-07-23 06:37:28 -07:00
Alexander Sage c8091c61c0 feat: sequence diagram background rect 2019-07-22 22:47:49 -07:00
knsv 5d9018aeec Merge remote-tracking branch 'origin/master' 2019-07-22 05:23:17 -07:00
knsv cf686c445c Standard fixes 2019-07-22 05:23:03 -07:00
knsv f11d1a6fa1 #847 Better sanitizing of urls 2019-07-22 02:18:09 -07:00
Knut Sveidqvist e679556975
Merge pull request #886 from stanhu/sh-fix-flowchart-label
Fix text label colors for flow charts. Thanks for the fix!
2019-07-21 09:28:12 -07:00
Stan Hu c6502fb03b Style the flow chart labels via SCSS 2019-07-21 08:51:44 -07:00
Stan Hu 83b7163844 Fix text label colors for flow charts
When htmlLabels is set to `false` and a background fill color is used
for a node, the text label will inherit the fill color, hiding the
actual text. To fix this, explicitly set the fill color to `#333`, the
same value used in `src/themes/flowchart.scss`.

Closes https://github.com/knsv/mermaid/issues/885
2019-07-21 08:25:33 -07:00
knsv c33533082c #847 Handling of embedded javascript in links 2019-07-21 07:39:36 -07:00
knsv 9c150eec4e Linting fixes 2019-07-21 02:14:49 -07:00
knsv c25a3cf1c1 #731 Issue with clicks in flowcharts. Replacing d3 with document.querySelect and addEventListener 2019-07-21 02:12:54 -07:00
knsv b9ad9ba674 #884 Merging configuration updates to previous condifguration. 2019-07-21 02:09:22 -07:00
knsv 8e27318eda #847 fix for case texts with multiple br tags, explanation in usage doc on how to avoid labels out of bounds. 2019-07-16 16:05:22 -07:00
Knut Sveidqvist 484b24d097
Merge pull request #882 from IOrlandoni/fix/whitespace-in-participant
Trimming whitespace after participant id
2019-07-14 10:36:10 -07:00
IOrlandoni e93cc85e9b Trimming whitespace after participant id 2019-07-14 11:51:20 -04:00
Knut Sveidqvist c818dbb5a0 Setting default securityLevel to strict, updated docs in mermaidAPI 2019-07-14 06:07:27 -07:00
Knut Sveidqvist 31576f8f55 #847 Removing </> in text 2019-07-13 22:50:53 -07:00
Jason Würtz c6511ed829 test(ganttDb.spec): add simple tests for the durationToDate fn 2019-07-07 17:17:22 -03:00
Jason Würtz 047760ad4b chore(ganttDb): export durationToDate so it can be tested 2019-07-07 17:17:05 -03:00
Jason Würtz b7c4b66b61 test(ganttDb.spec): fix missing initialization for clear test 2019-07-07 17:04:40 -03:00
Jason Würtz 67bb5ffa73 refactor(ganttDb.js): extract durationToDate function
codeclimate was complaining about the getEndDate function so I split it up
2019-07-07 17:01:45 -03:00
Jason Würtz 1ee4b964e2 test(gantt.spec): add assertions to check that the parser didn't error 2019-07-07 16:41:07 -03:00
Jason Würtz cb7d05bd53 chore(gantt.js): generate parser from jison 2019-07-07 16:28:53 -03:00
Jason Würtz 16f3338b3d feat(gantt.jison): update parser to accept a inclusive end date arg
if a line contains inclusiveEndDates then it will toggle the chart to use inclusive end dates
2019-07-07 16:28:31 -03:00
Jason Würtz 0a567a3ef9 test(ganttDb): update inclusive end date tests 2019-07-07 16:27:41 -03:00
Jason Würtz 660e0f3d8b refactor(ganttDb): separate out the inclusive end date toggle 2019-07-07 16:27:28 -03:00
Jason Würtz ee766ec88e fix(ganttDb): change manual end time determination
now it just checks if a valid end time was provided and instead of the comparison that went on before.
This needed to be done in order to support manual end dates with inclusive set to true since they don't match anymore as the 'manually' supplied end date is increased by one
2019-07-06 12:28:56 -03:00
Jason Würtz 63096a5c26 feat(ganttDb.js): add 1 day to end dates if inclusive is set to true
This will essentially keep all old behavior the same while still allowing users to specify if they want inclusive end dates
2019-07-06 12:27:28 -03:00
Jason Würtz b5b714861d test(ganttDb.spec): flip function design to specify inclusive instead 2019-07-06 12:26:32 -03:00
Jason Würtz 5c2d416a34 test(ganttDB.spec): fix typo 2019-07-06 12:25:57 -03:00
Jason Würtz 0515375cfa test(ganttDb.spec): clear function 2019-07-06 11:54:45 -03:00
Jason Würtz 6d20ccccd0 feat(ganttDb.js): add getters for excludes,sections and date format 2019-07-06 11:54:18 -03:00
Jason Würtz 6dce255393 fix(ganttDb.js): clear formats and excludes on clear 2019-07-06 11:30:13 -03:00
Jason Würtz 402d4bdee1 test(gantt.spec): add parser test for inclusive end dates 2019-07-06 11:29:50 -03:00
Jason Würtz 123fba5b07 test(ganttDb.spec): add test case for inclusive end dates 2019-07-06 11:29:10 -03:00
Knut Sveidqvist 5fd803d479 Fix merge changes for pr 722 and issue #782 2019-06-30 16:14:59 +02:00
Knut Sveidqvist 4bb0da0ce6 Merge of pull request #741 2019-06-29 10:41:44 +02:00
Knut Sveidqvist 3e9e5acdab Fix of merge conflicts 2019-06-29 10:33:44 +02:00
Knut Sveidqvist 40d10ea741 #457 Added grammar for double directional arrows 2019-06-28 12:10:16 +02:00
Knut Sveidqvist 231aaedec8 Update for double arrows - regular 2019-06-28 11:26:20 +02:00
Adam Wulf 03abeacea4 Added parallelograms. 2019-06-25 23:15:43 -05:00
Adam Wulf 99169398b7 Simpler syntax for trapezoid nodes 2019-06-25 23:06:53 -05:00
Adam Wulf 24600355c8 Merge remote-tracking branch 'origin/master' into flow/trapezoid 2019-06-25 22:36:13 -05:00
Adam Wulf db2a21cea1 updated flow parser 2019-06-25 22:30:28 -05:00
Arthaey bba6bb6255 Remove console.log in classDB. 2019-06-23 19:56:50 -07:00
Knut Sveidqvist 7d7bc9782b
Merge pull request #795 from DanShai/fix-class-diagram
fix class diagram mermaid
2019-06-16 08:24:03 +02:00
Knut Sveidqvist 5667694652 info diagram to show version of mermaid, bugfixes for gantt chart 2019-06-15 14:29:26 +02:00
Dan Shai e64d2dcada fixed class diagram hopefuly no conflict 2019-06-14 17:29:40 +03:00
Dan Shai f057bd1e89 fixed class diagram 2nd pr 2019-06-14 08:01:51 +03:00
Dan Shai 1e7e719dbf fixed class diagram 2nd pr 2019-06-14 07:37:16 +03:00
Dan Shai 5b6e9747b7 fixed class diagram 2nd pr 2019-06-14 01:22:46 +03:00
Knut Sveidqvist db5be3c28a Resolving som conflicts from merge 2019-06-11 08:35:46 -07:00
Knut Sveidqvist 434a033411 Resolved an name change issue fom a merge 2019-06-11 08:22:55 -07:00
Knut Sveidqvist 0816591cf9 Resolved some merge conflicts 2019-06-11 08:20:12 -07:00
Knut Sveidqvist 836d02d0b9
Merge pull request #828 from stanhu/sh-fix-dotted-lines-flowchart
Fix dotted lines not appearing in flowcharts when HTML labels disabled
2019-06-11 17:13:51 +02:00
Knut Sveidqvist b951d506d9
Merge pull request #832 from vaniship/master
fix draw function can only call once
2019-06-11 17:13:00 +02:00
Knut Sveidqvist e0a70bd352 Merge of latest changesin to pr #804 2019-06-09 12:40:37 -07:00
Knut Sveidqvist fe913ec10f
Merge pull request #705 from Vrixyz/602-cardinality-not-showing
wip: class diagram  cardinality display
2019-06-09 11:22:03 -07:00
Knut Sveidqvist 3e6396cc4b Merged in recent updates 2019-06-09 10:53:46 -07:00
Knut Sveidqvist a8d9b269ff Fixed reference in test file 2019-06-09 07:07:57 -07:00
Knut Sveidqvist df7dc21893 Merge branch 'no-bloat' 2019-06-09 07:00:29 -07:00
Fabio Spampinato ed3d15501a Aligned “lodash” version with other dependencies, so that it gets deduplicated 2019-06-04 03:52:01 +02:00
Fabio Spampinato fef85cf259 Importing only specific modules from "lodash" 2019-06-04 03:32:56 +02:00
Fabio Spampinato 9290aa2b61 Replaced “moment” with “moment-mini" 2019-06-04 03:14:35 +02:00
Knut Sveidqvist ee0cb8793f
Merge pull request #791 from flying-sheep/svg-links
SVG link rendering
2019-05-28 23:18:39 +02:00
Knut Sveidqvist 0cfd3c7e02
Merge pull request #749 from monsterkrampe/issue-748-make-mermaid-class-diagrams-usable-in-stackedit
Make Class Diagrams usable in Stackedit and Live Editor
2019-05-28 22:32:36 +02:00
Knut Sveidqvist 23693bd57e
Merge pull request #845 from Qix-/style-subgraph
Support styling of subgraphs
2019-05-28 22:22:45 +02:00
Knut Sveidqvist d742211797
Merge pull request #837 from jnnnnn/master
fix dark theme loop labels not visible
2019-05-28 22:16:22 +02:00
Josh Junon f51596eb61 Support styling of subgraphs 2019-05-24 17:08:45 +02:00
Jonathan Newnham c1d252afe0 fix dark theme loop labels not visible
* fix loop label text forced to black, ignoring styles
* fix styles that were being ignored
2019-05-14 11:23:37 +10:00
Vaniship c3f03e4497
fix: fix draw function can only call once 2019-05-07 15:06:58 +08:00
Stan Hu 9e67de8a9f Fix dotted lines not appearing in flowcharts when HTML labels disabled
For some reason, `edgeData.style` was being overwritten when it
was already set earlier in the method.
2019-05-01 22:48:16 -07:00
Philipp A 6f09b14f44 Fix group labels 2019-04-26 11:01:21 +02:00
Philipp A d78b33ca75 Fixed tests 2019-04-26 10:04:46 +02:00
jsyang fa9cf2b345 Fix line styling (dashed / thick) when not using HTML labels option 2019-04-24 16:31:09 +01:00
Jim Yang b2c833b879
Remove escape inside regex for StandardJS 2019-04-18 18:38:33 +01:00
Jim Yang 96516d6dd5
Fix issue with XML line breaks inside vertex labels
The regex needed to match the `<br>` or `<br/>` wasn't completely correct since some browsers (e.g. Chrome) attempt to turn `<br>` elements into their XHTML counter-parts: `<br/>`. This fixes the regex so both will match.
2019-04-18 10:46:52 +01:00
abzicht 0a7b8840a4 Added css for clickable when task text is outside of task 2019-03-15 20:34:26 +01:00
abzicht 6ede0f6166 Allowing brackets in taskTxt, adjusted index.html example to include brackets in task text 2019-03-10 14:07:33 +01:00
abzicht d2eb507e7d Adding styles for clickable tasks 2019-03-10 13:43:20 +01:00
abzicht fa04e3de75 Adding jison processed js file because it seems that this is always committed to github 2019-03-10 13:42:43 +01:00
abzicht 63184d53c1 Argument processing now allows double quoted strings 2019-03-10 13:41:59 +01:00
abzicht 1dfff7ac0e Added documentation and implemented empty functionarguments 2019-03-10 13:41:02 +01:00
abzicht 6c84544521 Changed href to scan for the next double quoted word. This allows whitespace in links and resolves the issue with href ending with EOF 2019-03-10 11:49:16 +01:00
abzicht 91651ca6ce Fixed lint issues 2019-03-09 23:17:13 +01:00
abzicht 6fd790570a Removed <a> tag, moved id attribute to text section 2019-03-09 23:14:28 +01:00
abzicht b322a964ca Code refactoring: Pushing functions is now to the funs list is now available in a separate function. Also, setLink no longer using the .link attribute and instead calls links directly via window.open 2019-03-09 23:13:53 +01:00
abzicht 20b35cbe13 Removed STR remains and fixed whitespace issue for 'call' which lead to undesired whitespace in function names 2019-03-09 22:42:27 +01:00
abzicht d169641c99 Fixed lint issue 2019-03-09 22:19:08 +01:00
abzicht 856591d253 Removed STR as it is no longer required; made 'click' a state such that it returns the id that is specified after the keyword 2019-03-09 22:18:37 +01:00
abzicht 4587f5a73d Added 'clickable' class to all elements with interactivity. This allows css styling for clickable elements 2019-03-09 20:08:52 +01:00
abzicht 10057217cb Fixed issue which only passed the first char of functionargs to the function by splitting the functionargs by commas 2019-03-09 20:07:51 +01:00
abzicht 0c66e1b5b9 Added href support and improved callback argument handling 2019-03-09 12:11:56 +01:00
monsterkrampe 4800460e07
748: class diagram: allow linebreak after last statement; rerender correctly; allow unassociated classes 2019-03-09 09:54:28 +01:00
abzicht 67ee649d99 Added setLink and setClickEvent to gantt 2019-03-08 00:19:53 +01:00
abzicht 57b780a0d7 In render: added calling callback for gantt functions 2019-03-08 00:07:36 +01:00
abzicht 19d9dd6954 Fixed clickStatement to include ids 2019-03-07 22:31:38 +01:00
abzicht e298351caa Added <a href> and callback functionality to gantt diagrams 2019-03-07 22:00:02 +01:00
ivan-danilov 752a12bda4 linkStyle now supports list of indexes with a few tests
For example:
linkStyle 0,1,2 interpolate basis stroke:#00f,stroke-width:2px;

Other variants of linkStyle syntax are also included
2019-02-21 22:06:11 +02:00
João Paulo Poffo afeb3b53c9 Simplified methods 2019-02-12 17:52:18 -02:00
João Paulo Poffo 8ce658416b Simplify to codeclimate 2019-02-12 17:40:57 -02:00
João Paulo Poffo 6e846ac3e5 Defined a renderEndDate 2019-02-12 17:29:38 -02:00
Dan Shai ec298185a3 fix class diagram mermaid 2019-02-12 10:27:05 +02:00
João Paulo Poffo 58df72984f Standard 2019-02-07 12:05:09 -02:00
João Paulo Poffo 5bfddcc444 Complexity 2019-02-07 11:27:01 -02:00
João Paulo Poffo a99b31a61d Standard 2019-02-07 11:22:46 -02:00
João Paulo Poffo 8a8b7bd48c Fixed weekend between dates; Manual endtimes; Additional testing 2019-02-07 11:21:00 -02:00
João Paulo Poffo 1d04c7e1fe Standard JS 2019-02-06 17:25:39 -02:00
João Paulo Poffo 9f1c37ecb3 Codeclimate - Complexity 2019-02-06 17:24:20 -02:00
João Paulo Poffo 8e8651a0e1 Comments 2019-02-06 17:12:05 -02:00
João Paulo Poffo a8e9f21035 Standard 2019-02-06 17:09:59 -02:00
João Paulo Poffo 418ac501aa Added excludes weekdays to gantt 2019-02-06 16:54:09 -02:00
Philipp A 12b58a17e1 SVG link rendering 2019-02-06 10:53:26 +01:00
Gijs van Dam 7ca9df9357 Refactor ganttDb tests 2019-02-04 11:33:24 +08:00
Gijs van Dam f912f8582d Remove MomentJS dependency from Gantt Jest test cases
To reduce the dependencies of the Jest test cases, the moment dates in
both Jest test files are replaced with native javascript. Also the
physical file gantt.spec.js is moved to be in the same folder as
gantt.js
2019-02-04 10:21:58 +08:00
Gijs van Dam a211b6d55d Use it.each in test cases to prevent code repetition 2019-02-01 17:04:43 +08:00
Gijs van Dam c84c154603 Add tests for all possible task tags 2019-02-01 16:16:28 +08:00
Gijs van Dam f903090e0f Refactor tag parsing of tags
The allowed tags are now a const at the top of the code.
Adding a tag there, automatically assigns the property to the
javascript object, if the tag is present in the data.
2019-02-01 14:21:25 +08:00
Gijs van Dam 901df242b7 Replace multiple returns with single return 2019-02-01 13:28:12 +08:00
Gijs van Dam 9dbb3767e2 Extract tag parsing in separate function 2019-02-01 13:27:42 +08:00
Gijs van Dam 5565d36ef2 Fix lint issues 2019-02-01 12:41:03 +08:00
Gijs van Dam 48f8c3f85a Add custom rendering of milestone tasks
If a task is a milestone, the rect shape will be square in the center of
the original width of the rectangular calculated if it weren't a
milestone. The placement of the label text is adjusted accordingly.
Both the rect and the text get a 'milestone' and 'milestoneText' class
accordingly.
The scss rotates the square and scales it a bit down, so that it's a
diamond, which appears to be the defacto standard for milestone icons.
The label text is put in italics.
The rotational transform is done in the scss, so that it's easy for
users to create their own milestone icon-style.
2019-02-01 12:34:55 +08:00
Gijs van Dam a3eef7298e Add milestone to ganttDb 2019-01-31 15:33:35 +08:00
Tyler Long 7d3578b31a
Merge pull request #721 from paulbland/right-angles
Add option for right angles
2018-12-18 14:04:19 +08:00
Tyler Long 2914d4975b Fix arrowhead style issue 2018-12-18 13:55:14 +08:00
Tyler Long 2a0fcd99e4
Merge pull request #720 from paulbland/add-activation-class
Add nested activation classes
2018-12-18 13:39:18 +08:00
Tyler Long d7e0e4afc5 Fix code style issue 2018-12-18 13:32:36 +08:00
Tyler Long de78bb5ffe
Merge pull request #688 from imma90/master
add comments about CSS in config
2018-12-17 17:37:25 +08:00
Tyler Long 9ecee6b163 Generate jison files 2018-12-17 17:31:22 +08:00
Tyler Long e25e8af135 Support latest version of font awesome 2018-12-17 16:27:46 +08:00
Tyler Long 4ab2fed8d2
Merge pull request #757 from gjlubbertsen/master
Fix issue with marker-end.
2018-12-17 15:56:49 +08:00
Tyler Long 3e8fea6533
Merge pull request #764 from watsoncj/master
Support Multi-line Actor Descriptions
2018-12-17 15:53:20 +08:00
Tyler Long a57b90809b
Merge pull request #765 from flying-sheep/links
Render nodes as real links
2018-12-17 15:30:13 +08:00
Tyler Long b097b8bb34
Merge pull request #768 from znxkznxk1030/master
Remove duplicate code
2018-12-17 15:06:00 +08:00
Tyler Long e8aebb00ee Fix typos in test cases 2018-12-17 14:42:52 +08:00
ysKim 6ece2838bd Remove duplicate code 2018-12-05 22:45:03 +09:00
Philipp A bcd3aa7d61 Improved docs, split setClickEvent and setLink 2018-12-01 15:31:57 +01:00
Philipp A aca80726d7 Render nodes as real links 2018-11-28 17:09:34 +01:00
Casey Watson 2fc5745c58 Support Multi-line Actor Descriptions
- Add support for <br/> delimiter in actor descriptions.
- Add actorFontFamily and actorFontSize options to sequence diagram.
- Change default actor description font from times to sans.

Fix #384 #702 #755
2018-11-26 11:49:33 -07:00
Gerrit-Jan Lubbertsen ba2f2cb284
Fix issue with marker-end.
I had issues with marker-end. Assuming that CSS got more strict over time.
2018-11-13 16:32:26 +01:00
Adam Wulf ac2a4b54e7 Adjust the spacing of the trapezoid 2018-10-11 13:46:47 -05:00
Adam Wulf 9326e91832 Adding trapezoid and inverse trapezoid vertex options. 2018-10-10 02:25:44 -05:00
Bland, Paul 06aa4a5c07 prevent deeply nested activations from calling classes that don't exist (by limiting to 3) 2018-08-29 14:24:42 -04:00
Bland, Paul 80c7c9a86e added ability to style nested activations 2018-08-24 11:56:28 -04:00
Bland, Paul 0fdddfe548 make default sequence numbers a little smaller 2018-08-23 14:30:47 -04:00
Bland, Paul 42d66fd3d9 tweak for lint 2018-08-23 11:53:04 -04:00
Bland, Paul ae8dde981b make path a bit wider 2018-08-22 15:30:12 -04:00
Bland, Paul 228b832bed moved hard-coded fill and stroke colors from svgDraw.js to scss files, and added defaults to all themes 2018-08-22 10:22:50 -04:00
Bland, Paul 8035572fac make default node number a little smaller 2018-08-17 13:37:44 -04:00
Bland, Paul 7fcccb4ab2 fixing formatting for lint 2018-08-17 11:07:04 -04:00
Bland, Paul b80bad0a93 created option for right angle arrows 2018-08-17 10:56:15 -04:00
Bland, Paul f87c503d5e fixed issue where some sequence number would be skipped 2018-08-17 10:25:06 -04:00
Bland, Paul 568c0318be centered two-digit sequence numbers 2018-08-17 09:37:49 -04:00
Bland, Paul 5903b33016 typo in word "sequence" 2018-08-16 16:55:28 -04:00
Bland, Paul 47bad33949 change all occurences of node number to "sequence number" 2018-08-16 16:53:30 -04:00
Bland, Paul fb79b133e9 added sequence numbers 2018-08-16 13:44:59 -04:00
Vrixyz ad1763a8f2 wip codeclimate refactoring request 2018-07-30 21:15:28 +02:00
Vrixyz 97e26686f4 wip #602 cardinality display 2018-07-29 18:50:57 +02:00
Imma f476002691 add comments about CSS in config 2018-07-15 19:04:42 +02:00
Tyler Long a4992963b3 Set SVG viewBox 2018-04-12 23:05:08 +08:00
Tyler Long 44ff608868 ultimate solution to position the svg 2018-04-12 09:06:20 +08:00
Tyler Long a5627f97ff Make diamond shape a little bit bigger 2018-03-21 22:06:44 +08:00
Tyler Long 8b1698b17d Fix flowchart text size measuring issue 2018-03-21 21:29:12 +08:00
Tyler Long f8da3c2e48 More padding to fix cutoff issue 2018-03-20 23:04:01 +08:00
Tyler Long 33da5bcee1 Fix flowchart cut off issue 2018-03-20 20:08:52 +08:00
Tyler Long 01541a3dc1 Fix a typo in flowRenderer. Fix #541 2018-03-19 09:31:29 +08:00
Tyler Long 13ec3f6c0d Support all d3 curves 2018-03-18 09:35:28 +08:00
Tyler Long a949c2aaec config.sequenceDiagram backwards compatibility 2018-03-18 09:08:05 +08:00
Tyler Long f4324d1de6 Fix test about curve 2018-03-17 23:19:13 +08:00
Tyler Long f1d2808594 Support flowchart curve as option 2018-03-17 23:05:14 +08:00
Tyler Long 52d0605066 Fix subgraph issue 2018-03-17 18:12:24 +08:00
Tyler Long 015b976c28 Fix CSS cannot select number ID issue 2018-03-17 09:10:10 +08:00
Tyler Long 93201b2ded
Merge pull request #641 from sopherio/master
SequenceDiagram: Add support for multiple alt else statements
2018-03-16 20:03:44 +08:00
Tyler Long 9913bf654b Properly handle wrong theme name 2018-03-15 22:44:00 +08:00
Tyler Long 2d560861df Support Custom CSS 2018-03-15 21:47:53 +08:00
Tyler Long 24786c643b Fix a typo 2018-03-15 21:22:49 +08:00
Stefan Sechelmann 3b4e48e32f remove whitespace to adhere to standards 2018-03-15 14:10:10 +01:00
Stefan Sechelmann 500dea182f change grammar to support multiple alt else statements 2018-03-15 13:57:54 +01:00
Stefan Sechelmann cf589f713d add spec for multiple else statements 2018-03-15 13:56:56 +01:00
Tyler Long 0d0f793f81 Simplify code 2018-03-14 21:38:29 +08:00
Tyler Long 23dfe1e8a9 Fix classDef issue 2018-03-14 21:36:10 +08:00
Tyler Long a8e49a0d2d Auto convert <br> to <br/> 2018-03-13 21:58:37 +08:00
Tyler Long f3fcfb635b Gantt numberSectionStyles should be 4 2018-03-13 21:17:32 +08:00
Tyler Long 3e9215b27d Rename folders 2018-03-13 15:28:48 +08:00
Tyler Long 6ce2dfeaec Remove example graph 2018-03-13 15:19:24 +08:00
Tyler Long 9176237361 Remove dot graph 2018-03-13 15:14:43 +08:00
Tyler Long 9b65abe76a Remove useless code 2018-03-13 15:04:05 +08:00
Tyler Long d6085fcdb9 Rename flow.scss to flowchart.scss 2018-03-13 14:49:46 +08:00
Tyler Long 259d2a9b5c Refactor css loading code 2018-03-13 14:31:56 +08:00
Tyler Long f62736c749 Support customization of gantt diagram xAxis format using diagram code 2018-03-13 14:01:44 +08:00
Tyler Long 7ef1b28c83 Remvoe ganttDb getDateFormat 2018-03-13 13:48:27 +08:00
Tyler Long 7df9dea72a Fix sequence diagram note text y position issue 2018-03-13 13:23:38 +08:00
Tyler Long 2a061fba07 Fix note text y position 2018-03-13 11:06:27 +08:00
Tyler Long 93aa575697 Minor change to code 2018-03-13 10:58:10 +08:00
Tyler Long 8a20a71906 Test a complex sequence diagram 2018-03-13 10:54:39 +08:00
Tyler Long 37076d3d1f Support global config of gantt axisFormat 2018-03-12 21:33:02 +08:00
Tyler Long acf11bdc6c Refactor by renaming 2018-03-12 21:16:22 +08:00
Tyler Long d222196fd1 Refactor by renaming 2018-03-12 21:06:49 +08:00
Tyler Long 6f43082e38 Rename graphDb to flowDb 2018-03-12 20:52:06 +08:00
Tyler Long 964bc4dc12 Rename info to example 2018-03-12 20:46:29 +08:00
Tyler Long ecf7870b3e Refactor scss 2018-03-12 20:21:19 +08:00
Tyler Long 30fcab1c63 Rename scss files 2018-03-12 20:10:33 +08:00
Tyler Long edde501d54 Inline window.getComputedStyle(svg) so you can save the svg. 2018-03-11 23:47:45 +08:00
Tyler Long 5cf061cb32 Fix foreignObject issue 2018-03-11 23:19:38 +08:00
Tyler Long 5b6dfb01a6 Use timestamp to generate uniq id 2018-03-11 22:46:59 +08:00
Tyler Long a0b589979d Simplify API 2018-03-11 22:38:13 +08:00
Tyler Long 0d0cdd0542 Remove render2 method 2018-03-11 22:23:26 +08:00
Tyler Long 2ed515091f Add id as css scope 2018-03-11 21:36:59 +08:00
Tyler Long b093f9fd41 Simplify css code 2018-03-11 20:26:23 +08:00
Tyler Long fde6396f48 Minor change to css code 2018-03-11 20:14:22 +08:00
Tyler Long 11250290a2 Simplify inline css code 2018-03-11 20:10:17 +08:00
Tyler Long be33c41a40 Scope all css rules to .mermaid 2018-03-11 18:24:58 +08:00
Tyler Long e20528ab0d Simplify scss code 2018-03-11 18:06:28 +08:00
Tyler Long a40d89ba0d Simplify SCSS code 2018-03-11 17:26:55 +08:00
Tyler Long c0c7c96f28 Re-generate jison js files 2018-03-11 16:43:02 +08:00
Tyler Long d904574ea8 Replace Karma + Jasmine with Jest 2018-03-10 08:42:59 +08:00
Tyler Long 0a7829fcfe Replace less with scss 2018-03-09 16:23:35 +08:00
Tyler Long 7c970d6ff0 Get rid of global.mermaid_config 2018-03-09 15:13:05 +08:00
Tyler Long 53b97b3ffa Refactor code 2018-03-09 13:46:58 +08:00
Tyler Long 9c101eb8af Add interpolateToCurve util method 2018-03-09 13:33:35 +08:00
Tyler Long dfb1095908 Fix sequence diagram node text alignment 2018-03-09 09:09:41 +08:00
Tyler Long e9f3ad63c6 Remove local d3 file 2018-03-08 21:42:39 +08:00
Tyler Long 6a9bd22904 Remove d3-textwrap 2018-03-08 21:33:23 +08:00
Tyler Long ebbf3bfa77 Fix sequence diagram textWidth issue 2018-03-08 21:10:57 +08:00
Tyler Long 661aaead35 Fix a flowchat selection issue 2018-03-08 21:07:18 +08:00
Tyler Long 197671960d Fix gantt diagram xAxis format 2018-03-07 22:05:54 +08:00
Tyler Long e434ac9a1f Improve gantt diagram code 2018-03-06 19:11:55 +08:00
Tyler Long 388ec2cd97 Get log level correct 2018-03-06 18:56:37 +08:00
Tyler Long 1d7589abb9 Try to fix gantt diagram 2018-03-06 18:41:06 +08:00
Tyler Long da47ba11f8 Fix class diagram 2018-03-06 18:08:50 +08:00
Tyler Long eaa572aafe Fix git graph 2018-03-06 18:05:03 +08:00
Tyler Long d4ac9f8114 Try to upgrade d3 to v4 2018-03-06 16:32:29 +08:00
Tyler Long 7dd174642c Use graphlibrary 2018-03-06 16:04:40 +08:00
Tyler Long 3f55200737 Update some dependencies 2018-03-06 14:37:27 +08:00
Tyler Long 3fbe3a3078
Merge pull request #595 from frankschmitt/spec-fix-1
Spec fix 1
2017-12-26 21:19:55 +08:00
Tyler Long 8848203d90 Fix issues of last PR 2017-12-26 20:58:54 +08:00
Thomas LEVEIL 8cd0e3bb05 flowchart css: add cursor pointer style for class .clickable 2017-12-03 04:36:33 +01:00
Thomas LEVEIL e0f74690b0 flowchart: add class 'clickable' on vertices with link or click function 2017-12-03 04:29:49 +01:00
Frank Schmitt 48ef5d74e8 Several small fixes in the Gantt spec
- removed duplicate test for date spec
 - fixed title of title spec
 - added section to section spec
2017-11-18 16:22:49 +01:00
Frank Schmitt 18117af067 Fixed grammar in Gantt spec 2017-11-18 16:18:24 +01:00
Tyler Long 1ec262becf Get rid of "var " 2017-09-14 21:28:16 +08:00
Tyler Long 6cd5ffe637 Get rid of var 2017-09-14 21:12:35 +08:00
Tyler Long 20b43d8ad1 Get rid of var 2017-09-14 20:59:58 +08:00
Tyler Long f16143de7c Get rid of "var " 2017-09-14 20:53:36 +08:00
Tyler Long daba43dcba Replace var with const 2017-09-14 20:45:14 +08:00
Tyler Long 7c74107f36 Replace var with const 2017-09-14 20:35:00 +08:00
Tyler Long 2e0bfaeb74 Replace var with const 2017-09-14 20:27:52 +08:00
Tyler Long d31e03d04e Replace 'var ' with 'const ' 2017-09-14 20:17:27 +08:00
Tyler Long 8da5f26452 Replace 'var ' with 'const ' 2017-09-14 20:12:54 +08:00
Tyler Long d6e22d5f5e Replace 'var ' with 'const ' 2017-09-14 19:40:38 +08:00
Tyler Long c52f4d6307 Repalce 'var ' with 'const ' 2017-09-14 19:32:35 +08:00
Tyler Long a4348f1963 Inline svg font 2017-09-13 10:15:35 +08:00
Tyler Long fe0434cb16 Release 7.0.17 2017-09-12 23:13:49 +08:00
Tyler Long a6f992ce5b Allow user to configure theme 2017-09-12 22:54:50 +08:00
Tyler Long d430019b44 Remove clone css style code 2017-09-12 22:13:58 +08:00
Tyler Long 72493b7a8b Correct way to handle inline style 2017-09-12 22:06:19 +08:00
Tyler Long b1dffc9eec Fix styleSheets index issue 2017-09-12 16:23:21 +08:00
Tyler Long 75d9e7bc59 webpack fs: 'empty' 2017-09-11 23:06:34 +08:00
Tyler Long c5a7eeaa0f Remove 'fs' as dependency 2017-09-10 23:16:35 +08:00
Tyler Long 4fc082b526 Add export default to diagram files 2017-09-10 22:03:10 +08:00
Tyler Long 2a0bc3b2e8 Add export default to *Db.js 2017-09-10 21:51:48 +08:00
Tyler Long a7d79baf00 Replace require with import 2017-09-10 21:23:04 +08:00
Tyler Long c9442653e9 Replace require with import 2017-09-10 19:41:34 +08:00
Tyler Long 8fe218676a Refactor logger 2017-09-10 17:00:15 +08:00
Tyler Long f6b518ed49 Refactor logger code 2017-09-10 16:56:10 +08:00
Tyler Long a5b7145527 No global mermaidAPI 2017-09-10 10:45:38 +08:00
Tyler Long ee912c2b29 No global mermaid 2017-09-10 10:24:48 +08:00
Tyler Long bdf9b33b10 Remove parseError properties 2017-09-10 10:19:15 +08:00
Tyler Long 167368d508 Throw parseError instead of emit parseError 2017-09-10 10:10:36 +08:00
Tyler Long bb534225b3 Refactor testing code for parseError 2017-09-10 00:47:09 +08:00
Tyler Long ab69dacc6d Restore commented test 2017-09-10 00:31:29 +08:00
Tyler Long 8c2690e01f Emit parseError 2017-09-10 00:29:22 +08:00
Tyler Long fc5c07027c No manual global mermaid 2017-09-09 21:47:21 +08:00
Tyler Long 5da8c26cb6 Replace exports. with module.exports 2017-09-09 17:08:52 +08:00
Tyler Long 626fdfe345 Start to refactor mermaid.js 2017-09-09 16:52:09 +08:00
Tyler Long c071503f19 Refactor logger.js 2017-09-09 15:16:15 +08:00
Tyler Long 873f7a591b Refactor utils.js 2017-09-09 14:46:58 +08:00