@unovis/vue 1.7.0-pre.1 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/components/annotations/index.cjs +1 -1
- package/components/annotations/index.cjs.map +1 -1
- package/components/annotations/index.d.ts +18 -100
- package/components/annotations/index.js +18 -20
- package/components/annotations/index.js.map +1 -1
- package/components/area/index.cjs +1 -1
- package/components/area/index.cjs.map +1 -1
- package/components/area/index.d.ts +12 -64
- package/components/area/index.js +31 -32
- package/components/area/index.js.map +1 -1
- package/components/axis/index.cjs +1 -1
- package/components/axis/index.cjs.map +1 -1
- package/components/axis/index.d.ts +12 -82
- package/components/axis/index.js +29 -28
- package/components/axis/index.js.map +1 -1
- package/components/boxplot/index.cjs +2 -0
- package/components/boxplot/index.cjs.map +1 -0
- package/components/boxplot/index.d.ts +19 -0
- package/components/boxplot/index.js +31 -0
- package/components/boxplot/index.js.map +1 -0
- package/components/boxplot/index2.cjs +2 -0
- package/components/boxplot/index2.cjs.map +1 -0
- package/components/boxplot/index2.js +7 -0
- package/components/boxplot/index2.js.map +1 -0
- package/components/brush/index.cjs +1 -1
- package/components/brush/index.cjs.map +1 -1
- package/components/brush/index.d.ts +12 -62
- package/components/brush/index.js +26 -28
- package/components/brush/index.js.map +1 -1
- package/components/chord-diagram/index.cjs +1 -1
- package/components/chord-diagram/index.cjs.map +1 -1
- package/components/chord-diagram/index.d.ts +12 -60
- package/components/chord-diagram/index.js +30 -32
- package/components/chord-diagram/index.js.map +1 -1
- package/components/crosshair/index.cjs +1 -1
- package/components/crosshair/index.cjs.map +1 -1
- package/components/crosshair/index.d.ts +12 -66
- package/components/crosshair/index.js +20 -24
- package/components/crosshair/index.js.map +1 -1
- package/components/donut/index.cjs +1 -1
- package/components/donut/index.cjs.map +1 -1
- package/components/donut/index.d.ts +12 -64
- package/components/donut/index.js +24 -26
- package/components/donut/index.js.map +1 -1
- package/components/free-brush/index.cjs +1 -1
- package/components/free-brush/index.cjs.map +1 -1
- package/components/free-brush/index.d.ts +12 -62
- package/components/free-brush/index.js +25 -28
- package/components/free-brush/index.js.map +1 -1
- package/components/graph/index.cjs +1 -1
- package/components/graph/index.cjs.map +1 -1
- package/components/graph/index.d.ts +11 -135
- package/components/graph/index.js +70 -66
- package/components/graph/index.js.map +1 -1
- package/components/grouped-bar/index.cjs +1 -1
- package/components/grouped-bar/index.cjs.map +1 -1
- package/components/grouped-bar/index.d.ts +12 -62
- package/components/grouped-bar/index.js +27 -28
- package/components/grouped-bar/index.js.map +1 -1
- package/components/heatmap/index.cjs +2 -0
- package/components/heatmap/index.cjs.map +1 -0
- package/components/heatmap/index.d.ts +19 -0
- package/components/heatmap/index.js +49 -0
- package/components/heatmap/index.js.map +1 -0
- package/components/heatmap/index2.cjs +2 -0
- package/components/heatmap/index2.cjs.map +1 -0
- package/components/heatmap/index2.js +7 -0
- package/components/heatmap/index2.js.map +1 -0
- package/components/line/index.cjs +1 -1
- package/components/line/index.cjs.map +1 -1
- package/components/line/index.d.ts +12 -60
- package/components/line/index.js +28 -30
- package/components/line/index.js.map +1 -1
- package/components/nested-donut/index.cjs +1 -1
- package/components/nested-donut/index.cjs.map +1 -1
- package/components/nested-donut/index.d.ts +12 -65
- package/components/nested-donut/index.js +26 -29
- package/components/nested-donut/index.js.map +1 -1
- package/components/plotband/index.cjs +1 -1
- package/components/plotband/index.cjs.map +1 -1
- package/components/plotband/index.d.ts +12 -63
- package/components/plotband/index.js +17 -18
- package/components/plotband/index.js.map +1 -1
- package/components/plotline/index.cjs +1 -1
- package/components/plotline/index.cjs.map +1 -1
- package/components/plotline/index.d.ts +12 -64
- package/components/plotline/index.js +18 -19
- package/components/plotline/index.js.map +1 -1
- package/components/radial-bar/index.cjs +2 -0
- package/components/radial-bar/index.cjs.map +1 -0
- package/components/radial-bar/index.d.ts +19 -0
- package/components/radial-bar/index.js +54 -0
- package/components/radial-bar/index.js.map +1 -0
- package/components/radial-bar/index2.cjs +2 -0
- package/components/radial-bar/index2.cjs.map +1 -0
- package/components/radial-bar/index2.js +7 -0
- package/components/radial-bar/index2.js.map +1 -0
- package/components/sankey/index.cjs +1 -1
- package/components/sankey/index.cjs.map +1 -1
- package/components/sankey/index.d.ts +12 -106
- package/components/sankey/index.js +42 -41
- package/components/sankey/index.js.map +1 -1
- package/components/scatter/index.cjs +1 -1
- package/components/scatter/index.cjs.map +1 -1
- package/components/scatter/index.d.ts +12 -65
- package/components/scatter/index.js +33 -35
- package/components/scatter/index.js.map +1 -1
- package/components/stacked-bar/index.cjs +1 -1
- package/components/stacked-bar/index.cjs.map +1 -1
- package/components/stacked-bar/index.d.ts +12 -62
- package/components/stacked-bar/index.js +29 -29
- package/components/stacked-bar/index.js.map +1 -1
- package/components/timeline/index.cjs +1 -1
- package/components/timeline/index.cjs.map +1 -1
- package/components/timeline/index.d.ts +12 -88
- package/components/timeline/index.js +20 -24
- package/components/timeline/index.js.map +1 -1
- package/components/tooltip/index.cjs +1 -1
- package/components/tooltip/index.cjs.map +1 -1
- package/components/tooltip/index.d.ts +19 -99
- package/components/tooltip/index.js +15 -17
- package/components/tooltip/index.js.map +1 -1
- package/components/topojson-map/index.cjs +1 -1
- package/components/topojson-map/index.cjs.map +1 -1
- package/components/topojson-map/index.d.ts +12 -78
- package/components/topojson-map/index.js +66 -39
- package/components/topojson-map/index.js.map +1 -1
- package/components/treemap/index.cjs +1 -1
- package/components/treemap/index.cjs.map +1 -1
- package/components/treemap/index.d.ts +12 -69
- package/components/treemap/index.js +25 -26
- package/components/treemap/index.js.map +1 -1
- package/components/xy-labels/index.cjs +1 -1
- package/components/xy-labels/index.cjs.map +1 -1
- package/components/xy-labels/index.d.ts +12 -66
- package/components/xy-labels/index.js +36 -39
- package/components/xy-labels/index.js.map +1 -1
- package/components.d.ts +30 -27
- package/containers/single-container/index.cjs +1 -1
- package/containers/single-container/index.cjs.map +1 -1
- package/containers/single-container/index.d.ts +11 -26
- package/containers/single-container/index.js +26 -26
- package/containers/single-container/index.js.map +1 -1
- package/containers/xy-container/index.cjs +1 -1
- package/containers/xy-container/index.cjs.map +1 -1
- package/containers/xy-container/index.d.ts +12 -45
- package/containers/xy-container/index.js +25 -30
- package/containers/xy-container/index.js.map +1 -1
- package/containers.d.ts +2 -2
- package/html-components/bullet-legend/index.cjs +1 -1
- package/html-components/bullet-legend/index.cjs.map +1 -1
- package/html-components/bullet-legend/index.d.ts +18 -74
- package/html-components/bullet-legend/index.js +24 -25
- package/html-components/bullet-legend/index.js.map +1 -1
- package/html-components/flow-legend/index.cjs +1 -1
- package/html-components/flow-legend/index.cjs.map +1 -1
- package/html-components/flow-legend/index.d.ts +19 -85
- package/html-components/flow-legend/index.js +21 -23
- package/html-components/flow-legend/index.js.map +1 -1
- package/html-components/leaflet-flow-map/index.cjs +1 -1
- package/html-components/leaflet-flow-map/index.cjs.map +1 -1
- package/html-components/leaflet-flow-map/index.d.ts +12 -112
- package/html-components/leaflet-flow-map/index.js +46 -48
- package/html-components/leaflet-flow-map/index.js.map +1 -1
- package/html-components/leaflet-map/index.cjs +1 -1
- package/html-components/leaflet-map/index.cjs.map +1 -1
- package/html-components/leaflet-map/index.d.ts +12 -99
- package/html-components/leaflet-map/index.js +37 -39
- package/html-components/leaflet-map/index.js.map +1 -1
- package/html-components/rolling-pin-legend/index.cjs +1 -1
- package/html-components/rolling-pin-legend/index.cjs.map +1 -1
- package/html-components/rolling-pin-legend/index.d.ts +18 -50
- package/html-components/rolling-pin-legend/index.js +22 -24
- package/html-components/rolling-pin-legend/index.js.map +1 -1
- package/index.cjs +2 -2
- package/index.js +101 -92
- package/index.js.map +1 -1
- package/package.json +14 -13
- package/utils/context.cjs.map +1 -1
- package/utils/context.d.ts +1 -0
- package/utils/context.js +1 -1
- package/utils/context.js.map +1 -1
- package/utils/props.cjs +1 -1
- package/utils/props.cjs.map +1 -1
- package/utils/props.d.ts +2 -4
- package/utils/props.js +9 -9
- package/utils/props.js.map +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { RadialBarConfigInterface, RadialBar } from '@unovis/ts';
|
|
2
|
+
|
|
3
|
+
export declare const VisRadialBarSelectors: typeof import("@unovis/ts/components/radial-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>) & (RadialBarConfigInterface<Datum> & {
|
|
6
|
+
data?: 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<RadialBar<Datum>, RadialBar<Datum>>;
|
|
10
|
+
}>): void;
|
|
11
|
+
attrs: any;
|
|
12
|
+
slots: ReturnType<() => {}>;
|
|
13
|
+
emit: typeof __VLS_emit;
|
|
14
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}> & {
|
|
17
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { defineComponent as d, inject as p, computed as m, ref as v, onMounted as f, nextTick as y, onUnmounted as b, watch as c, openBlock as g, createElementBlock as B } from "vue";
|
|
2
|
+
import { RadialBar as u } from "@unovis/ts";
|
|
3
|
+
import { componentAccessorKey as _ } from "../../utils/context.js";
|
|
4
|
+
import { useForwardProps as k, arePropsEqual as F } from "../../utils/props.js";
|
|
5
|
+
const x = { "data-vis-component": "" }, w = u.selectors, S = /* @__PURE__ */ d({
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: {
|
|
8
|
+
id: { type: Function },
|
|
9
|
+
value: { type: [Function, Number, null] },
|
|
10
|
+
maxValue: { type: [Function, Number, null, Array] },
|
|
11
|
+
angleRange: {},
|
|
12
|
+
padAngle: {},
|
|
13
|
+
barMinAngle: {},
|
|
14
|
+
sortFunction: { type: Function },
|
|
15
|
+
cornerRadius: {},
|
|
16
|
+
color: { type: [Function, String, Array, null] },
|
|
17
|
+
radius: {},
|
|
18
|
+
trackWidth: {},
|
|
19
|
+
trackPadding: {},
|
|
20
|
+
reverseOrder: { type: Boolean },
|
|
21
|
+
centralLabel: {},
|
|
22
|
+
centralSubLabel: {},
|
|
23
|
+
centralSubLabelWrap: { type: Boolean },
|
|
24
|
+
centralLabelOffsetX: {},
|
|
25
|
+
centralLabelOffsetY: {},
|
|
26
|
+
showBackground: { type: Boolean },
|
|
27
|
+
backgroundAngleRange: {},
|
|
28
|
+
duration: {},
|
|
29
|
+
events: {},
|
|
30
|
+
attributes: {},
|
|
31
|
+
data: {}
|
|
32
|
+
},
|
|
33
|
+
setup(s, { expose: i }) {
|
|
34
|
+
const o = s, a = p(_), t = m(() => a.data.value ?? o.data), n = k(o), e = v();
|
|
35
|
+
return f(() => {
|
|
36
|
+
y(() => {
|
|
37
|
+
e.value = new u(n.value), e.value?.setData(t.value), a.update(e.value);
|
|
38
|
+
});
|
|
39
|
+
}), b(() => {
|
|
40
|
+
e.value?.destroy(), a.destroy();
|
|
41
|
+
}), c(n, (r, l) => {
|
|
42
|
+
F(r, l) || (e.value?.setConfig(n.value), e.value?.render());
|
|
43
|
+
}), c(t, () => {
|
|
44
|
+
e.value?.setData(t.value);
|
|
45
|
+
}), i({
|
|
46
|
+
component: e
|
|
47
|
+
}), (r, l) => (g(), B("div", x));
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
export {
|
|
51
|
+
w as VisRadialBarSelectors,
|
|
52
|
+
S as default
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/radial-bar/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { RadialBarConfigInterface } from '@unovis/ts'\nimport { RadialBar } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = RadialBarConfigInterface<Datum>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<RadialBar<Datum>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new RadialBar<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n component.value?.render()\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisRadialBarSelectors = RadialBar.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisRadialBarSelectors","RadialBar","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAmDaA,IAAwBC,EAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3C/C,UAAMC,IAAQC,GAERC,IAAWC,EAAOC,CAAoB,GAItCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,SAASF,EAAM,IAAI,GAEvDO,IAASC,EAAgBR,CAAK,GAG9BS,IAAYC,EAAA;AAElB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAiBQ,EAAO,KAAK,GACnDE,EAAU,OAAO,QAAQJ,EAAK,KAAK,GACnCH,EAAS,OAAOO,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBP,EAAS,QAAA;AAAA,IACX,CAAC,GAEDY,EAAMP,GAAQ,CAACQ,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDK,EAAMT,GAAM,MAAM;AAChB,MAAAI,EAAU,OAAO,QAAQJ,EAAK,KAAK;AAAA,IACrC,CAAC,GAEDa,EAAa;AAAA,MACX,WAAAT;AAAA,IAAA,CACD,cAQCU,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index2.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("@unovis/ts"),p=require("../../utils/context.cjs"),u=require("../../utils/props.cjs"),y={"data-vis-component":""},b=c.Sankey.selectors,g=e.defineComponent({__name:"index",props:{id:{type:Function},heightNormalizationCoeff:{},zoomScale:{},zoomPan:{},enableZoom:{type:Boolean},zoomExtent:{},zoomMode:{},disableZoomModifierKeys:{type:Boolean},exitTransitionType:{},enterTransitionType:{},highlightSubtreeOnHover:{type:Boolean},highlightDuration:{},highlightDelay:{},iterations:{},nodeSort:{type:[Function,null]},linkSort:{type:[Function,null]},nodeWidth:{},nodeAlign:{},nodeHorizontalSpacing:{},nodeMinHeight:{},nodeMaxHeight:{},nodePadding:{},nodeAdaptivePadding:{type:Boolean},showSingleNode:{type:Boolean},nodeCursor:{type:[Function,String,null]},nodeIcon:{type:[Function,String,null]},nodeColor:{type:[Function,String,Array,null]},nodePattern:{type:[Function,null]},nodeFixedValue:{type:[Function,Number,null]},nodeIconColor:{type:[Function,String,Array,null]},linkColor:{type:[Function,String,null]},linkPattern:{type:[Function,null]},linkValue:{type:[Function,Number,null]},linkCursor:{type:[Function,String,null]},label:{type:[Function,String,null]},subLabel:{type:[Function,String,null]},labelPosition:{type:[Function,String,null]},labelVerticalAlign:{},labelBackground:{type:Boolean},labelFit:{},labelMaxWidth:{},labelMaxWidthTakeAvailableSpace:{type:Boolean},labelMaxWidthTakeAvailableSpaceTolerance:{},labelExpandTrimmedOnHover:{type:Boolean},labelTrimMode:{},labelFontSize:{},labelTextSeparator:{},labelTextDecoration:{type:[Function,String,null]},labelForceWordBreak:{type:Boolean},labelColor:{type:[Function,String,Array,null]},labelCursor:{type:[Function,String,null]},labelVisibility:{type:Function},subLabelFontSize:{},subLabelColor:{type:[Function,String,Array,null]},subLabelPlacement:{},subLabelTextDecoration:{type:[Function,String,null]},subLabelToLabelInlineWidthRatio:{},onZoom:{type:Function},onLayoutCalculated:{type:Function},selectedNodeIds:{},duration:{},events:{},attributes:{},data:{}},setup(s,{expose:d}){const a=s,t=e.inject(p.componentAccessorKey),o=e.computed(()=>t.data.value??a.data),l=u.useForwardProps(a),n=e.ref();return e.onMounted(()=>{e.nextTick(()=>{n.value=new c.Sankey(l.value),n.value?.setData(o.value),t.update(n.value)})}),e.onUnmounted(()=>{n.value?.destroy(),t.destroy()}),e.watch(l,(i,r)=>{u.arePropsEqual(i,r)||(n.value?.setConfig(l.value),n.value?.render())}),e.watch(o,()=>{n.value?.setData(o.value)}),d({component:n}),(i,r)=>(e.openBlock(),e.createElementBlock("div",y))}});exports.VisSankeySelectors=b;exports.default=g;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/sankey/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends SankeyInputNode,L extends SankeyInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport {
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/sankey/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends SankeyInputNode, L extends SankeyInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { SankeyConfigInterface, SankeyInputLink, SankeyInputNode } from '@unovis/ts'\nimport { Sankey } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: { nodes: N[], links?: L[] } }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = SankeyConfigInterface<N, L>\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\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 component.value?.render()\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisSankeySelectors = Sankey.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisSankeySelectors","Sankey","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAmDaA,EAAqBC,EAAAA,OAAO,q3DA3CzC,MAAMC,EAAQC,EAERC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAOC,EAAAA,SAAS,IAAMJ,EAAS,KAAK,OAASF,EAAM,IAAI,EAEvDO,EAASC,EAAAA,gBAAgBR,CAAK,EAG9BS,EAAYC,EAAAA,IAAA,EAElBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIV,SAAaQ,EAAO,KAAK,EAC/CE,EAAU,OAAO,QAAQJ,EAAK,KAAK,EACnCH,EAAS,OAAOO,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBP,EAAS,QAAA,CACX,CAAC,EAEDY,EAAAA,MAAMP,EAAQ,CAACQ,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAEDK,EAAAA,MAAMT,EAAM,IAAM,CAChBI,EAAU,OAAO,QAAQJ,EAAK,KAAK,CACrC,CAAC,EAEDa,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
|
|
@@ -1,116 +1,22 @@
|
|
|
1
|
-
import { Sankey } from '@unovis/ts';
|
|
2
|
-
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
slots: any;
|
|
7
|
-
}, __VLS_expose?: any, __VLS_setup?: Promise<{
|
|
8
|
-
props: {
|
|
9
|
-
duration?: number;
|
|
10
|
-
events?: {
|
|
11
|
-
[selector: string]: {
|
|
12
|
-
touchstart?: import("@unovis/ts").VisEventCallback<any>;
|
|
13
|
-
touchmove?: import("@unovis/ts").VisEventCallback<any>;
|
|
14
|
-
touchend?: import("@unovis/ts").VisEventCallback<any>;
|
|
15
|
-
mouseover?: import("@unovis/ts").VisEventCallback<any>;
|
|
16
|
-
mousemove?: import("@unovis/ts").VisEventCallback<any>;
|
|
17
|
-
mousedown?: import("@unovis/ts").VisEventCallback<any>;
|
|
18
|
-
mouseup?: import("@unovis/ts").VisEventCallback<any>;
|
|
19
|
-
click?: import("@unovis/ts").VisEventCallback<any>;
|
|
20
|
-
auxclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
21
|
-
contextmenu?: import("@unovis/ts").VisEventCallback<any>;
|
|
22
|
-
dblclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
23
|
-
mouseenter?: import("@unovis/ts").VisEventCallback<any>;
|
|
24
|
-
mouseleave?: import("@unovis/ts").VisEventCallback<any>;
|
|
25
|
-
mouseout?: import("@unovis/ts").VisEventCallback<any>;
|
|
26
|
-
scroll?: import("@unovis/ts").VisEventCallback<any>;
|
|
27
|
-
select?: import("@unovis/ts").VisEventCallback<any>;
|
|
28
|
-
wheel?: import("@unovis/ts").VisEventCallback<any>;
|
|
29
|
-
pointerdown?: import("@unovis/ts").VisEventCallback<any>;
|
|
30
|
-
pointerup?: import("@unovis/ts").VisEventCallback<any>;
|
|
31
|
-
pointerout?: import("@unovis/ts").VisEventCallback<any>;
|
|
32
|
-
pointermove?: import("@unovis/ts").VisEventCallback<any>;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
attributes?: {
|
|
36
|
-
[selector: string]: {
|
|
37
|
-
[attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
|
|
38
|
-
};
|
|
39
|
-
};
|
|
1
|
+
import { SankeyConfigInterface, SankeyInputLink, SankeyInputNode, Sankey } from '@unovis/ts';
|
|
2
|
+
|
|
3
|
+
export declare const VisSankeySelectors: typeof import("@unovis/ts/components/sankey/style");
|
|
4
|
+
declare const _default: <N extends SankeyInputNode, L extends SankeyInputLink>(__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>) & (SankeyConfigInterface<N, L> & {
|
|
40
6
|
data?: {
|
|
41
7
|
nodes: N[];
|
|
42
8
|
links?: L[];
|
|
43
9
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
labelColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").SankeyNode<N, L>>;
|
|
48
|
-
linkColor?: import("@unovis/ts").StringAccessor<import("@unovis/ts").SankeyLink<N, L>>;
|
|
49
|
-
linkValue?: import("@unovis/ts").NumericAccessor<L>;
|
|
50
|
-
nodeWidth?: number;
|
|
51
|
-
nodeColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").SankeyNode<N, L>>;
|
|
52
|
-
nodeIcon?: import("@unovis/ts").StringAccessor<import("@unovis/ts").SankeyNode<N, L>>;
|
|
53
|
-
nodeSort?: (node1: import("@unovis/ts").SankeyNode<N, L>, node2: import("@unovis/ts").SankeyNode<N, L>) => number;
|
|
54
|
-
selectedNodeIds?: string[];
|
|
55
|
-
onZoom?: (horizontalScale: number, verticalScale: number, panX: number, panY: number, zoomExtent: [number, number], event: import("d3-zoom").D3ZoomEvent<SVGGElement, unknown>) => void;
|
|
56
|
-
labelPosition?: import("@unovis/ts").GenericAccessor<string, import("@unovis/ts").SankeyNode<N, L>>;
|
|
57
|
-
heightNormalizationCoeff?: number;
|
|
58
|
-
zoomScale?: [number, number];
|
|
59
|
-
zoomPan?: [number, number];
|
|
60
|
-
enableZoom?: boolean;
|
|
61
|
-
zoomExtent?: [number, number];
|
|
62
|
-
zoomMode?: string;
|
|
63
|
-
exitTransitionType?: import("@unovis/ts").SankeyExitTransitionType;
|
|
64
|
-
enterTransitionType?: import("@unovis/ts").SankeyEnterTransitionType;
|
|
65
|
-
highlightSubtreeOnHover?: boolean;
|
|
66
|
-
highlightDuration?: number;
|
|
67
|
-
highlightDelay?: number;
|
|
68
|
-
iterations?: number;
|
|
69
|
-
linkSort?: (link1: import("@unovis/ts").SankeyLink<N, L>, link2: import("@unovis/ts").SankeyLink<N, L>) => number;
|
|
70
|
-
nodeAlign?: import("@unovis/ts").SankeyNodeAlign;
|
|
71
|
-
nodeHorizontalSpacing?: number;
|
|
72
|
-
nodeMinHeight?: number;
|
|
73
|
-
nodeMaxHeight?: number;
|
|
74
|
-
nodePadding?: number;
|
|
75
|
-
showSingleNode?: boolean;
|
|
76
|
-
nodeCursor?: import("@unovis/ts").StringAccessor<import("@unovis/ts").SankeyNode<N, L>>;
|
|
77
|
-
nodeFixedValue?: import("@unovis/ts").NumericAccessor<N>;
|
|
78
|
-
nodeIconColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").SankeyNode<N, L>>;
|
|
79
|
-
linkCursor?: import("@unovis/ts").StringAccessor<import("@unovis/ts").SankeyLink<N, L>>;
|
|
80
|
-
subLabel?: import("@unovis/ts").StringAccessor<import("@unovis/ts").SankeyNode<N, L>>;
|
|
81
|
-
labelVerticalAlign?: string;
|
|
82
|
-
labelBackground?: boolean;
|
|
83
|
-
labelFit?: import("@unovis/ts").FitMode;
|
|
84
|
-
labelMaxWidth?: number;
|
|
85
|
-
labelMaxWidthTakeAvailableSpace?: boolean;
|
|
86
|
-
labelMaxWidthTakeAvailableSpaceTolerance?: number;
|
|
87
|
-
labelExpandTrimmedOnHover?: boolean;
|
|
88
|
-
labelTrimMode?: import("@unovis/ts").TrimMode;
|
|
89
|
-
labelTextSeparator?: string[];
|
|
90
|
-
labelTextDecoration?: import("@unovis/ts").StringAccessor<import("@unovis/ts").SankeyNode<N, L>>;
|
|
91
|
-
labelForceWordBreak?: boolean;
|
|
92
|
-
labelCursor?: import("@unovis/ts").StringAccessor<import("@unovis/ts").SankeyNode<N, L>>;
|
|
93
|
-
labelVisibility?: (d: import("@unovis/ts").SankeyNode<N, L>, bbox: {
|
|
94
|
-
x: number;
|
|
95
|
-
y: number;
|
|
96
|
-
width: number;
|
|
97
|
-
height: number;
|
|
98
|
-
}, hovered: boolean) => boolean;
|
|
99
|
-
subLabelFontSize?: number;
|
|
100
|
-
subLabelColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").SankeyNode<N, L>>;
|
|
101
|
-
subLabelPlacement?: string;
|
|
102
|
-
subLabelTextDecoration?: import("@unovis/ts").StringAccessor<import("@unovis/ts").SankeyNode<N, L>>;
|
|
103
|
-
subLabelToLabelInlineWidthRatio?: number;
|
|
104
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
105
|
-
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
106
|
-
component: import("vue").Ref<Sankey<N, L>, Sankey<N, L>>;
|
|
10
|
+
}), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
|
|
11
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
12
|
+
component: import('vue').Ref<Sankey<N, L>, Sankey<N, L>>;
|
|
107
13
|
}>): void;
|
|
108
14
|
attrs: any;
|
|
109
|
-
slots: {}
|
|
110
|
-
emit:
|
|
111
|
-
}>) => import(
|
|
15
|
+
slots: ReturnType<() => {}>;
|
|
16
|
+
emit: typeof __VLS_emit;
|
|
17
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
112
18
|
[key: string]: any;
|
|
113
19
|
}> & {
|
|
114
|
-
__ctx?:
|
|
20
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
115
21
|
};
|
|
116
22
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Sankey as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
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 r, openBlock as S, createElementBlock as h } from "vue";
|
|
2
|
+
import { Sankey as u } from "@unovis/ts";
|
|
3
|
+
import { componentAccessorKey as v } from "../../utils/context.js";
|
|
4
|
+
import { useForwardProps as x, arePropsEqual as f } from "../../utils/props.js";
|
|
5
|
+
const k = { "data-vis-component": "" }, M = u.selectors, P = /* @__PURE__ */ d({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
id: { type: Function },
|
|
@@ -12,6 +12,7 @@ const B = { "data-vis-component": "" }, _ = d.selectors, L = /* @__PURE__ */ p({
|
|
|
12
12
|
enableZoom: { type: Boolean },
|
|
13
13
|
zoomExtent: {},
|
|
14
14
|
zoomMode: {},
|
|
15
|
+
disableZoomModifierKeys: { type: Boolean },
|
|
15
16
|
exitTransitionType: {},
|
|
16
17
|
enterTransitionType: {},
|
|
17
18
|
highlightSubtreeOnHover: { type: Boolean },
|
|
@@ -26,18 +27,21 @@ const B = { "data-vis-component": "" }, _ = d.selectors, L = /* @__PURE__ */ p({
|
|
|
26
27
|
nodeMinHeight: {},
|
|
27
28
|
nodeMaxHeight: {},
|
|
28
29
|
nodePadding: {},
|
|
30
|
+
nodeAdaptivePadding: { type: Boolean },
|
|
29
31
|
showSingleNode: { type: Boolean },
|
|
30
|
-
nodeCursor: {},
|
|
31
|
-
nodeIcon: {},
|
|
32
|
-
nodeColor: {},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
nodeCursor: { type: [Function, String, null] },
|
|
33
|
+
nodeIcon: { type: [Function, String, null] },
|
|
34
|
+
nodeColor: { type: [Function, String, Array, null] },
|
|
35
|
+
nodePattern: { type: [Function, null] },
|
|
36
|
+
nodeFixedValue: { type: [Function, Number, null] },
|
|
37
|
+
nodeIconColor: { type: [Function, String, Array, null] },
|
|
38
|
+
linkColor: { type: [Function, String, null] },
|
|
39
|
+
linkPattern: { type: [Function, null] },
|
|
40
|
+
linkValue: { type: [Function, Number, null] },
|
|
41
|
+
linkCursor: { type: [Function, String, null] },
|
|
42
|
+
label: { type: [Function, String, null] },
|
|
43
|
+
subLabel: { type: [Function, String, null] },
|
|
44
|
+
labelPosition: { type: [Function, String, null] },
|
|
41
45
|
labelVerticalAlign: {},
|
|
42
46
|
labelBackground: { type: Boolean },
|
|
43
47
|
labelFit: {},
|
|
@@ -48,46 +52,43 @@ const B = { "data-vis-component": "" }, _ = d.selectors, L = /* @__PURE__ */ p({
|
|
|
48
52
|
labelTrimMode: {},
|
|
49
53
|
labelFontSize: {},
|
|
50
54
|
labelTextSeparator: {},
|
|
51
|
-
labelTextDecoration: {},
|
|
55
|
+
labelTextDecoration: { type: [Function, String, null] },
|
|
52
56
|
labelForceWordBreak: { type: Boolean },
|
|
53
|
-
labelColor: {},
|
|
54
|
-
labelCursor: {},
|
|
57
|
+
labelColor: { type: [Function, String, Array, null] },
|
|
58
|
+
labelCursor: { type: [Function, String, null] },
|
|
55
59
|
labelVisibility: { type: Function },
|
|
56
60
|
subLabelFontSize: {},
|
|
57
|
-
subLabelColor: {},
|
|
61
|
+
subLabelColor: { type: [Function, String, Array, null] },
|
|
58
62
|
subLabelPlacement: {},
|
|
59
|
-
subLabelTextDecoration: {},
|
|
63
|
+
subLabelTextDecoration: { type: [Function, String, null] },
|
|
60
64
|
subLabelToLabelInlineWidthRatio: {},
|
|
61
65
|
onZoom: { type: Function },
|
|
66
|
+
onLayoutCalculated: { type: Function },
|
|
62
67
|
selectedNodeIds: {},
|
|
63
68
|
duration: {},
|
|
64
69
|
events: {},
|
|
65
70
|
attributes: {},
|
|
66
71
|
data: {}
|
|
67
72
|
},
|
|
68
|
-
setup(c, { expose:
|
|
69
|
-
const
|
|
70
|
-
return
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
o.value = new d(n.value), (e = o.value) == null || e.setData(t.value), a.update(o.value);
|
|
73
|
+
setup(c, { expose: p }) {
|
|
74
|
+
const l = c, n = s(v), o = y(() => n.data.value ?? l.data), t = x(l), e = b();
|
|
75
|
+
return g(() => {
|
|
76
|
+
m(() => {
|
|
77
|
+
e.value = new u(t.value), e.value?.setData(o.value), n.update(e.value);
|
|
74
78
|
});
|
|
75
|
-
}),
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}),
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}), u({
|
|
85
|
-
component: o
|
|
86
|
-
}), (e, i) => (S(), x("div", B));
|
|
79
|
+
}), F(() => {
|
|
80
|
+
e.value?.destroy(), n.destroy();
|
|
81
|
+
}), r(t, (a, i) => {
|
|
82
|
+
f(a, i) || (e.value?.setConfig(t.value), e.value?.render());
|
|
83
|
+
}), r(o, () => {
|
|
84
|
+
e.value?.setData(o.value);
|
|
85
|
+
}), p({
|
|
86
|
+
component: e
|
|
87
|
+
}), (a, i) => (S(), h("div", k));
|
|
87
88
|
}
|
|
88
89
|
});
|
|
89
90
|
export {
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
M as VisSankeySelectors,
|
|
92
|
+
P as default
|
|
92
93
|
};
|
|
93
94
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/sankey/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends SankeyInputNode,L extends SankeyInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/sankey/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends SankeyInputNode, L extends SankeyInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { SankeyConfigInterface, SankeyInputLink, SankeyInputNode } from '@unovis/ts'\nimport { Sankey } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: { nodes: N[], links?: L[] } }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = SankeyConfigInterface<N, L>\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\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 component.value?.render()\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisSankeySelectors = Sankey.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisSankeySelectors","Sankey","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAmDaA,IAAqBC,EAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CzC,UAAMC,IAAQC,GAERC,IAAWC,EAAOC,CAAoB,GAItCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,SAASF,EAAM,IAAI,GAEvDO,IAASC,EAAgBR,CAAK,GAG9BS,IAAYC,EAAA;AAElB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAaQ,EAAO,KAAK,GAC/CE,EAAU,OAAO,QAAQJ,EAAK,KAAK,GACnCH,EAAS,OAAOO,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBP,EAAS,QAAA;AAAA,IACX,CAAC,GAEDY,EAAMP,GAAQ,CAACQ,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDK,EAAMT,GAAM,MAAM;AAChB,MAAAI,EAAU,OAAO,QAAQJ,EAAK,KAAK;AAAA,IACrC,CAAC,GAEDa,EAAa;AAAA,MACX,WAAAT;AAAA,IAAA,CACD,cAQCU,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@unovis/ts"),y=require("../../utils/context.cjs"),u=require("../../utils/props.cjs"),d={"data-vis-component":""},v=i.Scatter.selectors,F=e.defineComponent({__name:"index",props:{color:{type:[Function,String,Array,null]},pattern:{type:[Function,null]},size:{type:[Function,Number,null]},sizeScale:{type:[Object,Function]},sizeRange:{},shape:{type:[Function,String]},label:{type:[Function,String,null]},labelColor:{type:[Function,String,Array,null]},labelHideOverlapping:{type:Boolean},cursor:{type:[Function,String,null]},labelTextBrightnessRatio:{},labelPosition:{type:[Function,String,null]},strokeColor:{type:[Function,String,Array,null]},strokeWidth:{type:[Function,Number,null]},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},colorKeys:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(s,{expose:p}){const l=s,n=e.inject(y.componentAccessorKey),o=e.computed(()=>n.data.value??l.data),r=u.useForwardProps(l),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new i.Scatter(r.value),t.value?.setData(o.value),n.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),n.destroy()}),e.watch(r,(a,c)=>{u.arePropsEqual(a,c)||(t.value?.setConfig(r.value),t.value?.render())}),e.watch(o,()=>{t.value?.setData(o.value)}),p({component:t}),(a,c)=>(e.openBlock(),e.createElementBlock("div",d))}});exports.VisScatterSelectors=v;exports.default=F;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/scatter/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport {
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/scatter/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { ScatterConfigInterface } from '@unovis/ts'\nimport { Scatter } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = ScatterConfigInterface<Datum>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Scatter<Datum>>()\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 component.value?.render()\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisScatterSelectors = Scatter.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisScatterSelectors","Scatter","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAmDaA,EAAsBC,EAAAA,QAAQ,i0BA3C3C,MAAMC,EAAQC,EAERC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAOC,EAAAA,SAAS,IAAMJ,EAAS,KAAK,OAASF,EAAM,IAAI,EAEvDO,EAASC,EAAAA,gBAAgBR,CAAK,EAG9BS,EAAYC,EAAAA,IAAA,EAElBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIV,UAAeQ,EAAO,KAAK,EACjDE,EAAU,OAAO,QAAQJ,EAAK,KAAK,EACnCH,EAAS,OAAOO,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBP,EAAS,QAAA,CACX,CAAC,EAEDY,EAAAA,MAAMP,EAAQ,CAACQ,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAEDK,EAAAA,MAAMT,EAAM,IAAM,CAChBI,EAAU,OAAO,QAAQJ,EAAK,KAAK,CACrC,CAAC,EAEDa,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
|
|
@@ -1,72 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
slots: any;
|
|
7
|
-
}, __VLS_expose?: any, __VLS_setup?: Promise<{
|
|
8
|
-
props: {
|
|
9
|
-
duration?: number;
|
|
10
|
-
events?: {
|
|
11
|
-
[selector: string]: {
|
|
12
|
-
touchstart?: import("@unovis/ts").VisEventCallback<any>;
|
|
13
|
-
touchmove?: import("@unovis/ts").VisEventCallback<any>;
|
|
14
|
-
touchend?: import("@unovis/ts").VisEventCallback<any>;
|
|
15
|
-
mouseover?: import("@unovis/ts").VisEventCallback<any>;
|
|
16
|
-
mousemove?: import("@unovis/ts").VisEventCallback<any>;
|
|
17
|
-
mousedown?: import("@unovis/ts").VisEventCallback<any>;
|
|
18
|
-
mouseup?: import("@unovis/ts").VisEventCallback<any>;
|
|
19
|
-
click?: import("@unovis/ts").VisEventCallback<any>;
|
|
20
|
-
auxclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
21
|
-
contextmenu?: import("@unovis/ts").VisEventCallback<any>;
|
|
22
|
-
dblclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
23
|
-
mouseenter?: import("@unovis/ts").VisEventCallback<any>;
|
|
24
|
-
mouseleave?: import("@unovis/ts").VisEventCallback<any>;
|
|
25
|
-
mouseout?: import("@unovis/ts").VisEventCallback<any>;
|
|
26
|
-
scroll?: import("@unovis/ts").VisEventCallback<any>;
|
|
27
|
-
select?: import("@unovis/ts").VisEventCallback<any>;
|
|
28
|
-
wheel?: import("@unovis/ts").VisEventCallback<any>;
|
|
29
|
-
pointerdown?: import("@unovis/ts").VisEventCallback<any>;
|
|
30
|
-
pointerup?: import("@unovis/ts").VisEventCallback<any>;
|
|
31
|
-
pointerout?: import("@unovis/ts").VisEventCallback<any>;
|
|
32
|
-
pointermove?: import("@unovis/ts").VisEventCallback<any>;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
attributes?: {
|
|
36
|
-
[selector: string]: {
|
|
37
|
-
[attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
|
|
38
|
-
};
|
|
39
|
-
};
|
|
1
|
+
import { ScatterConfigInterface, Scatter } from '@unovis/ts';
|
|
2
|
+
|
|
3
|
+
export declare const VisScatterSelectors: typeof import("@unovis/ts/components/scatter/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>) & (ScatterConfigInterface<Datum> & {
|
|
40
6
|
data?: Datum[];
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
color?: import("@unovis/ts").ColorAccessor<Datum>;
|
|
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
|
-
labelColor?: import("@unovis/ts").ColorAccessor<Datum>;
|
|
51
|
-
strokeColor?: import("@unovis/ts").ColorAccessor<Datum>;
|
|
52
|
-
strokeWidth?: NumericAccessor<Datum>;
|
|
53
|
-
labelPosition?: import("@unovis/ts").GenericAccessor<string, Datum>;
|
|
54
|
-
size?: NumericAccessor<Datum>;
|
|
55
|
-
sizeScale?: import("@unovis/ts").ContinuousScale;
|
|
56
|
-
sizeRange?: [number, number];
|
|
57
|
-
shape?: string | ((d: Datum, i?: number, ...any: unknown[]) => string);
|
|
58
|
-
labelHideOverlapping?: boolean;
|
|
59
|
-
labelTextBrightnessRatio?: number;
|
|
60
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
61
|
-
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
62
|
-
component: import("vue").Ref<Scatter<Datum>, Scatter<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<Scatter<Datum>, Scatter<Datum>>;
|
|
63
10
|
}>): void;
|
|
64
11
|
attrs: any;
|
|
65
|
-
slots: {}
|
|
66
|
-
emit:
|
|
67
|
-
}>) => import(
|
|
12
|
+
slots: ReturnType<() => {}>;
|
|
13
|
+
emit: typeof __VLS_emit;
|
|
14
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
68
15
|
[key: string]: any;
|
|
69
16
|
}> & {
|
|
70
|
-
__ctx?:
|
|
17
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
71
18
|
};
|
|
72
19
|
export default _default;
|