@unovis/vue 1.7.0-pre.1 → 1.7.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/README.md +4 -0
- package/components/annotations/index.cjs +1 -1
- package/components/annotations/index.cjs.map +1 -1
- package/components/annotations/index.d.ts +18 -100
- package/components/annotations/index.js +18 -20
- 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 +12 -64
- package/components/area/index.js +31 -32
- 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 +12 -82
- package/components/axis/index.js +29 -28
- package/components/axis/index.js.map +1 -1
- package/components/boxplot/index.cjs +2 -0
- package/components/boxplot/index.cjs.map +1 -0
- package/components/boxplot/index.d.ts +19 -0
- package/components/boxplot/index.js +31 -0
- package/components/boxplot/index.js.map +1 -0
- package/components/boxplot/index2.cjs +2 -0
- package/components/boxplot/index2.cjs.map +1 -0
- package/components/boxplot/index2.js +7 -0
- package/components/boxplot/index2.js.map +1 -0
- package/components/brush/index.cjs +1 -1
- package/components/brush/index.cjs.map +1 -1
- package/components/brush/index.d.ts +12 -62
- package/components/brush/index.js +26 -28
- 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 +12 -60
- package/components/chord-diagram/index.js +30 -32
- package/components/chord-diagram/index.js.map +1 -1
- package/components/crosshair/index.cjs +1 -1
- package/components/crosshair/index.cjs.map +1 -1
- package/components/crosshair/index.d.ts +12 -66
- package/components/crosshair/index.js +20 -24
- 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 +12 -64
- package/components/donut/index.js +24 -26
- 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 +12 -62
- package/components/free-brush/index.js +25 -28
- 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 +11 -135
- package/components/graph/index.js +70 -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 +12 -62
- package/components/grouped-bar/index.js +27 -28
- package/components/grouped-bar/index.js.map +1 -1
- package/components/heatmap/index.cjs +2 -0
- package/components/heatmap/index.cjs.map +1 -0
- package/components/heatmap/index.d.ts +19 -0
- package/components/heatmap/index.js +49 -0
- package/components/heatmap/index.js.map +1 -0
- package/components/heatmap/index2.cjs +2 -0
- package/components/heatmap/index2.cjs.map +1 -0
- package/components/heatmap/index2.js +7 -0
- package/components/heatmap/index2.js.map +1 -0
- package/components/line/index.cjs +1 -1
- package/components/line/index.cjs.map +1 -1
- package/components/line/index.d.ts +12 -60
- package/components/line/index.js +28 -30
- 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 +12 -65
- package/components/nested-donut/index.js +26 -29
- 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 +12 -63
- package/components/plotband/index.js +17 -18
- 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 +12 -64
- package/components/plotline/index.js +18 -19
- package/components/plotline/index.js.map +1 -1
- package/components/radial-bar/index.cjs +2 -0
- package/components/radial-bar/index.cjs.map +1 -0
- package/components/radial-bar/index.d.ts +19 -0
- package/components/radial-bar/index.js +54 -0
- package/components/radial-bar/index.js.map +1 -0
- package/components/radial-bar/index2.cjs +2 -0
- package/components/radial-bar/index2.cjs.map +1 -0
- package/components/radial-bar/index2.js +7 -0
- package/components/radial-bar/index2.js.map +1 -0
- package/components/sankey/index.cjs +1 -1
- package/components/sankey/index.cjs.map +1 -1
- package/components/sankey/index.d.ts +12 -106
- package/components/sankey/index.js +42 -41
- 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 +12 -65
- package/components/scatter/index.js +33 -35
- 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 +12 -62
- package/components/stacked-bar/index.js +29 -29
- package/components/stacked-bar/index.js.map +1 -1
- package/components/timeline/index.cjs +1 -1
- package/components/timeline/index.cjs.map +1 -1
- package/components/timeline/index.d.ts +12 -88
- package/components/timeline/index.js +20 -24
- package/components/timeline/index.js.map +1 -1
- package/components/tooltip/index.cjs +1 -1
- package/components/tooltip/index.cjs.map +1 -1
- package/components/tooltip/index.d.ts +19 -99
- package/components/tooltip/index.js +15 -17
- 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 +12 -78
- package/components/topojson-map/index.js +66 -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 +12 -69
- package/components/treemap/index.js +25 -26
- 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 +12 -66
- package/components/xy-labels/index.js +36 -39
- package/components/xy-labels/index.js.map +1 -1
- package/components.d.ts +30 -27
- package/containers/single-container/index.cjs +1 -1
- package/containers/single-container/index.cjs.map +1 -1
- package/containers/single-container/index.d.ts +11 -26
- package/containers/single-container/index.js +26 -26
- package/containers/single-container/index.js.map +1 -1
- package/containers/xy-container/index.cjs +1 -1
- package/containers/xy-container/index.cjs.map +1 -1
- package/containers/xy-container/index.d.ts +12 -45
- package/containers/xy-container/index.js +25 -30
- 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 +18 -74
- package/html-components/bullet-legend/index.js +24 -25
- package/html-components/bullet-legend/index.js.map +1 -1
- package/html-components/flow-legend/index.cjs +1 -1
- package/html-components/flow-legend/index.cjs.map +1 -1
- package/html-components/flow-legend/index.d.ts +19 -85
- package/html-components/flow-legend/index.js +21 -23
- package/html-components/flow-legend/index.js.map +1 -1
- 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 +12 -112
- package/html-components/leaflet-flow-map/index.js +46 -48
- 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 +12 -99
- package/html-components/leaflet-map/index.js +37 -39
- package/html-components/leaflet-map/index.js.map +1 -1
- package/html-components/rolling-pin-legend/index.cjs +1 -1
- package/html-components/rolling-pin-legend/index.cjs.map +1 -1
- package/html-components/rolling-pin-legend/index.d.ts +18 -50
- package/html-components/rolling-pin-legend/index.js +22 -24
- package/html-components/rolling-pin-legend/index.js.map +1 -1
- package/index.cjs +2 -2
- package/index.js +101 -92
- package/index.js.map +1 -1
- package/package.json +14 -13
- package/utils/context.cjs.map +1 -1
- package/utils/context.d.ts +1 -0
- package/utils/context.js +1 -1
- package/utils/context.js.map +1 -1
- package/utils/props.cjs +1 -1
- package/utils/props.cjs.map +1 -1
- package/utils/props.d.ts +2 -4
- package/utils/props.js +9 -9
- package/utils/props.js.map +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|

