vue-chrts 1.0.0-test.3 → 1.0.0
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/components/Maps/TopoJSONMap/TopoJSONMap.js +59 -0
- package/dist/components/Maps/TopoJSONMap/TopoJSONMap.vue.d.ts +14 -0
- package/dist/components/Maps/TopoJSONMap/TopoJSONMap2.js +4 -0
- package/dist/components/Maps/TopoJSONMap/types.d.ts +5 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +14 -12
- package/package.json +1 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { defineComponent as d, ref as m, computed as c, createElementBlock as f, openBlock as g, createVNode as r, unref as t, withCtx as v } from "vue";
|
|
2
|
+
import { VisSingleContainer as S, VisTopoJSONMap as h, VisTooltip as _ } from "@unovis/vue";
|
|
3
|
+
import { TopoJSONMap as n } from "@unovis/ts";
|
|
4
|
+
const b = { class: "bg-white p-48" }, C = /* @__PURE__ */ d({
|
|
5
|
+
__name: "TopoJSONMap",
|
|
6
|
+
props: {
|
|
7
|
+
mapFeatureKey: {},
|
|
8
|
+
data: {}
|
|
9
|
+
},
|
|
10
|
+
setup(s) {
|
|
11
|
+
const l = s, i = {
|
|
12
|
+
[n.selectors.feature]: (e) => `${e.properties.name}`
|
|
13
|
+
}, p = (e) => 5, a = m(null), u = c(() => a.value === "US" ? [
|
|
14
|
+
{ id: "US", color: "red" }
|
|
15
|
+
] : []);
|
|
16
|
+
return console.log(l.data), (e, T) => (g(), f("div", b, [
|
|
17
|
+
r(t(S), {
|
|
18
|
+
height: 800,
|
|
19
|
+
duration: 600,
|
|
20
|
+
data: {
|
|
21
|
+
areas: u.value,
|
|
22
|
+
points: [
|
|
23
|
+
{
|
|
24
|
+
id: "ams",
|
|
25
|
+
latitude: 52.35598,
|
|
26
|
+
longitude: 4.95035,
|
|
27
|
+
label: "Amsterdam",
|
|
28
|
+
color: "red"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
}, {
|
|
33
|
+
default: v(() => [
|
|
34
|
+
r(t(h), {
|
|
35
|
+
topojson: e.data,
|
|
36
|
+
pointRadius: p,
|
|
37
|
+
"point-label": (o) => o.label,
|
|
38
|
+
"map-feature-name": e.mapFeatureKey,
|
|
39
|
+
events: {
|
|
40
|
+
[t(n).selectors.feature]: {
|
|
41
|
+
mouseenter: (o) => {
|
|
42
|
+
o.id === "US" && (a.value = "US");
|
|
43
|
+
},
|
|
44
|
+
mouseleave: (o) => {
|
|
45
|
+
o.id === "US" && (a.value = null);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}, null, 8, ["topojson", "point-label", "map-feature-name", "events"]),
|
|
50
|
+
r(t(_), { triggers: i })
|
|
51
|
+
]),
|
|
52
|
+
_: 1
|
|
53
|
+
}, 8, ["data"])
|
|
54
|
+
]));
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
export {
|
|
58
|
+
C as default
|
|
59
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MapsData } from './types';
|
|
2
|
+
declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & MapsData<T> & Partial<{}>> & import('vue').PublicProps;
|
|
4
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
5
|
+
attrs: any;
|
|
6
|
+
slots: {};
|
|
7
|
+
emit: {};
|
|
8
|
+
}>) => import('vue').VNode & {
|
|
9
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_PrettifyLocal<T> = {
|
|
13
|
+
[K in keyof T]: T[K];
|
|
14
|
+
} & {};
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,8 @@ import { default as LineChart } from './components/LineChart/LineChart.vue';
|
|
|
3
3
|
import { default as BarChart } from './components/BarChart/BarChart.vue';
|
|
4
4
|
import { default as DonutChart } from './components/DonutChart/DonutChart.vue';
|
|
5
5
|
import { default as BubbleChart } from './components/BubbleChart/BubbleChart.vue';
|
|
6
|
+
import { default as TopoJSONMap } from './components/Maps/TopoJSONMap/TopoJSONMap.vue';
|
|
6
7
|
import { default as GanttChart } from './components/GanttChart/GanttChart.vue';
|
|
7
8
|
import { LegendPosition, CurveType, Orientation, BulletLegendItemInterface, MarkerConfig, CrosshairConfig, DonutType } from './types';
|
|
8
|
-
export { AreaChart, LineChart, BarChart, DonutChart, BubbleChart, GanttChart, Orientation, CurveType, LegendPosition, DonutType };
|
|
9
|
+
export { AreaChart, LineChart, BarChart, DonutChart, BubbleChart, TopoJSONMap, GanttChart, Orientation, CurveType, LegendPosition, DonutType };
|
|
9
10
|
export type { BulletLegendItemInterface, MarkerConfig, CrosshairConfig };
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import { default as
|
|
1
|
+
import { default as a } from "./components/AreaChart/AreaChart.js";
|
|
2
2
|
import { default as o } from "./components/LineChart/LineChart.js";
|
|
3
3
|
import { default as p } from "./components/BarChart/BarChart.js";
|
|
4
4
|
import { default as m } from "./components/DonutChart/DonutChart.js";
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { default as d } from "./components/BubbleChart/BubbleChart.js";
|
|
6
|
+
import { default as n } from "./components/Maps/TopoJSONMap/TopoJSONMap.js";
|
|
7
|
+
import { default as C } from "./components/GanttChart/GanttChart.js";
|
|
8
|
+
import { CurveType as i, LegendPosition as T, Orientation as b } from "./types.js";
|
|
9
|
+
import { DonutType as B } from "./components/DonutChart/types.js";
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
+
a as AreaChart,
|
|
11
12
|
p as BarChart,
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
d as BubbleChart,
|
|
14
|
+
i as CurveType,
|
|
14
15
|
m as DonutChart,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
B as DonutType,
|
|
17
|
+
C as GanttChart,
|
|
18
|
+
T as LegendPosition,
|
|
18
19
|
o as LineChart,
|
|
19
|
-
|
|
20
|
+
b as Orientation,
|
|
21
|
+
n as TopoJSONMap
|
|
20
22
|
};
|