@unovis/vue 1.7.0-pre.0 → 1.7.0-pre.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/components/annotations/index.cjs +1 -1
- package/components/annotations/index.cjs.map +1 -1
- package/components/annotations/index.d.ts +100 -18
- package/components/annotations/index.js +10 -9
- package/components/annotations/index.js.map +1 -1
- package/components/area/index.cjs +1 -1
- package/components/area/index.cjs.map +1 -1
- package/components/area/index.d.ts +64 -12
- package/components/area/index.js +26 -22
- package/components/area/index.js.map +1 -1
- package/components/axis/index.cjs +1 -1
- package/components/axis/index.cjs.map +1 -1
- package/components/axis/index.d.ts +82 -12
- package/components/axis/index.js +16 -16
- package/components/axis/index.js.map +1 -1
- package/components/brush/index.cjs +1 -1
- package/components/brush/index.cjs.map +1 -1
- package/components/brush/index.d.ts +62 -12
- package/components/brush/index.js +17 -17
- package/components/brush/index.js.map +1 -1
- package/components/chord-diagram/index.cjs +1 -1
- package/components/chord-diagram/index.cjs.map +1 -1
- package/components/chord-diagram/index.d.ts +60 -12
- package/components/chord-diagram/index.js +26 -26
- package/components/chord-diagram/index.js.map +1 -1
- package/components/crosshair/index.cjs.map +1 -1
- package/components/crosshair/index.d.ts +66 -12
- package/components/crosshair/index.js.map +1 -1
- package/components/donut/index.cjs +1 -1
- package/components/donut/index.cjs.map +1 -1
- package/components/donut/index.d.ts +64 -12
- package/components/donut/index.js +17 -17
- package/components/donut/index.js.map +1 -1
- package/components/free-brush/index.cjs +1 -1
- package/components/free-brush/index.cjs.map +1 -1
- package/components/free-brush/index.d.ts +62 -12
- package/components/free-brush/index.js +18 -18
- package/components/free-brush/index.js.map +1 -1
- package/components/graph/index.cjs +1 -1
- package/components/graph/index.cjs.map +1 -1
- package/components/graph/index.d.ts +134 -10
- package/components/graph/index.js +66 -66
- package/components/graph/index.js.map +1 -1
- package/components/grouped-bar/index.cjs +1 -1
- package/components/grouped-bar/index.cjs.map +1 -1
- package/components/grouped-bar/index.d.ts +62 -12
- package/components/grouped-bar/index.js +25 -25
- package/components/grouped-bar/index.js.map +1 -1
- package/components/line/index.cjs +1 -1
- package/components/line/index.cjs.map +1 -1
- package/components/line/index.d.ts +60 -12
- package/components/line/index.js +24 -24
- package/components/line/index.js.map +1 -1
- package/components/nested-donut/index.cjs +1 -1
- package/components/nested-donut/index.cjs.map +1 -1
- package/components/nested-donut/index.d.ts +65 -12
- package/components/nested-donut/index.js +22 -22
- package/components/nested-donut/index.js.map +1 -1
- package/components/plotband/index.cjs +1 -1
- package/components/plotband/index.cjs.map +1 -1
- package/components/plotband/index.d.ts +63 -12
- package/components/plotband/index.js +12 -12
- package/components/plotband/index.js.map +1 -1
- package/components/plotline/index.cjs +1 -1
- package/components/plotline/index.cjs.map +1 -1
- package/components/plotline/index.d.ts +64 -12
- package/components/plotline/index.js +9 -9
- package/components/plotline/index.js.map +1 -1
- package/components/sankey/index.cjs +1 -1
- package/components/sankey/index.cjs.map +1 -1
- package/components/sankey/index.d.ts +106 -12
- package/components/sankey/index.js +37 -37
- package/components/sankey/index.js.map +1 -1
- package/components/scatter/index.cjs +1 -1
- package/components/scatter/index.cjs.map +1 -1
- package/components/scatter/index.d.ts +65 -12
- package/components/scatter/index.js +27 -27
- package/components/scatter/index.js.map +1 -1
- package/components/stacked-bar/index.cjs +1 -1
- package/components/stacked-bar/index.cjs.map +1 -1
- package/components/stacked-bar/index.d.ts +62 -12
- package/components/stacked-bar/index.js +22 -22
- package/components/stacked-bar/index.js.map +1 -1
- package/components/timeline/index.cjs.map +1 -1
- package/components/timeline/index.d.ts +88 -12
- package/components/timeline/index.js.map +1 -1
- package/components/tooltip/index.cjs.map +1 -1
- package/components/tooltip/index.d.ts +99 -19
- package/components/tooltip/index.js.map +1 -1
- package/components/topojson-map/index.cjs +1 -1
- package/components/topojson-map/index.cjs.map +1 -1
- package/components/topojson-map/index.d.ts +78 -12
- package/components/topojson-map/index.js +39 -39
- package/components/topojson-map/index.js.map +1 -1
- package/components/treemap/index.cjs +1 -1
- package/components/treemap/index.cjs.map +1 -1
- package/components/treemap/index.d.ts +69 -12
- package/components/treemap/index.js +14 -14
- package/components/treemap/index.js.map +1 -1
- package/components/xy-labels/index.cjs +1 -1
- package/components/xy-labels/index.cjs.map +1 -1
- package/components/xy-labels/index.d.ts +66 -12
- package/components/xy-labels/index.js +38 -38
- package/components/xy-labels/index.js.map +1 -1
- package/components.d.ts +27 -26
- package/containers/single-container/index.cjs.map +1 -1
- package/containers/single-container/index.d.ts +26 -11
- package/containers/single-container/index.js.map +1 -1
- package/containers/xy-container/index.cjs.map +1 -1
- package/containers/xy-container/index.d.ts +45 -12
- package/containers/xy-container/index.js.map +1 -1
- package/containers.d.ts +2 -2
- package/html-components/bullet-legend/index.cjs +1 -1
- package/html-components/bullet-legend/index.cjs.map +1 -1
- package/html-components/bullet-legend/index.d.ts +74 -18
- package/html-components/bullet-legend/index.js +13 -13
- package/html-components/bullet-legend/index.js.map +1 -1
- package/html-components/flow-legend/index.cjs +2 -0
- package/html-components/flow-legend/index.cjs.map +1 -0
- package/html-components/flow-legend/index.d.ts +86 -0
- package/html-components/flow-legend/index.js +48 -0
- package/html-components/flow-legend/index.js.map +1 -0
- package/html-components/flow-legend/index3.cjs +2 -0
- package/html-components/flow-legend/index3.cjs.map +1 -0
- package/html-components/flow-legend/index3.js +8 -0
- package/html-components/flow-legend/index3.js.map +1 -0
- package/html-components/leaflet-flow-map/index.cjs +1 -1
- package/html-components/leaflet-flow-map/index.cjs.map +1 -1
- package/html-components/leaflet-flow-map/index.d.ts +112 -12
- package/html-components/leaflet-flow-map/index.js +47 -47
- package/html-components/leaflet-flow-map/index.js.map +1 -1
- package/html-components/leaflet-map/index.cjs +1 -1
- package/html-components/leaflet-map/index.cjs.map +1 -1
- package/html-components/leaflet-map/index.d.ts +99 -12
- package/html-components/leaflet-map/index.js +38 -38
- package/html-components/leaflet-map/index.js.map +1 -1
- package/html-components/rolling-pin-legend/index.cjs.map +1 -1
- package/html-components/rolling-pin-legend/index.d.ts +50 -18
- package/html-components/rolling-pin-legend/index.js.map +1 -1
- package/index.cjs +2 -2
- package/index.js +79 -75
- package/index.js.map +1 -1
- package/package.json +4 -5
- package/utils/context.cjs.map +1 -1
- package/utils/context.d.ts +0 -1
- package/utils/context.js.map +1 -1
- package/utils/props.cjs.map +1 -1
- package/utils/props.d.ts +1 -2
- package/utils/props.js.map +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@unovis/ts"),c=require("../../utils/props.cjs"),p=require("../../utils/context.cjs"),v={"data-vis-annotations":""},_=i.Annotations.selectors,f=e.defineComponent({__name:"index",props:{items:{},duration:{},events:{},attributes:{},data:{}},setup(u,{expose:l}){const s=e.inject(p.annotationsAccessorKey),d=u,n=c.useForwardProps(d),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new i.Annotations(n.value),s.update(t.value)})}),e.onUnmounted(()=>{var o;(o=t.value)==null||o.destroy(),s.destroy()}),e.watch(n,(o,r)=>{var a;c.arePropsEqual(o,r)||(a=t.value)==null||a.setConfig(n.value)}),l({component:t}),(o,r)=>(e.openBlock(),e.createElementBlock("div",v))}});exports.VisAnnotationsSelectors=_;exports.default=f;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@unovis/ts"),c=require("../../utils/props.cjs"),p=require("../../utils/context.cjs"),v={"data-vis-annotations":""},_=i.Annotations.selectors,f=e.defineComponent({__name:"index",props:{items:{},renderTextBoundingBoxes:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(u,{expose:l}){const s=e.inject(p.annotationsAccessorKey),d=u,n=c.useForwardProps(d),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new i.Annotations(n.value),s.update(t.value)})}),e.onUnmounted(()=>{var o;(o=t.value)==null||o.destroy(),s.destroy()}),e.watch(n,(o,r)=>{var a;c.arePropsEqual(o,r)||(a=t.value)==null||a.setConfig(n.value)}),l({component:t}),(o,r)=>(e.openBlock(),e.createElementBlock("div",v))}});exports.VisAnnotationsSelectors=_;exports.default=f;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/annotations/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { Annotations, AnnotationsConfigInterface, AnnotationItem } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { annotationsAccessorKey } from '../../utils/context'\n\nconst accessor = inject(annotationsAccessorKey)\n\n// data and required props \ntype Props = AnnotationsConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Annotations>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Annotations(config.value)\n \n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAnnotationsSelectors = Annotations.selectors\n</script>\n\n<template>\n <div data-vis-annotations />\n</template>\n\n\n"],"names":["VisAnnotationsSelectors","Annotations","accessor","inject","annotationsAccessorKey","props","__props","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/annotations/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { Annotations, AnnotationsConfigInterface, AnnotationItem } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { annotationsAccessorKey } from '../../utils/context'\n\nconst accessor = inject(annotationsAccessorKey)\n\n// data and required props \ntype Props = AnnotationsConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Annotations>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Annotations(config.value)\n \n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAnnotationsSelectors = Annotations.selectors\n</script>\n\n<template>\n <div data-vis-annotations />\n</template>\n\n\n"],"names":["VisAnnotationsSelectors","Annotations","accessor","inject","annotationsAccessorKey","props","__props","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose"],"mappings":"iQA+CaA,EAA0BC,EAAAA,YAAY,sKAxC7C,MAAAC,EAAWC,SAAOC,wBAAsB,EAIxCC,EAAQC,EAIRC,EAASC,kBAAgBH,CAAK,EAG9BI,EAAYC,EAAAA,IAAiB,EAGnCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIR,cAAYM,EAAO,KAAK,EAErCL,EAAA,OAAOO,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDI,EAAAA,YAAY,IAAM,QAChBC,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UACjBZ,EAAS,QAAQ,CAAA,CAClB,EAEKa,EAAAA,MAAAR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBH,EAAAL,EAAA,QAAA,MAAAK,EAAO,UAAUP,EAAO,MACpC,CACD,EAGYY,EAAA,CACX,UAAAV,CAAA,CACD"}
|
|
@@ -1,20 +1,102 @@
|
|
|
1
|
-
import { Annotations,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
type
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
type: import(
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { Annotations, AnnotationItem } from '@unovis/ts';
|
|
2
|
+
export declare const VisAnnotationsSelectors: typeof import("@unovis/ts/dist/components/annotations/style");
|
|
3
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
items: {
|
|
5
|
+
type: import("vue").PropType<AnnotationItem[]>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
renderTextBoundingBoxes: {
|
|
9
|
+
type: import("vue").PropType<boolean>;
|
|
10
|
+
};
|
|
11
|
+
duration: {
|
|
12
|
+
type: import("vue").PropType<number>;
|
|
13
|
+
};
|
|
14
|
+
events: {
|
|
15
|
+
type: import("vue").PropType<{
|
|
16
|
+
[selector: string]: {
|
|
17
|
+
touchstart?: import("@unovis/ts").VisEventCallback<any>;
|
|
18
|
+
touchmove?: import("@unovis/ts").VisEventCallback<any>;
|
|
19
|
+
touchend?: import("@unovis/ts").VisEventCallback<any>;
|
|
20
|
+
mouseover?: import("@unovis/ts").VisEventCallback<any>;
|
|
21
|
+
mousemove?: import("@unovis/ts").VisEventCallback<any>;
|
|
22
|
+
mousedown?: import("@unovis/ts").VisEventCallback<any>;
|
|
23
|
+
mouseup?: import("@unovis/ts").VisEventCallback<any>;
|
|
24
|
+
click?: import("@unovis/ts").VisEventCallback<any>;
|
|
25
|
+
auxclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
26
|
+
contextmenu?: import("@unovis/ts").VisEventCallback<any>;
|
|
27
|
+
dblclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
28
|
+
mouseenter?: import("@unovis/ts").VisEventCallback<any>;
|
|
29
|
+
mouseleave?: import("@unovis/ts").VisEventCallback<any>;
|
|
30
|
+
mouseout?: import("@unovis/ts").VisEventCallback<any>;
|
|
31
|
+
scroll?: import("@unovis/ts").VisEventCallback<any>;
|
|
32
|
+
select?: import("@unovis/ts").VisEventCallback<any>;
|
|
33
|
+
wheel?: import("@unovis/ts").VisEventCallback<any>;
|
|
34
|
+
pointerdown?: import("@unovis/ts").VisEventCallback<any>;
|
|
35
|
+
pointerup?: import("@unovis/ts").VisEventCallback<any>;
|
|
36
|
+
pointerout?: import("@unovis/ts").VisEventCallback<any>;
|
|
37
|
+
pointermove?: import("@unovis/ts").VisEventCallback<any>;
|
|
38
|
+
};
|
|
39
|
+
}>;
|
|
40
|
+
};
|
|
41
|
+
attributes: {
|
|
42
|
+
type: import("vue").PropType<{
|
|
43
|
+
[selector: string]: {
|
|
44
|
+
[attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
|
|
45
|
+
};
|
|
46
|
+
}>;
|
|
47
|
+
};
|
|
48
|
+
data: {
|
|
49
|
+
type: import("vue").PropType<never>;
|
|
50
|
+
};
|
|
51
|
+
}>, {
|
|
52
|
+
component: import("vue").Ref<Annotations, Annotations>;
|
|
53
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
54
|
+
items: {
|
|
55
|
+
type: import("vue").PropType<AnnotationItem[]>;
|
|
18
56
|
required: true;
|
|
19
57
|
};
|
|
20
|
-
|
|
58
|
+
renderTextBoundingBoxes: {
|
|
59
|
+
type: import("vue").PropType<boolean>;
|
|
60
|
+
};
|
|
61
|
+
duration: {
|
|
62
|
+
type: import("vue").PropType<number>;
|
|
63
|
+
};
|
|
64
|
+
events: {
|
|
65
|
+
type: import("vue").PropType<{
|
|
66
|
+
[selector: string]: {
|
|
67
|
+
touchstart?: import("@unovis/ts").VisEventCallback<any>;
|
|
68
|
+
touchmove?: import("@unovis/ts").VisEventCallback<any>;
|
|
69
|
+
touchend?: import("@unovis/ts").VisEventCallback<any>;
|
|
70
|
+
mouseover?: import("@unovis/ts").VisEventCallback<any>;
|
|
71
|
+
mousemove?: import("@unovis/ts").VisEventCallback<any>;
|
|
72
|
+
mousedown?: import("@unovis/ts").VisEventCallback<any>;
|
|
73
|
+
mouseup?: import("@unovis/ts").VisEventCallback<any>;
|
|
74
|
+
click?: import("@unovis/ts").VisEventCallback<any>;
|
|
75
|
+
auxclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
76
|
+
contextmenu?: import("@unovis/ts").VisEventCallback<any>;
|
|
77
|
+
dblclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
78
|
+
mouseenter?: import("@unovis/ts").VisEventCallback<any>;
|
|
79
|
+
mouseleave?: import("@unovis/ts").VisEventCallback<any>;
|
|
80
|
+
mouseout?: import("@unovis/ts").VisEventCallback<any>;
|
|
81
|
+
scroll?: import("@unovis/ts").VisEventCallback<any>;
|
|
82
|
+
select?: import("@unovis/ts").VisEventCallback<any>;
|
|
83
|
+
wheel?: import("@unovis/ts").VisEventCallback<any>;
|
|
84
|
+
pointerdown?: import("@unovis/ts").VisEventCallback<any>;
|
|
85
|
+
pointerup?: import("@unovis/ts").VisEventCallback<any>;
|
|
86
|
+
pointerout?: import("@unovis/ts").VisEventCallback<any>;
|
|
87
|
+
pointermove?: import("@unovis/ts").VisEventCallback<any>;
|
|
88
|
+
};
|
|
89
|
+
}>;
|
|
90
|
+
};
|
|
91
|
+
attributes: {
|
|
92
|
+
type: import("vue").PropType<{
|
|
93
|
+
[selector: string]: {
|
|
94
|
+
[attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
|
|
95
|
+
};
|
|
96
|
+
}>;
|
|
97
|
+
};
|
|
98
|
+
data: {
|
|
99
|
+
type: import("vue").PropType<never>;
|
|
100
|
+
};
|
|
101
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
102
|
+
export default _default;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { defineComponent as p, inject as u, ref as
|
|
1
|
+
import { defineComponent as p, inject as u, ref as d, onMounted as m, nextTick as l, onUnmounted as f, watch as v, createElementBlock as _, openBlock as x } from "vue";
|
|
2
2
|
import { Annotations as a } from "@unovis/ts";
|
|
3
|
-
import { useForwardProps as
|
|
4
|
-
import { annotationsAccessorKey as
|
|
5
|
-
const
|
|
3
|
+
import { useForwardProps as B, arePropsEqual as y } from "../../utils/props.js";
|
|
4
|
+
import { annotationsAccessorKey as g } from "../../utils/context.js";
|
|
5
|
+
const h = { "data-vis-annotations": "" }, P = a.selectors, T = /* @__PURE__ */ p({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
items: {},
|
|
9
|
+
renderTextBoundingBoxes: { type: Boolean },
|
|
9
10
|
duration: {},
|
|
10
11
|
events: {},
|
|
11
12
|
attributes: {},
|
|
12
13
|
data: {}
|
|
13
14
|
},
|
|
14
15
|
setup(c, { expose: i }) {
|
|
15
|
-
const n = u(
|
|
16
|
-
return
|
|
16
|
+
const n = u(g), t = B(c), o = d();
|
|
17
|
+
return m(() => {
|
|
17
18
|
l(() => {
|
|
18
19
|
o.value = new a(t.value), n.update(o.value);
|
|
19
20
|
});
|
|
@@ -22,14 +23,14 @@ const y = { "data-vis-annotations": "" }, P = a.selectors, b = /* @__PURE__ */ p
|
|
|
22
23
|
(e = o.value) == null || e.destroy(), n.destroy();
|
|
23
24
|
}), v(t, (e, s) => {
|
|
24
25
|
var r;
|
|
25
|
-
|
|
26
|
+
y(e, s) || (r = o.value) == null || r.setConfig(t.value);
|
|
26
27
|
}), i({
|
|
27
28
|
component: o
|
|
28
|
-
}), (e, s) => (x(), _("div",
|
|
29
|
+
}), (e, s) => (x(), _("div", h));
|
|
29
30
|
}
|
|
30
31
|
});
|
|
31
32
|
export {
|
|
32
33
|
P as VisAnnotationsSelectors,
|
|
33
|
-
|
|
34
|
+
T as default
|
|
34
35
|
};
|
|
35
36
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/annotations/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { Annotations, AnnotationsConfigInterface, AnnotationItem } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { annotationsAccessorKey } from '../../utils/context'\n\nconst accessor = inject(annotationsAccessorKey)\n\n// data and required props \ntype Props = AnnotationsConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Annotations>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Annotations(config.value)\n \n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAnnotationsSelectors = Annotations.selectors\n</script>\n\n<template>\n <div data-vis-annotations />\n</template>\n\n\n"],"names":["VisAnnotationsSelectors","Annotations","accessor","inject","annotationsAccessorKey","config","useForwardProps","__props","component","ref","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/annotations/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { Annotations, AnnotationsConfigInterface, AnnotationItem } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { annotationsAccessorKey } from '../../utils/context'\n\nconst accessor = inject(annotationsAccessorKey)\n\n// data and required props \ntype Props = AnnotationsConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Annotations>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Annotations(config.value)\n \n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAnnotationsSelectors = Annotations.selectors\n</script>\n\n<template>\n <div data-vis-annotations />\n</template>\n\n\n"],"names":["VisAnnotationsSelectors","Annotations","accessor","inject","annotationsAccessorKey","config","useForwardProps","__props","component","ref","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;0CA+CaA,IAA0BC,EAAY;;;;;;;;;;;AAxC7C,UAAAC,IAAWC,EAAOC,CAAsB,GAQxCC,IAASC,EAJDC,CAIsB,GAG9BC,IAAYC,EAAiB;AAGnC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIP,EAAYI,EAAO,KAAK,GAErCH,EAAA,OAAOM,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDI,EAAY,MAAM;;AAChB,OAAAC,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACjBX,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKY,EAAAT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBH,IAAAL,EAAA,UAAA,QAAAK,EAAO,UAAUR,EAAO;AAAA,IACpC,CACD,GAGYa,EAAA;AAAA,MACX,WAAAV;AAAA,IAAA,CACD;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),l=require("@unovis/ts"),u=require("../../utils/props.cjs"),v=require("../../utils/context.cjs"),y={"data-vis-component":""},m=l.Area.selectors,_=t.defineComponent({__name:"index",props:{color:{},curveType:{},baseline:{},opacity:{},cursor:{},line:{type:Boolean},lineColor:{},lineWidth:{},lineDashArray:{},minHeight1Px:{type:Boolean},minHeight:{},stackMinHeight:{type:Boolean},x:{},y:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:d}){const n=t.inject(v.componentAccessorKey),s=p,a=t.computed(()=>n.data.value??s.data),c=u.useForwardProps(s),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new l.Area(c.value),(e=o.value)==null||e.setData(a.value),n.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),n.destroy()}),t.watch(c,(e,r)=>{var i;u.arePropsEqual(e,r)||(i=o.value)==null||i.setConfig(c.value)}),t.watch(a,()=>{var e;(e=o.value)==null||e.setData(a.value)}),d({component:o}),(e,r)=>(t.openBlock(),t.createElementBlock("div",y))}});exports.VisAreaSelectors=m;exports.default=_;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/area/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Area, AreaConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = AreaConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Area<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Area<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAreaSelectors = Area.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisAreaSelectors","Area","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/area/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Area, AreaConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = AreaConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Area<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Area<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAreaSelectors = Area.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisAreaSelectors","Area","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAmBC,EAAAA,KAAK,4bA3C/B,MAAAC,EAAWC,SAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAiB,EAGnCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,OAAYQ,EAAO,KAAK,GACpCM,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,OACrBL,EAAA,OAAOS,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAQ,CAAA,CAClB,EAEKe,EAAAA,MAAAR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,UAAUN,EAAO,MACpC,CACD,EAEDQ,EAAA,MAAMV,EAAM,IAAM,QACNQ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,MAAK,CACpC,EAEYc,EAAA,CACX,UAAAV,CAAA,CACD"}
|
|
@@ -1,19 +1,71 @@
|
|
|
1
|
-
import { Area,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { Area, NumericAccessor } from '@unovis/ts';
|
|
2
|
+
export declare const VisAreaSelectors: typeof import("@unovis/ts/dist/components/area/style");
|
|
3
|
+
declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
|
|
4
|
+
attrs: any;
|
|
5
|
+
emit: any;
|
|
6
|
+
slots: any;
|
|
7
|
+
}, __VLS_expose?: any, __VLS_setup?: Promise<{
|
|
8
|
+
props: {
|
|
9
|
+
duration?: number;
|
|
10
|
+
events?: {
|
|
11
|
+
[selector: string]: {
|
|
12
|
+
touchstart?: import("@unovis/ts").VisEventCallback<any>;
|
|
13
|
+
touchmove?: import("@unovis/ts").VisEventCallback<any>;
|
|
14
|
+
touchend?: import("@unovis/ts").VisEventCallback<any>;
|
|
15
|
+
mouseover?: import("@unovis/ts").VisEventCallback<any>;
|
|
16
|
+
mousemove?: import("@unovis/ts").VisEventCallback<any>;
|
|
17
|
+
mousedown?: import("@unovis/ts").VisEventCallback<any>;
|
|
18
|
+
mouseup?: import("@unovis/ts").VisEventCallback<any>;
|
|
19
|
+
click?: import("@unovis/ts").VisEventCallback<any>;
|
|
20
|
+
auxclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
21
|
+
contextmenu?: import("@unovis/ts").VisEventCallback<any>;
|
|
22
|
+
dblclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
23
|
+
mouseenter?: import("@unovis/ts").VisEventCallback<any>;
|
|
24
|
+
mouseleave?: import("@unovis/ts").VisEventCallback<any>;
|
|
25
|
+
mouseout?: import("@unovis/ts").VisEventCallback<any>;
|
|
26
|
+
scroll?: import("@unovis/ts").VisEventCallback<any>;
|
|
27
|
+
select?: import("@unovis/ts").VisEventCallback<any>;
|
|
28
|
+
wheel?: import("@unovis/ts").VisEventCallback<any>;
|
|
29
|
+
pointerdown?: import("@unovis/ts").VisEventCallback<any>;
|
|
30
|
+
pointerup?: import("@unovis/ts").VisEventCallback<any>;
|
|
31
|
+
pointerout?: import("@unovis/ts").VisEventCallback<any>;
|
|
32
|
+
pointermove?: import("@unovis/ts").VisEventCallback<any>;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
attributes?: {
|
|
36
|
+
[selector: string]: {
|
|
37
|
+
[attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
|
|
38
|
+
};
|
|
39
|
+
};
|
|
6
40
|
data?: Datum[];
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
41
|
+
x: NumericAccessor<Datum>;
|
|
42
|
+
y: NumericAccessor<Datum> | NumericAccessor<Datum>[];
|
|
43
|
+
line?: boolean;
|
|
44
|
+
color?: import("@unovis/ts").ColorAccessor<Datum[]>;
|
|
45
|
+
curveType?: string;
|
|
46
|
+
baseline?: NumericAccessor<Datum>;
|
|
47
|
+
opacity?: NumericAccessor<Datum[]>;
|
|
48
|
+
cursor?: import("@unovis/ts").StringAccessor<Datum[]>;
|
|
49
|
+
lineColor?: import("@unovis/ts").ColorAccessor<Datum[]>;
|
|
50
|
+
lineWidth?: number;
|
|
51
|
+
lineDashArray?: import("@unovis/ts").GenericAccessor<number[], Datum[]>;
|
|
52
|
+
minHeight1Px?: boolean;
|
|
53
|
+
minHeight?: number;
|
|
54
|
+
stackMinHeight?: boolean;
|
|
55
|
+
id?: (d: Datum, i: number, ...any: any[]) => string;
|
|
56
|
+
xScale?: import("@unovis/ts").ContinuousScale;
|
|
57
|
+
yScale?: import("@unovis/ts").ContinuousScale;
|
|
58
|
+
excludeFromDomainCalculation?: boolean;
|
|
59
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
60
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
61
|
+
component: import("vue").Ref<Area<Datum>, Area<Datum>>;
|
|
10
62
|
}>): void;
|
|
11
63
|
attrs: any;
|
|
12
|
-
slots:
|
|
13
|
-
emit:
|
|
14
|
-
}>) => import(
|
|
64
|
+
slots: {};
|
|
65
|
+
emit: any;
|
|
66
|
+
}>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
15
67
|
[key: string]: any;
|
|
16
68
|
}> & {
|
|
17
|
-
__ctx?:
|
|
69
|
+
__ctx?: any;
|
|
18
70
|
};
|
|
19
71
|
export default _default;
|
package/components/area/index.js
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as d, inject as m, computed as v, ref as y, onMounted as f, nextTick as x, onUnmounted as h, watch as i, createElementBlock as _, openBlock as B } from "vue";
|
|
2
2
|
import { Area as l } from "@unovis/ts";
|
|
3
|
-
import { useForwardProps as g, arePropsEqual as
|
|
4
|
-
import { componentAccessorKey as
|
|
5
|
-
const
|
|
3
|
+
import { useForwardProps as g, arePropsEqual as F } from "../../utils/props.js";
|
|
4
|
+
import { componentAccessorKey as b } from "../../utils/context.js";
|
|
5
|
+
const k = { "data-vis-component": "" }, w = l.selectors, H = /* @__PURE__ */ d({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
|
-
color: {
|
|
8
|
+
color: {},
|
|
9
9
|
curveType: {},
|
|
10
|
-
baseline: {
|
|
11
|
-
opacity: {
|
|
12
|
-
cursor: {
|
|
10
|
+
baseline: {},
|
|
11
|
+
opacity: {},
|
|
12
|
+
cursor: {},
|
|
13
|
+
line: { type: Boolean },
|
|
14
|
+
lineColor: {},
|
|
15
|
+
lineWidth: {},
|
|
16
|
+
lineDashArray: {},
|
|
13
17
|
minHeight1Px: { type: Boolean },
|
|
14
18
|
minHeight: {},
|
|
15
19
|
stackMinHeight: { type: Boolean },
|
|
16
|
-
x: {
|
|
17
|
-
y: {
|
|
20
|
+
x: {},
|
|
21
|
+
y: {},
|
|
18
22
|
id: { type: Function },
|
|
19
23
|
xScale: { type: [Object, Function] },
|
|
20
24
|
yScale: { type: [Object, Function] },
|
|
@@ -24,29 +28,29 @@ const B = { "data-vis-component": "" }, w = l.selectors, C = /* @__PURE__ */ m({
|
|
|
24
28
|
attributes: {},
|
|
25
29
|
data: {}
|
|
26
30
|
},
|
|
27
|
-
setup(
|
|
28
|
-
const
|
|
31
|
+
setup(u, { expose: p }) {
|
|
32
|
+
const o = m(b), c = u, n = v(() => o.data.value ?? c.data), a = g(c), t = y();
|
|
29
33
|
return f(() => {
|
|
30
|
-
|
|
34
|
+
x(() => {
|
|
31
35
|
var e;
|
|
32
|
-
t.value = new l(a.value), (e = t.value) == null || e.setData(
|
|
36
|
+
t.value = new l(a.value), (e = t.value) == null || e.setData(n.value), o.update(t.value);
|
|
33
37
|
});
|
|
34
|
-
}),
|
|
38
|
+
}), h(() => {
|
|
35
39
|
var e;
|
|
36
|
-
(e = t.value) == null || e.destroy(),
|
|
40
|
+
(e = t.value) == null || e.destroy(), o.destroy();
|
|
37
41
|
}), i(a, (e, r) => {
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
}), i(
|
|
42
|
+
var s;
|
|
43
|
+
F(e, r) || (s = t.value) == null || s.setConfig(a.value);
|
|
44
|
+
}), i(n, () => {
|
|
41
45
|
var e;
|
|
42
|
-
(e = t.value) == null || e.setData(
|
|
46
|
+
(e = t.value) == null || e.setData(n.value);
|
|
43
47
|
}), p({
|
|
44
48
|
component: t
|
|
45
|
-
}), (e, r) => (
|
|
49
|
+
}), (e, r) => (B(), _("div", k));
|
|
46
50
|
}
|
|
47
51
|
});
|
|
48
52
|
export {
|
|
49
53
|
w as VisAreaSelectors,
|
|
50
|
-
|
|
54
|
+
H as default
|
|
51
55
|
};
|
|
52
56
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/area/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Area, AreaConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = AreaConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Area<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Area<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAreaSelectors = Area.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisAreaSelectors","Area","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/area/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Area, AreaConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = AreaConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Area<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Area<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAreaSelectors = Area.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisAreaSelectors","Area","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAmBC,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3C/B,UAAAC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAiB;AAGnC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAYQ,EAAO,KAAK,IACpCM,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK,QACrBL,EAAA,OAAOS,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKe,EAAAR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,UAAUN,EAAO;AAAA,IACpC,CACD,GAEDQ,EAAMV,GAAM,MAAM;;AACN,OAAAQ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK;AAAA,IAAK,CACpC,GAEYc,EAAA;AAAA,MACX,WAAAV;AAAA,IAAA,CACD;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),u=require("@unovis/ts"),r=require("../../utils/props.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),u=require("@unovis/ts"),r=require("../../utils/props.cjs"),x=require("../../utils/context.cjs"),y={"data-vis-axis":""},k=u.Axis.selectors,T=t.defineComponent({__name:"index",props:{position:{},type:{},fullSize:{type:Boolean},label:{},labelFontSize:{},labelMargin:{},labelTextFitMode:{},labelTextTrimType:{},labelColor:{},gridLine:{type:Boolean},tickLine:{type:Boolean},domainLine:{type:Boolean},minMaxTicksOnly:{type:Boolean},minMaxTicksOnlyShowGridLines:{type:Boolean},minMaxTicksOnlyWhenWidthIsLess:{},tickFormat:{type:Function},tickValues:{},numTicks:{},tickTextFitMode:{},tickTextWidth:{},tickTextSeparator:{},tickTextForceWordBreak:{type:Boolean},tickTextTrimType:{},tickTextFontSize:{},tickTextAlign:{},tickTextColor:{},tickTextAngle:{},tickTextHideOverlapping:{type:Boolean},tickPadding:{},x:{},y:{},id:{type:Function},color:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:d}){const i=t.inject(x.axisAccessorKey),n=p,a=t.computed(()=>i.data.value??n.data),c=r.useForwardProps(n),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new u.Axis(c.value),(e=o.value)==null||e.setData(a.value),i.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),i.destroy(n.type)}),t.watch(c,(e,l)=>{var s;r.arePropsEqual(e,l)||(s=o.value)==null||s.setConfig(c.value)}),t.watch(a,()=>{var e;(e=o.value)==null||e.setData(a.value)}),d({component:o}),(e,l)=>(t.openBlock(),t.createElementBlock("div",y))}});exports.VisAxisSelectors=k;exports.default=T;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/axis/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Axis, AxisConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { axisAccessorKey } from '../../utils/context'\n\nconst accessor = inject(axisAccessorKey)\n\n// data and required props \ntype Props = AxisConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Axis<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Axis<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy(props.type)\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAxisSelectors = Axis.selectors\n</script>\n\n<template>\n <div data-vis-axis />\n</template>\n\n\n"],"names":["VisAxisSelectors","Axis","accessor","inject","axisAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/axis/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Axis, AxisConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { axisAccessorKey } from '../../utils/context'\n\nconst accessor = inject(axisAccessorKey)\n\n// data and required props \ntype Props = AxisConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Axis<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Axis<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy(props.type)\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAxisSelectors = Axis.selectors\n</script>\n\n<template>\n <div data-vis-axis />\n</template>\n\n\n"],"names":["VisAxisSelectors","Axis","accessor","inject","axisAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"0PAkDaA,EAAmBC,EAAAA,KAAK,g3BA3C/B,MAAAC,EAAWC,SAAOC,iBAAe,EAIjCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAiB,EAGnCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,OAAYQ,EAAO,KAAK,GACpCM,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,OACrBL,EAAA,OAAOS,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACRb,EAAA,QAAQG,EAAM,IAAI,CAAA,CAC5B,EAEKY,EAAAA,MAAAR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,UAAUN,EAAO,MACpC,CACD,EAEDQ,EAAA,MAAMV,EAAM,IAAM,QACNQ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,MAAK,CACpC,EAEYc,EAAA,CACX,UAAAV,CAAA,CACD"}
|
|
@@ -1,19 +1,89 @@
|
|
|
1
|
-
import { Axis
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { Axis } from '@unovis/ts';
|
|
2
|
+
export declare const VisAxisSelectors: typeof import("@unovis/ts/dist/components/axis/style");
|
|
3
|
+
declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
|
|
4
|
+
attrs: any;
|
|
5
|
+
emit: any;
|
|
6
|
+
slots: any;
|
|
7
|
+
}, __VLS_expose?: any, __VLS_setup?: Promise<{
|
|
8
|
+
props: {
|
|
9
|
+
duration?: number;
|
|
10
|
+
events?: {
|
|
11
|
+
[selector: string]: {
|
|
12
|
+
touchstart?: import("@unovis/ts").VisEventCallback<any>;
|
|
13
|
+
touchmove?: import("@unovis/ts").VisEventCallback<any>;
|
|
14
|
+
touchend?: import("@unovis/ts").VisEventCallback<any>;
|
|
15
|
+
mouseover?: import("@unovis/ts").VisEventCallback<any>;
|
|
16
|
+
mousemove?: import("@unovis/ts").VisEventCallback<any>;
|
|
17
|
+
mousedown?: import("@unovis/ts").VisEventCallback<any>;
|
|
18
|
+
mouseup?: import("@unovis/ts").VisEventCallback<any>;
|
|
19
|
+
click?: import("@unovis/ts").VisEventCallback<any>;
|
|
20
|
+
auxclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
21
|
+
contextmenu?: import("@unovis/ts").VisEventCallback<any>;
|
|
22
|
+
dblclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
23
|
+
mouseenter?: import("@unovis/ts").VisEventCallback<any>;
|
|
24
|
+
mouseleave?: import("@unovis/ts").VisEventCallback<any>;
|
|
25
|
+
mouseout?: import("@unovis/ts").VisEventCallback<any>;
|
|
26
|
+
scroll?: import("@unovis/ts").VisEventCallback<any>;
|
|
27
|
+
select?: import("@unovis/ts").VisEventCallback<any>;
|
|
28
|
+
wheel?: import("@unovis/ts").VisEventCallback<any>;
|
|
29
|
+
pointerdown?: import("@unovis/ts").VisEventCallback<any>;
|
|
30
|
+
pointerup?: import("@unovis/ts").VisEventCallback<any>;
|
|
31
|
+
pointerout?: import("@unovis/ts").VisEventCallback<any>;
|
|
32
|
+
pointermove?: import("@unovis/ts").VisEventCallback<any>;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
attributes?: {
|
|
36
|
+
[selector: string]: {
|
|
37
|
+
[attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
|
|
38
|
+
};
|
|
39
|
+
};
|
|
6
40
|
data?: Datum[];
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
41
|
+
x?: import("@unovis/ts").NumericAccessor<Datum>;
|
|
42
|
+
y?: import("@unovis/ts").NumericAccessor<Datum> | import("@unovis/ts").NumericAccessor<Datum>[];
|
|
43
|
+
label?: string;
|
|
44
|
+
color?: string | string[] | ((d: Datum, i: number, ...any: unknown[]) => string) | ((d: Datum[], i: number, ...any: unknown[]) => string);
|
|
45
|
+
id?: (d: Datum, i: number, ...any: any[]) => string;
|
|
46
|
+
xScale?: import("@unovis/ts").ContinuousScale;
|
|
47
|
+
yScale?: import("@unovis/ts").ContinuousScale;
|
|
48
|
+
excludeFromDomainCalculation?: boolean;
|
|
49
|
+
position?: string;
|
|
50
|
+
type?: string;
|
|
51
|
+
fullSize?: boolean;
|
|
52
|
+
labelFontSize?: string;
|
|
53
|
+
labelMargin?: number;
|
|
54
|
+
labelTextFitMode?: string;
|
|
55
|
+
labelTextTrimType?: string;
|
|
56
|
+
labelColor?: string;
|
|
57
|
+
gridLine?: boolean;
|
|
58
|
+
tickLine?: boolean;
|
|
59
|
+
domainLine?: boolean;
|
|
60
|
+
minMaxTicksOnly?: boolean;
|
|
61
|
+
minMaxTicksOnlyShowGridLines?: boolean;
|
|
62
|
+
minMaxTicksOnlyWhenWidthIsLess?: number;
|
|
63
|
+
tickFormat?: (tick: number | Date, i: number, ticks: number[] | Date[]) => string;
|
|
64
|
+
tickValues?: number[];
|
|
65
|
+
numTicks?: number;
|
|
66
|
+
tickTextFitMode?: string;
|
|
67
|
+
tickTextWidth?: number;
|
|
68
|
+
tickTextSeparator?: string | string[];
|
|
69
|
+
tickTextForceWordBreak?: boolean;
|
|
70
|
+
tickTextTrimType?: string;
|
|
71
|
+
tickTextFontSize?: string;
|
|
72
|
+
tickTextAlign?: string;
|
|
73
|
+
tickTextColor?: string;
|
|
74
|
+
tickTextAngle?: number;
|
|
75
|
+
tickTextHideOverlapping?: boolean;
|
|
76
|
+
tickPadding?: number;
|
|
77
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
78
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
79
|
+
component: import("vue").Ref<Axis<Datum>, Axis<Datum>>;
|
|
10
80
|
}>): void;
|
|
11
81
|
attrs: any;
|
|
12
|
-
slots:
|
|
13
|
-
emit:
|
|
14
|
-
}>) => import(
|
|
82
|
+
slots: {};
|
|
83
|
+
emit: any;
|
|
84
|
+
}>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
15
85
|
[key: string]: any;
|
|
16
86
|
}> & {
|
|
17
|
-
__ctx?:
|
|
87
|
+
__ctx?: any;
|
|
18
88
|
};
|
|
19
89
|
export default _default;
|
package/components/axis/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as d, inject as
|
|
2
|
-
import { Axis as
|
|
3
|
-
import { useForwardProps as
|
|
1
|
+
import { defineComponent as d, inject as x, computed as m, ref as y, onMounted as k, nextTick as T, onUnmounted as v, watch as s, createElementBlock as f, openBlock as B } from "vue";
|
|
2
|
+
import { Axis as r } from "@unovis/ts";
|
|
3
|
+
import { useForwardProps as F, arePropsEqual as b } from "../../utils/props.js";
|
|
4
4
|
import { axisAccessorKey as g } from "../../utils/context.js";
|
|
5
|
-
const S = { "data-vis-axis": "" },
|
|
5
|
+
const S = { "data-vis-axis": "" }, A = r.selectors, C = /* @__PURE__ */ d({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
position: {},
|
|
@@ -34,10 +34,10 @@ const S = { "data-vis-axis": "" }, O = s.selectors, C = /* @__PURE__ */ d({
|
|
|
34
34
|
tickTextAngle: {},
|
|
35
35
|
tickTextHideOverlapping: { type: Boolean },
|
|
36
36
|
tickPadding: {},
|
|
37
|
-
x: {
|
|
38
|
-
y: {
|
|
37
|
+
x: {},
|
|
38
|
+
y: {},
|
|
39
39
|
id: { type: Function },
|
|
40
|
-
color: {
|
|
40
|
+
color: {},
|
|
41
41
|
xScale: { type: [Object, Function] },
|
|
42
42
|
yScale: { type: [Object, Function] },
|
|
43
43
|
excludeFromDomainCalculation: { type: Boolean },
|
|
@@ -47,28 +47,28 @@ const S = { "data-vis-axis": "" }, O = s.selectors, C = /* @__PURE__ */ d({
|
|
|
47
47
|
data: {}
|
|
48
48
|
},
|
|
49
49
|
setup(p, { expose: u }) {
|
|
50
|
-
const o =
|
|
50
|
+
const o = x(g), a = p, i = m(() => o.data.value ?? a.data), n = F(a), t = y();
|
|
51
51
|
return k(() => {
|
|
52
52
|
T(() => {
|
|
53
53
|
var e;
|
|
54
|
-
t.value = new
|
|
54
|
+
t.value = new r(n.value), (e = t.value) == null || e.setData(i.value), o.update(t.value);
|
|
55
55
|
});
|
|
56
56
|
}), v(() => {
|
|
57
57
|
var e;
|
|
58
|
-
(e = t.value) == null || e.destroy(), o.destroy(
|
|
59
|
-
}),
|
|
60
|
-
var
|
|
61
|
-
b(e,
|
|
62
|
-
}),
|
|
58
|
+
(e = t.value) == null || e.destroy(), o.destroy(a.type);
|
|
59
|
+
}), s(n, (e, c) => {
|
|
60
|
+
var l;
|
|
61
|
+
b(e, c) || (l = t.value) == null || l.setConfig(n.value);
|
|
62
|
+
}), s(i, () => {
|
|
63
63
|
var e;
|
|
64
64
|
(e = t.value) == null || e.setData(i.value);
|
|
65
65
|
}), u({
|
|
66
66
|
component: t
|
|
67
|
-
}), (e,
|
|
67
|
+
}), (e, c) => (B(), f("div", S));
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
70
|
export {
|
|
71
|
-
|
|
71
|
+
A as VisAxisSelectors,
|
|
72
72
|
C as default
|
|
73
73
|
};
|
|
74
74
|
//# sourceMappingURL=index.js.map
|