-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix/3706_support-indented-yaml-only-in-html
- Loading branch information
Showing
115 changed files
with
3,187 additions
and
2,368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* Mocked C4Context diagram renderer | ||
*/ | ||
|
||
import { vi } from 'vitest'; | ||
|
||
export const drawPersonOrSystemArray = vi.fn(); | ||
export const drawBoundary = vi.fn(); | ||
|
||
export const setConf = vi.fn(); | ||
|
||
export const draw = vi.fn().mockImplementation(() => { | ||
return ''; | ||
}); | ||
|
||
export default { | ||
drawPersonOrSystemArray, | ||
drawBoundary, | ||
setConf, | ||
draw, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
* Mocked class diagram v2 renderer | ||
*/ | ||
|
||
import { vi } from 'vitest'; | ||
|
||
export const setConf = vi.fn(); | ||
|
||
export const draw = vi.fn().mockImplementation(() => { | ||
return ''; | ||
}); | ||
|
||
export default { | ||
setConf, | ||
draw, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* Mocked class diagram renderer | ||
*/ | ||
|
||
import { vi } from 'vitest'; | ||
|
||
export const draw = vi.fn().mockImplementation(() => { | ||
return ''; | ||
}); | ||
|
||
export default { | ||
draw, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,14 @@ | ||
// @ts-nocheck TODO: Fix TS | ||
import { vi } from 'vitest'; | ||
|
||
const NewD3 = function () { | ||
/** | ||
* | ||
*/ | ||
function returnThis() { | ||
return this; | ||
} | ||
return { | ||
append: function () { | ||
return NewD3(); | ||
}, | ||
lower: returnThis, | ||
attr: returnThis, | ||
style: returnThis, | ||
text: returnThis, | ||
0: { | ||
0: { | ||
getBBox: function () { | ||
return { | ||
height: 10, | ||
width: 20, | ||
}; | ||
}, | ||
}, | ||
}, | ||
}; | ||
}; | ||
import { MockedD3 } from '../packages/mermaid/src/tests/MockedD3'; | ||
|
||
export const select = function () { | ||
return new NewD3(); | ||
return new MockedD3(); | ||
}; | ||
|
||
export const selectAll = function () { | ||
return new NewD3(); | ||
return new MockedD3(); | ||
}; | ||
|
||
export const curveBasis = 'basis'; | ||
export const curveLinear = 'linear'; | ||
export const curveCardinal = 'cardinal'; | ||
|
||
export const MockD3 = (name, parent) => { | ||
const children = []; | ||
const elem = { | ||
get __children() { | ||
return children; | ||
}, | ||
get __name() { | ||
return name; | ||
}, | ||
get __parent() { | ||
return parent; | ||
}, | ||
node() { | ||
return { | ||
getBBox() { | ||
return { | ||
x: 5, | ||
y: 10, | ||
height: 15, | ||
width: 20, | ||
}; | ||
}, | ||
}; | ||
}, | ||
}; | ||
elem.append = (name) => { | ||
const mockElem = MockD3(name, elem); | ||
children.push(mockElem); | ||
return mockElem; | ||
}; | ||
elem.lower = vi.fn(() => elem); | ||
elem.attr = vi.fn(() => elem); | ||
elem.text = vi.fn(() => elem); | ||
elem.style = vi.fn(() => elem); | ||
return elem; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
* Mocked er diagram renderer | ||
*/ | ||
|
||
import { vi } from 'vitest'; | ||
|
||
export const setConf = vi.fn(); | ||
|
||
export const draw = vi.fn().mockImplementation(() => { | ||
return ''; | ||
}); | ||
|
||
export default { | ||
setConf, | ||
draw, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* Mocked flow (flowchart) diagram v2 renderer | ||
*/ | ||
|
||
import { vi } from 'vitest'; | ||
|
||
export const setConf = vi.fn(); | ||
export const addVertices = vi.fn(); | ||
export const addEdges = vi.fn(); | ||
export const getClasses = vi.fn().mockImplementation(() => { | ||
return {}; | ||
}); | ||
|
||
export const draw = vi.fn().mockImplementation(() => { | ||
return ''; | ||
}); | ||
|
||
export default { | ||
setConf, | ||
addVertices, | ||
addEdges, | ||
getClasses, | ||
draw, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
* Mocked gantt diagram renderer | ||
*/ | ||
|
||
import { vi } from 'vitest'; | ||
|
||
export const setConf = vi.fn(); | ||
|
||
export const draw = vi.fn().mockImplementation(() => { | ||
return ''; | ||
}); | ||
|
||
export default { | ||
setConf, | ||
draw, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* Mocked git (graph) diagram renderer | ||
*/ | ||
|
||
import { vi } from 'vitest'; | ||
|
||
export const draw = vi.fn().mockImplementation(() => { | ||
return ''; | ||
}); | ||
|
||
export default { | ||
draw, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* Mocked pie (picChart) diagram renderer | ||
*/ | ||
|
||
import { vi } from 'vitest'; | ||
export const setConf = vi.fn(); | ||
|
||
export const draw = vi.fn().mockImplementation(() => { | ||
return ''; | ||
}); | ||
|
||
export default { | ||
setConf, | ||
draw, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* Mocked pie (picChart) diagram renderer | ||
*/ | ||
|
||
import { vi } from 'vitest'; | ||
|
||
export const draw = vi.fn().mockImplementation(() => { | ||
return ''; | ||
}); | ||
|
||
export default { | ||
draw, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* Mocked requirement diagram renderer | ||
*/ | ||
|
||
import { vi } from 'vitest'; | ||
|
||
export const draw = vi.fn().mockImplementation(() => { | ||
return ''; | ||
}); | ||
|
||
export default { | ||
draw, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Mocked sequence diagram renderer | ||
*/ | ||
|
||
import { vi } from 'vitest'; | ||
|
||
export const bounds = vi.fn(); | ||
export const drawActors = vi.fn(); | ||
export const drawActorsPopup = vi.fn(); | ||
|
||
export const setConf = vi.fn(); | ||
|
||
export const draw = vi.fn().mockImplementation(() => { | ||
return ''; | ||
}); | ||
|
||
export default { | ||
bounds, | ||
drawActors, | ||
drawActorsPopup, | ||
setConf, | ||
draw, | ||
}; |
Oops, something went wrong.