@bridge-ui/vue 0.17.3 → 0.19.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/ai/skills/bridge-ui-components/SKILL.md +36 -35
- package/ai/skills/bridge-ui-setup/SKILL.md +1 -1
- package/dist/Components/CalendarMonth/composables/useCalendarMonth.d.ts +1 -1
- package/dist/Components/ChartAxis/ChartAxis.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/Components/ChartAxis/chartAxis.types.d.ts +17 -7
- package/dist/Components/ChartAxis/composables/useChartAxis.d.ts +2 -2
- package/dist/Components/ChartAxis/composables/useChartAxis.js +15 -10
- package/dist/Components/ChartBar/ChartBar.js +5 -0
- package/dist/Components/ChartBar/ChartBar.vue.d.ts +16 -0
- package/dist/Components/ChartBar/ChartBar.vue_vue_type_script_setup_true_lang.js +64 -0
- package/dist/Components/ChartBar/chartBar.types.d.ts +66 -0
- package/dist/Components/ChartBar/composables/useChartBar.d.ts +26 -0
- package/dist/Components/ChartBar/composables/useChartBar.js +13 -0
- package/dist/Components/ChartBar/index.d.ts +4 -0
- package/dist/Components/ChartBar/index.js +4 -0
- package/dist/Components/ChartBarSeries/ChartBarSeries.js +5 -0
- package/dist/Components/ChartBarSeries/ChartBarSeries.vue.d.ts +6 -0
- package/dist/Components/ChartBarSeries/ChartBarSeries.vue_vue_type_script_setup_true_lang.js +28 -0
- package/dist/Components/ChartBarSeries/chartBarSeries.types.d.ts +67 -0
- package/dist/Components/ChartBarSeries/composables/useChartBarSeries.d.ts +5 -0
- package/dist/Components/ChartBarSeries/composables/useChartBarSeries.js +23 -0
- package/dist/Components/ChartBarSeries/index.d.ts +4 -0
- package/dist/Components/ChartBarSeries/index.js +3 -0
- package/dist/Components/ChartFunnel/ChartFunnel.js +5 -0
- package/dist/Components/ChartFunnel/ChartFunnel.vue.d.ts +16 -0
- package/dist/Components/ChartFunnel/ChartFunnel.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/Components/ChartFunnel/chartFunnel.types.d.ts +54 -0
- package/dist/Components/ChartFunnel/composables/useChartFunnel.d.ts +29 -0
- package/dist/Components/ChartFunnel/composables/useChartFunnel.js +68 -0
- package/dist/Components/ChartFunnel/index.d.ts +4 -0
- package/dist/Components/ChartFunnel/index.js +4 -0
- package/dist/Components/ChartLegend/ChartLegend.vue.d.ts +2 -0
- package/dist/Components/ChartLegend/ChartLegend.vue_vue_type_script_setup_true_lang.js +33 -13
- package/dist/Components/ChartLegend/chartLegend.types.d.ts +41 -5
- package/dist/Components/ChartLegend/composables/useChartLegend.d.ts +9 -5
- package/dist/Components/ChartLegend/composables/useChartLegend.js +88 -54
- package/dist/Components/ChartLine/ChartLine.js +5 -0
- package/dist/Components/ChartLine/ChartLine.vue.d.ts +20 -0
- package/dist/Components/ChartLine/ChartLine.vue_vue_type_script_setup_true_lang.js +77 -0
- package/dist/Components/ChartLine/chartLine.types.d.ts +79 -0
- package/dist/Components/ChartLine/composables/useChartLine.d.ts +26 -0
- package/dist/Components/ChartLine/composables/useChartLine.js +13 -0
- package/dist/Components/ChartLine/index.d.ts +4 -0
- package/dist/Components/ChartLine/index.js +4 -0
- package/dist/Components/ChartLineSeries/ChartLineSeries.js +5 -0
- package/dist/Components/ChartLineSeries/ChartLineSeries.vue.d.ts +10 -0
- package/dist/Components/ChartLineSeries/ChartLineSeries.vue_vue_type_script_setup_true_lang.js +45 -0
- package/dist/Components/ChartLineSeries/chartLineSeries.types.d.ts +96 -0
- package/dist/Components/ChartLineSeries/composables/useChartLineSeries.d.ts +5 -0
- package/dist/Components/ChartLineSeries/composables/useChartLineSeries.js +28 -0
- package/dist/Components/ChartLineSeries/index.d.ts +4 -0
- package/dist/Components/ChartLineSeries/index.js +3 -0
- package/dist/Components/ChartPie/ChartPie.js +5 -0
- package/dist/Components/ChartPie/ChartPie.vue.d.ts +15 -0
- package/dist/Components/ChartPie/ChartPie.vue_vue_type_script_setup_true_lang.js +76 -0
- package/dist/Components/ChartPie/chartPie.types.d.ts +92 -0
- package/dist/Components/ChartPie/composables/useChartPie.d.ts +30 -0
- package/dist/Components/ChartPie/composables/useChartPie.js +81 -0
- package/dist/Components/ChartPie/index.d.ts +4 -0
- package/dist/Components/ChartPie/index.js +4 -0
- package/dist/Components/ChartScatter/ChartScatter.js +5 -0
- package/dist/Components/{Chart/Chart.vue.d.ts → ChartScatter/ChartScatter.vue.d.ts} +3 -2
- package/dist/Components/ChartScatter/ChartScatter.vue_vue_type_script_setup_true_lang.js +49 -0
- package/dist/Components/ChartScatter/chartScatter.types.d.ts +23 -0
- package/dist/Components/ChartScatter/composables/useChartScatter.d.ts +29 -0
- package/dist/Components/ChartScatter/composables/useChartScatter.js +108 -0
- package/dist/Components/ChartScatter/index.d.ts +4 -0
- package/dist/Components/ChartScatter/index.js +4 -0
- package/dist/Components/ChartScatterSeries/ChartScatterSeries.js +5 -0
- package/dist/Components/ChartScatterSeries/ChartScatterSeries.vue.d.ts +4 -0
- package/dist/Components/ChartScatterSeries/ChartScatterSeries.vue_vue_type_script_setup_true_lang.js +22 -0
- package/dist/Components/ChartScatterSeries/chartScatterSeries.types.d.ts +45 -0
- package/dist/Components/ChartScatterSeries/composables/useChartScatterSeries.d.ts +4 -0
- package/dist/Components/ChartScatterSeries/composables/useChartScatterSeries.js +19 -0
- package/dist/Components/ChartScatterSeries/index.d.ts +4 -0
- package/dist/Components/ChartScatterSeries/index.js +3 -0
- package/dist/Components/ChartTooltip/ChartTooltip.vue_vue_type_script_setup_true_lang.js +22 -10
- package/dist/Components/ChartTooltip/chartTooltip.types.d.ts +28 -9
- package/dist/Components/ChartTooltip/composables/useChartTooltip.d.ts +4 -1
- package/dist/Components/ChartTooltip/composables/useChartTooltip.js +81 -63
- package/dist/Components/Heading/Heading.js +5 -0
- package/dist/Components/Heading/Heading.vue.d.ts +11 -0
- package/dist/Components/Heading/Heading.vue_vue_type_script_setup_true_lang.js +29 -0
- package/dist/Components/Heading/composables/useHeading.d.ts +10 -0
- package/dist/Components/Heading/composables/useHeading.js +56 -0
- package/dist/Components/Heading/heading.types.d.ts +56 -0
- package/dist/Components/Heading/index.d.ts +3 -0
- package/dist/Components/Heading/index.js +3 -0
- package/dist/Components/ResizablePanel/composables/useResizablePanel.d.ts +1 -1
- package/dist/Components/Spinner/composables/useSpinner.d.ts +1 -1
- package/dist/Components/Text/Text.js +5 -0
- package/dist/Components/Text/Text.vue.d.ts +11 -0
- package/dist/Components/Text/Text.vue_vue_type_script_setup_true_lang.js +33 -0
- package/dist/Components/Text/composables/useText.d.ts +9 -0
- package/dist/Components/Text/composables/useText.js +56 -0
- package/dist/Components/Text/index.d.ts +3 -0
- package/dist/Components/Text/index.js +3 -0
- package/dist/Components/Text/text.types.d.ts +76 -0
- package/dist/Utils/Charts/ChartFrame.js +5 -0
- package/dist/Utils/Charts/ChartFrame.vue.d.ts +24 -0
- package/dist/Utils/Charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +41 -0
- package/dist/{Components/Chart → Utils/Charts}/chart.types.d.ts +33 -18
- package/dist/Utils/Charts/chartInjectionKey.d.ts +151 -0
- package/dist/{Components/Chart → Utils/Charts}/chartInjectionKey.js +2 -2
- package/dist/Utils/Charts/echarts/bar.d.ts +6 -0
- package/dist/Utils/Charts/echarts/bar.js +23 -0
- package/dist/Utils/Charts/echarts/cartesian.d.ts +15 -0
- package/dist/Utils/Charts/echarts/cartesian.js +290 -0
- package/dist/Utils/Charts/echarts/funnel.d.ts +15 -0
- package/dist/Utils/Charts/echarts/funnel.js +79 -0
- package/dist/Utils/Charts/echarts/line.d.ts +5 -0
- package/dist/Utils/Charts/echarts/line.js +20 -0
- package/dist/Utils/Charts/echarts/part.d.ts +19 -0
- package/dist/Utils/Charts/echarts/part.js +45 -0
- package/dist/Utils/Charts/echarts/pie.d.ts +14 -0
- package/dist/Utils/Charts/echarts/pie.js +76 -0
- package/dist/Utils/Charts/echarts/plot.d.ts +44 -0
- package/dist/Utils/Charts/echarts/plot.js +52 -0
- package/dist/Utils/Charts/echarts/scatter.d.ts +14 -0
- package/dist/Utils/Charts/echarts/scatter.js +161 -0
- package/dist/Utils/Charts/index.d.ts +6 -0
- package/dist/Utils/Charts/index.js +6 -0
- package/dist/Utils/Charts/useChartCartesian.d.ts +59 -0
- package/dist/Utils/Charts/useChartCartesian.js +169 -0
- package/dist/Utils/Charts/useChartPart.d.ts +45 -0
- package/dist/Utils/Charts/useChartPart.js +97 -0
- package/dist/Utils/Charts/useChartRegistry.d.ts +13 -0
- package/dist/Utils/Charts/useChartRegistry.js +40 -0
- package/dist/Utils/Charts/useChartRoot.d.ts +156 -0
- package/dist/Utils/Charts/useChartRoot.js +342 -0
- package/dist/Utils/Charts/useChartSeries.d.ts +10 -0
- package/dist/Utils/Charts/useChartSeries.js +22 -0
- package/dist/augments.d.ts +33 -7
- package/dist/index.d.ts +4 -0
- package/dist/index.js +90 -86
- package/docs/README.md +8 -1
- package/docs/components/BridgeUIProvider.md +1 -1
- package/docs/components/Card.md +15 -0
- package/docs/components/Chart.md +118 -151
- package/docs/components/ChartBar.md +190 -0
- package/docs/components/ChartFunnel.md +62 -0
- package/docs/components/ChartLine.md +192 -0
- package/docs/components/ChartPie.md +138 -0
- package/docs/components/ChartScatter.md +102 -0
- package/docs/components/Heading.md +85 -0
- package/docs/components/Text.md +118 -0
- package/package.json +2 -2
- package/dist/Components/Chart/Chart.js +0 -5
- package/dist/Components/Chart/Chart.vue_vue_type_script_setup_true_lang.js +0 -52
- package/dist/Components/Chart/chartInjectionKey.d.ts +0 -94
- package/dist/Components/Chart/composables/useChart.d.ts +0 -40
- package/dist/Components/Chart/composables/useChart.js +0 -346
- package/dist/Components/Chart/echartsChart.d.ts +0 -14
- package/dist/Components/Chart/echartsChart.js +0 -199
- package/dist/Components/Chart/index.d.ts +0 -4
- package/dist/Components/Chart/index.js +0 -4
- package/dist/Components/ChartSeries/ChartSeries.js +0 -5
- package/dist/Components/ChartSeries/ChartSeries.vue.d.ts +0 -4
- package/dist/Components/ChartSeries/ChartSeries.vue_vue_type_script_setup_true_lang.js +0 -24
- package/dist/Components/ChartSeries/chartSeries.types.d.ts +0 -37
- package/dist/Components/ChartSeries/composables/useChartSeries.d.ts +0 -10
- package/dist/Components/ChartSeries/composables/useChartSeries.js +0 -29
- package/dist/Components/ChartSeries/index.d.ts +0 -3
- package/dist/Components/ChartSeries/index.js +0 -3
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import { get as e, isArray as t, isNil as n, isNumber as r } from "es-toolkit/compat";
|
|
2
|
-
import { hasChartBarSeries as i } from "@bridge-ui/core/Domain";
|
|
3
|
-
import { BarChart as a, LineChart as o } from "echarts/charts";
|
|
4
|
-
import { GridComponent as s, TooltipComponent as c } from "echarts/components";
|
|
5
|
-
import { init as l, use as u } from "echarts/core";
|
|
6
|
-
import { SVGRenderer as d } from "echarts/renderers";
|
|
7
|
-
//#region src/Components/Chart/echartsChart.ts
|
|
8
|
-
var f = .15, p = 32;
|
|
9
|
-
u([
|
|
10
|
-
o,
|
|
11
|
-
a,
|
|
12
|
-
s,
|
|
13
|
-
c,
|
|
14
|
-
d
|
|
15
|
-
]);
|
|
16
|
-
function m(e) {
|
|
17
|
-
return {
|
|
18
|
-
color: e.textColor,
|
|
19
|
-
fontSize: e.fontSize,
|
|
20
|
-
fontFamily: e.fontFamily
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
function h(e) {
|
|
24
|
-
return e.type === "bar" ? {
|
|
25
|
-
type: "bar",
|
|
26
|
-
id: e.id,
|
|
27
|
-
name: e.name,
|
|
28
|
-
data: e.data,
|
|
29
|
-
barMaxWidth: p,
|
|
30
|
-
emphasis: { focus: "series" },
|
|
31
|
-
itemStyle: {
|
|
32
|
-
color: e.color,
|
|
33
|
-
borderRadius: [
|
|
34
|
-
4,
|
|
35
|
-
4,
|
|
36
|
-
0,
|
|
37
|
-
0
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
} : {
|
|
41
|
-
type: "line",
|
|
42
|
-
symbolSize: 6,
|
|
43
|
-
id: e.id,
|
|
44
|
-
symbol: "circle",
|
|
45
|
-
showSymbol: !1,
|
|
46
|
-
name: e.name,
|
|
47
|
-
data: e.data,
|
|
48
|
-
connectNulls: !1,
|
|
49
|
-
emphasis: { focus: "series" },
|
|
50
|
-
smooth: e.curve === "smooth",
|
|
51
|
-
itemStyle: { color: e.color },
|
|
52
|
-
lineStyle: {
|
|
53
|
-
width: 2,
|
|
54
|
-
color: e.color
|
|
55
|
-
},
|
|
56
|
-
areaStyle: e.type === "area" ? {
|
|
57
|
-
color: e.color,
|
|
58
|
-
opacity: f
|
|
59
|
-
} : void 0
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
function g(e) {
|
|
63
|
-
let t = e.formatTick;
|
|
64
|
-
if (!n(t)) return (e) => t(e);
|
|
65
|
-
}
|
|
66
|
-
function _(e) {
|
|
67
|
-
let { theme: t, xAxis: r, yAxis: a } = e, o = i(e.series), s = Math.round(t.fontSize * 2.25);
|
|
68
|
-
return {
|
|
69
|
-
animation: e.animation,
|
|
70
|
-
series: e.series.map(h),
|
|
71
|
-
textStyle: {
|
|
72
|
-
fontSize: t.fontSize,
|
|
73
|
-
fontFamily: t.fontFamily
|
|
74
|
-
},
|
|
75
|
-
grid: {
|
|
76
|
-
left: 4,
|
|
77
|
-
right: 12,
|
|
78
|
-
outerBoundsMode: "same",
|
|
79
|
-
outerBoundsContain: "axisLabel",
|
|
80
|
-
top: n(a.label) ? 12 : s,
|
|
81
|
-
bottom: n(r.label) ? 4 : s
|
|
82
|
-
},
|
|
83
|
-
tooltip: {
|
|
84
|
-
show: !0,
|
|
85
|
-
trigger: "axis",
|
|
86
|
-
showContent: !1,
|
|
87
|
-
axisPointer: {
|
|
88
|
-
type: o ? "shadow" : "line",
|
|
89
|
-
lineStyle: { color: t.axisColor },
|
|
90
|
-
shadowStyle: {
|
|
91
|
-
opacity: .5,
|
|
92
|
-
color: t.gridColor
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
yAxis: {
|
|
97
|
-
type: "value",
|
|
98
|
-
min: a.min,
|
|
99
|
-
max: a.max,
|
|
100
|
-
name: a.label,
|
|
101
|
-
show: !a.hidden,
|
|
102
|
-
nameLocation: "end",
|
|
103
|
-
axisLine: { show: !1 },
|
|
104
|
-
splitNumber: a.tickCount,
|
|
105
|
-
nameTextStyle: m(t),
|
|
106
|
-
axisLabel: {
|
|
107
|
-
...m(t),
|
|
108
|
-
formatter: g(a)
|
|
109
|
-
},
|
|
110
|
-
splitLine: {
|
|
111
|
-
show: a.grid,
|
|
112
|
-
lineStyle: { color: t.gridColor }
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
xAxis: {
|
|
116
|
-
nameGap: s,
|
|
117
|
-
type: "category",
|
|
118
|
-
name: r.label,
|
|
119
|
-
boundaryGap: o,
|
|
120
|
-
show: !r.hidden,
|
|
121
|
-
nameLocation: "middle",
|
|
122
|
-
data: e.categories,
|
|
123
|
-
axisTick: { show: !1 },
|
|
124
|
-
nameTextStyle: m(t),
|
|
125
|
-
axisLine: { lineStyle: { color: t.axisColor } },
|
|
126
|
-
axisLabel: {
|
|
127
|
-
...m(t),
|
|
128
|
-
formatter: g(r)
|
|
129
|
-
},
|
|
130
|
-
splitLine: {
|
|
131
|
-
show: r.grid,
|
|
132
|
-
lineStyle: { color: t.gridColor }
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
function v(n) {
|
|
138
|
-
let i = e(n, "axesInfo"), a = t(i) ? e(i, [0, "value"]) : null;
|
|
139
|
-
return r(a) ? a : null;
|
|
140
|
-
}
|
|
141
|
-
function y(e) {
|
|
142
|
-
let i = e, a = null, o = null, s = !1, c = (t) => {
|
|
143
|
-
s || t === o || (o = t, e.onActiveIndexChange(t));
|
|
144
|
-
}, u = () => n(a) ? i.width <= 0 || i.height <= 0 ? null : (a = l(e.element, null, {
|
|
145
|
-
renderer: "svg",
|
|
146
|
-
width: i.width,
|
|
147
|
-
height: i.height
|
|
148
|
-
}), a.on("updateAxisPointer", (e) => {
|
|
149
|
-
c(v(e));
|
|
150
|
-
}), a.getZr().on("globalout", () => {
|
|
151
|
-
c(null);
|
|
152
|
-
}), a) : a, d = () => {
|
|
153
|
-
let e = u();
|
|
154
|
-
if (n(e)) return;
|
|
155
|
-
let { width: t, height: r } = i;
|
|
156
|
-
(e.getWidth() !== t || e.getHeight() !== r) && e.resize({
|
|
157
|
-
width: t,
|
|
158
|
-
height: r
|
|
159
|
-
}), e.setOption(_(i), { replaceMerge: ["series"] });
|
|
160
|
-
};
|
|
161
|
-
return d(), {
|
|
162
|
-
update: (e) => {
|
|
163
|
-
i = e, d();
|
|
164
|
-
},
|
|
165
|
-
destroy: () => {
|
|
166
|
-
a?.dispose(), a = null;
|
|
167
|
-
},
|
|
168
|
-
highlightSeries: (e) => {
|
|
169
|
-
a?.dispatchAction({ type: "downplay" }), n(e) || a?.dispatchAction({
|
|
170
|
-
seriesId: e,
|
|
171
|
-
type: "highlight"
|
|
172
|
-
});
|
|
173
|
-
},
|
|
174
|
-
setActiveIndex: (e) => {
|
|
175
|
-
n(a) || i.series.length === 0 || (s = !0, o = e, n(e) ? a.dispatchAction({ type: "hideTip" }) : a.dispatchAction({
|
|
176
|
-
seriesIndex: 0,
|
|
177
|
-
type: "showTip",
|
|
178
|
-
dataIndex: e
|
|
179
|
-
}), s = !1);
|
|
180
|
-
},
|
|
181
|
-
getCategoryAnchor: (e) => {
|
|
182
|
-
if (n(a) || e < 0 || e >= i.categories.length) return null;
|
|
183
|
-
let o = a.convertToPixel({ xAxisIndex: 0 }, e);
|
|
184
|
-
if (!r(o)) return null;
|
|
185
|
-
let s = i.series.flatMap((n) => {
|
|
186
|
-
let i = n.data[e];
|
|
187
|
-
if (!r(i)) return [];
|
|
188
|
-
let o = a?.convertToPixel({ gridIndex: 0 }, [e, i]);
|
|
189
|
-
return t(o) && r(o[1]) ? [o[1]] : [];
|
|
190
|
-
});
|
|
191
|
-
return {
|
|
192
|
-
x: o,
|
|
193
|
-
y: s.length > 0 ? Math.min(...s) : i.height / 2
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
//#endregion
|
|
199
|
-
export { _ as buildEchartsOption, y as mountEchartsChart };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export type { ChartClasses, ChartColorOverrides, ChartCustomProps, ChartOwnProps, ChartProps, ChartSeriesColor, ChartSizeOverrides, ChartSlots, } from './chart.types';
|
|
2
|
-
export { default as Chart } from './Chart.vue';
|
|
3
|
-
export { CHART_INJECTION_KEY, useChartContext, type ChartContextValue, type ChartResolvedSeries, } from './chartInjectionKey';
|
|
4
|
-
export { useChart } from './composables/useChart';
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ChartSeriesOwnProps } from './chartSeries.types';
|
|
2
|
-
declare const __VLS_export: import('vue').DefineComponent<ChartSeriesOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ChartSeriesOwnProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
3
|
-
declare const _default: typeof __VLS_export;
|
|
4
|
-
export default _default;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { useChartSeries as e } from "./composables/useChartSeries.js";
|
|
2
|
-
import { createElementBlock as t, defineComponent as n, openBlock as r } from "vue";
|
|
3
|
-
//#region src/Components/ChartSeries/ChartSeries.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var i = {
|
|
5
|
-
hidden: "",
|
|
6
|
-
"aria-hidden": "true"
|
|
7
|
-
}, a = /*@__PURE__*/ n({
|
|
8
|
-
__name: "ChartSeries",
|
|
9
|
-
props: {
|
|
10
|
-
color: {},
|
|
11
|
-
curve: {},
|
|
12
|
-
data: {},
|
|
13
|
-
name: {},
|
|
14
|
-
type: {}
|
|
15
|
-
},
|
|
16
|
-
setup(n) {
|
|
17
|
-
return e(n, {
|
|
18
|
-
type: "line",
|
|
19
|
-
curve: "linear"
|
|
20
|
-
}), (e, n) => (r(), t("span", i));
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
//#endregion
|
|
24
|
-
export { a as default };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { ChartCurve, ChartDatum, ChartType } from '@bridge-ui/core/Domain';
|
|
2
|
-
import { ChartSeriesColor } from '../Chart/chart.types';
|
|
3
|
-
/**
|
|
4
|
-
* One data series registered on the nearest `Chart`. Renders nothing.
|
|
5
|
-
*/
|
|
6
|
-
export interface ChartSeriesOwnProps {
|
|
7
|
-
/**
|
|
8
|
-
* Series color (token key or CSS color). Falls back to the `Chart` palette.
|
|
9
|
-
*
|
|
10
|
-
* @default undefined
|
|
11
|
-
*/
|
|
12
|
-
color?: ChartSeriesColor;
|
|
13
|
-
/**
|
|
14
|
-
* Line interpolation for `line` / `area` series.
|
|
15
|
-
*
|
|
16
|
-
* @default "linear"
|
|
17
|
-
*/
|
|
18
|
-
curve?: ChartCurve;
|
|
19
|
-
/**
|
|
20
|
-
* One value per `Chart` category. `null` renders a gap.
|
|
21
|
-
*/
|
|
22
|
-
data: ChartDatum[];
|
|
23
|
-
/**
|
|
24
|
-
* Series name shown in the legend, tooltip, and data table.
|
|
25
|
-
*/
|
|
26
|
-
name: string;
|
|
27
|
-
/**
|
|
28
|
-
* Series family.
|
|
29
|
-
*
|
|
30
|
-
* @default "line"
|
|
31
|
-
*/
|
|
32
|
-
type?: ChartType;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* `ChartSeries` has no DOM element, so it takes no HTML attributes.
|
|
36
|
-
*/
|
|
37
|
-
export type ChartSeriesProps = ChartSeriesOwnProps;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ChartSeriesEntry } from '@bridge-ui/core/Domain';
|
|
2
|
-
import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core/Utils';
|
|
3
|
-
import { ChartSeriesOwnProps, ChartSeriesProps } from '../chartSeries.types';
|
|
4
|
-
type ChartSeriesLibDefaults = LibDefaultsShape<ChartSeriesOwnProps, "type" | "curve">;
|
|
5
|
-
type ChartSeriesMerged = MergeLibDefaults<Pick<ChartSeriesOwnProps, "type" | "curve">, ChartSeriesLibDefaults>;
|
|
6
|
-
export declare function useChartSeries(props: ChartSeriesProps, libDefaults: ChartSeriesLibDefaults): {
|
|
7
|
-
entry: import('vue').ComputedRef<ChartSeriesEntry>;
|
|
8
|
-
merged: import('vue').ComputedRef<ChartSeriesMerged>;
|
|
9
|
-
};
|
|
10
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { useBridgeUIComponent as e } from "../../../Utils/index.js";
|
|
2
|
-
import { useChartContext as t } from "../../Chart/chartInjectionKey.js";
|
|
3
|
-
import { computed as n, onBeforeUnmount as r, useId as i, watch as a } from "vue";
|
|
4
|
-
import { pick as o } from "es-toolkit/compat";
|
|
5
|
-
//#region src/Components/ChartSeries/composables/useChartSeries.ts
|
|
6
|
-
function s(s, c) {
|
|
7
|
-
let l = t(), u = i(), d = `${l.value.id}-series${u}`, { merged: f } = e({
|
|
8
|
-
libDefaults: c,
|
|
9
|
-
componentName: "ChartSeries",
|
|
10
|
-
props: () => o(s, ["type", "curve"])
|
|
11
|
-
}), p = n(() => ({
|
|
12
|
-
id: d,
|
|
13
|
-
name: s.name,
|
|
14
|
-
data: s.data,
|
|
15
|
-
color: s.color,
|
|
16
|
-
type: f.value.type,
|
|
17
|
-
curve: f.value.curve
|
|
18
|
-
}));
|
|
19
|
-
return a(p, (e) => {
|
|
20
|
-
l.value.upsertSeries(e);
|
|
21
|
-
}, { immediate: !0 }), r(() => {
|
|
22
|
-
l.value.removeSeries(d);
|
|
23
|
-
}), {
|
|
24
|
-
entry: p,
|
|
25
|
-
merged: f
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
//#endregion
|
|
29
|
-
export { s as useChartSeries };
|