@unovis/vue 1.3.4-beta.2 → 1.4.0-beta.1

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.
Files changed (47) hide show
  1. package/components/annotations/index.cjs +2 -0
  2. package/components/annotations/index.cjs.map +1 -0
  3. package/components/annotations/index.d.ts +95 -0
  4. package/components/annotations/index.js +34 -0
  5. package/components/annotations/index.js.map +1 -0
  6. package/components/annotations/index2.cjs +2 -0
  7. package/components/annotations/index2.cjs.map +1 -0
  8. package/components/annotations/index2.js +5 -0
  9. package/components/annotations/index2.js.map +1 -0
  10. package/components/area/index.d.ts +12 -12
  11. package/components/axis/index.d.ts +7 -7
  12. package/components/brush/index.d.ts +7 -7
  13. package/components/crosshair/index.d.ts +8 -8
  14. package/components/donut/index.d.ts +3 -3
  15. package/components/free-brush/index.d.ts +7 -7
  16. package/components/grouped-bar/index.d.ts +8 -8
  17. package/components/line/index.d.ts +9 -9
  18. package/components/nested-donut/index.cjs +1 -1
  19. package/components/nested-donut/index.cjs.map +1 -1
  20. package/components/nested-donut/index.d.ts +2 -1
  21. package/components/nested-donut/index.js +12 -11
  22. package/components/nested-donut/index.js.map +1 -1
  23. package/components/sankey/index.d.ts +1 -1
  24. package/components/scatter/index.d.ts +8 -8
  25. package/components/stacked-bar/index.d.ts +8 -8
  26. package/components/timeline/index.d.ts +8 -8
  27. package/components/xy-labels/index.d.ts +8 -8
  28. package/components.d.ts +1 -0
  29. package/containers/single-container/index.cjs +1 -1
  30. package/containers/single-container/index.cjs.map +1 -1
  31. package/containers/single-container/index.d.ts +2 -1
  32. package/containers/single-container/index.js +29 -21
  33. package/containers/single-container/index.js.map +1 -1
  34. package/containers/xy-container/index.cjs +1 -1
  35. package/containers/xy-container/index.cjs.map +1 -1
  36. package/containers/xy-container/index.d.ts +4 -3
  37. package/containers/xy-container/index.js +21 -13
  38. package/containers/xy-container/index.js.map +1 -1
  39. package/index.cjs +2 -2
  40. package/index.js +15 -13
  41. package/index.js.map +1 -1
  42. package/package.json +1 -1
  43. package/utils/context.cjs +1 -1
  44. package/utils/context.cjs.map +1 -1
  45. package/utils/context.d.ts +6 -1
  46. package/utils/context.js +2 -1
  47. package/utils/context.js.map +1 -1
