codecharta-visualization 1.143.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/conf/jestUnit.config.json +7 -1
- package/conf/setupJestUnit.ts +31 -2
- package/dist/bundler/browser/chunk-F5WTPUXL.js +4207 -0
- package/dist/bundler/browser/chunk-LBJ456D5.js +17 -0
- package/dist/bundler/browser/codeCharta/assets/sample1.cc.json +167 -95
- package/dist/bundler/browser/codeCharta/assets/sample2.cc.json +80 -44
- package/dist/bundler/browser/codeCharta/assets/sample3.cc.json +69 -38
- package/dist/bundler/browser/codeCharta/assets/sample4.cc.json +74 -38
- package/dist/bundler/browser/index.html +2 -2
- package/dist/bundler/browser/main-FOTAA6ZL.js +3491 -0
- package/dist/bundler/browser/package.json +14 -15
- package/dist/bundler/browser/styles-E4W757FS.css +1 -0
- package/package.json +14 -15
- package/tsconfig.json +1 -0
- package/dist/bundler/browser/main-ZVHZ5VBI.js +0 -7640
- package/dist/bundler/browser/polyfills-DOYHMSTV.js +0 -2
- package/dist/bundler/browser/styles-C2TMEKNK.css +0 -1
|
@@ -13,7 +13,13 @@
|
|
|
13
13
|
],
|
|
14
14
|
"moduleNameMapper": {
|
|
15
15
|
"\\CHANGELOG.(md)$": "<rootDir>/mocks/changelogMock.js",
|
|
16
|
-
"^d3$": "<rootDir>/node_modules/d3/dist/d3.min.js"
|
|
16
|
+
"^d3$": "<rootDir>/node_modules/d3/dist/d3.min.js",
|
|
17
|
+
"^app/(.*)$": "<rootDir>/app/$1",
|
|
18
|
+
"^echarts$": "<rootDir>/mocks/echartsMock.js",
|
|
19
|
+
"^echarts/core$": "<rootDir>/mocks/echartsMock.js",
|
|
20
|
+
"^echarts/renderers$": "<rootDir>/mocks/echartsRenderersMock.js",
|
|
21
|
+
"^echarts/components$": "<rootDir>/mocks/echartsComponentsMock.js",
|
|
22
|
+
"^echarts-wordcloud$": "<rootDir>/mocks/echartsWordcloudMock.js"
|
|
17
23
|
},
|
|
18
24
|
"roots": ["<rootDir>/app"],
|
|
19
25
|
"moduleFileExtensions": ["js", "json", "ts", "mjs"],
|
package/conf/setupJestUnit.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { setupZonelessTestEnv } from "jest-preset-angular/setup-env/zoneless"
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
setupZonelessTestEnv()
|
|
4
4
|
|
|
5
5
|
const numberToLocaleString = Number.prototype.toLocaleString
|
|
6
6
|
Number.prototype.toLocaleString = function (locale = "en-US") {
|
|
@@ -27,3 +27,32 @@ if (typeof globalThis.fetch === "undefined") {
|
|
|
27
27
|
})
|
|
28
28
|
) as any
|
|
29
29
|
}
|
|
30
|
+
|
|
31
|
+
// JSDOM (nwsapi) does not implement the native Popover API or the :popover-open selector.
|
|
32
|
+
// Without zone.js swallowing the thrown error, components calling popover.matches(":popover-open")
|
|
33
|
+
// would fail tests. Make the selector match nothing and stub the popover methods.
|
|
34
|
+
const originalElementMatches = Element.prototype.matches
|
|
35
|
+
Element.prototype.matches = function (selectors: string): boolean {
|
|
36
|
+
if (selectors === ":popover-open") {
|
|
37
|
+
return false
|
|
38
|
+
}
|
|
39
|
+
return originalElementMatches.call(this, selectors)
|
|
40
|
+
}
|
|
41
|
+
if (typeof HTMLElement.prototype.showPopover === "undefined") {
|
|
42
|
+
HTMLElement.prototype.showPopover = function () {}
|
|
43
|
+
}
|
|
44
|
+
if (typeof HTMLElement.prototype.hidePopover === "undefined") {
|
|
45
|
+
HTMLElement.prototype.hidePopover = function () {}
|
|
46
|
+
}
|
|
47
|
+
if (typeof HTMLElement.prototype.togglePopover === "undefined") {
|
|
48
|
+
HTMLElement.prototype.togglePopover = function () {
|
|
49
|
+
return false
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// JSDOM applies the UA rule `dialog:not([open]) { display: none }` but loads none of the app's
|
|
54
|
+
// stylesheets, so a popover built on <dialog> would hide its content from accessible queries.
|
|
55
|
+
// In the browser the app's own display declaration wins over that UA rule, so mirror it here.
|
|
56
|
+
const dialogPopoverStyle = document.createElement("style")
|
|
57
|
+
dialogPopoverStyle.textContent = "dialog[popover] { display: flex }"
|
|
58
|
+
document.head.append(dialogPopoverStyle)
|