|
|
2
2
|
|
|
3
|
+
<a href="https://npmx.dev/package/@unovis/vue"><img src="https://npmx.dev/api/registry/badge/version/@unovis/vue" alt="Version"></a>
|
|
4
|
+
<a href="https://npmx.dev/package/@unovis/vue"><img src="https://npmx.dev/api/registry/badge/downloads/@unovis/vue" alt="Downloads"></a>
|
|
5
|
+
<a href="https://github.com/f5/unovis/blob/main/LICENSE"><img src="https://img.shields.io/github/license/f5/unovis" alt="License"></a>
|
|
6
|
+
|
|
3
7
|
🟨 **Unovis** is a modular data visualization framework for React, Angular, Svelte, Vue and vanilla TypeScript or JavaScript.
|
|
4
8
|
|
|
5
9
|
`@unovis/vue` provides Vue components for `@unovis/ts`, which makes Unovis integration into a Vue
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("@unovis/ts"),d=require("../../utils/context.cjs"),a=require("../../utils/props.cjs"),p={"data-vis-annotations":""},v=c.Annotations.selectors,_=e.defineComponent({__name:"index",props:{items:{},renderTextBoundingBoxes:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(i,{expose:u}){const l=i,n=e.inject(d.annotationsAccessorKey),o=a.useForwardProps(l),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new c.Annotations(o.value),n.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),n.destroy()}),e.watch(o,(s,r)=>{a.arePropsEqual(s,r)||(t.value?.setConfig(o.value),t.value?.render())}),u({component:t}),(s,r)=>(e.openBlock(),e.createElementBlock("div",p))}});exports.VisAnnotationsSelectors=v;exports.default=_;
|
|
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\"
|
|
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 type { AnnotationsConfigInterface } from '@unovis/ts'\nimport { Annotations } from '@unovis/ts'\nimport { inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { annotationsAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: null }>()\n\nconst accessor = inject(annotationsAccessorKey)\n\n// data and required props\ntype Props = AnnotationsConfigInterface\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Annotations>()\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 component.value?.render()\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"],"names":["VisAnnotationsSelectors","Annotations","props","__props","accessor","inject","annotationsAccessorKey","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"iQA8CaA,EAA0BC,EAAAA,YAAY,sKAtCnD,MAAMC,EAAQC,EAERC,EAAWC,EAAAA,OAAOC,wBAAsB,EAKxCC,EAASC,EAAAA,gBAAgBN,CAAK,EAG9BO,EAAYC,EAAAA,IAAA,EAElBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIR,cAAYM,EAAO,KAAK,EAE9CH,EAAS,OAAOK,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBL,EAAS,QAAA,CACX,CAAC,EAEDU,EAAAA,MAAMP,EAAQ,CAACQ,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAEDS,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAA4B,MAA5BC,CAA4B"}
|
|
@@ -1,102 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
type: import(
|
|
16
|
-
|
|
17
|
-
|
|
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[]>;
|
|
1
|
+
import { AnnotationsConfigInterface, Annotations } from '@unovis/ts';
|
|
2
|
+
|
|
3
|
+
export declare const VisAnnotationsSelectors: typeof import("@unovis/ts/components/annotations/style");
|
|
4
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<AnnotationsConfigInterface & {
|
|
5
|
+
data?: null;
|
|
6
|
+
}>>, {
|
|
7
|
+
component: import('vue').Ref<Annotations, Annotations>;
|
|
8
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<AnnotationsConfigInterface & {
|
|
9
|
+
data?: null;
|
|
10
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
13
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
14
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
15
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
16
|
+
} : {
|
|
17
|
+
type: import('vue').PropType<T[K]>;
|
|
56
18
|
required: true;
|
|
57
19
|
};
|
|
58
|
-
|
|
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;
|
|
20
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Annotations as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
const h = { "data-vis-annotations": "" },
|
|
1
|
+
import { defineComponent as u, inject as p, ref as d, onMounted as l, nextTick as m, onUnmounted as f, watch as v, openBlock as _, createElementBlock as x } from "vue";
|
|
2
|
+
import { Annotations as r } from "@unovis/ts";
|
|
3
|
+
import { annotationsAccessorKey as B } from "../../utils/context.js";
|
|
4
|
+
import { useForwardProps as y, arePropsEqual as g } from "../../utils/props.js";
|
|
5
|
+
const h = { "data-vis-annotations": "" }, E = r.selectors, P = /* @__PURE__ */ u({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
items: {},
|
|
@@ -12,25 +12,23 @@ const h = { "data-vis-annotations": "" }, P = a.selectors, T = /* @__PURE__ */ p
|
|
|
12
12
|
attributes: {},
|
|
13
13
|
data: {}
|
|
14
14
|
},
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
setup(a, { expose: c }) {
|
|
16
|
+
const i = a, t = p(B), o = y(i), e = d();
|
|
17
|
+
return l(() => {
|
|
18
|
+
m(() => {
|
|
19
|
+
e.value = new r(o.value), t.update(e.value);
|
|
20
20
|
});
|
|
21
21
|
}), f(() => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}),
|
|
28
|
-
component: o
|
|
29
|
-
}), (e, s) => (x(), _("div", h));
|
|
22
|
+
e.value?.destroy(), t.destroy();
|
|
23
|
+
}), v(o, (n, s) => {
|
|
24
|
+
g(n, s) || (e.value?.setConfig(o.value), e.value?.render());
|
|
25
|
+
}), c({
|
|
26
|
+
component: e
|
|
27
|
+
}), (n, s) => (_(), x("div", h));
|
|
30
28
|
}
|
|
31
29
|
});
|
|
32
30
|
export {
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
E as VisAnnotationsSelectors,
|
|
32
|
+
P as default
|
|
35
33
|
};
|
|
36
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/annotations/index.vue"],"sourcesContent":["<script setup lang=\"ts\"
|
|
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 type { AnnotationsConfigInterface } from '@unovis/ts'\nimport { Annotations } from '@unovis/ts'\nimport { inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { annotationsAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: null }>()\n\nconst accessor = inject(annotationsAccessorKey)\n\n// data and required props\ntype Props = AnnotationsConfigInterface\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Annotations>()\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 component.value?.render()\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"],"names":["VisAnnotationsSelectors","Annotations","props","__props","accessor","inject","annotationsAccessorKey","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;0CA8CaA,IAA0BC,EAAY;;;;;;;;;;;AAtCnD,UAAMC,IAAQC,GAERC,IAAWC,EAAOC,CAAsB,GAKxCC,IAASC,EAAgBN,CAAK,GAG9BO,IAAYC,EAAA;AAElB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIR,EAAYM,EAAO,KAAK,GAE9CH,EAAS,OAAOK,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBL,EAAS,QAAA;AAAA,IACX,CAAC,GAEDU,EAAMP,GAAQ,CAACQ,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDS,EAAa;AAAA,MACX,WAAAT;AAAA,IAAA,CACD,cAQCU,EAAA,GAAAC,EAA4B,OAA5BC,CAA4B;AAAA;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@unovis/ts"),y=require("../../utils/context.cjs"),l=require("../../utils/props.cjs"),d={"data-vis-component":""},v=i.Area.selectors,m=e.defineComponent({__name:"index",props:{color:{type:[Function,String,Array,null]},pattern:{type:[Function,null]},curveType:{},baseline:{type:[Function,Number,null]},opacity:{type:[Function,Number,null]},cursor:{type:[Function,String,null]},line:{type:Boolean},lineColor:{type:[Function,String,Array,null]},lineWidth:{},lineDashArray:{type:[Function,Array,null]},linePattern:{type:[Function,null]},minHeight1Px:{type:Boolean},minHeight:{},stackMinHeight:{type:Boolean},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},colorKeys:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(s,{expose:p}){const a=s,n=e.inject(y.componentAccessorKey),o=e.computed(()=>n.data.value??a.data),r=l.useForwardProps(a),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new i.Area(r.value),t.value?.setData(o.value),n.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),n.destroy()}),e.watch(r,(u,c)=>{l.arePropsEqual(u,c)||(t.value?.setConfig(r.value),t.value?.render())}),e.watch(o,()=>{t.value?.setData(o.value)}),p({component:t}),(u,c)=>(e.openBlock(),e.createElementBlock("div",d))}});exports.VisAreaSelectors=v;exports.default=m;
|
|
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 {
|
|
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 type { AreaConfigInterface } from '@unovis/ts'\nimport { Area } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = AreaConfigInterface<Datum>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Area<Datum>>()\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 component.value?.render()\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"],"names":["VisAreaSelectors","Area","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAmDaA,EAAmBC,EAAAA,KAAK,ovBA3CrC,MAAMC,EAAQC,EAERC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAOC,EAAAA,SAAS,IAAMJ,EAAS,KAAK,OAASF,EAAM,IAAI,EAEvDO,EAASC,EAAAA,gBAAgBR,CAAK,EAG9BS,EAAYC,EAAAA,IAAA,EAElBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIV,OAAYQ,EAAO,KAAK,EAC9CE,EAAU,OAAO,QAAQJ,EAAK,KAAK,EACnCH,EAAS,OAAOO,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBP,EAAS,QAAA,CACX,CAAC,EAEDY,EAAAA,MAAMP,EAAQ,CAACQ,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAEDK,EAAAA,MAAMT,EAAM,IAAM,CAChBI,EAAU,OAAO,QAAQJ,EAAK,KAAK,CACrC,CAAC,EAEDa,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
|
|
@@ -1,71 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
};
|
|
1
|
+
import { AreaConfigInterface, Area } from '@unovis/ts';
|
|
2
|
+
|
|
3
|
+
export declare const VisAreaSelectors: typeof import("@unovis/ts/components/area/style");
|
|
4
|
+
declare const _default: <Datum>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & (AreaConfigInterface<Datum> & {
|
|
40
6
|
data?: Datum[];
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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>>;
|
|
7
|
+
}), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
|
|
8
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
9
|
+
component: import('vue').Ref<Area<Datum>, Area<Datum>>;
|
|
62
10
|
}>): void;
|
|
63
11
|
attrs: any;
|
|
64
|
-
slots: {}
|
|
65
|
-
emit:
|
|
66
|
-
}>) => import(
|
|
12
|
+
slots: ReturnType<() => {}>;
|
|
13
|
+
emit: typeof __VLS_emit;
|
|
14
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
67
15
|
[key: string]: any;
|
|
68
16
|
}> & {
|
|
69
|
-
__ctx?:
|
|
17
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
70
18
|
};
|
|
71
19
|
export default _default;
|
package/components/area/index.js
CHANGED
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Area as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as s, inject as y, computed as m, ref as d, onMounted as v, nextTick as F, onUnmounted as f, watch as u, openBlock as x, createElementBlock as b } from "vue";
|
|
2
|
+
import { Area as c } from "@unovis/ts";
|
|
3
|
+
import { componentAccessorKey as g } from "../../utils/context.js";
|
|
4
|
+
import { useForwardProps as h, arePropsEqual as A } from "../../utils/props.js";
|
|
5
|
+
const _ = { "data-vis-component": "" }, D = c.selectors, N = /* @__PURE__ */ s({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
|
-
color: {},
|
|
8
|
+
color: { type: [Function, String, Array, null] },
|
|
9
|
+
pattern: { type: [Function, null] },
|
|
9
10
|
curveType: {},
|
|
10
|
-
baseline: {},
|
|
11
|
-
opacity: {},
|
|
12
|
-
cursor: {},
|
|
11
|
+
baseline: { type: [Function, Number, null] },
|
|
12
|
+
opacity: { type: [Function, Number, null] },
|
|
13
|
+
cursor: { type: [Function, String, null] },
|
|
13
14
|
line: { type: Boolean },
|
|
14
|
-
lineColor: {},
|
|
15
|
+
lineColor: { type: [Function, String, Array, null] },
|
|
15
16
|
lineWidth: {},
|
|
16
|
-
lineDashArray: {},
|
|
17
|
+
lineDashArray: { type: [Function, Array, null] },
|
|
18
|
+
linePattern: { type: [Function, null] },
|
|
17
19
|
minHeight1Px: { type: Boolean },
|
|
18
20
|
minHeight: {},
|
|
19
21
|
stackMinHeight: { type: Boolean },
|
|
20
|
-
x: {},
|
|
21
|
-
y: {},
|
|
22
|
+
x: { type: [Function, Number, null] },
|
|
23
|
+
y: { type: [Function, Number, null, Array] },
|
|
22
24
|
id: { type: Function },
|
|
25
|
+
colorKeys: {},
|
|
23
26
|
xScale: { type: [Object, Function] },
|
|
24
27
|
yScale: { type: [Object, Function] },
|
|
25
28
|
excludeFromDomainCalculation: { type: Boolean },
|
|
@@ -28,29 +31,25 @@ const k = { "data-vis-component": "" }, w = l.selectors, H = /* @__PURE__ */ d({
|
|
|
28
31
|
attributes: {},
|
|
29
32
|
data: {}
|
|
30
33
|
},
|
|
31
|
-
setup(
|
|
32
|
-
const
|
|
33
|
-
return
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
t.value = new l(a.value), (e = t.value) == null || e.setData(n.value), o.update(t.value);
|
|
34
|
+
setup(i, { expose: p }) {
|
|
35
|
+
const a = i, t = y(g), n = m(() => t.data.value ?? a.data), o = h(a), e = d();
|
|
36
|
+
return v(() => {
|
|
37
|
+
F(() => {
|
|
38
|
+
e.value = new c(o.value), e.value?.setData(n.value), t.update(e.value);
|
|
37
39
|
});
|
|
38
|
-
}),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}), i(n, () => {
|
|
45
|
-
var e;
|
|
46
|
-
(e = t.value) == null || e.setData(n.value);
|
|
40
|
+
}), f(() => {
|
|
41
|
+
e.value?.destroy(), t.destroy();
|
|
42
|
+
}), u(o, (r, l) => {
|
|
43
|
+
A(r, l) || (e.value?.setConfig(o.value), e.value?.render());
|
|
44
|
+
}), u(n, () => {
|
|
45
|
+
e.value?.setData(n.value);
|
|
47
46
|
}), p({
|
|
48
|
-
component:
|
|
49
|
-
}), (
|
|
47
|
+
component: e
|
|
48
|
+
}), (r, l) => (x(), b("div", _));
|
|
50
49
|
}
|
|
51
50
|
});
|
|
52
51
|
export {
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
D as VisAreaSelectors,
|
|
53
|
+
N as default
|
|
55
54
|
};
|
|
56
55
|
//# 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 {
|
|
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 type { AreaConfigInterface } from '@unovis/ts'\nimport { Area } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = AreaConfigInterface<Datum>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Area<Datum>>()\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 component.value?.render()\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"],"names":["VisAreaSelectors","Area","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAmDaA,IAAmBC,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CrC,UAAMC,IAAQC,GAERC,IAAWC,EAAOC,CAAoB,GAItCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,SAASF,EAAM,IAAI,GAEvDO,IAASC,EAAgBR,CAAK,GAG9BS,IAAYC,EAAA;AAElB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAYQ,EAAO,KAAK,GAC9CE,EAAU,OAAO,QAAQJ,EAAK,KAAK,GACnCH,EAAS,OAAOO,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBP,EAAS,QAAA;AAAA,IACX,CAAC,GAEDY,EAAMP,GAAQ,CAACQ,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDK,EAAMT,GAAM,MAAM;AAChB,MAAAI,EAAU,OAAO,QAAQJ,EAAK,KAAK;AAAA,IACrC,CAAC,GAEDa,EAAa;AAAA,MACX,WAAAT;AAAA,IAAA,CACD,cAQCU,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("@unovis/ts"),d=require("../../utils/context.cjs"),r=require("../../utils/props.cjs"),y={"data-vis-axis":""},x=s.Axis.selectors,k=e.defineComponent({__name:"index",props:{position:{},type:{},fullSize:{type:Boolean},label:{},labelFontSize:{},labelMargin:{},labelTextFitMode:{},labelTextTrimType:{},labelTextSeparator:{},labelColor:{},gridLine:{type:Boolean},tickLine:{type:Boolean},domainLine:{type:Boolean},minMaxTicksOnly:{type:Boolean},minMaxTicksOnlyShowGridLines:{type:Boolean},minMaxTicksOnlyWhenWidthIsLess:{},tickFormat:{type:Function},tickValues:{},numTicks:{},tickSpacing:{},tickTextFitMode:{},tickTextWidth:{},tickTextSeparator:{},tickTextForceWordBreak:{type:Boolean},tickTextTrimType:{},tickTextFontSize:{},tickTextAlign:{type:[String,Function]},tickTextColor:{},tickTextAngle:{},tickTextAdaptiveSets:{type:Boolean},tickTextHideOverlapping:{type:Boolean},tickPadding:{},tickSize:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},colorKeys:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(u,{expose:p}){const o=u,n=e.inject(d.axisAccessorKey),i=e.computed(()=>n.data.value??o.data),a=r.useForwardProps(o),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new s.Axis(a.value),t.value?.setData(i.value),n.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),n.destroy(o.type)}),e.watch(a,(c,l)=>{r.arePropsEqual(c,l)||(t.value?.setConfig(a.value),t.value?.render())}),e.watch(i,()=>{t.value?.setData(i.value)}),p({component:t}),(c,l)=>(e.openBlock(),e.createElementBlock("div",y))}});exports.VisAxisSelectors=x;exports.default=k;
|
|
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 {
|
|
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 type { AxisConfigInterface } from '@unovis/ts'\nimport { Axis } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { axisAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst accessor = inject(axisAccessorKey)\n\n// data and required props\ntype Props = AxisConfigInterface<Datum>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Axis<Datum>>()\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 component.value?.render()\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"],"names":["VisAxisSelectors","Axis","props","__props","accessor","inject","axisAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"0PAmDaA,EAAmBC,EAAAA,KAAK,qkCA3CrC,MAAMC,EAAQC,EAERC,EAAWC,EAAAA,OAAOC,iBAAe,EAIjCC,EAAOC,EAAAA,SAAS,IAAMJ,EAAS,KAAK,OAASF,EAAM,IAAI,EAEvDO,EAASC,EAAAA,gBAAgBR,CAAK,EAG9BS,EAAYC,EAAAA,IAAA,EAElBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIV,OAAYQ,EAAO,KAAK,EAC9CE,EAAU,OAAO,QAAQJ,EAAK,KAAK,EACnCH,EAAS,OAAOO,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBP,EAAS,QAAQF,EAAM,IAAI,CAC7B,CAAC,EAEDc,EAAAA,MAAMP,EAAQ,CAACQ,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAEDK,EAAAA,MAAMT,EAAM,IAAM,CAChBI,EAAU,OAAO,QAAQJ,EAAK,KAAK,CACrC,CAAC,EAEDa,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAAqB,MAArBC,CAAqB"}
|
|
@@ -1,89 +1,19 @@
|
|
|
1
|
-
import { Axis } from '@unovis/ts';
|
|
2
|
-
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
};
|
|
1
|
+
import { AxisConfigInterface, Axis } from '@unovis/ts';
|
|
2
|
+
|
|
3
|
+
export declare const VisAxisSelectors: typeof import("@unovis/ts/components/axis/style");
|
|
4
|
+
declare const _default: <Datum>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & (AxisConfigInterface<Datum> & {
|
|
40
6
|
data?: Datum[];
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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>>;
|
|
7
|
+
}), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
|
|
8
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
9
|
+
component: import('vue').Ref<Axis<Datum>, Axis<Datum>>;
|
|
80
10
|
}>): void;
|
|
81
11
|
attrs: any;
|
|
82
|
-
slots: {}
|
|
83
|
-
emit:
|
|
84
|
-
}>) => import(
|
|
12
|
+
slots: ReturnType<() => {}>;
|
|
13
|
+
emit: typeof __VLS_emit;
|
|
14
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
85
15
|
[key: string]: any;
|
|
86
16
|
}> & {
|
|
87
|
-
__ctx?:
|
|
17
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
88
18
|
};
|
|
89
19
|
export default _default;
|