nuxt-charts 2.1.0-beta-4 → 2.1.0-beta-5
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/dist/module.json +1 -1
- package/dist/module.mjs +29 -58
- package/dist/runtime/vue-chrts.d.ts +2 -1
- package/dist/runtime/vue-chrts.js +13 -0
- package/package.json +2 -3
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,73 +1,43 @@
|
|
|
1
1
|
import { addComponent, addImportsSources, defineNuxtModule, createResolver } from '@nuxt/kit';
|
|
2
2
|
|
|
3
3
|
const resolveComponents = (config, filePath) => {
|
|
4
|
-
const { prefix } = config;
|
|
4
|
+
const { prefix, include, global } = config;
|
|
5
5
|
const allComponents = [
|
|
6
6
|
"AreaChart",
|
|
7
|
-
"AreaStackedChart",
|
|
8
7
|
"LineChart",
|
|
9
8
|
"BarChart",
|
|
10
9
|
"DonutChart",
|
|
11
10
|
"BubbleChart",
|
|
12
11
|
"GanttChart",
|
|
13
|
-
"SankeyChart",
|
|
14
12
|
"DagreGraph",
|
|
15
|
-
"DualChart"
|
|
13
|
+
"DualChart",
|
|
14
|
+
"SankeyChart",
|
|
15
|
+
"TopoJSONMap",
|
|
16
|
+
"DottedMap"
|
|
16
17
|
];
|
|
17
|
-
allComponents.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
addComponent({
|
|
27
|
-
export: component[0],
|
|
28
|
-
name: prefix + component[1],
|
|
29
|
-
mode: "client",
|
|
30
|
-
filePath
|
|
31
|
-
});
|
|
32
|
-
}
|
|
18
|
+
const components = include?.length ? allComponents.filter((component) => include.includes(component)) : allComponents;
|
|
19
|
+
components.forEach((component) => {
|
|
20
|
+
addComponent({
|
|
21
|
+
export: component,
|
|
22
|
+
name: prefix + component,
|
|
23
|
+
mode: "client",
|
|
24
|
+
global,
|
|
25
|
+
filePath
|
|
26
|
+
});
|
|
33
27
|
});
|
|
34
28
|
};
|
|
35
29
|
|
|
36
|
-
const resolveImports = (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"AxisConfig",
|
|
42
|
-
"axisFormatter",
|
|
43
|
-
"AreaChartProps",
|
|
44
|
-
"AreaStackedChartProps",
|
|
45
|
-
"BarChartProps",
|
|
46
|
-
"LineChartProps",
|
|
47
|
-
"DonutChartProps",
|
|
48
|
-
"BubbleChartProps",
|
|
49
|
-
"GanttChartProps",
|
|
50
|
-
"DagreGraphProps",
|
|
51
|
-
"SankeyChartProps",
|
|
52
|
-
"DualChartProps",
|
|
53
|
-
"SankeyInputNode",
|
|
54
|
-
"SankeyInputLink",
|
|
55
|
-
"GraphNodeDatum",
|
|
56
|
-
"GraphLinkDatum",
|
|
57
|
-
"GraphData",
|
|
58
|
-
"DagreLayoutSettings",
|
|
59
|
-
"DagreRankDir",
|
|
60
|
-
"DagreAlign",
|
|
61
|
-
"DagreRanker",
|
|
62
|
-
"NodeShape",
|
|
63
|
-
"LinkArrowPosition"
|
|
64
|
-
];
|
|
30
|
+
const resolveImports = (config, filePath) => {
|
|
31
|
+
if (!config.autoImports) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const allTypes = ["BulletLegendItemInterface", "MarkerConfig", "CrosshairConfig", "AxisConfig", "MapRegion", "MapPin"];
|
|
65
35
|
addImportsSources({
|
|
66
36
|
from: filePath,
|
|
67
37
|
type: true,
|
|
68
38
|
imports: [...allTypes]
|
|
69
39
|
});
|
|
70
|
-
const allImports = ["CurveType", "LegendPosition", "Orientation", "DonutType", "
|
|
40
|
+
const allImports = ["CurveType", "LegendPosition", "Orientation", "DonutType", "getMap", "getPin"];
|
|
71
41
|
addImportsSources({
|
|
72
42
|
from: filePath,
|
|
73
43
|
imports: [...allImports]
|
|
@@ -90,16 +60,17 @@ const module = defineNuxtModule({
|
|
|
90
60
|
},
|
|
91
61
|
moduleDependencies: {},
|
|
92
62
|
async setup(options, nuxt) {
|
|
63
|
+
const deps = ["vue-chrts", "@unovis/ts", "@unovis/vue"];
|
|
93
64
|
nuxt.options.vite.optimizeDeps = nuxt.options.vite.optimizeDeps || {};
|
|
94
65
|
nuxt.options.vite.optimizeDeps.include = nuxt.options.vite.optimizeDeps.include || [];
|
|
95
|
-
nuxt.options.vite.optimizeDeps.include
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
nuxt.options.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
66
|
+
nuxt.options.vite.optimizeDeps.include.push(...deps);
|
|
67
|
+
nuxt.options.build.transpile = nuxt.options.build.transpile || [];
|
|
68
|
+
nuxt.options.build.transpile.push(...deps);
|
|
69
|
+
nuxt.options.vite.ssr = nuxt.options.vite.ssr || {};
|
|
70
|
+
nuxt.options.vite.ssr.noExternal = nuxt.options.vite.ssr.noExternal || [];
|
|
71
|
+
if (Array.isArray(nuxt.options.vite.ssr.noExternal)) {
|
|
72
|
+
nuxt.options.vite.ssr.noExternal.push(...deps);
|
|
73
|
+
}
|
|
103
74
|
const { resolve } = createResolver(import.meta.url);
|
|
104
75
|
const runtimePath = resolve("./runtime/vue-chrts");
|
|
105
76
|
resolveImports(options, runtimePath);
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { AreaChart, LineChart, BarChart, DonutChart, BubbleChart, GanttChart, DagreGraph, DualChart, SankeyChart, TopoJSONMap, DottedMap, } from "vue-chrts";
|
|
2
|
+
export * from "vue-chrts";
|
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-charts",
|
|
3
|
-
"version": "2.1.0-beta-
|
|
3
|
+
"version": "2.1.0-beta-5",
|
|
4
4
|
"description": "Nuxt module for vue-chrts",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
|
-
"types": "./dist/module.d.ts",
|
|
10
9
|
"import": "./dist/module.mjs",
|
|
11
10
|
"require": "./dist/module.cjs"
|
|
12
11
|
}
|
|
@@ -19,7 +18,7 @@
|
|
|
19
18
|
"dependencies": {
|
|
20
19
|
"@unovis/ts": "^1.6.2",
|
|
21
20
|
"@unovis/vue": "^1.6.2",
|
|
22
|
-
"vue-chrts": "2.1.0-beta-
|
|
21
|
+
"vue-chrts": "2.1.0-beta-5"
|
|
23
22
|
},
|
|
24
23
|
"devDependencies": {
|
|
25
24
|
"@nuxt/eslint": "^1.7.1",
|