@unovis/vue 1.3.0-alpha.3 → 1.3.0-beta.2
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/area/index.cjs +1 -1
- package/components/area/index.cjs.map +1 -1
- package/components/area/index.d.ts +53 -6
- package/components/area/index.js +20 -17
- 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 +71 -6
- package/components/axis/index.js +20 -17
- 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 +57 -6
- package/components/brush/index.js +19 -16
- 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 +55 -6
- package/components/chord-diagram/index.js +20 -17
- 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 +56 -6
- package/components/crosshair/index.js +20 -35
- 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 +57 -6
- package/components/donut/index.js +21 -18
- 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 +57 -6
- package/components/free-brush/index.js +21 -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 +106 -6
- package/components/graph/index.js +24 -21
- 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 +57 -6
- package/components/grouped-bar/index.js +21 -18
- 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 +54 -6
- package/components/line/index.js +20 -17
- 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 +59 -6
- package/components/nested-donut/index.js +22 -19
- package/components/nested-donut/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 +90 -6
- package/components/sankey/index.js +28 -25
- 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 +60 -6
- package/components/scatter/index.js +22 -19
- 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 +57 -6
- package/components/stacked-bar/index.js +22 -19
- 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 +54 -12
- package/components/timeline/index.js +22 -41
- 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 +2 -2
- package/components/tooltip/index.js +18 -18
- 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 +73 -6
- package/components/topojson-map/index.js +22 -19
- package/components/topojson-map/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 +61 -6
- package/components/xy-labels/index.js +27 -24
- package/components/xy-labels/index.js.map +1 -1
- package/containers/single-container/index.cjs +1 -1
- package/containers/single-container/index.cjs.map +1 -1
- package/containers/single-container/index.d.ts +21 -8
- package/containers/single-container/index.js +28 -29
- 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 +38 -8
- package/containers/xy-container/index.js +33 -33
- package/containers/xy-container/index.js.map +1 -1
- 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 +6 -0
- package/html-components/bullet-legend/index.js +19 -18
- package/html-components/bullet-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 +107 -6
- package/html-components/leaflet-flow-map/index.js +18 -18
- 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 +94 -6
- package/html-components/leaflet-map/index.js +17 -17
- package/html-components/leaflet-map/index.js.map +1 -1
- package/index.cjs +1 -1
- package/index.js +1 -1
- package/package.json +5 -5
- package/utils/props.cjs +1 -1
- package/utils/props.cjs.map +1 -1
- package/utils/props.d.ts +3 -0
- package/utils/props.js +14 -11
- package/utils/props.js.map +1 -1
|
@@ -1,14 +1,98 @@
|
|
|
1
|
-
import { Sankey
|
|
2
|
-
declare const _default: <N extends import("@unovis/ts").GraphInputNode, L extends import("@unovis/ts").GraphInputLink>(__VLS_props: any, __VLS_ctx?:
|
|
3
|
-
|
|
1
|
+
import { Sankey } from '@unovis/ts';
|
|
2
|
+
declare const _default: <N extends import("@unovis/ts").GraphInputNode, L extends import("@unovis/ts").GraphInputLink>(__VLS_props: any, __VLS_ctx?: {
|
|
3
|
+
attrs: any;
|
|
4
|
+
emit: any;
|
|
5
|
+
slots: any;
|
|
6
|
+
}, __VLS_expose?: any, __VLS_setup?: Promise<{
|
|
7
|
+
props: {
|
|
8
|
+
id?: (d: import("@unovis/ts").GraphInputNode | import("@unovis/ts").GraphInputLink, i: number, ...any: any[]) => string;
|
|
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
|
+
};
|
|
4
40
|
data?: {
|
|
5
41
|
nodes: N[];
|
|
6
42
|
links?: L[];
|
|
7
43
|
};
|
|
8
|
-
|
|
9
|
-
|
|
44
|
+
label?: import("@unovis/ts").StringAccessor<import("@unovis/ts").SankeyNode<N, L>>;
|
|
45
|
+
labelFontSize?: number;
|
|
46
|
+
labelColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").SankeyNode<N, L>>;
|
|
47
|
+
linkColor?: import("@unovis/ts").StringAccessor<import("@unovis/ts").SankeyLink<N, L>>;
|
|
48
|
+
linkValue?: import("@unovis/ts").NumericAccessor<L>;
|
|
49
|
+
nodeWidth?: number;
|
|
50
|
+
nodeColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").SankeyNode<N, L>>;
|
|
51
|
+
nodeIcon?: import("@unovis/ts").StringAccessor<import("@unovis/ts").SankeyNode<N, L>>;
|
|
52
|
+
nodeSort?: (node1: import("@unovis/ts").SankeyNode<N, L>, node2: import("@unovis/ts").SankeyNode<N, L>) => number;
|
|
53
|
+
heightNormalizationCoeff?: number;
|
|
54
|
+
exitTransitionType?: import("@unovis/ts").SankeyExitTransitionType;
|
|
55
|
+
enterTransitionType?: import("@unovis/ts").SankeyEnterTransitionType;
|
|
56
|
+
highlightSubtreeOnHover?: boolean;
|
|
57
|
+
highlightDuration?: number;
|
|
58
|
+
highlightDelay?: number;
|
|
59
|
+
iterations?: number;
|
|
60
|
+
linkSort?: (link1: import("@unovis/ts").SankeyLink<N, L>, link2: import("@unovis/ts").SankeyLink<N, L>) => number;
|
|
61
|
+
nodeAlign?: import("@unovis/ts").SankeyNodeAlign;
|
|
62
|
+
nodeHorizontalSpacing?: number;
|
|
63
|
+
nodeMinHeight?: number;
|
|
64
|
+
nodeMaxHeight?: number;
|
|
65
|
+
nodePadding?: number;
|
|
66
|
+
showSingleNode?: boolean;
|
|
67
|
+
nodeCursor?: import("@unovis/ts").StringAccessor<import("@unovis/ts").SankeyNode<N, L>>;
|
|
68
|
+
nodeFixedValue?: import("@unovis/ts").NumericAccessor<N>;
|
|
69
|
+
nodeIconColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").SankeyNode<N, L>>;
|
|
70
|
+
linkCursor?: import("@unovis/ts").StringAccessor<import("@unovis/ts").SankeyLink<N, L>>;
|
|
71
|
+
subLabel?: import("@unovis/ts").StringAccessor<import("@unovis/ts").SankeyNode<N, L>>;
|
|
72
|
+
labelPosition?: import("@unovis/ts").GenericAccessor<string, import("@unovis/ts").SankeyNode<N, L>>;
|
|
73
|
+
labelVerticalAlign?: string;
|
|
74
|
+
labelBackground?: boolean;
|
|
75
|
+
labelFit?: import("@unovis/ts").FitMode;
|
|
76
|
+
labelMaxWidth?: number;
|
|
77
|
+
labelExpandTrimmedOnHover?: boolean;
|
|
78
|
+
labelTrimMode?: import("@unovis/ts").TrimMode;
|
|
79
|
+
labelTextSeparator?: string[];
|
|
80
|
+
labelForceWordBreak?: boolean;
|
|
81
|
+
labelCursor?: import("@unovis/ts").StringAccessor<import("@unovis/ts").SankeyNode<N, L>>;
|
|
82
|
+
labelVisibility?: (d: import("@unovis/ts").SankeyNode<N, L>, bbox: {
|
|
83
|
+
x: number;
|
|
84
|
+
y: number;
|
|
85
|
+
width: number;
|
|
86
|
+
height: number;
|
|
87
|
+
}, hovered: boolean) => boolean;
|
|
88
|
+
subLabelFontSize?: number;
|
|
89
|
+
subLabelColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").SankeyNode<N, L>>;
|
|
90
|
+
subLabelPlacement?: string;
|
|
91
|
+
subLabelToLabelInlineWidthRatio?: number;
|
|
92
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
93
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
10
94
|
component: import("vue").Ref<Sankey<N, L>>;
|
|
11
|
-
}): void;
|
|
95
|
+
}>): void;
|
|
12
96
|
attrs: any;
|
|
13
97
|
slots: {};
|
|
14
98
|
emit: any;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as d, inject as
|
|
2
|
-
import { Sankey as
|
|
3
|
-
import {
|
|
4
|
-
import { componentAccessorKey as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as d, inject as s, computed as y, ref as b, onMounted as g, nextTick as m, onUnmounted as F, watch as u, openBlock as h, createElementBlock as S } from "vue";
|
|
2
|
+
import { Sankey as v } from "@unovis/ts";
|
|
3
|
+
import { useForwardProps as f, arePropsEqual as x } from "../../utils/props.js";
|
|
4
|
+
import { componentAccessorKey as C } from "../../utils/context.js";
|
|
5
|
+
const k = { "data-vis-component": "" }, H = /* @__PURE__ */ d({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
id: { type: Function },
|
|
@@ -24,9 +24,9 @@ const T = { "data-vis-component": "" }, M = /* @__PURE__ */ d({
|
|
|
24
24
|
showSingleNode: { type: Boolean },
|
|
25
25
|
nodeCursor: { type: [Function, String, null] },
|
|
26
26
|
nodeIcon: { type: [Function, String, null] },
|
|
27
|
-
nodeColor: { type: [Function, String,
|
|
27
|
+
nodeColor: { type: [Function, String, null] },
|
|
28
28
|
nodeFixedValue: { type: [Function, Number, null] },
|
|
29
|
-
nodeIconColor: { type: [Function, String,
|
|
29
|
+
nodeIconColor: { type: [Function, String, null] },
|
|
30
30
|
linkColor: { type: [Function, String, null] },
|
|
31
31
|
linkValue: { type: [Function, Number, null] },
|
|
32
32
|
linkCursor: { type: [Function, String, null] },
|
|
@@ -42,11 +42,11 @@ const T = { "data-vis-component": "" }, M = /* @__PURE__ */ d({
|
|
|
42
42
|
labelFontSize: {},
|
|
43
43
|
labelTextSeparator: {},
|
|
44
44
|
labelForceWordBreak: { type: Boolean },
|
|
45
|
-
labelColor: { type: [Function, String,
|
|
45
|
+
labelColor: { type: [Function, String, null] },
|
|
46
46
|
labelCursor: { type: [Function, String, null] },
|
|
47
47
|
labelVisibility: { type: Function },
|
|
48
48
|
subLabelFontSize: {},
|
|
49
|
-
subLabelColor: { type: [Function, String,
|
|
49
|
+
subLabelColor: { type: [Function, String, null] },
|
|
50
50
|
subLabelPlacement: {},
|
|
51
51
|
subLabelToLabelInlineWidthRatio: {},
|
|
52
52
|
duration: {},
|
|
@@ -54,25 +54,28 @@ const T = { "data-vis-component": "" }, M = /* @__PURE__ */ d({
|
|
|
54
54
|
attributes: {},
|
|
55
55
|
data: {}
|
|
56
56
|
},
|
|
57
|
-
setup(
|
|
58
|
-
const
|
|
59
|
-
return
|
|
60
|
-
|
|
61
|
-
var
|
|
62
|
-
|
|
57
|
+
setup(c, { expose: p }) {
|
|
58
|
+
const i = c, t = s(C), o = y(() => t.data.value ?? i.data), l = f(i), n = b();
|
|
59
|
+
return g(() => {
|
|
60
|
+
m(() => {
|
|
61
|
+
var e;
|
|
62
|
+
n.value = new v(l.value), (e = n.value) == null || e.setData(o.value), t.update(n.value);
|
|
63
63
|
});
|
|
64
|
-
}),
|
|
65
|
-
var
|
|
66
|
-
(
|
|
67
|
-
}),
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
}),
|
|
71
|
-
|
|
72
|
-
|
|
64
|
+
}), F(() => {
|
|
65
|
+
var e;
|
|
66
|
+
(e = n.value) == null || e.destroy(), t.destroy();
|
|
67
|
+
}), u(l, (e, a) => {
|
|
68
|
+
var r;
|
|
69
|
+
x(e, a) || (r = n.value) == null || r.setConfig(l.value);
|
|
70
|
+
}), u(o, () => {
|
|
71
|
+
var e;
|
|
72
|
+
(e = n.value) == null || e.setData(o.value);
|
|
73
|
+
}), p({
|
|
74
|
+
component: n
|
|
75
|
+
}), (e, a) => (h(), S("div", k));
|
|
73
76
|
}
|
|
74
77
|
});
|
|
75
78
|
export {
|
|
76
|
-
|
|
79
|
+
H as default
|
|
77
80
|
};
|
|
78
81
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/sankey/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Sankey, SankeyConfigInterface, SankeyInputNode, SankeyInputLink } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/sankey/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Sankey, SankeyConfigInterface, SankeyInputNode, SankeyInputLink } 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\ninterface Props extends SankeyConfigInterface<N, L> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n id: { type: Function },\n heightNormalizationCoeff: {},\n exitTransitionType: {},\n enterTransitionType: {},\n highlightSubtreeOnHover: { type: Boolean },\n highlightDuration: {},\n highlightDelay: {},\n iterations: {},\n nodeSort: { type: [Function, null] },\n linkSort: { type: [Function, null] },\n nodeWidth: {},\n nodeAlign: {},\n nodeHorizontalSpacing: {},\n nodeMinHeight: {},\n nodeMaxHeight: {},\n nodePadding: {},\n showSingleNode: { type: Boolean },\n nodeCursor: { type: [Function, String, null] },\n nodeIcon: { type: [Function, String, null] },\n nodeColor: { type: [Function, String, null] },\n nodeFixedValue: { type: [Function, Number, null] },\n nodeIconColor: { type: [Function, String, null] },\n linkColor: { type: [Function, String, null] },\n linkValue: { type: [Function, Number, null] },\n linkCursor: { type: [Function, String, null] },\n label: { type: [Function, String, null] },\n subLabel: { type: [Function, String, null] },\n labelPosition: { type: [Function, null] },\n labelVerticalAlign: {},\n labelBackground: { type: Boolean },\n labelFit: {},\n labelMaxWidth: {},\n labelExpandTrimmedOnHover: { type: Boolean },\n labelTrimMode: {},\n labelFontSize: {},\n labelTextSeparator: {},\n labelForceWordBreak: { type: Boolean },\n labelColor: { type: [Function, String, null] },\n labelCursor: { type: [Function, String, null] },\n labelVisibility: { type: Function },\n subLabelFontSize: {},\n subLabelColor: { type: [Function, String, null] },\n subLabelPlacement: {},\n subLabelToLabelInlineWidthRatio: {},\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Sankey<N, L>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Sankey<N, L>(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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","Sankey","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,sBAAsB,MASfC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,IAAI,EAAE,MAAM,SAAS;AAAA,IACrB,0BAA0B,CAAC;AAAA,IAC3B,oBAAoB,CAAC;AAAA,IACrB,qBAAqB,CAAC;AAAA,IACtB,yB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AS,IAAAL,EAAA,UAAA,QAAAK,EAAO,QAAQT,EAAK;AAAA,IAAK,CACpC,GAEQL,EAAA;AAAA,MACP,WAAAS;AAAA,IAAA,CACD,GAEM,CAACW,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAO3B,CAAU;AAAA,EAE7D;AAEA,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const t=require("vue"),y=require("@unovis/ts"),i=require("../../utils/props.cjs"),d=require("../../utils/context.cjs"),F={"data-vis-component":""},v=t.defineComponent({__name:"index",props:{color:{type:[Function,String,null]},size:{type:[Function,Number,null]},sizeScale:{type:[Object,Function]},sizeRange:{},shape:{type:[Function,String]},label:{type:[Function,String,null]},labelColor:{type:[Function,String,null]},labelHideOverlapping:{type:Boolean},cursor:{type:[Function,String,null]},labelTextBrightnessRatio:{},labelPosition:{type:[Function,null]},strokeColor:{type:[Function,String,null]},strokeWidth:{type:[Function,Number,null]},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(s,{expose:p}){const a=s,o=t.inject(d.componentAccessorKey),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 y.Scatter(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,l)=>{var r;i.arePropsEqual(e,l)||(r=n.value)==null||r.setConfig(c.value)}),t.watch(u,()=>{var e;(e=n.value)==null||e.setData(u.value)}),p({component:n}),(e,l)=>(t.openBlock(),t.createElementBlock("div",F))}});module.exports=v;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/scatter/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Scatter, ScatterConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/scatter/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Scatter, ScatterConfigInterface, 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\ninterface Props extends ScatterConfigInterface<Datum> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n color: { type: [Function, String, null] },\n size: { type: [Function, Number, null] },\n sizeScale: { type: [Object, Function] },\n sizeRange: {},\n shape: { type: [Function, String] },\n label: { type: [Function, String, null] },\n labelColor: { type: [Function, String, null] },\n labelHideOverlapping: { type: Boolean },\n cursor: { type: [Function, String, null] },\n labelTextBrightnessRatio: {},\n labelPosition: { type: [Function, null] },\n strokeColor: { type: [Function, String, null] },\n strokeWidth: { type: [Function, Number, null] },\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Scatter<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Scatter<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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","Scatter","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"oIAGMA,EAAa,CAAE,qBAAsB,IASfC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,MAAO,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACxC,KAAM,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACvC,UAAW,CAAE,KAAM,CAAC,OAAQ,QAAQ,CAAE,EACtC,UAAW,CAAC,EACZ,MAAO,CAAE,KAAM,CAAC,SAAU,MAAM,CAAE,EAClC,MAAO,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACxC,WAAY,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EAC7C,qBAAsB,CAAE,KAAM,OAAQ,EACtC,OAAQ,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACzC,yBAA0B,CAAC,EAC3B,cAAe,CAAE,KAAM,CAAC,SAAU,IAAI,CAAE,EACxC,YAAa,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EAC9C,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,CAACW,EAAUC,KACRC,EAAW,UAAA,EAAGC,EAAAA,mBAAoB,MAAO3B,CAAU,EAE7D,CAEA,CAAC"}
|
|
@@ -1,11 +1,65 @@
|
|
|
1
|
-
import { Scatter,
|
|
2
|
-
declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?:
|
|
3
|
-
|
|
1
|
+
import { Scatter, NumericAccessor } from '@unovis/ts';
|
|
2
|
+
declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
|
|
3
|
+
attrs: any;
|
|
4
|
+
emit: any;
|
|
5
|
+
slots: any;
|
|
6
|
+
}, __VLS_expose?: any, __VLS_setup?: Promise<{
|
|
7
|
+
props: {
|
|
8
|
+
color?: import("@unovis/ts").ColorAccessor<Datum>;
|
|
9
|
+
cursor?: import("@unovis/ts").StringAccessor<Datum>;
|
|
10
|
+
x: NumericAccessor<Datum>;
|
|
11
|
+
y: NumericAccessor<Datum> | NumericAccessor<Datum>[];
|
|
12
|
+
id?: (d: Datum, i: number, ...any: any[]) => string;
|
|
13
|
+
xScale?: import("@unovis/ts").ContinuousScale;
|
|
14
|
+
yScale?: import("@unovis/ts").ContinuousScale;
|
|
15
|
+
excludeFromDomainCalculation?: boolean;
|
|
16
|
+
duration?: number;
|
|
17
|
+
events?: {
|
|
18
|
+
[selector: string]: {
|
|
19
|
+
touchstart?: import("@unovis/ts").VisEventCallback<any>;
|
|
20
|
+
touchmove?: import("@unovis/ts").VisEventCallback<any>;
|
|
21
|
+
touchend?: import("@unovis/ts").VisEventCallback<any>;
|
|
22
|
+
mouseover?: import("@unovis/ts").VisEventCallback<any>;
|
|
23
|
+
mousemove?: import("@unovis/ts").VisEventCallback<any>;
|
|
24
|
+
mousedown?: import("@unovis/ts").VisEventCallback<any>;
|
|
25
|
+
mouseup?: import("@unovis/ts").VisEventCallback<any>;
|
|
26
|
+
click?: import("@unovis/ts").VisEventCallback<any>;
|
|
27
|
+
auxclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
28
|
+
contextmenu?: import("@unovis/ts").VisEventCallback<any>;
|
|
29
|
+
dblclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
30
|
+
mouseenter?: import("@unovis/ts").VisEventCallback<any>;
|
|
31
|
+
mouseleave?: import("@unovis/ts").VisEventCallback<any>;
|
|
32
|
+
mouseout?: import("@unovis/ts").VisEventCallback<any>;
|
|
33
|
+
scroll?: import("@unovis/ts").VisEventCallback<any>;
|
|
34
|
+
select?: import("@unovis/ts").VisEventCallback<any>;
|
|
35
|
+
wheel?: import("@unovis/ts").VisEventCallback<any>;
|
|
36
|
+
pointerdown?: import("@unovis/ts").VisEventCallback<any>;
|
|
37
|
+
pointerup?: import("@unovis/ts").VisEventCallback<any>;
|
|
38
|
+
pointerout?: import("@unovis/ts").VisEventCallback<any>;
|
|
39
|
+
pointermove?: import("@unovis/ts").VisEventCallback<any>;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
attributes?: {
|
|
43
|
+
[selector: string]: {
|
|
44
|
+
[attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
|
|
45
|
+
};
|
|
46
|
+
};
|
|
4
47
|
data?: Datum[];
|
|
5
|
-
|
|
6
|
-
|
|
48
|
+
label?: import("@unovis/ts").StringAccessor<Datum>;
|
|
49
|
+
labelColor?: import("@unovis/ts").ColorAccessor<Datum>;
|
|
50
|
+
labelPosition?: import("@unovis/ts").GenericAccessor<string, Datum>;
|
|
51
|
+
size?: NumericAccessor<Datum>;
|
|
52
|
+
sizeScale?: import("@unovis/ts").ContinuousScale;
|
|
53
|
+
sizeRange?: [number, number];
|
|
54
|
+
shape?: string | ((d: Datum, i?: number, ...any: any[]) => string);
|
|
55
|
+
labelHideOverlapping?: boolean;
|
|
56
|
+
labelTextBrightnessRatio?: number;
|
|
57
|
+
strokeColor?: import("@unovis/ts").ColorAccessor<Datum>;
|
|
58
|
+
strokeWidth?: NumericAccessor<Datum>;
|
|
59
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
60
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
7
61
|
component: import("vue").Ref<Scatter<Datum>>;
|
|
8
|
-
}): void;
|
|
62
|
+
}>): void;
|
|
9
63
|
attrs: any;
|
|
10
64
|
slots: {};
|
|
11
65
|
emit: any;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Scatter as
|
|
3
|
-
import {
|
|
4
|
-
import { componentAccessorKey as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as s, inject as m, computed as y, ref as d, onMounted as F, nextTick as v, onUnmounted as b, watch as i, openBlock as f, createElementBlock as g } from "vue";
|
|
2
|
+
import { Scatter as S } from "@unovis/ts";
|
|
3
|
+
import { useForwardProps as x, arePropsEqual as _ } from "../../utils/props.js";
|
|
4
|
+
import { componentAccessorKey as h } from "../../utils/context.js";
|
|
5
|
+
const k = { "data-vis-component": "" }, O = /* @__PURE__ */ s({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
|
+
color: { type: [Function, String, null] },
|
|
8
9
|
size: { type: [Function, Number, null] },
|
|
9
10
|
sizeScale: { type: [Object, Function] },
|
|
10
11
|
sizeRange: {},
|
|
11
12
|
shape: { type: [Function, String] },
|
|
12
13
|
label: { type: [Function, String, null] },
|
|
13
|
-
labelColor: { type: [Function, String,
|
|
14
|
+
labelColor: { type: [Function, String, null] },
|
|
14
15
|
labelHideOverlapping: { type: Boolean },
|
|
15
16
|
cursor: { type: [Function, String, null] },
|
|
16
17
|
labelTextBrightnessRatio: {},
|
|
17
18
|
labelPosition: { type: [Function, null] },
|
|
18
|
-
strokeColor: { type: [Function, String,
|
|
19
|
+
strokeColor: { type: [Function, String, null] },
|
|
19
20
|
strokeWidth: { type: [Function, Number, null] },
|
|
20
21
|
x: { type: [Function, Number, null] },
|
|
21
22
|
y: { type: [Function, Number, null, Array] },
|
|
22
23
|
id: { type: Function },
|
|
23
|
-
color: { type: [Function, String, Array, null] },
|
|
24
24
|
xScale: { type: [Object, Function] },
|
|
25
25
|
yScale: { type: [Object, Function] },
|
|
26
26
|
excludeFromDomainCalculation: { type: Boolean },
|
|
@@ -29,25 +29,28 @@ const A = { "data-vis-component": "" }, z = /* @__PURE__ */ y({
|
|
|
29
29
|
attributes: {},
|
|
30
30
|
data: {}
|
|
31
31
|
},
|
|
32
|
-
setup(
|
|
33
|
-
const
|
|
34
|
-
return
|
|
32
|
+
setup(r, { expose: p }) {
|
|
33
|
+
const l = r, n = m(h), o = y(() => n.data.value ?? l.data), a = x(l), t = d();
|
|
34
|
+
return F(() => {
|
|
35
35
|
v(() => {
|
|
36
36
|
var e;
|
|
37
|
-
t.value = new
|
|
37
|
+
t.value = new S(a.value), (e = t.value) == null || e.setData(o.value), n.update(t.value);
|
|
38
38
|
});
|
|
39
|
-
}),
|
|
39
|
+
}), b(() => {
|
|
40
40
|
var e;
|
|
41
41
|
(e = t.value) == null || e.destroy(), n.destroy();
|
|
42
|
-
}),
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
}), i({
|
|
42
|
+
}), i(a, (e, u) => {
|
|
43
|
+
var c;
|
|
44
|
+
_(e, u) || (c = t.value) == null || c.setConfig(a.value);
|
|
45
|
+
}), i(o, () => {
|
|
46
|
+
var e;
|
|
47
|
+
(e = t.value) == null || e.setData(o.value);
|
|
48
|
+
}), p({
|
|
46
49
|
component: t
|
|
47
|
-
}), (e,
|
|
50
|
+
}), (e, u) => (f(), g("div", k));
|
|
48
51
|
}
|
|
49
52
|
});
|
|
50
53
|
export {
|
|
51
|
-
|
|
54
|
+
O as default
|
|
52
55
|
};
|
|
53
56
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/scatter/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Scatter, ScatterConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/scatter/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Scatter, ScatterConfigInterface, 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\ninterface Props extends ScatterConfigInterface<Datum> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n color: { type: [Function, String, null] },\n size: { type: [Function, Number, null] },\n sizeScale: { type: [Object, Function] },\n sizeRange: {},\n shape: { type: [Function, String] },\n label: { type: [Function, String, null] },\n labelColor: { type: [Function, String, null] },\n labelHideOverlapping: { type: Boolean },\n cursor: { type: [Function, String, null] },\n labelTextBrightnessRatio: {},\n labelPosition: { type: [Function, null] },\n strokeColor: { type: [Function, String, null] },\n strokeWidth: { type: [Function, Number, null] },\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Scatter<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Scatter<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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","Scatter","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,sBAAsB,MASfC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IACxC,MAAM,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IACvC,WAAW,EAAE,MAAM,CAAC,QAAQ,QAAQ,EAAE;AAAA,IACtC,WAAW,CAAC;AAAA,IACZ,OAAO,EAAE,MAAM,CAAC,UAAU,MAAM,EAAE;AAAA,IAClC,OAAO,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IACxC,YAAY,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IAC7C,sBAAsB,EAAE,MAAM,QAAQ;AAAA,IACtC,QAAQ,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IACzC,0BAA0B,CAAC;AAAA,IAC3B,eAAe,EAAE,MAAM,CAAC,UAAU,IAAI,EAAE;AAAA,IACxC,aAAa,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IAC9C,aAAa,EAAE,MAAM,CAAC,UAAU,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QL,EAAA;AAAA,MACP,WAAAS;AAAA,IAAA,CACD,GAEM,CAACW,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAO3B,CAAU;AAAA,EAE7D;AAEA,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const t=require("vue"),d=require("@unovis/ts"),s=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),v={"data-vis-component":""},m=t.defineComponent({__name:"index",props:{color:{type:[Function,String,null]},barWidth:{},barMaxWidth:{},dataStep:{},barPadding:{},roundedCorners:{type:[Number,Boolean]},cursor:{type:[Function,String,null]},barMinHeight1Px:{type:Boolean},barMinHeightZeroValue:{},orientation:{},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(l,{expose:p}){const c=l,o=t.inject(y.componentAccessorKey),a=t.computed(()=>o.data.value??c.data),r=s.useForwardProps(c),n=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;n.value=new d.StackedBar(r.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(r,(e,u)=>{var i;s.arePropsEqual(e,u)||(i=n.value)==null||i.setConfig(r.value)}),t.watch(a,()=>{var e;(e=n.value)==null||e.setData(a.value)}),p({component:n}),(e,u)=>(t.openBlock(),t.createElementBlock("div",v))}});module.exports=m;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/stacked-bar/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { StackedBar, StackedBarConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/stacked-bar/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { StackedBar, StackedBarConfigInterface, 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\ninterface Props extends StackedBarConfigInterface<Datum> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n color: { type: [Function, String, null] },\n barWidth: {},\n barMaxWidth: {},\n dataStep: {},\n barPadding: {},\n roundedCorners: { type: [Number, Boolean] },\n cursor: { type: [Function, String, null] },\n barMinHeight1Px: { type: Boolean },\n barMinHeightZeroValue: {},\n orientation: {},\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<StackedBar<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new StackedBar<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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","StackedBar","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"oIAGMA,EAAa,CAAE,qBAAsB,IASfC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,MAAO,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACxC,SAAU,CAAC,EACX,YAAa,CAAC,EACd,SAAU,CAAC,EACX,WAAY,CAAC,EACb,eAAgB,CAAE,KAAM,CAAC,OAAQ,OAAO,CAAE,EAC1C,OAAQ,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACzC,gBAAiB,CAAE,KAAM,OAAQ,EACjC,sBAAuB,CAAC,EACxB,YAAa,CAAC,EACd,EAAG,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACpC,EAAG,CAAE,KAAM,CAAC,SAAU,OAAQ,KAAM,KAAK,CAAE,EAC3C,GAAI,CAAE,KAAM,QAAS,EACrB,OAAQ,CAAE,KAAM,CAAC,OAAQ,QAAQ,CAAE,EACnC,OAAQ,CAAE,KAAM,CAAC,OAAQ,QAAQ,CAAE,EACnC,6BAA8B,CAAE,KAAM,OAAQ,EAC9C,SAAU,CAAC,EACX,OAAQ,CAAC,EACT,WAAY,CAAC,EACb,KAAM,CAAC,CACT,EACA,MAAMC,EAAc,CAAE,OAAQC,GAAY,CAE5C,MAAMC,EAAQF,EAGRG,EAAWC,SAAOC,EAAAA,oBAAoB,EAKtCC,EAAOC,EAAS,SAAA,IAAMJ,EAAS,KAAK,OAASD,EAAM,IAAI,EAEvDM,EAASC,kBAAgBP,CAAK,EAG9BQ,EAAYC,EAAAA,MAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAII,EAAkB,WAAAN,EAAO,KAAK,GAC1CO,EAAAL,EAAA,QAAA,MAAAK,EAAO,QAAQT,EAAK,OACrBH,EAAA,OAAOO,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDM,EAAAA,YAAY,IAAM,QAChBD,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UACjBZ,EAAS,QAAQ,CAAA,CAClB,EAEKc,EAAAA,MAAAT,EAAQ,CAACU,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAL,EAAA,QAAA,MAAAK,EAAO,UAAUP,EAAO,MACpC,CACD,EAEDS,EAAA,MAAMX,EAAM,IAAM,QACNS,EAAAL,EAAA,QAAA,MAAAK,EAAO,QAAQT,EAAK,MAAK,CACpC,EAEQL,EAAA,CACP,UAAAS,CAAA,CACD,EAEM,CAACW,EAAUC,KACRC,EAAW,UAAA,EAAGC,EAAAA,mBAAoB,MAAO3B,CAAU,EAE7D,CAEA,CAAC"}
|
|
@@ -1,11 +1,62 @@
|
|
|
1
|
-
import { StackedBar,
|
|
2
|
-
declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?:
|
|
3
|
-
|
|
1
|
+
import { StackedBar, NumericAccessor } from '@unovis/ts';
|
|
2
|
+
declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
|
|
3
|
+
attrs: any;
|
|
4
|
+
emit: any;
|
|
5
|
+
slots: any;
|
|
6
|
+
}, __VLS_expose?: any, __VLS_setup?: Promise<{
|
|
7
|
+
props: {
|
|
8
|
+
color?: import("@unovis/ts").ColorAccessor<Datum>;
|
|
9
|
+
cursor?: import("@unovis/ts").StringAccessor<Datum>;
|
|
10
|
+
x: NumericAccessor<Datum>;
|
|
11
|
+
y: NumericAccessor<Datum> | NumericAccessor<Datum>[];
|
|
12
|
+
id?: (d: Datum, i: number, ...any: any[]) => string;
|
|
13
|
+
xScale?: import("@unovis/ts").ContinuousScale;
|
|
14
|
+
yScale?: import("@unovis/ts").ContinuousScale;
|
|
15
|
+
excludeFromDomainCalculation?: boolean;
|
|
16
|
+
duration?: number;
|
|
17
|
+
events?: {
|
|
18
|
+
[selector: string]: {
|
|
19
|
+
touchstart?: import("@unovis/ts").VisEventCallback<any>;
|
|
20
|
+
touchmove?: import("@unovis/ts").VisEventCallback<any>;
|
|
21
|
+
touchend?: import("@unovis/ts").VisEventCallback<any>;
|
|
22
|
+
mouseover?: import("@unovis/ts").VisEventCallback<any>;
|
|
23
|
+
mousemove?: import("@unovis/ts").VisEventCallback<any>;
|
|
24
|
+
mousedown?: import("@unovis/ts").VisEventCallback<any>;
|
|
25
|
+
mouseup?: import("@unovis/ts").VisEventCallback<any>;
|
|
26
|
+
click?: import("@unovis/ts").VisEventCallback<any>;
|
|
27
|
+
auxclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
28
|
+
contextmenu?: import("@unovis/ts").VisEventCallback<any>;
|
|
29
|
+
dblclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
30
|
+
mouseenter?: import("@unovis/ts").VisEventCallback<any>;
|
|
31
|
+
mouseleave?: import("@unovis/ts").VisEventCallback<any>;
|
|
32
|
+
mouseout?: import("@unovis/ts").VisEventCallback<any>;
|
|
33
|
+
scroll?: import("@unovis/ts").VisEventCallback<any>;
|
|
34
|
+
select?: import("@unovis/ts").VisEventCallback<any>;
|
|
35
|
+
wheel?: import("@unovis/ts").VisEventCallback<any>;
|
|
36
|
+
pointerdown?: import("@unovis/ts").VisEventCallback<any>;
|
|
37
|
+
pointerup?: import("@unovis/ts").VisEventCallback<any>;
|
|
38
|
+
pointerout?: import("@unovis/ts").VisEventCallback<any>;
|
|
39
|
+
pointermove?: import("@unovis/ts").VisEventCallback<any>;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
attributes?: {
|
|
43
|
+
[selector: string]: {
|
|
44
|
+
[attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
|
|
45
|
+
};
|
|
46
|
+
};
|
|
4
47
|
data?: Datum[];
|
|
5
|
-
|
|
6
|
-
|
|
48
|
+
dataStep?: number;
|
|
49
|
+
barPadding?: number;
|
|
50
|
+
roundedCorners?: number | boolean;
|
|
51
|
+
orientation?: string;
|
|
52
|
+
barWidth?: number;
|
|
53
|
+
barMaxWidth?: number;
|
|
54
|
+
barMinHeight1Px?: boolean;
|
|
55
|
+
barMinHeightZeroValue?: any;
|
|
56
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
57
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
7
58
|
component: import("vue").Ref<StackedBar<Datum>>;
|
|
8
|
-
}): void;
|
|
59
|
+
}>): void;
|
|
9
60
|
attrs: any;
|
|
10
61
|
slots: {};
|
|
11
62
|
emit: any;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { StackedBar as
|
|
3
|
-
import {
|
|
4
|
-
import { componentAccessorKey as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as s, inject as d, computed as m, ref as y, onMounted as v, nextTick as b, onUnmounted as f, watch as i, openBlock as x, createElementBlock as F } from "vue";
|
|
2
|
+
import { StackedBar as _ } from "@unovis/ts";
|
|
3
|
+
import { useForwardProps as g, arePropsEqual as h } from "../../utils/props.js";
|
|
4
|
+
import { componentAccessorKey as B } from "../../utils/context.js";
|
|
5
|
+
const S = { "data-vis-component": "" }, j = /* @__PURE__ */ s({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
|
+
color: { type: [Function, String, null] },
|
|
8
9
|
barWidth: {},
|
|
9
10
|
barMaxWidth: {},
|
|
10
11
|
dataStep: {},
|
|
@@ -17,7 +18,6 @@ const k = { "data-vis-component": "" }, N = /* @__PURE__ */ d({
|
|
|
17
18
|
x: { type: [Function, Number, null] },
|
|
18
19
|
y: { type: [Function, Number, null, Array] },
|
|
19
20
|
id: { type: Function },
|
|
20
|
-
color: { type: [Function, String, Array, null] },
|
|
21
21
|
xScale: { type: [Object, Function] },
|
|
22
22
|
yScale: { type: [Object, Function] },
|
|
23
23
|
excludeFromDomainCalculation: { type: Boolean },
|
|
@@ -26,25 +26,28 @@ const k = { "data-vis-component": "" }, N = /* @__PURE__ */ d({
|
|
|
26
26
|
attributes: {},
|
|
27
27
|
data: {}
|
|
28
28
|
},
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
31
|
-
return
|
|
32
|
-
|
|
29
|
+
setup(l, { expose: p }) {
|
|
30
|
+
const r = l, o = d(B), n = m(() => o.data.value ?? r.data), a = g(r), t = y();
|
|
31
|
+
return v(() => {
|
|
32
|
+
b(() => {
|
|
33
33
|
var e;
|
|
34
|
-
t.value = new
|
|
34
|
+
t.value = new _(a.value), (e = t.value) == null || e.setData(n.value), o.update(t.value);
|
|
35
35
|
});
|
|
36
|
-
}),
|
|
36
|
+
}), f(() => {
|
|
37
37
|
var e;
|
|
38
|
-
(e = t.value) == null || e.destroy(),
|
|
39
|
-
}),
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
}),
|
|
38
|
+
(e = t.value) == null || e.destroy(), o.destroy();
|
|
39
|
+
}), i(a, (e, c) => {
|
|
40
|
+
var u;
|
|
41
|
+
h(e, c) || (u = t.value) == null || u.setConfig(a.value);
|
|
42
|
+
}), i(n, () => {
|
|
43
|
+
var e;
|
|
44
|
+
(e = t.value) == null || e.setData(n.value);
|
|
45
|
+
}), p({
|
|
43
46
|
component: t
|
|
44
|
-
}), (e,
|
|
47
|
+
}), (e, c) => (x(), F("div", S));
|
|
45
48
|
}
|
|
46
49
|
});
|
|
47
50
|
export {
|
|
48
|
-
|
|
51
|
+
j as default
|
|
49
52
|
};
|
|
50
53
|
//# sourceMappingURL=index.js.map
|