@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,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Graph as
|
|
3
|
-
import { useForwardProps as
|
|
4
|
-
import { componentAccessorKey as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as y, inject as F, computed as s, ref as m, onMounted as S, nextTick as g, onUnmounted as b, watch as r, createElementBlock as N, openBlock as k } from "vue";
|
|
2
|
+
import { Graph as c } from "@unovis/ts";
|
|
3
|
+
import { useForwardProps as h, arePropsEqual as f } from "../../utils/props.js";
|
|
4
|
+
import { componentAccessorKey as B } from "../../utils/context.js";
|
|
5
|
+
const P = { "data-vis-component": "" }, C = c.selectors, G = /* @__PURE__ */ y({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
zoomScaleExtent: {},
|
|
@@ -17,10 +17,10 @@ const L = { "data-vis-component": "" }, B = r.selectors, D = /* @__PURE__ */ s({
|
|
|
17
17
|
layoutAutofit: { type: Boolean },
|
|
18
18
|
layoutAutofitTolerance: {},
|
|
19
19
|
layoutNonConnectedAside: { type: Boolean },
|
|
20
|
-
layoutNodeGroup: {},
|
|
20
|
+
layoutNodeGroup: { type: [Function, String, null] },
|
|
21
21
|
layoutGroupOrder: {},
|
|
22
22
|
layoutParallelNodesPerColumn: {},
|
|
23
|
-
layoutParallelNodeSubGroup: {},
|
|
23
|
+
layoutParallelNodeSubGroup: { type: [Function, String, null] },
|
|
24
24
|
layoutParallelSubGroupsPerRow: {},
|
|
25
25
|
layoutParallelNodeSpacing: {},
|
|
26
26
|
layoutParallelSubGroupSpacing: {},
|
|
@@ -28,53 +28,53 @@ const L = { "data-vis-component": "" }, B = r.selectors, D = /* @__PURE__ */ s({
|
|
|
28
28
|
layoutParallelSortConnectionsByGroup: {},
|
|
29
29
|
forceLayoutSettings: {},
|
|
30
30
|
dagreLayoutSettings: {},
|
|
31
|
-
layoutElkSettings: {},
|
|
31
|
+
layoutElkSettings: { type: [Function, null] },
|
|
32
32
|
layoutElkNodeGroups: {},
|
|
33
33
|
layoutElkGetNodeShape: { type: Function },
|
|
34
|
-
linkWidth: {},
|
|
35
|
-
linkStyle: {},
|
|
36
|
-
linkBandWidth: {},
|
|
37
|
-
linkArrow: {},
|
|
38
|
-
linkStroke: {},
|
|
39
|
-
linkDisabled: {},
|
|
40
|
-
linkFlow: {},
|
|
41
|
-
linkFlowAnimDuration: {},
|
|
42
|
-
linkFlowParticleSize: {},
|
|
43
|
-
linkFlowParticleSpeed: {},
|
|
44
|
-
linkLabel: {},
|
|
45
|
-
linkLabelShiftFromCenter: {},
|
|
34
|
+
linkWidth: { type: [Function, Number, null] },
|
|
35
|
+
linkStyle: { type: [Function, null] },
|
|
36
|
+
linkBandWidth: { type: [Function, Number, null] },
|
|
37
|
+
linkArrow: { type: [Function, String, Boolean, null] },
|
|
38
|
+
linkStroke: { type: [Function, String, Array, null] },
|
|
39
|
+
linkDisabled: { type: [Function, Boolean, null] },
|
|
40
|
+
linkFlow: { type: [Function, Boolean, null] },
|
|
41
|
+
linkFlowAnimDuration: { type: [Function, Number, null] },
|
|
42
|
+
linkFlowParticleSize: { type: [Function, Number, null] },
|
|
43
|
+
linkFlowParticleSpeed: { type: [Function, Number, null] },
|
|
44
|
+
linkLabel: { type: [Function, Array, null] },
|
|
45
|
+
linkLabelShiftFromCenter: { type: [Function, Boolean, null] },
|
|
46
46
|
linkNeighborSpacing: {},
|
|
47
|
-
linkCurvature: {},
|
|
47
|
+
linkCurvature: { type: [Function, Number, null] },
|
|
48
48
|
linkHighlightOnHover: { type: Boolean },
|
|
49
|
-
linkSourcePointOffset: {},
|
|
50
|
-
linkTargetPointOffset: {},
|
|
49
|
+
linkSourcePointOffset: { type: [Function, Array, null] },
|
|
50
|
+
linkTargetPointOffset: { type: [Function, Array, null] },
|
|
51
51
|
selectedLinkId: {},
|
|
52
|
-
nodeSize: {},
|
|
53
|
-
nodeStrokeWidth: {},
|
|
54
|
-
nodeShape: {},
|
|
55
|
-
nodeGaugeValue: {},
|
|
56
|
-
nodeGaugeFill: {},
|
|
52
|
+
nodeSize: { type: [Function, Number, null] },
|
|
53
|
+
nodeStrokeWidth: { type: [Function, Number, null] },
|
|
54
|
+
nodeShape: { type: [Function, String, null] },
|
|
55
|
+
nodeGaugeValue: { type: [Function, Number, null] },
|
|
56
|
+
nodeGaugeFill: { type: [Function, String, Array, null] },
|
|
57
57
|
nodeGaugeAnimDuration: {},
|
|
58
|
-
nodeIcon: {},
|
|
59
|
-
nodeIconSize: {},
|
|
60
|
-
nodeLabel: {},
|
|
61
|
-
nodeLabelTrim: {},
|
|
62
|
-
nodeLabelTrimMode: {},
|
|
63
|
-
nodeLabelTrimLength: {},
|
|
64
|
-
nodeSubLabel: {},
|
|
65
|
-
nodeSubLabelTrim: {},
|
|
66
|
-
nodeSubLabelTrimMode: {},
|
|
67
|
-
nodeSubLabelTrimLength: {},
|
|
68
|
-
nodeSideLabels: {},
|
|
69
|
-
nodeBottomIcon: {},
|
|
70
|
-
nodeDisabled: {},
|
|
71
|
-
nodeFill: {},
|
|
72
|
-
nodeStroke: {},
|
|
58
|
+
nodeIcon: { type: [Function, String, null] },
|
|
59
|
+
nodeIconSize: { type: [Function, Number, null] },
|
|
60
|
+
nodeLabel: { type: [Function, String, null] },
|
|
61
|
+
nodeLabelTrim: { type: [Function, Boolean, null] },
|
|
62
|
+
nodeLabelTrimMode: { type: [Function, String, null] },
|
|
63
|
+
nodeLabelTrimLength: { type: [Function, Number, null] },
|
|
64
|
+
nodeSubLabel: { type: [Function, String, null] },
|
|
65
|
+
nodeSubLabelTrim: { type: [Function, Boolean, null] },
|
|
66
|
+
nodeSubLabelTrimMode: { type: [Function, String, null] },
|
|
67
|
+
nodeSubLabelTrimLength: { type: [Function, Number, null] },
|
|
68
|
+
nodeSideLabels: { type: [Function, Array, null] },
|
|
69
|
+
nodeBottomIcon: { type: [Function, String, null] },
|
|
70
|
+
nodeDisabled: { type: [Function, Boolean, null] },
|
|
71
|
+
nodeFill: { type: [Function, String, Array, null] },
|
|
72
|
+
nodeStroke: { type: [Function, String, Array, null] },
|
|
73
73
|
nodeSort: { type: Function },
|
|
74
|
-
nodeEnterPosition: {},
|
|
75
|
-
nodeEnterScale: {},
|
|
76
|
-
nodeExitPosition: {},
|
|
77
|
-
nodeExitScale: {},
|
|
74
|
+
nodeEnterPosition: { type: [Function, Array, null] },
|
|
75
|
+
nodeEnterScale: { type: [Function, Number, null] },
|
|
76
|
+
nodeExitPosition: { type: [Function, Array, null] },
|
|
77
|
+
nodeExitScale: { type: [Function, Number, null] },
|
|
78
78
|
nodeEnterCustomRenderFunction: { type: Function },
|
|
79
79
|
nodeUpdateCustomRenderFunction: { type: Function },
|
|
80
80
|
nodePartialUpdateCustomRenderFunction: { type: Function },
|
|
@@ -100,29 +100,29 @@ const L = { "data-vis-component": "" }, B = r.selectors, D = /* @__PURE__ */ s({
|
|
|
100
100
|
attributes: {},
|
|
101
101
|
data: {}
|
|
102
102
|
},
|
|
103
|
-
setup(
|
|
104
|
-
const
|
|
105
|
-
return
|
|
103
|
+
setup(p, { expose: d }) {
|
|
104
|
+
const t = F(B), u = p, o = s(() => t.data.value ?? u.data), l = h(u), e = m();
|
|
105
|
+
return S(() => {
|
|
106
106
|
g(() => {
|
|
107
|
-
var
|
|
108
|
-
|
|
107
|
+
var n;
|
|
108
|
+
e.value = new c(l.value), (n = e.value) == null || n.setData(o.value), t.update(e.value);
|
|
109
109
|
});
|
|
110
|
-
}),
|
|
111
|
-
var
|
|
112
|
-
(
|
|
113
|
-
}),
|
|
114
|
-
var
|
|
115
|
-
|
|
116
|
-
}),
|
|
117
|
-
var
|
|
118
|
-
(
|
|
119
|
-
}),
|
|
120
|
-
component:
|
|
121
|
-
}), (
|
|
110
|
+
}), b(() => {
|
|
111
|
+
var n;
|
|
112
|
+
(n = e.value) == null || n.destroy(), t.destroy();
|
|
113
|
+
}), r(l, (n, i) => {
|
|
114
|
+
var a;
|
|
115
|
+
f(n, i) || (a = e.value) == null || a.setConfig(l.value);
|
|
116
|
+
}), r(o, () => {
|
|
117
|
+
var n;
|
|
118
|
+
(n = e.value) == null || n.setData(o.value);
|
|
119
|
+
}), d({
|
|
120
|
+
component: e
|
|
121
|
+
}), (n, i) => (k(), N("div", P));
|
|
122
122
|
}
|
|
123
123
|
});
|
|
124
124
|
export {
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
C as VisGraphSelectors,
|
|
126
|
+
G as default
|
|
127
127
|
};
|
|
128
128
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/graph/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends GraphInputNode,L extends GraphInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Graph, GraphConfigInterface, GraphInputNode, GraphInputLink } 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 = GraphConfigInterface<N, L>\nconst props = defineProps<Props & { data?: { nodes: N[]; links?: L[] } }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Graph<N, L>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Graph<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\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisGraphSelectors = Graph.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisGraphSelectors","Graph","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAoBC,EAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/graph/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends GraphInputNode,L extends GraphInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Graph, GraphConfigInterface, GraphInputNode, GraphInputLink } 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 = GraphConfigInterface<N, L>\nconst props = defineProps<Props & { data?: { nodes: N[]; links?: L[] } }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Graph<N, L>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Graph<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\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisGraphSelectors = Graph.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisGraphSelectors","Graph","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,IAAoBC,EAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CvC,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"),
|
|
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"),v=require("../../utils/context.cjs"),y={"data-vis-component":""},m=l.GroupedBar.selectors,g=t.defineComponent({__name:"index",props:{color:{type:[Function,String,Array,null]},groupWidth:{},groupMaxWidth:{},dataStep:{},groupPadding:{},barPadding:{},roundedCorners:{type:[Number,Boolean]},barMinHeight:{},cursor:{type:[Function,String,null]},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(d,{expose:p}){const n=t.inject(v.componentAccessorKey),u=d,r=t.computed(()=>n.data.value??u.data),a=i.useForwardProps(u),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new l.GroupedBar(a.value),(e=o.value)==null||e.setData(r.value),n.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),n.destroy()}),t.watch(a,(e,c)=>{var s;i.arePropsEqual(e,c)||(s=o.value)==null||s.setConfig(a.value)}),t.watch(r,()=>{var e;(e=o.value)==null||e.setData(r.value)}),p({component:o}),(e,c)=>(t.openBlock(),t.createElementBlock("div",y))}});exports.VisGroupedBarSelectors=m;exports.default=g;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/grouped-bar/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { GroupedBar, GroupedBarConfigInterface, 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 = GroupedBarConfigInterface<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<GroupedBar<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new GroupedBar<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 VisGroupedBarSelectors = GroupedBar.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisGroupedBarSelectors","GroupedBar","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAyBC,EAAAA,WAAW,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/grouped-bar/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { GroupedBar, GroupedBarConfigInterface, 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 = GroupedBarConfigInterface<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<GroupedBar<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new GroupedBar<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 VisGroupedBarSelectors = GroupedBar.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisGroupedBarSelectors","GroupedBar","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,EAAyBC,EAAAA,WAAW,yhBA3CjD,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,aAAkBQ,EAAO,KAAK,GACpDM,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,69 +1,19 @@
|
|
|
1
|
-
import { GroupedBar,
|
|
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 { GroupedBar, GroupedBarConfigInterface } from '@unovis/ts';
|
|
2
|
+
|
|
3
|
+
export declare const VisGroupedBarSelectors: typeof import("@unovis/ts/components/grouped-bar/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>) & (GroupedBarConfigInterface<Datum> & {
|
|
40
6
|
data?: Datum[];
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
cursor?: import("@unovis/ts").StringAccessor<Datum>;
|
|
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
|
-
groupWidth?: number;
|
|
50
|
-
groupMaxWidth?: number;
|
|
51
|
-
dataStep?: number;
|
|
52
|
-
groupPadding?: number;
|
|
53
|
-
barPadding?: number;
|
|
54
|
-
roundedCorners?: number | boolean;
|
|
55
|
-
barMinHeight?: number;
|
|
56
|
-
orientation?: string;
|
|
57
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
58
|
-
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
59
|
-
component: import("vue").Ref<GroupedBar<Datum>, GroupedBar<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<GroupedBar<Datum>, GroupedBar<Datum>>;
|
|
60
10
|
}>): void;
|
|
61
11
|
attrs: any;
|
|
62
|
-
slots: {}
|
|
63
|
-
emit:
|
|
64
|
-
}>) => import(
|
|
12
|
+
slots: ReturnType<() => {}>;
|
|
13
|
+
emit: typeof __VLS_emit;
|
|
14
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
65
15
|
[key: string]: any;
|
|
66
16
|
}> & {
|
|
67
|
-
__ctx?:
|
|
17
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
68
18
|
};
|
|
69
19
|
export default _default;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { GroupedBar as
|
|
3
|
-
import { useForwardProps as
|
|
4
|
-
import { componentAccessorKey as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as d, inject as m, computed as y, ref as v, onMounted as f, nextTick as g, onUnmounted as x, watch as i, createElementBlock as F, openBlock as b } from "vue";
|
|
2
|
+
import { GroupedBar as s } from "@unovis/ts";
|
|
3
|
+
import { useForwardProps as _, arePropsEqual as h } from "../../utils/props.js";
|
|
4
|
+
import { componentAccessorKey as B } from "../../utils/context.js";
|
|
5
|
+
const S = { "data-vis-component": "" }, w = s.selectors, A = /* @__PURE__ */ d({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
|
-
color: {},
|
|
8
|
+
color: { type: [Function, String, Array, null] },
|
|
9
9
|
groupWidth: {},
|
|
10
10
|
groupMaxWidth: {},
|
|
11
11
|
dataStep: {},
|
|
@@ -13,10 +13,10 @@ const C = { "data-vis-component": "" }, w = i.selectors, D = /* @__PURE__ */ l({
|
|
|
13
13
|
barPadding: {},
|
|
14
14
|
roundedCorners: { type: [Number, Boolean] },
|
|
15
15
|
barMinHeight: {},
|
|
16
|
-
cursor: {},
|
|
16
|
+
cursor: { type: [Function, String, null] },
|
|
17
17
|
orientation: {},
|
|
18
|
-
x: {},
|
|
19
|
-
y: {},
|
|
18
|
+
x: { type: [Function, Number, null] },
|
|
19
|
+
y: { type: [Function, Number, null, Array] },
|
|
20
20
|
id: { type: Function },
|
|
21
21
|
xScale: { type: [Object, Function] },
|
|
22
22
|
yScale: { type: [Object, Function] },
|
|
@@ -26,29 +26,29 @@ const C = { "data-vis-component": "" }, w = i.selectors, D = /* @__PURE__ */ l({
|
|
|
26
26
|
attributes: {},
|
|
27
27
|
data: {}
|
|
28
28
|
},
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
31
|
-
return
|
|
32
|
-
|
|
29
|
+
setup(p, { expose: l }) {
|
|
30
|
+
const o = m(B), r = p, n = y(() => o.data.value ?? r.data), a = _(r), t = v();
|
|
31
|
+
return f(() => {
|
|
32
|
+
g(() => {
|
|
33
33
|
var e;
|
|
34
|
-
|
|
34
|
+
t.value = new s(a.value), (e = t.value) == null || e.setData(n.value), o.update(t.value);
|
|
35
35
|
});
|
|
36
|
-
}),
|
|
36
|
+
}), x(() => {
|
|
37
37
|
var e;
|
|
38
|
-
(e =
|
|
39
|
-
}),
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
}),
|
|
38
|
+
(e = t.value) == null || e.destroy(), o.destroy();
|
|
39
|
+
}), i(a, (e, u) => {
|
|
40
|
+
var c;
|
|
41
|
+
h(e, u) || (c = t.value) == null || c.setConfig(a.value);
|
|
42
|
+
}), i(n, () => {
|
|
43
43
|
var e;
|
|
44
|
-
(e =
|
|
45
|
-
}),
|
|
46
|
-
component:
|
|
47
|
-
}), (e,
|
|
44
|
+
(e = t.value) == null || e.setData(n.value);
|
|
45
|
+
}), l({
|
|
46
|
+
component: t
|
|
47
|
+
}), (e, u) => (b(), F("div", S));
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
export {
|
|
51
51
|
w as VisGroupedBarSelectors,
|
|
52
|
-
|
|
52
|
+
A as default
|
|
53
53
|
};
|
|
54
54
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/grouped-bar/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { GroupedBar, GroupedBarConfigInterface, 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 = GroupedBarConfigInterface<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<GroupedBar<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new GroupedBar<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 VisGroupedBarSelectors = GroupedBar.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisGroupedBarSelectors","GroupedBar","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAyBC,EAAW;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/grouped-bar/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { GroupedBar, GroupedBarConfigInterface, 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 = GroupedBarConfigInterface<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<GroupedBar<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new GroupedBar<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 VisGroupedBarSelectors = GroupedBar.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisGroupedBarSelectors","GroupedBar","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,IAAyBC,EAAW;;;;;;;;;;;;;;;;;;;;;;;;;AA3CjD,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,EAAkBQ,EAAO,KAAK,IACpDM,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"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),i=require("@unovis/ts"),s=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),v={"data-vis-component":""},m=i.Line.selectors,F=t.defineComponent({__name:"index",props:{color:{type:[Function,String,Array,null]},curveType:{},lineWidth:{},lineDashArray:{type:[Function,Array,null]},fallbackValue:{},highlightOnHover:{type:Boolean},cursor:{type:[Function,String,null]},interpolateMissingData:{type:Boolean},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),r=p,a=t.computed(()=>o.data.value??r.data),c=s.useForwardProps(r),n=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;n.value=new i.Line(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,u)=>{var l;s.arePropsEqual(e,u)||(l=n.value)==null||l.setConfig(c.value)}),t.watch(a,()=>{var e;(e=n.value)==null||e.setData(a.value)}),d({component:n}),(e,u)=>(t.openBlock(),t.createElementBlock("div",v))}});exports.VisLineSelectors=m;exports.default=F;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/line/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Line, LineConfigInterface, 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 = LineConfigInterface<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<Line<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Line<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 VisLineSelectors = Line.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisLineSelectors","Line","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/line/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Line, LineConfigInterface, 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 = LineConfigInterface<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<Line<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Line<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 VisLineSelectors = Line.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisLineSelectors","Line","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,siBA3CrC,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,67 +1,19 @@
|
|
|
1
|
-
import { Line,
|
|
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 { Line, LineConfigInterface } from '@unovis/ts';
|
|
2
|
+
|
|
3
|
+
export declare const VisLineSelectors: typeof import("@unovis/ts/components/line/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>) & (LineConfigInterface<Datum> & {
|
|
40
6
|
data?: Datum[];
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
curveType?: import("@unovis/ts").CurveType;
|
|
45
|
-
cursor?: import("@unovis/ts").StringAccessor<Datum[]>;
|
|
46
|
-
id?: (d: Datum, i: number, ...any: any[]) => string;
|
|
47
|
-
xScale?: import("@unovis/ts").ContinuousScale;
|
|
48
|
-
yScale?: import("@unovis/ts").ContinuousScale;
|
|
49
|
-
excludeFromDomainCalculation?: boolean;
|
|
50
|
-
lineWidth?: number;
|
|
51
|
-
lineDashArray?: import("@unovis/ts").GenericAccessor<number[], Datum[]>;
|
|
52
|
-
fallbackValue?: number;
|
|
53
|
-
highlightOnHover?: boolean;
|
|
54
|
-
interpolateMissingData?: boolean;
|
|
55
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
56
|
-
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
57
|
-
component: import("vue").Ref<Line<Datum>, Line<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<Line<Datum>, Line<Datum>>;
|
|
58
10
|
}>): void;
|
|
59
11
|
attrs: any;
|
|
60
|
-
slots: {}
|
|
61
|
-
emit:
|
|
62
|
-
}>) => import(
|
|
12
|
+
slots: ReturnType<() => {}>;
|
|
13
|
+
emit: typeof __VLS_emit;
|
|
14
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
63
15
|
[key: string]: any;
|
|
64
16
|
}> & {
|
|
65
|
-
__ctx?:
|
|
17
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
66
18
|
};
|
|
67
19
|
export default _default;
|
package/components/line/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as d, inject as m, computed as
|
|
2
|
-
import { Line as
|
|
3
|
-
import { useForwardProps as
|
|
4
|
-
import { componentAccessorKey as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as d, inject as m, computed as y, ref as v, onMounted as f, nextTick as F, onUnmounted as h, watch as u, createElementBlock as x, openBlock as _ } from "vue";
|
|
2
|
+
import { Line as i } from "@unovis/ts";
|
|
3
|
+
import { useForwardProps as g, arePropsEqual as b } from "../../utils/props.js";
|
|
4
|
+
import { componentAccessorKey as A } from "../../utils/context.js";
|
|
5
|
+
const B = { "data-vis-component": "" }, w = i.selectors, C = /* @__PURE__ */ d({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
|
-
color: {},
|
|
8
|
+
color: { type: [Function, String, Array, null] },
|
|
9
9
|
curveType: {},
|
|
10
10
|
lineWidth: {},
|
|
11
|
-
lineDashArray: {},
|
|
11
|
+
lineDashArray: { type: [Function, Array, null] },
|
|
12
12
|
fallbackValue: {},
|
|
13
13
|
highlightOnHover: { type: Boolean },
|
|
14
|
-
cursor: {},
|
|
14
|
+
cursor: { type: [Function, String, null] },
|
|
15
15
|
interpolateMissingData: { type: Boolean },
|
|
16
|
-
x: {},
|
|
17
|
-
y: {},
|
|
16
|
+
x: { type: [Function, Number, null] },
|
|
17
|
+
y: { type: [Function, Number, null, Array] },
|
|
18
18
|
id: { type: Function },
|
|
19
19
|
xScale: { type: [Object, Function] },
|
|
20
20
|
yScale: { type: [Object, Function] },
|
|
@@ -24,29 +24,29 @@ const b = { "data-vis-component": "" }, O = l.selectors, S = /* @__PURE__ */ d({
|
|
|
24
24
|
attributes: {},
|
|
25
25
|
data: {}
|
|
26
26
|
},
|
|
27
|
-
setup(
|
|
28
|
-
const
|
|
27
|
+
setup(s, { expose: p }) {
|
|
28
|
+
const n = m(A), r = s, o = y(() => n.data.value ?? r.data), a = g(r), t = v();
|
|
29
29
|
return f(() => {
|
|
30
|
-
|
|
30
|
+
F(() => {
|
|
31
31
|
var e;
|
|
32
|
-
t.value = new
|
|
32
|
+
t.value = new i(a.value), (e = t.value) == null || e.setData(o.value), n.update(t.value);
|
|
33
33
|
});
|
|
34
|
-
}),
|
|
34
|
+
}), h(() => {
|
|
35
35
|
var e;
|
|
36
|
-
(e = t.value) == null || e.destroy(),
|
|
37
|
-
}),
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
}),
|
|
36
|
+
(e = t.value) == null || e.destroy(), n.destroy();
|
|
37
|
+
}), u(a, (e, c) => {
|
|
38
|
+
var l;
|
|
39
|
+
b(e, c) || (l = t.value) == null || l.setConfig(a.value);
|
|
40
|
+
}), u(o, () => {
|
|
41
41
|
var e;
|
|
42
|
-
(e = t.value) == null || e.setData(
|
|
42
|
+
(e = t.value) == null || e.setData(o.value);
|
|
43
43
|
}), p({
|
|
44
44
|
component: t
|
|
45
|
-
}), (e,
|
|
45
|
+
}), (e, c) => (_(), x("div", B));
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
export {
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
w as VisLineSelectors,
|
|
50
|
+
C as default
|
|
51
51
|
};
|
|
52
52
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/line/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Line, LineConfigInterface, 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 = LineConfigInterface<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<Line<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Line<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 VisLineSelectors = Line.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisLineSelectors","Line","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/line/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Line, LineConfigInterface, 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 = LineConfigInterface<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<Line<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Line<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 VisLineSelectors = Line.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisLineSelectors","Line","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;;"}
|