@unovis/vue 1.6.1-pre.0 → 1.6.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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),u=require("@unovis/ts"),r=require("../../utils/props.cjs"),x=require("../../utils/context.cjs"),y={"data-vis-axis":""},k=u.Axis.selectors,T=t.defineComponent({__name:"index",props:{position:{},type:{},fullSize:{type:Boolean},label:{},labelFontSize:{},labelMargin:{},labelTextFitMode:{},labelTextTrimType:{},labelColor:{},gridLine:{type:Boolean},tickLine:{type:Boolean},domainLine:{type:Boolean},minMaxTicksOnly:{type:Boolean},minMaxTicksOnlyWhenWidthIsLess:{},tickFormat:{type:Function},tickValues:{},numTicks:{},tickTextFitMode:{},tickTextWidth:{},tickTextSeparator:{},tickTextForceWordBreak:{type:Boolean},tickTextTrimType:{},tickTextFontSize:{},tickTextAlign:{},tickTextColor:{},tickTextAngle:{},tickTextHideOverlapping:{type:Boolean},tickPadding:{},x:{},y:{},id:{type:Function},color:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:d}){const i=t.inject(x.axisAccessorKey),n=p,a=t.computed(()=>i.data.value??n.data),c=r.useForwardProps(n),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new u.Axis(c.value),(e=o.value)==null||e.setData(a.value),i.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),i.destroy(n.type)}),t.watch(c,(e,l)=>{var s;r.arePropsEqual(e,l)||(s=o.value)==null||s.setConfig(c.value)}),t.watch(a,()=>{var e;(e=o.value)==null||e.setData(a.value)}),d({component:o}),(e,l)=>(t.openBlock(),t.createElementBlock("div",y))}});exports.VisAxisSelectors=k;exports.default=T;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),u=require("@unovis/ts"),r=require("../../utils/props.cjs"),x=require("../../utils/context.cjs"),y={"data-vis-axis":""},k=u.Axis.selectors,T=t.defineComponent({__name:"index",props:{position:{},type:{},fullSize:{type:Boolean},label:{},labelFontSize:{},labelMargin:{},labelTextFitMode:{},labelTextTrimType:{},labelColor:{},gridLine:{type:Boolean},tickLine:{type:Boolean},domainLine:{type:Boolean},minMaxTicksOnly:{type:Boolean},minMaxTicksOnlyShowGridLines:{type:Boolean},minMaxTicksOnlyWhenWidthIsLess:{},tickFormat:{type:Function},tickValues:{},numTicks:{},tickTextFitMode:{},tickTextWidth:{},tickTextSeparator:{},tickTextForceWordBreak:{type:Boolean},tickTextTrimType:{},tickTextFontSize:{},tickTextAlign:{},tickTextColor:{},tickTextAngle:{},tickTextHideOverlapping:{type:Boolean},tickPadding:{},x:{},y:{},id:{type:Function},color:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:d}){const i=t.inject(x.axisAccessorKey),n=p,a=t.computed(()=>i.data.value??n.data),c=r.useForwardProps(n),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new u.Axis(c.value),(e=o.value)==null||e.setData(a.value),i.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),i.destroy(n.type)}),t.watch(c,(e,l)=>{var s;r.arePropsEqual(e,l)||(s=o.value)==null||s.setConfig(c.value)}),t.watch(a,()=>{var e;(e=o.value)==null||e.setData(a.value)}),d({component:o}),(e,l)=>(t.openBlock(),t.createElementBlock("div",y))}});exports.VisAxisSelectors=k;exports.default=T;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/axis/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Axis, AxisConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { axisAccessorKey } from '../../utils/context'\n\nconst accessor = inject(axisAccessorKey)\n\n// data and required props \ntype Props = AxisConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Axis<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Axis<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(props.type)\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAxisSelectors = Axis.selectors\n</script>\n\n<template>\n <div data-vis-axis />\n</template>\n\n\n"],"names":["VisAxisSelectors","Axis","accessor","inject","axisAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"0PAkDaA,EAAmBC,EAAAA,KAAK,o0BA3C/B,MAAAC,EAAWC,SAAOC,iBAAe,EAIjCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAiB,EAGnCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,OAAYQ,EAAO,KAAK,GACpCM,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,OACrBL,EAAA,OAAOS,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACRb,EAAA,QAAQG,EAAM,IAAI,CAAA,CAC5B,EAEKY,EAAAA,MAAAR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,UAAUN,EAAO,MACpC,CACD,EAEDQ,EAAA,MAAMV,EAAM,IAAM,QACNQ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,MAAK,CACpC,EAEYc,EAAA,CACX,UAAAV,CAAA,CACD"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/axis/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Axis, AxisConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { axisAccessorKey } from '../../utils/context'\n\nconst accessor = inject(axisAccessorKey)\n\n// data and required props \ntype Props = AxisConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Axis<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Axis<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(props.type)\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAxisSelectors = Axis.selectors\n</script>\n\n<template>\n <div data-vis-axis />\n</template>\n\n\n"],"names":["VisAxisSelectors","Axis","accessor","inject","axisAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"0PAkDaA,EAAmBC,EAAAA,KAAK,g3BA3C/B,MAAAC,EAAWC,SAAOC,iBAAe,EAIjCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAiB,EAGnCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,OAAYQ,EAAO,KAAK,GACpCM,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,OACrBL,EAAA,OAAOS,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACRb,EAAA,QAAQG,EAAM,IAAI,CAAA,CAC5B,EAEKY,EAAAA,MAAAR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,UAAUN,EAAO,MACpC,CACD,EAEDQ,EAAA,MAAMV,EAAM,IAAM,QACNQ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,MAAK,CACpC,EAEYc,EAAA,CACX,UAAAV,CAAA,CACD"}
@@ -58,6 +58,7 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
58
58
  tickLine?: boolean;
