@unovis/vue 1.6.2 → 1.6.4
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.map +1 -1
- package/components/annotations/index.d.ts +18 -94
- 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 -59
- package/components/area/index.js +25 -25
- 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 +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 +12 -62
- 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 +12 -60
- 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 +12 -66
- 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 +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 +12 -62
- 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 +10 -134
- 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 +12 -62
- 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 +12 -60
- 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 +12 -65
- 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 +12 -63
- 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 +12 -64
- 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 +12 -95
- package/components/sankey/index.js +35 -35
- 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 +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 +12 -62
- 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 +12 -88
- package/components/timeline/index.js.map +1 -1
- package/components/tooltip/index.cjs.map +1 -1
- package/components/tooltip/index.d.ts +19 -99
- 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 +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 +12 -69
- 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 +12 -66
- 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 +11 -25
- 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 +12 -44
- 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 +12 -12
- 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 +20 -0
- package/html-components/flow-legend/index.js +44 -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 +12 -112
- 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 +12 -99
- 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 +18 -50
- 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 +6 -4
- package/utils/context.cjs.map +1 -1
- package/utils/context.d.ts +1 -0
- package/utils/context.js.map +1 -1
- package/utils/props.cjs.map +1 -1
- package/utils/props.d.ts +2 -1
- package/utils/props.js.map +1 -1
|
@@ -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"],"mappings":"iQA+CaA,EAA0BC,EAAAA,YAAY,+
|
|
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","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"iQA+CaA,EAA0BC,EAAAA,YAAY,+HAxCnD,MAAMC,EAAWC,EAAAA,OAAOC,wBAAsB,EAIxCC,EAAQC,EAIRC,EAASC,EAAAA,gBAAgBH,CAAK,EAG9BI,EAAYC,EAAAA,IAAA,EAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIR,cAAYM,EAAO,KAAK,EAE9CL,EAAS,OAAOO,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,QAChBC,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UACjBZ,EAAS,QAAA,CACX,CAAC,EAEDa,EAAAA,MAAMR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BH,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UAAUP,EAAO,MAEtC,CAAC,EAGDY,EAAa,CACX,UAAAV,CAAA,CACD,UAQCW,YAAA,EAAAC,qBAA4B,MAA5BC,CAA4B"}
|
|
@@ -1,96 +1,20 @@
|
|
|
1
|
-
import { Annotations,
|
|
2
|
-
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
mousemove?: import("@unovis/ts").VisEventCallback<any>;
|
|
19
|
-
mousedown?: import("@unovis/ts").VisEventCallback<any>;
|
|
20
|
-
mouseup?: import("@unovis/ts").VisEventCallback<any>;
|
|
21
|
-
click?: import("@unovis/ts").VisEventCallback<any>;
|
|
22
|
-
auxclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
23
|
-
contextmenu?: import("@unovis/ts").VisEventCallback<any>;
|
|
24
|
-
dblclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
25
|
-
mouseenter?: import("@unovis/ts").VisEventCallback<any>;
|
|
26
|
-
mouseleave?: import("@unovis/ts").VisEventCallback<any>;
|
|
27
|
-
mouseout?: import("@unovis/ts").VisEventCallback<any>;
|
|
28
|
-
scroll?: import("@unovis/ts").VisEventCallback<any>;
|
|
29
|
-
select?: import("@unovis/ts").VisEventCallback<any>;
|
|
30
|
-
wheel?: import("@unovis/ts").VisEventCallback<any>;
|
|
31
|
-
pointerdown?: import("@unovis/ts").VisEventCallback<any>;
|
|
32
|
-
pointerup?: import("@unovis/ts").VisEventCallback<any>;
|
|
33
|
-
pointerout?: import("@unovis/ts").VisEventCallback<any>;
|
|
34
|
-
pointermove?: import("@unovis/ts").VisEventCallback<any>;
|
|
35
|
-
};
|
|
36
|
-
}>;
|
|
37
|
-
};
|
|
38
|
-
attributes: {
|
|
39
|
-
type: import("vue").PropType<{
|
|
40
|
-
[selector: string]: {
|
|
41
|
-
[attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
|
|
42
|
-
};
|
|
43
|
-
}>;
|
|
44
|
-
};
|
|
45
|
-
data: {
|
|
46
|
-
type: import("vue").PropType<never>;
|
|
47
|
-
};
|
|
48
|
-
}>, {
|
|
49
|
-
component: import("vue").Ref<Annotations, Annotations>;
|
|
50
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
51
|
-
items: {
|
|
52
|
-
type: import("vue").PropType<AnnotationItem[]>;
|
|
1
|
+
import { Annotations, AnnotationsConfigInterface } 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]>;
|
|
53
18
|
required: true;
|
|
54
19
|
};
|
|
55
|
-
|
|
56
|
-
type: import("vue").PropType<number>;
|
|
57
|
-
};
|
|
58
|
-
events: {
|
|
59
|
-
type: import("vue").PropType<{
|
|
60
|
-
[selector: string]: {
|
|
61
|
-
touchstart?: import("@unovis/ts").VisEventCallback<any>;
|
|
62
|
-
touchmove?: import("@unovis/ts").VisEventCallback<any>;
|
|
63
|
-
touchend?: import("@unovis/ts").VisEventCallback<any>;
|
|
64
|
-
mouseover?: import("@unovis/ts").VisEventCallback<any>;
|
|
65
|
-
mousemove?: import("@unovis/ts").VisEventCallback<any>;
|
|
66
|
-
mousedown?: import("@unovis/ts").VisEventCallback<any>;
|
|
67
|
-
mouseup?: import("@unovis/ts").VisEventCallback<any>;
|
|
68
|
-
click?: import("@unovis/ts").VisEventCallback<any>;
|
|
69
|
-
auxclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
70
|
-
contextmenu?: import("@unovis/ts").VisEventCallback<any>;
|
|
71
|
-
dblclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
72
|
-
mouseenter?: import("@unovis/ts").VisEventCallback<any>;
|
|
73
|
-
mouseleave?: import("@unovis/ts").VisEventCallback<any>;
|
|
74
|
-
mouseout?: import("@unovis/ts").VisEventCallback<any>;
|
|
75
|
-
scroll?: import("@unovis/ts").VisEventCallback<any>;
|
|
76
|
-
select?: import("@unovis/ts").VisEventCallback<any>;
|
|
77
|
-
wheel?: import("@unovis/ts").VisEventCallback<any>;
|
|
78
|
-
pointerdown?: import("@unovis/ts").VisEventCallback<any>;
|
|
79
|
-
pointerup?: import("@unovis/ts").VisEventCallback<any>;
|
|
80
|
-
pointerout?: import("@unovis/ts").VisEventCallback<any>;
|
|
81
|
-
pointermove?: import("@unovis/ts").VisEventCallback<any>;
|
|
82
|
-
};
|
|
83
|
-
}>;
|
|
84
|
-
};
|
|
85
|
-
attributes: {
|
|
86
|
-
type: import("vue").PropType<{
|
|
87
|
-
[selector: string]: {
|
|
88
|
-
[attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
|
|
89
|
-
};
|
|
90
|
-
}>;
|
|
91
|
-
};
|
|
92
|
-
data: {
|
|
93
|
-
type: import("vue").PropType<never>;
|
|
94
|
-
};
|
|
95
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
96
|
-
export default _default;
|
|
20
|
+
};
|
|
@@ -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"],"mappings":";;;;0CA+CaA,IAA0BC,EAAY;;;;;;;;;;
|
|
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","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;0CA+CaA,IAA0BC,EAAY;;;;;;;;;;AAxCnD,UAAMC,IAAWC,EAAOC,CAAsB,GAQxCC,IAASC,EAJDC,CAIsB,GAG9BC,IAAYC,EAAA;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIP,EAAYI,EAAO,KAAK,GAE9CH,EAAS,OAAOM,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;;AAChB,OAAAC,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACjBX,EAAS,QAAA;AAAA,IACX,CAAC,GAEDY,EAAMT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BH,IAAAL,EAAU,UAAV,QAAAK,EAAiB,UAAUR,EAAO;AAAA,IAEtC,CAAC,GAGDa,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,cAQCW,EAAA,GAAAC,EAA4B,OAA5BC,CAA4B;AAAA;;"}
|
|
@@ -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"),i=require("@unovis/ts"),l=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),m={"data-vis-component":""},v=i.Area.selectors,F=t.defineComponent({__name:"index",props:{color:{type:[Function,String,Array,null]},curveType:{},baseline:{type:[Function,Number,null]},opacity:{type:[Function,Number,null]},cursor:{type:[Function,String,null]},minHeight1Px:{type:Boolean},minHeight:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:d}){const o=t.inject(y.componentAccessorKey),u=p,a=t.computed(()=>o.data.value??u.data),c=l.useForwardProps(u),n=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;n.value=new i.Area(c.value),(e=n.value)==null||e.setData(a.value),o.update(n.value)})}),t.onUnmounted(()=>{var e;(e=n.value)==null||e.destroy(),o.destroy()}),t.watch(c,(e,r)=>{var s;l.arePropsEqual(e,r)||(s=n.value)==null||s.setConfig(c.value)}),t.watch(a,()=>{var e;(e=n.value)==null||e.setData(a.value)}),d({component:n}),(e,r)=>(t.openBlock(),t.createElementBlock("div",m))}});exports.VisAreaSelectors=v;exports.default=F;
|
|
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"],"mappings":"+PAkDaA,EAAmBC,EAAAA,KAAK
|
|
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","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAkDaA,EAAmBC,EAAAA,KAAK,6gBA3CrC,MAAMC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,EAAAA,gBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAA,EAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,OAAYQ,EAAO,KAAK,GAC9CM,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,OAC9BL,EAAS,OAAOS,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAA,CACX,CAAC,EAEDe,EAAAA,MAAMR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BJ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UAAUN,EAAO,MAEtC,CAAC,EAEDQ,EAAAA,MAAMV,EAAM,IAAM,QAChBQ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,MAChC,CAAC,EAEDc,EAAa,CACX,UAAAV,CAAA,CACD,UAQCW,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
|
|
@@ -1,66 +1,19 @@
|
|
|
1
|
-
import { Area,
|
|
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 { Area, AreaConfigInterface } 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
|
-
curveType?: string;
|
|
45
|
-
baseline?: NumericAccessor<Datum>;
|
|
46
|
-
opacity?: NumericAccessor<Datum[]>;
|
|
47
|
-
cursor?: import("@unovis/ts").StringAccessor<Datum[]>;
|
|
48
|
-
minHeight1Px?: boolean;
|
|
49
|
-
minHeight?: number;
|
|
50
|
-
id?: (d: Datum, i: number, ...any: any[]) => string;
|
|
51
|
-
xScale?: import("@unovis/ts").ContinuousScale;
|
|
52
|
-
yScale?: import("@unovis/ts").ContinuousScale;
|
|
53
|
-
excludeFromDomainCalculation?: boolean;
|
|
54
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
55
|
-
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
56
|
-
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>>;
|
|
57
10
|
}>): void;
|
|
58
11
|
attrs: any;
|
|
59
|
-
slots: {}
|
|
60
|
-
emit:
|
|
61
|
-
}>) => import(
|
|
12
|
+
slots: ReturnType<() => {}>;
|
|
13
|
+
emit: typeof __VLS_emit;
|
|
14
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
62
15
|
[key: string]: any;
|
|
63
16
|
}> & {
|
|
64
|
-
__ctx?:
|
|
17
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
65
18
|
};
|
|
66
19
|
export default _default;
|
package/components/area/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as m, inject as d, computed as
|
|
2
|
-
import { Area as
|
|
3
|
-
import { useForwardProps as
|
|
4
|
-
import { componentAccessorKey as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as m, inject as d, computed as y, ref as v, onMounted as f, nextTick as F, onUnmounted as x, watch as l, createElementBlock as b, openBlock as _ } from "vue";
|
|
2
|
+
import { Area as i } from "@unovis/ts";
|
|
3
|
+
import { useForwardProps as g, arePropsEqual as h } from "../../utils/props.js";
|
|
4
|
+
import { componentAccessorKey as A } from "../../utils/context.js";
|
|
5
|
+
const S = { "data-vis-component": "" }, w = i.selectors, C = /* @__PURE__ */ m({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
|
-
color: {},
|
|
8
|
+
color: { type: [Function, String, Array, null] },
|
|
9
9
|
curveType: {},
|
|
10
|
-
baseline: {},
|
|
11
|
-
opacity: {},
|
|
12
|
-
cursor: {},
|
|
10
|
+
baseline: { type: [Function, Number, null] },
|
|
11
|
+
opacity: { type: [Function, Number, null] },
|
|
12
|
+
cursor: { type: [Function, String, null] },
|
|
13
13
|
minHeight1Px: { type: Boolean },
|
|
14
14
|
minHeight: {},
|
|
15
|
-
x: {},
|
|
16
|
-
y: {},
|
|
15
|
+
x: { type: [Function, Number, null] },
|
|
16
|
+
y: { type: [Function, Number, null, Array] },
|
|
17
17
|
id: { type: Function },
|
|
18
18
|
xScale: { type: [Object, Function] },
|
|
19
19
|
yScale: { type: [Object, Function] },
|
|
@@ -23,29 +23,29 @@ const j = { "data-vis-component": "" }, D = u.selectors, P = /* @__PURE__ */ m({
|
|
|
23
23
|
attributes: {},
|
|
24
24
|
data: {}
|
|
25
25
|
},
|
|
26
|
-
setup(
|
|
27
|
-
const
|
|
26
|
+
setup(s, { expose: p }) {
|
|
27
|
+
const n = d(A), c = s, o = y(() => n.data.value ?? c.data), a = g(c), t = v();
|
|
28
28
|
return f(() => {
|
|
29
|
-
|
|
29
|
+
F(() => {
|
|
30
30
|
var e;
|
|
31
|
-
t.value = new
|
|
31
|
+
t.value = new i(a.value), (e = t.value) == null || e.setData(o.value), n.update(t.value);
|
|
32
32
|
});
|
|
33
|
-
}),
|
|
33
|
+
}), x(() => {
|
|
34
34
|
var e;
|
|
35
|
-
(e = t.value) == null || e.destroy(),
|
|
36
|
-
}),
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
}),
|
|
35
|
+
(e = t.value) == null || e.destroy(), n.destroy();
|
|
36
|
+
}), l(a, (e, r) => {
|
|
37
|
+
var u;
|
|
38
|
+
h(e, r) || (u = t.value) == null || u.setConfig(a.value);
|
|
39
|
+
}), l(o, () => {
|
|
40
40
|
var e;
|
|
41
|
-
(e = t.value) == null || e.setData(
|
|
41
|
+
(e = t.value) == null || e.setData(o.value);
|
|
42
42
|
}), p({
|
|
43
43
|
component: t
|
|
44
|
-
}), (e, r) => (
|
|
44
|
+
}), (e, r) => (_(), b("div", S));
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
export {
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
w as VisAreaSelectors,
|
|
49
|
+
C as default
|
|
50
50
|
};
|
|
51
51
|
//# 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"],"mappings":";;;;wCAkDaA,IAAmBC,EAAK;;;;;;;;;;;;;;;;;;;;;;
|
|
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","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAkDaA,IAAmBC,EAAK;;;;;;;;;;;;;;;;;;;;;;AA3CrC,UAAMC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAA;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAYQ,EAAO,KAAK,IAC9CM,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK,QAC9BL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAA;AAAA,IACX,CAAC,GAEDe,EAAMR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BJ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,UAAUN,EAAO;AAAA,IAEtC,CAAC,GAEDQ,EAAMV,GAAM,MAAM;;AAChB,OAAAQ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK;AAAA,IAChC,CAAC,GAEDc,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,cAQCW,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
|
|
@@ -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"),y=require("../../utils/context.cjs"),x={"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:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:d}){const n=t.inject(y.axisAccessorKey),i=p,a=t.computed(()=>n.data.value??i.data),c=r.useForwardProps(i),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),n.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),n.destroy(i.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",x))}});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"],"mappings":"0PAkDaA,EAAmBC,EAAAA,KAAK,
|
|
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","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"0PAkDaA,EAAmBC,EAAAA,KAAK,68BA3CrC,MAAMC,EAAWC,EAAAA,OAAOC,iBAAe,EAIjCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,EAAAA,gBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAA,EAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,OAAYQ,EAAO,KAAK,GAC9CM,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,OAC9BL,EAAS,OAAOS,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAQG,EAAM,IAAI,CAC7B,CAAC,EAEDY,EAAAA,MAAMR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BJ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UAAUN,EAAO,MAEtC,CAAC,EAEDQ,EAAAA,MAAMV,EAAM,IAAM,QAChBQ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,MAChC,CAAC,EAEDc,EAAa,CACX,UAAAV,CAAA,CACD,UAQCW,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 { Axis, AxisConfigInterface } 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;
|
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 y, computed as m, ref as x, onMounted as k, nextTick as T, onUnmounted as v, watch as r, createElementBlock as F, openBlock as f } from "vue";
|
|
2
|
+
import { Axis as s } from "@unovis/ts";
|
|
3
|
+
import { useForwardProps as B, 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": "" }, O = s.selectors, C = /* @__PURE__ */ d({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
position: {},
|
|
@@ -34,10 +34,10 @@ const S = { "data-vis-axis": "" }, A = r.selectors, C = /* @__PURE__ */ d({
|
|
|
34
34
|
tickTextAngle: {},
|
|
35
35
|
tickTextHideOverlapping: { type: Boolean },
|
|
36
36
|
tickPadding: {},
|
|
37
|
-
x: {},
|
|
38
|
-
y: {},
|
|
37
|
+
x: { type: [Function, Number, null] },
|
|
38
|
+
y: { type: [Function, Number, null, Array] },
|
|
39
39
|
id: { type: Function },
|
|
40
|
-
color: {},
|
|
40
|
+
color: { type: [Function, String, Array, null] },
|
|
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": "" }, A = r.selectors, C = /* @__PURE__ */ d({
|
|
|
47
47
|
data: {}
|
|
48
48
|
},
|
|
49
49
|
setup(p, { expose: u }) {
|
|
50
|
-
const o =
|
|
50
|
+
const o = y(g), n = p, i = m(() => o.data.value ?? n.data), a = B(n), t = x();
|
|
51
51
|
return k(() => {
|
|
52
52
|
T(() => {
|
|
53
53
|
var e;
|
|
54
|
-
t.value = new
|
|
54
|
+
t.value = new s(a.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(n.type);
|
|
59
|
+
}), r(a, (e, l) => {
|
|
60
|
+
var c;
|
|
61
|
+
b(e, l) || (c = t.value) == null || c.setConfig(a.value);
|
|
62
|
+
}), r(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, l) => (f(), F("div", S));
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
70
|
export {
|
|
71
|
-
|
|
71
|
+
O as VisAxisSelectors,
|
|
72
72
|
C as default
|
|
73
73
|
};
|
|
74
74
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","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":";;;;mCAkDaA,IAAmBC,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","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","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;mCAkDaA,IAAmBC,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CrC,UAAMC,IAAWC,EAAOC,CAAe,GAIjCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAA;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAYQ,EAAO,KAAK,IAC9CM,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK,QAC9BL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAQG,EAAM,IAAI;AAAA,IAC7B,CAAC,GAEDY,EAAMR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BJ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,UAAUN,EAAO;AAAA,IAEtC,CAAC,GAEDQ,EAAMV,GAAM,MAAM;;AAChB,OAAAQ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK;AAAA,IAChC,CAAC,GAEDc,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,cAQCW,EAAA,GAAAC,EAAqB,OAArBC,CAAqB;AAAA;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),l=require("@unovis/ts"),i=require("../../utils/props.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),l=require("@unovis/ts"),i=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),v={"data-vis-component":""},h=l.Brush.selectors,m=t.defineComponent({__name:"index",props:{onBrush:{type:Function},onBrushStart:{type:Function},onBrushMove:{type:Function},onBrushEnd:{type:Function},handleWidth:{},selection:{},draggable:{type:Boolean},handlePosition:{},selectionMinLength:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:d}){const o=t.inject(y.componentAccessorKey),a=p,u=t.computed(()=>o.data.value??a.data),c=i.useForwardProps(a),n=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;n.value=new l.Brush(c.value),(e=n.value)==null||e.setData(u.value),o.update(n.value)})}),t.onUnmounted(()=>{var e;(e=n.value)==null||e.destroy(),o.destroy()}),t.watch(c,(e,s)=>{var r;i.arePropsEqual(e,s)||(r=n.value)==null||r.setConfig(c.value)}),t.watch(u,()=>{var e;(e=n.value)==null||e.setData(u.value)}),d({component:n}),(e,s)=>(t.openBlock(),t.createElementBlock("div",v))}});exports.VisBrushSelectors=h;exports.default=m;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/brush/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Brush, BrushConfigInterface } 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 = BrushConfigInterface<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<Brush<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Brush<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 VisBrushSelectors = Brush.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisBrushSelectors","Brush","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAoBC,EAAAA,MAAM,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/brush/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Brush, BrushConfigInterface } 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 = BrushConfigInterface<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<Brush<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Brush<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 VisBrushSelectors = Brush.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisBrushSelectors","Brush","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAkDaA,EAAoBC,EAAAA,MAAM,8iBA3CvC,MAAMC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,EAAAA,gBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAA,EAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,QAAaQ,EAAO,KAAK,GAC/CM,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,OAC9BL,EAAS,OAAOS,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAA,CACX,CAAC,EAEDe,EAAAA,MAAMR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BJ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UAAUN,EAAO,MAEtC,CAAC,EAEDQ,EAAAA,MAAMV,EAAM,IAAM,QAChBQ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,MAChC,CAAC,EAEDc,EAAa,CACX,UAAAV,CAAA,CACD,UAQCW,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
|