@@ -0,0 +1,2 @@
1
+ "use strict";const e=require("vue"),d=require("@unovis/ts"),a=require("../../utils/props.cjs"),l=require("../../utils/context.cjs"),v={"data-vis-annotations":""},_=e.defineComponent({__name:"index",props:{items:{},duration:{},events:{},attributes:{},data:{}},setup(i,{expose:u}){const p=i,s=e.inject(l.annotationsAccessorKey),o=a.useForwardProps(p),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new d.Annotations(o.value),s.update(t.value)})}),e.onUnmounted(()=>{var n;(n=t.value)==null||n.destroy(),s.destroy()}),e.watch(o,(n,r)=>{var c;a.arePropsEqual(n,r)||(c=t.value)==null||c.setConfig(o.value)}),u({component:t}),(n,r)=>(e.openBlock(),e.createElementBlock("div",v))}});module.exports=_;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/annotations/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-annotations\": \"\" }\n\nimport { Annotations, AnnotationsConfigInterface, AnnotationItem } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { annotationsAccessorKey } from '../../utils/context'\n\ninterface Props extends AnnotationsConfigInterface { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n items: {},\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(annotationsAccessorKey)\n\n// data and required props \n\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Annotations>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Annotations(config.value)\n \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\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","annotationsAccessorKey","config","useForwardProps","component","ref","onMounted","nextTick","Annotations","onUnmounted","_a","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"oIAGMA,EAAa,CAAE,uBAAwB,IASjBC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,MAAO,CAAC,EACR,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,sBAAsB,EAOxCC,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,MAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAII,EAAY,YAAAN,EAAO,KAAK,EAErCH,EAAA,OAAOK,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDK,EAAAA,YAAY,IAAM,QAChBC,EAAAN,EAAU,QAAV,MAAAM,EAAiB,UACjBX,EAAS,QAAQ,CAAA,CAClB,EAEKY,EAAAA,MAAAT,EAAQ,CAACU,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBH,EAAAN,EAAA,QAAA,MAAAM,EAAO,UAAUR,EAAO,MACpC,CACD,EAGQL,EAAA,CACP,UAAAO,CAAA,CACD,EAEM,CAACW,EAAUC,KACRC,EAAW,UAAA,EAAGC,EAAAA,mBAAoB,MAAOzB,CAAU,EAE7D,CAEA,CAAC"}
@@ -0,0 +1,95 @@
1
+ import { Annotations, AnnotationItem } from '@unovis/ts';
2
+ declare const _default: import("vue").DefineComponent<{
3
+ items: {
4
+ type: import("vue").PropType<AnnotationItem[]>;
5
+ required: true;
6
+ };
7
+ duration: {
8
+ type: import("vue").PropType<number>;
9
+ };
10
+ events: {
11
+ type: import("vue").PropType<{
12
+ [selector: string]: {
13
+ touchstart?: import("@unovis/ts").VisEventCallback<any>;
14
+ touchmove?: import("@unovis/ts").VisEventCallback<any>;
15
+ touchend?: import("@unovis/ts").VisEventCallback<any>;
16
+ mouseover?: import("@unovis/ts").VisEventCallback<any>;
17
+ mousemove?: import("@unovis/ts").VisEventCallback<any>;
18
+ mousedown?: import("@unovis/ts").VisEventCallback<any>;
19
+ mouseup?: import("@unovis/ts").VisEventCallback<any>;
20
+ click?: import("@unovis/ts").VisEventCallback<any>;
21
+ auxclick?: import("@unovis/ts").VisEventCallback<any>;
22
+ contextmenu?: import("@unovis/ts").VisEventCallback<any>;
23
+ dblclick?: import("@unovis/ts").VisEventCallback<any>;
24
+ mouseenter?: import("@unovis/ts").VisEventCallback<any>;
25
+ mouseleave?: import("@unovis/ts").VisEventCallback<any>;
26
+ mouseout?: import("@unovis/ts").VisEventCallback<any>;
27
+ scroll?: import("@unovis/ts").VisEventCallback<any>;
28
+ select?: import("@unovis/ts").VisEventCallback<any>;
29
+ wheel?: import("@unovis/ts").VisEventCallback<any>;
30
+ pointerdown?: import("@unovis/ts").VisEventCallback<any>;
31
+ pointerup?: import("@unovis/ts").VisEventCallback<any>;
32
+ pointerout?: import("@unovis/ts").VisEventCallback<any>;
33
+ pointermove?: import("@unovis/ts").VisEventCallback<any>;
34
+ };
35
+ }>;
36
+ };
37
+ attributes: {
38
+ type: import("vue").PropType<{
39
+ [selector: string]: {
40
+ [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
41
+ };
42
+ }>;
43
+ };
44
+ data: {
45
+ type: import("vue").PropType<never>;
46
+ };
47
+ }, {
48
+ component: import("vue").Ref<Annotations>;
49
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
50
+ items: {
51
+ type: import("vue").PropType<AnnotationItem[]>;
52
+ required: true;
53
+ };
54
+ duration: {
55
+ type: import("vue").PropType<number>;
56
+ };
57
+ events: {
58
+ type: import("vue").PropType<{
59
+ [selector: string]: {
60
+ touchstart?: import("@unovis/ts").VisEventCallback<any>;
61
+ touchmove?: import("@unovis/ts").VisEventCallback<any>;
62
+ touchend?: import("@unovis/ts").VisEventCallback<any>;
63
+ mouseover?: import("@unovis/ts").VisEventCallback<any>;
64
+ mousemove?: import("@unovis/ts").VisEventCallback<any>;
65
+ mousedown?: import("@unovis/ts").VisEventCallback<any>;
66
+ mouseup?: import("@unovis/ts").VisEventCallback<any>;
67
+ click?: import("@unovis/ts").VisEventCallback<any>;
68
+ auxclick?: import("@unovis/ts").VisEventCallback<any>;
69
+ contextmenu?: import("@unovis/ts").VisEventCallback<any>;
70
+ dblclick?: import("@unovis/ts").VisEventCallback<any>;
71
+ mouseenter?: import("@unovis/ts").VisEventCallback<any>;
72
+ mouseleave?: import("@unovis/ts").VisEventCallback<any>;
73
+ mouseout?: import("@unovis/ts").VisEventCallback<any>;
74
+ scroll?: import("@unovis/ts").VisEventCallback<any>;
75
+ select?: import("@unovis/ts").VisEventCallback<any>;
76
+ wheel?: import("@unovis/ts").VisEventCallback<any>;
77
+ pointerdown?: import("@unovis/ts").VisEventCallback<any>;
78
+ pointerup?: import("@unovis/ts").VisEventCallback<any>;
79
+ pointerout?: import("@unovis/ts").VisEventCallback<any>;
80
+ pointermove?: import("@unovis/ts").VisEventCallback<any>;
81
+ };
82
+ }>;
83
+ };
84
+ attributes: {
85
+ type: import("vue").PropType<{
86
+ [selector: string]: {
87
+ [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
88
+ };
89
+ }>;
90
+ };
91
+ data: {
92
+ type: import("vue").PropType<never>;
93
+ };
94
+ }>>, {}, {}>;
95
+ export default _default;
@@ -0,0 +1,34 @@
1
+ import { defineComponent as p, inject as u, ref as m, onMounted as d, nextTick as f, onUnmounted as l, watch as v, openBlock as _, createElementBlock as x } from "vue";
2
+ import { Annotations as h } from "@unovis/ts";
3
+ import { useForwardProps as k, arePropsEqual as w } from "../../utils/props.js";
4
+ import { annotationsAccessorKey as y } from "../../utils/context.js";
5
+ const g = { "data-vis-annotations": "" }, P = /* @__PURE__ */ p({
6
+ __name: "index",
7
+ props: {
8
+ items: {},
9
+ duration: {},
10
+ events: {},
11
+ attributes: {},
12
+ data: {}
13
+ },
14
+ setup(r, { expose: c }) {
15
+ const i = r, n = u(y), t = k(i), o = m();
16
+ return d(() => {
17
+ f(() => {
18
+ o.value = new h(t.value), n.update(o.value);
19
+ });
20
+ }), l(() => {
21
+ var e;
22
+ (e = o.value) == null || e.destroy(), n.destroy();
23
+ }), v(t, (e, s) => {
24
+ var a;
25
+ w(e, s) || (a = o.value) == null || a.setConfig(t.value);
26
+ }), c({
27
+ component: o
28
+ }), (e, s) => (_(), x("div", g));
29
+ }
30
+ });
31
+ export {
32
+ P as default
33
+ };
34
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/annotations/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-annotations\": \"\" }\n\nimport { Annotations, AnnotationsConfigInterface, AnnotationItem } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { annotationsAccessorKey } from '../../utils/context'\n\ninterface Props extends AnnotationsConfigInterface { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n items: {},\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(annotationsAccessorKey)\n\n// data and required props \n\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Annotations>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Annotations(config.value)\n \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\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","annotationsAccessorKey","config","useForwardProps","component","ref","onMounted","nextTick","Annotations","onUnmounted","_a","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,wBAAwB,MASjBC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,CAAC;AAAA,IACR,UAAU,CAAC;AAAA,IACX,QAAQ,CAAC;AAAA,IACT,YAAY,CAAC;AAAA,IACb,MAAM,CAAC;AAAA,EACT;AAAA,EACA,MAAMC,GAAc,EAAE,QAAQC,KAAY;AAE5C,UAAMC,IAAQF,GAGRG,IAAWC,EAAOC,CAAsB,GAOxCC,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAII,EAAYN,EAAO,KAAK,GAErCH,EAAA,OAAOK,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDK,EAAY,MAAM;;AAChB,OAAAC,IAAAN,EAAU,UAAV,QAAAM,EAAiB,WACjBX,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKY,EAAAT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBH,IAAAN,EAAA,UAAA,QAAAM,EAAO,UAAUR,EAAO;AAAA,IACpC,CACD,GAGQL,EAAA;AAAA,MACP,WAAAO;AAAA,IAAA,CACD,GAEM,CAACW,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAOzB,CAAU;AAAA,EAE7D;AAEA,CAAC;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const e=require("./index.cjs");module.exports=e;
2
+ //# sourceMappingURL=index2.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index2.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import f from "./index.js";
2
+ export {
3
+ f as default
4
+ };
5
+ //# sourceMappingURL=index2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -5,18 +5,6 @@ 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[]>;
9
- curveType?: import("@unovis/ts").CurveType;
10
- baseline?: NumericAccessor<Datum>;
11
- opacity?: NumericAccessor<Datum[]>;
12
- cursor?: import("@unovis/ts").StringAccessor<Datum[]>;
13
- minHeight1Px?: boolean;
14
- x: NumericAccessor<Datum>;
15
- y: NumericAccessor<Datum> | NumericAccessor<Datum>[];
16
- id?: (d: Datum, i: number, ...any: any[]) => string;
17
- xScale?: import("@unovis/ts").ContinuousScale;
18
- yScale?: import("@unovis/ts").ContinuousScale;
19
- excludeFromDomainCalculation?: boolean;
20
8
  duration?: number;
21
9
  events?: {
22
10
  [selector: string]: {
@@ -49,6 +37,18 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
49
37
  };
50
38
  };
51
39
  data?: Datum[];
40
+ color?: import("@unovis/ts").ColorAccessor<Datum[]>;
41
+ curveType?: string;
42
+ baseline?: NumericAccessor<Datum>;
43
+ opacity?: NumericAccessor<Datum[]>;
44
+ cursor?: import("@unovis/ts").StringAccessor<Datum[]>;
45
+ minHeight1Px?: boolean;
46
+ x: NumericAccessor<Datum>;
47
+ y: NumericAccessor<Datum> | NumericAccessor<Datum>[];
48
+ id?: (d: Datum, i: number, ...any: any[]) => string;
49
+ xScale?: import("@unovis/ts").ContinuousScale;
50
+ yScale?: import("@unovis/ts").ContinuousScale;
51
+ excludeFromDomainCalculation?: boolean;
52
52
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
53
53
  expose(exposed: import("vue").ShallowUnwrapRef<{
54
54
  component: import("vue").Ref<Area<Datum>>;
@@ -5,13 +5,6 @@ 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?: string | string[] | ((d: Datum, i: number, ...any: unknown[]) => string) | ((d: Datum[], i: number, ...any: unknown[]) => string);
9
- x?: import("@unovis/ts").NumericAccessor<Datum>;
10
- y?: import("@unovis/ts").NumericAccessor<Datum> | import("@unovis/ts").NumericAccessor<Datum>[];
11
- id?: (d: Datum, i: number, ...any: any[]) => string;
12
- xScale?: import("@unovis/ts").ContinuousScale;
13
- yScale?: import("@unovis/ts").ContinuousScale;
14
- excludeFromDomainCalculation?: boolean;
15
8
  duration?: number;
16
9
  events?: {
17
10
  [selector: string]: {
@@ -45,6 +38,13 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
45
38
  };
46
39
  data?: Datum[];
47
40
  label?: string;
41
+ color?: string | string[] | ((d: Datum, i: number, ...any: unknown[]) => string) | ((d: Datum[], i: number, ...any: unknown[]) => string);
42
+ x?: import("@unovis/ts").NumericAccessor<Datum>;
43
+ y?: import("@unovis/ts").NumericAccessor<Datum> | import("@unovis/ts").NumericAccessor<Datum>[];
44
+ id?: (d: Datum, i: number, ...any: any[]) => string;
45
+ xScale?: import("@unovis/ts").ContinuousScale;
46
+ yScale?: import("@unovis/ts").ContinuousScale;
47
+ excludeFromDomainCalculation?: boolean;
48
48
  position?: string;
49
49
  type?: string;
50
50
  fullSize?: boolean;
@@ -5,13 +5,6 @@ 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?: string | string[] | ((d: Datum, i: number, ...any: unknown[]) => string) | ((d: Datum[], i: number, ...any: unknown[]) => string);
9
- x?: import("@unovis/ts").NumericAccessor<Datum>;
10
- y?: import("@unovis/ts").NumericAccessor<Datum> | import("@unovis/ts").NumericAccessor<Datum>[];
11
- id?: (d: Datum, i: number, ...any: any[]) => string;
12
- xScale?: import("@unovis/ts").ContinuousScale;
13
- yScale?: import("@unovis/ts").ContinuousScale;
14
- excludeFromDomainCalculation?: boolean;
15
8
  duration?: number;
16
9
  events?: {
17
10
  [selector: string]: {
@@ -44,6 +37,13 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
44
37
  };
45
38
  };
46
39
  data?: Datum[];
40
+ color?: string | string[] | ((d: Datum, i: number, ...any: unknown[]) => string) | ((d: Datum[], i: number, ...any: unknown[]) => string);
41
+ x?: import("@unovis/ts").NumericAccessor<Datum>;
42
+ y?: import("@unovis/ts").NumericAccessor<Datum> | import("@unovis/ts").NumericAccessor<Datum>[];
43
+ id?: (d: Datum, i: number, ...any: any[]) => string;
44
+ xScale?: import("@unovis/ts").ContinuousScale;
45
+ yScale?: import("@unovis/ts").ContinuousScale;
46
+ excludeFromDomainCalculation?: boolean;
47
47
  onBrush?: (selection: [number, number], event: import("d3-brush").D3BrushEvent<Datum>, userDriven: boolean) => void;
48
48
  onBrushStart?: (selection: [number, number], event: import("d3-brush").D3BrushEvent<Datum>, userDriven: boolean) => void;
49
49
  onBrushMove?: (selection: [number, number], event: import("d3-brush").D3BrushEvent<Datum>, userDriven: boolean) => void;
@@ -5,14 +5,6 @@ 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>;
9
- baseline?: NumericAccessor<Datum>;
10
- x?: NumericAccessor<Datum>;
11
- y?: NumericAccessor<Datum> | NumericAccessor<Datum>[];
12
- id?: (d: Datum, i: number, ...any: any[]) => string;
13
- xScale?: import("@unovis/ts").ContinuousScale;
14
- yScale?: import("@unovis/ts").ContinuousScale;
15
- excludeFromDomainCalculation?: boolean;
16
8
  duration?: number;
17
9
  events?: {
18
10
  [selector: string]: {
@@ -46,6 +38,14 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
46
38
  };
47
39
  data?: Datum[];
48
40
  template?: (data: Datum, x: number | Date) => string | HTMLElement;
41
+ color?: import("@unovis/ts").ColorAccessor<Datum>;
42
+ baseline?: NumericAccessor<Datum>;
43
+ x?: NumericAccessor<Datum>;
44
+ y?: NumericAccessor<Datum> | NumericAccessor<Datum>[];
45
+ id?: (d: Datum, i: number, ...any: any[]) => string;
46
+ xScale?: import("@unovis/ts").ContinuousScale;
47
+ yScale?: import("@unovis/ts").ContinuousScale;
48
+ excludeFromDomainCalculation?: boolean;
49
49
  yStacked?: NumericAccessor<Datum>[];
50
50
  tooltip?: import("@unovis/ts").Tooltip;
51
51
  hideWhenFarFromPointer?: boolean;
@@ -5,9 +5,6 @@ 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
- value: NumericAccessor<Datum>;
9
- color?: import("@unovis/ts").ColorAccessor<Datum>;
10
- id?: (d: Datum, i: number, ...any: unknown[]) => string | number;
11
8
  duration?: number;
12
9
  events?: {
13
10
  [selector: string]: {
@@ -40,6 +37,9 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
40
37
  };
41
38
  };
42
39
  data?: Datum[];
40
+ value: NumericAccessor<Datum>;
41
+ color?: import("@unovis/ts").ColorAccessor<Datum>;
42
+ id?: (d: Datum, i: number, ...any: unknown[]) => string | number;
43
43
  angleRange?: [number, number];
44
44
  cornerRadius?: number;
45
45
  padAngle?: number;
@@ -5,13 +5,6 @@ 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?: string | string[] | ((d: Datum, i: number, ...any: unknown[]) => string) | ((d: Datum[], i: number, ...any: unknown[]) => string);
9
- x?: import("@unovis/ts").NumericAccessor<Datum>;
10
- y?: import("@unovis/ts").NumericAccessor<Datum> | import("@unovis/ts").NumericAccessor<Datum>[];
11
- id?: (d: Datum, i: number, ...any: any[]) => string;
12
- xScale?: import("@unovis/ts").ContinuousScale;
13
- yScale?: import("@unovis/ts").ContinuousScale;
14
- excludeFromDomainCalculation?: boolean;
15
8
  duration?: number;
16
9
  events?: {
17
10
  [selector: string]: {
@@ -44,6 +37,13 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
44
37
  };
45
38
  };
46
39
  data?: Datum[];
40
+ color?: string | string[] | ((d: Datum, i: number, ...any: unknown[]) => string) | ((d: Datum[], i: number, ...any: unknown[]) => string);
41
+ x?: import("@unovis/ts").NumericAccessor<Datum>;
42
+ y?: import("@unovis/ts").NumericAccessor<Datum> | import("@unovis/ts").NumericAccessor<Datum>[];
43
+ id?: (d: Datum, i: number, ...any: any[]) => string;
44
+ xScale?: import("@unovis/ts").ContinuousScale;
45
+ yScale?: import("@unovis/ts").ContinuousScale;
46
+ excludeFromDomainCalculation?: boolean;
47
47
  onBrush?: (selection: import("@unovis/ts").FreeBrushSelection, event: import("d3-brush").D3BrushEvent<unknown>, userDriven: boolean) => void;
48
48
  onBrushStart?: (selection: import("@unovis/ts").FreeBrushSelection, event: import("d3-brush").D3BrushEvent<unknown>, userDriven: boolean) => void;
49
49
  onBrushMove?: (selection: import("@unovis/ts").FreeBrushSelection, event: import("d3-brush").D3BrushEvent<unknown>, userDriven: boolean) => void;
@@ -5,14 +5,6 @@ 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>;
9
- cursor?: import("@unovis/ts").StringAccessor<Datum>;
10
- x: NumericAccessor<Datum>;
11
- y: NumericAccessor<Datum> | NumericAccessor<Datum>[];
12
- id?: (d: Datum, i: number, ...any: any[]) => string;
13
- xScale?: import("@unovis/ts").ContinuousScale;
14
- yScale?: import("@unovis/ts").ContinuousScale;
15
- excludeFromDomainCalculation?: boolean;
16
8
  duration?: number;
17
9
  events?: {
18
10
  [selector: string]: {
@@ -45,6 +37,14 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
45
37
  };
46
38
  };
47
39
  data?: Datum[];
40
+ color?: import("@unovis/ts").ColorAccessor<Datum>;
41
+ cursor?: import("@unovis/ts").StringAccessor<Datum>;
42
+ x: NumericAccessor<Datum>;
43
+ y: NumericAccessor<Datum> | NumericAccessor<Datum>[];
44
+ id?: (d: Datum, i: number, ...any: any[]) => string;
45
+ xScale?: import("@unovis/ts").ContinuousScale;
46
+ yScale?: import("@unovis/ts").ContinuousScale;
47
+ excludeFromDomainCalculation?: boolean;
48
48
  groupWidth?: number;
49
49
  groupMaxWidth?: number;
50
50
  dataStep?: number;
@@ -5,15 +5,6 @@ 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[]>;
9
- curveType?: import("@unovis/ts").CurveType;
10
- cursor?: import("@unovis/ts").StringAccessor<Datum[]>;
11
- x: NumericAccessor<Datum>;
12
- y: NumericAccessor<Datum> | NumericAccessor<Datum>[];
13
- id?: (d: Datum, i: number, ...any: any[]) => string;
14
- xScale?: import("@unovis/ts").ContinuousScale;
15
- yScale?: import("@unovis/ts").ContinuousScale;
16
- excludeFromDomainCalculation?: boolean;
17
8
  duration?: number;
18
9
  events?: {
19
10
  [selector: string]: {
@@ -46,6 +37,15 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
46
37
  };
47
38
  };
48
39
  data?: Datum[];
40
+ color?: import("@unovis/ts").ColorAccessor<Datum[]>;
41
+ curveType?: import("@unovis/ts").CurveType;
42
+ cursor?: import("@unovis/ts").StringAccessor<Datum[]>;
43
+ x: NumericAccessor<Datum>;
44
+ y: NumericAccessor<Datum> | NumericAccessor<Datum>[];
45
+ id?: (d: Datum, i: number, ...any: any[]) => string;
46
+ xScale?: import("@unovis/ts").ContinuousScale;
47
+ yScale?: import("@unovis/ts").ContinuousScale;
48
+ excludeFromDomainCalculation?: boolean;
49
49
  lineWidth?: number;
50
50
  lineDashArray?: import("@unovis/ts").GenericAccessor<number[], Datum[]>;
51
51
  fallbackValue?: number;
@@ -1,2 +1,2 @@
1
- "use strict";const t=require("vue"),d=require("@unovis/ts"),c=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),g={"data-vis-component":""},m=t.defineComponent({__name:"index",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(i,{expose:p}){const s=i,o=t.inject(y.componentAccessorKey),a=t.computed(()=>o.data.value??s.data),r=c.useForwardProps(s),n=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;n.value=new d.NestedDonut(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,l)=>{var u;c.arePropsEqual(e,l)||(u=n.value)==null||u.setConfig(r.value)}),t.watch(a,()=>{var e;(e=n.value)==null||e.setData(a.value)}),p({component:n}),(e,l)=>(t.openBlock(),t.createElementBlock("div",g))}});module.exports=m;
1
+ "use strict";const t=require("vue"),d=require("@unovis/ts"),c=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),g={"data-vis-component":""},m=t.defineComponent({__name:"index",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},showSegmentLabels:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(i,{expose:p}){const s=i,o=t.inject(y.componentAccessorKey),a=t.computed(()=>o.data.value??s.data),r=c.useForwardProps(s),n=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;n.value=new d.NestedDonut(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,l)=>{var u;c.arePropsEqual(e,l)||(u=n.value)==null||u.setConfig(r.value)}),t.watch(a,()=>{var e;(e=n.value)==null||e.setData(a.value)}),p({component:n}),(e,l)=>(t.openBlock(),t.createElementBlock("div",g))}});module.exports=m;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","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, Array, null] },\n segmentLabel: { type: [Function, String, null] },\n segmentLabelColor: { type: [Function, String, Array, 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":"oIAGMA,EAAa,CAAE,qBAAsB,IASfC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,WAAY,CAAC,EACb,UAAW,CAAC,EACZ,MAAO,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACxC,aAAc,CAAC,EACf,gBAAiB,CAAC,EAClB,oBAAqB,CAAE,KAAM,OAAQ,EACrC,eAAgB,CAAE,KAAM,OAAQ,EAChC,KAAM,CAAE,KAAM,QAAS,EACvB,OAAQ,CAAC,EACT,cAAe,CAAE,KAAM,CAAC,SAAU,IAAI,CAAE,EACxC,aAAc,CAAC,EACf,aAAc,CAAC,EACf,kBAAmB,CAAC,EACpB,6BAA8B,CAAE,KAAM,OAAQ,EAC9C,aAAc,CAAE,KAAM,CAAC,SAAU,OAAQ,MAAO,IAAI,CAAE,EACtD,aAAc,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EAC/C,kBAAmB,CAAE,KAAM,CAAC,SAAU,OAAQ,MAAO,IAAI,CAAE,EAC3D,kBAAmB,CAAE,KAAM,OAAQ,EACnC,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,EAAmB,YAAAN,EAAO,KAAK,GAC3CO,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"}
1
+ {"version":3,"file":"index.cjs","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, Array, null] },\n segmentLabel: { type: [Function, String, null] },\n segmentLabelColor: { type: [Function, String, Array, null] },\n showEmptySegments: { type: Boolean },\n showSegmentLabels: { 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":"oIAGMA,EAAa,CAAE,qBAAsB,IASfC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,WAAY,CAAC,EACb,UAAW,CAAC,EACZ,MAAO,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACxC,aAAc,CAAC,EACf,gBAAiB,CAAC,EAClB,oBAAqB,CAAE,KAAM,OAAQ,EACrC,eAAgB,CAAE,KAAM,OAAQ,EAChC,KAAM,CAAE,KAAM,QAAS,EACvB,OAAQ,CAAC,EACT,cAAe,CAAE,KAAM,CAAC,SAAU,IAAI,CAAE,EACxC,aAAc,CAAC,EACf,aAAc,CAAC,EACf,kBAAmB,CAAC,EACpB,6BAA8B,CAAE,KAAM,OAAQ,EAC9C,aAAc,CAAE,KAAM,CAAC,SAAU,OAAQ,MAAO,IAAI,CAAE,EACtD,aAAc,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EAC/C,kBAAmB,CAAE,KAAM,CAAC,SAAU,OAAQ,MAAO,IAAI,CAAE,EAC3D,kBAAmB,CAAE,KAAM,OAAQ,EACnC,kBAAmB,CAAE,KAAM,OAAQ,EACnC,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,EAAmB,YAAAN,EAAO,KAAK,GAC3CO,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,7 +5,6 @@ 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
- value?: import("@unovis/ts").NumericAccessor<Datum>;
9
8
  duration?: number;
10
9
  events?: {
11
10
  [selector: string]: {
@@ -38,6 +37,7 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
38
37
  };
39
38
  };
40
39
  data?: Datum[];
40
+ value?: import("@unovis/ts").NumericAccessor<Datum>;
41
41
  angleRange?: [number, number];
42
42
  cornerRadius?: number;
43
43
  centralLabel?: string;
@@ -55,6 +55,7 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
55
55
  segmentColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").NestedDonutSegment<Datum>>;
56
56
  segmentLabel?: StringAccessor<import("@unovis/ts").NestedDonutSegment<Datum>>;
57
57
  segmentLabelColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").NestedDonutSegment<Datum>>;
58
+ showSegmentLabels?: boolean;
58
59
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
59
60
  expose(exposed: import("vue").ShallowUnwrapRef<{
60
61
  component: import("vue").Ref<NestedDonut<Datum>>;
@@ -1,8 +1,8 @@
1
- import { defineComponent as p, inject as m, computed as d, ref as y, onMounted as g, 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": "" }, C = /* @__PURE__ */ p({
1
+ import { defineComponent as i, inject as m, computed as d, ref as y, onMounted as g, nextTick as v, onUnmounted as f, watch as u, openBlock as b, createElementBlock as S } from "vue";
2
+ import { NestedDonut as B } from "@unovis/ts";
3
+ import { useForwardProps as _, arePropsEqual as h } from "../../utils/props.js";
4
+ import { componentAccessorKey as w } from "../../utils/context.js";
5
+ const F = { "data-vis-component": "" }, C = /* @__PURE__ */ i({
6
6
  __name: "index",
7
7
  props: {
8
8
  angleRange: {},
@@ -23,30 +23,31 @@ const w = { "data-vis-component": "" }, C = /* @__PURE__ */ p({
23
23
  segmentLabel: { type: [Function, String, null] },
24
24
  segmentLabelColor: { type: [Function, String, Array, null] },
25
25
  showEmptySegments: { type: Boolean },
26
+ showSegmentLabels: { type: Boolean },
26
27
  duration: {},
27
28
  events: {},
28
29
  attributes: {},
29
30
  data: {}
30
31
  },
31
- setup(c, { expose: i }) {
32
- const r = c, n = m(h), o = d(() => n.data.value ?? r.data), a = B(r), t = y();
32
+ setup(c, { expose: p }) {
33
+ const r = c, n = m(w), o = d(() => n.data.value ?? r.data), a = _(r), t = y();
33
34
  return g(() => {
34
35
  v(() => {
35
36
  var e;
36
- t.value = new _(a.value), (e = t.value) == null || e.setData(o.value), n.update(t.value);
37
+ t.value = new B(a.value), (e = t.value) == null || e.setData(o.value), n.update(t.value);
37
38
  });
38
39
  }), f(() => {
39
40
  var e;
40
41
  (e = t.value) == null || e.destroy(), n.destroy();
41
42
  }), u(a, (e, l) => {
42
43
  var s;
43
- F(e, l) || (s = t.value) == null || s.setConfig(a.value);
44
+ h(e, l) || (s = t.value) == null || s.setConfig(a.value);
44
45
  }), u(o, () => {
45
46
  var e;
46
47
  (e = t.value) == null || e.setData(o.value);
47
- }), i({
48
+ }), p({
48
49
  component: t
49
- }), (e, l) => (b(), S("div", w));
50
+ }), (e, l) => (b(), S("div", F));
50
51
  }
51
52
  });
52
53
  export {
@@ -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, 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, Array, null] },\n segmentLabel: { type: [Function, String, null] },\n segmentLabelColor: { type: [Function, String, Array, 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,IAC9C,cAAc,EAAE,MAAM,CAAC,UAAU,QAAQ,OAAO,IAAI,EAAE;AAAA,IACtD,cAAc,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IAC/C,mBAAmB,EAAE,MAAM,CAAC,UAAU,QAAQ,OAAO,IAAI,EAAE;AAAA,IAC3D,mBAAmB,EAAE,MAAM,QAAQ;AAAA,IACnC,UAAU,CAAC;AAAA,IACX,QAAQ,CAAC;AAAA,IACT,YAAY,CAAC;AAAA,IACb,MAAM,CAAC;AAAA,EACT;AAAA,EACA,MAAMC,GAAc,EAAE,QAAQC,KAAY;AAE5C,UAAMC,IAAQF,GAGRG,IAAWC,EAAOC,CAAoB,GAKtCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,SAASD,EAAM,IAAI,GAEvDM,IAASC,EAAgBP,CAAK,GAG9BQ,IAAYC;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAII,EAAmBN,EAAO,KAAK,IAC3CO,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
+ {"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, Array, null] },\n segmentLabel: { type: [Function, String, null] },\n segmentLabelColor: { type: [Function, String, Array, null] },\n showEmptySegments: { type: Boolean },\n showSegmentLabels: { 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,IAC9C,cAAc,EAAE,MAAM,CAAC,UAAU,QAAQ,OAAO,IAAI,EAAE;AAAA,IACtD,cAAc,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IAC/C,mBAAmB,EAAE,MAAM,CAAC,UAAU,QAAQ,OAAO,IAAI,EAAE;AAAA,IAC3D,mBAAmB,EAAE,MAAM,QAAQ;AAAA,IACnC,mBAAmB,EAAE,MAAM,QAAQ;AAAA,IACnC,UAAU,CAAC;AAAA,IACX,QAAQ,CAAC;AAAA,IACT,YAAY,CAAC;AAAA,IACb,MAAM,CAAC;AAAA,EACT;AAAA,EACA,MAAMC,GAAc,EAAE,QAAQC,KAAY;AAE5C,UAAMC,IAAQF,GAGRG,IAAWC,EAAOC,CAAoB,GAKtCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,SAASD,EAAM,IAAI,GAEvDM,IAASC,EAAgBP,CAAK,GAG9BQ,IAAYC;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAII,EAAmBN,EAAO,KAAK,IAC3CO,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;"}
@@ -5,7 +5,6 @@ declare const _default: <N extends import("@unovis/ts").GraphInputNode, L extend
5
5
  slots: any;
6
6
  }, __VLS_expose?: any, __VLS_setup?: Promise<{
7
7
  props: {
8
- id?: (d: import("@unovis/ts").GraphInputNode | import("@unovis/ts").GraphInputLink, i: number, ...any: unknown[]) => string;
9
8
  duration?: number;
10
9
  events?: {
11
10
  [selector: string]: {
@@ -42,6 +41,7 @@ declare const _default: <N extends import("@unovis/ts").GraphInputNode, L extend
42
41
  links?: L[];
43
42
  };
44
43
  label?: import("@unovis/ts").StringAccessor<import("@unovis/ts").SankeyNode<N, L>>;
44
+ id?: (d: import("@unovis/ts").GraphInputNode | import("@unovis/ts").GraphInputLink, i: number, ...any: unknown[]) => string;
45
45
  labelFontSize?: number;
46
46
  labelColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").SankeyNode<N, L>>;
47
47
  linkColor?: import("@unovis/ts").StringAccessor<import("@unovis/ts").SankeyLink<N, L>>;
@@ -5,14 +5,6 @@ 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>;
9
- cursor?: import("@unovis/ts").StringAccessor<Datum>;
10
- x: NumericAccessor<Datum>;
11
- y: NumericAccessor<Datum> | NumericAccessor<Datum>[];
12
- id?: (d: Datum, i: number, ...any: any[]) => string;
13
- xScale?: import("@unovis/ts").ContinuousScale;
14
- yScale?: import("@unovis/ts").ContinuousScale;
15
- excludeFromDomainCalculation?: boolean;
16
8
  duration?: number;
17
9
  events?: {
18
10
  [selector: string]: {
@@ -46,6 +38,14 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
46
38
  };
47
39
  data?: Datum[];
48
40
  label?: import("@unovis/ts").StringAccessor<Datum>;
41
+ color?: import("@unovis/ts").ColorAccessor<Datum>;
42
+ cursor?: import("@unovis/ts").StringAccessor<Datum>;
43
+ x: NumericAccessor<Datum>;
44
+ y: NumericAccessor<Datum> | NumericAccessor<Datum>[];
45
+ id?: (d: Datum, i: number, ...any: any[]) => string;
46
+ xScale?: import("@unovis/ts").ContinuousScale;
47
+ yScale?: import("@unovis/ts").ContinuousScale;
48
+ excludeFromDomainCalculation?: boolean;
49
49
  labelColor?: import("@unovis/ts").ColorAccessor<Datum>;
50
50
  labelPosition?: import("@unovis/ts").GenericAccessor<string, Datum>;
51
51
  size?: NumericAccessor<Datum>;
@@ -5,14 +5,6 @@ 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>;
9
- cursor?: import("@unovis/ts").StringAccessor<Datum>;
10
- x: NumericAccessor<Datum>;
11
- y: NumericAccessor<Datum> | NumericAccessor<Datum>[];
12
- id?: (d: Datum, i: number, ...any: any[]) => string;
13
- xScale?: import("@unovis/ts").ContinuousScale;
14
- yScale?: import("@unovis/ts").ContinuousScale;
15
- excludeFromDomainCalculation?: boolean;
16
8
  duration?: number;
17
9
  events?: {
18
10
  [selector: string]: {
@@ -45,6 +37,14 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
45
37
  };
46
38
  };
47
39
  data?: Datum[];
40
+ color?: import("@unovis/ts").ColorAccessor<Datum>;
41
+ cursor?: import("@unovis/ts").StringAccessor<Datum>;
42
+ x: NumericAccessor<Datum>;
43
+ y: NumericAccessor<Datum> | NumericAccessor<Datum>[];
44
+ id?: (d: Datum, i: number, ...any: any[]) => string;
45
+ xScale?: import("@unovis/ts").ContinuousScale;
46
+ yScale?: import("@unovis/ts").ContinuousScale;
47
+ excludeFromDomainCalculation?: boolean;
48
48
  dataStep?: number;
49
49
  barPadding?: number;
50
50
  roundedCorners?: number | boolean;