59
59
  domainLine?: boolean;
60
60
  minMaxTicksOnly?: boolean;
61
+ minMaxTicksOnlyShowGridLines?: boolean;
61
62
  minMaxTicksOnlyWhenWidthIsLess?: number;
62
63
  tickFormat?: (tick: number | Date, i: number, ticks: number[] | Date[]) => string;
63
64
  tickValues?: number[];
@@ -1,8 +1,8 @@
1
- import { defineComponent as d, inject as x, computed as m, ref as y, onMounted as k, nextTick as T, onUnmounted as v, watch as s, createElementBlock as f, openBlock as F } from "vue";
1
+ import { defineComponent as d, inject as x, computed as m, ref as y, onMounted as k, nextTick as T, onUnmounted as v, watch as s, createElementBlock as f, openBlock as B } from "vue";
2
2
  import { Axis as r } from "@unovis/ts";
3
- import { useForwardProps as B, arePropsEqual as b } from "../../utils/props.js";
3
+ import { useForwardProps as F, arePropsEqual as b } from "../../utils/props.js";
4
4
  import { axisAccessorKey as g } from "../../utils/context.js";
5
- const _ = { "data-vis-axis": "" }, C = r.selectors, O = /* @__PURE__ */ d({
5
+ const S = { "data-vis-axis": "" }, A = r.selectors, C = /* @__PURE__ */ d({
6
6
  __name: "index",
7
7
  props: {
8
8
  position: {},
@@ -18,6 +18,7 @@ const _ = { "data-vis-axis": "" }, C = r.selectors, O = /* @__PURE__ */ d({
18
18
  tickLine: { type: Boolean },
19
19
  domainLine: { type: Boolean },
20
20
  minMaxTicksOnly: { type: Boolean },
21
+ minMaxTicksOnlyShowGridLines: { type: Boolean },
21
22
  minMaxTicksOnlyWhenWidthIsLess: {},
22
23
  tickFormat: { type: Function },
23
24
  tickValues: {},
@@ -46,7 +47,7 @@ const _ = { "data-vis-axis": "" }, C = r.selectors, O = /* @__PURE__ */ d({
46
47
  data: {}
47
48
  },
48
49
  setup(p, { expose: u }) {
49
- const o = x(g), a = p, i = m(() => o.data.value ?? a.data), n = B(a), t = y();
50
+ const o = x(g), a = p, i = m(() => o.data.value ?? a.data), n = F(a), t = y();
50
51
  return k(() => {
51
52
  T(() => {
52
53
  var e;
@@ -63,11 +64,11 @@ const _ = { "data-vis-axis": "" }, C = r.selectors, O = /* @__PURE__ */ d({
63
64
  (e = t.value) == null || e.setData(i.value);
64
65
  }), u({
65
66
  component: t
66
- }), (e, c) => (F(), f("div", _));
67
+ }), (e, c) => (B(), f("div", S));
67
68
  }
68
69
  });
69
70
  export {
70
- C as VisAxisSelectors,
71
- O as default
71
+ A as VisAxisSelectors,
72
+ C as default
72
73
  };
73
74
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/axis/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Axis, AxisConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { axisAccessorKey } from '../../utils/context'\n\nconst accessor = inject(axisAccessorKey)\n\n// data and required props \ntype Props = AxisConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Axis<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Axis<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(props.type)\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAxisSelectors = Axis.selectors\n</script>\n\n<template>\n <div data-vis-axis />\n</template>\n\n\n"],"names":["VisAxisSelectors","Axis","accessor","inject","axisAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;mCAkDaA,IAAmBC,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3C/B,UAAAC,IAAWC,EAAOC,CAAe,GAIjCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAiB;AAGnC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAYQ,EAAO,KAAK,IACpCM,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK,QACrBL,EAAA,OAAOS,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACRb,EAAA,QAAQG,EAAM,IAAI;AAAA,IAAA,CAC5B,GAEKY,EAAAR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,UAAUN,EAAO;AAAA,IACpC,CACD,GAEDQ,EAAMV,GAAM,MAAM;;AACN,OAAAQ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK;AAAA,IAAK,CACpC,GAEYc,EAAA;AAAA,MACX,WAAAV;AAAA,IAAA,CACD;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/axis/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Axis, AxisConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { axisAccessorKey } from '../../utils/context'\n\nconst accessor = inject(axisAccessorKey)\n\n// data and required props \ntype Props = AxisConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Axis<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Axis<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(props.type)\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAxisSelectors = Axis.selectors\n</script>\n\n<template>\n <div data-vis-axis />\n</template>\n\n\n"],"names":["VisAxisSelectors","Axis","accessor","inject","axisAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;mCAkDaA,IAAmBC,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3C/B,UAAAC,IAAWC,EAAOC,CAAe,GAIjCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAiB;AAGnC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAYQ,EAAO,KAAK,IACpCM,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK,QACrBL,EAAA,OAAOS,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACRb,EAAA,QAAQG,EAAM,IAAI;AAAA,IAAA,CAC5B,GAEKY,EAAAR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,UAAUN,EAAO;AAAA,IACpC,CACD,GAEDQ,EAAMV,GAAM,MAAM;;AACN,OAAAQ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK;AAAA,IAAK,CACpC,GAEYc,EAAA;AAAA,MACX,WAAAV;AAAA,IAAA,CACD;;;"}
@@ -40,7 +40,7 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
40
40
  data?: Datum[];
41
41
  x?: NumericAccessor<Datum>;
42
42
  y?: NumericAccessor<Datum> | NumericAccessor<Datum>[];
43
- template?: (datum: Datum, x: number | Date, data: Datum[], leftNearestDatumIndex: number) => string | HTMLElement;
43
+ template?: (datum: Datum, x: number | Date, data?: Datum[], leftNearestDatumIndex?: number) => string | HTMLElement;
44
44
  color?: import("@unovis/ts").ColorAccessor<Datum>;
45
45
  baseline?: NumericAccessor<Datum>;
46
46
  id?: (d: Datum, i: number, ...any: any[]) => string;
@@ -54,9 +54,10 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
54
54
  hideWhenFarFromPointer?: boolean;
55
55
  hideWhenFarFromPointerDistance?: number;
56
56
  snapToData?: boolean;
57
- getCircles?: (x: number | Date, data: Datum[], yScale: import("@unovis/ts").ContinuousScale, leftNearestDatumIndex: number) => import("@unovis/ts").CrosshairCircle[];
57
+ getCircles?: (x: number | Date, data: Datum[], yScale: import("@unovis/ts").ContinuousScale, leftNearestDatumIndex?: number) => import("@unovis/ts").CrosshairCircle[];
58
58
  onCrosshairMove?: (x?: number | Date, datum?: Datum, datumIndex?: number, event?: MouseEvent | WheelEvent) => void;
59
59
  forceShowAt?: number | Date;
60
+ skipRangeCheck?: boolean;
60
61
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
61
62
  expose(exposed: import("vue").ShallowUnwrapRef<{
62
63
  component: import("vue").Ref<Crosshair<Datum>, Crosshair<Datum>>;
@@ -64,6 +64,7 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
64
64
  lineEndIconSize?: NumericAccessor<Datum>;
65
65
  lineEndIconArrangement?: import("@unovis/ts").GenericAccessor<import("@unovis/ts").Arrangement | "inside" | "outside" | "center", Datum>;
66
66
  lineCursor?: StringAccessor<Datum>;
67
+ showEmptySegmentsCorrectPosition?: boolean;
67
68
  rowHeight?: number;
68
69
  alternatingRowColors?: boolean;
69
70
  showLabels?: boolean;
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),u=require("@unovis/ts"),c=require("../../utils/props.cjs"),m=require("../../utils/context.cjs"),v={"data-vis-component":""},b=u.Treemap.selectors,f=t.defineComponent({__name:"index",props:{id:{type:Function},value:{},layers:{},numberFormat:{type:Function},tileColor:{},tilePadding:{},tilePaddingTop:{},labelInternalNodes:{type:Boolean},labelOffsetX:{},labelOffsetY:{},tileBorderRadius:{},tileBorderRadiusFactor:{},enableLightnessVariance:{type:Boolean},enableTileLabelFontSizeVariation:{type:Boolean},tileLabelSmallFontSize:{},tileLabelMediumFontSize:{},tileLabelLargeFontSize:{},showTileClickAffordance:{type:Boolean},lightnessVariationAmount:{},minTileSizeForLabel:{},tileLabel:{type:Function},duration:{},events:{},attributes:{},data:{}},setup(d,{expose:p}){const a=t.inject(m.componentAccessorKey),i=d,n=t.computed(()=>a.data.value??i.data),l=c.useForwardProps(i),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new u.Treemap(l.value),(e=o.value)==null||e.setData(n.value),a.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),a.destroy()}),t.watch(l,(e,r)=>{var s;c.arePropsEqual(e,r)||(s=o.value)==null||s.setConfig(l.value)}),t.watch(n,()=>{var e;(e=o.value)==null||e.setData(n.value)}),p({component:o}),(e,r)=>(t.openBlock(),t.createElementBlock("div",v))}});exports.VisTreemapSelectors=b;exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),u=require("@unovis/ts"),c=require("../../utils/props.cjs"),m=require("../../utils/context.cjs"),v={"data-vis-component":""},b=u.Treemap.selectors,f=t.defineComponent({__name:"index",props:{id:{type:Function},value:{},layers:{},numberFormat:{type:Function},tileLabel:{type:Function},tileColor:{},tilePadding:{},tilePaddingTop:{},labelInternalNodes:{type:Boolean},labelOffsetX:{},labelOffsetY:{},labelFit:{},labelTrimMode:{},tileBorderRadius:{},tileBorderRadiusFactor:{},enableLightnessVariance:{type:Boolean},enableTileLabelFontSizeVariation:{type:Boolean},tileLabelSmallFontSize:{},tileLabelMediumFontSize:{},tileLabelLargeFontSize:{},showTileClickAffordance:{type:Boolean},lightnessVariationAmount:{},minTileSizeForLabel:{},duration:{},events:{},attributes:{},data:{}},setup(d,{expose:p}){const a=t.inject(m.componentAccessorKey),i=d,n=t.computed(()=>a.data.value??i.data),l=c.useForwardProps(i),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new u.Treemap(l.value),(e=o.value)==null||e.setData(n.value),a.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),a.destroy()}),t.watch(l,(e,r)=>{var s;c.arePropsEqual(e,r)||(s=o.value)==null||s.setConfig(l.value)}),t.watch(n,()=>{var e;(e=o.value)==null||e.setData(n.value)}),p({component:o}),(e,r)=>(t.openBlock(),t.createElementBlock("div",v))}});exports.VisTreemapSelectors=b;exports.default=f;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/treemap/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Treemap, TreemapConfigInterface, 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\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = TreemapConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Treemap<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Treemap<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTreemapSelectors = Treemap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTreemapSelectors","Treemap","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAsBC,EAAAA,QAAQ,inBA3CrC,MAAAC,EAAWC,SAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAoB,EAGtCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,UAAeQ,EAAO,KAAK,GACvCM,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,OACrBL,EAAA,OAAOS,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAQ,CAAA,CAClB,EAEKe,EAAAA,MAAAR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,UAAUN,EAAO,MACpC,CACD,EAEDQ,EAAA,MAAMV,EAAM,IAAM,QACNQ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,MAAK,CACpC,EAEYc,EAAA,CACX,UAAAV,CAAA,CACD"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/treemap/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Treemap, TreemapConfigInterface, 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\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = TreemapConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Treemap<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Treemap<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTreemapSelectors = Treemap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTreemapSelectors","Treemap","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAsBC,EAAAA,QAAQ,8oBA3CrC,MAAAC,EAAWC,SAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAoB,EAGtCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,UAAeQ,EAAO,KAAK,GACvCM,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,OACrBL,EAAA,OAAOS,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAQ,CAAA,CAClB,EAEKe,EAAAA,MAAAR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,UAAUN,EAAO,MACpC,CACD,EAEDQ,EAAA,MAAMV,EAAM,IAAM,QACNQ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,MAAK,CACpC,EAEYc,EAAA,CACX,UAAAV,CAAA,CACD"}
@@ -43,7 +43,10 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
43
43
  layers: StringAccessor<Datum>[];
44
44
  labelOffsetX?: number;
45
45
  labelOffsetY?: number;
46
+ labelFit?: import("@unovis/ts").FitMode;
47
+ labelTrimMode?: import("@unovis/ts").TrimMode;
46
48
  numberFormat?: (value: number) => string;
49
+ tileLabel?: (node: import("@unovis/ts").TreemapNode<Datum>) => string;
47
50
  tileColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").TreemapNode<Datum>>;
48
51
  tilePadding?: number;
49
52
  tilePaddingTop?: number;
@@ -58,7 +61,6 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
58
61
  showTileClickAffordance?: boolean;
59
62
  lightnessVariationAmount?: number;
60
63
  minTileSizeForLabel?: number;
61
- tileLabel?: (node: import("@unovis/ts").TreemapNode<Datum>) => string;
62
64
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
63
65
  expose(exposed: import("vue").ShallowUnwrapRef<{
64
66
  component: import("vue").Ref<Treemap<Datum>, Treemap<Datum>>;
@@ -1,20 +1,23 @@
1
- import { defineComponent as p, inject as m, computed as f, ref as v, onMounted as b, nextTick as y, onUnmounted as F, watch as s, createElementBlock as B, openBlock as L } from "vue";
1
+ import { defineComponent as p, inject as m, computed as f, ref as b, onMounted as v, nextTick as F, onUnmounted as y, watch as s, createElementBlock as B, openBlock as L } from "vue";
2
2
  import { Treemap as c } from "@unovis/ts";
3
- import { useForwardProps as _, arePropsEqual as g } from "../../utils/props.js";
4
- import { componentAccessorKey as S } from "../../utils/context.js";
5
- const T = { "data-vis-component": "" }, w = c.selectors, C = /* @__PURE__ */ p({
3
+ import { useForwardProps as T, arePropsEqual as _ } from "../../utils/props.js";
4
+ import { componentAccessorKey as g } from "../../utils/context.js";
5
+ const S = { "data-vis-component": "" }, w = c.selectors, C = /* @__PURE__ */ p({
6
6
  __name: "index",
7
7
  props: {
8
8
  id: { type: Function },
9
9
  value: {},
10
10
  layers: {},
11
11
  numberFormat: { type: Function },
12
+ tileLabel: { type: Function },
12
13
  tileColor: {},
13
14
  tilePadding: {},
14
15
  tilePaddingTop: {},
15
16
  labelInternalNodes: { type: Boolean },
16
17
  labelOffsetX: {},
17
18
  labelOffsetY: {},
19
+ labelFit: {},
20
+ labelTrimMode: {},
18
21
  tileBorderRadius: {},
19
22
  tileBorderRadiusFactor: {},
20
23
  enableLightnessVariance: { type: Boolean },
@@ -25,31 +28,30 @@ const T = { "data-vis-component": "" }, w = c.selectors, C = /* @__PURE__ */ p({
25
28
  showTileClickAffordance: { type: Boolean },
26
29
  lightnessVariationAmount: {},
27
30
  minTileSizeForLabel: {},
28
- tileLabel: { type: Function },
29
31
  duration: {},
30
32
  events: {},
31
33
  attributes: {},
32
34
  data: {}
33
35
  },
34
36
  setup(u, { expose: d }) {
35
- const o = m(S), l = u, a = f(() => o.data.value ?? l.data), n = _(l), t = v();
36
- return b(() => {
37
- y(() => {
37
+ const o = m(g), l = u, a = f(() => o.data.value ?? l.data), n = T(l), t = b();
38
+ return v(() => {
39
+ F(() => {
38
40
  var e;
39
41
  t.value = new c(n.value), (e = t.value) == null || e.setData(a.value), o.update(t.value);
40
42
  });
41
- }), F(() => {
43
+ }), y(() => {
42
44
  var e;
43
45
  (e = t.value) == null || e.destroy(), o.destroy();
44
46
  }), s(n, (e, i) => {
45
47
  var r;
46
- g(e, i) || (r = t.value) == null || r.setConfig(n.value);
48
+ _(e, i) || (r = t.value) == null || r.setConfig(n.value);
47
49
  }), s(a, () => {
48
50
  var e;
49
51
  (e = t.value) == null || e.setData(a.value);
50
52
  }), d({
51
53
  component: t
52
- }), (e, i) => (L(), B("div", T));
54
+ }), (e, i) => (L(), B("div", S));
53
55
  }
54
56
  });
55
57
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/treemap/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Treemap, TreemapConfigInterface, 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\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = TreemapConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Treemap<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Treemap<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTreemapSelectors = Treemap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTreemapSelectors","Treemap","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAsBC,EAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CrC,UAAAC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAoB;AAGtC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAeQ,EAAO,KAAK,IACvCM,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK,QACrBL,EAAA,OAAOS,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKe,EAAAR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,UAAUN,EAAO;AAAA,IACpC,CACD,GAEDQ,EAAMV,GAAM,MAAM;;AACN,OAAAQ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK;AAAA,IAAK,CACpC,GAEYc,EAAA;AAAA,MACX,WAAAV;AAAA,IAAA,CACD;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/treemap/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Treemap, TreemapConfigInterface, 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\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = TreemapConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Treemap<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Treemap<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTreemapSelectors = Treemap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTreemapSelectors","Treemap","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAsBC,EAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CrC,UAAAC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAoB;AAGtC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAeQ,EAAO,KAAK,IACvCM,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK,QACrBL,EAAA,OAAOS,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKe,EAAAR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,UAAUN,EAAO;AAAA,IACpC,CACD,GAEDQ,EAAMV,GAAM,MAAM;;AACN,OAAAQ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK;AAAA,IAAK,CACpC,GAEYc,EAAA;AAAA,MACX,WAAAV;AAAA,IAAA,CACD;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unovis/vue",
3
3
  "description": "Modular data visualization framework for React, Angular, Svelte, Vue, and vanilla TypeScript or JavaScript",
4
- "version": "1.6.1-pre.0",
4
+ "version": "1.6.2",
5
5
  "packageManager": "npm@10.9.1",
6
6
  "repository": {
7
7
  "type": "git",
@@ -53,7 +53,7 @@
53
53
  "gallery": "vite"
54
54
  },
55
55
  "peerDependencies": {
56
- "@unovis/ts": "1.6.1-pre.0",
56
+ "@unovis/ts": "1.6.2",
57
57
  "vue": "^3"
58
58
  },
59
59
  "devDependencies": {