vue-chrts 2.1.0-beta-7 → 2.1.0-beta-8

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 (35) hide show
  1. package/dist/components/AreaChart/AreaChart.js +95 -116
  2. package/dist/components/AreaChart/types.d.ts +1 -205
  3. package/dist/components/BarChart/BarChart.js +9 -9
  4. package/dist/components/BarChart/types.d.ts +1 -191
  5. package/dist/components/BubbleChart/BubbleChart.js +4 -4
  6. package/dist/components/BubbleChart/types.d.ts +1 -172
  7. package/dist/components/DagreGraph/DagreGraph.js +65 -62
  8. package/dist/components/DagreGraph/types.d.ts +1 -1
  9. package/dist/components/DonutChart/DonutChart.js +5 -5
  10. package/dist/components/DonutChart/types.d.ts +2 -68
  11. package/dist/components/DualChart/DualChart.js +125 -122
  12. package/dist/components/DualChart/types.d.ts +1 -1
  13. package/dist/components/GanttChart/GanttChart.js +6 -6
  14. package/dist/components/GanttChart/types.d.ts +1 -124
  15. package/dist/components/LineChart/LineChart.js +7 -12
  16. package/dist/components/LineChart/types.d.ts +1 -2
  17. package/dist/components/Maps/DottedMap/DottedMap.js +2 -2
  18. package/dist/components/Maps/DottedMap/core.js +2 -2
  19. package/dist/components/Maps/DottedMap/core.vue.d.ts +1 -1
  20. package/dist/components/Maps/DottedMap/mapUtils.js +1 -1
  21. package/dist/components/Maps/TopoJSONMap/TopoJSONMap.js +5 -5
  22. package/dist/components/SankeyChart/SankeyChart.js +59 -56
  23. package/dist/components/SankeyChart/types.d.ts +1 -1
  24. package/dist/components/Tooltip.js +5 -5
  25. package/dist/index.d.ts +3 -3
  26. package/dist/index.js +2 -2
  27. package/dist/node_modules/.pnpm/{@turf_boolean-point-in-polygon@7.3.1 → @turf_boolean-point-in-polygon@7.3.2}/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +1 -1
  28. package/dist/node_modules/.pnpm/robust-predicates@3.0.2/node_modules/robust-predicates/esm/orient2d.js +1 -1
  29. package/dist/packages/shared/dist/donut-chart.js +7 -0
  30. package/dist/packages/shared/dist/index.js +19 -0
  31. package/dist/types.d.ts +7 -101
  32. package/package.json +8 -2
  33. package/dist/components/DonutChart/types.js +0 -4
  34. package/dist/types.js +0 -6
  35. /package/dist/node_modules/.pnpm/{@turf_invariant@7.3.1 → @turf_invariant@7.3.2}/node_modules/@turf/invariant/dist/esm/index.js +0 -0
