@unovis/vue 1.3.0-alpha.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/LICENSE +193 -0
- package/README.md +68 -0
- package/components/area/area.d.ts +15 -0
- package/components/axis/axis.d.ts +15 -0
- package/components/brush/brush.d.ts +15 -0
- package/components/chord-diagram/chord-diagram.d.ts +18 -0
- package/components/crosshair/crosshair.d.ts +15 -0
- package/components/donut/donut.d.ts +15 -0
- package/components/free-brush/free-brush.d.ts +15 -0
- package/components/graph/graph.d.ts +18 -0
- package/components/grouped-bar/grouped-bar.d.ts +15 -0
- package/components/line/line.d.ts +15 -0
- package/components/nested-donut/nested-donut.d.ts +15 -0
- package/components/sankey/sankey.d.ts +18 -0
- package/components/scatter/scatter.d.ts +15 -0
- package/components/stacked-bar/stacked-bar.d.ts +15 -0
- package/components/timeline/timeline.d.ts +28 -0
- package/components/tooltip/tooltip.d.ts +66 -0
- package/components/topojson-map/topojson-map.d.ts +19 -0
- package/components/xy-labels/xy-labels.d.ts +15 -0
- package/components.d.ts +21 -0
- package/containers/single-container/single-container.d.ts +17 -0
- package/containers/xy-container/xy-container.d.ts +17 -0
- package/containers.d.ts +2 -0
- package/html-components/bullet-legend/bullet-legend.d.ts +49 -0
- package/html-components/leaflet-flow-map/leaflet-flow-map.d.ts +18 -0
- package/html-components/leaflet-map/leaflet-map.d.ts +15 -0
- package/index.d.ts +2 -0
- package/index.js +1173 -0
- package/index.umd.cjs +2 -0
- package/package.json +68 -0
- package/utils/context.d.ts +22 -0
- package/utils/props.d.ts +3 -0
package/index.umd.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".unovis-xy-container,.unovis-single-container{display:block;position:relative;width:100%}[data-vis-leaflet-map],[data-vis-leaflet-flow-map]{display:block;position:relative}[data-vis-bullet-legend]{display:block}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
(function(p,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("@unovis/ts")):typeof define=="function"&&define.amd?define(["exports","vue","@unovis/ts"],n):(p=typeof globalThis<"u"?globalThis:p||self,n(p["@unovis/vue"]={},p.Vue,p["@unovis/ts"]))})(this,function(p,n,d){"use strict";const g=Symbol("componentAccessorKey"),b=Symbol("tooltipAccessorKey"),f=Symbol("crosshairAccessorKey"),h=Symbol("axisAccessorKey");function m(u,r){return d.isEqual(u,r)}function y(u,r){const o={},s=(r==null?void 0:r.vnode.props)??{};return Object.keys(s).forEach(c=>{o[c]=u[c]}),o}const _=n.defineComponent({__name:"xy-container",props:{components:{},xScale:{type:[Object,Function]},xDomain:{},xDomainMinConstraint:{},xDomainMaxConstraint:{},xRange:{},yScale:{type:[Object,Function]},yDomain:{},yDomainMinConstraint:{},yDomainMaxConstraint:{},yRange:{},yDirection:{},xAxis:{},yAxis:{},autoMargin:{type:Boolean},tooltip:{},crosshair:{},preventEmptyDomain:{type:[Boolean,null]},scaleByDomain:{type:Boolean},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(u){const r=u,{data:o}=n.toRefs(r),s=n.getCurrentInstance(),c=n.computed(()=>y(r,s)),a=n.ref(),e={components:[],crosshair:void 0,tooltip:void 0,xAxis:void 0,yAxis:void 0},t=n.ref(),i=()=>{var l;(l=a.value)==null||l.updateContainer({...c.value,...e})};return n.watch(o,()=>{a.value&&(a.value.setData(o.value,!0),i())}),n.watch(c,()=>{i()}),n.onMounted(()=>{t.value&&(a.value=new d.XYContainer(t.value,e,o.value))}),n.onUnmounted(()=>{var l;return(l=a.value)==null?void 0:l.destroy()}),n.provide(g,{data:o,update:l=>{e.components=[...e.components,l],i()},destroy:()=>{var l;return e.components=(l=e.components)==null?void 0:l.filter(F=>!F.isDestroyed())}}),n.provide(h,{data:o,update:l=>{e[`${l.config.type}Axis`]=l,i()},destroy:l=>{e[`${l}Axis`]=void 0}}),n.provide(f,{data:o,update:l=>{e.crosshair=l,i()},destroy:()=>{e.crosshair=void 0}}),n.provide(b,{data:o,update:l=>{e.tooltip=l,i()},destroy:()=>{e.tooltip=void 0}}),(l,F)=>(n.openBlock(),n.createElementBlock("div",{"data-vis-xy-container":"",ref_key:"elRef",ref:t,class:"unovis-xy-container"},[n.renderSlot(l.$slots,"default")],512))}}),rn="",S=n.defineComponent({__name:"single-container",props:{component:{},tooltip:{},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(u){const r=u,{data:o}=n.toRefs(r),s=n.getCurrentInstance(),c=n.computed(()=>y(r,s)),a=n.ref(),e={component:void 0,tooltip:void 0},t=n.ref(),i=()=>{var F;l(),(F=a.value)==null||F.updateContainer({...c.value,...e})},l=()=>{a.value||t.value&&e.component&&o.value&&(a.value=new d.SingleContainer(t.value,e,o.value))};return n.watch(o,()=>{a.value?(a.value.setData(o.value,!0),i()):l()}),n.watch(c,()=>{i()}),n.onUnmounted(()=>{var F;return(F=a.value)==null?void 0:F.destroy()}),n.provide(g,{data:o,update:F=>{e.component=F,i()},destroy:()=>e.component=void 0}),n.provide(b,{data:o,update:F=>{e.tooltip=F,i()},destroy:()=>{e.tooltip=void 0}}),(F,yn)=>(n.openBlock(),n.createElementBlock("div",{"data-vis-single-container":"",ref_key:"elRef",ref:t,class:"unovis-single-container"},[n.renderSlot(F.$slots,"default")],512))}}),un="",B={"data-vis-component":""},C=n.defineComponent({__name:"line",props:{curveType:{},lineWidth:{},lineDashArray:{type:[Function,null]},fallbackValue:{},highlightOnHover:{type:Boolean},cursor:{type:[Function,String,null]},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(u){const r=u,o=n.inject(g),s=n.computed(()=>o.data.value),c=n.getCurrentInstance(),a=n.computed(()=>y(r,c)),e=n.ref();return n.onMounted(()=>{n.nextTick(()=>{var t;e.value=new d.Line(a.value),(t=e.value)==null||t.setData(s.value),o.update(e.value)})}),n.onUnmounted(()=>{var t;(t=e.value)==null||t.destroy(),o.destroy()}),n.watch(a,(t,i)=>{var l;m(t,i)||((l=e.value)==null||l.setConfig(a.value),o.update(e.value))}),(t,i)=>(n.openBlock(),n.createElementBlock("div",B))}}),k={"data-vis-component":""},x=n.defineComponent({__name:"area",props:{curveType:{},baseline:{type:[Function,Number,null]},opacity:{type:[Function,Number,null]},cursor:{type:[Function,String,null]},minHeight1Px:{type:Boolean},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(u){const r=u,o=n.inject(g),s=n.computed(()=>o.data.value),c=n.getCurrentInstance(),a=n.computed(()=>y(r,c)),e=n.ref();return n.onMounted(()=>{n.nextTick(()=>{var t;e.value=new d.Area(a.value),(t=e.value)==null||t.setData(s.value),o.update(e.value)})}),n.onUnmounted(()=>{var t;(t=e.value)==null||t.destroy(),o.destroy()}),n.watch(a,(t,i)=>{var l;m(t,i)||((l=e.value)==null||l.setConfig(a.value),o.update(e.value))}),(t,i)=>(n.openBlock(),n.createElementBlock("div",k))}}),N={"data-vis-axis":""},L=n.defineComponent({__name:"axis",props:{position:{},type:{},fullSize:{type:Boolean},label:{},labelFontSize:{},labelMargin:{},labelColor:{},gridLine:{type:Boolean},tickLine:{type:Boolean},domainLine:{type:Boolean},minMaxTicksOnly:{type:Boolean},tickFormat:{type:Function},tickValues:{},numTicks:{},tickTextFitMode:{},tickTextWidth:{},tickTextSeparator:{},tickTextForceWordBreak:{type:Boolean},tickTextTrimType:{},tickTextFontSize:{},tickTextAlign:{},tickTextColor:{},tickPadding:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(u){const r=u,o=n.inject(h),s=n.computed(()=>o.data.value),c=n.getCurrentInstance(),a=n.computed(()=>y(r,c)),e=n.ref();return n.onMounted(()=>{n.nextTick(()=>{var t;e.value=new d.Axis(a.value),(t=e.value)==null||t.setData(s.value),o.update(e.value)})}),n.onUnmounted(()=>{var t;(t=e.value)==null||t.destroy(),o.destroy(r.type)}),n.watch(a,(t,i)=>{var l;m(t,i)||((l=e.value)==null||l.setConfig(a.value),o.update(e.value))}),(t,i)=>(n.openBlock(),n.createElementBlock("div",N))}}),w={"data-vis-component":""},A=n.defineComponent({__name:"brush",props:{onBrush:{type:Function},onBrushStart:{type:Function},onBrushMove:{type:Function},onBrushEnd:{type:Function},handleWidth:{},selection:{},draggable:{type:Boolean},handlePosition:{},selectionMinLength:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(u){const r=u,o=n.inject(g),s=n.computed(()=>o.data.value),c=n.getCurrentInstance(),a=n.computed(()=>y(r,c)),e=n.ref();return n.onMounted(()=>{n.nextTick(()=>{var t;e.value=new d.Brush(a.value),(t=e.value)==null||t.setData(s.value),o.update(e.value)})}),n.onUnmounted(()=>{var t;(t=e.value)==null||t.destroy(),o.destroy()}),n.watch(a,(t,i)=>{var l;m(t,i)||((l=e.value)==null||l.setConfig(a.value),o.update(e.value))}),(t,i)=>(n.openBlock(),n.createElementBlock("div",w))}}),M={"data-vis-component":""},T=n.defineComponent({__name:"free-brush",props:{mode:{},onBrush:{type:Function},onBrushStart:{type:Function},onBrushMove:{type:Function},onBrushEnd:{type:Function},handleWidth:{},selection:{},selectionMinLength:{},autoHide:{type:Boolean},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(u){const r=u,o=n.inject(g),s=n.computed(()=>o.data.value),c=n.getCurrentInstance(),a=n.computed(()=>y(r,c)),e=n.ref();return n.onMounted(()=>{n.nextTick(()=>{var t;e.value=new d.FreeBrush(a.value),(t=e.value)==null||t.setData(s.value),o.update(e.value)})}),n.onUnmounted(()=>{var t;(t=e.value)==null||t.destroy(),o.destroy()}),n.watch(a,(t,i)=>{var l;m(t,i)||((l=e.value)==null||l.setConfig(a.value),o.update(e.value))}),(t,i)=>(n.openBlock(),n.createElementBlock("div",M))}}),v={"data-vis-crosshair":""},D=n.defineComponent({__name:"crosshair",props:{yStacked:{},baseline:{type:[Function,Number,null]},tooltip:{},template:{type:Function},hideWhenFarFromPointer:{type:Boolean},hideWhenFarFromPointerDistance:{},snapToData:{type:Boolean},getCircles:{type:Function},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(u){const r=u,o=n.inject(f),s=n.computed(()=>o.data.value),c=n.getCurrentInstance(),a=n.computed(()=>y(r,c)),e=n.ref();return n.onMounted(()=>{n.nextTick(()=>{var t;e.value=new d.Crosshair(a.value),(t=e.value)==null||t.setData(s.value),o.update(e.value)})}),n.onUnmounted(()=>{var t;(t=e.value)==null||t.destroy(),o.destroy()}),n.watch(a,(t,i)=>{var l;m(t,i)||((l=e.value)==null||l.setConfig(a.value),o.update(e.value))}),(t,i)=>(n.openBlock(),n.createElementBlock("div",v))}}),j={"data-vis-component":""},P=n.defineComponent({__name:"grouped-bar",props:{groupWidth:{},groupMaxWidth:{},dataStep:{},groupPadding:{},barPadding:{},roundedCorners:{type:[Number,Boolean]},barMinHeight:{},cursor:{type:[Function,String,null]},orientation:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(u){const r=u,o=n.inject(g),s=n.computed(()=>o.data.value),c=n.getCurrentInstance(),a=n.computed(()=>y(r,c)),e=n.ref();return n.onMounted(()=>{n.nextTick(()=>{var t;e.value=new d.GroupedBar(a.value),(t=e.value)==null||t.setData(s.value),o.update(e.value)})}),n.onUnmounted(()=>{var t;(t=e.value)==null||t.destroy(),o.destroy()}),n.watch(a,(t,i)=>{var l;m(t,i)||((l=e.value)==null||l.setConfig(a.value),o.update(e.value))}),(t,i)=>(n.openBlock(),n.createElementBlock("div",j))}}),E={"data-vis-component":""},O=n.defineComponent({__name:"scatter",props:{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,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},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(u){const r=u,o=n.inject(g),s=n.computed(()=>o.data.value),c=n.getCurrentInstance(),a=n.computed(()=>y(r,c)),e=n.ref();return n.onMounted(()=>{n.nextTick(()=>{var t;e.value=new d.Scatter(a.value),(t=e.value)==null||t.setData(s.value),o.update(e.value)})}),n.onUnmounted(()=>{var t;(t=e.value)==null||t.destroy(),o.destroy()}),n.watch(a,(t,i)=>{var l;m(t,i)||((l=e.value)==null||l.setConfig(a.value),o.update(e.value))}),(t,i)=>(n.openBlock(),n.createElementBlock("div",E))}}),I={"data-vis-component":""},$=n.defineComponent({__name:"stacked-bar",props:{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},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(u){const r=u,o=n.inject(g),s=n.computed(()=>o.data.value),c=n.getCurrentInstance(),a=n.computed(()=>y(r,c)),e=n.ref();return n.onMounted(()=>{n.nextTick(()=>{var t;e.value=new d.StackedBar(a.value),(t=e.value)==null||t.setData(s.value),o.update(e.value)})}),n.onUnmounted(()=>{var t;(t=e.value)==null||t.destroy(),o.destroy()}),n.watch(a,(t,i)=>{var l;m(t,i)||((l=e.value)==null||l.setConfig(a.value),o.update(e.value))}),(t,i)=>(n.openBlock(),n.createElementBlock("div",I))}}),R={"data-vis-component":""},V=n.defineComponent({__name:"timeline",props:{x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},lineWidth:{type:[Function,Number,null]},lineCap:{type:Boolean},rowHeight:{},length:{type:[Function,Number,null]},type:{type:[Function,String,null]},cursor:{type:[Function,String,null]},showLabels:{type:Boolean},labelWidth:{},maxLabelWidth:{},alternatingRowColors:{type:Boolean},onScroll:{type:Function},showEmptySegments:{type:Boolean},data:{}},setup(u){const r=u,o=n.inject(g),s=n.computed(()=>o.data.value),c=n.getCurrentInstance(),a=n.computed(()=>y(r,c)),e=n.ref();return n.onMounted(()=>{n.nextTick(()=>{var t;e.value=new d.Timeline(a.value),(t=e.value)==null||t.setData(s.value),o.update(e.value)})}),n.onUnmounted(()=>{var t;(t=e.value)==null||t.destroy(),o.destroy()}),n.watch(a,(t,i)=>{var l;m(t,i)||((l=e.value)==null||l.setConfig(a.value),o.update(e.value))}),(t,i)=>(n.openBlock(),n.createElementBlock("div",R))}}),W={"data-vis-component":""},z=n.defineComponent({__name:"xy-labels",props:{y:{type:[Function,Number,null]},xPositioning:{type:[Function,null]},yPositioning:{type:[Function,null]},labelFontSize:{type:[Function,Number,null]},label:{type:[Function,String,null]},backgroundColor:{type:[Function,String,Array,null]},cursor:{type:[Function,String,null]},labelTextBrightnessRatio:{},clustering:{type:Boolean},clusterLabel:{type:[Function,String,null]},clusterFontSize:{type:[Function,Number,null]},clusterBackgroundColor:{type:[Function,String,Array,null]},clusterCursor:{type:[Function,String,null]},clusterLabelColor:{type:[Function,String,Array,null]},x:{type:[Function,Number,null]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(u){const r=u,o=n.inject(g),s=n.computed(()=>o.data.value),c=n.getCurrentInstance(),a=n.computed(()=>y(r,c)),e=n.ref();return n.onMounted(()=>{n.nextTick(()=>{var t;e.value=new d.XYLabels(a.value),(t=e.value)==null||t.setData(s.value),o.update(e.value)})}),n.onUnmounted(()=>{var t;(t=e.value)==null||t.destroy(),o.destroy()}),n.watch(a,(t,i)=>{var l;m(t,i)||((l=e.value)==null||l.setConfig(a.value),o.update(e.value))}),(t,i)=>(n.openBlock(),n.createElementBlock("div",W))}}),U={"data-vis-component":""},G=n.defineComponent({__name:"donut",props:{id:{type:Function},value:{type:[Function,Number,null]},angleRange:{},padAngle:{},sortFunction:{type:Function},cornerRadius:{},color:{type:[Function,String,Array,null]},radius:{},arcWidth:{},centralLabel:{},centralSubLabel:{},centralSubLabelWrap:{type:Boolean},showEmptySegments:{type:Boolean},emptySegmentAngle:{},showBackground:{type:Boolean},backgroundAngleRange:{},duration:{},events:{},attributes:{},data:{}},setup(u){const r=u,o=n.inject(g),s=n.computed(()=>o.data.value),c=n.getCurrentInstance(),a=n.computed(()=>y(r,c)),e=n.ref();return n.onMounted(()=>{n.nextTick(()=>{var t;e.value=new d.Donut(a.value),(t=e.value)==null||t.setData(s.value),o.update(e.value)})}),n.onUnmounted(()=>{var t;(t=e.value)==null||t.destroy(),o.destroy()}),n.watch(a,(t,i)=>{var l;m(t,i)||((l=e.value)==null||l.setConfig(a.value),o.update(e.value))}),(t,i)=>(n.openBlock(),n.createElementBlock("div",U))}}),H={"data-vis-component":""},Z=n.defineComponent({__name:"topojson-map",props:{projection:{type:[Function,Object]},topojson:{},mapFeatureName:{},mapFitToPoints:{type:Boolean},zoomFactor:{},disableZoom:{type:Boolean},zoomExtent:{},zoomDuration:{},linkWidth:{type:[Function,Number,null]},linkColor:{type:[Function,String,Array,null]},linkCursor:{type:[Function,String,null]},linkId:{type:[Function,String,null]},linkSource:{type:Function},linkTarget:{type:Function},areaId:{type:[Function,String,null]},areaColor:{type:[Function,String,Array,null]},areaCursor:{type:[Function,String,null]},pointColor:{type:[Function,String,Array,null]},pointRadius:{type:[Function,Number,null]},pointStrokeWidth:{type:[Function,Number,null]},pointCursor:{type:[Function,String,null]},longitude:{type:[Function,Number,null]},latitude:{type:[Function,Number,null]},pointLabel:{type:[Function,String,null]},pointLabelPosition:{},pointLabelTextBrightnessRatio:{},pointId:{type:Function},heatmapMode:{type:Boolean},heatmapModeBlurStdDeviation:{},heatmapModeZoomLevelThreshold:{},duration:{},events:{},attributes:{},data:{}},setup(u){const r=u,o=n.inject(g),s=n.computed(()=>o.data.value),c=n.getCurrentInstance(),a=n.computed(()=>y(r,c)),e=n.ref();return n.onMounted(()=>{n.nextTick(()=>{var t;e.value=new d.TopoJSONMap(a.value),(t=e.value)==null||t.setData(s.value),o.update(e.value)})}),n.onUnmounted(()=>{var t;(t=e.value)==null||t.destroy(),o.destroy()}),n.watch(a,(t,i)=>{var l;m(t,i)||((l=e.value)==null||l.setConfig(a.value),o.update(e.value))}),(t,i)=>(n.openBlock(),n.createElementBlock("div",H))}}),K={"data-vis-component":""},q=n.defineComponent({__name:"sankey",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,Array,null]},nodeFixedValue:{type:[Function,Number,null]},nodeIconColor:{type:[Function,String,Array,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,Array,null]},labelCursor:{type:[Function,String,null]},labelVisibility:{type:Function},subLabelFontSize:{},subLabelColor:{type:[Function,String,Array,null]},subLabelPlacement:{},subLabelToLabelInlineWidthRatio:{},duration:{},events:{},attributes:{},data:{}},setup(u){const r=u,o=n.inject(g),s=n.computed(()=>o.data.value),c=n.getCurrentInstance(),a=n.computed(()=>y(r,c)),e=n.ref();return n.onMounted(()=>{n.nextTick(()=>{var t;e.value=new d.Sankey(a.value),(t=e.value)==null||t.setData(s.value),o.update(e.value)})}),n.onUnmounted(()=>{var t;(t=e.value)==null||t.destroy(),o.destroy()}),n.watch(a,(t,i)=>{var l;m(t,i)||((l=e.value)==null||l.setConfig(a.value),o.update(e.value))}),(t,i)=>(n.openBlock(),n.createElementBlock("div",K))}}),J={"data-vis-component":""},X=n.defineComponent({__name:"graph",props:{zoomScaleExtent:{},disableZoom:{type:Boolean},disableDrag:{type:Boolean},zoomThrottledUpdateNodeThreshold:{},onZoom:{type:Function},layoutType:{},layoutAutofit:{type:Boolean},layoutAutofitTolerance:{},layoutNonConnectedAside:{type:Boolean},layoutNodeGroup:{type:[Function,String,null]},layoutGroupOrder:{},layoutParallelNodesPerColumn:{},layoutParallelNodeSubGroup:{type:[Function,String,null]},layoutParallelSubGroupsPerRow:{},layoutParallelGroupSpacing:{},layoutParallelSortConnectionsByGroup:{},forceLayoutSettings:{},dagreLayoutSettings:{},layoutElkSettings:{type:[Function,null]},layoutElkNodeGroups:{},linkWidth:{type:[Function,Number,null]},linkStyle:{type:[Function,null]},linkBandWidth:{type:[Function,Number,null]},linkArrow:{type:[Function,null]},linkStroke:{type:[Function,String,Array,null]},linkDisabled:{type:[Function,Boolean,null]},linkFlow:{type:[Function,Boolean,null]},linkFlowAnimDuration:{},linkFlowParticleSize:{},linkLabel:{type:[Function,null]},linkLabelShiftFromCenter:{type:[Function,Boolean,null]},linkNeighborSpacing:{},selectedLinkId:{},nodeSize:{type:[Function,Number,null]},nodeStrokeWidth:{type:[Function,Number,null]},nodeShape:{type:[Function,null]},nodeGaugeValue:{type:[Function,Number,null]},nodeGaugeFill:{type:[Function,String,Array,null]},nodeGaugeAnimDuration:{},nodeIcon:{type:[Function,String,null]},nodeIconSize:{type:[Function,Number,null]},nodeLabel:{type:[Function,String,null]},nodeLabelTrim:{type:[Function,Boolean,null]},nodeLabelTrimMode:{type:[Function,null]},nodeLabelTrimLength:{type:[Function,Number,null]},nodeSubLabel:{type:[Function,String,null]},nodeSubLabelTrim:{type:[Function,Boolean,null]},nodeSubLabelTrimMode:{type:[Function,null]},nodeSubLabelTrimLength:{type:[Function,Number,null]},nodeSideLabels:{type:[Function,null]},nodeBottomIcon:{type:[Function,String,null]},nodeDisabled:{type:[Function,Boolean,null]},nodeFill:{type:[Function,String,Array,null]},nodeStroke:{type:[Function,String,Array,null]},nodeSort:{type:Function},nodeEnterPosition:{type:[Function,null]},nodeEnterScale:{type:[Function,Number,null]},nodeExitPosition:{type:[Function,null]},nodeExitScale:{type:[Function,Number,null]},selectedNodeId:{},panels:{},duration:{},events:{},attributes:{},data:{}},setup(u){const r=u,o=n.inject(g),s=n.computed(()=>o.data.value),c=n.getCurrentInstance(),a=n.computed(()=>y(r,c)),e=n.ref();return n.onMounted(()=>{n.nextTick(()=>{var t;e.value=new d.Graph(a.value),(t=e.value)==null||t.setData(s.value),o.update(e.value)})}),n.onUnmounted(()=>{var t;(t=e.value)==null||t.destroy(),o.destroy()}),n.watch(a,(t,i)=>{var l;m(t,i)||((l=e.value)==null||l.setConfig(a.value),o.update(e.value))}),(t,i)=>(n.openBlock(),n.createElementBlock("div",J))}}),Y={"data-vis-component":""},Q=n.defineComponent({__name:"chord-diagram",props:{highlightedNodeId:{},highlightedLinkIds:{},linkColor:{type:[Function,String,Array,null]},linkValue:{type:[Function,Number,null]},nodeLevels:{},nodeWidth:{},nodeColor:{type:[Function,String,Array,null]},nodeLabel:{type:[Function,String,null]},nodeLabelColor:{type:[Function,String,null]},nodeLabelAlignment:{type:[Function,null]},padAngle:{type:[Function,Number,null]},cornerRadius:{type:[Function,Number,null]},angleRange:{},radiusScaleExponent:{},duration:{},events:{},attributes:{},data:{}},setup(u){const r=u,o=n.inject(g),s=n.computed(()=>o.data.value),c=n.getCurrentInstance(),a=n.computed(()=>y(r,c)),e=n.ref();return n.onMounted(()=>{n.nextTick(()=>{var t;e.value=new d.ChordDiagram(a.value),(t=e.value)==null||t.setData(s.value),o.update(e.value)})}),n.onUnmounted(()=>{var t;(t=e.value)==null||t.destroy(),o.destroy()}),n.watch(a,(t,i)=>{var l;m(t,i)||((l=e.value)==null||l.setConfig(a.value),o.update(e.value))}),(t,i)=>(n.openBlock(),n.createElementBlock("div",Y))}}),nn={"data-vis-component":""},tn=n.defineComponent({__name:"nested-donut",props:{angleRange:{},direction:{},value:{type:[Function,Number,null]},centralLabel:{},centralSubLabel:{},centralSubLabelWrap:{type:Boolean},showBackground:{type:Boolean},sort:{type:Function},layers:{},layerSettings:{type:[Function,null]},layerPadding:{},cornerRadius:{},emptySegmentAngle:{},hideOverflowingSegmentLabels:{type:Boolean},segmentColor:{type:[Function,String,Array,null]},segmentLabel:{type:[Function,String,null]},segmentLabelColor:{type:[Function,String,Array,null]},showEmptySegments:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(u){const r=u,o=n.inject(g),s=n.computed(()=>o.data.value),c=n.getCurrentInstance(),a=n.computed(()=>y(r,c)),e=n.ref();return n.onMounted(()=>{n.nextTick(()=>{var t;e.value=new d.NestedDonut(a.value),(t=e.value)==null||t.setData(s.value),o.update(e.value)})}),n.onUnmounted(()=>{var t;(t=e.value)==null||t.destroy(),o.destroy()}),n.watch(a,(t,i)=>{var l;m(t,i)||((l=e.value)==null||l.setConfig(a.value),o.update(e.value))}),(t,i)=>(n.openBlock(),n.createElementBlock("div",nn))}}),en={"data-vis-tooltip":""},on=n.defineComponent({__name:"tooltip",props:{components:{},container:{},horizontalPlacement:{},horizontalShift:{},verticalPlacement:{},verticalShift:{},triggers:{},attributes:{},data:{}},setup(u){const r=u,o=n.inject(b),s=n.getCurrentInstance(),c=n.computed(()=>y(r,s)),a=n.ref();return n.onMounted(()=>{n.nextTick(()=>{a.value=new d.Tooltip(c.value),o.update(a.value)})}),n.onUnmounted(()=>{var e;(e=a.value)==null||e.destroy(),o.destroy()}),n.watch(c,(e,t)=>{var i;m(e,t)||((i=a.value)==null||i.setConfig(c.value),o.update(a.value))}),(e,t)=>(n.openBlock(),n.createElementBlock("div",en))}}),an=n.defineComponent({__name:"leaflet-map",props:{width:{},height:{},flyToDuration:{},fitViewPadding:{},zoomDuration:{},initialBounds:{},fitBoundsOnUpdate:{},fitViewOnInit:{type:Boolean},fitViewOnUpdate:{type:Boolean},style:{},styleDarkTheme:{},accessToken:{},attribution:{},renderer:{},onMapInitialized:{type:Function},onMapMoveZoom:{type:Function},onMapMoveStart:{type:Function},onMapMoveEnd:{type:Function},onMapZoomStart:{type:Function},onMapZoomEnd:{type:Function},onMapClick:{type:Function},pointLongitude:{type:[Function,Number,null]},pointLatitude:{type:[Function,Number,null]},pointId:{type:[Function,String,null]},pointShape:{type:[Function,null]},pointColor:{type:[Function,String,Array,null]},pointRadius:{type:[Function,Number,null]},pointLabel:{type:[Function,String,null]},pointLabelColor:{type:[Function,String,null]},pointBottomLabel:{type:[Function,String,null]},pointCursor:{type:[Function,String,null]},pointRingWidth:{},selectedPointId:{},clusterColor:{type:[Function,String,Array,null]},clusterRadius:{type:[Function,Number,null]},clusterLabel:{type:[Function,String,null]},clusterLabelColor:{type:[Function,String,null]},clusterBottomLabel:{type:[Function,String,null]},clusterRingWidth:{},clusterBackground:{type:Boolean},clusterExpandOnClick:{type:Boolean},clusteringDistance:{},colorMap:{},topoJSONLayer:{},tooltip:{},ariaLabel:{},duration:{},events:{},attributes:{},data:{}},setup(u){const r=u,o=n.computed(()=>r.data),s=n.getCurrentInstance(),c=n.computed(()=>y(r,s)),a=n.ref(),e=n.ref();return n.onMounted(()=>{n.nextTick(()=>{e.value&&(a.value=new d.LeafletMap(e.value,c.value,o.value))})}),n.onUnmounted(()=>{var t;(t=a.value)==null||t.destroy()}),n.watch(c,(t,i)=>{var l;m(t,i)||(l=a.value)==null||l.setConfig(c.value)}),(t,i)=>(n.openBlock(),n.createElementBlock("div",{"data-vis-leaflet-map":"",ref_key:"elRef",ref:e},null,512))}}),sn="",ln=n.defineComponent({__name:"leaflet-flow-map",props:{sourceLongitude:{type:[Function,Number,null]},sourceLatitude:{type:[Function,Number,null]},targetLongitude:{type:[Function,Number,null]},targetLatitude:{type:[Function,Number,null]},sourcePointRadius:{type:[Function,Number,null]},sourcePointColor:{type:[Function,String,Array,null]},flowParticleColor:{type:[Function,String,Array,null]},flowParticleRadius:{type:[Function,Number,null]},flowParticleSpeed:{type:[Function,Number,null]},flowParticleDensity:{type:[Function,Number,null]},onSourcePointClick:{type:Function},onSourcePointMouseEnter:{type:Function},onSourcePointMouseLeave:{type:Function},width:{},height:{},flyToDuration:{},fitViewPadding:{},zoomDuration:{},initialBounds:{},fitBoundsOnUpdate:{},fitViewOnInit:{type:Boolean},fitViewOnUpdate:{type:Boolean},style:{},styleDarkTheme:{},accessToken:{},attribution:{},renderer:{},onMapInitialized:{type:Function},onMapMoveZoom:{type:Function},onMapMoveStart:{type:Function},onMapMoveEnd:{type:Function},onMapZoomStart:{type:Function},onMapZoomEnd:{type:Function},onMapClick:{type:Function},pointLongitude:{type:[Function,Number,null]},pointLatitude:{type:[Function,Number,null]},pointId:{type:[Function,String,null]},pointShape:{type:[Function,null]},pointColor:{type:[Function,String,Array,null]},pointRadius:{type:[Function,Number,null]},pointLabel:{type:[Function,String,null]},pointLabelColor:{type:[Function,String,null]},pointBottomLabel:{type:[Function,String,null]},pointCursor:{type:[Function,String,null]},pointRingWidth:{},selectedPointId:{},clusterColor:{type:[Function,String,Array,null]},clusterRadius:{type:[Function,Number,null]},clusterLabel:{type:[Function,String,null]},clusterLabelColor:{type:[Function,String,null]},clusterBottomLabel:{type:[Function,String,null]},clusterRingWidth:{},clusterBackground:{type:Boolean},clusterExpandOnClick:{type:Boolean},clusteringDistance:{},colorMap:{},topoJSONLayer:{},tooltip:{},ariaLabel:{},duration:{},events:{},attributes:{},data:{}},setup(u){const r=u,o=n.computed(()=>r.data),s=n.getCurrentInstance(),c=n.computed(()=>y(r,s)),a=n.ref(),e=n.ref();return n.onMounted(()=>{n.nextTick(()=>{e.value&&(a.value=new d.LeafletFlowMap(e.value,c.value,o.value))})}),n.onUnmounted(()=>{var t;(t=a.value)==null||t.destroy()}),n.watch(c,(t,i)=>{var l;m(t,i)||(l=a.value)==null||l.setConfig(c.value)}),(t,i)=>(n.openBlock(),n.createElementBlock("div",{"data-vis-leaflet-flow-map":"",ref_key:"elRef",ref:e},null,512))}}),pn="",cn=n.defineComponent({__name:"bullet-legend",props:{items:{},labelClassName:{},onLegendItemClick:{type:Function},labelFontSize:{},labelMaxWidth:{},bulletSize:{},data:{}},setup(u){const r=u;n.computed(()=>r.data);const o=n.getCurrentInstance(),s=n.computed(()=>y(r,o)),c=n.ref(),a=n.ref();return n.onMounted(()=>{n.nextTick(()=>{a.value&&(c.value=new d.BulletLegend(a.value,s.value))})}),n.onUnmounted(()=>{var e;(e=c.value)==null||e.destroy()}),n.watch(s,(e,t)=>{var i;m(e,t)||(i=c.value)==null||i.update(s.value)}),(e,t)=>(n.openBlock(),n.createElementBlock("div",{"data-vis-bullet-legend":"",ref_key:"elRef",ref:a},null,512))}}),dn="";p.VisArea=x,p.VisAxis=L,p.VisBrush=A,p.VisBulletLegend=cn,p.VisChordDiagram=Q,p.VisCrosshair=D,p.VisDonut=G,p.VisFreeBrush=T,p.VisGraph=X,p.VisGroupedBar=P,p.VisLeafletFlowMap=ln,p.VisLeafletMap=an,p.VisLine=C,p.VisNestedDonut=tn,p.VisSankey=q,p.VisScatter=O,p.VisSingleContainer=S,p.VisStackedBar=$,p.VisTimeline=V,p.VisTooltip=on,p.VisTopoJSONMap=Z,p.VisXYContainer=_,p.VisXYLabels=z,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@unovis/vue",
|
|
3
|
+
"description": "Modular data visualization framework for React, Angular, Svelte, Vue, and vanilla TypeScript or JavaScript",
|
|
4
|
+
"version": "1.3.0-alpha.0",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/f5/unovis.git",
|
|
8
|
+
"directory": "packages/vue"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://unovis.dev",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/f5/unovis/issues"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"vue",
|
|
16
|
+
"data visualization",
|
|
17
|
+
"maps",
|
|
18
|
+
"charts",
|
|
19
|
+
"graphs"
|
|
20
|
+
],
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"require": "./dist/index.umd.cjs",
|
|
24
|
+
"import": "./dist/index.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"author": "Rebecca Bol, F5 Inc. <r.bol@f5.com>",
|
|
28
|
+
"maintainers": [
|
|
29
|
+
"Nikita Rokotyan <nikita@f5.com> (https://rokotyan.com)",
|
|
30
|
+
"Rebecca Bol <r.bol@f5.com>"
|
|
31
|
+
],
|
|
32
|
+
"license": "Apache-2.0",
|
|
33
|
+
"main": "./index.umd.cjs",
|
|
34
|
+
"module": "./index.js",
|
|
35
|
+
"types": "./index.d.ts",
|
|
36
|
+
"typings": "./index.d.ts",
|
|
37
|
+
"type": "module",
|
|
38
|
+
"sideEffects": false,
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "vite build",
|
|
41
|
+
"check": "vue-tsc --noEmit",
|
|
42
|
+
"generate": "rollup -c ./autogen/rollup.config.js; node .autogen.cjs; rm .autogen.cjs",
|
|
43
|
+
"publish:dist": "rm -rf dist/.cache; cp ./{LICENSE,README.md,package.json} ./dist; cd ./dist; npm publish",
|
|
44
|
+
"dev": "vite"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"@unovis/ts": "1.3.0-alpha.0",
|
|
48
|
+
"vue": "^3"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@antfu/eslint-config": "^0.41.0",
|
|
52
|
+
"@rollup/plugin-node-resolve": "^13.0.4",
|
|
53
|
+
"@vitejs/plugin-vue": "^4.3.4",
|
|
54
|
+
"@vue/tsconfig": "^0.4.0",
|
|
55
|
+
"rollup": "^2.61.1",
|
|
56
|
+
"rollup-plugin-commonjs": "^10.1.0",
|
|
57
|
+
"rollup-plugin-typescript2": "^0.31.1",
|
|
58
|
+
"rollup-plugin-vue": "^6.0.0",
|
|
59
|
+
"tslib": "^2.3.1",
|
|
60
|
+
"ttypescript": "^1.5.13",
|
|
61
|
+
"typescript": "~4.2.4",
|
|
62
|
+
"vite": "^4.4.9",
|
|
63
|
+
"vite-plugin-css-injected-by-js": "^3.3.0",
|
|
64
|
+
"vite-plugin-dts": "^3.5.3",
|
|
65
|
+
"vue": "^3.3.4",
|
|
66
|
+
"vue-tsc": "^1.8.10"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { XYComponentCore, ComponentCore, Tooltip, Crosshair, Axis } from '@unovis/ts';
|
|
2
|
+
import { InjectionKey, Ref } from 'vue';
|
|
3
|
+
export declare const componentAccessorKey: InjectionKey<{
|
|
4
|
+
data: Ref<any>;
|
|
5
|
+
update: (c: XYComponentCore<any> | ComponentCore<any>) => void;
|
|
6
|
+
destroy: () => void;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const tooltipAccessorKey: InjectionKey<{
|
|
9
|
+
data: Ref<any>;
|
|
10
|
+
update: (c: Tooltip) => void;
|
|
11
|
+
destroy: () => void;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const crosshairAccessorKey: InjectionKey<{
|
|
14
|
+
data: Ref<any>;
|
|
15
|
+
update: (c: Crosshair<any>) => void;
|
|
16
|
+
destroy: () => void;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const axisAccessorKey: InjectionKey<{
|
|
19
|
+
data: Ref<any>;
|
|
20
|
+
update: (c: Axis<any>) => void;
|
|
21
|
+
destroy: (c: string) => void;
|
|
22
|
+
}>;
|
package/utils/props.d.ts
ADDED