Merge branch 'develop' into 3238_Gitgraph_merge_commits

This commit is contained in:
ashishj 2022-08-30 17:44:02 +02:00
commit e542339ed1
57 changed files with 1033 additions and 687 deletions

5
.gitignore vendored
View File

@ -22,4 +22,7 @@ Gemfile.lock
/.vs
cypress/screenshots/
cypress/snapshots/
cypress/snapshots/
# eslint --cache file
.eslintcache

View File

@ -1,8 +1,5 @@
{
"endOfLine": "auto",
"plugins": [
"prettier-plugin-jsdoc"
],
"printWidth": 100,
"singleQuote": true
}

View File

@ -15,20 +15,20 @@ English | [简体中文](./README.zh-CN.md)
## About
<!-- <Main description> -->
Mermaid is a JavaScript based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex diagrams. The main purpose of Mermaid is to help documentation catch up with development.
Mermaid is a JavaScript-based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex diagrams. The main purpose of Mermaid is to help documentation catch up with development.
> Doc-Rot is a Catch-22 that Mermaid helps to solve.
Diagramming and documentation costs precious developer time and gets outdated quickly.
But not having diagrams or docs ruins productivity and hurts organizational learning.<br/>
Mermaid addresses this problem by enabling users to create easily modifiable diagrams, it can also be made part of production scripts (and other pieces of code).<br/>
Mermaid addresses this problem by enabling users to create easily modifiable diagrams. It can also be made part of production scripts (and other pieces of code).<br/>
<br/>
Mermaid allows even non-programmers to easily create detailed diagrams through the [Mermaid Live Editor](https://mermaid.live/).<br/>
[Tutorials](./docs/Tutorials.md) has video tutorials.
Use Mermaid with your favorite applications, check out the list of [Integrations and Usages of Mermaid](./docs/integrations.md).
You can also use Mermaid within [GitHub](https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/) as well many of your other favorite applications, check out the list of [Integrations and Usages of Mermaid](./docs/integrations.md).
You can also use Mermaid within [GitHub](https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/) as well many of your other favorite applicationscheck out the list of [Integrations and Usages of Mermaid](./docs/integrations.md).
For a more detailed introduction to Mermaid and some of its more basic uses, look to the [Beginner's Guide](./docs/n00b-overview.md), [Usage](./docs/usage.md) and [Tutorials](./docs/Tutorials.md).
@ -48,7 +48,7 @@ In our release process we rely heavily on visual regression tests using [applito
## Examples
__The following are some examples of the diagrams, charts and graphs that can be made using Mermaid. Click here jump into the [text syntax](https://mermaid-js.github.io/mermaid/#/n00b-syntaxReference).__
__The following are some examples of the diagrams, charts and graphs that can be made using Mermaid. Click here to jump into the [text syntax](https://mermaid-js.github.io/mermaid/#/n00b-syntaxReference).__
<!-- <Flowchart> -->
### Flowchart [<a href="https://mermaid-js.github.io/mermaid/#/flowchart">docs</a> - <a href="https://mermaid.live/edit#pako:eNpNkMtqwzAQRX9FzKqFJK7t1km8KDQP6KJQSLOLvZhIY1tgS0GWmgbb_165IaFaiXvOFTPqgGtBkEJR6zOv0Fj2scsU8-ft8I5G5Gw6fe339GN7tnrYaafE45WvRsLW3Ya4bKVWwzVe_xU-FfVsc9hR62rLwvw_2591z7Y3FuUwgYZMg1L4ObrRzMBW1FAGqb8KKtCLGWRq8Ko7CbS0FdJqA2mBdUsTQGf110VxSK1xdJM2EkuDzd2qNQrypQ7s5TQuXcrW-ie5VoUsx9yZ2seVtac2DYIRz0ppK3eccd0ErRTjD1XfyyRIomSBUUzJPMaXOBb8GC4XRfQcFmL-FEYIwzD8AggvcHE">live editor</a>]
@ -125,7 +125,7 @@ gantt
classDiagram
Class01 <|-- AveryLongClass : Cool
<<Interface>> Class01
Class09 --> C2 : Where am i?
Class09 --> C2 : Where am I?
Class09 --* C3
Class09 --|> Class07
Class07 : equals()
@ -143,7 +143,7 @@ class Class10 {
classDiagram
Class01 <|-- AveryLongClass : Cool
<<Interface>> Class01
Class09 --> C2 : Where am i?
Class09 --> C2 : Where am I?
Class09 --* C3
Class09 --|> Class07
Class07 : equals()

View File

@ -106,7 +106,7 @@ gantt
classDiagram
Class01 <|-- AveryLongClass : Cool
<<Interface>> Class01
Class09 --> C2 : Where am i?
Class09 --> C2 : Where am I?
Class09 --* C3
Class09 --|> Class07
Class07 : equals()
@ -124,7 +124,7 @@ class Class10 {
classDiagram
Class01 <|-- AveryLongClass : Cool
<<Interface>> Class01
Class09 --> C2 : Where am i?
Class09 --> C2 : Where am I?
Class09 --* C3
Class09 --|> Class07
Class07 : equals()

View File

@ -42,8 +42,8 @@ export const imgSnapshotTest = (graphStr, _options, api = false, validation) =>
if (!options.fontSize) {
options.fontSize = '16px';
}
// const useAppli = Cypress.env('useAppli');
const useAppli = false;
const useAppli = Cypress.env('useAppli');
//const useAppli = false;
const branch = Cypress.env('codeBranch');
cy.log('Hello ' + useAppli ? 'Appli' : 'image-snapshot');
const name = (options.name || cy.state('runnable').fullTitle()).replace(/\s+/g, '-');

View File

@ -112,7 +112,7 @@ describe('Entity Relationship Diagram', () => {
);
cy.get('svg').should((svg) => {
expect(svg).to.have.attr('width', '100%');
expect(svg).to.have.attr('height', '465');
// expect(svg).to.have.attr('height', '465');
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
@ -134,7 +134,7 @@ describe('Entity Relationship Diagram', () => {
const width = parseFloat(svg.attr('width'));
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(width).to.be.within(140 * 0.95, 140 * 1.05);
expect(svg).to.have.attr('height', '465');
// expect(svg).to.have.attr('height', '465');
expect(svg).to.not.have.attr('style');
});
});
@ -167,11 +167,26 @@ describe('Entity Relationship Diagram', () => {
cy.get('svg');
});
it.only('should render entities with generic and array attributes', () => {
renderGraph(
`
erDiagram
BOOK {
string title
string[] authors
type~T~ type
}
`,
{ logLevel: 1 }
);
cy.get('svg');
});
it('should render entities and attributes with big and small entity names', () => {
renderGraph(
`
erDiagram
PRIVATE_FINANCIAL_INSTITUTION {
PRIVATE_FINANCIAL_INSTITUTION {
string name
int turnover
}
@ -191,9 +206,9 @@ describe('Entity Relationship Diagram', () => {
string name PK
}
AUTHOR_WITH_LONG_ENTITY_NAME }|..|{ BOOK : writes
BOOK {
BOOK {
float price
string author FK
string author FK
string title PK
}
`,
@ -210,8 +225,8 @@ describe('Entity Relationship Diagram', () => {
string name "comment"
}
AUTHOR_WITH_LONG_ENTITY_NAME }|..|{ BOOK : writes
BOOK {
string author
BOOK {
string author
string title "author comment"
float price "price comment"
}
@ -229,11 +244,11 @@ describe('Entity Relationship Diagram', () => {
string name PK "comment"
}
AUTHOR_WITH_LONG_ENTITY_NAME }|..|{ BOOK : writes
BOOK {
BOOK {
string description
float price "price comment"
string title PK "title comment"
string author FK
string author FK
}
`,
{ logLevel: 1 }

View File

@ -42,7 +42,7 @@ describe('Flowchart v2', () => {
P3 --> P6
P1.5 --> P5
`,
{ flowchart: { diagramPadding: 0 } }
{}
);
});
@ -60,7 +60,7 @@ describe('Flowchart v2', () => {
C <-...-> E4
C ======> E5
`,
{ flowchart: { diagramPadding: 0 } }
{}
);
});
it('5: should render escaped without html labels', () => {
@ -92,10 +92,10 @@ describe('Flowchart v2', () => {
);
cy.get('svg').should((svg) => {
expect(svg).to.have.attr('width', '100%');
expect(svg).to.have.attr('height');
// expect(svg).to.have.attr('height');
// use within because the absolute value can be slightly different depending on the environment ±5%
const height = parseFloat(svg.attr('height'));
expect(height).to.be.within(446 * 0.95, 446 * 1.05);
// const height = parseFloat(svg.attr('height'));
// expect(height).to.be.within(446 * 0.95, 446 * 1.05);
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
@ -114,10 +114,10 @@ describe('Flowchart v2', () => {
{ flowchart: { useMaxWidth: false } }
);
cy.get('svg').should((svg) => {
const height = parseFloat(svg.attr('height'));
// const height = parseFloat(svg.attr('height'));
const width = parseFloat(svg.attr('width'));
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(height).to.be.within(446 * 0.95, 446 * 1.05);
// expect(height).to.be.within(446 * 0.95, 446 * 1.05);
expect(width).to.be.within(290 * 0.95 - 1, 290 * 1.05);
expect(svg).to.not.have.attr('style');
});
@ -652,4 +652,15 @@ flowchart RL
{ htmlLabels: true, flowchart: { htmlLabels: true }, securityLevel: 'loose' }
);
});
it('2824: Clipping of edges', () => {
imgSnapshotTest(
`
flowchart TD
A --> B
A --> C
B --> C
`,
{ htmlLabels: true, flowchart: { htmlLabels: true }, securityLevel: 'loose' }
);
});
});

View File

@ -744,10 +744,10 @@ describe('Graph', () => {
);
cy.get('svg').should((svg) => {
expect(svg).to.have.attr('width', '100%');
expect(svg).to.have.attr('height');
// expect(svg).to.have.attr('height');
// use within because the absolute value can be slightly different depending on the environment ±5%
const height = parseFloat(svg.attr('height'));
expect(height).to.be.within(446 * 0.95, 446 * 1.05);
// const height = parseFloat(svg.attr('height'));
// expect(height).to.be.within(446 * 0.95, 446 * 1.05);
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
@ -766,10 +766,10 @@ describe('Graph', () => {
{ flowchart: { useMaxWidth: false } }
);
cy.get('svg').should((svg) => {
const height = parseFloat(svg.attr('height'));
// const height = parseFloat(svg.attr('height'));
const width = parseFloat(svg.attr('width'));
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(height).to.be.within(446 * 0.95, 446 * 1.05);
// expect(height).to.be.within(446 * 0.95, 446 * 1.05);
expect(width).to.be.within(300 * 0.95, 300 * 1.05);
expect(svg).to.not.have.attr('style');
});

View File

@ -163,6 +163,24 @@ describe('Gantt diagram', () => {
);
});
it('should handle milliseconds', () => {
imgSnapshotTest(
`
gantt
title A Gantt Diagram
dateFormat x
axisFormat %L
section Section
A task :a1, 0, 30ms
Another task :after a1, 20ms
section Another
Another another task :b1, 20, 12ms
Another another another task :after b1, 24ms
`,
{}
);
});
it('should render a gantt diagram when useMaxWidth is true (default)', () => {
renderGraph(
`
@ -200,10 +218,10 @@ describe('Gantt diagram', () => {
);
cy.get('svg').should((svg) => {
expect(svg).to.have.attr('width', '100%');
expect(svg).to.have.attr('height');
// expect(svg).to.have.attr('height');
// use within because the absolute value can be slightly different depending on the environment ±5%
const height = parseFloat(svg.attr('height'));
expect(height).to.be.within(484 * 0.95, 484 * 1.05);
// const height = parseFloat(svg.attr('height'));
// expect(height).to.be.within(484 * 0.95, 484 * 1.05);
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
@ -247,10 +265,10 @@ describe('Gantt diagram', () => {
{ gantt: { useMaxWidth: false } }
);
cy.get('svg').should((svg) => {
const height = parseFloat(svg.attr('height'));
// const height = parseFloat(svg.attr('height'));
const width = parseFloat(svg.attr('width'));
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(height).to.be.within(484 * 0.95, 484 * 1.05);
// expect(height).to.be.within(484 * 0.95, 484 * 1.05);
expect(width).to.be.within(984 * 0.95, 984 * 1.05);
expect(svg).to.not.have.attr('style');
});

View File

@ -42,8 +42,8 @@ section Checkout from website
cy.get('svg').should((svg) => {
expect(svg).to.have.attr('width', '100%');
expect(svg).to.have.attr('height');
const height = parseFloat(svg.attr('height'));
expect(height).to.eq(565);
// const height = parseFloat(svg.attr('height'));
// expect(height).to.eq(565);
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));

View File

@ -48,9 +48,9 @@ describe('Pie Chart', () => {
);
cy.get('svg').should((svg) => {
expect(svg).to.have.attr('width', '100%');
expect(svg).to.have.attr('height');
const height = parseFloat(svg.attr('height'));
expect(height).to.eq(450);
// expect(svg).to.have.attr('height');
// const height = parseFloat(svg.attr('height'));
// expect(height).to.eq(450);
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
@ -68,9 +68,9 @@ describe('Pie Chart', () => {
{ pie: { useMaxWidth: false } }
);
cy.get('svg').should((svg) => {
const height = parseFloat(svg.attr('height'));
// const height = parseFloat(svg.attr('height'));
const width = parseFloat(svg.attr('width'));
expect(height).to.eq(450);
// expect(height).to.eq(450);
expect(width).to.eq(984);
expect(svg).to.not.have.attr('style');
});

View File

@ -734,9 +734,9 @@ context('Sequence diagram', () => {
);
cy.get('svg').should((svg) => {
expect(svg).to.have.attr('width', '100%');
expect(svg).to.have.attr('height');
const height = parseFloat(svg.attr('height'));
expect(height).to.be.within(920, 971);
// expect(svg).to.have.attr('height');
// const height = parseFloat(svg.attr('height'));
// expect(height).to.be.within(920, 971);
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
@ -773,9 +773,9 @@ context('Sequence diagram', () => {
{ sequence: { useMaxWidth: false } }
);
cy.get('svg').should((svg) => {
const height = parseFloat(svg.attr('height'));
// const height = parseFloat(svg.attr('height'));
const width = parseFloat(svg.attr('width'));
expect(height).to.be.within(920, 971);
// expect(height).to.be.within(920, 971);
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(width).to.be.within(820 * 0.95, 820 * 1.05);
expect(svg).to.not.have.attr('style');

View File

@ -480,14 +480,14 @@ stateDiagram-v2
);
cy.get('svg').should((svg) => {
expect(svg).to.have.attr('width', '100%');
expect(svg).to.have.attr('height');
const height = parseFloat(svg.attr('height'));
expect(height).to.be.within(177, 178);
// expect(svg).to.have.attr('height');
// const height = parseFloat(svg.attr('height'));
// expect(height).to.be.within(177, 178);
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(maxWidthValue).to.be.within(135 * 0.95, 135 * 1.05);
expect(maxWidthValue).to.be.within(65, 85);
});
});
it('v2 should render a state diagram when useMaxWidth is false', () => {
@ -501,11 +501,11 @@ stateDiagram-v2
{ state: { useMaxWidth: false } }
);
cy.get('svg').should((svg) => {
const height = parseFloat(svg.attr('height'));
// const height = parseFloat(svg.attr('height'));
const width = parseFloat(svg.attr('width'));
expect(height).to.be.within(177, 178);
// expect(height).to.be.within(177, 178);
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(width).to.be.within(135 * 0.95, 135 * 1.05);
expect(width).to.be.within(65, 85);
expect(svg).to.not.have.attr('style');
});
});

View File

@ -357,16 +357,16 @@ describe('State diagram', () => {
);
cy.get('svg').should((svg) => {
expect(svg).to.have.attr('width', '100%');
expect(svg).to.have.attr('height');
const height = parseFloat(svg.attr('height'));
expect(height).to.be.within(176, 178);
// expect(svg).to.have.attr('height');
// const height = parseFloat(svg.attr('height'));
// expect(height).to.be.within(176, 178);
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
// use within because the absolute value can be slightly different depending on the environment ±5%
// Todo investigate difference
// expect(maxWidthValue).to.be.within(112 * .95, 112 * 1.05);
expect(maxWidthValue).to.be.within(130, 140);
expect(maxWidthValue).to.be.within(65, 85);
});
});
it('should render a state diagram when useMaxWidth is false', () => {
@ -379,13 +379,13 @@ describe('State diagram', () => {
{ state: { useMaxWidth: false } }
);
cy.get('svg').should((svg) => {
const height = parseFloat(svg.attr('height'));
// const height = parseFloat(svg.attr('height'));
const width = parseFloat(svg.attr('width'));
expect(height).to.be.within(176, 178);
// expect(height).to.be.within(176, 178);
// use within because the absolute value can be slightly different depending on the environment ±5%
// Todo investigate difference
// expect(width).to.be.within(112 * .95, 112 * 1.05);
expect(width).to.be.within(130, 140);
expect(width).to.be.within(65, 85);
expect(svg).to.not.have.attr('style');
});

View File

@ -21,9 +21,14 @@
h1 { color: grey;}
.mermaid2,.mermaid3 {
display: none;
}
.mermaid {
}
.mermaid svg {
border: 1px solid purple;
/* font-size: 18px !important; */
fontFamily: 'courier'
}
</style>
</head>
@ -51,24 +56,48 @@ flowchart LR
O0 -- has type -->O2["Bug"]
click O0 function "Lots of great info about Joe<br>Lots of great info about Joe<br>burt<br>fred";
</div>
<div class="mermaid2" style="width: 50%;">
flowchart TD
subgraph test
direction TB
subgraph test2
direction LR
F --> D
end
subgraph test3
direction TB
G --> H
end
end
</div>
<div class="mermaid" style="width: 50%;">
classDiagram-v2
class Shape
link Shape "https://www.github.com" "This is a<br/>tooltip<br>for a link"
class Shape2
click Shape2 href "https://www.github.com" "This is a tooltip for a link"
flowchart TD
id
</div>
<div class="mermaid2" style="width: 50%;">
gitGraph
commit
commit
branch develop
commit
commit
commit
checkout main
commit
commit
flowchart LR
a["<strong>Haiya</strong>"]===>b
</div>
<div class="mermaid2" style="width: 50%;">
flowchart TD
A --> B
A --> C
B --> C
</div>
<div class="mermaid2" style="width: 50%;">
flowchart TD
A([stadium shape test])
A -->|Get money| B([Go shopping])
B --> C([Let me think...<br />Do I want something for work,<br />something to spend every free second with,<br />or something to get around?])
C -->|One| D([Laptop])
C -->|Two| E([iPhone])
C -->|Three| F([Car<br/>wroom wroom])
click A "index.html#link-clicked" "link test"
click B testClick "click test"
classDef someclass fill:#f96;
class A someclass;
class C someclass;
</div>
<div class="mermaid2" style="width: 50%;">
sequenceDiagram
@ -307,10 +336,12 @@ flowchart TD
startOnLoad: true,
securityLevel: 'loose',
logLevel: 0,
fontFamily: 'courier',
flowchart: {
curve: 'basis',
useMaxWidth: false,
htmlLabels: true,
// curve: 'curveLinear',
useMaxWidth: true,
htmlLabels: false,
fontFamily: 'courier',
},
});
function callback() {

View File

@ -31,28 +31,28 @@ The three levels of are Configuration, Global, Site and Current.
The modifiable parts of the Configuration are limited by the secure array, which is an array of immutable parameters, this array can be expanded by site owners.
**Notes**: secure arrays work like nesting dolls, with the Global Configurations secure array being the default and immutable list of immutable parameters, or the smallest doll, to which site owners may add to, but implementors may not modify it.
**Notes**: secure arrays work like nesting dolls, with the Global Configurations secure array holding the default and immutable list of immutable parameters, or the smallest doll, to which site owners may add to, but implementors may not modify it.
# Secure Arrays
Site owners can add to the **secure** array using this command:
mermaidAPI.initialize( { startOnLoad: true, secure: ['parameter1', 'parameter2'] } );
default values for the `secure array` consists of: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize']. These default values are immutable.
Default values for the `secure array` consists of: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize']. These default values are immutable.
Implementors can only modify configurations using directives, but cannot change the `secure` array.
Implementors can only modify configurations using directives, and cannot change the `secure` array.
# Modifying Configurations and directives:
The Two types of directives: are `init` or `initialize` and `wrap`.
The Two types of directives: are `init` (or `initialize`) and `wrap`.
```note
All directives are enclosed in `%%{ }%%`
```
Older versions of mermaid will not parse directives because `%%` will comment out the directive. This makes the update backward compatible.
Older versions of mermaid will not parse directives because `%%` will comment out the directive. This makes the update backwards-compatible.
# Init
`init`, or `initialize`: the init or initialize directive gives the user the ability to overwrite and change the values for configuration parameters, with respect to the secure array that is in effect.
`init`, or `initialize`: this directive gives the user the ability to overwrite and change the values for any configuration parameters not set in the secure array.
| Parameter | Description |Type | Required | Values|
| --- | --- | --- | --- | --- |
@ -67,7 +67,7 @@ The json object that is passed as {**argument** } must be valid, quoted json or
`%%{init: {"theme": "default", "logLevel": 1 }}%%`
Configurations that are passed through init cannot change the parameters in secure arrays of higher levels. In the event of a conflict, mermaid will give priority to secure arrays and parse the request, without changing the values of the parameters in conflict.
Configurations that are passed through init cannot change the parameters in a secure array at a higher level. In the event of a collision, mermaid will give priority to secure arrays and parse the request without changing the values of those parameters in conflict.
When deployed within code, init is called before the graph/diagram description.
```
@ -93,14 +93,14 @@ When deployed within code, init is called before the graph/diagram description.
```note
Wrap is a function that is currently only deployable for sequence diagrams.
wrap respects manually added <br\> so if the user wants to break up their text, they have full control over those breaks by adding their own <br\> tags.
Wrap respects a manually added <br\>, so if the user wants to break up their text, they have full control over line breaks by adding <br\> tags.
It is a non-argument directive and can be executed thusly:
`%%{wrap}%%` .
```
**an example of text wrapping in a sequence diagram**:
**An example of text wrapping in a sequence diagram**:
![Image showing wrapped text](img/wrapped%20text.png)
@ -108,16 +108,16 @@ It is a non-argument directive and can be executed thusly:
# Resetting Configurations:
There are two more functions in the mermaidAPI that can be called by site owners: **reset** and **globalReset**.
**reset**: resets the configuration to whatever the last configuration was. This can be done to undo more recent changes to the last mermaidAPI.initialize({...}) configuration.
**reset**: resets the configuration to whatever the last configuration was. This can be done to undo more recent changes set from the last mermaidAPI.initialize({...}) configuration.
**globalReset** will reset both the current configuration AND the site configuration back to the global defaults.
**Notes**: both reset and globalReset are only available to site owners, as such implementors would have to edit their configs with init.
**Notes**: Both `reset` and `globalReset` are only available to site owners, and as such implementors have to edit their configs using `init`.
# Additional Utils to mermaid
**memoize**: simple caching for computationally expensive functions. It reduces the rendering time for computationally intensive diagrams by about 90%.
**memoize**: simple caching for computationally expensive functions, reducing rendering time by about 90%.
**assignWithDepth** - this is an improvement on previous functions with config.js and Object.assign. The purpose of this function is to provide a sane mechanism for merging objects, similar to object.assign, but with depth.
**assignWithDepth** - an improvement on previous functions with config.js and `Object.assign`. The purpose of this function is to provide a sane mechanism for merging objects, similar to `object.assign`, but with depth.
Example of **assignWithDepth**:
@ -128,9 +128,9 @@ Example of **object.Assign**:
![Image showing object.assign without depth](img/object.assign%20without%20depth.png)
**calculateTextDimensions, calculateTextWidth,** and **calculateTextHeight** - for measuring text dimensions, width and height.
**calculateTextDimensions**, **calculateTextWidth** and **calculateTextHeight** - for measuring text dimensions, width and height.
**Notes**:For more information on usage, parameters, and return info for these new functions take a look at the jsdocs for them in the utils package.
**Notes**: For more information on usage, parameters, and return info for these new functions take a look at the jsdocs for them in the utils package.
# New API Requests Introduced in Version 8.6.0
@ -139,21 +139,21 @@ Example of **object.Assign**:
| Function | Description | Type | Values |Parameters|Returns|
| --------- | ------------------- | ------- | ------------------ | ------------------ | ------------------ |
| setSiteConfig|Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array|conf|siteConfig|
| `setSiteConfig`|Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array|conf|siteConfig|
```note
Sets the siteConfig. The siteConfig is a protected configuration for repeat use. Calls to reset() will reset
the currentConfig to siteConfig. Calls to reset(configApi.defaultConfig) will reset siteConfig and currentConfig
to the defaultConfig
Note: currentConfig is set in this function
Default value: At default, will mirror Global Config
Note: currentConfig is set in this function
Default value: will mirror Global Config
```
## getSiteConfig
| Function | Description | Type | Values |
| --------- | ------------------- | ------- | ------------------ |
| setSiteConfig|Returns the current siteConfig base configuration | Get Request | Returns Any Values in siteConfig|
| `getSiteConfig`|Returns the current `siteConfig` base configuration | Get Request | Returns Any Values in `siteConfig`|
```note
Returns any values in siteConfig.
@ -163,7 +163,7 @@ Returns any values in siteConfig.
| Function | Description | Type | Values |Parameters|Returns|
| --------- | ------------------- | ------- | ------------------ |----------|-------|
| setSiteConfig|Sets the siteConfig to desired values | Put Request| Any Values, those in secure array|conf|currentConfig merged with the sanitized conf|
| `setConfig`|Sets the `currentConfig` to desired values | Put Request| Any Values, those in secure array|conf|`currentConfig` merged with the sanitized conf|
```note
Sets the currentConfig. The parameter conf is sanitized based on the siteConfig.secure keys. Any
@ -175,7 +175,7 @@ siteConfig value.
| Function | Description | Type | Return Values |
| --------- | ------------------- | ------- | ------------------ |
| getConfig |Obtains the currentConfig | Get Request | Any Values from currentConfig|
| `getConfig` |Obtains the `currentConfig` | Get Request | Any Values from `currentConfig`|
```note
@ -186,7 +186,7 @@ Returns any values in currentConfig.
| Function | Description | Type | Values |
| --------- | ------------------- | ------- | ------------------ |
| sanitize |Sets the siteConfig to desired values. | Put Request(?) |None|
| `sanitize` |Sets the `siteConfig` to desired values. | Put Request(?) |None|
```note
modifies options in-place
@ -197,13 +197,13 @@ Ensures options parameter does not attempt to override siteConfig secure keys.
| Function | Description | Type | Required | Values |Parameter|
| --------- | -------------------| ------- | -------- | ------------------ |---------|
| reset|Resets currentConfig to conf| Put Request | Required | None| conf|
| `reset`|Resets `currentConfig` to conf| Put Request | Required | None| conf|
## conf
| Parameter | Description |Type | Required | Values|
| --- | --- | --- | --- | --- |
| conf| base set of values, which currentConfig could be reset to.| Dictionary | Required | Any Values, with respect to the secure Array|
| `conf`| base set of values, which `currentConfig` could be reset to.| Dictionary | Required | Any Values, with respect to the secure Array|
```note
default: current siteConfig (optional, default `getSiteConfig()`)

View File

@ -1,6 +1,6 @@
# Change Log
Here is the list of the newest versions in Descending Order, beginning from the latest version.
All changes are in descending order, beginning with the newest (latest) version.
## Unreleased

View File

@ -72,9 +72,9 @@ Theme , the CSS style sheet
## securityLevel
| Parameter | Description | Type | Required | Values |
| ------------- | --------------------------------- | ------ | -------- | ------------------------------- |
| securitylevel | Level of trust for parsed diagram | string | Required | 'strict', 'loose', 'antiscript' |
| Parameter | Description | Type | Required | Values |
| ------------- | --------------------------------- | ------ | -------- | ------------------------------------------ |
| securityLevel | Level of trust for parsed diagram | string | Required | 'sandbox', 'strict', 'loose', 'antiscript' |
**Notes**:
@ -82,6 +82,9 @@ Theme , the CSS style sheet
- **loose**: tags in text are allowed, click functionality is enabled
- **antiscript**: html tags in text are allowed, (only script element is removed), click
functionality is enabled
- **sandbox**: With this security level all rendering takes place in a sandboxed iframe. This
prevent any JavaScript from running in the context. This may hinder interactive functionality
of the diagram like scripts, popups in sequence diagram or links to other tabs/targets etc.
## startOnLoad
@ -1471,6 +1474,21 @@ Returns **any** The currentConfig merged with the sanitized conf
Returns **any** The currentConfig
## sanitize
## sanitize
| Function | Description | Type | Values |
| -------- | -------------------------------------- | ----------- | ------ |
| sanitize | Sets the siteConfig to desired values. | Put Request | None |
Ensures options parameter does not attempt to override siteConfig secure keys **Notes**: modifies
options in-place
### Parameters
- `options` **any** The potential setConfig parameter
## render
Function that renders an svg with a graph from a chart definition. Usage example below.
@ -1494,26 +1512,11 @@ $(function () {
- `_txt` **any** The graph definition
- `cb` **any** Callback which is called after rendering is finished with the svg code as inparam.
- `container` **any** Selector to element in which a div with the graph temporarily will be
inserted. In one is provided a hidden div will be inserted in the body of the page instead. The
inserted. If one is provided a hidden div will be inserted in the body of the page instead. The
element will be removed when rendering is completed.
Returns **any**
## sanitize
## sanitize
| Function | Description | Type | Values |
| -------- | -------------------------------------- | ----------- | ------ |
| sanitize | Sets the siteConfig to desired values. | Put Request | None |
Ensures options parameter does not attempt to override siteConfig secure keys **Notes**: modifies
options in-place
### Parameters
- `options` **any** The potential setConfig parameter
## addDirective
Pushes in a directive to the configuration

View File

@ -6,7 +6,7 @@
- 📊 Diagram Syntax
- [Flowchart](flowchart.md)
- [Sequence diagram](sequenceDiagram.md)
- [Sequence Diagram](sequenceDiagram.md)
- [Class Diagram](classDiagram.md)
- [State Diagram](stateDiagram.md)
- [Entity Relationship Diagram](entityRelationshipDiagram.md)

View File

@ -24,7 +24,7 @@ mermaid.initialize({
## #2
In old versions you need to add CSS file to your HTML:
In old versions you needed to reference a CSS file in your HTML:
```html
<link rel="stylesheet" href="mermaid.min.css">
@ -36,9 +36,9 @@ or
<link rel="stylesheet" href="mermaid.forest.min.css">
```
Now it is not needed to do so. And there are no more CSS files in distribution files.
Now it is not needed, and there are no more CSS files in the distribution files.
You just
You just:
```javascript
mermaid.initialize({
@ -46,6 +46,4 @@ mermaid.initialize({
})
```
and it works like a charm.
This is because now the CSS is inline with SVG for portability.
and it works like a charm because now the CSS is inline with the SVG to allow simpler portability.

View File

@ -3,7 +3,7 @@
> "In software engineering, a class diagram in the Unified Modeling Language (UML) is a type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes, operations (or methods), and the relationships among objects."
> Wikipedia
The class diagram is the main building block of object-oriented modeling. It is used for general conceptual modeling of the structure of the application, and for detailed modeling translating the models into programming code. Class diagrams can also be used for data modeling. The classes in a class diagram represent both the main elements, interactions in the application, and the classes to be programmed.
The class diagram is the main building block of object-oriented modeling. It is used for general conceptual modeling of the structure of the application, and for detailed modeling to translate the models into programming code. Class diagrams can also be used for data modeling. The classes in a class diagram represent both the main elements, interactions in the application, and the classes to be programmed.
Mermaid can render class diagrams.
@ -56,8 +56,8 @@ classDiagram
There are two ways to define a class:
- Explicitly defining a class using keyword **class** like `class Animal`. This defines the Animal class
- Define two classes via a **relationship** between them `Vehicle <|-- Car`. This defines two classes Vehicle and Car along with their relationship.
- Explicitly using keyword **class** like `class Animal` which would define the Animal class.
- Via a **relationship** which defines two classes at a time along with their relationship. For instance, `Vehicle <|-- Car`.
```mermaid-example
classDiagram
@ -65,13 +65,13 @@ classDiagram
Vehicle <|-- Car
```
Naming convention: a class name should be composed of alphanumeric (unicode allowed) and underscore characters.
Naming convention: a class name should be composed only of alphanumeric characters (including unicode), and underscores.
## Defining Members of a class
UML provides mechanisms to represent class members, such as attributes and methods, and additional information about them.
UML provides mechanisms to represent class members such as attributes and methods, as well as additional information about them.
Mermaid distinguishes between attributes and functions/methods based on if the **parenthesis** `()` are present or not. The ones with `()` are treated as functions/methods, and others as attributes.
Mermaid distinguishes between attributes and functions/methods based on if the **parenthesis** `()` are present or not. The ones with `()` are treated as functions/methods, and all others as attributes.
There are two ways to define the members of a class, and regardless of whichever syntax is used to define the members, the output will still be same. The two different ways are :
@ -100,8 +100,7 @@ class BankAccount{
#### Return Type
Optionally you can end the method/function definition with the data type that will be returned (note: there must be a space between the final `)` of the method definition and return type
example:
Optionally you can end a method/function definition with the data type that will be returned (note: there must be a space between the final `)` and the return type). An example:
```mermaid-example
classDiagram
@ -115,9 +114,9 @@ class BankAccount{
#### Generic Types
Members can be defined using generic types, such as `List<int>`, for fields, parameters and return types by enclosing the type within `~` (**tilde**). Note: **nested** type declarations (such as `List<List<int>>`) are not currently supported
Members can be defined using generic types, such as `List<int>`, for fields, parameters, and return types by enclosing the type within `~` (**tilde**). Note: **nested** type declarations such as `List<List<int>>` are not currently supported.
This can be done as part of either class definition method:
Generics can be represented as part of a class definition and also in the parameters or the return value of a method/function:
```mermaid-example
classDiagram
@ -135,26 +134,25 @@ Square : +getMessages() List~string~
#### Return Type
Optionally you can end the method/function definition with the data type that will be returned
Optionally you can end the method/function definition with the data type that will be returned.
#### Visibility
To specify the visibility of a class member (i.e. any attribute or method), these notations may be placed before the member's name, but it is optional:
To describe the visibility (or encapsulation) of an attribute or method/function that is a part of a class (i.e. a class member), optional notation may be placed before that members' name:
- `+` Public
- `-` Private
- `#` Protected
- `~` Package/Internal
> _note_ you can also include additional _classifiers_ to a method definition by adding the following notations to the end of the method, i.e.: after the `()`:
> _note_ you can also include additional _classifiers_ to a method definition by adding the following notation to the _end_ of the method, i.e.: after the `()`:
> - `*` Abstract e.g.: `someAbstractMethod()*`
> - `$` Static e.g.: `someStaticMethod()$`
> _note_ you can also include additional _classifiers_ to a field definition by adding the following notations to the end of the field name:
> _note_ you can also include additional _classifiers_ to a field definition by adding the following notation to the end of its name:
> - `$` Static e.g.: `String someField$`
## Defining Relationship
A relationship is a general term covering the specific types of logical connections found on class and object diagrams.
@ -163,7 +161,7 @@ A relationship is a general term covering the specific types of logical connecti
[classA][Arrow][ClassB]
```
There are different types of relations defined for classes under UML which are currently supported:
There are eight different types of relations defined for classes under UML which are currently supported:
| Type | Description |
| ----- | ------------- |
@ -189,7 +187,7 @@ classO .. classP
```
We can use the labels to describe nature of relation between two classes. Also, arrowheads can be used in opposite directions as well :
We can use the labels to describe the nature of the relation between two classes. Also, arrowheads can be used in the opposite direction as well:
```mermaid-example
classDiagram
@ -206,7 +204,7 @@ classO .. classP : Link(Dashed)
### Labels on Relations
It is possible to add a label text to a relation:
It is possible to add label text to a relation:
```
[classA][Arrow][ClassB]:LabelText
@ -221,7 +219,7 @@ classE o-- classF : aggregation
### Two-way relations
Relations can go in multiple ways:
Relations can logically represent an N:M association:
```mmd
classDiagram
@ -255,9 +253,9 @@ And `Link` can be one of:
## Cardinality / Multiplicity on relations
Multiplicity or cardinality in class diagrams indicates the number of instances of one class linked to one instance of the other class. For example, one company will have one or more employees, but each employee works for just one company.
Multiplicity or cardinality in class diagrams indicates the number of instances of one class that can be linked to an instance of the other class. For example, each company will have one or more employees (not zero), and each employee currently works for zero or one companies.
Multiplicity notations are placed near the ends of an association.
Multiplicity notations are placed near the end of an association.
The different cardinality options are :
@ -269,7 +267,7 @@ The different cardinality options are :
- `0..n` zero to n {where n>1}
- `1..n` one to n {where n>1}
Cardinality can be easily defined by placing cardinality text within quotes `"` before(optional) and after(optional) a given arrow.
Cardinality can be easily defined by placing the text option within quotes `"` before or after a given arrow. For example:
```
[classA] "cardinality1" [Arrow] "cardinality2" [ClassB]:LabelText
@ -284,16 +282,16 @@ classDiagram
## Annotations on classes
It is possible to annotate classes with a specific marker text which is like meta-data for the class, giving a clear indication about its nature. Some common annotations examples could be:
It is possible to annotate classes with markers to provide additional metadata about the class. This can give a clearer indication about its nature. Some common annotations include:
- `<<Interface>>` To represent an Interface class
- `<<abstract>>` To represent an abstract class
- `<<Abstract>>` To represent an abstract class
- `<<Service>>` To represent a service class
- `<<enumeration>>` To represent an enum
- `<<Enumeration>>` To represent an enum
Annotations are defined within the opening `<<` and closing `>>`. There are two ways to add an annotation to a class and regardless of the syntax used output will be same. The two ways are :
Annotations are defined within the opening `<<` and closing `>>`. There are two ways to add an annotation to a class, and either way the output will be same:
- In a **_separate line_** after a class is defined. For example:
- In a **_separate line_** after a class is defined:
```mermaid-example
classDiagram
@ -303,7 +301,7 @@ Shape : noOfVertices
Shape : draw()
```
- In a **_nested structure_** along with class definition. For example:
- In a **_nested structure_** along with the class definition:
```mermaid-example
classDiagram
@ -325,7 +323,7 @@ class Color{
## Comments
Comments can be entered within a class diagram, which will be ignored by the parser. Comments need to be on their own line, and must be prefaced with `%%` (double percent signs). Any text after the start of the comment to the next newline will be treated as a comment, including any class diagram syntax
Comments can be entered within a class diagram, which will be ignored by the parser. Comments need to be on their own line, and must be prefaced with `%%` (double percent signs). Any text until the next newline will be treated as a comment, including any class diagram syntax.
```mmd
classDiagram
@ -335,12 +333,11 @@ class Shape{
noOfVertices
draw()
}
```
## Setting the direction of the diagram
With class diagrams you can use the direction statement to set the direction which the diagram will render like in this example.
With class diagrams you can use the direction statement to set the direction in which the diagram will render:
```mermaid-example
classDiagram
@ -362,7 +359,7 @@ classDiagram
## Interaction
It is possible to bind a click event to a node, the click can lead to either a javascript callback or to a link which will be opened in a new browser tab. **Note**: This functionality is disabled when using `securityLevel='strict'` and enabled when using `securityLevel='loose'`.
It is possible to bind a click event to a node. The click can lead to either a javascript callback or to a link which will be opened in a new browser tab. **Note**: This functionality is disabled when using `securityLevel='strict'` and enabled when using `securityLevel='loose'`.
You would define these actions on a separate line after all classes have been declared.
@ -421,7 +418,7 @@ classDiagram
> **Success** The tooltip functionality and the ability to link to urls are available from version 0.5.2.
Beginners tip, a full example using interactive links in an html context:
Beginner's tip—a full example using interactive links in an HTML page:
```html
<body>
@ -469,8 +466,7 @@ Beginners tip, a full example using interactive links in an html context:
### Styling a node
It is possible to apply specific styles such as a thicker border or a different background color to individual nodes. This is done by predefining classes in css styles that can be applied from the graph definition as in the example
below:
It is possible to apply specific styles such as a thicker border or a different background color to individual nodes. This is done by predefining classes in css styles that can be applied from the graph definition:
```html
<style>
@ -482,7 +478,7 @@ below:
</style>
```
Then attaching that class to a specific node as per below:
Then attaching that class to a specific node:
```
cssClass "nodeId1" cssClass;
@ -494,7 +490,7 @@ It is also possible to attach a class to a list of nodes in one statement:
cssClass "nodeId1,nodeId2" cssClass;
```
A shorter form of adding a class is to attach the classname to the node using the `:::` operator as per below:
A shorter form of adding a class is to attach the classname to the node using the `:::` operator:
```mmd
classDiagram

View File

@ -1,10 +1,10 @@
# Configuration
When mermaid starts configuration is extracted to a configuration to be used for a diagram. There are 3 sources for configuration:
When mermaid starts, configuration is extracted to determine a configuration to be used for a diagram. There are 3 sources for configuration:
* The default configuration
* Overrides on the site level is set by the initialize call and will be applied to all diagrams in the site/app. The term for this is the **siteConfig**.
* Directives - diagram authors can update select configuration parameters directly in the diagram code via directives and these are applied to the render config.
* Overrides at the site level are set by the initialize call, and will be applied to all diagrams in the site/app. The term for this is the **siteConfig**.
* Directives - diagram authors can update select configuration parameters directly in the diagram code via directives. These are applied to the render config.
**The render config** is configuration that is used when rendering by applying these configurations.
@ -21,8 +21,8 @@ sequenceDiagram
## Initialize
Initialize call is called **only once**. It is called by the site integrator in order to override the default configuration on a site level.
The initialize call is applied **only once**. It is called by the site integrator in order to override the default configuration at a site level.
## configApi.reset
This method resets the configuration for a diagram to the site configuration, the configuration provided by the site integrator. Before each rendering of a diagram reset is called in the very beginning of render.
This method resets the configuration for a diagram to the overall site configuration, which is the configuration provided by the site integrator. Before each rendering of a diagram, reset is called at the very beginning.

View File

@ -7,16 +7,14 @@ title: Flowchart
## Graph
This statement declares the direction of the Flowchart.
This declares the graph is oriented from top to bottom (`TD` or `TB`).
This statement declares the direction of the flowchart, either from top to bottom (`TD` or `TB`):
```mermaid-example
graph TD
Start --> Stop
```
This declares the graph is oriented from left to right (`LR`).
or left to right (`LR`):
```mermaid-example
graph LR
@ -28,22 +26,21 @@ graph LR
Possible FlowChart orientations are:
* TB - top to bottom
* TD - top-down/ same as top to bottom
* TD - top-down (same as top to bottom)
* BT - bottom to top
* RL - right to left
* LR - left to right
## Flowcharts
This renders a flowchart that allows for features such as: more arrow types, multi directional arrows, and linking to and from subgraphs.
Apart from the graph type, the syntax is the same. This is currently experimental but when the beta period is over, both the graph and flowchart keywords will render in the new way. This means it is ok to start beta testing flowcharts.
Apart from the graph type, the syntax is the same. This is currently experimental. When the beta period is over, both the graph and flowchart keywords will render in this new way. At this point it is OK to start beta testing flowcharts.
> **Important note** Do not type the word "end" as a Flowchart node. Capitalize all or any one the letters to keep the flowchart from breaking, i.e, "End" or "END". Or you can apply this [workaround](https://github.com/mermaid-js/mermaid/issues/1444#issuecomment-639528897).**
## Nodes & shapes
## Nodes and shapes
### A node (default)
@ -56,9 +53,9 @@ graph LR
### A node with text
It is also possible to set text in the box that differs from the id. If this is done several times, it is the last text
found for the node that will be used. Also if you define edges for the node later on, you can omit text definitions. The
one previously defined will be used when rendering the box.
It is also possible to set text in the box that differs from the id. If this is done several times, only the last text
found for the node will be rendered. Also if you define edges for the node later on, you can omit text definitions. The
text previously defined will be used when rendering the box.
```mermaid-example
graph LR
@ -108,7 +105,7 @@ graph LR
graph LR
id1>This is the text in the box]
```
Currently only the shape above is possible and not its mirror. *This might change with future releases.*
Currently it is only possible to render the shape above, and not its mirror. *This might change with future releases.*
### A node (rhombus)
@ -117,7 +114,7 @@ graph LR
id1{This is the text in the box}
```
### A hexagon node
### A hexagonal node
```mermaid-example
graph LR
@ -152,16 +149,16 @@ graph TD
## Links between nodes
Nodes can be connected with links/edges. It is possible to have different types of links or attach a text string to a link.
Nodes can be connected with links/edges. It is possible to have different types of links, or attach a text string on a link.
### A link with arrow head
### Link with arrow head
```mermaid-example
graph LR
A-->B
```
### An open link
### Open link
```mermaid-example
graph LR
@ -182,7 +179,7 @@ graph LR
A---|This is the text|B
```
### A link with arrow head and text
### Link with arrow head and text
```mermaid-example
graph LR
@ -226,7 +223,7 @@ graph LR
### Chaining of links
It is possible to declare many links in the same line as per below:
It is possible to declare many links on the same line as per below:
```mermaid-example
graph LR
A -- text --> B -- text2 --> C
@ -243,10 +240,7 @@ You can then describe dependencies in a very expressive way. Like the one-liner
graph TB
A & B--> C & D
```
If you describe the same diagram using the the basic syntax, it will take four lines. A
word of warning, one could go overboard with this making the graph harder to read in
markdown form. The Swedish word `lagom` comes to mind. It means, not too much and not too little.
This goes for expressive syntaxes as well.
If you describe the same diagram using the the basic syntax, it will take four lines:
```mmd
graph TB
A --> C
@ -254,6 +248,9 @@ graph TB
B --> C
B --> D
```
A word of warning, one could go overboard with this, making the graph harder to read in
markdown form. The Swedish word `lagom` comes to mind. It means, not too much and not too little.
This goes for expressive syntaxes as well.
### New arrow types
@ -265,7 +262,6 @@ flowchart LR
B --x C
```
### Multi directional arrows
When using flowchart instead of graph there is the possibility to use multidirectional arrows.
@ -297,8 +293,8 @@ graph TD
B ---->|No| E[End];
```
> **Note** Links may still be made longer than the requested number of ranks
> by the rendering engine to accommodate other requests.
> **Note** The rendering engine may cause some links to be longer than
> the number of ranks requested in order to accommodate the overall topology.
When the link label is written in the middle of the link, the extra dashes must
be added on the right side of the link. The following example is equivalent to
@ -327,7 +323,7 @@ as summed up in the following table:
## Special characters that break syntax
It is possible to put text within quotes in order to render more troublesome characters. As in the example below:
Use quotes around text in order to render more troublesome characters, as in the example below:
```mermaid-example
graph LR
@ -336,7 +332,7 @@ graph LR
### Entity codes to escape characters
It is possible to escape characters using the syntax exemplified here.
Special characters (including Unicode) can be included by using HTML escaping syntax:
```mermaid-example
graph LR
@ -351,7 +347,7 @@ subgraph title
end
```
An example below:
An example:
```mermaid-example
graph TB
@ -367,7 +363,7 @@ graph TB
end
```
You can also set an explicit id for the subgraph.
You can also set an explicit id for the subgraph:
```mermaid-example
graph TB
@ -377,9 +373,9 @@ graph TB
end
```
## flowcharts
## Flowcharts
With the graphtype flowchart it is also possible to set edges to and from subgraphs as in the graph below.
With the graphtype `flowchart` it is also possible to set edges to and from subgraphs:
```mermaid-example
flowchart TB
@ -400,7 +396,7 @@ flowchart TB
## Interaction
It is possible to bind a click event to a node, the click can lead to either a JavaScript callback or to a link which will be opened in a new browser tab. **Note**: This functionality is disabled when using `securityLevel='strict'` and enabled when using `securityLevel='loose'`.
A node can have click events bound that lead to either a JavaScript callback or to open a new browser tab. **Note**: This functionality is disabled when using `securityLevel='strict'` and enabled when using `securityLevel='loose'`.
```
click nodeId callback
@ -408,18 +404,18 @@ click nodeId call callback()
```
* nodeId is the id of the node
* callback is the name of a JavaScript function defined on the page displaying the graph, the function will be called with the nodeId as parameter.
Examples of tooltip usage below:
* `callback` is the name of a JavaScript function defined on the page displaying the graph. The function will be called with the nodeId as an incoming parameter.
```html
<script>
var callback = function () {
alert('A callback was triggered');
var callback = function (nodeId) {
alert('A callback was triggered on ' + nodeId);
};
</script>
```
Examples of tooltip usage:
The tooltip text is surrounded in double quotes. The styles of the tooltip are set by the class .mermaidTooltip.
```mermaid-example
@ -449,7 +445,7 @@ graph LR;
click D href "https://www.github.com" "Open this in a new tab" _blank
```
Beginners tip, a full example using interactive links in a html context:
Beginner's tip—here's a full example of using interactive links in HTML:
```html
<body>
@ -484,7 +480,7 @@ Beginners tip, a full example using interactive links in a html context:
### Comments
Comments can be entered within a flow diagram, which will be ignored by the parser. Comments need to be on their own line, and must be prefaced with `%%` (double percent signs). Any text after the start of the comment to the next newline will be treated as a comment, including any flow syntax
Comments can be entered within a flow diagram, which will be ignored by the parser. Comments need to be on their own line, and must be prefaced with `%%` (double percent signs). Any text until the next newline will be treated as a comment, including all punctuation and any flow syntax.
```mmd
graph LR
@ -496,16 +492,15 @@ graph LR
### Styling links
It is possible to style links. For instance you might want to style a link that is going backwards in the flow. As links
have no ids in the same way as nodes, some other way of deciding what style the links should be attached to is required.
Instead of ids, the order number of when the link was defined in the graph is used. In the example below the style
defined in the linkStyle statement will belong to the fourth link in the graph:
It is possible to style links. For instance, you might want to style a link that is going backwards in the flow. As links
have no ids in the same way as nodes, some other way of attaching style is required.
So instead of ids, the order number of when the link was defined in the graph is used, starting with zero. Here's a linkStyle statement that would apply style to the fourth link in the graph:
```
linkStyle 3 stroke:#ff3,stroke-width:4px,color:red;
```
You can specify default to apply to all links, or you can give a list of link order numbers separated by a comma.
You can specify a `default` to apply to all links, or you can give a comma-separated list of link order numbers.
Instead of giving a styles option, you can also use custom d3 curve types with the following syntax:
@ -513,14 +508,14 @@ Instead of giving a styles option, you can also use custom d3 curve types with t
linkStyle default|numList|num interpolate curveType
```
If you want to add style options too, instead of writing:
If you want to add both D3 and style options, instead of writing:
```
linkStyle default interpolate cardinal
linkStyle default stroke:#ff3,stroke-width:4px,color:red;
```
You can combine them into:
You can combine them:
```
linkStyle default interpolate cardinal stroke:#ff3,stroke-width:4px,color:red;
@ -540,29 +535,27 @@ graph LR
#### Classes
More convenient then defining the style every time is to define a class of styles and attach this class to the nodes that
should have a different look.
a class definition looks like the example below:
More convenient than defining the style every time is to define a class of styles and attach this class reference to multiple nodes.
here's a class definition:
```
classDef className fill:#f9f,stroke:#333,stroke-width:4px;
```
Attachment of a class to a node is done as per below:
and then attaching this class to a node is simply:
```
class nodeId1 className;
```
It is also possible to attach a class to a list of nodes in one statement:
It is also possible to attach a class to multiple nodes in one statement:
```
class nodeId1,nodeId2 className;
```
A shorter form of adding a class is to attach the classname to the node using the `:::`operator as per below:
An even shorter form of adding a class is to attach the classname to the node using the `:::`operator:
```mermaid-example
graph LR
@ -573,8 +566,7 @@ graph LR
### Css classes
It is also possible to predefine classes in css styles that can be applied from the graph definition as in the example
below:
It is also possible to predefine classes in css styles that can be applied from the graph definition:
**Example style**
@ -598,7 +590,7 @@ graph LR;
### Default class
If a class is named default it will be assigned to all classes without specific class definitions.
If a class is named `default` it will be assigned to all nodes that do not have a specific class definition.
```
classDef default fill:#f9f,stroke:#333,stroke-width:4px;
@ -607,9 +599,7 @@ If a class is named default it will be assigned to all classes without specific
## Basic support for fontawesome
It is possible to add icons from fontawesome.
The icons are accessed via the syntax fa:#icon class name#.
It is possible to add icons from fontawesome. These are accessed via the syntax fa:#icon-class-name#.
```mermaid-example
graph TD
@ -622,11 +612,11 @@ graph TD
## Graph declarations with spaces between vertices and link and without semicolon
* In graph declarations, the statements also can now end without a semicolon. After release 0.2.16, ending a graph statement with semicolon is just optional. So the below graph declaration is also valid along with the old declarations of the graph.
* After release 0.2.16, graph declaration statements do not need to end with a semicolon. (And they can continue to have the ending semicolon—it has now just become optional.) So the below graph declaration is valid along with the old declarations.
* A single space is allowed between vertices and the link. However there should not be any space between a vertex and its text and a link and its text. The old syntax of graph declaration will also work and hence this new feature is optional and is introduce to improve readability.
* A single space is allowed between vertices and the link, however there should not be any space between a vertex and its text, or a link and its text. The old syntax of graph declarations will also work, so this new feature is optional and is introduced to improve readability.
Below is the new declaration of the graph edges which is also valid along with the old declaration of the graph edges.
Below is an example of the new way to declare graph edges. This is valid alongside any old-style declarations of graph edges.
```mermaid-example
graph LR
@ -641,9 +631,8 @@ graph LR
Is it possible to adjust the width of the rendered flowchart.
This is done by defining **mermaid.flowchartConfig** or by the CLI to use a json file with the configuration. How to use
the CLI is described in the mermaidCLI page.
mermaid.flowchartConfig can be set to a JSON string with config parameters or the corresponding object.
This is done by defining **mermaid.flowchartConfig**, or by the CLI to use a json file with the configuration (which is described in the mermaidCLI page).
In Javascript config parameters can be set by using `mermaid.flowchartConfig`:
```javascript
mermaid.flowchartConfig = {

View File

@ -471,7 +471,7 @@ flowchart LR
click D href "https://www.github.com" "Open this in a new tab" _blank
```
Beginners tip, a full example using interactive links in a html context:
Beginner's tip—a full example using interactive links in a html context:
```html
<body>
<div class="mermaid">
@ -513,7 +513,7 @@ flowchart LR
### Styling links
It is possible to style links. For instance you might want to style a link that is going backwards in the flow. As links
It is possible to style links. For instance, you might want to style a link that is going backwards in the flow. As links
have no ids in the same way as nodes, some other way of deciding what style the links should be attached to is required.
Instead of ids, the order number of when the link was defined in the graph is used, or use default to apply to all links.
In the example below the style defined in the linkStyle statement will belong to the fourth link in the graph:
@ -522,6 +522,22 @@ In the example below the style defined in the linkStyle statement will belong to
linkStyle 3 stroke:#ff3,stroke-width:4px,color:red;
```
### Styling line curves
It is possible to style the type of curve used for lines between items, if the default method does not meet your needs.
Available curve styles include `basis`, `bump`, `linear`, `monotoneX`, `monotoneY`, `natural`, `step`, `stepAfter`,
and `stepBefore`.
In this example, a left-to-right graph uses the `stepBefore` curve style:
```
%%{ init: { 'flowchart': { 'curve': 'stepBefore' } } }%%
graph LR
```
For a full list of available curves, including an explanation of custom curves, refer to
the [Shapes](https://github.com/d3/d3-shape/blob/main/README.md#curves) documentation in the
[d3-shape](https://github.com/d3/d3-shape/) project.
### Styling a node

View File

@ -313,7 +313,7 @@ click taskId href URL
* taskId is the id of the task
* callback is the name of a javascript function defined on the page displaying the graph, the function will be called with the taskId as the parameter if no other arguments are specified.
Beginners tip, a full example using interactive links in an html context:
Beginner's tip—a full example using interactive links in an html context:
```html
<body>
<div class="mermaid">

View File

@ -8,7 +8,7 @@ Diagram Examples can be found in the [Mermaid Live Editor](https://mermaid-js.gi
## Syntax Structure
One would notice that all **Diagrams definitions begin** with a declaration of the **diagram type**, followed by the definitions of the diagram and its contents. This declaration notifies the parser which kind of diagram the code is supposed to generate.
**Example** : The code below is for an Entity Relationship Diagram, specified by the `erDiagram` declaration. What follows is the definition of the different `Entities` represented in it.
**Example** : The code below is for an Entity Relationship Diagram, specified by the `erDiagram` declaration. What follows is the definition of the different `Entities` represented in it.
```mermaid-example
erDiagram

View File

@ -64,7 +64,7 @@ Here is an example of how `%%init%%` can set the theme to 'base', this assumes t
```
# List of Themes
# Customizing Themes with `themeVariables`
# Customizing Themes with `themeVariables`
The easiest way to make a custom theme is to start with the base theme, and just modify theme variables through `themeVariables`, via `%%init%%`.

View File

@ -107,7 +107,7 @@ Mermaid can load multiple diagrams, in the same page.
| Parameter | Description | Type | Required | Values |
| ------------- | --------------------------------- | ------ | -------- | ------------------------- |
| securityLevel | Level of trust for parsed diagram | String | Required | Strict, Loose, antiscript , sandbox|
| securityLevel | Level of trust for parsed diagram | String | Required | 'sandbox', 'strict', 'loose', 'antiscript' |
Values:
@ -118,7 +118,7 @@ Values:
```note
This changes the default behaviour of mermaid so that after upgrade to 8.2,unless the `securityLevel` is not changed, tags in flowcharts are encoded as tags and clicking is disabled.
This changes the default behaviour of mermaid so that after upgrade to 8.2, unless the `securityLevel` is not changed, tags in flowcharts are encoded as tags and clicking is disabled.
**sandbox** security level is still in the beta version.
```

View File

@ -2,11 +2,11 @@
"name": "mermaid",
"version": "9.1.6",
"description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
"main": "dist/mermaid.core.js",
"main": "dist/mermaid.min.js",
"module": "dist/mermaid.esm.min.mjs",
"exports": {
".": {
"require": "./dist/mermaid.core.js",
"require": "./dist/mermaid.min.js",
"import": "./dist/mermaid.esm.min.mjs"
},
"./*": "./*"
@ -27,7 +27,7 @@
"postbuild": "documentation build src/mermaidAPI.js src/config.js src/defaultConfig.js --shallow -f md --markdown-toc false > docs/Setup.md",
"build:watch": "yarn build:development --watch",
"release": "yarn build",
"lint": "eslint ./ --ext .js,.json,.html",
"lint": "eslint --cache ./ --ext .js,.json,.html,.md",
"lint:fix": "yarn lint --fix",
"e2e:depr": "yarn lint && jest e2e --config e2e/jest.config.js",
"cypress": "cypress run",
@ -62,7 +62,7 @@
"d3": "^7.0.0",
"dagre": "^0.8.5",
"dagre-d3": "^0.6.4",
"dompurify": "2.3.10",
"dompurify": "2.4.0",
"graphlib": "^2.1.8",
"khroma": "^2.0.0",
"moment-mini": "2.24.0",
@ -76,7 +76,7 @@
"@babel/register": "^7.14.5",
"@commitlint/cli": "^17.0.0",
"@commitlint/config-conventional": "^17.0.0",
"babel-jest": "^28.0.3",
"babel-jest": "^29.0.1",
"babel-loader": "^8.2.2",
"concurrently": "^7.0.0",
"coveralls": "^3.0.2",
@ -88,7 +88,7 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-html": "^7.1.0",
"eslint-plugin-jest": "^26.0.0",
"eslint-plugin-jest": "^27.0.1",
"eslint-plugin-jsdoc": "^39.1.0",
"eslint-plugin-json": "^3.1.0",
"eslint-plugin-markdown": "^3.0.0",
@ -96,7 +96,7 @@
"husky": "^8.0.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^28.0.3",
"jest-environment-jsdom": "^28.0.2",
"jest-environment-jsdom": "^29.0.1",
"jison": "^0.4.18",
"js-base64": "3.7.2",
"lint-staged": "^13.0.0",
@ -122,4 +122,4 @@
"**/*.css",
"**/*.scss"
]
}
}

View File

@ -471,7 +471,7 @@ describe('sortNodesByHierarchy', function () {
return {};
});
});
it('it should sort proper en nodes are in reverse order', function () {
it('should sort proper en nodes are in reverse order', function () {
/*
a -->b
subgraph B
@ -488,7 +488,7 @@ describe('sortNodesByHierarchy', function () {
g.setEdge('a', 'b', '1');
expect(sortNodesByHierarchy(g)).toEqual(['a', 'A', 'B', 'b']);
});
it('it should sort proper en nodes are in correct order', function () {
it('should sort proper en nodes are in correct order', function () {
/*
a -->b
subgraph B

View File

@ -64,9 +64,9 @@ const config = {
logLevel: 5,
/**
* | Parameter | Description | Type | Required | Values |
* | ------------- | --------------------------------- | ------ | -------- | ------------------------------- |
* | securitylevel | Level of trust for parsed diagram | string | Required | 'strict', 'loose', 'antiscript' |
* | Parameter | Description | Type | Required | Values |
* | ------------- | --------------------------------- | ------ | -------- | ------------------------------------------ |
* | securityLevel | Level of trust for parsed diagram | string | Required | 'sandbox', 'strict', 'loose', 'antiscript' |
*
* **Notes**:
*
@ -74,6 +74,9 @@ const config = {
* - **loose**: tags in text are allowed, click functionality is enabled
* - **antiscript**: html tags in text are allowed, (only script element is removed), click
* functionality is enabled
* - **sandbox**: With this security level all rendering takes place in a sandboxed iframe. This
* prevent any JavaScript from running in the context. This may hinder interactive functionality
* of the diagram like scripts, popups in sequence diagram or links to other tabs/targets etc.
*/
securityLevel: 'strict',

View File

@ -0,0 +1,84 @@
import flowDb from '../c4Db';
import flow from './c4Diagram.jison';
import { setConfig } from '../../../config';
setConfig({
securityLevel: 'strict',
});
describe('parsing a flow chart', function () {
beforeEach(function () {
flow.parser.yy = flowDb;
flow.parser.yy.clear();
});
it('should parse a C4 diagram with one Person correctly', function () {
flow.parser.parse(`C4Context
title System Context diagram for Internet Banking System
Person(customerA, "Banking Customer A", "A customer of the bank, with personal bank accounts.")`);
const yy = flow.parser.yy;
expect(yy.getC4Type()).toBe('C4Context');
expect(yy.getTitle()).toBe('System Context diagram for Internet Banking System');
const shapes = yy.getC4ShapeArray();
expect(shapes.length).toBe(1);
const onlyShape = shapes[0];
expect(onlyShape).toEqual({
alias: 'customerA',
descr: {
text: 'A customer of the bank, with personal bank accounts.',
},
label: {
text: 'Banking Customer A',
},
parentBoundary: 'global',
typeC4Shape: {
text: 'person',
},
wrap: false,
});
});
it('should handle a trailing whitespaces after statements', function () {
const whitespace = ' ';
const rendered = flow.parser.parse(`C4Context${whitespace}
title System Context diagram for Internet Banking System${whitespace}
Person(customerA, "Banking Customer A", "A customer of the bank, with personal bank accounts.")${whitespace}`);
expect(rendered).toBe(true);
});
it('should handle parameter names that are keywords', function () {
flow.parser.parse(`C4Context
title title
Person(Person, "Person", "Person")`);
const yy = flow.parser.yy;
expect(yy.getTitle()).toBe('title');
const shapes = yy.getC4ShapeArray();
expect(shapes.length).toBe(1);
const onlyShape = shapes[0];
expect(onlyShape.alias).toBe('Person');
expect(onlyShape.descr.text).toBe('Person');
expect(onlyShape.label.text).toBe('Person');
});
it('should allow default in the parameters', function () {
flow.parser.parse(`C4Context
Person(default, "default", "default")`);
const yy = flow.parser.yy;
const shapes = yy.getC4ShapeArray();
expect(shapes.length).toBe(1);
const onlyShape = shapes[0];
expect(onlyShape.alias).toBe('default');
expect(onlyShape.descr.text).toBe('default');
expect(onlyShape.label.text).toBe('default');
});
});

View File

@ -14,7 +14,16 @@ describe('class diagram, ', function () {
parser.parse(str);
});
xit('should handle a leading newline axa', function () {
const str = '\nclassDiagram\n' + 'class Car';
try {
parser.parse(str);
// Fail test if above expression doesn't throw anything.
} catch (e) {
expect(true).toBe(false);
}
});
it('should handle relation definitions', function () {
const str =
'classDiagram\n' +

View File

@ -1,6 +1,7 @@
import { line, curveBasis } from 'd3';
import utils from '../../utils';
import { log } from '../../logger';
import { parseGenericTypes } from '../common/common';
let edgeCount = 0;
export const drawEdge = function (elem, path, relation, conf, diagObj) {
@ -412,29 +413,6 @@ const addTspan = function (textEl, txt, isFirst, conf) {
}
};
/**
* Makes generics in typescript syntax
*
* @example <caption>Array of array of strings in typescript syntax</caption>
* // returns "Array<Array<string>>"
* parseGenericTypes('Array~Array~string~~');
*
* @param {string} text The text to convert
* @returns {string} The converted string
*/
const parseGenericTypes = function (text) {
let cleanedText = text;
if (text.indexOf('~') != -1) {
cleanedText = cleanedText.replace('~', '<');
cleanedText = cleanedText.replace('~', '>');
return parseGenericTypes(cleanedText);
} else {
return cleanedText;
}
};
/**
* Gives the styles for a classifier
*

View File

@ -182,6 +182,29 @@ const getUrl = (useAbsolute) => {
*/
export const evaluate = (val) => (val === 'false' || val === false ? false : true);
/**
* Makes generics in typescript syntax
*
* @example <caption>Array of array of strings in typescript syntax</caption>
* // returns "Array<Array<string>>"
* parseGenericTypes('Array~Array~string~~');
*
* @param {string} text The text to convert
* @returns {string} The converted string
*/
export const parseGenericTypes = function (text) {
let cleanedText = text;
if (text.indexOf('~') != -1) {
cleanedText = cleanedText.replace('~', '<');
cleanedText = cleanedText.replace('~', '>');
return parseGenericTypes(cleanedText);
} else {
return cleanedText;
}
};
export default {
getRows,
sanitizeText,

View File

@ -1,4 +1,4 @@
import { sanitizeText, removeScript, removeEscapes } from './common';
import { sanitizeText, removeScript, removeEscapes, parseGenericTypes } from './common';
describe('when securityLevel is antiscript, all script must be removed', function () {
/**
@ -103,3 +103,10 @@ describe('Sanitize text', function () {
expect(result).not.toContain('javascript:alert(1)');
});
});
describe('generic parser', function () {
it('should parse generic types', function () {
const result = parseGenericTypes('test~T~');
expect(result).toEqual('test<T>');
});
});

View File

@ -8,6 +8,7 @@ import { log } from '../../logger';
import erMarkers from './erMarkers';
import { configureSvgSize } from '../../utils';
import addSVGAccessibilityFields from '../../accessibility';
import { parseGenericTypes } from '../common/common';
let conf = {};
@ -63,6 +64,8 @@ const drawAttributes = (groupNode, entityTextNode, attributes) => {
const attrPrefix = `${entityTextNode.node().id}-attr-${attrNum}`;
let nodeHeight = 0;
const attributeType = parseGenericTypes(item.attributeType);
// Add a text node for the attribute type
const typeNode = groupNode
.append('text')
@ -76,7 +79,7 @@ const drawAttributes = (groupNode, entityTextNode, attributes) => {
'style',
'font-family: ' + getConfig().fontFamily + '; font-size: ' + attrFontSize + 'px'
)
.text(item.attributeType);
.text(attributeType);
// Add a text node for the attribute name
const nameNode = groupNode

View File

@ -29,7 +29,8 @@ accDescr\s*"{"\s* { this.begin("acc_descr_multili
"{" { this.begin("block"); return 'BLOCK_START'; }
<block>\s+ /* skip whitespace in block */
<block>\b((?:PK)|(?:FK))\b return 'ATTRIBUTE_KEY'
<block>[A-Za-z][A-Za-z0-9\-_]* return 'ATTRIBUTE_WORD'
<block>(.*?)[~](.*?)*[~] return 'ATTRIBUTE_WORD';
<block>[A-Za-z][A-Za-z0-9\-_\[\]]* return 'ATTRIBUTE_WORD'
<block>\"[^"]*\" return 'COMMENT';
<block>[\n]+ /* nothing */
<block>"}" { this.popState(); return 'BLOCK_STOP'; }

View File

@ -85,6 +85,31 @@ describe('when parsing ER diagram it...', function () {
expect(entities[entity].attributes.length).toBe(3);
});
it('should allow an entity with attribute that has a generic type', function () {
const entity = 'BOOK';
const attribute1 = 'type~T~ type';
const attribute2 = 'option~T~ readable "comment"';
const attribute3 = 'string id PK';
erDiagram.parser.parse(
`erDiagram\n${entity} {\n${attribute1}\n${attribute2}\n${attribute3}\n}`
);
const entities = erDb.getEntities();
expect(Object.keys(entities).length).toBe(1);
expect(entities[entity].attributes.length).toBe(3);
});
it('should allow an entity with attribute that is an array', function () {
const entity = 'BOOK';
const attribute1 = 'string[] readers FK "comment"';
const attribute2 = 'string[] authors FK';
erDiagram.parser.parse(`erDiagram\n${entity} {\n${attribute1}\n${attribute2}\n}`);
const entities = erDb.getEntities();
expect(Object.keys(entities).length).toBe(1);
expect(entities[entity].attributes.length).toBe(2);
});
it('should allow an entity with multiple attributes to be defined', function () {
const entity = 'BOOK';
const attribute1 = 'string title';

View File

@ -388,8 +388,8 @@ export const draw = function (text, id, _version, diagObj) {
rankdir: dir,
nodesep: nodeSpacing,
ranksep: rankSpacing,
marginx: 8,
marginy: 8,
marginx: 0,
marginy: 0,
})
.setDefaultEdgeLabel(function () {
return {};

View File

@ -14,7 +14,7 @@ describe('[Interactions] when parsing', () => {
flow.parser.yy.clear();
});
it('it should be possible to use click to a callback', function () {
it('should be possible to use click to a callback', function () {
spyOn(flowDb, 'setClickEvent');
const res = flow.parser.parse('graph TD\nA-->B\nclick A callback');
@ -24,7 +24,7 @@ describe('[Interactions] when parsing', () => {
expect(flowDb.setClickEvent).toHaveBeenCalledWith('A', 'callback');
});
it('it should be possible to use click to a click and call callback', function () {
it('should be possible to use click to a click and call callback', function () {
spyOn(flowDb, 'setClickEvent');
const res = flow.parser.parse('graph TD\nA-->B\nclick A call callback()');
@ -34,7 +34,7 @@ describe('[Interactions] when parsing', () => {
expect(flowDb.setClickEvent).toHaveBeenCalledWith('A', 'callback');
});
it('it should be possible to use click to a callback with toolip', function () {
it('should be possible to use click to a callback with toolip', function () {
spyOn(flowDb, 'setClickEvent');
spyOn(flowDb, 'setTooltip');
const res = flow.parser.parse('graph TD\nA-->B\nclick A callback "tooltip"');
@ -46,7 +46,7 @@ describe('[Interactions] when parsing', () => {
expect(flowDb.setTooltip).toHaveBeenCalledWith('A', 'tooltip');
});
it('it should be possible to use click to a click and call callback with toolip', function () {
it('should be possible to use click to a click and call callback with toolip', function () {
spyOn(flowDb, 'setClickEvent');
spyOn(flowDb, 'setTooltip');
const res = flow.parser.parse('graph TD\nA-->B\nclick A call callback() "tooltip"');
@ -58,7 +58,7 @@ describe('[Interactions] when parsing', () => {
expect(flowDb.setTooltip).toHaveBeenCalledWith('A', 'tooltip');
});
it('it should be possible to use click to a callback with an arbitrary number of args', function () {
it('should be possible to use click to a callback with an arbitrary number of args', function () {
spyOn(flowDb, 'setClickEvent');
const res = flow.parser.parse('graph TD\nA-->B\nclick A call callback("test0", test1, test2)');

View File

@ -89,7 +89,7 @@ describe('[Lines] when parsing', () => {
});
describe('it should handle new line type notation', function () {
it('it should handle regular lines', function () {
it('should handle regular lines', function () {
const res = flow.parser.parse('graph TD;A-->B;');
const vert = flow.parser.yy.getVertices();
@ -98,7 +98,7 @@ describe('[Lines] when parsing', () => {
expect(edges[0].stroke).toBe('normal');
});
it('it should handle dotted lines', function () {
it('should handle dotted lines', function () {
const res = flow.parser.parse('graph TD;A-.->B;');
const vert = flow.parser.yy.getVertices();
@ -107,7 +107,7 @@ describe('[Lines] when parsing', () => {
expect(edges[0].stroke).toBe('dotted');
});
it('it should handle dotted lines', function () {
it('should handle dotted lines', function () {
const res = flow.parser.parse('graph TD;A==>B;');
const vert = flow.parser.yy.getVertices();

View File

@ -13,7 +13,7 @@ describe('[Text] when parsing', () => {
});
describe('it should handle text on edges', function () {
it('it should handle text without space', function () {
it('should handle text without space', function () {
const res = flow.parser.parse('graph TD;A--x|textNoSpace|B;');
const vert = flow.parser.yy.getVertices();
@ -22,7 +22,7 @@ describe('[Text] when parsing', () => {
expect(edges[0].type).toBe('arrow_cross');
});
it('should handle with space', function () {
it('should handle with space', function () {
const res = flow.parser.parse('graph TD;A--x|text including space|B;');
const vert = flow.parser.yy.getVertices();
@ -31,7 +31,7 @@ describe('[Text] when parsing', () => {
expect(edges[0].type).toBe('arrow_cross');
});
it('it should handle text with /', function () {
it('should handle text with /', function () {
const res = flow.parser.parse('graph TD;A--x|text with / should work|B;');
const vert = flow.parser.yy.getVertices();
@ -40,7 +40,7 @@ describe('[Text] when parsing', () => {
expect(edges[0].text).toBe('text with / should work');
});
it('it should handle space and space between vertices and link', function () {
it('should handle space and space between vertices and link', function () {
const res = flow.parser.parse('graph TD;A --x|textNoSpace| B;');
const vert = flow.parser.yy.getVertices();
@ -159,12 +159,6 @@ describe('[Text] when parsing', () => {
const edges = flow.parser.yy.getEdges();
expect(vert['a'].text).toBe('v');
});
it('should handle keywords', function () {
const res = flow.parser.parse('graph TD;V-->a[v]');
const vert = flow.parser.yy.getVertices();
const edges = flow.parser.yy.getEdges();
expect(vert['a'].text).toBe('v');
});
it('should handle quoted text', function () {
const res = flow.parser.parse('graph TD;V-- "test string()" -->a[v]');
const vert = flow.parser.yy.getVertices();
@ -174,7 +168,7 @@ describe('[Text] when parsing', () => {
});
describe('it should handle text on lines', () => {
it('it should handle normal text on lines', function () {
it('should handle normal text on lines', function () {
const res = flow.parser.parse('graph TD;A-- test text with == -->B;');
const vert = flow.parser.yy.getVertices();
@ -182,7 +176,7 @@ describe('[Text] when parsing', () => {
expect(edges[0].stroke).toBe('normal');
});
it('it should handle dotted text on lines (TD3)', function () {
it('should handle dotted text on lines (TD3)', function () {
const res = flow.parser.parse('graph TD;A-. test text with == .->B;');
const vert = flow.parser.yy.getVertices();
@ -190,7 +184,7 @@ describe('[Text] when parsing', () => {
expect(edges[0].stroke).toBe('dotted');
});
it('it should handle thick text on lines', function () {
it('should handle thick text on lines', function () {
const res = flow.parser.parse('graph TD;A== test text with - ==>B;');
const vert = flow.parser.yy.getVertices();
@ -201,7 +195,7 @@ describe('[Text] when parsing', () => {
});
describe('it should handle text on edges using the new notation', function () {
it('it should handle text without space', function () {
it('should handle text without space', function () {
const res = flow.parser.parse('graph TD;A-- textNoSpace --xB;');
const vert = flow.parser.yy.getVertices();
@ -210,7 +204,7 @@ describe('[Text] when parsing', () => {
expect(edges[0].type).toBe('arrow_cross');
});
it('it should handle text with multiple leading space', function () {
it('should handle text with multiple leading space', function () {
const res = flow.parser.parse('graph TD;A-- textNoSpace --xB;');
const vert = flow.parser.yy.getVertices();
@ -219,7 +213,7 @@ describe('[Text] when parsing', () => {
expect(edges[0].type).toBe('arrow_cross');
});
it('should handle with space', function () {
it('should handle with space', function () {
const res = flow.parser.parse('graph TD;A-- text including space --xB;');
const vert = flow.parser.yy.getVertices();
@ -228,7 +222,7 @@ describe('[Text] when parsing', () => {
expect(edges[0].type).toBe('arrow_cross');
});
it('it should handle text with /', function () {
it('should handle text with /', function () {
const res = flow.parser.parse('graph TD;A -- text with / should work --x B;');
const vert = flow.parser.yy.getVertices();
@ -237,7 +231,7 @@ describe('[Text] when parsing', () => {
expect(edges[0].text).toBe('text with / should work');
});
it('it should handle space and space between vertices and link', function () {
it('should handle space and space between vertices and link', function () {
const res = flow.parser.parse('graph TD;A -- textNoSpace --x B;');
const vert = flow.parser.yy.getVertices();
@ -302,7 +296,7 @@ describe('[Text] when parsing', () => {
});
describe('it should handle text in vertices, ', function () {
it('it should handle space', function () {
it('should handle space', function () {
const res = flow.parser.parse('graph TD;A-->C(Chimpansen hoppar);');
const vert = flow.parser.yy.getVertices();
@ -311,7 +305,7 @@ describe('[Text] when parsing', () => {
expect(vert['C'].type).toBe('round');
expect(vert['C'].text).toBe('Chimpansen hoppar');
});
it('it should handle åäö and minus', function () {
it('should handle åäö and minus', function () {
const res = flow.parser.parse('graph TD;A-->C{Chimpansen hoppar åäö-ÅÄÖ};');
const vert = flow.parser.yy.getVertices();
@ -321,7 +315,7 @@ describe('[Text] when parsing', () => {
expect(vert['C'].text).toBe('Chimpansen hoppar åäö-ÅÄÖ');
});
it('it should handle with åäö, minus and space and br', function () {
it('should handle with åäö, minus and space and br', function () {
const res = flow.parser.parse('graph TD;A-->C(Chimpansen hoppar åäö <br> - ÅÄÖ);');
const vert = flow.parser.yy.getVertices();
@ -330,7 +324,7 @@ describe('[Text] when parsing', () => {
expect(vert['C'].type).toBe('round');
expect(vert['C'].text).toBe('Chimpansen hoppar åäö <br> - ÅÄÖ');
});
// xit('it should handle åäö, minus and space and br',function(){
// xit('should handle åäö, minus and space and br',function(){
// const res = flow.parser.parse('graph TD; A[Object&#40;foo,bar&#41;]-->B(Thing);');
//
// const vert = flow.parser.yy.getVertices();
@ -339,21 +333,21 @@ describe('[Text] when parsing', () => {
// expect(vert['C'].type).toBe('round');
// expect(vert['C'].text).toBe(' A[Object&#40;foo,bar&#41;]-->B(Thing);');
// });
it('it should handle unicode chars', function () {
it('should handle unicode chars', function () {
const res = flow.parser.parse('graph TD;A-->C(Начало);');
const vert = flow.parser.yy.getVertices();
expect(vert['C'].text).toBe('Начало');
});
it('it should handle backslask', function () {
it('should handle backslask', function () {
const res = flow.parser.parse('graph TD;A-->C(c:\\windows);');
const vert = flow.parser.yy.getVertices();
expect(vert['C'].text).toBe('c:\\windows');
});
it('it should handle CAPS', function () {
it('should handle CAPS', function () {
const res = flow.parser.parse('graph TD;A-->C(some CAPS);');
const vert = flow.parser.yy.getVertices();
@ -362,7 +356,7 @@ describe('[Text] when parsing', () => {
expect(vert['C'].type).toBe('round');
expect(vert['C'].text).toBe('some CAPS');
});
it('it should handle directions', function () {
it('should handle directions', function () {
const res = flow.parser.parse('graph TD;A-->C(some URL);');
const vert = flow.parser.yy.getVertices();

View File

@ -233,6 +233,9 @@ const getStartDate = function (prevTime, dateFormat, str) {
const durationToDate = function (durationStatement, relativeTime) {
if (durationStatement !== null) {
switch (durationStatement[2]) {
case 'ms':
relativeTime.add(durationStatement[1], 'milliseconds');
break;
case 's':
relativeTime.add(durationStatement[1], 'seconds');
break;
@ -267,7 +270,7 @@ const getEndDate = function (prevTime, dateFormat, str, inclusive) {
return mDate.toDate();
}
return durationToDate(/^([\d]+)([wdhms])/.exec(str.trim()), moment(prevTime));
return durationToDate(/^([\d]+)([wdhms]|ms)$/.exec(str.trim()), moment(prevTime));
};
let taskCnt = 0;

View File

@ -99,6 +99,27 @@ describe('when using the ganttDb', function () {
}
);
it('should handle milliseconds', function () {
ganttDb.setDateFormat('x');
ganttDb.addSection('testa1');
ganttDb.addTask('test1', 'id1,0,20ms');
ganttDb.addTask('test2', 'id2,after id1,5ms');
ganttDb.addSection('testa2');
ganttDb.addTask('test3', 'id3,20,10ms');
ganttDb.addTask('test4', 'id4,after id3,5ms');
const tasks = ganttDb.getTasks();
expect(tasks[0].startTime.toISOString()).toEqual('1970-01-01T00:00:00.000Z');
expect(tasks[0].endTime.toISOString()).toEqual('1970-01-01T00:00:00.020Z');
expect(tasks[1].startTime.toISOString()).toEqual('1970-01-01T00:00:00.020Z');
expect(tasks[1].endTime.toISOString()).toEqual('1970-01-01T00:00:00.025Z');
expect(tasks[2].startTime.toISOString()).toEqual('1970-01-01T00:00:00.020Z');
expect(tasks[2].endTime.toISOString()).toEqual('1970-01-01T00:00:00.030Z');
expect(tasks[3].startTime.toISOString()).toEqual('1970-01-01T00:00:00.030Z');
expect(tasks[3].endTime.toISOString()).toEqual('1970-01-01T00:00:00.035Z');
});
it('should handle relative start date based on id regardless of sections', function () {
ganttDb.setDateFormat('YYYY-MM-DD');
ganttDb.addSection('testa1');

View File

@ -115,7 +115,7 @@ describe('when parsing a gitGraph', function() {
expect(parser.yy.getCurrentBranch()).toBe('master');
});
it('it should reset a branch', function() {
it('should reset a branch', function() {
const str =
'gitGraph:\n' +
'commit\n' +
@ -153,7 +153,7 @@ describe('when parsing a gitGraph', function() {
expect(parser.yy.getHead().id).toEqual(master.parent);
});
it('it should handle fast forwardable merges', function() {
it('should handle fast forwardable merges', function() {
const str =
'gitGraph:\n' +
'commit\n' +
@ -173,7 +173,7 @@ describe('when parsing a gitGraph', function() {
expect(parser.yy.getHead().id).toEqual(parser.yy.getBranches()['newbranch']);
});
it('it should handle cases when merge is a noop', function() {
it('should handle cases when merge is a noop', function() {
const str =
'gitGraph:\n' +
'commit\n' +
@ -192,7 +192,7 @@ describe('when parsing a gitGraph', function() {
expect(parser.yy.getHead().id).toEqual(parser.yy.getBranches()['newbranch']);
});
it('it should handle merge with 2 parents', function() {
it('should handle merge with 2 parents', function() {
const str =
'gitGraph:\n' +
'commit\n' +
@ -213,7 +213,7 @@ describe('when parsing a gitGraph', function() {
expect(parser.yy.getHead().id).toEqual(parser.yy.getBranches()['master']);
});
it('it should handle ff merge when history walk has two parents (merge commit)', function() {
it('should handle ff merge when history walk has two parents (merge commit)', function() {
const str =
'gitGraph:\n' +
'commit\n' +
@ -239,7 +239,7 @@ describe('when parsing a gitGraph', function() {
parser.yy.prettyPrint();
});
it('it should generate a secure random ID for commits', function() {
it('should generate a secure random ID for commits', function() {
const str = 'gitGraph:\n' + 'commit\n' + 'commit\n';
const EXPECTED_LENGTH = 7;
const EXPECTED_CHARACTERS = '0123456789abcdef';
@ -267,7 +267,7 @@ describe('when parsing a gitGraph', function() {
});
});
it('it should generate an array of known branches', function() {
it('should generate an array of known branches', function() {
const str =
'gitGraph:\n' +
'commit\n' +

View File

@ -126,7 +126,7 @@ Bob-->Alice: I am good thanks!`;
expect(messages[0].from).toBe('Alice');
expect(messages[2].from).toBe('Bob');
});
it('it should not show sequence numbers per default', function () {
it('should not show sequence numbers per default', function () {
const str = `
sequenceDiagram
Alice->Bob:Hello Bob, how are you?
@ -137,7 +137,7 @@ Bob-->Alice: I am good thanks!`;
diagram.renderer.draw(str, 'tst', '1.2.3', diagram); // needs to be rendered for the correct value of visibility autonumbers
expect(diagram.db.showSequenceNumbers()).toBe(false);
});
it('it should show sequence numbers when autonumber is enabled', function () {
it('should show sequence numbers when autonumber is enabled', function () {
const str = `
sequenceDiagram
autonumber
@ -149,7 +149,7 @@ Bob-->Alice: I am good thanks!`;
diagram.renderer.draw(str, 'tst', '1.2.3', diagram); // needs to be rendered for the correct value of visibility autonumbers
expect(diagram.db.showSequenceNumbers()).toBe(true);
});
it('it should handle a sequenceDiagram definition with a title:', function () {
it('should handle a sequenceDiagram definition with a title:', function () {
const str = `
sequenceDiagram
title: Diagram Title
@ -172,7 +172,7 @@ Bob-->Alice: I am good thanks!`;
expect(title).toBe('Diagram Title');
});
it('it should handle a sequenceDiagram definition with a title without a :', function () {
it('should handle a sequenceDiagram definition with a title without a :', function () {
const str = `
sequenceDiagram
title Diagram Title
@ -195,7 +195,7 @@ Bob-->Alice: I am good thanks!`;
expect(title).toBe('Diagram Title');
});
it('it should handle a sequenceDiagram definition with a accessibility title and description (accDescr)', function () {
it('should handle a sequenceDiagram definition with a accessibility title and description (accDescr)', function () {
const str = `
sequenceDiagram
title: Diagram Title
@ -210,7 +210,7 @@ Alice->Bob:Hello Bob, how are you?
expect(diagram.db.getAccDescription()).toBe('Accessibility Description');
const messages = diagram.db.getMessages();
});
it('it should handle a sequenceDiagram definition with a accessibility title and multiline description (accDescr)', function () {
it('should handle a sequenceDiagram definition with a accessibility title and multiline description (accDescr)', function () {
const str = `
sequenceDiagram
accTitle: This is the title
@ -227,7 +227,7 @@ Alice->Bob:Hello Bob, how are you?
const messages = diagram.db.getMessages();
});
it('it should space in actor names', function () {
it('should space in actor names', function () {
const str = `
sequenceDiagram
Alice->Bob:Hello Bob, how are - you?
@ -244,7 +244,7 @@ Bob-->Alice: I am good thanks!`;
expect(messages[0].from).toBe('Alice');
expect(messages[1].from).toBe('Bob');
});
it('it should handle dashes in actor names', function () {
it('should handle dashes in actor names', function () {
const str = `
sequenceDiagram
Alice-in-Wonderland->Bob:Hello Bob, how are - you?
@ -261,7 +261,7 @@ Bob-->Alice-in-Wonderland:I am good thanks!`;
expect(messages[0].from).toBe('Alice-in-Wonderland');
expect(messages[1].from).toBe('Bob');
});
it('it should alias participants', function () {
it('should alias participants', function () {
const str = `
sequenceDiagram
participant A as Alice
@ -282,7 +282,7 @@ B-->A: I am good thanks!`;
expect(messages[0].from).toBe('A');
expect(messages[1].from).toBe('B');
});
it('it should alias a mix of actors and participants apa12', function () {
it('should alias a mix of actors and participants apa12', function () {
const str = `
sequenceDiagram
actor Alice as Alice2
@ -310,7 +310,7 @@ sequenceDiagram
expect(messages[0].from).toBe('Alice');
expect(messages[4].to).toBe('Joan');
});
it('it should alias actors apa13', function () {
it('should alias actors apa13', function () {
const str = `
sequenceDiagram
actor A as Alice
@ -330,7 +330,7 @@ B-->A: I am good thanks!`;
expect(messages[0].from).toBe('A');
expect(messages[1].from).toBe('B');
});
it('it should handle in async messages', function () {
it('should handle in async messages', function () {
const str = `
sequenceDiagram
Alice-xBob:Hello Bob, how are you?`;
@ -345,7 +345,7 @@ Alice-xBob:Hello Bob, how are you?`;
expect(messages.length).toBe(1);
expect(messages[0].type).toBe(diagram.db.LINETYPE.SOLID_CROSS);
});
it('it should handle in async dotted messages', function () {
it('should handle in async dotted messages', function () {
const str = `
sequenceDiagram
Alice--xBob:Hello Bob, how are you?`;
@ -360,7 +360,7 @@ Alice--xBob:Hello Bob, how are you?`;
expect(messages.length).toBe(1);
expect(messages[0].type).toBe(diagram.db.LINETYPE.DOTTED_CROSS);
});
it('it should handle in sync messages', function () {
it('should handle in sync messages', function () {
const str = `
sequenceDiagram
Alice-)Bob:Hello Bob, how are you?`;
@ -375,7 +375,7 @@ Alice-)Bob:Hello Bob, how are you?`;
expect(messages.length).toBe(1);
expect(messages[0].type).toBe(diagram.db.LINETYPE.SOLID_POINT);
});
it('it should handle in sync dotted messages', function () {
it('should handle in sync dotted messages', function () {
const str = `
sequenceDiagram
Alice--)Bob:Hello Bob, how are you?`;
@ -390,7 +390,7 @@ Alice--)Bob:Hello Bob, how are you?`;
expect(messages.length).toBe(1);
expect(messages[0].type).toBe(diagram.db.LINETYPE.DOTTED_POINT);
});
it('it should handle in arrow messages', function () {
it('should handle in arrow messages', function () {
const str = `
sequenceDiagram
Alice->>Bob:Hello Bob, how are you?`;
@ -405,7 +405,7 @@ Alice->>Bob:Hello Bob, how are you?`;
expect(messages.length).toBe(1);
expect(messages[0].type).toBe(diagram.db.LINETYPE.SOLID);
});
it('it should handle in arrow messages', function () {
it('should handle in arrow messages', function () {
const str = 'sequenceDiagram\n' + 'Alice-->>Bob:Hello Bob, how are you?';
mermaidAPI.parse(str);
@ -418,7 +418,7 @@ Alice->>Bob:Hello Bob, how are you?`;
expect(messages.length).toBe(1);
expect(messages[0].type).toBe(diagram.db.LINETYPE.DOTTED);
});
it('it should handle actor activation', function () {
it('should handle actor activation', function () {
const str = `
sequenceDiagram
Alice-->>Bob:Hello Bob, how are you?
@ -441,7 +441,7 @@ deactivate Bob`;
expect(messages[3].type).toBe(diagram.db.LINETYPE.ACTIVE_END);
expect(messages[3].from.actor).toBe('Bob');
});
it('it should handle actor one line notation activation', function () {
it('should handle actor one line notation activation', function () {
const str = `
sequenceDiagram
Alice-->>+Bob:Hello Bob, how are you?
@ -462,7 +462,7 @@ deactivate Bob`;
expect(messages[3].type).toBe(diagram.db.LINETYPE.ACTIVE_END);
expect(messages[3].from.actor).toBe('Bob');
});
it('it should handle stacked activations', function () {
it('should handle stacked activations', function () {
const str = `
sequenceDiagram
Alice-->>+Bob:Hello Bob, how are you?
@ -489,7 +489,7 @@ deactivate Bob`;
expect(messages[7].type).toBe(diagram.db.LINETYPE.ACTIVE_END);
expect(messages[7].from.actor).toBe('Carol');
});
it('it should handle fail parsing when activating an inactive participant', function () {
it('should handle fail parsing when activating an inactive participant', function () {
const str = `
sequenceDiagram
participant user as End User
@ -515,7 +515,7 @@ deactivate Bob`;
expect(error).toBe(true);
});
it('it should handle comments in a sequenceDiagram', function () {
it('should handle comments in a sequenceDiagram', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -534,7 +534,7 @@ deactivate Bob`;
expect(messages[0].from).toBe('Alice');
expect(messages[2].from).toBe('Bob');
});
it('it should handle new lines in a sequenceDiagram', function () {
it('should handle new lines in a sequenceDiagram', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -555,7 +555,7 @@ deactivate Bob`;
expect(messages[0].from).toBe('Alice');
expect(messages[2].from).toBe('Bob');
});
it('it should handle semicolons', function () {
it('should handle semicolons', function () {
const str = `
sequenceDiagram;Alice->Bob: Hello Bob, how are you?;Note right of Bob: Bob thinks;Bob-->Alice: I am good thanks!;`;
@ -570,7 +570,7 @@ sequenceDiagram;Alice->Bob: Hello Bob, how are you?;Note right of Bob: Bob think
expect(messages[0].from).toBe('Alice');
expect(messages[2].from).toBe('Bob');
});
it('it should handle one leading space in lines in a sequenceDiagram', function () {
it('should handle one leading space in lines in a sequenceDiagram', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -590,7 +590,7 @@ Bob-->Alice: I am good thanks!`;
expect(messages[0].from).toBe('Alice');
expect(messages[2].from).toBe('Bob');
});
it('it should handle several leading spaces in lines in a sequenceDiagram', function () {
it('should handle several leading spaces in lines in a sequenceDiagram', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -610,7 +610,7 @@ Bob-->Alice: I am good thanks!`;
expect(messages[0].from).toBe('Alice');
expect(messages[2].from).toBe('Bob');
});
it('it should handle several leading spaces in lines in a sequenceDiagram', function () {
it('should handle several leading spaces in lines in a sequenceDiagram', function () {
const str = `
sequenceDiagram
participant Alice
@ -635,7 +635,7 @@ Bob-->John: Jolly good!`;
expect(messages[0].from).toBe('Alice');
expect(messages[2].from).toBe('John');
});
it('it should handle different line breaks', function () {
it('should handle different line breaks', function () {
const str = `
sequenceDiagram
participant 1 as multiline<br>text
@ -670,7 +670,7 @@ note right of 1: multiline<br \t/>text
expect(messages[6].message).toBe('multiline<br \t/>text');
expect(messages[7].message).toBe('multiline<br \t/>text');
});
it('it should handle notes and messages without wrap specified', function () {
it('should handle notes and messages without wrap specified', function () {
const str = `
sequenceDiagram
participant 1
@ -709,7 +709,7 @@ note right of 1:nowrap: multiline<br/>text
expect(messages[6].wrap).toBe(false);
expect(messages[7].wrap).toBe(false);
});
it('it should handle notes and messages with wrap specified', function () {
it('should handle notes and messages with wrap specified', function () {
const str = `
sequenceDiagram
participant 1
@ -734,7 +734,7 @@ note right of 3:wrap: multiline<br/>text
expect(messages[2].wrap).toBe(true);
expect(messages[3].wrap).toBe(true);
});
it('it should handle notes and messages with nowrap or line breaks', function () {
it('should handle notes and messages with nowrap or line breaks', function () {
const str = `
sequenceDiagram
participant 1
@ -751,7 +751,7 @@ note right of 2: single-line text
expect(messages[0].wrap).toBe(false);
expect(messages[1].wrap).toBe(false);
});
it('it should handle notes over a single actor', function () {
it('should handle notes over a single actor', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -764,7 +764,7 @@ Note over Bob: Bob thinks
expect(messages[1].from).toBe('Bob');
expect(messages[1].to).toBe('Bob');
});
it('it should handle notes over multiple actors', function () {
it('should handle notes over multiple actors', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -780,7 +780,7 @@ Note over Bob,Alice: resolution
expect(messages[2].from).toBe('Bob');
expect(messages[2].to).toBe('Alice');
});
it('it should handle loop statements', function () {
it('should handle loop statements', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -803,7 +803,7 @@ end`;
expect(messages[0].from).toBe('Alice');
expect(messages[1].from).toBe('Bob');
});
it('it should add a rect around sequence', function () {
it('should add a rect around sequence', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -827,7 +827,7 @@ end`;
expect(messages[4].type).toEqual(diagram.db.LINETYPE.RECT_END);
});
it('it should allow for nested rects', function () {
it('should allow for nested rects', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -854,7 +854,7 @@ end`;
expect(messages[5].type).toEqual(diagram.db.LINETYPE.DOTTED_OPEN);
expect(messages[6].type).toEqual(diagram.db.LINETYPE.RECT_END);
});
it('it should handle opt statements', function () {
it('should handle opt statements', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -877,7 +877,7 @@ end`;
expect(messages[0].from).toBe('Alice');
expect(messages[1].from).toBe('Bob');
});
it('it should handle alt statements', function () {
it('should handle alt statements', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -903,7 +903,7 @@ end`;
expect(messages[0].from).toBe('Alice');
expect(messages[1].from).toBe('Bob');
});
it('it should handle alt statements with multiple elses', function () {
it('should handle alt statements with multiple elses', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -930,7 +930,7 @@ end`;
expect(messages[7].from).toBe('Bob');
expect(messages[8].type).toBe(diagram.db.LINETYPE.ALT_END);
});
it('it should handle critical statements without options', function () {
it('should handle critical statements without options', function () {
const str = `
sequenceDiagram
critical Establish a connection to the DB
@ -950,7 +950,7 @@ sequenceDiagram
expect(messages[1].from).toBe('Service');
expect(messages[2].type).toBe(diagram.db.LINETYPE.CRITICAL_END);
});
it('it should handle critical statements with options', function () {
it('should handle critical statements with options', function () {
const str = `
sequenceDiagram
critical Establish a connection to the DB
@ -978,7 +978,7 @@ sequenceDiagram
expect(messages[5].from).toBe('Service');
expect(messages[6].type).toBe(diagram.db.LINETYPE.CRITICAL_END);
});
it('it should handle break statements', function () {
it('should handle break statements', function () {
const str = `
sequenceDiagram
Consumer-->API: Book something
@ -1004,7 +1004,7 @@ sequenceDiagram
expect(messages[4].type).toBe(diagram.db.LINETYPE.BREAK_END);
expect(messages[5].from).toBe('API');
});
it('it should handle par statements a sequenceDiagram', function () {
it('should handle par statements a sequenceDiagram', function () {
const str = `
sequenceDiagram
par Parallel one
@ -1031,7 +1031,7 @@ end`;
expect(messages[1].from).toBe('Alice');
expect(messages[2].from).toBe('Bob');
});
it('it should handle special characters in signals', function () {
it('should handle special characters in signals', function () {
const str = 'sequenceDiagram\n' + 'Alice->Bob: -:<>,;# comment';
mermaidAPI.parse(str);
@ -1039,7 +1039,7 @@ end`;
const messages = diagram.db.getMessages();
expect(messages[0].message).toBe('-:<>,');
});
it('it should handle special characters in notes', function () {
it('should handle special characters in notes', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -1050,7 +1050,7 @@ Note right of Bob: -:<>,;# comment`;
const messages = diagram.db.getMessages();
expect(messages[1].message).toBe('-:<>,');
});
it('it should handle special characters in loop', function () {
it('should handle special characters in loop', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -1063,7 +1063,7 @@ end`;
const messages = diagram.db.getMessages();
expect(messages[1].message).toBe('-:<>,');
});
it('it should handle special characters in opt', function () {
it('should handle special characters in opt', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -1076,7 +1076,7 @@ end`;
const messages = diagram.db.getMessages();
expect(messages[1].message).toBe('-:<>,');
});
it('it should handle special characters in alt', function () {
it('should handle special characters in alt', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -1092,7 +1092,7 @@ end`;
expect(messages[1].message).toBe('-:<>,');
expect(messages[3].message).toBe(',<>:-');
});
it('it should handle special characters in par', function () {
it('should handle special characters in par', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -1108,7 +1108,7 @@ end`;
expect(messages[1].message).toBe('-:<>,');
expect(messages[3].message).toBe(',<>:-');
});
it('it should handle no-label loop', function () {
it('should handle no-label loop', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -1122,7 +1122,7 @@ end`;
expect(messages[1].message).toBe('');
expect(messages[2].message).toBe('I am good thanks!');
});
it('it should handle no-label opt', function () {
it('should handle no-label opt', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -1136,7 +1136,7 @@ end`;
expect(messages[1].message).toBe('');
expect(messages[2].message).toBe('I am good thanks!');
});
it('it should handle no-label alt', function () {
it('should handle no-label alt', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -1153,7 +1153,7 @@ end`;
expect(messages[3].message).toBe('');
expect(messages[4].message).toBe('I am good thanks!');
});
it('it should handle no-label par', function () {
it('should handle no-label par', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -1171,7 +1171,7 @@ end`;
expect(messages[4].message).toBe('I am good thanks!');
});
it('it should handle links', function () {
it('should handle links', function () {
const str = `
sequenceDiagram
participant a as Alice
@ -1198,7 +1198,7 @@ link a: Tests @ https://tests.contoso.com/?svc=alice@contoso.com
expect(actors.a.links['Tests']).toBe('https://tests.contoso.com/?svc=alice@contoso.com');
});
it('it should handle properties EXPERIMENTAL: USE WITH CAUTION', function () {
it('should handle properties EXPERIMENTAL: USE WITH CAUTION', function () {
//Be aware that the syntax for "properties" is likely to be changed.
const str = `
sequenceDiagram
@ -1245,7 +1245,7 @@ describe('when checking the bounds in a sequenceDiagram', function () {
diagram.renderer.bounds.init();
conf = diagram.db.getConfig();
});
it('it should handle a simple bound call', function () {
it('should handle a simple bound call', function () {
diagram.renderer.bounds.insert(100, 100, 200, 200);
const { bounds } = diagram.renderer.bounds.getBounds();
@ -1254,7 +1254,7 @@ describe('when checking the bounds in a sequenceDiagram', function () {
expect(bounds.stopx).toBe(200);
expect(bounds.stopy).toBe(200);
});
it('it should handle an expanding bound', function () {
it('should handle an expanding bound', function () {
diagram.renderer.bounds.insert(100, 100, 200, 200);
diagram.renderer.bounds.insert(25, 50, 300, 400);
@ -1264,7 +1264,7 @@ describe('when checking the bounds in a sequenceDiagram', function () {
expect(bounds.stopx).toBe(300);
expect(bounds.stopy).toBe(400);
});
it('it should handle inserts within the bound without changing the outer bounds', function () {
it('should handle inserts within the bound without changing the outer bounds', function () {
diagram.renderer.bounds.insert(100, 100, 200, 200);
diagram.renderer.bounds.insert(25, 50, 300, 400);
diagram.renderer.bounds.insert(125, 150, 150, 200);
@ -1275,7 +1275,7 @@ describe('when checking the bounds in a sequenceDiagram', function () {
expect(bounds.stopx).toBe(300);
expect(bounds.stopy).toBe(400);
});
it('it should handle a loop without expanding the area', function () {
it('should handle a loop without expanding the area', function () {
diagram.renderer.bounds.insert(25, 50, 300, 400);
diagram.renderer.bounds.verticalPos = 150;
diagram.renderer.bounds.newLoop();
@ -1296,7 +1296,7 @@ describe('when checking the bounds in a sequenceDiagram', function () {
expect(bounds.stopx).toBe(300);
expect(bounds.stopy).toBe(400);
});
it('it should handle multiple loops withtout expanding the bounds', function () {
it('should handle multiple loops withtout expanding the bounds', function () {
diagram.renderer.bounds.insert(100, 100, 1000, 1000);
diagram.renderer.bounds.verticalPos = 200;
diagram.renderer.bounds.newLoop();
@ -1327,7 +1327,7 @@ describe('when checking the bounds in a sequenceDiagram', function () {
expect(bounds.stopx).toBe(1000);
expect(bounds.stopy).toBe(1000);
});
it('it should handle a loop that expands the area', function () {
it('should handle a loop that expands the area', function () {
diagram.renderer.bounds.insert(100, 100, 200, 200);
diagram.renderer.bounds.verticalPos = 200;
diagram.renderer.bounds.newLoop();
@ -1414,7 +1414,7 @@ participant Alice`;
expect(bounds.stopy).toBe(conf.height);
});
});
it('it should handle same actor with different whitespace properly', function () {
it('should handle same actor with different whitespace properly', function () {
const str = `
sequenceDiagram
participant Alice
@ -1427,7 +1427,7 @@ participant Alice
const actors = diagram.db.getActors();
expect(Object.keys(actors)).toEqual(['Alice']);
});
it('it should handle one actor and a centered note', function () {
it('should handle one actor and a centered note', function () {
const str = `
sequenceDiagram
participant Alice
@ -1445,7 +1445,7 @@ Note over Alice: Alice thinks
// 10 comes from mock of text height
expect(bounds.stopy).toBe(models.lastNote().stopy);
});
it('it should handle one actor and a note to the left', function () {
it('should handle one actor and a note to the left', function () {
const str = `
sequenceDiagram
participant Alice
@ -1461,7 +1461,7 @@ Note left of Alice: Alice thinks`;
// 10 comes from mock of text height
expect(bounds.stopy).toBe(models.lastNote().stopy);
});
it('it should handle one actor and a note to the right', function () {
it('should handle one actor and a note to the right', function () {
const str = `
sequenceDiagram
participant Alice
@ -1477,7 +1477,7 @@ Note right of Alice: Alice thinks`;
// 10 comes from mock of text height
expect(bounds.stopy).toBe(models.lastNote().stopy);
});
it('it should handle two actors', function () {
it('should handle two actors', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?`;
@ -1491,7 +1491,7 @@ Alice->Bob: Hello Bob, how are you?`;
expect(bounds.stopx).toBe(conf.width * 2 + conf.actorMargin);
expect(bounds.stopy).toBe(models.lastMessage().stopy + 10);
});
it('it should handle two actors with init directive', function () {
it('should handle two actors with init directive', function () {
const str = `
%%{init: {'logLevel': 0}}%%
sequenceDiagram
@ -1508,7 +1508,7 @@ Alice->Bob: Hello Bob, how are you?`;
expect(bounds.stopx).toBe(conf.width * 2 + conf.actorMargin);
expect(bounds.stopy).toBe(models.lastMessage().stopy + 10);
});
it('it should handle two actors with init directive with multiline directive', function () {
it('should handle two actors with init directive with multiline directive', function () {
const str = `
%%{init: { 'logLevel': 0}}%%
sequenceDiagram
@ -1530,7 +1530,7 @@ Alice->Bob: Hello Bob, how are you?`;
expect(bounds.stopy).toBe(models.lastMessage().stopy + 10);
expect(msgs.every((v) => v.wrap)).toBe(true);
});
it('it should handle two actors and two centered shared notes', function () {
it('should handle two actors and two centered shared notes', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -1547,7 +1547,7 @@ Note over Bob,Alice: Looks back
expect(bounds.stopx).toBe(conf.width * 2 + conf.actorMargin);
expect(bounds.stopy).toBe(models.lastNote().stopy);
});
it('it should draw two actors and two messages', function () {
it('should draw two actors and two messages', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -1562,7 +1562,7 @@ Bob->Alice: Fine!`;
expect(bounds.stopx).toBe(conf.width * 2 + conf.actorMargin);
expect(bounds.stopy).toBe(models.lastMessage().stopy + 10);
});
it('it should draw two actors notes to the right', function () {
it('should draw two actors notes to the right', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -1581,7 +1581,7 @@ Bob->Alice: Fine!`;
expect(bounds.stopx).toBe(expStopX);
expect(bounds.stopy).toBe(models.lastMessage().stopy + 10);
});
it('it should draw two actors notes to the left', function () {
it('should draw two actors notes to the left', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -1598,7 +1598,7 @@ Bob->Alice: Fine!`;
expect(bounds.stopx).toBe(conf.width * 2 + conf.actorMargin);
expect(bounds.stopy).toBe(models.lastMessage().stopy + 10);
});
it('it should draw two actors notes to the left with text wrapped (inline)', function () {
it('should draw two actors notes to the left with text wrapped (inline)', function () {
const str = `
sequenceDiagram
Alice->>Bob:wrap: Hello Bob, how are you? If you are not available right now, I can leave you a message. Please get back to me as soon as you can!
@ -1617,7 +1617,7 @@ Bob->>Alice: Fine!`;
expect(bounds.stopx).toBe(conf.width * 2 + conf.actorMargin);
expect(bounds.stopy).toBe(models.lastMessage().stopy + 10);
});
it('it should draw two actors notes to the left with text wrapped (directive)', function () {
it('should draw two actors notes to the left with text wrapped (directive)', function () {
const str = `
%%{init: { 'theme': 'dark' } }%%
sequenceDiagram
@ -1640,7 +1640,7 @@ Bob->>Alice: Fine!`;
expect(bounds.stopx).toBe(conf.width * 2 + conf.actorMargin);
expect(bounds.stopy).toBe(models.lastMessage().stopy + 10);
});
it('it should draw two actors notes to the left with text wrapped and the init directive sets the theme to dark', function () {
it('should draw two actors notes to the left with text wrapped and the init directive sets the theme to dark', function () {
const str = `
%%{init:{'theme':'dark'}}%%
sequenceDiagram
@ -1663,7 +1663,7 @@ Bob->>Alice: Fine!`;
expect(bounds.stopx).toBe(conf.width * 2 + conf.actorMargin);
expect(bounds.stopy).toBe(models.lastMessage().stopy + 10);
});
it('it should draw two actors, notes to the left with text wrapped and the init directive sets the theme to dark and fontFamily to Menlo, fontSize to 18, and fontWeight to 800', function () {
it('should draw two actors, notes to the left with text wrapped and the init directive sets the theme to dark and fontFamily to Menlo, fontSize to 18, and fontWeight to 800', function () {
const str = `
%%{init: { "theme": "dark", 'config': { "fontFamily": "Menlo", "fontSize": 18, "messageFontWeight": 400, "wrap": true }}}%%
sequenceDiagram
@ -1688,7 +1688,7 @@ Bob->>Alice: Fine!`;
expect(bounds.stopx).toBe(conf.width * 2 + conf.actorMargin);
expect(bounds.stopy).toBe(models.lastMessage().stopy + 10);
});
it('it should draw two loops', function () {
it('should draw two loops', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
@ -1705,7 +1705,7 @@ end`;
expect(bounds.stopx).toBe(conf.width * 2 + conf.actorMargin);
expect(bounds.stopy).toBe(models.lastLoop().stopy);
});
it('it should draw background rect', function () {
it('should draw background rect', function () {
const str = `
sequenceDiagram
Alice->Bob: Hello Bob, are you alright?
@ -1755,7 +1755,7 @@ describe('when rendering a sequenceDiagram with actor mirror activated', functio
diagram.renderer.bounds.init();
});
['tspan', 'fo', 'old', undefined].forEach(function (textPlacement) {
it('it should handle one actor, when textPlacement is' + textPlacement, function () {
it('should handle one actor, when textPlacement is' + textPlacement, function () {
mermaidAPI.initialize(addConf(conf, 'textPlacement', textPlacement));
diagram.renderer.bounds.init();
const str = `
@ -1799,7 +1799,7 @@ describe('when rendering a sequenceDiagram with directives', function () {
diagram.renderer.bounds.init();
});
it('it should handle one actor, when theme is dark and logLevel is 1 DX1', function () {
it('should handle one actor, when theme is dark and logLevel is 1 DX1', function () {
const str = `
%%{init: { "theme": "dark", "logLevel": 1 } }%%
sequenceDiagram
@ -1823,7 +1823,7 @@ participant Alice
models.lastActor().y + models.lastActor().height + mermaid.sequence.boxMargin
);
});
it('it should handle one actor, when logLevel is 3', function () {
it('should handle one actor, when logLevel is 3', function () {
const str = `
%%{initialize: { "logLevel": 3 }}%%
sequenceDiagram
@ -1843,7 +1843,7 @@ participant Alice
models.lastActor().y + models.lastActor().height + mermaid.sequence.boxMargin
);
});
it('it should hide sequence numbers when autonumber is removed when autonumber is enabled', function () {
it('should hide sequence numbers when autonumber is removed when autonumber is enabled', function () {
const str1 = `
sequenceDiagram
autonumber

View File

@ -45,7 +45,7 @@ const getStyles = (options) =>
.messageText {
fill: ${options.signalTextColor};
stroke: ${options.signalTextColor};
stroke: none;
}
.labelBox {

View File

@ -3,7 +3,7 @@ const { MockD3 } = require('d3');
describe('svgDraw', function () {
describe('drawRect', function () {
it('it should append a rectangle', function () {
it('should append a rectangle', function () {
const svg = MockD3('svg');
svgDraw.drawRect(svg, {
x: 10,
@ -29,7 +29,7 @@ describe('svgDraw', function () {
expect(rect.attr).toHaveBeenCalledWith('ry', '10');
expect(rect.attr).toHaveBeenCalledWith('class', 'unitTestRectangleClass');
});
it('it should not add the class attribute if a class isn`t provided', () => {
it('should not add the class attribute if a class isn`t provided', () => {
const svg = MockD3('svg');
svgDraw.drawRect(svg, {
x: 10,
@ -49,7 +49,7 @@ describe('svgDraw', function () {
});
});
describe('drawText', function () {
it('it should append a single element', function () {
it('should append a single element', function () {
const svg = MockD3('svg');
svgDraw.drawText(svg, {
x: 10,
@ -73,7 +73,7 @@ describe('svgDraw', function () {
expect(text.style).toHaveBeenCalledWith('font-size', '10px');
expect(text.style).toHaveBeenCalledWith('font-weight', '500');
});
it('it should append a multiple elements', function () {
it('should append a multiple elements', function () {
const svg = MockD3('svg');
svgDraw.drawText(svg, {
x: 10,
@ -101,7 +101,7 @@ describe('svgDraw', function () {
});
});
describe('drawBackgroundRect', function () {
it('it should append a rect before the previous element within a given bound', function () {
it('should append a rect before the previous element within a given bound', function () {
const svg = MockD3('svg');
const boundingRect = {
startx: 50,
@ -125,12 +125,12 @@ describe('svgDraw', function () {
});
});
describe('sanitizeUrl', function () {
it('it should sanitize malicious urls', function () {
it('should sanitize malicious urls', function () {
const maliciousStr = 'javascript:script:alert(1)';
const result = svgDraw.sanitizeUrl(maliciousStr);
expect(result).not.toContain('javascript:alert(1)');
});
it('it should not sanitize non dangerous urls', function () {
it('should not sanitize non dangerous urls', function () {
const maliciousStr = 'javajavascript:script:alert(1)';
const result = svgDraw.sanitizeUrl(maliciousStr);
expect(result).not.toContain('javascript:alert(1)');

View File

@ -305,7 +305,7 @@ export const draw = function (text, id, _version, diag) {
const svgBounds = svg.node().getBBox();
configureSvgSize(svg, height, width * 1.75, conf.useMaxWidth);
configureSvgSize(svg, height, width, conf.useMaxWidth);
// Ensure the viewBox includes the whole svgBounds area with extra space for padding
const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`;

View File

@ -19,7 +19,7 @@ describe('when parsing a journey diagram it', function () {
expect(parserFnConstructor(str)).not.toThrow();
});
it('it should handle an accessibility description (accDescr)', function () {
it('should handle an accessibility description (accDescr)', function () {
const str =
'journey\n' +
'accDescr: A user journey for family shopping\n' +
@ -28,7 +28,7 @@ describe('when parsing a journey diagram it', function () {
expect(parserFnConstructor(str)).not.toThrow();
});
it('it should handle an accessibility multiline description (accDescr)', function () {
it('should handle an accessibility multiline description (accDescr)', function () {
const str =
'journey\n' +
`accDescr {
@ -44,7 +44,7 @@ describe('when parsing a journey diagram it', function () {
expect(journeyDb.getDiagramTitle()).toBe('Adding journey diagram functionality to mermaid');
expect(journeyDb.getAccTitle()).toBe('Adding acc journey diagram functionality to mermaid');
});
it('it should handle an accessibility title (accDescr)', function () {
it('should handle an accessibility title (accDescr)', function () {
const str = `journey
accTitle: The title
section Order from website`;

View File

@ -46,7 +46,7 @@ describe('when using mermaid and ', function () {
flowDb.clear();
flowDb.setGen('gen-2');
});
it('it should handle edges with text', function () {
it('should handle edges with text', function () {
const diag = new Diagram('graph TD;A-->|text ex|B;');
diag.db.getVertices();
const edges = diag.db.getEdges();
@ -189,18 +189,18 @@ describe('when using mermaid and ', function () {
flowDb.clear();
flowDb.setGen('gen-2');
});
it('it should throw for an invalid definition', function () {
it('should throw for an invalid definition', function () {
expect(() => mermaid.parse('this is not a mermaid diagram definition')).toThrow();
});
it('it should not throw for a valid flow definition', function () {
it('should not throw for a valid flow definition', function () {
expect(() => mermaid.parse('graph TD;A--x|text including URL space|B;')).not.toThrow();
});
it('it should throw for an invalid flow definition', function () {
it('should throw for an invalid flow definition', function () {
expect(() => mermaid.parse('graph TQ;A--x|text including URL space|B;')).toThrow();
});
it('it should not throw for a valid sequenceDiagram definition', function () {
it('should not throw for a valid sequenceDiagram definition', function () {
const text =
'sequenceDiagram\n' +
'Alice->Bob: Hello Bob, how are you?\n\n' +
@ -214,7 +214,7 @@ describe('when using mermaid and ', function () {
expect(() => mermaid.parse(text)).not.toThrow();
});
it('it should throw for an invalid sequenceDiagram definition', function () {
it('should throw for an invalid sequenceDiagram definition', function () {
const text =
'sequenceDiagram\n' +
'Alice:->Bob: Hello Bob, how are you?\n\n' +

View File

@ -141,7 +141,7 @@ export const decodeEntities = function (text) {
* @param {any} _txt The graph definition
* @param {any} cb Callback which is called after rendering is finished with the svg code as inparam.
* @param {any} container Selector to element in which a div with the graph temporarily will be
* inserted. In one is provided a hidden div will be inserted in the body of the page instead. The
* inserted. If one is provided a hidden div will be inserted in the body of the page instead. The
* element will be removed when rendering is completed.
* @returns {any}
*/

View File

@ -122,14 +122,14 @@ describe('when using mermaidAPI and ', function () {
});
describe('test mermaidApi.parse() for checking validity of input ', function () {
mermaid.parseError = undefined; // ensure it parseError undefined
it('it should throw for an invalid definition (with no mermaid.parseError() defined)', function () {
it('should throw for an invalid definition (with no mermaid.parseError() defined)', function () {
expect(mermaid.parseError).toEqual(undefined);
expect(() => mermaidAPI.parse('this is not a mermaid diagram definition')).toThrow();
});
it('it should not throw for a valid definition', function () {
it('should not throw for a valid definition', function () {
expect(() => mermaidAPI.parse('graph TD;A--x|text including URL space|B;')).not.toThrow();
});
it('it should return false for invalid definition WITH a parseError() callback defined', function () {
it('should return false for invalid definition WITH a parseError() callback defined', function () {
var parseErrorWasCalled = false;
// also test setParseErrorHandler() call working to set mermaid.parseError
mermaid.setParseErrorHandler(function (error, hash) {
@ -140,7 +140,7 @@ describe('when using mermaidAPI and ', function () {
expect(mermaidAPI.parse('this is not a mermaid diagram definition')).toEqual(false);
expect(parseErrorWasCalled).toEqual(true);
});
it('it should return true for valid definition', function () {
it('should return true for valid definition', function () {
expect(mermaidAPI.parse('graph TD;A--x|text including URL space|B;')).toEqual(true);
});
});

View File

@ -742,7 +742,7 @@ const d3Attrs = function (d3Elem, attrs) {
*/
export const calculateSvgSizeAttrs = function (height, width, useMaxWidth) {
let attrs = new Map();
attrs.set('height', height);
// attrs.set('height', height);
if (useMaxWidth) {
attrs.set('width', '100%');
attrs.set('style', `max-width: ${width}px;`);
@ -761,7 +761,7 @@ export const calculateSvgSizeAttrs = function (height, width, useMaxWidth) {
* @param {boolean} useMaxWidth Whether or not to use max-width and set width to 100%
*/
export const configureSvgSize = function (svgElem, height, width, useMaxWidth) {
const attrs = calculateSvgSizeAttrs(height, width, useMaxWidth);
const attrs = calculateSvgSizeAttrs(height, 1 * width, useMaxWidth);
d3Attrs(svgElem, attrs);
};
export const setupGraphViewbox = function (graph, svgElem, padding, useMaxWidth) {
@ -769,27 +769,37 @@ export const setupGraphViewbox = function (graph, svgElem, padding, useMaxWidth)
const sWidth = svgBounds.width;
const sHeight = svgBounds.height;
log.info(`SVG bounds: ${sWidth}x${sHeight}`, svgBounds);
let width = graph._label.width;
let height = graph._label.height;
let tx = 0;
let ty = 0;
if (sWidth > width) {
tx = (sWidth - width) / 2 + padding;
width = sWidth + padding * 2;
} else {
if (Math.abs(sWidth - width) >= 2 * padding + 1) {
width = width - padding;
}
}
if (sHeight > height) {
ty = (sHeight - height) / 2 + padding;
height = sHeight + padding * 2;
}
log.info(`Graph bounds: ${width}x${height}`, graph);
// let tx = 0;
// let ty = 0;
// if (sWidth > width) {
// tx = (sWidth - width) / 2 + padding;
width = sWidth + padding * 2;
// } else {
// if (Math.abs(sWidth - width) >= 2 * padding + 1) {
// width = width - padding;
// }
// }
// if (sHeight > height) {
// ty = (sHeight - height) / 2 + padding;
height = sHeight + padding * 2;
// }
// width =
log.info(`Calculated bounds: ${width}x${height}`);
configureSvgSize(svgElem, height, width, useMaxWidth);
// Ensure the viewBox includes the whole svgBounds area with extra space for padding
const vBox = `0 0 ${width} ${height}`;
log.debug(
// const vBox = `0 0 ${width} ${height}`;
const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${
svgBounds.width + 2 * padding
} ${svgBounds.height + 2 * padding}`;
log.info(
'Graph.label',
graph._label,
'swidth',
@ -800,15 +810,12 @@ export const setupGraphViewbox = function (graph, svgElem, padding, useMaxWidth)
width,
'height',
height,
'tx',
tx,
'ty',
ty,
'vBox',
vBox
);
svgElem.attr('viewBox', vBox);
svgElem.select('g').attr('transform', `translate(${tx}, ${ty})`);
// svgElem.select('g').attr('transform', `translate(${tx}, ${ty})`);
};
export const initIdGenerator = class iterator {

View File

@ -294,13 +294,13 @@ describe('when formatting urls', function () {
describe('when calculating SVG size', function () {
it('should return width 100% when useMaxWidth is true', function () {
const attrs = utils.calculateSvgSizeAttrs(100, 200, true);
expect(attrs.get('height')).toEqual(100);
// expect(attrs.get('height')).toEqual(100);
expect(attrs.get('style')).toEqual('max-width: 200px;');
expect(attrs.get('width')).toEqual('100%');
});
it('should return absolute width when useMaxWidth is false', function () {
const attrs = utils.calculateSvgSizeAttrs(100, 200, false);
expect(attrs.get('height')).toEqual(100);
// expect(attrs.get('height')).toEqual(100);
expect(attrs.get('width')).toEqual(200);
});
});

561
yarn.lock
View File

@ -267,20 +267,20 @@
source-map "^0.5.0"
"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.14.6":
version "7.18.10"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.10.tgz#39ad504991d77f1f3da91be0b8b949a5bc466fb8"
integrity sha512-JQM6k6ENcBFKVtWvLavlvi/mPcpYZ3+R+2EySDEMSMbp7Mn4FexlbbJVrx2R7Ijhr01T8gyqrOaABWIOgxeUyw==
version "7.18.13"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.13.tgz#9be8c44512751b05094a4d3ab05fc53a47ce00ac"
integrity sha512-ZisbOvRRusFktksHSG6pjj1CSvkPkcZq/KHD45LAkVP/oiHJkNBZWfpvlLmX8OtHDG8IuzsFlVRWo08w7Qxn0A==
dependencies:
"@ampproject/remapping" "^2.1.0"
"@babel/code-frame" "^7.18.6"
"@babel/generator" "^7.18.10"
"@babel/generator" "^7.18.13"
"@babel/helper-compilation-targets" "^7.18.9"
"@babel/helper-module-transforms" "^7.18.9"
"@babel/helpers" "^7.18.9"
"@babel/parser" "^7.18.10"
"@babel/parser" "^7.18.13"
"@babel/template" "^7.18.10"
"@babel/traverse" "^7.18.10"
"@babel/types" "^7.18.10"
"@babel/traverse" "^7.18.13"
"@babel/types" "^7.18.13"
convert-source-map "^1.7.0"
debug "^4.1.0"
gensync "^1.0.0-beta.2"
@ -305,12 +305,12 @@
jsesc "^2.5.1"
source-map "^0.5.0"
"@babel/generator@^7.12.1", "@babel/generator@^7.18.10", "@babel/generator@^7.7.2":
version "7.18.10"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.10.tgz#794f328bfabdcbaf0ebf9bf91b5b57b61fa77a2a"
integrity sha512-0+sW7e3HjQbiHbj1NeU/vN8ornohYlacAfZIaXhdoGweQqgcNy69COVciYYqEXJ/v+9OBA7Frxm4CVAuNqKeNA==
"@babel/generator@^7.12.1", "@babel/generator@^7.18.13", "@babel/generator@^7.7.2":
version "7.18.13"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.13.tgz#59550cbb9ae79b8def15587bdfbaa388c4abf212"
integrity sha512-CkPg8ySSPuHTYPJYo7IRALdqyjM9HCbt/3uOBEFbzyGVP6Mn8bwFPB0jX6982JVNBlYzM1nnPkfjuXSOPtQeEQ==
dependencies:
"@babel/types" "^7.18.10"
"@babel/types" "^7.18.13"
"@jridgewell/gen-mapping" "^0.3.2"
jsesc "^2.5.1"
@ -662,10 +662,10 @@
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.3.tgz#a305415ebe7a6c7023b40b5122a0662d928334cd"
integrity sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==
"@babel/parser@^7.1.0", "@babel/parser@^7.10.5", "@babel/parser@^7.12.3", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10":
version "7.18.10"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.10.tgz#94b5f8522356e69e8277276adf67ed280c90ecc1"
integrity sha512-TYk3OA0HKL6qNryUayb5UUEhM/rkOQozIBEA5ITXh5DWrSp0TlUQXMyZmnWxG/DizSWBeeQ0Zbc5z8UGaaqoeg==
"@babel/parser@^7.1.0", "@babel/parser@^7.10.5", "@babel/parser@^7.12.3", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.18.13":
version "7.18.13"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.13.tgz#5b2dd21cae4a2c5145f1fbd8ca103f9313d3b7e4"
integrity sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg==
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6":
version "7.18.6"
@ -1497,26 +1497,26 @@
"@babel/parser" "^7.18.10"
"@babel/types" "^7.18.10"
"@babel/traverse@^7.10.5", "@babel/traverse@^7.12.1", "@babel/traverse@^7.16.7", "@babel/traverse@^7.16.8", "@babel/traverse@^7.18.10", "@babel/traverse@^7.18.6", "@babel/traverse@^7.18.9", "@babel/traverse@^7.7.2":
version "7.18.10"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.10.tgz#37ad97d1cb00efa869b91dd5d1950f8a6cf0cb08"
integrity sha512-J7ycxg0/K9XCtLyHf0cz2DqDihonJeIo+z+HEdRe9YuT8TY4A66i+Ab2/xZCEW7Ro60bPCBBfqqboHSamoV3+g==
"@babel/traverse@^7.10.5", "@babel/traverse@^7.12.1", "@babel/traverse@^7.16.7", "@babel/traverse@^7.16.8", "@babel/traverse@^7.18.10", "@babel/traverse@^7.18.13", "@babel/traverse@^7.18.6", "@babel/traverse@^7.18.9", "@babel/traverse@^7.7.2":
version "7.18.13"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.13.tgz#5ab59ef51a997b3f10c4587d648b9696b6cb1a68"
integrity sha512-N6kt9X1jRMLPxxxPYWi7tgvJRH/rtoU+dbKAPDM44RFHiMH8igdsaSBgFeskhSl/kLWLDUvIh1RXCrTmg0/zvA==
dependencies:
"@babel/code-frame" "^7.18.6"
"@babel/generator" "^7.18.10"
"@babel/generator" "^7.18.13"
"@babel/helper-environment-visitor" "^7.18.9"
"@babel/helper-function-name" "^7.18.9"
"@babel/helper-hoist-variables" "^7.18.6"
"@babel/helper-split-export-declaration" "^7.18.6"
"@babel/parser" "^7.18.10"
"@babel/types" "^7.18.10"
"@babel/parser" "^7.18.13"
"@babel/types" "^7.18.13"
debug "^4.1.0"
globals "^11.1.0"
"@babel/types@^7.0.0", "@babel/types@^7.12.1", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4":
version "7.18.10"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.10.tgz#4908e81b6b339ca7c6b7a555a5fc29446f26dde6"
integrity sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ==
"@babel/types@^7.0.0", "@babel/types@^7.12.1", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.18.10", "@babel/types@^7.18.13", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4":
version "7.18.13"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.13.tgz#30aeb9e514f4100f7c1cb6e5ba472b30e48f519a"
integrity sha512-ePqfTihzW0W6XAU+aMw2ykilisStJfDnsejDCXRchCcMJ4O0+8DhPXf2YUbZ6wjBlsEmZwLK/sPweWtu8hcJYQ==
dependencies:
"@babel/helper-string-parser" "^7.18.10"
"@babel/helper-validator-identifier" "^7.18.6"
@ -1533,14 +1533,14 @@
integrity sha512-mgmE7XBYY/21erpzhexk4Cj1cyTQ9LzvnTxtzM17BJ7ERMNE6W72mQRo0I1Ud8eFJ+RVVIcBNhLFZ3GX4XFz5w==
"@commitlint/cli@^17.0.0":
version "17.0.3"
resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-17.0.3.tgz#50be9d9a8d79f6c47bfd2703638fe65215eb2526"
integrity sha512-oAo2vi5d8QZnAbtU5+0cR2j+A7PO8zuccux65R/EycwvsZrDVyW518FFrnJK2UQxbRtHFFIG+NjQ6vOiJV0Q8A==
version "17.1.1"
resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-17.1.1.tgz#994e91a873aea2bcb53dfa3225ffce2c9022fd3e"
integrity sha512-xyQJNJs1j18At5wSBF6bMo1on6ZrpcHUr4duacznPU0RnywCAABDBP1s63BmhkTMdNXLVgVM4J1H2sG0HSS3IA==
dependencies:
"@commitlint/format" "^17.0.0"
"@commitlint/lint" "^17.0.3"
"@commitlint/load" "^17.0.3"
"@commitlint/read" "^17.0.0"
"@commitlint/lint" "^17.1.0"
"@commitlint/load" "^17.1.1"
"@commitlint/read" "^17.1.0"
"@commitlint/types" "^17.0.0"
execa "^5.0.0"
lodash "^4.17.19"
@ -1549,16 +1549,16 @@
yargs "^17.0.0"
"@commitlint/config-conventional@^17.0.0":
version "17.0.3"
resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-17.0.3.tgz#61e937357ce63ea08a2017e58b918748fcf3abc5"
integrity sha512-HCnzTm5ATwwwzNVq5Y57poS0a1oOOcd5pc1MmBpLbGmSysc4i7F/++JuwtdFPu16sgM3H9J/j2zznRLOSGVO2A==
version "17.1.0"
resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-17.1.0.tgz#9bd852766e08842bfe0fe4deb40e152eb718ec1b"
integrity sha512-WU2p0c9/jLi8k2q2YrDV96Y8XVswQOceIQ/wyJvQxawJSCasLdRB3kUIYdNjOCJsxkpoUlV/b90ZPxp1MYZDiA==
dependencies:
conventional-changelog-conventionalcommits "^5.0.0"
"@commitlint/config-validator@^17.0.3":
version "17.0.3"
resolved "https://registry.yarnpkg.com/@commitlint/config-validator/-/config-validator-17.0.3.tgz#5d1ec17eece1f85a0d06c05d168a039b313eb5d7"
integrity sha512-3tLRPQJKapksGE7Kee9axv+9z5I2GDHitDH4q63q7NmNA0wkB+DAorJ0RHz2/K00Zb1/MVdHzhCga34FJvDihQ==
"@commitlint/config-validator@^17.1.0":
version "17.1.0"
resolved "https://registry.yarnpkg.com/@commitlint/config-validator/-/config-validator-17.1.0.tgz#51d09ca53d7a0d19736abf34eb18a66efce0f97a"
integrity sha512-Q1rRRSU09ngrTgeTXHq6ePJs2KrI+axPTgkNYDWSJIuS1Op4w3J30vUfSXjwn5YEJHklK3fSqWNHmBhmTR7Vdg==
dependencies:
"@commitlint/types" "^17.0.0"
ajv "^8.11.0"
@ -1584,37 +1584,37 @@
"@commitlint/types" "^17.0.0"
chalk "^4.1.0"
"@commitlint/is-ignored@^17.0.3":
version "17.0.3"
resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-17.0.3.tgz#0e1c725c1e50aea5852fb1260bc92b2ee1856425"
integrity sha512-/wgCXAvPtFTQZxsVxj7owLeRf5wwzcXLaYmrZPR4a87iD4sCvUIRl1/ogYrtOyUmHwWfQsvjqIB4mWE/SqWSnA==
"@commitlint/is-ignored@^17.1.0":
version "17.1.0"
resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-17.1.0.tgz#c9d5ca22679fdc657fff33a8aa23e0c0152ebbd1"
integrity sha512-JITWKDMHhIh8IpdIbcbuH9rEQJty1ZWelgjleTFrVRAcEwN/sPzk1aVUXRIZNXMJWbZj8vtXRJnFihrml8uECQ==
dependencies:
"@commitlint/types" "^17.0.0"
semver "7.3.7"
"@commitlint/lint@^17.0.3":
version "17.0.3"
resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-17.0.3.tgz#98542a48f03b5c144309e24cbe1c032366ea75e2"
integrity sha512-2o1fk7JUdxBUgszyt41sHC/8Nd5PXNpkmuOo9jvGIjDHzOwXyV0PSdbEVTH3xGz9NEmjohFHr5l+N+T9fcxong==
"@commitlint/lint@^17.1.0":
version "17.1.0"
resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-17.1.0.tgz#de2d3baa2b20d9ec3d5fd2f2421f6025c8439630"
integrity sha512-ltpqM2ogt/+SDhUaScFo0MdscncEF96lvQTPMM/VTTWlw7sTGLLWkOOppsee2MN/uLNNWjQ7kqkd4h6JqoM9AQ==
dependencies:
"@commitlint/is-ignored" "^17.0.3"
"@commitlint/is-ignored" "^17.1.0"
"@commitlint/parse" "^17.0.0"
"@commitlint/rules" "^17.0.0"
"@commitlint/types" "^17.0.0"
"@commitlint/load@^17.0.3":
version "17.0.3"
resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-17.0.3.tgz#683aa484a5515714512e442f2f4b11f75e66097a"
integrity sha512-3Dhvr7GcKbKa/ey4QJ5MZH3+J7QFlARohUow6hftQyNjzoXXROm+RwpBes4dDFrXG1xDw9QPXA7uzrOShCd4bw==
"@commitlint/load@^17.1.1":
version "17.1.1"
resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-17.1.1.tgz#16f945d2cc4a5d4d75cccc3d7df8066ff152024b"
integrity sha512-jEgdDabfj58kFKZmB7rMtmQa7Feo7Ozh3KmvIlXWqrJmal5auO1RC0Iczfl52DlPn26Uo0goUDHrhoAFs2ze0Q==
dependencies:
"@commitlint/config-validator" "^17.0.3"
"@commitlint/config-validator" "^17.1.0"
"@commitlint/execute-rule" "^17.0.0"
"@commitlint/resolve-extends" "^17.0.3"
"@commitlint/resolve-extends" "^17.1.0"
"@commitlint/types" "^17.0.0"
"@types/node" ">=12"
"@types/node" "^14.0.0"
chalk "^4.1.0"
cosmiconfig "^7.0.0"
cosmiconfig-typescript-loader "^2.0.0"
cosmiconfig-typescript-loader "^3.0.0"
lodash "^4.17.19"
resolve-from "^5.0.0"
typescript "^4.6.4"
@ -1633,22 +1633,23 @@
conventional-changelog-angular "^5.0.11"
conventional-commits-parser "^3.2.2"
"@commitlint/read@^17.0.0":
version "17.0.0"
resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-17.0.0.tgz#8ab01cf2f27350d8f81f21690962679a7cae5abf"
integrity sha512-zkuOdZayKX3J6F6mPnVMzohK3OBrsEdOByIqp4zQjA9VLw1hMsDEFQ18rKgUc2adkZar+4S01QrFreDCfZgbxA==
"@commitlint/read@^17.1.0":
version "17.1.0"
resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-17.1.0.tgz#cf6bab410180f32f70891c97b15467c0b92ac14f"
integrity sha512-73BoFNBA/3Ozo2JQvGsE0J8SdrJAWGfZQRSHqvKaqgmY042Su4gXQLqvAzgr55S9DI1l9TiU/5WDuh8IE86d/g==
dependencies:
"@commitlint/top-level" "^17.0.0"
"@commitlint/types" "^17.0.0"
fs-extra "^10.0.0"
git-raw-commits "^2.0.0"
minimist "^1.2.6"
"@commitlint/resolve-extends@^17.0.3":
version "17.0.3"
resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-17.0.3.tgz#43b237899e2abd59d16af091521b888c8a071412"
integrity sha512-H/RFMvrcBeJCMdnVC4i8I94108UDccIHrTke2tyQEg9nXQnR5/Hd6MhyNWkREvcrxh9Y+33JLb+PiPiaBxCtBA==
"@commitlint/resolve-extends@^17.1.0":
version "17.1.0"
resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-17.1.0.tgz#7cf04fa13096c8a6544a4af13321fdf8d0d50694"
integrity sha512-jqKm00LJ59T0O8O4bH4oMa4XyJVEOK4GzH8Qye9XKji+Q1FxhZznxMV/bDLyYkzbTodBt9sL0WLql8wMtRTbqQ==
dependencies:
"@commitlint/config-validator" "^17.0.3"
"@commitlint/config-validator" "^17.1.0"
"@commitlint/types" "^17.0.0"
import-fresh "^3.0.0"
lodash "^4.17.19"
@ -1685,18 +1686,6 @@
dependencies:
chalk "^4.1.0"
"@cspotcode/source-map-consumer@0.8.0":
version "0.8.0"
resolved "https://registry.yarnpkg.com/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz#33bf4b7b39c178821606f669bbc447a6a629786b"
integrity sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==
"@cspotcode/source-map-support@0.7.0":
version "0.7.0"
resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz#4789840aa859e46d2f3173727ab707c66bf344f5"
integrity sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==
dependencies:
"@cspotcode/source-map-consumer" "0.8.0"
"@cypress/request@^2.88.10":
version "2.88.10"
resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.10.tgz#b66d76b07f860d3a4b8d7a0604d020c662752cce"
@ -1743,14 +1732,14 @@
esquery "^1.4.0"
jsdoc-type-pratt-parser "~3.1.0"
"@eslint/eslintrc@^1.3.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.0.tgz#29f92c30bb3e771e4a2048c95fa6855392dfac4f"
integrity sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==
"@eslint/eslintrc@^1.3.1":
version "1.3.1"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.1.tgz#de0807bfeffc37b964a7d0400e0c348ce5a2543d"
integrity sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==
dependencies:
ajv "^6.12.4"
debug "^4.3.2"
espree "^9.3.2"
espree "^9.4.0"
globals "^13.15.0"
ignore "^5.2.0"
import-fresh "^3.2.1"
@ -1784,6 +1773,11 @@
resolved "https://registry.yarnpkg.com/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz#316b0a63b91c10e53f242efb4ace5c3b34e8728d"
integrity sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==
"@humanwhocodes/module-importer@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c"
integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==
"@humanwhocodes/object-schema@^1.2.1":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45"
@ -1867,6 +1861,16 @@
"@types/node" "*"
jest-mock "^28.1.3"
"@jest/environment@^29.0.1":
version "29.0.1"
resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.0.1.tgz#d236ce9e906744ac58bfc59ae6f7c9882ace7927"
integrity sha512-iLcFfoq2K6DAB+Mc+2VNLzZVmHdwQFeSqvoM/X8SMON6s/+yEi1iuRX3snx/JfwSnvmiMXjSr0lktxNxOcqXYA==
dependencies:
"@jest/fake-timers" "^29.0.1"
"@jest/types" "^29.0.1"
"@types/node" "*"
jest-mock "^29.0.1"
"@jest/expect-utils@^28.1.3":
version "28.1.3"
resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-28.1.3.tgz#58561ce5db7cd253a7edddbc051fb39dda50f525"
@ -1894,6 +1898,18 @@
jest-mock "^28.1.3"
jest-util "^28.1.3"
"@jest/fake-timers@^29.0.1":
version "29.0.1"
resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.0.1.tgz#51ba7a82431db479d4b828576c139c4c0dc5e409"
integrity sha512-XZ+kAhLChVQ+KJNa5034p7O1Mz3vtWrelxDcMoxhZkgqmWDaEQAW9qJeutaeCfPvwaEwKYVyKDYfWpcyT8RiMw==
dependencies:
"@jest/types" "^29.0.1"
"@sinonjs/fake-timers" "^9.1.2"
"@types/node" "*"
jest-message-util "^29.0.1"
jest-mock "^29.0.1"
jest-util "^29.0.1"
"@jest/globals@^28.1.3":
version "28.1.3"
resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-28.1.3.tgz#a601d78ddc5fdef542728309894895b4a42dc333"
@ -1941,6 +1957,13 @@
dependencies:
"@sinclair/typebox" "^0.24.1"
"@jest/schemas@^29.0.0":
version "29.0.0"
resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.0.0.tgz#5f47f5994dd4ef067fb7b4188ceac45f77fe952a"
integrity sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==
dependencies:
"@sinclair/typebox" "^0.24.1"
"@jest/source-map@^28.1.2":
version "28.1.2"
resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-28.1.2.tgz#7fe832b172b497d6663cdff6c13b0a920e139e24"
@ -1991,6 +2014,27 @@
slash "^3.0.0"
write-file-atomic "^4.0.1"
"@jest/transform@^29.0.1":
version "29.0.1"
resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.0.1.tgz#fdaa5d9e135c9bd7addbe65bedd1f15ad028cc7e"
integrity sha512-6UxXtqrPScFdDhoip8ys60dQAIYppQinyR87n9nlasR/ZnFfJohKToqzM29KK4gb9gHRv5oDFChdqZKE0SIhsg==
dependencies:
"@babel/core" "^7.11.6"
"@jest/types" "^29.0.1"
"@jridgewell/trace-mapping" "^0.3.15"
babel-plugin-istanbul "^6.1.1"
chalk "^4.0.0"
convert-source-map "^1.4.0"
fast-json-stable-stringify "^2.1.0"
graceful-fs "^4.2.9"
jest-haste-map "^29.0.1"
jest-regex-util "^29.0.0"
jest-util "^29.0.1"
micromatch "^4.0.4"
pirates "^4.0.4"
slash "^3.0.0"
write-file-atomic "^4.0.1"
"@jest/types@^28.1.3":
version "28.1.3"
resolved "https://registry.yarnpkg.com/@jest/types/-/types-28.1.3.tgz#b05de80996ff12512bc5ceb1d208285a7d11748b"
@ -2003,6 +2047,18 @@
"@types/yargs" "^17.0.8"
chalk "^4.0.0"
"@jest/types@^29.0.1":
version "29.0.1"
resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.0.1.tgz#1985650acf137bdb81710ff39a4689ec071dd86a"
integrity sha512-ft01rxzVsbh9qZPJ6EFgAIj3PT9FCRfBF9Xljo2/33VDOUjLZr0ZJ2oKANqh9S/K0/GERCsHDAQlBwj7RxA+9g==
dependencies:
"@jest/schemas" "^29.0.0"
"@types/istanbul-lib-coverage" "^2.0.0"
"@types/istanbul-reports" "^3.0.0"
"@types/node" "*"
"@types/yargs" "^17.0.8"
chalk "^4.0.0"
"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2":
version "0.3.2"
resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9"
@ -2035,7 +2091,7 @@
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24"
integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==
"@jridgewell/trace-mapping@^0.3.0", "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.13", "@jridgewell/trace-mapping@^0.3.14", "@jridgewell/trace-mapping@^0.3.9":
"@jridgewell/trace-mapping@^0.3.0", "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.13", "@jridgewell/trace-mapping@^0.3.14", "@jridgewell/trace-mapping@^0.3.15", "@jridgewell/trace-mapping@^0.3.9":
version "0.3.15"
resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz#aba35c48a38d3fd84b37e66c9c0423f9744f9774"
integrity sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==
@ -2127,26 +2183,6 @@
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf"
integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==
"@tsconfig/node10@^1.0.7":
version "1.0.8"
resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.8.tgz#c1e4e80d6f964fbecb3359c43bd48b40f7cadad9"
integrity sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==
"@tsconfig/node12@^1.0.7":
version "1.0.9"
resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.9.tgz#62c1f6dee2ebd9aead80dc3afa56810e58e1a04c"
integrity sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==
"@tsconfig/node14@^1.0.0":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.1.tgz#95f2d167ffb9b8d2068b0b235302fafd4df711f2"
integrity sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==
"@tsconfig/node16@^1.0.2":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e"
integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==
"@types/babel__core@^7.1.14":
version "7.1.17"
resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.17.tgz#f50ac9d20d64153b510578d84f9643f9a3afbe64"
@ -2305,14 +2341,14 @@
dependencies:
"@types/istanbul-lib-report" "*"
"@types/jsdom@^16.2.4":
version "16.2.14"
resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-16.2.14.tgz#26fe9da6a8870715b154bb84cd3b2e53433d8720"
integrity sha512-6BAy1xXEmMuHeAJ4Fv4yXKwBDTGTOseExKE3OaHiNycdHdZw59KfYzrt0DkDluvwmik1HRt6QS7bImxUmpSy+w==
"@types/jsdom@^20.0.0":
version "20.0.0"
resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-20.0.0.tgz#4414fb629465167f8b7b3804b9e067bdd99f1791"
integrity sha512-YfAchFs0yM1QPDrLm2VHe+WHGtqms3NXnXAMolrgrVP6fgBHHXy1ozAbo/dFtPNtZC/m66bPiCTWYmqp1F14gA==
dependencies:
"@types/node" "*"
"@types/parse5" "*"
"@types/tough-cookie" "*"
parse5 "^7.0.0"
"@types/json-buffer@~3.0.0":
version "3.0.0"
@ -2353,11 +2389,16 @@
resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197"
integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==
"@types/node@*", "@types/node@>=12":
"@types/node@*":
version "18.0.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.0.tgz#67c7b724e1bcdd7a8821ce0d5ee184d3b4dd525a"
integrity sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA==
"@types/node@^14.0.0":
version "14.18.26"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.26.tgz#239e19f8b4ea1a9eb710528061c1d733dc561996"
integrity sha512-0b+utRBSYj8L7XAp0d+DX7lI4cSmowNaaTkk6/1SKzbKkG+doLuPusB9EOvzLJ8ahJSk03bTLIL6cWaEd4dBKA==
"@types/node@^14.14.31":
version "14.18.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.0.tgz#98df2397f6936bfbff4f089e40e06fa5dd88d32a"
@ -2378,11 +2419,6 @@
resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0"
integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==
"@types/parse5@*":
version "6.0.3"
resolved "https://registry.yarnpkg.com/@types/parse5/-/parse5-6.0.3.tgz#705bb349e789efa06f43f128cef51240753424cb"
integrity sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==
"@types/prettier@^2.1.5":
version "2.4.2"
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.4.2.tgz#4c62fae93eb479660c3bd93f9d24d561597a8281"
@ -2789,7 +2825,7 @@ acorn-walk@^7.0.0, acorn-walk@^7.1.1:
resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc"
integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==
acorn-walk@^8.1.1, acorn-walk@^8.2.0:
acorn-walk@^8.2.0:
version "8.2.0"
resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1"
integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==
@ -2799,7 +2835,7 @@ acorn@^7.0.0, acorn@^7.1.1:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa"
integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==
acorn@^8.4.1, acorn@^8.5.0, acorn@^8.7.0, acorn@^8.7.1:
acorn@^8.5.0, acorn@^8.7.0, acorn@^8.7.1:
version "8.7.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30"
integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==
@ -2980,11 +3016,6 @@ arch@^2.2.0:
resolved "https://registry.yarnpkg.com/arch/-/arch-2.2.0.tgz#1bc47818f305764f23ab3306b0bfc086c5a29d11"
integrity sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==
arg@^4.1.0:
version "4.1.3"
resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089"
integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==
argparse@^1.0.7:
version "1.0.10"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
@ -3115,7 +3146,7 @@ axios@^0.21.1:
dependencies:
follow-redirects "^1.14.0"
babel-jest@^28.0.3, babel-jest@^28.1.3:
babel-jest@^28.1.3:
version "28.1.3"
resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-28.1.3.tgz#c1187258197c099072156a0a121c11ee1e3917d5"
integrity sha512-epUaPOEWMk3cWX0M/sPvCHHCe9fMFAa/9hXEgKP8nFfNl/jlGkE9ucq9NqkZGXLDduCJYS0UvSlPUwC0S+rH6Q==
@ -3128,6 +3159,19 @@ babel-jest@^28.0.3, babel-jest@^28.1.3:
graceful-fs "^4.2.9"
slash "^3.0.0"
babel-jest@^29.0.1:
version "29.0.1"
resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.0.1.tgz#db50de501fc8727e768f5aa417496cb871ee1ba0"
integrity sha512-wyI9r8tqwsZEMWiIaYjdUJ6ztZIO4DMWpGq7laW34wR71WtRS+D/iBEtXOP5W2aSYCVUQMsypRl/xiJYZznnTg==
dependencies:
"@jest/transform" "^29.0.1"
"@types/babel__core" "^7.1.14"
babel-plugin-istanbul "^6.1.1"
babel-preset-jest "^29.0.0"
chalk "^4.0.0"
graceful-fs "^4.2.9"
slash "^3.0.0"
babel-loader@^8.2.2:
version "8.2.5"
resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.5.tgz#d45f585e654d5a5d90f5350a779d7647c5ed512e"
@ -3166,6 +3210,16 @@ babel-plugin-jest-hoist@^28.1.3:
"@types/babel__core" "^7.1.14"
"@types/babel__traverse" "^7.0.6"
babel-plugin-jest-hoist@^29.0.0:
version "29.0.0"
resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.0.0.tgz#ae4873399a199ede93697a15919d3d0f614a2eb1"
integrity sha512-B9oaXrlxXHFWeWqhDPg03iqQd2UN/mg/VdZOsLaqAVBkztru3ctTryAI4zisxLEEgmcUnLTKewqx0gGifoXD3A==
dependencies:
"@babel/template" "^7.3.3"
"@babel/types" "^7.3.3"
"@types/babel__core" "^7.1.14"
"@types/babel__traverse" "^7.0.6"
babel-plugin-polyfill-corejs2@^0.3.2:
version "0.3.2"
resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.2.tgz#e4c31d4c89b56f3cf85b92558954c66b54bd972d"
@ -3216,6 +3270,14 @@ babel-preset-jest@^28.1.3:
babel-plugin-jest-hoist "^28.1.3"
babel-preset-current-node-syntax "^1.0.0"
babel-preset-jest@^29.0.0:
version "29.0.0"
resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.0.0.tgz#52d7f1afe3a15d14a3c5ab4349cbd388d98d330b"
integrity sha512-B5Ke47Xcs8rDF3p1korT3LoilpADCwbG93ALqtvqu6Xpf4d8alKkrCBTExbNzdHJcIuEPpfYvEaFFRGee2kUgQ==
dependencies:
babel-plugin-jest-hoist "^29.0.0"
babel-preset-current-node-syntax "^1.0.0"
babelify@^10.0.0:
version "10.0.0"
resolved "https://registry.yarnpkg.com/babelify/-/babelify-10.0.0.tgz#fe73b1a22583f06680d8d072e25a1e0d1d1d7fb5"
@ -3506,9 +3568,9 @@ camelcase@^6.2.0:
integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==
caniuse-lite@^1.0.30001359:
version "1.0.30001376"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001376.tgz"
integrity sha512-I27WhtOQ3X3v3it9gNs/oTpoE5KpwmqKR5oKPA8M0G7uMXh9Ty81Q904HpKUrM30ei7zfcL5jE7AXefgbOfMig==
version "1.0.30001381"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001381.tgz"
integrity sha512-fEnkDOKpvp6qc+olg7+NzE1SqyfiyKf4uci7fAU38M3zxs0YOyKOxW/nMZ2l9sJbt7KZHcDIxUnbI0Iime7V4w==
caseless@~0.12.0:
version "0.12.0"
@ -4175,15 +4237,12 @@ core-util-is@~1.0.0:
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85"
integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==
cosmiconfig-typescript-loader@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-2.0.0.tgz#bc4f5bfcaa11a353714ecdef00c4f2226ef191b8"
integrity sha512-2NlGul/E3vTQEANqPziqkA01vfiuUU8vT0jZAuUIjEW8u3eCcnCQWLggapCjhbF76s7KQF0fM0kXSKmzaDaG1g==
dependencies:
cosmiconfig "^7"
ts-node "^10.7.0"
cosmiconfig-typescript-loader@^3.0.0:
version "3.1.2"
resolved "https://registry.yarnpkg.com/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-3.1.2.tgz#e147457854cabe1416152bdca55f53449b1f865d"
integrity sha512-rIwakk27LtK7vjSjGgs3FDbKkq41Byw3VHRGRuAkRQLfGla+O7s+cy1FXRkjLSZ2G9z1og1bcOIsELo1w4G0Kg==
cosmiconfig@^7, cosmiconfig@^7.0.0:
cosmiconfig@^7.0.0:
version "7.0.1"
resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.1.tgz#714d756522cace867867ccb4474c5d01bbae5d6d"
integrity sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==
@ -4205,11 +4264,6 @@ coveralls@^3.0.2:
minimist "^1.2.5"
request "^2.88.2"
create-require@^1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"
integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==
cross-spawn@^6.0.0:
version "6.0.5"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
@ -4601,7 +4655,7 @@ data-uri-to-buffer@3:
resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz#594b8973938c5bc2c33046535785341abc4f3636"
integrity sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==
data-urls@^3.0.1:
data-urls@^3.0.1, data-urls@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-3.0.2.tgz#9cf24a477ae22bcef5cd5f6f0bfbc1d2d3be9143"
integrity sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==
@ -4982,10 +5036,10 @@ domhandler@^5.0.1, domhandler@^5.0.2:
dependencies:
domelementtype "^2.3.0"
dompurify@2.3.10:
version "2.3.10"
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.3.10.tgz#901f7390ffe16a91a5a556b94043314cd4850385"
integrity sha512-o7Fg/AgC7p/XpKjf/+RC3Ok6k4St5F7Q6q6+Nnm3p2zGWioAY6dh0CbbuwOhH2UcSzKsdniE/YnE2/92JcsA+g==
dompurify@2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.4.0.tgz#c9c88390f024c2823332615c9e20a453cf3825dd"
integrity sha512-Be9tbQMZds4a3C6xTmz68NlMfeONA//4dOavl/1rNw50E+/QO0KVpbcU0PcaW0nsQxurXls9ZocqFxk8R2mWEA==
domutils@^3.0.1:
version "3.0.1"
@ -5221,10 +5275,10 @@ eslint-plugin-html@^7.1.0:
dependencies:
htmlparser2 "^8.0.1"
eslint-plugin-jest@^26.0.0:
version "26.8.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.8.2.tgz#42a1248a5ade2bc589eb0f9c4e0608dd89b18cf3"
integrity sha512-67oh0FKaku9y48OpLzL3uK9ckrgLb83Sp5gxxTbtOGDw9lq6D8jw/Psj/9CipkbK406I2M7mvx1q+pv/MdbvxA==
eslint-plugin-jest@^27.0.1:
version "27.0.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.0.1.tgz#3e67ee2051411540988c62075e8788702a1064da"
integrity sha512-LosUsrkwVSs/8Z/I8Hqn5vWgTEsHrfIquDEKOsV8/cl+gbFR4tiRCE1AimEotsHjSC0Rx1tYm6vPhw8C3ktmmg==
dependencies:
"@typescript-eslint/utils" "^5.10.0"
@ -5297,13 +5351,14 @@ eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0:
integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==
eslint@^8.4.1:
version "8.22.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.22.0.tgz#78fcb044196dfa7eef30a9d65944f6f980402c48"
integrity sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA==
version "8.23.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.23.0.tgz#a184918d288820179c6041bb3ddcc99ce6eea040"
integrity sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==
dependencies:
"@eslint/eslintrc" "^1.3.0"
"@eslint/eslintrc" "^1.3.1"
"@humanwhocodes/config-array" "^0.10.4"
"@humanwhocodes/gitignore-to-minimatch" "^1.0.2"
"@humanwhocodes/module-importer" "^1.0.1"
ajv "^6.10.0"
chalk "^4.0.0"
cross-spawn "^7.0.2"
@ -5313,7 +5368,7 @@ eslint@^8.4.1:
eslint-scope "^7.1.1"
eslint-utils "^3.0.0"
eslint-visitor-keys "^3.3.0"
espree "^9.3.3"
espree "^9.4.0"
esquery "^1.4.0"
esutils "^2.0.2"
fast-deep-equal "^3.1.3"
@ -5339,12 +5394,11 @@ eslint@^8.4.1:
strip-ansi "^6.0.1"
strip-json-comments "^3.1.0"
text-table "^0.2.0"
v8-compile-cache "^2.0.3"
espree@^9.3.2, espree@^9.3.3:
version "9.3.3"
resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.3.tgz#2dd37c4162bb05f433ad3c1a52ddf8a49dc08e9d"
integrity sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==
espree@^9.4.0:
version "9.4.0"
resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.0.tgz#cd4bc3d6e9336c433265fc0aa016fc1aaf182f8a"
integrity sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==
dependencies:
acorn "^8.8.0"
acorn-jsx "^5.3.2"
@ -5643,7 +5697,7 @@ fast-glob@^3.2.9:
merge2 "^1.3.0"
micromatch "^4.0.4"
fast-json-stable-stringify@^2.0.0:
fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
@ -6566,7 +6620,7 @@ http2-wrapper@^1.0.0-beta.5.2:
quick-lru "^5.1.1"
resolve-alpn "^1.0.0"
https-proxy-agent@5, https-proxy-agent@^5.0.0:
https-proxy-agent@5, https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6"
integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==
@ -7211,19 +7265,19 @@ jest-each@^28.1.3:
jest-util "^28.1.3"
pretty-format "^28.1.3"
jest-environment-jsdom@^28.0.2:
version "28.1.3"
resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-28.1.3.tgz#2d4e5d61b7f1d94c3bddfbb21f0308ee506c09fb"
integrity sha512-HnlGUmZRdxfCByd3GM2F100DgQOajUBzEitjGqIREcb45kGjZvRrKUdlaF6escXBdcXNl0OBh+1ZrfeZT3GnAg==
jest-environment-jsdom@^29.0.1:
version "29.0.1"
resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-29.0.1.tgz#45bb0ef6506cafcff0809c961e841d2d4c9820cf"
integrity sha512-rMF501kfui+bw4AmwowLA2bNaYb633A3ejFMN5pVU0AeOqLv2NbMAY5XzzlMr/+lM1itEf+3ZdCr9dGGrUfoxg==
dependencies:
"@jest/environment" "^28.1.3"
"@jest/fake-timers" "^28.1.3"
"@jest/types" "^28.1.3"
"@types/jsdom" "^16.2.4"
"@jest/environment" "^29.0.1"
"@jest/fake-timers" "^29.0.1"
"@jest/types" "^29.0.1"
"@types/jsdom" "^20.0.0"
"@types/node" "*"
jest-mock "^28.1.3"
jest-util "^28.1.3"
jsdom "^19.0.0"
jest-mock "^29.0.1"
jest-util "^29.0.1"
jsdom "^20.0.0"
jest-environment-node@^28.1.3:
version "28.1.3"
@ -7261,6 +7315,25 @@ jest-haste-map@^28.1.3:
optionalDependencies:
fsevents "^2.3.2"
jest-haste-map@^29.0.1:
version "29.0.1"
resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.0.1.tgz#472212f93ef44309bf97d191f93ddd2e41169615"
integrity sha512-gcKOAydafpGoSBvcj/mGCfhOKO8fRLkAeee1KXGdcJ1Pb9O2nnOl4I8bQSIID2MaZeMHtLLgNboukh/pUGkBtg==
dependencies:
"@jest/types" "^29.0.1"
"@types/graceful-fs" "^4.1.3"
"@types/node" "*"
anymatch "^3.0.3"
fb-watchman "^2.0.0"
graceful-fs "^4.2.9"
jest-regex-util "^29.0.0"
jest-util "^29.0.1"
jest-worker "^29.0.1"
micromatch "^4.0.4"
walker "^1.0.8"
optionalDependencies:
fsevents "^2.3.2"
jest-image-snapshot@4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/jest-image-snapshot/-/jest-image-snapshot-4.2.0.tgz#559d7ade69e9918517269cef184261c80029a69e"
@ -7309,6 +7382,21 @@ jest-message-util@^28.1.3:
slash "^3.0.0"
stack-utils "^2.0.3"
jest-message-util@^29.0.1:
version "29.0.1"
resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.0.1.tgz#85c4b5b90296c228da158e168eaa5b079f2ab879"
integrity sha512-wRMAQt3HrLpxSubdnzOo68QoTfQ+NLXFzU0Heb18ZUzO2S9GgaXNEdQ4rpd0fI9dq2NXkpCk1IUWSqzYKji64A==
dependencies:
"@babel/code-frame" "^7.12.13"
"@jest/types" "^29.0.1"
"@types/stack-utils" "^2.0.0"
chalk "^4.0.0"
graceful-fs "^4.2.9"
micromatch "^4.0.4"
pretty-format "^29.0.1"
slash "^3.0.0"
stack-utils "^2.0.3"
jest-mock@^28.1.3:
version "28.1.3"
resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-28.1.3.tgz#d4e9b1fc838bea595c77ab73672ebf513ab249da"
@ -7317,6 +7405,14 @@ jest-mock@^28.1.3:
"@jest/types" "^28.1.3"
"@types/node" "*"
jest-mock@^29.0.1:
version "29.0.1"
resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.0.1.tgz#12e1b137035365b022ccdb8fd67d476cd4d4bfad"
integrity sha512-i1yTceg2GKJwUNZFjIzrH7Y74fN1SKJWxQX/Vu3LT4TiJerFARH5l+4URNyapZ+DNpchHYrGOP2deVbn3ma8JA==
dependencies:
"@jest/types" "^29.0.1"
"@types/node" "*"
jest-pnp-resolver@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c"
@ -7327,6 +7423,11 @@ jest-regex-util@^28.0.2:
resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-28.0.2.tgz#afdc377a3b25fb6e80825adcf76c854e5bf47ead"
integrity sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==
jest-regex-util@^29.0.0:
version "29.0.0"
resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.0.0.tgz#b442987f688289df8eb6c16fa8df488b4cd007de"
integrity sha512-BV7VW7Sy0fInHWN93MMPtlClweYv2qrSCwfeFWmpribGZtQPWNvRSq9XOVgOEjU1iBGRKXUZil0o2AH7Iy9Lug==
jest-resolve-dependencies@^28.1.3:
version "28.1.3"
resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.3.tgz#8c65d7583460df7275c6ea2791901fa975c1fe66"
@ -7446,6 +7547,18 @@ jest-util@^28.1.3:
graceful-fs "^4.2.9"
picomatch "^2.2.3"
jest-util@^29.0.1:
version "29.0.1"
resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.0.1.tgz#f854a4a8877c7817316c4afbc2a851ceb2e71598"
integrity sha512-GIWkgNfkeA9d84rORDHPGGTFBrRD13A38QVSKE0bVrGSnoR1KDn8Kqz+0yI5kezMgbT/7zrWaruWP1Kbghlb2A==
dependencies:
"@jest/types" "^29.0.1"
"@types/node" "*"
chalk "^4.0.0"
ci-info "^3.2.0"
graceful-fs "^4.2.9"
picomatch "^2.2.3"
jest-validate@^28.1.3:
version "28.1.3"
resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-28.1.3.tgz#e322267fd5e7c64cea4629612c357bbda96229df"
@ -7490,6 +7603,15 @@ jest-worker@^28.1.3:
merge-stream "^2.0.0"
supports-color "^8.0.0"
jest-worker@^29.0.1:
version "29.0.1"
resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.0.1.tgz#fb42ff7e05e0573f330ec0cf781fc545dcd11a31"
integrity sha512-+B/2/8WW7goit7qVezG9vnI1QP3dlmuzi2W0zxazAQQ8dcDIA63dDn6j4pjOGBARha/ZevcwYQtNIzCySbS7fQ==
dependencies:
"@types/node" "*"
merge-stream "^2.0.0"
supports-color "^8.0.0"
jest@^28.0.3:
version "28.1.3"
resolved "https://registry.yarnpkg.com/jest/-/jest-28.1.3.tgz#e9c6a7eecdebe3548ca2b18894a50f45b36dfc6b"
@ -7573,28 +7695,28 @@ jsdoc-type-pratt-parser@~3.1.0:
resolved "https://registry.yarnpkg.com/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-3.1.0.tgz#a4a56bdc6e82e5865ffd9febc5b1a227ff28e67e"
integrity sha512-MgtD0ZiCDk9B+eI73BextfRrVQl0oyzRG8B2BjORts6jbunj4ScKPcyXGTbB6eXL4y9TzxCm6hyeLq/2ASzNdw==
jsdom@^19.0.0:
version "19.0.0"
resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-19.0.0.tgz#93e67c149fe26816d38a849ea30ac93677e16b6a"
integrity sha512-RYAyjCbxy/vri/CfnjUWJQQtZ3LKlLnDqj+9XLNnJPgEGeirZs3hllKR20re8LUZ6o1b1X4Jat+Qd26zmP41+A==
jsdom@^20.0.0:
version "20.0.0"
resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-20.0.0.tgz#882825ac9cc5e5bbee704ba16143e1fa78361ebf"
integrity sha512-x4a6CKCgx00uCmP+QakBDFXwjAJ69IkkIWHmtmjd3wvXPcdOS44hfX2vqkOQrVrq8l9DhNNADZRXaCEWvgXtVA==
dependencies:
abab "^2.0.5"
acorn "^8.5.0"
abab "^2.0.6"
acorn "^8.7.1"
acorn-globals "^6.0.0"
cssom "^0.5.0"
cssstyle "^2.3.0"
data-urls "^3.0.1"
data-urls "^3.0.2"
decimal.js "^10.3.1"
domexception "^4.0.0"
escodegen "^2.0.0"
form-data "^4.0.0"
html-encoding-sniffer "^3.0.0"
http-proxy-agent "^5.0.0"
https-proxy-agent "^5.0.0"
https-proxy-agent "^5.0.1"
is-potential-custom-element-name "^1.0.1"
nwsapi "^2.2.0"
parse5 "6.0.1"
saxes "^5.0.1"
parse5 "^7.0.0"
saxes "^6.0.0"
symbol-tree "^3.2.4"
tough-cookie "^4.0.0"
w3c-hr-time "^1.0.2"
@ -7602,8 +7724,8 @@ jsdom@^19.0.0:
webidl-conversions "^7.0.0"
whatwg-encoding "^2.0.0"
whatwg-mimetype "^3.0.0"
whatwg-url "^10.0.0"
ws "^8.2.3"
whatwg-url "^11.0.0"
ws "^8.8.0"
xml-name-validator "^4.0.0"
jsesc@^2.5.1:
@ -8053,11 +8175,6 @@ make-dir@^3.0.0, make-dir@^3.0.2, make-dir@^3.1.0:
dependencies:
semver "^6.0.0"
make-error@^1.1.1:
version "1.3.6"
resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2"
integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==
makeerror@1.0.12:
version "1.0.12"
resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a"
@ -9128,6 +9245,13 @@ parse5@6.0.1:
resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b"
integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==
parse5@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.0.0.tgz#51f74a5257f5fcc536389e8c2d0b3802e1bfa91a"
integrity sha512-y/t8IXSPWTuRZqXc0ajH/UwDj4mnqLEbSttNbThcFhGrZuOyoyvNBO85PBp2jQa55wY9d07PBNjsK8ZP3K5U6g==
dependencies:
entities "^4.3.0"
parseurl@~1.3.2, parseurl@~1.3.3:
version "1.3.3"
resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
@ -9369,6 +9493,15 @@ pretty-format@^28.1.3:
ansi-styles "^5.0.0"
react-is "^18.0.0"
pretty-format@^29.0.1:
version "29.0.1"
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.0.1.tgz#2f8077114cdac92a59b464292972a106410c7ad0"
integrity sha512-iTHy3QZMzuL484mSTYbQIM1AHhEQsH8mXWS2/vd2yFBYnG3EBqGiMONo28PlPgrW7P/8s/1ISv+y7WH306l8cw==
dependencies:
"@jest/schemas" "^29.0.0"
ansi-styles "^5.0.0"
react-is "^18.0.0"
process-nextick-args@^2.0.0, process-nextick-args@~2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
@ -10113,6 +10246,13 @@ saxes@^5.0.1:
dependencies:
xmlchars "^2.2.0"
saxes@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/saxes/-/saxes-6.0.0.tgz#fe5b4a4768df4f14a201b1ba6a65c1f3d9988cc5"
integrity sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==
dependencies:
xmlchars "^2.2.0"
schema-utils@^2.6.5:
version "2.7.1"
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.1.tgz#1ca4f32d1b24c590c203b8e7a50bf0ea4cd394d7"
@ -10876,9 +11016,9 @@ terminal-link@^2.0.0:
supports-hyperlinks "^2.0.0"
terser-webpack-plugin@^5.1.3, terser-webpack-plugin@^5.2.4:
version "5.3.4"
resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.4.tgz#f4d31e265883d20fda3ca9c0fc6a53f173ae62e3"
integrity sha512-SmnkUhBxLDcBfTIeaq+ZqJXLVEyXxSaNcCeSezECdKjfkMrTTnPvapBILylYwyEvHFZAn2cJ8dtiXel5XnfOfQ==
version "5.3.5"
resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.5.tgz#f7d82286031f915a4f8fb81af4bd35d2e3c011bc"
integrity sha512-AOEDLDxD2zylUGf/wxHxklEkOe2/r+seuyOWujejFrIxHf11brA1/dWQNIgXa1c6/Wkxgu7zvv0JhOWfc2ELEA==
dependencies:
"@jridgewell/trace-mapping" "^0.3.14"
jest-worker "^27.4.5"
@ -11098,25 +11238,6 @@ trough@^1.0.0:
resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.5.tgz#b8b639cefad7d0bb2abd37d433ff8293efa5f406"
integrity sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==
ts-node@^10.7.0:
version "10.7.0"
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.7.0.tgz#35d503d0fab3e2baa672a0e94f4b40653c2463f5"
integrity sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==
dependencies:
"@cspotcode/source-map-support" "0.7.0"
"@tsconfig/node10" "^1.0.7"
"@tsconfig/node12" "^1.0.7"
"@tsconfig/node14" "^1.0.0"
"@tsconfig/node16" "^1.0.2"
acorn "^8.4.1"
acorn-walk "^8.1.1"
arg "^4.1.0"
create-require "^1.1.0"
diff "^4.0.1"
make-error "^1.1.1"
v8-compile-cache-lib "^3.0.0"
yn "3.1.1"
tslib@^1.8.1:
version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
@ -11444,16 +11565,6 @@ uvu@^0.5.0:
kleur "^4.0.3"
sade "^1.7.3"
v8-compile-cache-lib@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf"
integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==
v8-compile-cache@^2.0.3:
version "2.3.0"
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee"
integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==
v8-to-istanbul@^9.0.1:
version "9.0.1"
resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz#b6f994b0b5d4ef255e17a0d17dc444a9f5132fa4"
@ -11966,6 +12077,11 @@ ws@^8.2.3, ws@^8.4.2:
resolved "https://registry.yarnpkg.com/ws/-/ws-8.6.0.tgz#e5e9f1d9e7ff88083d0c0dd8281ea662a42c9c23"
integrity sha512-AzmM3aH3gk0aX7/rZLYvjdvZooofDu3fFOzGqcSnQ1tOcTWwhM/o+q++E8mAyVVIyUdajrkzWUGftaVSDLn1bw==
ws@^8.8.0:
version "8.8.1"
resolved "https://registry.yarnpkg.com/ws/-/ws-8.8.1.tgz#5dbad0feb7ade8ecc99b830c1d77c913d4955ff0"
integrity sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==
x-is-string@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/x-is-string/-/x-is-string-0.1.0.tgz#474b50865af3a49a9c4657f05acd145458f77d82"
@ -12095,11 +12211,6 @@ yauzl@^2.10.0:
buffer-crc32 "~0.2.3"
fd-slicer "~1.1.0"
yn@3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==
yocto-queue@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"