@@ -1,191 +1 @@
1
- import { BulletLegendItemInterface, Orientation, LegendPosition, axisFormatter, AxisConfig, TooltipConfig } from '../../types';
2
- type BarChartPropsBase<T> = {
3
- /**
4
- * The data to be displayed in the bar chart.
5
- * Each element of the array represents a data point.
6
- * The structure of 'T' should be compatible with the chart's rendering logic.
7
- */
8
- data: T[];
9
- /**
10
- * If `true`, creates a stacked bar chart instead of grouped bars.
11
- */
12
- stacked?: boolean;
13
- /**
14
- * The height of the chart in pixels.
15
- */
16
- height: number;
17
- /**
18
- * Optional label for the x-axis.
19
- */
20
- xLabel?: string;
21
- /**
22
- * Optional label for the y-axis.
23
- */
24
- yLabel?: string;
25
- /**
26
- * Optional padding applied to the chart.
27
- * Allows specifying individual padding values for the top, right, bottom, and left sides.
28
- */
29
- padding?: {
30
- top: number;
31
- right: number;
32
- bottom: number;
33
- left: number;
34
- };
35
- /**
36
- * A record mapping category keys to `BulletLegendItemInterface` objects.
37
- * This defines the visual representation and labels for each category in the chart's legend.
38
- */
39
- categories: Record<string, BulletLegendItemInterface>;
40
- /**
41
- * @param {number|Date} tick - The value of the tick. This can be a number or a Date object depending on the scale of the x-axis.
42
- * @param {number} i - The index of the tick in the `ticks` array.
43
- * @param {(number[]|Date[])} ticks - An array of all tick values for the x-axis.
44
- * @returns {string} The formatted string representation of the tick.
45
- */
46
- xFormatter?: axisFormatter;
47
- /**
48
- * @param {number|Date} tick - The value of the tick. This can be a number or a Date object depending on the scale of the y-axis.
49
- * @param {number} i - The index of the tick in the `ticks` array.
50
- * @param {(number[]|Date[])} ticks - An array of all tick values for the y-axis.
51
- * @returns {string} The formatted string representation of the tick.
52
- */
53
- yFormatter?: axisFormatter;
54
- /**
55
- * Use custom formatter for tooltip titles
56
- */
57
- tooltipTitleFormatter?: (data: T) => string | number;
58
- /**
59
- * The desired number of ticks on the y-axis.
60
- */
61
- yNumTicks?: number;
62
- /**
63
- * Force only first and last ticks on the x-axis.
64
- */
65
- minMaxTicksOnly?: boolean;
66
- /**
67
- * The desired number of ticks on the x-axis.
68
- */
69
- xNumTicks?: number;
70
- /**
71
- * Force specific ticks on the x-axis.
72
- */
73
- xExplicitTicks?: (number | string | Date)[];
74
- /**
75
- * An array of property keys from the data object type 'T' to be used for the y-axis values.
76
- */
77
- yAxis: (keyof T)[];
78
- /**
79
- * The padding between groups of bars in pixels.
80
- */
81
- groupPadding?: number;
82
- /**
83
- * Fractional padding between the bars in the range of [0,1). Default: 0
84
- */
85
- barPadding?: number;
86
- /**
87
- * Rounded corners for top bars. Boolean or number (to set the radius in pixels). Default: 2
88
- */
89
- radius?: number;
90
- /**
91
- * If `true`, hides the chart legend.
92
- */
93
- hideLegend?: boolean;
94
- /**
95
- * If `true`, hides the chart tooltip.
96
- */
97
- hideTooltip?: boolean;
98
- /**
99
- * The orientation of the bars (vertical or horizontal).
100
- * See `Orientation` for available options.
101
- */
102
- orientation?: Orientation;
103
- /**
104
- * Optional position for the legend, if applicable.
105
- * See `LegendPosition` for available options.
106
- */
107
- legendPosition?: LegendPosition;
108
- /**
109
- * Animation duration in milliseconds for the chart components.
110
- */
111
- duration?: number;
112
- /**
113
- * Configuration object for the chart tooltip.
114
- */
115
- tooltip?: TooltipConfig;
116
- /**
117
- * Optional style object for the legend container. Allows custom CSS styling.
118
- */
119
- legendStyle?: string | Record<string, string>;
120
- /**
121
- * If `true`, displays a domain line (axis line) along the x-axis.
122
- */
123
- xDomainLine?: boolean;
124
- /**
125
- * If `true`, displays a domain line (axis line) along the y-axis.
126
- */
127
- yDomainLine?: boolean;
128
- /**
129
- * If `true`, displays tick lines on the x-axis.
130
- */
131
- xTickLine?: boolean;
132
- /**
133
- * If `true`, displays tick lines on the y-axis.
134
- */
135
- yTickLine?: boolean;
136
- /**
137
- * If `true`, displays grid lines along the x-axis.
138
- */
139
- xGridLine?: boolean;
140
- /**
141
- * If `true`, displays grid lines along the y-axis.
142
- */
143
- yGridLine?: boolean;
144
- /**
145
- * If `true`, hide the x-axis.
146
- */
147
- hideXAxis?: boolean;
148
- /**
149
- * If `true`, hide the y-axis.
150
- */
151
- hideYAxis?: boolean;
152
- /**
153
- * Specific spacing between stacked and grouped bars in pixels.
154
- * Only applicable if `stackAndGrouped` is `true`.
155
- */
156
- stackedGroupedSpacing?: number;
157
- /**
158
- * Axis configuration object for customizing the appearance of the axes.
159
- */
160
- xAxisConfig?: AxisConfig;
161
- /**
162
- * Axis configuration object for customizing the appearance of the axes.
163
- */
164
- yAxisConfig?: AxisConfig;
165
- };
166
- export type BarChartProps<T> = BarChartPropsBase<T> & {
167
- /**
168
- * Whether the bars should be stacked and grouped.
169
- * If true, `valueLabel` is optional and `xAxis` is required.
170
- */
171
- stackAndGrouped?: boolean;
172
- /**
173
- * Configuration for the value label display.
174
- * Required if `stackAndGrouped` is false and `xAxis` is present.
175
- * Optional otherwise.
176
- */
177
- valueLabel?: ValueLabel;
178
- /**
179
- * The data key for the X-axis.
180
- * Required if `stackAndGrouped` is true, or if `stackAndGrouped` is false AND `valueLabel` is present.
181
- */
182
- xAxis?: keyof T;
183
- };
184
- export type ValueLabel = {
185
- label: (d: any, index: number) => string | number;
186
- labelSpacing?: number;
187
- backgroundColor?: string;
188
- color?: string;
189
- labelFontSize?: number;
190
- };
191
- export {};
1
+ export type { BarChartProps, BarChartPropsBase, ValueLabel } from '../../../../shared/dist/index.d.ts';
@@ -1,7 +1,7 @@
1
- import { defineComponent as D, useSlots as N, useTemplateRef as O, ref as S, computed as p, createElementBlock as g, openBlock as r, normalizeStyle as d, createVNode as c, createCommentVNode as n, createElementVNode as R, unref as t, withCtx as K, createBlock as u, mergeProps as x, renderSlot as k } from "vue";
1
+ import { defineComponent as D, useSlots as N, useTemplateRef as O, ref as S, computed as p, openBlock as r, createElementBlock as g, normalizeStyle as d, createVNode as c, unref as t, withCtx as R, createBlock as u, createCommentVNode as n, mergeProps as x, createElementVNode as K, renderSlot as k } from "vue";
2
2
  import { Scatter as M, Position as E } from "@unovis/ts";
