vccs 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +151 -0
- package/dist/animation/Animate.d.ts +1 -1
- package/dist/cartesian/area/type.d.ts +3 -3
- package/dist/cartesian/bar/type.d.ts +1 -13
- package/dist/cartesian/brush/components/Slide.d.ts +1 -1
- package/dist/cartesian/brush/components/TravellerLayer.d.ts +1 -1
- package/dist/cartesian/brush/type.d.ts +2 -1
- package/dist/cartesian/cartesian-axis/CartesianAxis.d.ts +2 -1
- package/dist/cartesian/funnel/type.d.ts +4 -5
- package/dist/cartesian/index.d.ts +1 -0
- package/dist/cartesian/line/Line.d.ts +7 -13
- package/dist/cartesian/line/type.d.ts +4 -17
- package/dist/cartesian/reference-area/ReferenceArea.d.ts +16 -16
- package/dist/cartesian/reference-dot/ReferenceDot.d.ts +143 -0
- package/dist/cartesian/reference-dot/index.d.ts +2 -0
- package/dist/cartesian/reference-line/ReferenceLine.d.ts +8 -8
- package/dist/cartesian/scatter/Scatter.d.ts +1 -1
- package/dist/chart/RechartsWrapper.d.ts +7 -3
- package/dist/chart/Surface.d.ts +2 -1
- package/dist/chart/Treemap.d.ts +237 -0
- package/dist/chart/generateCategoricalChart.d.ts +2 -1
- package/dist/chart/index.d.ts +1 -0
- package/dist/chart/treemapUtils.d.ts +22 -0
- package/dist/components/Customized.d.ts +23 -0
- package/dist/components/Text.d.ts +4 -4
- package/dist/components/Tooltip.d.ts +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/label/Label.d.ts +3 -3
- package/dist/components/label/types.d.ts +1 -1
- package/dist/container/Surface.d.ts +3 -2
- package/dist/es/cartesian/area/type.mjs +2 -4
- package/dist/es/cartesian/bar/Bar.mjs +2 -17
- package/dist/es/cartesian/bar/type.mjs +2 -16
- package/dist/es/cartesian/cartesian-grid/const.mjs +1 -1
- package/dist/es/cartesian/funnel/Funnel.mjs +3 -18
- package/dist/es/cartesian/funnel/type.mjs +3 -5
- package/dist/es/cartesian/line/type.mjs +2 -7
- package/dist/es/cartesian/reference-area/ReferenceArea.mjs +6 -22
- package/dist/es/cartesian/reference-dot/ReferenceDot.mjs +134 -0
- package/dist/es/cartesian/reference-line/ReferenceLine.mjs +6 -19
- package/dist/es/chart/RechartsWrapper.mjs +2 -1
- package/dist/es/chart/Treemap.mjs +379 -0
- package/dist/es/chart/generateCategoricalChart.mjs +3 -2
- package/dist/es/chart/treemapUtils.mjs +32 -0
- package/dist/es/components/Customized.mjs +43 -0
- package/dist/es/components/label/types.mjs +2 -1
- package/dist/es/components/legend/Legend.mjs +1 -1
- package/dist/es/components/legend/hooks/useLegend.mjs +8 -3
- package/dist/es/container/Surface.mjs +2 -4
- package/dist/es/hooks/publicHooks.mjs +207 -0
- package/dist/es/index.mjs +9 -1
- package/dist/es/polar/pie/Pie.mjs +1 -1
- package/dist/es/polar/pie/type.mjs +2 -4
- package/dist/es/shape/Curve.mjs +2 -1
- package/dist/es/shape/Polygon.mjs +19 -0
- package/dist/es/shape/Rectangle.mjs +0 -4
- package/dist/es/shape/Sector.mjs +4 -6
- package/dist/es/shape/Symbols.mjs +1 -1
- package/dist/es/shape/Trapezoid.mjs +5 -7
- package/dist/es/state/ReportChartProps.mjs +2 -4
- package/dist/es/state/hooks.mjs +21 -1
- package/dist/es/state/referenceElementsSlice.mjs +1 -1
- package/dist/es/state/selectors/axisSelectors.mjs +30 -1
- package/dist/es/state/selectors/tooltipSelectors.mjs +2 -2
- package/dist/es/types/common.mjs +12 -0
- package/dist/es/utils/VueUtils.mjs +1 -1
- package/dist/es/utils/cell.mjs +28 -0
- package/dist/es/utils/createCategoricalInverse.mjs +46 -0
- package/dist/es/utils/scale.mjs +46 -0
- package/dist/hooks/publicHooks.d.ts +143 -0
- package/dist/index.d.ts +1 -0
- package/dist/polar/pie/type.d.ts +2 -2
- package/dist/polar/radar/Radar.d.ts +4 -4
- package/dist/shape/Curve.d.ts +2 -1
- package/dist/shape/Polygon.d.ts +9 -0
- package/dist/shape/Rectangle.d.ts +0 -4
- package/dist/shape/Sector.d.ts +2 -2
- package/dist/shape/Symbols.d.ts +2 -1
- package/dist/shape/Trapezoid.d.ts +9 -10
- package/dist/shape/index.d.ts +1 -0
- package/dist/shape/types.d.ts +4 -5
- package/dist/state/ReportChartProps.d.ts +3 -3
- package/dist/state/rootPropsSlice.d.ts +2 -2
- package/dist/state/selectors/axisSelectors.d.ts +5 -0
- package/dist/types/axis.d.ts +2 -2
- package/dist/types/bar.d.ts +2 -6
- package/dist/types/categorical.d.ts +2 -2
- package/dist/types/common.d.ts +7 -1
- package/dist/types/tooltip.d.ts +2 -2
- package/dist/utils/cell.d.ts +11 -0
- package/dist/utils/createCategoricalInverse.d.ts +16 -0
- package/dist/utils/scale.d.ts +23 -0
- package/package.json +2 -1
|
@@ -148,11 +148,11 @@ export declare const Scatter: import('vue').DefineComponent<import('vue').Extrac
|
|
|
148
148
|
xAxisId: string | number;
|
|
149
149
|
line: boolean | Record<string, any>;
|
|
150
150
|
dataKey: DataKey<any>;
|
|
151
|
+
transition: AnimationOptions;
|
|
151
152
|
name: string | number;
|
|
152
153
|
data: readonly Record<string, any>[];
|
|
153
154
|
label: boolean | Record<string, any>;
|
|
154
155
|
hide: boolean;
|
|
155
|
-
transition: AnimationOptions;
|
|
156
156
|
tooltipType: "none";
|
|
157
157
|
legendType: string;
|
|
158
158
|
isAnimationActive: boolean;
|
|
@@ -2,7 +2,8 @@ import { CSSProperties, PropType } from 'vue';
|
|
|
2
2
|
import { CategoricalChartFunc } from '../types';
|
|
3
3
|
export declare const RechartsWrapper: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
4
|
class: {
|
|
5
|
-
type:
|
|
5
|
+
type: PropType<import('../types').VueClassValue>;
|
|
6
|
+
default: any;
|
|
6
7
|
};
|
|
7
8
|
height: {
|
|
8
9
|
type: NumberConstructor;
|
|
@@ -50,7 +51,8 @@ export declare const RechartsWrapper: import('vue').DefineComponent<import('vue'
|
|
|
50
51
|
};
|
|
51
52
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
52
53
|
class: {
|
|
53
|
-
type:
|
|
54
|
+
type: PropType<import('../types').VueClassValue>;
|
|
55
|
+
default: any;
|
|
54
56
|
};
|
|
55
57
|
height: {
|
|
56
58
|
type: NumberConstructor;
|
|
@@ -96,4 +98,6 @@ export declare const RechartsWrapper: import('vue').DefineComponent<import('vue'
|
|
|
96
98
|
type: NumberConstructor;
|
|
97
99
|
required: true;
|
|
98
100
|
};
|
|
99
|
-
}>> & Readonly<{}>, {
|
|
101
|
+
}>> & Readonly<{}>, {
|
|
102
|
+
class: import('../types').VueClassValue;
|
|
103
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
package/dist/chart/Surface.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CSSProperties } from 'vue';
|
|
2
|
+
import { VueClassValue } from '../types';
|
|
2
3
|
interface SurfaceProps {
|
|
3
4
|
width: number;
|
|
4
5
|
height: number;
|
|
@@ -8,7 +9,7 @@ interface SurfaceProps {
|
|
|
8
9
|
width?: number;
|
|
9
10
|
height?: number;
|
|
10
11
|
};
|
|
11
|
-
class?:
|
|
12
|
+
class?: VueClassValue;
|
|
12
13
|
style?: CSSProperties;
|
|
13
14
|
title?: string;
|
|
14
15
|
desc?: string;
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { PropType, SlotsType } from 'vue';
|
|
2
|
+
import { AnimationOptions } from 'motion-v';
|
|
3
|
+
import { TooltipPayloadSearcher } from '../state/tooltipSlice';
|
|
4
|
+
import { TreemapLayoutNode } from './treemapUtils';
|
|
5
|
+
export interface TreemapContentSlotProps extends TreemapLayoutNode {
|
|
6
|
+
index: number;
|
|
7
|
+
fill: string;
|
|
8
|
+
stroke: string;
|
|
9
|
+
}
|
|
10
|
+
export interface TreemapSlots {
|
|
11
|
+
content?: (props: TreemapContentSlotProps) => any;
|
|
12
|
+
default?: () => any;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Tooltip payload searcher for Treemap — navigates nested node structure
|
|
16
|
+
* using a path string like 'children[0].children[1]'.
|
|
17
|
+
*/
|
|
18
|
+
export declare const treemapPayloadSearcher: TooltipPayloadSearcher;
|
|
19
|
+
export declare const TreemapVueProps: {
|
|
20
|
+
data: {
|
|
21
|
+
type: PropType<Record<string, any>[]>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
dataKey: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
nameKey: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
width: {
|
|
33
|
+
type: NumberConstructor;
|
|
34
|
+
required: true;
|
|
35
|
+
};
|
|
36
|
+
height: {
|
|
37
|
+
type: NumberConstructor;
|
|
38
|
+
required: true;
|
|
39
|
+
};
|
|
40
|
+
aspectRatio: {
|
|
41
|
+
type: NumberConstructor;
|
|
42
|
+
default: number;
|
|
43
|
+
};
|
|
44
|
+
fill: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
stroke: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
type: {
|
|
53
|
+
type: PropType<"flat" | "nest">;
|
|
54
|
+
default: string;
|
|
55
|
+
};
|
|
56
|
+
colorPanel: {
|
|
57
|
+
type: PropType<string[]>;
|
|
58
|
+
default: any;
|
|
59
|
+
};
|
|
60
|
+
isAnimationActive: {
|
|
61
|
+
type: BooleanConstructor;
|
|
62
|
+
default: boolean;
|
|
63
|
+
};
|
|
64
|
+
transition: {
|
|
65
|
+
type: PropType<AnimationOptions>;
|
|
66
|
+
default: () => {
|
|
67
|
+
duration: number;
|
|
68
|
+
ease: "easeOut";
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
onClick: {
|
|
72
|
+
type: PropType<(node: any, e: MouseEvent) => void>;
|
|
73
|
+
default: any;
|
|
74
|
+
};
|
|
75
|
+
onMouseEnter: {
|
|
76
|
+
type: PropType<(node: any, e: MouseEvent) => void>;
|
|
77
|
+
default: any;
|
|
78
|
+
};
|
|
79
|
+
onMouseLeave: {
|
|
80
|
+
type: PropType<(node: any, e: MouseEvent) => void>;
|
|
81
|
+
default: any;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Treemap chart — hierarchical data visualization using nested rectangles.
|
|
86
|
+
*
|
|
87
|
+
* Supports `<Tooltip>` as a child component (same pattern as BarChart, LineChart, etc.).
|
|
88
|
+
*
|
|
89
|
+
* Usage:
|
|
90
|
+
* ```vue
|
|
91
|
+
* <Treemap :data="data" data-key="value" :width="600" :height="400">
|
|
92
|
+
* <Tooltip />
|
|
93
|
+
* </Treemap>
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
export declare const Treemap: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
97
|
+
data: {
|
|
98
|
+
type: PropType<Record<string, any>[]>;
|
|
99
|
+
required: true;
|
|
100
|
+
};
|
|
101
|
+
dataKey: {
|
|
102
|
+
type: StringConstructor;
|
|
103
|
+
default: string;
|
|
104
|
+
};
|
|
105
|
+
nameKey: {
|
|
106
|
+
type: StringConstructor;
|
|
107
|
+
default: string;
|
|
108
|
+
};
|
|
109
|
+
width: {
|
|
110
|
+
type: NumberConstructor;
|
|
111
|
+
required: true;
|
|
112
|
+
};
|
|
113
|
+
height: {
|
|
114
|
+
type: NumberConstructor;
|
|
115
|
+
required: true;
|
|
116
|
+
};
|
|
117
|
+
aspectRatio: {
|
|
118
|
+
type: NumberConstructor;
|
|
119
|
+
default: number;
|
|
120
|
+
};
|
|
121
|
+
fill: {
|
|
122
|
+
type: StringConstructor;
|
|
123
|
+
default: string;
|
|
124
|
+
};
|
|
125
|
+
stroke: {
|
|
126
|
+
type: StringConstructor;
|
|
127
|
+
default: string;
|
|
128
|
+
};
|
|
129
|
+
type: {
|
|
130
|
+
type: PropType<"flat" | "nest">;
|
|
131
|
+
default: string;
|
|
132
|
+
};
|
|
133
|
+
colorPanel: {
|
|
134
|
+
type: PropType<string[]>;
|
|
135
|
+
default: any;
|
|
136
|
+
};
|
|
137
|
+
isAnimationActive: {
|
|
138
|
+
type: BooleanConstructor;
|
|
139
|
+
default: boolean;
|
|
140
|
+
};
|
|
141
|
+
transition: {
|
|
142
|
+
type: PropType<AnimationOptions>;
|
|
143
|
+
default: () => {
|
|
144
|
+
duration: number;
|
|
145
|
+
ease: "easeOut";
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
onClick: {
|
|
149
|
+
type: PropType<(node: any, e: MouseEvent) => void>;
|
|
150
|
+
default: any;
|
|
151
|
+
};
|
|
152
|
+
onMouseEnter: {
|
|
153
|
+
type: PropType<(node: any, e: MouseEvent) => void>;
|
|
154
|
+
default: any;
|
|
155
|
+
};
|
|
156
|
+
onMouseLeave: {
|
|
157
|
+
type: PropType<(node: any, e: MouseEvent) => void>;
|
|
158
|
+
default: any;
|
|
159
|
+
};
|
|
160
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
161
|
+
data: {
|
|
162
|
+
type: PropType<Record<string, any>[]>;
|
|
163
|
+
required: true;
|
|
164
|
+
};
|
|
165
|
+
dataKey: {
|
|
166
|
+
type: StringConstructor;
|
|
167
|
+
default: string;
|
|
168
|
+
};
|
|
169
|
+
nameKey: {
|
|
170
|
+
type: StringConstructor;
|
|
171
|
+
default: string;
|
|
172
|
+
};
|
|
173
|
+
width: {
|
|
174
|
+
type: NumberConstructor;
|
|
175
|
+
required: true;
|
|
176
|
+
};
|
|
177
|
+
height: {
|
|
178
|
+
type: NumberConstructor;
|
|
179
|
+
required: true;
|
|
180
|
+
};
|
|
181
|
+
aspectRatio: {
|
|
182
|
+
type: NumberConstructor;
|
|
183
|
+
default: number;
|
|
184
|
+
};
|
|
185
|
+
fill: {
|
|
186
|
+
type: StringConstructor;
|
|
187
|
+
default: string;
|
|
188
|
+
};
|
|
189
|
+
stroke: {
|
|
190
|
+
type: StringConstructor;
|
|
191
|
+
default: string;
|
|
192
|
+
};
|
|
193
|
+
type: {
|
|
194
|
+
type: PropType<"flat" | "nest">;
|
|
195
|
+
default: string;
|
|
196
|
+
};
|
|
197
|
+
colorPanel: {
|
|
198
|
+
type: PropType<string[]>;
|
|
199
|
+
default: any;
|
|
200
|
+
};
|
|
201
|
+
isAnimationActive: {
|
|
202
|
+
type: BooleanConstructor;
|
|
203
|
+
default: boolean;
|
|
204
|
+
};
|
|
205
|
+
transition: {
|
|
206
|
+
type: PropType<AnimationOptions>;
|
|
207
|
+
default: () => {
|
|
208
|
+
duration: number;
|
|
209
|
+
ease: "easeOut";
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
onClick: {
|
|
213
|
+
type: PropType<(node: any, e: MouseEvent) => void>;
|
|
214
|
+
default: any;
|
|
215
|
+
};
|
|
216
|
+
onMouseEnter: {
|
|
217
|
+
type: PropType<(node: any, e: MouseEvent) => void>;
|
|
218
|
+
default: any;
|
|
219
|
+
};
|
|
220
|
+
onMouseLeave: {
|
|
221
|
+
type: PropType<(node: any, e: MouseEvent) => void>;
|
|
222
|
+
default: any;
|
|
223
|
+
};
|
|
224
|
+
}>> & Readonly<{}>, {
|
|
225
|
+
fill: string;
|
|
226
|
+
type: "flat" | "nest";
|
|
227
|
+
dataKey: string;
|
|
228
|
+
aspectRatio: number;
|
|
229
|
+
stroke: string;
|
|
230
|
+
transition: AnimationOptions;
|
|
231
|
+
onClick: (node: any, e: MouseEvent) => void;
|
|
232
|
+
nameKey: string;
|
|
233
|
+
isAnimationActive: boolean;
|
|
234
|
+
onMouseEnter: (node: any, e: MouseEvent) => void;
|
|
235
|
+
onMouseLeave: (node: any, e: MouseEvent) => void;
|
|
236
|
+
colorPanel: string[];
|
|
237
|
+
}, SlotsType<TreemapSlots>, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
package/dist/chart/index.d.ts
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface TreemapLayoutNode {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
depth: number;
|
|
7
|
+
name: string;
|
|
8
|
+
value: number;
|
|
9
|
+
payload: Record<string, any>;
|
|
10
|
+
color?: string;
|
|
11
|
+
root: number;
|
|
12
|
+
}
|
|
13
|
+
export interface TreemapLayoutOptions {
|
|
14
|
+
data: Record<string, any>[];
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
dataKey: string;
|
|
18
|
+
aspectRatio?: number;
|
|
19
|
+
nameKey?: string;
|
|
20
|
+
colorPanel?: string[];
|
|
21
|
+
}
|
|
22
|
+
export declare function computeTreemapLayout(options: TreemapLayoutOptions): TreemapLayoutNode[];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SlotsType } from 'vue';
|
|
2
|
+
import { CartesianGraphicalItemSettings, PolarGraphicalItemSettings } from '../state/graphicalItemsSlice';
|
|
3
|
+
import { DataKey } from '../types';
|
|
4
|
+
export interface FormattedGraphicalItem {
|
|
5
|
+
type: string;
|
|
6
|
+
dataKey: DataKey<any> | undefined;
|
|
7
|
+
props: CartesianGraphicalItemSettings | PolarGraphicalItemSettings;
|
|
8
|
+
}
|
|
9
|
+
export interface CustomizedSlotProps {
|
|
10
|
+
formattedGraphicalItems: FormattedGraphicalItem[];
|
|
11
|
+
chartWidth: number;
|
|
12
|
+
chartHeight: number;
|
|
13
|
+
offset: {
|
|
14
|
+
top: number;
|
|
15
|
+
right: number;
|
|
16
|
+
bottom: number;
|
|
17
|
+
left: number;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export interface CustomizedSlots {
|
|
21
|
+
default?: (props: CustomizedSlotProps) => any;
|
|
22
|
+
}
|
|
23
|
+
export declare const Customized: import('vue').DefineComponent<{}, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, SlotsType<CustomizedSlots>, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -134,13 +134,13 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
134
134
|
x: string | number;
|
|
135
135
|
y: string | number;
|
|
136
136
|
value: string | number;
|
|
137
|
-
style: Record<string, any>;
|
|
138
|
-
dx: number;
|
|
139
|
-
dy: number;
|
|
140
|
-
angle: number;
|
|
141
137
|
lineHeight: string | number;
|
|
142
138
|
textAnchor: string;
|
|
143
139
|
capHeight: string | number;
|
|
140
|
+
dx: number;
|
|
141
|
+
dy: number;
|
|
142
|
+
style: Record<string, any>;
|
|
143
|
+
angle: number;
|
|
144
144
|
scaleToFit: boolean;
|
|
145
145
|
verticalAnchor: string;
|
|
146
146
|
breakAll: boolean;
|
|
@@ -224,9 +224,9 @@ export declare const Tooltip: import('vue').DefineComponent<import('vue').Extrac
|
|
|
224
224
|
readonly default: " : ";
|
|
225
225
|
};
|
|
226
226
|
}>> & Readonly<{}>, {
|
|
227
|
-
readonly style: Record<string, any>;
|
|
228
227
|
readonly cursor: boolean | object;
|
|
229
228
|
readonly offset: number;
|
|
229
|
+
readonly style: Record<string, any>;
|
|
230
230
|
readonly isAnimationActive: boolean;
|
|
231
231
|
readonly includeHidden: boolean;
|
|
232
232
|
readonly active: boolean;
|
|
@@ -5,8 +5,8 @@ export declare const Label: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
5
5
|
type: StringConstructor;
|
|
6
6
|
};
|
|
7
7
|
class: {
|
|
8
|
-
type: StringConstructor;
|
|
9
8
|
default: string;
|
|
9
|
+
type: import('vue').PropType<import('../../types').VueClassValue>;
|
|
10
10
|
};
|
|
11
11
|
viewBox: {
|
|
12
12
|
type: import('vue').PropType<import('./types').ViewBox>;
|
|
@@ -43,8 +43,8 @@ export declare const Label: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
43
43
|
type: StringConstructor;
|
|
44
44
|
};
|
|
45
45
|
class: {
|
|
46
|
-
type: StringConstructor;
|
|
47
46
|
default: string;
|
|
47
|
+
type: import('vue').PropType<import('../../types').VueClassValue>;
|
|
48
48
|
};
|
|
49
49
|
viewBox: {
|
|
50
50
|
type: import('vue').PropType<import('./types').ViewBox>;
|
|
@@ -75,7 +75,7 @@ export declare const Label: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
75
75
|
type: NumberConstructor;
|
|
76
76
|
};
|
|
77
77
|
}>> & Readonly<{}>, {
|
|
78
|
-
class:
|
|
78
|
+
class: import('../../types').VueClassValue;
|
|
79
79
|
offset: number;
|
|
80
80
|
textBreakAll: boolean;
|
|
81
81
|
}, SlotsType<LabelSlots>, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, SVGAttributes } from 'vue';
|
|
2
|
+
import { VueClassValue } from '../types';
|
|
2
3
|
interface ViewBox {
|
|
3
4
|
x?: number;
|
|
4
5
|
y?: number;
|
|
@@ -9,7 +10,7 @@ declare const Surface: import('vue').DefineComponent<Omit<SVGAttributes, "viewBo
|
|
|
9
10
|
width: number;
|
|
10
11
|
height: number;
|
|
11
12
|
viewBox?: ViewBox;
|
|
12
|
-
class?:
|
|
13
|
+
class?: VueClassValue;
|
|
13
14
|
style?: CSSProperties;
|
|
14
15
|
title?: string;
|
|
15
16
|
desc?: string;
|
|
@@ -17,7 +18,7 @@ declare const Surface: import('vue').DefineComponent<Omit<SVGAttributes, "viewBo
|
|
|
17
18
|
width: number;
|
|
18
19
|
height: number;
|
|
19
20
|
viewBox?: ViewBox;
|
|
20
|
-
class?:
|
|
21
|
+
class?: VueClassValue;
|
|
21
22
|
style?: CSSProperties;
|
|
22
23
|
title?: string;
|
|
23
24
|
desc?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { classProp } from "../../types/common.mjs";
|
|
1
2
|
import { CurveVueProps } from "../../shape/Curve.mjs";
|
|
2
3
|
//#region src/cartesian/area/type.ts
|
|
3
4
|
var AreaVueProps = {
|
|
@@ -127,10 +128,7 @@ var AreaVueProps = {
|
|
|
127
128
|
default: 0
|
|
128
129
|
},
|
|
129
130
|
name: { type: [String, Number] },
|
|
130
|
-
class:
|
|
131
|
-
type: String,
|
|
132
|
-
default: void 0
|
|
133
|
-
}
|
|
131
|
+
class: classProp
|
|
134
132
|
};
|
|
135
133
|
//#endregion
|
|
136
134
|
export { AreaVueProps };
|
|
@@ -12,8 +12,8 @@ import { GraphicalItemClipPath } from "../GraphicalItemClipPath.mjs";
|
|
|
12
12
|
import { BarBackground } from "./components/BarBackground.mjs";
|
|
13
13
|
import { BarRectangles } from "./components/BarRectangles.mjs";
|
|
14
14
|
import { createErrorBarRegistry, provideErrorBarContext, provideErrorBarRegistry } from "../error-bar/ErrorBarContext.mjs";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
15
|
+
import { extractCellProps, filterOutCells } from "../../utils/cell.mjs";
|
|
16
|
+
import { Teleport, computed, createVNode, defineComponent, isVNode, mergeProps } from "vue";
|
|
17
17
|
//#region src/cartesian/bar/Bar.tsx
|
|
18
18
|
function _isSlot(s) {
|
|
19
19
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
@@ -68,21 +68,6 @@ var Bar = /* @__PURE__ */ defineComponent({
|
|
|
68
68
|
});
|
|
69
69
|
}));
|
|
70
70
|
const graphicalLayerRef = useGraphicalLayerRef(null);
|
|
71
|
-
const extractCellProps = (vnodes) => {
|
|
72
|
-
const result = [];
|
|
73
|
-
for (const vnode of vnodes) if (vnode.type === Cell) result.push(vnode.props ?? {});
|
|
74
|
-
else if (vnode.type === Fragment && Array.isArray(vnode.children)) result.push(...extractCellProps(vnode.children));
|
|
75
|
-
return result;
|
|
76
|
-
};
|
|
77
|
-
const filterOutCells = (vnodes) => {
|
|
78
|
-
const result = [];
|
|
79
|
-
for (const vnode of vnodes) {
|
|
80
|
-
if (vnode.type === Cell) continue;
|
|
81
|
-
if (vnode.type === Fragment && Array.isArray(vnode.children)) result.push(...filterOutCells(vnode.children));
|
|
82
|
-
else result.push(vnode);
|
|
83
|
-
}
|
|
84
|
-
return result;
|
|
85
|
-
};
|
|
86
71
|
return () => {
|
|
87
72
|
if (!shouldRender.value) return null;
|
|
88
73
|
const defaultContent = slots.default?.() ?? [];
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
+
import { classProp } from "../../types/common.mjs";
|
|
1
2
|
//#region src/cartesian/bar/type.ts
|
|
2
3
|
var BarVueProps = {
|
|
3
|
-
class:
|
|
4
|
-
type: String,
|
|
5
|
-
default: void 0
|
|
6
|
-
},
|
|
4
|
+
class: classProp,
|
|
7
5
|
barSize: { type: [String, Number] },
|
|
8
6
|
data: {
|
|
9
7
|
type: Array,
|
|
@@ -99,18 +97,6 @@ var BarVueProps = {
|
|
|
99
97
|
type: [String, Number],
|
|
100
98
|
default: 0
|
|
101
99
|
},
|
|
102
|
-
animationBegin: {
|
|
103
|
-
type: Number,
|
|
104
|
-
default: 0
|
|
105
|
-
},
|
|
106
|
-
animationDuration: {
|
|
107
|
-
type: Number,
|
|
108
|
-
default: 1500
|
|
109
|
-
},
|
|
110
|
-
animationEasing: {
|
|
111
|
-
type: String,
|
|
112
|
-
default: "ease"
|
|
113
|
-
},
|
|
114
100
|
transition: {
|
|
115
101
|
type: Object,
|
|
116
102
|
default: {
|
|
@@ -7,27 +7,12 @@ import { Animate } from "../../animation/Animate.mjs";
|
|
|
7
7
|
import { SetPolarGraphicalItem } from "../../state/SetGraphicalItem.mjs";
|
|
8
8
|
import { SetLegendPayload } from "../../state/SetLegendPayload.mjs";
|
|
9
9
|
import { SetTooltipEntrySettings } from "../../state/SetTooltipEntrySettings.mjs";
|
|
10
|
-
import {
|
|
10
|
+
import { extractCellProps, filterOutCells } from "../../utils/cell.mjs";
|
|
11
11
|
import { Trapezoid } from "../../shape/Trapezoid.mjs";
|
|
12
12
|
import { selectFunnelTrapezoids } from "../../state/selectors/funnelSelectors.mjs";
|
|
13
13
|
import { FunnelVueProps } from "./type.mjs";
|
|
14
|
-
import {
|
|
14
|
+
import { computed, createVNode, defineComponent, mergeProps, shallowRef } from "vue";
|
|
15
15
|
//#region src/cartesian/funnel/Funnel.tsx
|
|
16
|
-
function extractCellProps(vnodes) {
|
|
17
|
-
const result = [];
|
|
18
|
-
for (const vnode of vnodes) if (vnode.type === Cell) result.push(vnode.props ?? {});
|
|
19
|
-
else if (vnode.type === Fragment && Array.isArray(vnode.children)) result.push(...extractCellProps(vnode.children));
|
|
20
|
-
return result;
|
|
21
|
-
}
|
|
22
|
-
function filterOutCells(vnodes) {
|
|
23
|
-
const result = [];
|
|
24
|
-
for (const vnode of vnodes) {
|
|
25
|
-
if (vnode.type === Cell) continue;
|
|
26
|
-
if (vnode.type === Fragment && Array.isArray(vnode.children)) result.push(...filterOutCells(vnode.children));
|
|
27
|
-
else result.push(vnode);
|
|
28
|
-
}
|
|
29
|
-
return result;
|
|
30
|
-
}
|
|
31
16
|
var Funnel = /* @__PURE__ */ defineComponent({
|
|
32
17
|
name: "Funnel",
|
|
33
18
|
props: FunnelVueProps,
|
|
@@ -123,7 +108,7 @@ var Funnel = /* @__PURE__ */ defineComponent({
|
|
|
123
108
|
cellPropsRef.value = cells;
|
|
124
109
|
const nonCellContent = cells.length > 0 ? filterOutCells(defaultContent) : defaultContent;
|
|
125
110
|
const stroke = attrs.stroke ?? props.stroke;
|
|
126
|
-
return createVNode(Layer, { "class": ["v-charts-funnel", props.
|
|
111
|
+
return createVNode(Layer, { "class": ["v-charts-funnel", props.class] }, { default: () => [createVNode(Animate, {
|
|
127
112
|
"isActive": props.isAnimationActive,
|
|
128
113
|
"from": 0,
|
|
129
114
|
"to": 1,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { classProp } from "../../types/common.mjs";
|
|
1
2
|
//#region src/cartesian/funnel/type.ts
|
|
2
3
|
var FunnelVueProps = {
|
|
3
4
|
data: {
|
|
@@ -67,14 +68,11 @@ var FunnelVueProps = {
|
|
|
67
68
|
type: Function,
|
|
68
69
|
default: void 0
|
|
69
70
|
},
|
|
70
|
-
className: {
|
|
71
|
-
type: String,
|
|
72
|
-
default: void 0
|
|
73
|
-
},
|
|
74
71
|
width: {
|
|
75
72
|
type: [Number, String],
|
|
76
73
|
default: void 0
|
|
77
|
-
}
|
|
74
|
+
},
|
|
75
|
+
class: classProp
|
|
78
76
|
};
|
|
79
77
|
//#endregion
|
|
80
78
|
export { FunnelVueProps };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { classProp } from "../../types/common.mjs";
|
|
1
2
|
import { CurveVueProps } from "../../shape/Curve.mjs";
|
|
2
3
|
//#region src/cartesian/line/type.ts
|
|
3
4
|
var LineVueProps = {
|
|
@@ -10,12 +11,6 @@ var LineVueProps = {
|
|
|
10
11
|
],
|
|
11
12
|
default: true
|
|
12
13
|
},
|
|
13
|
-
animationDuration: { type: Number },
|
|
14
|
-
animationEasing: { type: String },
|
|
15
|
-
animationBegin: {
|
|
16
|
-
type: Number,
|
|
17
|
-
default: 0
|
|
18
|
-
},
|
|
19
14
|
animationId: { type: String },
|
|
20
15
|
isAnimationActive: {
|
|
21
16
|
type: Boolean,
|
|
@@ -106,7 +101,7 @@ var LineVueProps = {
|
|
|
106
101
|
default: 0
|
|
107
102
|
},
|
|
108
103
|
name: { type: [String, Number] },
|
|
109
|
-
class:
|
|
104
|
+
class: classProp
|
|
110
105
|
};
|
|
111
106
|
//#endregion
|
|
112
107
|
export { LineVueProps };
|