@unovis/vue 1.3.0-alpha.4 → 1.3.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/area/index.cjs +1 -1
- package/components/area/index.cjs.map +1 -1
- package/components/area/index.d.ts +4 -4
- package/components/area/index.js +20 -17
- package/components/area/index.js.map +1 -1
- package/components/axis/index.cjs +1 -1
- package/components/axis/index.cjs.map +1 -1
- package/components/axis/index.d.ts +4 -4
- package/components/axis/index.js +20 -17
- package/components/axis/index.js.map +1 -1
- package/components/brush/index.cjs +1 -1
- package/components/brush/index.cjs.map +1 -1
- package/components/brush/index.d.ts +3 -3
- package/components/brush/index.js +19 -16
- package/components/brush/index.js.map +1 -1
- package/components/chord-diagram/index.cjs +1 -1
- package/components/chord-diagram/index.cjs.map +1 -1
- package/components/chord-diagram/index.d.ts +6 -6
- package/components/chord-diagram/index.js +20 -17
- package/components/chord-diagram/index.js.map +1 -1
- package/components/crosshair/index.cjs +1 -1
- package/components/crosshair/index.cjs.map +1 -1
- package/components/crosshair/index.d.ts +9 -9
- package/components/crosshair/index.js +20 -35
- package/components/crosshair/index.js.map +1 -1
- package/components/donut/index.cjs +1 -1
- package/components/donut/index.cjs.map +1 -1
- package/components/donut/index.d.ts +3 -3
- package/components/donut/index.js +21 -18
- package/components/donut/index.js.map +1 -1
- package/components/free-brush/index.cjs +1 -1
- package/components/free-brush/index.cjs.map +1 -1
- package/components/free-brush/index.d.ts +3 -3
- package/components/free-brush/index.js +21 -18
- package/components/free-brush/index.js.map +1 -1
- package/components/graph/index.cjs +1 -1
- package/components/graph/index.cjs.map +1 -1
- package/components/graph/index.d.ts +3 -3
- package/components/graph/index.js +24 -21
- package/components/graph/index.js.map +1 -1
- package/components/grouped-bar/index.cjs +1 -1
- package/components/grouped-bar/index.cjs.map +1 -1
- package/components/grouped-bar/index.d.ts +3 -3
- package/components/grouped-bar/index.js +21 -18
- package/components/grouped-bar/index.js.map +1 -1
- package/components/line/index.cjs +1 -1
- package/components/line/index.cjs.map +1 -1
- package/components/line/index.d.ts +4 -4
- package/components/line/index.js +20 -17
- package/components/line/index.js.map +1 -1
- package/components/nested-donut/index.cjs +1 -1
- package/components/nested-donut/index.cjs.map +1 -1
- package/components/nested-donut/index.d.ts +2 -2
- package/components/nested-donut/index.js +22 -19
- package/components/nested-donut/index.js.map +1 -1
- package/components/sankey/index.cjs +1 -1
- package/components/sankey/index.cjs.map +1 -1
- package/components/sankey/index.d.ts +2 -2
- package/components/sankey/index.js +28 -25
- package/components/sankey/index.js.map +1 -1
- package/components/scatter/index.cjs +1 -1
- package/components/scatter/index.cjs.map +1 -1
- package/components/scatter/index.d.ts +3 -3
- package/components/scatter/index.js +22 -19
- package/components/scatter/index.js.map +1 -1
- package/components/stacked-bar/index.cjs +1 -1
- package/components/stacked-bar/index.cjs.map +1 -1
- package/components/stacked-bar/index.d.ts +3 -3
- package/components/stacked-bar/index.js +22 -19
- package/components/stacked-bar/index.js.map +1 -1
- package/components/timeline/index.cjs +1 -1
- package/components/timeline/index.cjs.map +1 -1
- package/components/timeline/index.d.ts +4 -4
- package/components/timeline/index.js +22 -41
- package/components/timeline/index.js.map +1 -1
- package/components/tooltip/index.cjs +1 -1
- package/components/tooltip/index.cjs.map +1 -1
- package/components/tooltip/index.d.ts +2 -2
- package/components/tooltip/index.js +18 -18
- package/components/tooltip/index.js.map +1 -1
- package/components/topojson-map/index.cjs +1 -1
- package/components/topojson-map/index.cjs.map +1 -1
- package/components/topojson-map/index.d.ts +4 -4
- package/components/topojson-map/index.js +22 -19
- package/components/topojson-map/index.js.map +1 -1
- package/components/xy-labels/index.cjs +1 -1
- package/components/xy-labels/index.cjs.map +1 -1
- package/components/xy-labels/index.d.ts +3 -3
- package/components/xy-labels/index.js +27 -24
- package/components/xy-labels/index.js.map +1 -1
- package/containers/single-container/index.cjs +1 -1
- package/containers/single-container/index.cjs.map +1 -1
- package/containers/single-container/index.d.ts +4 -5
- package/containers/single-container/index.js +28 -29
- package/containers/single-container/index.js.map +1 -1
- package/containers/xy-container/index.cjs +1 -1
- package/containers/xy-container/index.cjs.map +1 -1
- package/containers/xy-container/index.d.ts +4 -5
- package/containers/xy-container/index.js +33 -33
- package/containers/xy-container/index.js.map +1 -1
- package/html-components/bullet-legend/index.cjs +1 -1
- package/html-components/bullet-legend/index.cjs.map +1 -1
- package/html-components/bullet-legend/index.js +17 -17
- package/html-components/bullet-legend/index.js.map +1 -1
- package/html-components/leaflet-flow-map/index.cjs +1 -1
- package/html-components/leaflet-flow-map/index.cjs.map +1 -1
- package/html-components/leaflet-flow-map/index.d.ts +4 -4
- package/html-components/leaflet-flow-map/index.js +18 -18
- package/html-components/leaflet-flow-map/index.js.map +1 -1
- package/html-components/leaflet-map/index.cjs +1 -1
- package/html-components/leaflet-map/index.cjs.map +1 -1
- package/html-components/leaflet-map/index.d.ts +4 -4
- package/html-components/leaflet-map/index.js +17 -17
- package/html-components/leaflet-map/index.js.map +1 -1
- package/index.cjs +1 -1
- package/index.js +1 -1
- package/package.json +4 -4
- package/utils/props.cjs +1 -1
- package/utils/props.cjs.map +1 -1
- package/utils/props.d.ts +3 -0
- package/utils/props.js +14 -11
- package/utils/props.js.map +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { NestedDonut as
|
|
3
|
-
import {
|
|
4
|
-
import { componentAccessorKey as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as p, inject as m, computed as d, ref as g, onMounted as y, nextTick as v, onUnmounted as f, watch as u, openBlock as b, createElementBlock as S } from "vue";
|
|
2
|
+
import { NestedDonut as _ } from "@unovis/ts";
|
|
3
|
+
import { useForwardProps as B, arePropsEqual as F } from "../../utils/props.js";
|
|
4
|
+
import { componentAccessorKey as h } from "../../utils/context.js";
|
|
5
|
+
const w = { "data-vis-component": "" }, D = /* @__PURE__ */ p({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
angleRange: {},
|
|
@@ -19,34 +19,37 @@ const x = { "data-vis-component": "" }, P = /* @__PURE__ */ m({
|
|
|
19
19
|
cornerRadius: {},
|
|
20
20
|
emptySegmentAngle: {},
|
|
21
21
|
hideOverflowingSegmentLabels: { type: Boolean },
|
|
22
|
-
segmentColor: { type: [Function, String,
|
|
22
|
+
segmentColor: { type: [Function, String, null] },
|
|
23
23
|
segmentLabel: { type: [Function, String, null] },
|
|
24
|
-
segmentLabelColor: { type: [Function, String,
|
|
24
|
+
segmentLabelColor: { type: [Function, String, null] },
|
|
25
25
|
showEmptySegments: { type: Boolean },
|
|
26
26
|
duration: {},
|
|
27
27
|
events: {},
|
|
28
28
|
attributes: {},
|
|
29
29
|
data: {}
|
|
30
30
|
},
|
|
31
|
-
setup(c, { expose:
|
|
32
|
-
const
|
|
33
|
-
return
|
|
34
|
-
|
|
31
|
+
setup(c, { expose: i }) {
|
|
32
|
+
const l = c, n = m(h), o = d(() => n.data.value ?? l.data), a = B(l), t = g();
|
|
33
|
+
return y(() => {
|
|
34
|
+
v(() => {
|
|
35
35
|
var e;
|
|
36
|
-
t.value = new
|
|
36
|
+
t.value = new _(a.value), (e = t.value) == null || e.setData(o.value), n.update(t.value);
|
|
37
37
|
});
|
|
38
|
-
}),
|
|
38
|
+
}), f(() => {
|
|
39
39
|
var e;
|
|
40
40
|
(e = t.value) == null || e.destroy(), n.destroy();
|
|
41
|
-
}),
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
}), u({
|
|
41
|
+
}), u(a, (e, r) => {
|
|
42
|
+
var s;
|
|
43
|
+
F(e, r) || (s = t.value) == null || s.setConfig(a.value);
|
|
44
|
+
}), u(o, () => {
|
|
45
|
+
var e;
|
|
46
|
+
(e = t.value) == null || e.setData(o.value);
|
|
47
|
+
}), i({
|
|
45
48
|
component: t
|
|
46
|
-
}), (e, r) => (
|
|
49
|
+
}), (e, r) => (b(), S("div", w));
|
|
47
50
|
}
|
|
48
51
|
});
|
|
49
52
|
export {
|
|
50
|
-
|
|
53
|
+
D as default
|
|
51
54
|
};
|
|
52
55
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/nested-donut/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { NestedDonut, NestedDonutConfigInterface, StringAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/nested-donut/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { NestedDonut, NestedDonutConfigInterface, StringAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\ninterface Props extends NestedDonutConfigInterface<Datum> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n angleRange: {},\n direction: {},\n value: { type: [Function, Number, null] },\n centralLabel: {},\n centralSubLabel: {},\n centralSubLabelWrap: { type: Boolean },\n showBackground: { type: Boolean },\n sort: { type: Function },\n layers: {},\n layerSettings: { type: [Function, null] },\n layerPadding: {},\n cornerRadius: {},\n emptySegmentAngle: {},\n hideOverflowingSegmentLabels: { type: Boolean },\n segmentColor: { type: [Function, String, null] },\n segmentLabel: { type: [Function, String, null] },\n segmentLabelColor: { type: [Function, String, null] },\n showEmptySegments: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<NestedDonut<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new NestedDonut<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","NestedDonut","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,sBAAsB,MASfC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,YAAY,CAAC;AAAA,IACb,WAAW,CAAC;AAAA,IACZ,OAAO,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IACxC,cAAc,CAAC;AAAA,IACf,iBAAiB,CAAC;AAAA,IAClB,qBAAqB,EAAE,MAAM,QAAQ;AAAA,IACrC,gBAAgB,EAAE,MAAM,QAAQ;AAAA,IAChC,MAAM,EAAE,MAAM,SAAS;AAAA,IACvB,QAAQ,CAAC;AAAA,IACT,eAAe,EAAE,MAAM,CAAC,UAAU,IAAI,EAAE;AAAA,IACxC,cAAc,CAAC;AAAA,IACf,cAAc,CAAC;AAAA,IACf,mBAAmB,CAAC;AAAA,IACpB,8BAA8B,EAAE,MAAM,QAAQ;AAAA,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;AAEA,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const n=require("vue"),d=require("@unovis/ts"),c=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),b={"data-vis-component":""},g=n.defineComponent({__name:"index",props:{id:{type:Function},heightNormalizationCoeff:{},exitTransitionType:{},enterTransitionType:{},highlightSubtreeOnHover:{type:Boolean},highlightDuration:{},highlightDelay:{},iterations:{},nodeSort:{type:[Function,null]},linkSort:{type:[Function,null]},nodeWidth:{},nodeAlign:{},nodeHorizontalSpacing:{},nodeMinHeight:{},nodeMaxHeight:{},nodePadding:{},showSingleNode:{type:Boolean},nodeCursor:{type:[Function,String,null]},nodeIcon:{type:[Function,String,null]},nodeColor:{type:[Function,String,null]},nodeFixedValue:{type:[Function,Number,null]},nodeIconColor:{type:[Function,String,null]},linkColor:{type:[Function,String,null]},linkValue:{type:[Function,Number,null]},linkCursor:{type:[Function,String,null]},label:{type:[Function,String,null]},subLabel:{type:[Function,String,null]},labelPosition:{type:[Function,null]},labelVerticalAlign:{},labelBackground:{type:Boolean},labelFit:{},labelMaxWidth:{},labelExpandTrimmedOnHover:{type:Boolean},labelTrimMode:{},labelFontSize:{},labelTextSeparator:{},labelForceWordBreak:{type:Boolean},labelColor:{type:[Function,String,null]},labelCursor:{type:[Function,String,null]},labelVisibility:{type:Function},subLabelFontSize:{},subLabelColor:{type:[Function,String,null]},subLabelPlacement:{},subLabelToLabelInlineWidthRatio:{},duration:{},events:{},attributes:{},data:{}},setup(s,{expose:p}){const a=s,o=n.inject(y.componentAccessorKey),l=n.computed(()=>o.data.value??a.data),i=c.useForwardProps(a),t=n.ref();return n.onMounted(()=>{n.nextTick(()=>{var e;t.value=new d.Sankey(i.value),(e=t.value)==null||e.setData(l.value),o.update(t.value)})}),n.onUnmounted(()=>{var e;(e=t.value)==null||e.destroy(),o.destroy()}),n.watch(i,(e,u)=>{var r;c.arePropsEqual(e,u)||(r=t.value)==null||r.setConfig(i.value)}),n.watch(l,()=>{var e;(e=t.value)==null||e.setData(l.value)}),p({component:t}),(e,u)=>(n.openBlock(),n.createElementBlock("div",b))}});module.exports=g;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/sankey/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Sankey, SankeyConfigInterface, SankeyInputNode, SankeyInputLink } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/sankey/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Sankey, SankeyConfigInterface, SankeyInputNode, SankeyInputLink } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\ninterface Props extends SankeyConfigInterface<N, L> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n id: { type: Function },\n heightNormalizationCoeff: {},\n exitTransitionType: {},\n enterTransitionType: {},\n highlightSubtreeOnHover: { type: Boolean },\n highlightDuration: {},\n highlightDelay: {},\n iterations: {},\n nodeSort: { type: [Function, null] },\n linkSort: { type: [Function, null] },\n nodeWidth: {},\n nodeAlign: {},\n nodeHorizontalSpacing: {},\n nodeMinHeight: {},\n nodeMaxHeight: {},\n nodePadding: {},\n showSingleNode: { type: Boolean },\n nodeCursor: { type: [Function, String, null] },\n nodeIcon: { type: [Function, String, null] },\n nodeColor: { type: [Function, String, null] },\n nodeFixedValue: { type: [Function, Number, null] },\n nodeIconColor: { type: [Function, String, null] },\n linkColor: { type: [Function, String, null] },\n linkValue: { type: [Function, Number, null] },\n linkCursor: { type: [Function, String, null] },\n label: { type: [Function, String, null] },\n subLabel: { type: [Function, String, null] },\n labelPosition: { type: [Function, null] },\n labelVerticalAlign: {},\n labelBackground: { type: Boolean },\n labelFit: {},\n labelMaxWidth: {},\n labelExpandTrimmedOnHover: { type: Boolean },\n labelTrimMode: {},\n labelFontSize: {},\n labelTextSeparator: {},\n labelForceWordBreak: { type: Boolean },\n labelColor: { type: [Function, String, null] },\n labelCursor: { type: [Function, String, null] },\n labelVisibility: { type: Function },\n subLabelFontSize: {},\n subLabelColor: { type: [Function, String, null] },\n subLabelPlacement: {},\n subLabelToLabelInlineWidthRatio: {},\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Sankey<N, L>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Sankey<N, L>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","Sankey","_a","onUnmounted","watch","curr","prev","ar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EAAK,MAAK,CACpC,EAEQL,EAAA,CACP,UAAAS,CAAA,CACD,EAEM,CAACW,EAAUC,KACRC,EAAW,UAAA,EAAGC,EAAAA,mBAAoB,MAAO3B,CAAU,EAE7D,CAEA,CAAC"}
|
|
@@ -90,9 +90,9 @@ declare const _default: <N extends import("@unovis/ts").GraphInputNode, L extend
|
|
|
90
90
|
subLabelPlacement?: string;
|
|
91
91
|
subLabelToLabelInlineWidthRatio?: number;
|
|
92
92
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
93
|
-
expose(exposed: {
|
|
93
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
94
94
|
component: import("vue").Ref<Sankey<N, L>>;
|
|
95
|
-
}): void;
|
|
95
|
+
}>): void;
|
|
96
96
|
attrs: any;
|
|
97
97
|
slots: {};
|
|
98
98
|
emit: any;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as d, inject as
|
|
2
|
-
import { Sankey as
|
|
3
|
-
import {
|
|
4
|
-
import { componentAccessorKey as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as d, inject as s, computed as y, ref as b, onMounted as g, nextTick as m, onUnmounted as F, watch as u, openBlock as h, createElementBlock as S } from "vue";
|
|
2
|
+
import { Sankey as v } from "@unovis/ts";
|
|
3
|
+
import { useForwardProps as f, arePropsEqual as x } from "../../utils/props.js";
|
|
4
|
+
import { componentAccessorKey as C } from "../../utils/context.js";
|
|
5
|
+
const k = { "data-vis-component": "" }, H = /* @__PURE__ */ d({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
id: { type: Function },
|
|
@@ -24,9 +24,9 @@ const T = { "data-vis-component": "" }, M = /* @__PURE__ */ d({
|
|
|
24
24
|
showSingleNode: { type: Boolean },
|
|
25
25
|
nodeCursor: { type: [Function, String, null] },
|
|
26
26
|
nodeIcon: { type: [Function, String, null] },
|
|
27
|
-
nodeColor: { type: [Function, String,
|
|
27
|
+
nodeColor: { type: [Function, String, null] },
|
|
28
28
|
nodeFixedValue: { type: [Function, Number, null] },
|
|
29
|
-
nodeIconColor: { type: [Function, String,
|
|
29
|
+
nodeIconColor: { type: [Function, String, null] },
|
|
30
30
|
linkColor: { type: [Function, String, null] },
|
|
31
31
|
linkValue: { type: [Function, Number, null] },
|
|
32
32
|
linkCursor: { type: [Function, String, null] },
|
|
@@ -42,11 +42,11 @@ const T = { "data-vis-component": "" }, M = /* @__PURE__ */ d({
|
|
|
42
42
|
labelFontSize: {},
|
|
43
43
|
labelTextSeparator: {},
|
|
44
44
|
labelForceWordBreak: { type: Boolean },
|
|
45
|
-
labelColor: { type: [Function, String,
|
|
45
|
+
labelColor: { type: [Function, String, null] },
|
|
46
46
|
labelCursor: { type: [Function, String, null] },
|
|
47
47
|
labelVisibility: { type: Function },
|
|
48
48
|
subLabelFontSize: {},
|
|
49
|
-
subLabelColor: { type: [Function, String,
|
|
49
|
+
subLabelColor: { type: [Function, String, null] },
|
|
50
50
|
subLabelPlacement: {},
|
|
51
51
|
subLabelToLabelInlineWidthRatio: {},
|
|
52
52
|
duration: {},
|
|
@@ -54,25 +54,28 @@ const T = { "data-vis-component": "" }, M = /* @__PURE__ */ d({
|
|
|
54
54
|
attributes: {},
|
|
55
55
|
data: {}
|
|
56
56
|
},
|
|
57
|
-
setup(
|
|
58
|
-
const
|
|
59
|
-
return
|
|
60
|
-
|
|
61
|
-
var
|
|
62
|
-
|
|
57
|
+
setup(c, { expose: p }) {
|
|
58
|
+
const i = c, t = s(C), o = y(() => t.data.value ?? i.data), l = f(i), n = b();
|
|
59
|
+
return g(() => {
|
|
60
|
+
m(() => {
|
|
61
|
+
var e;
|
|
62
|
+
n.value = new v(l.value), (e = n.value) == null || e.setData(o.value), t.update(n.value);
|
|
63
63
|
});
|
|
64
|
-
}),
|
|
65
|
-
var
|
|
66
|
-
(
|
|
67
|
-
}),
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
}),
|
|
71
|
-
|
|
72
|
-
|
|
64
|
+
}), F(() => {
|
|
65
|
+
var e;
|
|
66
|
+
(e = n.value) == null || e.destroy(), t.destroy();
|
|
67
|
+
}), u(l, (e, a) => {
|
|
68
|
+
var r;
|
|
69
|
+
x(e, a) || (r = n.value) == null || r.setConfig(l.value);
|
|
70
|
+
}), u(o, () => {
|
|
71
|
+
var e;
|
|
72
|
+
(e = n.value) == null || e.setData(o.value);
|
|
73
|
+
}), p({
|
|
74
|
+
component: n
|
|
75
|
+
}), (e, a) => (h(), S("div", k));
|
|
73
76
|
}
|
|
74
77
|
});
|
|
75
78
|
export {
|
|
76
|
-
|
|
79
|
+
H as default
|
|
77
80
|
};
|
|
78
81
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/sankey/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Sankey, SankeyConfigInterface, SankeyInputNode, SankeyInputLink } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/sankey/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Sankey, SankeyConfigInterface, SankeyInputNode, SankeyInputLink } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\ninterface Props extends SankeyConfigInterface<N, L> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n id: { type: Function },\n heightNormalizationCoeff: {},\n exitTransitionType: {},\n enterTransitionType: {},\n highlightSubtreeOnHover: { type: Boolean },\n highlightDuration: {},\n highlightDelay: {},\n iterations: {},\n nodeSort: { type: [Function, null] },\n linkSort: { type: [Function, null] },\n nodeWidth: {},\n nodeAlign: {},\n nodeHorizontalSpacing: {},\n nodeMinHeight: {},\n nodeMaxHeight: {},\n nodePadding: {},\n showSingleNode: { type: Boolean },\n nodeCursor: { type: [Function, String, null] },\n nodeIcon: { type: [Function, String, null] },\n nodeColor: { type: [Function, String, null] },\n nodeFixedValue: { type: [Function, Number, null] },\n nodeIconColor: { type: [Function, String, null] },\n linkColor: { type: [Function, String, null] },\n linkValue: { type: [Function, Number, null] },\n linkCursor: { type: [Function, String, null] },\n label: { type: [Function, String, null] },\n subLabel: { type: [Function, String, null] },\n labelPosition: { type: [Function, null] },\n labelVerticalAlign: {},\n labelBackground: { type: Boolean },\n labelFit: {},\n labelMaxWidth: {},\n labelExpandTrimmedOnHover: { type: Boolean },\n labelTrimMode: {},\n labelFontSize: {},\n labelTextSeparator: {},\n labelForceWordBreak: { type: Boolean },\n labelColor: { type: [Function, String, null] },\n labelCursor: { type: [Function, String, null] },\n labelVisibility: { type: Function },\n subLabelFontSize: {},\n subLabelColor: { type: [Function, String, null] },\n subLabelPlacement: {},\n subLabelToLabelInlineWidthRatio: {},\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Sankey<N, L>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Sankey<N, L>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","Sankey","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,sBAAsB,MASfC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,IAAI,EAAE,MAAM,SAAS;AAAA,IACrB,0BAA0B,CAAC;AAAA,IAC3B,oBAAoB,CAAC;AAAA,IACrB,qBAAqB,CAAC;AAAA,IACtB,yBAAyB,EAAE,MAAM,QAAQ;AAAA,IACzC,mBAAmB,CAAC;AAAA,IACpB,gBAAgB,CAAC;AAAA,IACjB,YAAY,CAAC;AAAA,IACb,UAAU,EAAE,MAAM,CAAC,UAAU,IAAI,EAAE;AAAA,IACnC,UAAU,EAAE,MAAM,CAAC,UAAU,IAAI,EAAE;AAAA,IACnC,WAAW,CAAC;AAAA,IACZ,WAAW,CAAC;AAAA,IACZ,uBAAuB,CAAC;AAAA,IACxB,eAAe,CAAC;AAAA,IAChB,eAAe,CAAC;AAAA,IAChB,aAAa,CAAC;AAAA,IACd,gBAAgB,EAAE,MAAM,QAAQ;AAAA,IAChC,YAAY,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IAC7C,UAAU,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IAC3C,WAAW,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IAC5C,gBAAgB,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,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K,SAASD,EAAM,IAAI,GAEvDM,IAASC,EAAgBP,CAAK,GAG9BQ,IAAYC;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAII,EAAaN,EAAO,KAAK,IACrCO,IAAAL,EAAA,UAAA,QAAAK,EAAO,QAAQT,EAAK,QACrBH,EAAA,OAAOO,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDM,EAAY,MAAM;;AAChB,OAAAD,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACjBZ,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKc,EAAAT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAL,EAAA,UAAA,QAAAK,EAAO,UAAUP,EAAO;AAAA,IACpC,CACD,GAEDS,EAAMX,GAAM,MAAM;;AACN,OAAAS,IAAAL,EAAA,UAAA,QAAAK,EAAO,QAAQT,EAAK;AAAA,IAAK,CACpC,GAEQL,EAAA;AAAA,MACP,WAAAS;AAAA,IAAA,CACD,GAEM,CAACW,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAO3B,CAAU;AAAA,EAE7D;AAEA,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const t=require("vue"),y=require("@unovis/ts"),i=require("../../utils/props.cjs"),d=require("../../utils/context.cjs"),F={"data-vis-component":""},v=t.defineComponent({__name:"index",props:{color:{type:[Function,String,null]},size:{type:[Function,Number,null]},sizeScale:{type:[Object,Function]},sizeRange:{},shape:{type:[Function,String]},label:{type:[Function,String,null]},labelColor:{type:[Function,String,null]},labelHideOverlapping:{type:Boolean},cursor:{type:[Function,String,null]},labelTextBrightnessRatio:{},labelPosition:{type:[Function,null]},strokeColor:{type:[Function,String,null]},strokeWidth:{type:[Function,Number,null]},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(s,{expose:p}){const a=s,o=t.inject(d.componentAccessorKey),u=t.computed(()=>o.data.value??a.data),c=i.useForwardProps(a),n=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;n.value=new y.Scatter(c.value),(e=n.value)==null||e.setData(u.value),o.update(n.value)})}),t.onUnmounted(()=>{var e;(e=n.value)==null||e.destroy(),o.destroy()}),t.watch(c,(e,l)=>{var r;i.arePropsEqual(e,l)||(r=n.value)==null||r.setConfig(c.value)}),t.watch(u,()=>{var e;(e=n.value)==null||e.setData(u.value)}),p({component:n}),(e,l)=>(t.openBlock(),t.createElementBlock("div",F))}});module.exports=v;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/scatter/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Scatter, ScatterConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/scatter/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Scatter, ScatterConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\ninterface Props extends ScatterConfigInterface<Datum> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n color: { type: [Function, String, null] },\n size: { type: [Function, Number, null] },\n sizeScale: { type: [Object, Function] },\n sizeRange: {},\n shape: { type: [Function, String] },\n label: { type: [Function, String, null] },\n labelColor: { type: [Function, String, null] },\n labelHideOverlapping: { type: Boolean },\n cursor: { type: [Function, String, null] },\n labelTextBrightnessRatio: {},\n labelPosition: { type: [Function, null] },\n strokeColor: { type: [Function, String, null] },\n strokeWidth: { type: [Function, Number, null] },\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Scatter<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Scatter<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","Scatter","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"oIAGMA,EAAa,CAAE,qBAAsB,IASfC,EAAiBC,kBAAA,CAC3C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AAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAII,EAAe,QAAAN,EAAO,KAAK,GACvCO,EAAAL,EAAA,QAAA,MAAAK,EAAO,QAAQT,EAAK,OACrBH,EAAA,OAAOO,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDM,EAAAA,YAAY,IAAM,QAChBD,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UACjBZ,EAAS,QAAQ,CAAA,CAClB,EAEKc,EAAAA,MAAAT,EAAQ,CAACU,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAL,EAAA,QAAA,MAAAK,EAAO,UAAUP,EAAO,MACpC,CACD,EAEDS,EAAA,MAAMX,EAAM,IAAM,QACNS,EAAAL,EAAA,QAAA,MAAAK,EAAO,QAAQT,EAAK,MAAK,CACpC,EAEQL,EAAA,CACP,UAAAS,CAAA,CACD,EAEM,CAACW,EAAUC,KACRC,EAAW,UAAA,EAAGC,EAAAA,mBAAoB,MAAO3B,CAAU,EAE7D,CAEA,CAAC"}
|
|
@@ -5,11 +5,11 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
|
|
|
5
5
|
slots: any;
|
|
6
6
|
}, __VLS_expose?: any, __VLS_setup?: Promise<{
|
|
7
7
|
props: {
|
|
8
|
+
color?: import("@unovis/ts").ColorAccessor<Datum>;
|
|
8
9
|
cursor?: import("@unovis/ts").StringAccessor<Datum>;
|
|
9
10
|
x: NumericAccessor<Datum>;
|
|
10
11
|
y: NumericAccessor<Datum> | NumericAccessor<Datum>[];
|
|
11
12
|
id?: (d: Datum, i: number, ...any: any[]) => string;
|
|
12
|
-
color?: string | string[] | ((d: Datum, i: number, ...any: any[]) => string) | ((d: Datum[], i: number, ...any: any[]) => string);
|
|
13
13
|
xScale?: import("@unovis/ts").ContinuousScale;
|
|
14
14
|
yScale?: import("@unovis/ts").ContinuousScale;
|
|
15
15
|
excludeFromDomainCalculation?: boolean;
|
|
@@ -57,9 +57,9 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
|
|
|
57
57
|
strokeColor?: import("@unovis/ts").ColorAccessor<Datum>;
|
|
58
58
|
strokeWidth?: NumericAccessor<Datum>;
|
|
59
59
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
60
|
-
expose(exposed: {
|
|
60
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
61
61
|
component: import("vue").Ref<Scatter<Datum>>;
|
|
62
|
-
}): void;
|
|
62
|
+
}>): void;
|
|
63
63
|
attrs: any;
|
|
64
64
|
slots: {};
|
|
65
65
|
emit: any;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Scatter as
|
|
3
|
-
import {
|
|
4
|
-
import { componentAccessorKey as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as s, inject as m, computed as y, ref as d, onMounted as F, nextTick as v, onUnmounted as b, watch as i, openBlock as f, createElementBlock as g } from "vue";
|
|
2
|
+
import { Scatter as S } from "@unovis/ts";
|
|
3
|
+
import { useForwardProps as x, arePropsEqual as _ } from "../../utils/props.js";
|
|
4
|
+
import { componentAccessorKey as h } from "../../utils/context.js";
|
|
5
|
+
const k = { "data-vis-component": "" }, O = /* @__PURE__ */ s({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
|
+
color: { type: [Function, String, null] },
|
|
8
9
|
size: { type: [Function, Number, null] },
|
|
9
10
|
sizeScale: { type: [Object, Function] },
|
|
10
11
|
sizeRange: {},
|
|
11
12
|
shape: { type: [Function, String] },
|
|
12
13
|
label: { type: [Function, String, null] },
|
|
13
|
-
labelColor: { type: [Function, String,
|
|
14
|
+
labelColor: { type: [Function, String, null] },
|
|
14
15
|
labelHideOverlapping: { type: Boolean },
|
|
15
16
|
cursor: { type: [Function, String, null] },
|
|
16
17
|
labelTextBrightnessRatio: {},
|
|
17
18
|
labelPosition: { type: [Function, null] },
|
|
18
|
-
strokeColor: { type: [Function, String,
|
|
19
|
+
strokeColor: { type: [Function, String, null] },
|
|
19
20
|
strokeWidth: { type: [Function, Number, null] },
|
|
20
21
|
x: { type: [Function, Number, null] },
|
|
21
22
|
y: { type: [Function, Number, null, Array] },
|
|
22
23
|
id: { type: Function },
|
|
23
|
-
color: { type: [Function, String, Array, null] },
|
|
24
24
|
xScale: { type: [Object, Function] },
|
|
25
25
|
yScale: { type: [Object, Function] },
|
|
26
26
|
excludeFromDomainCalculation: { type: Boolean },
|
|
@@ -29,25 +29,28 @@ const A = { "data-vis-component": "" }, z = /* @__PURE__ */ y({
|
|
|
29
29
|
attributes: {},
|
|
30
30
|
data: {}
|
|
31
31
|
},
|
|
32
|
-
setup(
|
|
33
|
-
const
|
|
34
|
-
return
|
|
32
|
+
setup(r, { expose: p }) {
|
|
33
|
+
const l = r, n = m(h), o = y(() => n.data.value ?? l.data), a = x(l), t = d();
|
|
34
|
+
return F(() => {
|
|
35
35
|
v(() => {
|
|
36
36
|
var e;
|
|
37
|
-
t.value = new
|
|
37
|
+
t.value = new S(a.value), (e = t.value) == null || e.setData(o.value), n.update(t.value);
|
|
38
38
|
});
|
|
39
|
-
}),
|
|
39
|
+
}), b(() => {
|
|
40
40
|
var e;
|
|
41
41
|
(e = t.value) == null || e.destroy(), n.destroy();
|
|
42
|
-
}),
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
}), i({
|
|
42
|
+
}), i(a, (e, u) => {
|
|
43
|
+
var c;
|
|
44
|
+
_(e, u) || (c = t.value) == null || c.setConfig(a.value);
|
|
45
|
+
}), i(o, () => {
|
|
46
|
+
var e;
|
|
47
|
+
(e = t.value) == null || e.setData(o.value);
|
|
48
|
+
}), p({
|
|
46
49
|
component: t
|
|
47
|
-
}), (e,
|
|
50
|
+
}), (e, u) => (f(), g("div", k));
|
|
48
51
|
}
|
|
49
52
|
});
|
|
50
53
|
export {
|
|
51
|
-
|
|
54
|
+
O as default
|
|
52
55
|
};
|
|
53
56
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/scatter/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Scatter, ScatterConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/scatter/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Scatter, ScatterConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\ninterface Props extends ScatterConfigInterface<Datum> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n color: { type: [Function, String, null] },\n size: { type: [Function, Number, null] },\n sizeScale: { type: [Object, Function] },\n sizeRange: {},\n shape: { type: [Function, String] },\n label: { type: [Function, String, null] },\n labelColor: { type: [Function, String, null] },\n labelHideOverlapping: { type: Boolean },\n cursor: { type: [Function, String, null] },\n labelTextBrightnessRatio: {},\n labelPosition: { type: [Function, null] },\n strokeColor: { type: [Function, String, null] },\n strokeWidth: { type: [Function, Number, null] },\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Scatter<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Scatter<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","Scatter","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,sBAAsB,MASfC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IACxC,MAAM,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IACvC,WAAW,EAAE,MAAM,CAAC,QAAQ,QAAQ,EAAE;AAAA,IACtC,WAAW,CAAC;AAAA,IACZ,OAAO,EAAE,MAAM,CAAC,UAAU,MAAM,EAAE;AAAA,IAClC,OAAO,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IACxC,YAAY,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IAC7C,sBAAsB,EAAE,MAAM,QAAQ;AAAA,IACtC,QAAQ,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U,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAL,EAAA,UAAA,QAAAK,EAAO,UAAUP,EAAO;AAAA,IACpC,CACD,GAEDS,EAAMX,GAAM,MAAM;;AACN,OAAAS,IAAAL,EAAA,UAAA,QAAAK,EAAO,QAAQT,EAAK;AAAA,IAAK,CACpC,GAEQL,EAAA;AAAA,MACP,WAAAS;AAAA,IAAA,CACD,GAEM,CAACW,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAO3B,CAAU;AAAA,EAE7D;AAEA,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const t=require("vue"),d=require("@unovis/ts"),s=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),v={"data-vis-component":""},m=t.defineComponent({__name:"index",props:{color:{type:[Function,String,null]},barWidth:{},barMaxWidth:{},dataStep:{},barPadding:{},roundedCorners:{type:[Number,Boolean]},cursor:{type:[Function,String,null]},barMinHeight1Px:{type:Boolean},barMinHeightZeroValue:{},orientation:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(l,{expose:p}){const c=l,o=t.inject(y.componentAccessorKey),a=t.computed(()=>o.data.value??c.data),r=s.useForwardProps(c),n=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;n.value=new d.StackedBar(r.value),(e=n.value)==null||e.setData(a.value),o.update(n.value)})}),t.onUnmounted(()=>{var e;(e=n.value)==null||e.destroy(),o.destroy()}),t.watch(r,(e,u)=>{var i;s.arePropsEqual(e,u)||(i=n.value)==null||i.setConfig(r.value)}),t.watch(a,()=>{var e;(e=n.value)==null||e.setData(a.value)}),p({component:n}),(e,u)=>(t.openBlock(),t.createElementBlock("div",v))}});module.exports=m;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/stacked-bar/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { StackedBar, StackedBarConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/stacked-bar/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { StackedBar, StackedBarConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\ninterface Props extends StackedBarConfigInterface<Datum> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n color: { type: [Function, String, null] },\n barWidth: {},\n barMaxWidth: {},\n dataStep: {},\n barPadding: {},\n roundedCorners: { type: [Number, Boolean] },\n cursor: { type: [Function, String, null] },\n barMinHeight1Px: { type: Boolean },\n barMinHeightZeroValue: {},\n orientation: {},\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<StackedBar<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new StackedBar<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","StackedBar","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"oIAGMA,EAAa,CAAE,qBAAsB,IASfC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,MAAO,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACxC,SAAU,CAAC,EACX,YAAa,CAAC,EACd,SAAU,CAAC,EACX,WAAY,CAAC,EACb,eAAgB,CAAE,KAAM,CAAC,OAAQ,OAAO,CAAE,EAC1C,OAAQ,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACzC,gBAAiB,CAAE,KAAM,OAAQ,EACjC,sBAAuB,CAAC,EACxB,YAAa,CAAC,EACd,EAAG,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACpC,EAAG,CAAE,KAAM,CAAC,SAAU,OAAQ,KAAM,KAAK,CAAE,EAC3C,GAAI,CAAE,KAAM,QAAS,EACrB,OAAQ,CAAE,KAAM,CAAC,OAAQ,QAAQ,CAAE,EACnC,OAAQ,CAAE,KAAM,CAAC,OAAQ,QAAQ,CAAE,EACnC,6BAA8B,CAAE,KAAM,OAAQ,EAC9C,SAAU,CAAC,EACX,OAAQ,CAAC,EACT,WAAY,CAAC,EACb,KAAM,CAAC,CACT,EACA,MAAMC,EAAc,CAAE,OAAQC,GAAY,CAE5C,MAAMC,EAAQF,EAGRG,EAAWC,SAAOC,EAAAA,oBAAoB,EAKtCC,EAAOC,EAAS,SAAA,IAAMJ,EAAS,KAAK,OAASD,EAAM,IAAI,EAEvDM,EAASC,kBAAgBP,CAAK,EAG9BQ,EAAYC,EAAAA,MAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAII,EAAkB,WAAAN,EAAO,KAAK,GAC1CO,EAAAL,EAAA,QAAA,MAAAK,EAAO,QAAQT,EAAK,OACrBH,EAAA,OAAOO,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDM,EAAAA,YAAY,IAAM,QAChBD,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UACjBZ,EAAS,QAAQ,CAAA,CAClB,EAEKc,EAAAA,MAAAT,EAAQ,CAACU,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAL,EAAA,QAAA,MAAAK,EAAO,UAAUP,EAAO,MACpC,CACD,EAEDS,EAAA,MAAMX,EAAM,IAAM,QACNS,EAAAL,EAAA,QAAA,MAAAK,EAAO,QAAQT,EAAK,MAAK,CACpC,EAEQL,EAAA,CACP,UAAAS,CAAA,CACD,EAEM,CAACW,EAAUC,KACRC,EAAW,UAAA,EAAGC,EAAAA,mBAAoB,MAAO3B,CAAU,EAE7D,CAEA,CAAC"}
|
|
@@ -5,11 +5,11 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
|
|
|
5
5
|
slots: any;
|
|
6
6
|
}, __VLS_expose?: any, __VLS_setup?: Promise<{
|
|
7
7
|
props: {
|
|
8
|
+
color?: import("@unovis/ts").ColorAccessor<Datum>;
|
|
8
9
|
cursor?: import("@unovis/ts").StringAccessor<Datum>;
|
|
9
10
|
x: NumericAccessor<Datum>;
|
|
10
11
|
y: NumericAccessor<Datum> | NumericAccessor<Datum>[];
|
|
11
12
|
id?: (d: Datum, i: number, ...any: any[]) => string;
|
|
12
|
-
color?: string | string[] | ((d: Datum, i: number, ...any: any[]) => string) | ((d: Datum[], i: number, ...any: any[]) => string);
|
|
13
13
|
xScale?: import("@unovis/ts").ContinuousScale;
|
|
14
14
|
yScale?: import("@unovis/ts").ContinuousScale;
|
|
15
15
|
excludeFromDomainCalculation?: boolean;
|
|
@@ -54,9 +54,9 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
|
|
|
54
54
|
barMinHeight1Px?: boolean;
|
|
55
55
|
barMinHeightZeroValue?: any;
|
|
56
56
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
57
|
-
expose(exposed: {
|
|
57
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
58
58
|
component: import("vue").Ref<StackedBar<Datum>>;
|
|
59
|
-
}): void;
|
|
59
|
+
}>): void;
|
|
60
60
|
attrs: any;
|
|
61
61
|
slots: {};
|
|
62
62
|
emit: any;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { StackedBar as
|
|
3
|
-
import {
|
|
4
|
-
import { componentAccessorKey as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as s, inject as d, computed as m, ref as y, onMounted as v, nextTick as b, onUnmounted as f, watch as i, openBlock as x, createElementBlock as F } from "vue";
|
|
2
|
+
import { StackedBar as _ } from "@unovis/ts";
|
|
3
|
+
import { useForwardProps as g, arePropsEqual as h } from "../../utils/props.js";
|
|
4
|
+
import { componentAccessorKey as B } from "../../utils/context.js";
|
|
5
|
+
const S = { "data-vis-component": "" }, j = /* @__PURE__ */ s({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
|
+
color: { type: [Function, String, null] },
|
|
8
9
|
barWidth: {},
|
|
9
10
|
barMaxWidth: {},
|
|
10
11
|
dataStep: {},
|
|
@@ -17,7 +18,6 @@ const k = { "data-vis-component": "" }, N = /* @__PURE__ */ d({
|
|
|
17
18
|
x: { type: [Function, Number, null] },
|
|
18
19
|
y: { type: [Function, Number, null, Array] },
|
|
19
20
|
id: { type: Function },
|
|
20
|
-
color: { type: [Function, String, Array, null] },
|
|
21
21
|
xScale: { type: [Object, Function] },
|
|
22
22
|
yScale: { type: [Object, Function] },
|
|
23
23
|
excludeFromDomainCalculation: { type: Boolean },
|
|
@@ -26,25 +26,28 @@ const k = { "data-vis-component": "" }, N = /* @__PURE__ */ d({
|
|
|
26
26
|
attributes: {},
|
|
27
27
|
data: {}
|
|
28
28
|
},
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
31
|
-
return
|
|
32
|
-
|
|
29
|
+
setup(l, { expose: p }) {
|
|
30
|
+
const r = l, o = d(B), n = m(() => o.data.value ?? r.data), a = g(r), t = y();
|
|
31
|
+
return v(() => {
|
|
32
|
+
b(() => {
|
|
33
33
|
var e;
|
|
34
|
-
t.value = new
|
|
34
|
+
t.value = new _(a.value), (e = t.value) == null || e.setData(n.value), o.update(t.value);
|
|
35
35
|
});
|
|
36
|
-
}),
|
|
36
|
+
}), f(() => {
|
|
37
37
|
var e;
|
|
38
|
-
(e = t.value) == null || e.destroy(),
|
|
39
|
-
}),
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
}),
|
|
38
|
+
(e = t.value) == null || e.destroy(), o.destroy();
|
|
39
|
+
}), i(a, (e, c) => {
|
|
40
|
+
var u;
|
|
41
|
+
h(e, c) || (u = t.value) == null || u.setConfig(a.value);
|
|
42
|
+
}), i(n, () => {
|
|
43
|
+
var e;
|
|
44
|
+
(e = t.value) == null || e.setData(n.value);
|
|
45
|
+
}), p({
|
|
43
46
|
component: t
|
|
44
|
-
}), (e,
|
|
47
|
+
}), (e, c) => (x(), F("div", S));
|
|
45
48
|
}
|
|
46
49
|
});
|
|
47
50
|
export {
|
|
48
|
-
|
|
51
|
+
j as default
|
|
49
52
|
};
|
|
50
53
|
//# sourceMappingURL=index.js.map
|