3
3
  import { VisXYContainer as G, VisTooltip as W, VisScatter as $, VisAxis as L, VisBulletLegend as j } from "@unovis/vue";
4
- import { LegendPosition as X } from "../../types.js";
4
+ import { LegendPosition as X } from "../../packages/shared/dist/index.js";
5
5
  import Y from "../Tooltip.js";
6
6
  const q = {
7
7
  ref: "slotWrapper",
@@ -90,7 +90,7 @@ const q = {
90
90
  scaleByDomain: !0,
91
91
  onClick: a[0] || (a[0] = (i) => A("click", i, l.value))
92
92
  }, {
93
- default: K(() => [
93
+ default: R(() => [
94
94
  e.hideTooltip ? n("", !0) : (r(), u(t(W), {
95
95
  key: 0,
96
96
  triggers: V,
@@ -154,7 +154,7 @@ const q = {
154
154
  }))
155
155
  }, null, 8, ["style", "items"])
156
156
  ], 4)),
157
- R("div", q, [
157
+ K("div", q, [
158
158
  t(T).tooltip ? k(o.$slots, "tooltip", {
159
159
  key: 0,
160
160
  values: l.value
@@ -1,172 +1 @@
1
- import { axisFormatter, BulletLegendItemInterface, LegendPosition, CrosshairConfig, AxisConfig, TooltipConfig } from '../../types';
2
- import { NumericAccessor, Position } from '@unovis/ts';
3
- export interface SizeOptions {
4
- minRadius?: number;
5
- maxRadius?: number;
6
- }
7
- export interface BubbleChartProps<T> {
8
- /**
9
- * Accessor for x value (index, property, etc). If not provided, defaults to d.beakLength.
10
- */
11
- xAccessor?: NumericAccessor<T>;
12
- /**
13
- * Accessor for y value. If not provided, defaults to d.flipperLength.
14
- */
15
- yAccessor?: NumericAccessor<T>;
16
- /**
17
- * Accessor for bubble size. If not provided, defaults to 1.
18
- */
19
- sizeAccessor?: NumericAccessor<T>;
20
- /**
21
- * Label position for bubbles (default: Position.Bottom)
22
- */
23
- labelPosition?: Position;
24
- /**
25
- * Range for bubble sizes (default: [1, 20])
26
- */
27
- sizeRange?: [number, number];
28
- /**
29
- * Opacity for bubbles
30
- */
31
- opacity?: number;
32
- /**
33
- * Explicit tick values for x axis
34
- */
35
- xExplicitTicks?: (number | string | Date)[];
36
- /**
37
- * Only show min/max ticks for x axis
38
- */
39
- minMaxTicksOnly?: boolean;
40
- /**
41
- * The data to be displayed in the bubble chart.
42
- * Each element of the array represents a data point.
43
- * The structure of 'T' should be compatible with the chart's rendering logic.
44
- */
45
- data: T[];
46
- /**
47
- * If `true`, hides the chart legend.
48
- */
49
- hideLegend?: boolean;
50
- /**
51
- * The height of the chart in pixels.
52
- */
53
- height: number;
54
- /**
55
- * Optional label for the x-axis.
56
- */
57
- xLabel?: string;
58
- /**
59
- * Optional label for the y-axis.
60
- */
61
- yLabel?: string;
62
- /**
63
- * Optional padding applied to the chart.
64
- * Allows specifying individual padding values for the top, right, bottom, and left sides.
65
- */
66
- padding?: {
67
- top: number;
68
- right: number;
69
- bottom: number;
70
- left: number;
71
- };
72
- /**
73
- * A record mapping category keys to `BulletLegendItemInterface` objects.
74
- * This defines the visual representation and labels for each category in the chart's legend.
75
- * REQUIRED: Each unique value in your data's categoryKey field must have a corresponding entry with a color.
76
- */
77
- categories: Record<string, BulletLegendItemInterface>;
78
- categoryKey: keyof T;
79
- /**
80
- * @param {number|Date} tick - The value of the tick. This can be a number or a Date object depending on the scale of the x-axis.
81
- * @param {number} i - The index of the tick in the `ticks` array.
82
- * @param {(number[]|Date[])} ticks - An array of all tick values for the x-axis.
83
- * @returns {string} The formatted string representation of the tick.
84
- */
85
- xFormatter?: axisFormatter;
86
- /**
87
- * @param {number|Date} tick - The value of the tick. This can be a number or a Date object depending on the scale of the y-axis.
88
- * @param {number} i - The index of the tick in the `ticks` array.
89
- * @param {(number[]|Date[])} ticks - An array of all tick values for the y-axis.
90
- * @returns {string} The formatted string representation of the tick.
91
- */
92
- yFormatter?: axisFormatter;
93
- /**
94
- * Use custom formatter for tooltip titles
95
- */
96
- tooltipTitleFormatter?: (data: T) => string | number;
97
- /**
98
- * Optional position for the legend, if applicable.
99
- * See `LegendPosition` for available options.
100
- */
101
- legendPosition?: LegendPosition;
102
- /**
103
- * Optional inline CSS styles for the legend container.
104
- */
105
- legendStyle?: Record<string, string>;
106
- /** Options for controlling bubble sizes. */
107
- sizeOptions?: SizeOptions;
108
- /**
109
- * If `true`, displays a domain line (axis line) along the x-axis.
110
- */
111
- xDomainLine?: boolean;
112
- /**
113
- * If `true`, displays a domain line (axis line) along the y-axis.
114
- */
115
- yDomainLine?: boolean;
116
- /**
117
- * If `true`, displays tick lines on the x-axis.
118
- */
119
- xTickLine?: boolean;
120
- /**
121
- * If `true`, displays tick lines on the y-axis.
122
- */
123
- yTickLine?: boolean;
124
- /**
125
- * If `true`, displays grid lines along the x-axis.
126
- */
127
- xGridLine?: boolean;
128
- /**
129
- * If `true`, displays grid lines along the y-axis.
130
- */
131
- yGridLine?: boolean;
132
- /**
133
- * If `true`, hide the x-axis.
134
- */
135
- hideXAxis?: boolean;
136
- /**
137
- * If `true`, hide the y-axis.
138
- */
139
- hideYAxis?: boolean;
140
- /**
141
- * The desired number of ticks on the x-axis.
142
- */
143
- xNumTicks?: number;
144
- /**
145
- * The desired number of ticks on the y-axis.
146
- */
147
- yNumTicks?: number;
148
- /**
149
- * If `true`, hides the tooltip.
150
- */
151
- hideTooltip?: boolean;
152
- /**
153
- * Crosshair configuration object for customizing the appearance of the crosshair line.
154
- */
155
- crosshairConfig?: CrosshairConfig;
156
- /**
157
- * Axis configuration object for customizing the appearance of the axes.
158
- */
159
- xAxisConfig?: AxisConfig;
160
- /**
161
- * Axis configuration object for customizing the appearance of the axes.
162
- */
163
- yAxisConfig?: AxisConfig;
164
- /**
165
- * Animation duration in milliseconds for the chart components.
166
- */
167
- duration?: number;
168
- /**
169
- * Configuration object for the chart tooltip.
170
- */
171
- tooltip?: TooltipConfig;
172
- }
1
+ export type { BubbleChartProps, SizeOptions } from '../../../../shared/dist/index.d.ts';
@@ -1,14 +1,14 @@
1
- import { defineComponent as E, useSlots as M, useTemplateRef as N, ref as V, computed as l, createElementBlock as c, openBlock as u, normalizeStyle as f, createVNode as k, createCommentVNode as s, createElementVNode as g, unref as a, withCtx as P, createBlock as G, renderSlot as h, toDisplayString as y } from "vue";
2
- import { VisSingleContainer as I, VisTooltip as Z, VisGraph as $, VisBulletLegend as j } from "@unovis/vue";
3
- import { Graph as m, GraphLayoutType as R } from "@unovis/ts";
4
- import { LegendPosition as q } from "../../types.js";
5
- const H = {
1
+ import { defineComponent as N, useSlots as V, useTemplateRef as P, ref as G, computed as l, openBlock as u, createElementBlock as c, normalizeStyle as f, createVNode as k, unref as d, withCtx as I, createBlock as Z, createCommentVNode as s, createElementVNode as g, renderSlot as m, toDisplayString as S } from "vue";
2
+ import { VisSingleContainer as $, VisTooltip as j, VisGraph as R, VisBulletLegend as q } from "@unovis/vue";
3
+ import { Graph as p, GraphLayoutType as H } from "@unovis/ts";
4
+ import { LegendPosition as J } from "../../packages/shared/dist/index.js";
5
+ const K = {
6
6
  ref: "slotWrapper",
7
7
  style: { display: "none" }
8
- }, J = { class: "dagre-tooltip" }, K = { class: "font-semibold" }, O = {
8
+ }, O = { class: "dagre-tooltip" }, Q = { class: "font-semibold" }, U = {
9
9
  key: 0,
10
10
  class: "text-sm text-gray-500"
11
- }, _ = /* @__PURE__ */ E({
11
+ }, te = /* @__PURE__ */ N({
12
12
  __name: "DagreGraph",
13
13
  props: {
14
14
  data: {},
@@ -39,7 +39,7 @@ const H = {
39
39
  zoomScaleExtent: { default: () => [0.1, 10] },
40
40
  nodeDraggingEnabled: { type: Boolean, default: !1 },
41
41
  hideLegend: { type: Boolean, default: !0 },
42
- legendPosition: { default: q.BottomCenter },
42
+ legendPosition: { default: J.BottomCenter },
43
43
  legendStyle: { default: void 0 },
44
44
  legendItems: { default: () => [] },
45
45
  tooltipTitleFormatter: {},
@@ -50,10 +50,10 @@ const H = {
50
50
  duration: { default: 600 }
51
51
  },
52
52
  emits: ["nodeClick", "nodeMouseover", "nodeMouseout", "linkClick", "linkMouseover", "linkMouseout"],
53
- setup(t, { emit: S }) {
54
- const e = t, r = S, p = M();
55
- N("slotWrapper");
56
- const i = V(), v = l(() => typeof e.nodeSize == "function" ? e.nodeSize : () => e.nodeSize), b = l(() => e.nodeLabel ? e.nodeLabel : (o) => o.label || o.id), C = l(() => typeof e.nodeShape == "function" ? e.nodeShape : () => e.nodeShape), L = l(() => typeof e.nodeFill == "function" ? e.nodeFill : () => e.nodeFill), F = l(() => typeof e.nodeStroke == "function" ? e.nodeStroke : () => e.nodeStroke), w = l(() => typeof e.nodeStrokeWidth == "function" ? e.nodeStrokeWidth : () => e.nodeStrokeWidth), A = l(() => e.linkLabel ? e.linkLabel : (o) => o.label || ""), W = l(() => typeof e.linkStroke == "function" ? e.linkStroke : () => e.linkStroke), x = l(() => typeof e.linkWidth == "function" ? e.linkWidth : () => e.linkWidth), z = l(() => {
53
+ setup(t, { emit: v }) {
54
+ const e = t, a = v, b = V();
55
+ P("slotWrapper");
56
+ const i = G(), C = l(() => typeof e.nodeSize == "function" ? e.nodeSize : () => e.nodeSize), L = l(() => e.nodeLabel ? e.nodeLabel : (o) => o.label || o.id), F = l(() => typeof e.nodeShape == "function" ? e.nodeShape : () => e.nodeShape), w = l(() => typeof e.nodeFill == "function" ? e.nodeFill : () => e.nodeFill), A = l(() => typeof e.nodeStroke == "function" ? e.nodeStroke : () => e.nodeStroke), W = l(() => typeof e.nodeStrokeWidth == "function" ? e.nodeStrokeWidth : () => e.nodeStrokeWidth), x = l(() => e.linkLabel ? e.linkLabel : (o) => o.label || ""), z = l(() => typeof e.linkStroke == "function" ? e.linkStroke : () => e.linkStroke), T = l(() => typeof e.linkWidth == "function" ? e.linkWidth : () => e.linkWidth), B = l(() => {
57
57
  switch (e.linkArrow) {
58
58
  case "start":
59
59
  return "start";
@@ -66,100 +66,103 @@ const H = {
66
66
  default:
67
67
  return "end";
68
68
  }
69
- }), T = l(() => e.legendPosition.startsWith("top")), B = l(() => e.legendPosition.includes("left") ? "flex-start" : e.legendPosition.includes("right") ? "flex-end" : "center"), D = {
70
- [m.selectors.node]: {
69
+ }), D = l(() => e.legendPosition.startsWith("top")), E = l(() => e.legendPosition.includes("left") ? "flex-start" : e.legendPosition.includes("right") ? "flex-end" : "center"), M = {
70
+ [p.selectors.node]: {
71
71
  click: (o, n) => {
72
- r("nodeClick", o, n);
72
+ a("nodeClick", o, n);
73
73
  },
74
74
  mouseover: (o, n) => {
75
- i.value = o, r("nodeMouseover", o, n);
75
+ i.value = o, a("nodeMouseover", o, n);
76
76
  },
77
77
  mouseout: (o, n) => {
78
- i.value = void 0, r("nodeMouseout", o, n);
78
+ i.value = void 0, a("nodeMouseout", o, n);
79
79
  }
80
80
  },
81
- [m.selectors.link]: {
81
+ [p.selectors.link]: {
82
82
  click: (o, n) => {
83
- r("linkClick", o, n);
83
+ a("linkClick", o, n);
84
84
  },
85
85
  mouseover: (o, n) => {
86
- r("linkMouseover", o, n);
86
+ a("linkMouseover", o, n);
87
87
  },
88
88
  mouseout: (o, n) => {
89
- r("linkMouseout", o, n);
89
+ a("linkMouseout", o, n);
90
90
  }
91
91
  }
92
92
  };
93
93
  return (o, n) => (u(), c("div", {
94
94
  style: f({
95
95
  display: "flex",
96
- flexDirection: T.value ? "column-reverse" : "column",
96
+ flexDirection: D.value ? "column-reverse" : "column",
97
97
  gap: "var(--vis-legend-spacing)"
98
98
  }),
99
99
  class: "dagre-graph-container"
100
100
  }, [
101
- k(a(I), {
101
+ k(d($), {
102
102
  data: t.data,
103
103
  height: t.height,
104
104
  width: t.width,
105
105
  duration: t.duration,
106
106
  padding: t.padding
107
107
  }, {
108
- default: P(() => [
109
- t.hideTooltip ? s("", !0) : (u(), G(a(Z), {
110
- key: 0,
111
- followCursor: e.tooltip.followCursor,
112
- "show-delay": e.tooltip.showDelay,
113
- "hide-delay": e.tooltip.hideDelay
114
- }, null, 8, ["followCursor", "show-delay", "hide-delay"])),
115
- k(a($), {
116
- layoutType: a(R).Dagre,
117
- dagreLayoutSettings: t.dagreLayoutSettings,
118
- nodeSize: v.value,
119
- nodeLabel: b.value,
120
- nodeShape: C.value,
121
- nodeFill: L.value,
122
- nodeStroke: F.value,
123
- nodeStrokeWidth: w.value,
124
- linkArrow: z.value,
125
- linkLabel: A.value,
126
- linkStroke: W.value,
127
- linkWidth: x.value,
128
- linkCurvature: t.linkCurvature,
129
- zoomScaleExtent: t.zoomScaleExtent,
130
- disableZoom: !t.zoomEnabled,
131
- disableDrag: !t.nodeDraggingEnabled,
132
- events: D
133
- }, null, 8, ["layoutType", "dagreLayoutSettings", "nodeSize", "nodeLabel", "nodeShape", "nodeFill", "nodeStroke", "nodeStrokeWidth", "linkArrow", "linkLabel", "linkStroke", "linkWidth", "linkCurvature", "zoomScaleExtent", "disableZoom", "disableDrag"])
134
- ]),
108
+ default: I(() => {
109
+ var r, h, y;
110
+ return [
111
+ t.hideTooltip ? s("", !0) : (u(), Z(d(j), {
112
+ key: 0,
113
+ followCursor: (r = e.tooltip) == null ? void 0 : r.followCursor,
114
+ "show-delay": (h = e.tooltip) == null ? void 0 : h.showDelay,
115
+ "hide-delay": (y = e.tooltip) == null ? void 0 : y.hideDelay
116
+ }, null, 8, ["followCursor", "show-delay", "hide-delay"])),
117
+ k(d(R), {
118
+ layoutType: d(H).Dagre,
119
+ dagreLayoutSettings: t.dagreLayoutSettings,
120
+ nodeSize: C.value,
121
+ nodeLabel: L.value,
122
+ nodeShape: F.value,
123
+ nodeFill: w.value,
124
+ nodeStroke: A.value,
125
+ nodeStrokeWidth: W.value,
126
+ linkArrow: B.value,
127
+ linkLabel: x.value,
128
+ linkStroke: z.value,
129
+ linkWidth: T.value,
130
+ linkCurvature: t.linkCurvature,
131
+ zoomScaleExtent: t.zoomScaleExtent,
132
+ disableZoom: !t.zoomEnabled,
133
+ disableDrag: !t.nodeDraggingEnabled,
134
+ events: M
135
+ }, null, 8, ["layoutType", "dagreLayoutSettings", "nodeSize", "nodeLabel", "nodeShape", "nodeFill", "nodeStroke", "nodeStrokeWidth", "linkArrow", "linkLabel", "linkStroke", "linkWidth", "linkCurvature", "zoomScaleExtent", "disableZoom", "disableDrag"])
136
+ ];
137
+ }),
135
138
  _: 1
136
139
  }, 8, ["data", "height", "width", "duration", "padding"]),
137
140
  !t.hideLegend && t.legendItems && t.legendItems.length > 0 ? (u(), c("div", {
138
141
  key: 0,
139
142
  style: f({
140
143
  display: "flex",
141
- justifyContent: B.value
144
+ justifyContent: E.value
142
145
  })
143
146
  }, [
144
- k(a(j), {
147
+ k(d(q), {
145
148
  style: f([
146
149
  t.legendStyle,
147
150
  "display: flex; gap: var(--vis-legend-spacing);"
148
151
  ]),
149
- items: t.legendItems.map((d) => ({
150
- ...d,
151
- color: Array.isArray(d.color) ? d.color[0] : d.color
152
+ items: t.legendItems.map((r) => ({
153
+ ...r,
154
+ color: Array.isArray(r.color) ? r.color[0] : r.color
152
155
  }))
153
156
  }, null, 8, ["style", "items"])
154
157
  ], 4)) : s("", !0),
155
- g("div", H, [
156
- a(p).tooltip ? h(o.$slots, "tooltip", {
158
+ g("div", K, [
159
+ d(b).tooltip ? m(o.$slots, "tooltip", {
157
160
  key: 0,
158
161
  node: i.value
159
- }) : i.value ? h(o.$slots, "fallback", { key: 1 }, () => [
160
- g("div", J, [
161
- g("div", K, y(t.tooltipTitleFormatter ? t.tooltipTitleFormatter(i.value) : i.value.label || i.value.id), 1),
162
- t.tooltipContentFormatter ? (u(), c("div", O, y(t.tooltipContentFormatter(i.value)), 1)) : s("", !0)
162
+ }) : i.value ? m(o.$slots, "fallback", { key: 1 }, () => [
163
+ g("div", O, [
164
+ g("div", Q, S(t.tooltipTitleFormatter ? t.tooltipTitleFormatter(i.value) : i.value.label || i.value.id), 1),
165
+ t.tooltipContentFormatter ? (u(), c("div", U, S(t.tooltipContentFormatter(i.value)), 1)) : s("", !0)
163
166
  ])
164
167
  ]) : s("", !0)
165
168
  ], 512)
@@ -167,5 +170,5 @@ const H = {
167
170
  }
168
171
  });
169
172
  export {
170
- _ as default
173
+ te as default
171
174
  };
@@ -1,4 +1,4 @@
1
- import { BulletLegendItemInterface, TooltipConfig, LegendPosition } from '../../types';
1
+ import { BulletLegendItemInterface, TooltipConfig, LegendPosition } from '../../../../shared/dist/index.d.ts';
2
2
  /**
3
3
  * Dagre layout direction options
4
4
  */
@@ -1,9 +1,9 @@
1
- import { defineComponent as L, useSlots as S, useTemplateRef as P, ref as W, computed as s, createElementBlock as y, openBlock as d, normalizeStyle as u, createVNode as a, createCommentVNode as c, createElementVNode as h, unref as i, withCtx as b, createBlock as N, renderSlot as f } from "vue";
1
+ import { defineComponent as L, useSlots as S, useTemplateRef as P, ref as W, computed as s, openBlock as d, createElementBlock as y, normalizeStyle as u, createVNode as a, unref as i, withCtx as b, createBlock as N, createCommentVNode as c, createElementVNode as h, renderSlot as f } from "vue";
2
2
  import { Donut as $ } from "@unovis/ts";
3
- import { DonutType as j } from "./types.js";
3
+ import { LegendPosition as j } from "../../packages/shared/dist/index.js";
4
4
  import z from "../Tooltip.js";
5
5
  import { VisSingleContainer as H, VisTooltip as E, VisDonut as F, VisBulletLegend as O } from "@unovis/vue";
6
- import { LegendPosition as R } from "../../types.js";
6
+ import { DonutType as R } from "../../packages/shared/dist/donut-chart.js";
7
7
  const M = { style: {
8
8
  position: "absolute",
9
9
  top: "50%",
@@ -21,7 +21,7 @@ const M = { style: {
21
21
  height: {},
22
22
  radius: {},
23
23
  hideLegend: { type: Boolean },
24
- legendPosition: { default: R.BottomCenter },
24
+ legendPosition: { default: j.BottomCenter },
25
25
  legendStyle: {},
26
26
  categories: {},
27
27
  padAngle: {},
@@ -34,7 +34,7 @@ const M = { style: {
34
34
  },
35
35
  emits: ["click"],
36
36
  setup(l, { emit: v }) {
37
- const C = v, e = l, w = S(), g = P("slotWrapper"), n = W(), k = (t) => t, T = e.type === j.Half;
37
+ const C = v, e = l, w = S(), g = P("slotWrapper"), n = W(), k = (t) => t, T = e.type === R.Half;
38
38
  function V(t) {
39
39
  const o = Object.values(e.categories)[t.index].name;
40
40
  return n.value = {