mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-03 15:46:43 +02:00
fix: add .js to external imports.
This commit is contained in:
@@ -85,6 +85,7 @@
|
|||||||
"sveidqvist",
|
"sveidqvist",
|
||||||
"techn",
|
"techn",
|
||||||
"teststr",
|
"teststr",
|
||||||
|
"textlength",
|
||||||
"treemap",
|
"treemap",
|
||||||
"ts-nocheck",
|
"ts-nocheck",
|
||||||
"tuleap",
|
"tuleap",
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
import { D3Element } from './mermaidAPI';
|
import { D3Element } from './mermaidAPI';
|
||||||
|
|
||||||
import isEmpty from 'lodash-es/isEmpty';
|
import isEmpty from 'lodash-es/isEmpty.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add aria-roledescription to the svg element to the diagramType
|
* Add aria-roledescription to the svg element to the diagramType
|
||||||
|
@@ -29,7 +29,7 @@ import utils, { directiveSanitizer } from './utils';
|
|||||||
import DOMPurify from 'dompurify';
|
import DOMPurify from 'dompurify';
|
||||||
import { MermaidConfig } from './config.type';
|
import { MermaidConfig } from './config.type';
|
||||||
import { evaluate } from './diagrams/common/common';
|
import { evaluate } from './diagrams/common/common';
|
||||||
import isEmpty from 'lodash-es/isEmpty';
|
import isEmpty from 'lodash-es/isEmpty.js';
|
||||||
import { setA11yDiagramInfo, addSVGa11yTitleDescription } from './accessibility';
|
import { setA11yDiagramInfo, addSVGa11yTitleDescription } from './accessibility';
|
||||||
|
|
||||||
// diagram names that support classDef statements
|
// diagram names that support classDef statements
|
||||||
@@ -55,8 +55,8 @@ const IFRAME_SANDBOX_OPTS = 'allow-top-navigation-by-user-activation allow-popup
|
|||||||
const IFRAME_NOT_SUPPORTED_MSG = 'The "iframe" tag is not supported by your browser.';
|
const IFRAME_NOT_SUPPORTED_MSG = 'The "iframe" tag is not supported by your browser.';
|
||||||
|
|
||||||
// DOMPurify settings for svgCode
|
// DOMPurify settings for svgCode
|
||||||
const DOMPURE_TAGS = ['foreignobject'];
|
const DOMPURIFY_TAGS = ['foreignobject'];
|
||||||
const DOMPURE_ATTR = ['dominant-baseline'];
|
const DOMPURIFY_ATTR = ['dominant-baseline'];
|
||||||
|
|
||||||
// This is what is returned from getClasses(...) methods.
|
// This is what is returned from getClasses(...) methods.
|
||||||
// It is slightly renamed to ..StyleClassDef instead of just ClassDef because "class" is a greatly ambiguous and overloaded word.
|
// It is slightly renamed to ..StyleClassDef instead of just ClassDef because "class" is a greatly ambiguous and overloaded word.
|
||||||
@@ -539,8 +539,8 @@ const render = function (
|
|||||||
} else if (!isLooseSecurityLevel) {
|
} else if (!isLooseSecurityLevel) {
|
||||||
// Sanitize the svgCode using DOMPurify
|
// Sanitize the svgCode using DOMPurify
|
||||||
svgCode = DOMPurify.sanitize(svgCode, {
|
svgCode = DOMPurify.sanitize(svgCode, {
|
||||||
ADD_TAGS: DOMPURE_TAGS,
|
ADD_TAGS: DOMPURIFY_TAGS,
|
||||||
ADD_ATTR: DOMPURE_ATTR,
|
ADD_ATTR: DOMPURIFY_ATTR,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -741,8 +741,8 @@ const renderAsync = async function (
|
|||||||
} else if (!isLooseSecurityLevel) {
|
} else if (!isLooseSecurityLevel) {
|
||||||
// Sanitize the svgCode using DOMPurify
|
// Sanitize the svgCode using DOMPurify
|
||||||
svgCode = DOMPurify.sanitize(svgCode, {
|
svgCode = DOMPurify.sanitize(svgCode, {
|
||||||
ADD_TAGS: DOMPURE_TAGS,
|
ADD_TAGS: DOMPURIFY_TAGS,
|
||||||
ADD_ATTR: DOMPURE_ATTR,
|
ADD_ATTR: DOMPURIFY_ATTR,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@ import { log } from './logger';
|
|||||||
import { detectType } from './diagram-api/detectType';
|
import { detectType } from './diagram-api/detectType';
|
||||||
import assignWithDepth from './assignWithDepth';
|
import assignWithDepth from './assignWithDepth';
|
||||||
import { MermaidConfig } from './config.type';
|
import { MermaidConfig } from './config.type';
|
||||||
import memoize from 'lodash-es/memoize';
|
import memoize from 'lodash-es/memoize.js';
|
||||||
|
|
||||||
// Effectively an enum of the supported curve types, accessible by name
|
// Effectively an enum of the supported curve types, accessible by name
|
||||||
const d3CurveTypes = {
|
const d3CurveTypes = {
|
||||||
|
Reference in New Issue
Block a user