mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-02-04 07:13:25 +08:00
fix: typo for source
This commit is contained in:
parent
5619b54cdb
commit
4d4b77f39f
@ -65,7 +65,7 @@ Enterprise_Boundary(b0, "BankBoundary0") {
|
|||||||
Person(customer, Customer, "A customer of the bank, with personal bank accounts")
|
Person(customer, Customer, "A customer of the bank, with personal bank accounts")
|
||||||
|
|
||||||
Container_Boundary(c1, "Internet Banking") {
|
Container_Boundary(c1, "Internet Banking") {
|
||||||
Container(spa, "Single-Page App", "JavaScript, Angular", "Provides all the Internet banking functionality to cutomers via their web browser")
|
Container(spa, "Single-Page App", "JavaScript, Angular", "Provides all the Internet banking functionality to customers via their web browser")
|
||||||
Container_Ext(mobile_app, "Mobile App", "C#, Xamarin", "Provides a limited subset of the Internet banking functionality to customers via their mobile device")
|
Container_Ext(mobile_app, "Mobile App", "C#, Xamarin", "Provides a limited subset of the Internet banking functionality to customers via their mobile device")
|
||||||
Container(web_app, "Web Application", "Java, Spring MVC", "Delivers the static content and the Internet banking SPA")
|
Container(web_app, "Web Application", "Java, Spring MVC", "Delivers the static content and the Internet banking SPA")
|
||||||
ContainerDb(database, "Database", "SQL Database", "Stores user registration information, hashed auth credentials, access logs, etc.")
|
ContainerDb(database, "Database", "SQL Database", "Stores user registration information, hashed auth credentials, access logs, etc.")
|
||||||
@ -99,7 +99,7 @@ Enterprise_Boundary(b0, "BankBoundary0") {
|
|||||||
System_Ext(mbs, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.")
|
System_Ext(mbs, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.")
|
||||||
|
|
||||||
Container_Boundary(api, "API Application") {
|
Container_Boundary(api, "API Application") {
|
||||||
Component(sign, "Sign In Controller", "MVC Rest Controlle", "Allows users to sign in to the internet banking system")
|
Component(sign, "Sign In Controller", "MVC Rest Controller", "Allows users to sign in to the internet banking system")
|
||||||
Component(accounts, "Accounts Summary Controller", "MVC Rest Controller", "Provides customers with a summary of their bank accounts")
|
Component(accounts, "Accounts Summary Controller", "MVC Rest Controller", "Provides customers with a summary of their bank accounts")
|
||||||
Component(security, "Security Component", "Spring Bean", "Provides functionality related to singing in, changing passwords, etc.")
|
Component(security, "Security Component", "Spring Bean", "Provides functionality related to singing in, changing passwords, etc.")
|
||||||
Component(mbsfacade, "Mainframe Banking System Facade", "Spring Bean", "A facade onto the mainframe banking system.")
|
Component(mbsfacade, "Mainframe Banking System Facade", "Spring Bean", "A facade onto the mainframe banking system.")
|
||||||
|
@ -21,7 +21,7 @@ export const updateCurrentConfig = (siteCfg, _directives) => {
|
|||||||
const d = _directives[i];
|
const d = _directives[i];
|
||||||
sanitize(d);
|
sanitize(d);
|
||||||
|
|
||||||
// Apply the data from the directive where the the overrides the themeVaraibles
|
// Apply the data from the directive where the the overrides the themeVariables
|
||||||
sumOfDirectives = assignWithDepth(sumOfDirectives, d);
|
sumOfDirectives = assignWithDepth(sumOfDirectives, d);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ export const setSiteConfig = (conf) => {
|
|||||||
return siteConfig;
|
return siteConfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const saveConfigFromInitilize = (conf) => {
|
export const saveConfigFromInitialize = (conf) => {
|
||||||
configFromInitialize = assignWithDepth({}, conf);
|
configFromInitialize = assignWithDepth({}, conf);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ describe('Graphlib decorations', () => {
|
|||||||
expect(int.x).toBeCloseTo(192.4609375);
|
expect(int.x).toBeCloseTo(192.4609375);
|
||||||
expect(int.y).toBeCloseTo(145.15711441743503);
|
expect(int.y).toBeCloseTo(145.15711441743503);
|
||||||
});
|
});
|
||||||
it('case 3 - intersection on otop of box outside point greater then inside point', function () {
|
it('case 3 - intersection on top of box outside point greater then inside point', function () {
|
||||||
const o = { x: 157, y: 39 };
|
const o = { x: 157, y: 39 };
|
||||||
const i = { x: 104, y: 105 };
|
const i = { x: 104, y: 105 };
|
||||||
const node2 = {
|
const node2 = {
|
||||||
|
@ -58,7 +58,7 @@ describe('[Comments] when parsing', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should handle comments at the end no trailing newline', function () {
|
it('should handle comments at the end no trailing newline', function () {
|
||||||
const res = flow.parser.parse('graph TD;\n A-->B\n%% Commento');
|
const res = flow.parser.parse('graph TD;\n A-->B\n%% Comment');
|
||||||
|
|
||||||
const vert = flow.parser.yy.getVertices();
|
const vert = flow.parser.yy.getVertices();
|
||||||
const edges = flow.parser.yy.getEdges();
|
const edges = flow.parser.yy.getEdges();
|
||||||
@ -73,7 +73,7 @@ describe('[Comments] when parsing', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should handle comments at the end many trailing newlines', function () {
|
it('should handle comments at the end many trailing newlines', function () {
|
||||||
const res = flow.parser.parse('graph TD;\n A-->B\n%% Commento\n\n\n');
|
const res = flow.parser.parse('graph TD;\n A-->B\n%% Comment\n\n\n');
|
||||||
|
|
||||||
const vert = flow.parser.yy.getVertices();
|
const vert = flow.parser.yy.getVertices();
|
||||||
const edges = flow.parser.yy.getEdges();
|
const edges = flow.parser.yy.getEdges();
|
||||||
|
@ -12,7 +12,7 @@ describe('parsing a flow chart', function () {
|
|||||||
flow.parser.yy.clear();
|
flow.parser.yy.clear();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should handle a trailing whitespaces after statememnts', function () {
|
it('should handle a trailing whitespaces after statements', function () {
|
||||||
const res = flow.parser.parse('graph TD;\n\n\n %% Comment\n A-->B; \n B-->C;');
|
const res = flow.parser.parse('graph TD;\n\n\n %% Comment\n A-->B; \n B-->C;');
|
||||||
|
|
||||||
const vert = flow.parser.yy.getVertices();
|
const vert = flow.parser.yy.getVertices();
|
||||||
|
@ -107,8 +107,8 @@ describe('state diagram, ', function () {
|
|||||||
});
|
});
|
||||||
it('handle "as" in state names 2', function () {
|
it('handle "as" in state names 2', function () {
|
||||||
const str = `stateDiagram-v2
|
const str = `stateDiagram-v2
|
||||||
assembleas
|
assemblies
|
||||||
state assembleas
|
state assemblies
|
||||||
`;
|
`;
|
||||||
|
|
||||||
parser.parse(str);
|
parser.parse(str);
|
||||||
@ -207,14 +207,14 @@ describe('state diagram, ', function () {
|
|||||||
|
|
||||||
parser.parse(str);
|
parser.parse(str);
|
||||||
});
|
});
|
||||||
it('should handle state deifintions with separation of id', function () {
|
it('should handle state definitions with separation of id', function () {
|
||||||
const str = `stateDiagram-v2\n
|
const str = `stateDiagram-v2\n
|
||||||
state "Long state description" as state1
|
state "Long state description" as state1
|
||||||
`;
|
`;
|
||||||
|
|
||||||
parser.parse(str);
|
parser.parse(str);
|
||||||
});
|
});
|
||||||
it('should handle state deifintions with separation of id', function () {
|
it('should handle state definitions with separation of id', function () {
|
||||||
const str = `stateDiagram-v2
|
const str = `stateDiagram-v2
|
||||||
state "Not Shooting State" as NotShooting {
|
state "Not Shooting State" as NotShooting {
|
||||||
state "Idle mode" as Idle
|
state "Idle mode" as Idle
|
||||||
|
@ -122,8 +122,8 @@ describe('state diagram, ', function () {
|
|||||||
});
|
});
|
||||||
it('handle "as" in state names 2', function () {
|
it('handle "as" in state names 2', function () {
|
||||||
const str = `stateDiagram
|
const str = `stateDiagram
|
||||||
assembleas
|
assemblies
|
||||||
state assembleas
|
state assemblies
|
||||||
`;
|
`;
|
||||||
|
|
||||||
parser.parse(str);
|
parser.parse(str);
|
||||||
@ -222,14 +222,14 @@ describe('state diagram, ', function () {
|
|||||||
|
|
||||||
parser.parse(str);
|
parser.parse(str);
|
||||||
});
|
});
|
||||||
it('should handle state deifintions with separation of id', function () {
|
it('should handle state defintions with separation of id', function () {
|
||||||
const str = `stateDiagram\n
|
const str = `stateDiagram\n
|
||||||
state "Long state description" as state1
|
state "Long state description" as state1
|
||||||
`;
|
`;
|
||||||
|
|
||||||
parser.parse(str);
|
parser.parse(str);
|
||||||
});
|
});
|
||||||
it('should handle state deifintions with separation of id', function () {
|
it('should handle state defintions with separation of id', function () {
|
||||||
const str = `stateDiagram
|
const str = `stateDiagram
|
||||||
state "Not Shooting State" as NotShooting {
|
state "Not Shooting State" as NotShooting {
|
||||||
state "Idle mode" as Idle
|
state "Idle mode" as Idle
|
||||||
|
@ -90,7 +90,7 @@ const initThrowsErrors = function () {
|
|||||||
mermaidAPI.updateSiteConfig({ gantt: mermaid.ganttConfig });
|
mermaidAPI.updateSiteConfig({ gantt: mermaid.ganttConfig });
|
||||||
}
|
}
|
||||||
|
|
||||||
const idGeneratior = new utils.initIdGeneratior(conf.deterministicIds, conf.deterministicIDSeed);
|
const idGenerator = new utils.initIdGenerator(conf.deterministicIds, conf.deterministicIDSeed);
|
||||||
|
|
||||||
let txt;
|
let txt;
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ const initThrowsErrors = function () {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const id = `mermaid-${idGeneratior.next()}`;
|
const id = `mermaid-${idGenerator.next()}`;
|
||||||
|
|
||||||
// Fetch the graph definition including tags
|
// Fetch the graph definition including tags
|
||||||
txt = element.innerHTML;
|
txt = element.innerHTML;
|
||||||
@ -189,7 +189,7 @@ if (typeof document !== 'undefined') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ## setParseErrorHandler Alternativet to directly setting parseError using:
|
* ## setParseErrorHandler Alternative to directly setting parseError using:
|
||||||
*
|
*
|
||||||
* ```js
|
* ```js
|
||||||
* mermaid.parseError = function(err,hash){=
|
* mermaid.parseError = function(err,hash){=
|
||||||
|
@ -272,7 +272,7 @@ const render = function (id, _txt, cb, container) {
|
|||||||
// let d3Iframe;
|
// let d3Iframe;
|
||||||
let root = select('body');
|
let root = select('body');
|
||||||
|
|
||||||
// In regular execurtion the container will be the div with a mermaid class
|
// In regular execution the container will be the div with a mermaid class
|
||||||
if (typeof container !== 'undefined') {
|
if (typeof container !== 'undefined') {
|
||||||
if (cnf.securityLevel === 'sandbox') {
|
if (cnf.securityLevel === 'sandbox') {
|
||||||
// IF we are in sandboxed mode, we do everyting mermaid related
|
// IF we are in sandboxed mode, we do everyting mermaid related
|
||||||
@ -317,7 +317,7 @@ const render = function (id, _txt, cb, container) {
|
|||||||
} else {
|
} else {
|
||||||
// No container was provided
|
// No container was provided
|
||||||
// If there is an existsing element with the id, we remove it
|
// If there is an existsing element with the id, we remove it
|
||||||
// this likley a previously rendered diagram
|
// this likely a previously rendered diagram
|
||||||
const existingSvg = document.getElementById(id);
|
const existingSvg = document.getElementById(id);
|
||||||
if (existingSvg) {
|
if (existingSvg) {
|
||||||
existingSvg.remove();
|
existingSvg.remove();
|
||||||
@ -741,7 +741,7 @@ function initialize(options) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Set default options
|
// Set default options
|
||||||
configApi.saveConfigFromInitilize(options);
|
configApi.saveConfigFromInitialize(options);
|
||||||
|
|
||||||
if (options && options.theme && theme[options.theme]) {
|
if (options && options.theme && theme[options.theme]) {
|
||||||
// Todo merge with user options
|
// Todo merge with user options
|
||||||
|
@ -945,7 +945,7 @@ export const setupGraphViewbox = function (graph, svgElem, padding, useMaxWidth)
|
|||||||
// Ensure the viewBox includes the whole svgBounds area with extra space for padding
|
// Ensure the viewBox includes the whole svgBounds area with extra space for padding
|
||||||
const vBox = `0 0 ${width} ${height}`;
|
const vBox = `0 0 ${width} ${height}`;
|
||||||
log.debug(
|
log.debug(
|
||||||
'Grpah.label',
|
'Graph.label',
|
||||||
graph._label,
|
graph._label,
|
||||||
'swidth',
|
'swidth',
|
||||||
sWidth,
|
sWidth,
|
||||||
@ -966,7 +966,7 @@ export const setupGraphViewbox = function (graph, svgElem, padding, useMaxWidth)
|
|||||||
svgElem.select('g').attr('transform', `translate(${tx}, ${ty})`);
|
svgElem.select('g').attr('transform', `translate(${tx}, ${ty})`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const initIdGeneratior = class iterator {
|
export const initIdGenerator = class iterator {
|
||||||
constructor(deterministic, seed) {
|
constructor(deterministic, seed) {
|
||||||
this.deterministic = deterministic;
|
this.deterministic = deterministic;
|
||||||
this.seed = seed;
|
this.seed = seed;
|
||||||
@ -1080,7 +1080,7 @@ export default {
|
|||||||
memoize,
|
memoize,
|
||||||
runFunc,
|
runFunc,
|
||||||
entityDecode,
|
entityDecode,
|
||||||
initIdGeneratior,
|
initIdGenerator: initIdGenerator,
|
||||||
directiveSanitizer,
|
directiveSanitizer,
|
||||||
sanitizeCss,
|
sanitizeCss,
|
||||||
};
|
};
|
||||||
|
@ -302,7 +302,7 @@ describe('when calculating SVG size', function () {
|
|||||||
|
|
||||||
describe('when initializing the id generator', function () {
|
describe('when initializing the id generator', function () {
|
||||||
it('should return a random number generator based on Date', function (done) {
|
it('should return a random number generator based on Date', function (done) {
|
||||||
const idGenerator = new utils.initIdGeneratior(false);
|
const idGenerator = new utils.initIdGenerator(false);
|
||||||
expect(typeof idGenerator.next).toEqual('function');
|
expect(typeof idGenerator.next).toEqual('function');
|
||||||
const lastId = idGenerator.next();
|
const lastId = idGenerator.next();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@ -312,7 +312,7 @@ describe('when initializing the id generator', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should return a non random number generator', function () {
|
it('should return a non random number generator', function () {
|
||||||
const idGenerator = new utils.initIdGeneratior(true);
|
const idGenerator = new utils.initIdGenerator(true);
|
||||||
expect(typeof idGenerator.next).toEqual('function');
|
expect(typeof idGenerator.next).toEqual('function');
|
||||||
const start = 0;
|
const start = 0;
|
||||||
const lastId = idGenerator.next();
|
const lastId = idGenerator.next();
|
||||||
@ -321,7 +321,7 @@ describe('when initializing the id generator', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should return a non random number generator based on seed', function () {
|
it('should return a non random number generator based on seed', function () {
|
||||||
const idGenerator = new utils.initIdGeneratior(true, 'thisIsASeed');
|
const idGenerator = new utils.initIdGenerator(true, 'thisIsASeed');
|
||||||
expect(typeof idGenerator.next).toEqual('function');
|
expect(typeof idGenerator.next).toEqual('function');
|
||||||
const start = 11;
|
const start = 11;
|
||||||
const lastId = idGenerator.next();
|
const lastId = idGenerator.next();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user