@bridge-ui/vue 0.19.0 → 0.20.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/dist/Components/Autocomplete/composables/useAutocomplete.js +257 -265
- package/dist/Components/Calendar/composables/useCalendar.d.ts +1 -1
- package/dist/Components/Calendar/composables/useCalendar.js +192 -187
- package/dist/Components/CalendarMonth/composables/useCalendarMonth.d.ts +1 -1
- package/dist/Components/CalendarRange/composables/useCalendarRange.d.ts +1 -1
- package/dist/Components/CalendarRange/composables/useCalendarRange.js +243 -238
- package/dist/Components/ChartBar/composables/useChartBar.js +4 -4
- package/dist/Components/ChartFunnel/composables/useChartFunnel.js +10 -10
- package/dist/Components/ChartLine/composables/useChartLine.js +1 -1
- package/dist/Components/ChartPie/composables/useChartPie.js +10 -10
- package/dist/Components/ChartScatter/composables/useChartScatter.js +21 -21
- package/dist/Components/DataTable/DataTableColumnsMenu.vue.d.ts +1 -2
- package/dist/Components/DataTable/composables/useDataTable.d.ts +8 -66
- package/dist/Components/DataTable/composables/useDataTable.js +267 -349
- package/dist/Components/DataTable/composables/useDataTableColumnsMenu.d.ts +1 -2
- package/dist/Components/ListItem/composables/useListItem.js +29 -30
- package/dist/Components/Listbox/composables/useListboxNavigation.d.ts +0 -5
- package/dist/Components/Listbox/composables/useListboxNavigation.js +23 -50
- package/dist/Components/Listbox/index.d.ts +1 -1
- package/dist/Components/Listbox/index.js +5 -5
- package/dist/Components/ResizablePanel/composables/useResizablePanel.d.ts +1 -1
- package/dist/Components/RichTextEditor/composables/useRichTextEditor.js +31 -31
- package/dist/Components/Select/composables/useSelect.js +201 -211
- package/dist/Components/Slider/composables/useSlider.js +93 -122
- package/dist/index.d.ts +1 -1
- package/dist/index.js +175 -175
- package/package.json +2 -2
- package/dist/Components/RichTextEditor/tiptapEditor.d.ts +0 -111
- package/dist/Components/RichTextEditor/tiptapEditor.js +0 -121
- package/dist/Utils/Charts/echarts/bar.d.ts +0 -6
- package/dist/Utils/Charts/echarts/bar.js +0 -23
- package/dist/Utils/Charts/echarts/cartesian.d.ts +0 -15
- package/dist/Utils/Charts/echarts/cartesian.js +0 -290
- package/dist/Utils/Charts/echarts/funnel.d.ts +0 -15
- package/dist/Utils/Charts/echarts/funnel.js +0 -79
- package/dist/Utils/Charts/echarts/line.d.ts +0 -5
- package/dist/Utils/Charts/echarts/line.js +0 -20
- package/dist/Utils/Charts/echarts/part.d.ts +0 -19
- package/dist/Utils/Charts/echarts/part.js +0 -45
- package/dist/Utils/Charts/echarts/pie.d.ts +0 -14
- package/dist/Utils/Charts/echarts/pie.js +0 -76
- package/dist/Utils/Charts/echarts/plot.d.ts +0 -44
- package/dist/Utils/Charts/echarts/plot.js +0 -52
- package/dist/Utils/Charts/echarts/scatter.d.ts +0 -14
- package/dist/Utils/Charts/echarts/scatter.js +0 -161
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { labelStyle as e, mountEchartsPlot as t, readItemLayout as n } from "./plot.js";
|
|
2
|
-
import { createEchartsPartFamily as r, formatSliceLabel as i } from "./part.js";
|
|
3
|
-
import { get as a, isNumber as o } from "es-toolkit/compat";
|
|
4
|
-
import { PieChart as s } from "echarts/charts";
|
|
5
|
-
import { TooltipComponent as c } from "echarts/components";
|
|
6
|
-
import { use as l } from "echarts/core";
|
|
7
|
-
import { SVGRenderer as u } from "echarts/renderers";
|
|
8
|
-
//#region src/Utils/Charts/echarts/pie.ts
|
|
9
|
-
l([
|
|
10
|
-
s,
|
|
11
|
-
u,
|
|
12
|
-
c
|
|
13
|
-
]);
|
|
14
|
-
var d = 70, f = 92;
|
|
15
|
-
function p(t) {
|
|
16
|
-
let { theme: n, labels: r, slices: a, labelPosition: o } = t, s = r && o === "outside", c = s ? d : f, l = t.variant === "donut", u = Math.min(1, Math.max(0, t.thickness)), p = l ? Math.round(c * (1 - u)) : 0, m = {
|
|
17
|
-
show: r,
|
|
18
|
-
...e(n),
|
|
19
|
-
formatter: i(a),
|
|
20
|
-
color: s ? n.textColor : "#fff",
|
|
21
|
-
position: s ? "outside" : "inside"
|
|
22
|
-
};
|
|
23
|
-
return {
|
|
24
|
-
animation: t.animation,
|
|
25
|
-
tooltip: {
|
|
26
|
-
show: !0,
|
|
27
|
-
trigger: "item",
|
|
28
|
-
showContent: !1
|
|
29
|
-
},
|
|
30
|
-
textStyle: {
|
|
31
|
-
fontSize: n.fontSize,
|
|
32
|
-
fontFamily: n.fontFamily
|
|
33
|
-
},
|
|
34
|
-
series: [{
|
|
35
|
-
label: m,
|
|
36
|
-
type: "pie",
|
|
37
|
-
center: ["50%", "50%"],
|
|
38
|
-
avoidLabelOverlap: !0,
|
|
39
|
-
minAngle: t.minAngle,
|
|
40
|
-
radius: [`${p}%`, `${c}%`],
|
|
41
|
-
roseType: t.rose ?? void 0,
|
|
42
|
-
emphasis: {
|
|
43
|
-
label: m,
|
|
44
|
-
scale: !0,
|
|
45
|
-
scaleSize: 4
|
|
46
|
-
},
|
|
47
|
-
itemStyle: { borderRadius: t.cornerRadius },
|
|
48
|
-
padAngle: a.length > 1 ? t.padAngle : 0,
|
|
49
|
-
labelLine: {
|
|
50
|
-
show: s,
|
|
51
|
-
lineStyle: { color: n.axisColor }
|
|
52
|
-
},
|
|
53
|
-
data: a.map((e) => ({
|
|
54
|
-
id: e.id,
|
|
55
|
-
name: e.label,
|
|
56
|
-
value: e.value,
|
|
57
|
-
itemStyle: { color: e.color }
|
|
58
|
-
}))
|
|
59
|
-
}]
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
function m(e, t) {
|
|
63
|
-
let r = n(e, t), i = a(r, "cx"), s = a(r, "cy"), c = a(r, "r"), l = a(r, "startAngle"), u = a(r, "endAngle");
|
|
64
|
-
if (!o(i) || !o(s) || !o(c) || !o(l) || !o(u)) return null;
|
|
65
|
-
let d = (l + u) / 2;
|
|
66
|
-
return {
|
|
67
|
-
x: i + c * Math.cos(d),
|
|
68
|
-
y: s + c * Math.sin(d)
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
var h = r(p, m);
|
|
72
|
-
function g(e) {
|
|
73
|
-
return t(e, h);
|
|
74
|
-
}
|
|
75
|
-
//#endregion
|
|
76
|
-
export { p as buildEchartsPieOption, g as mountEchartsPie };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { ECharts, EChartsCoreOption } from 'echarts/core';
|
|
2
|
-
import { ChartAnchor, ChartBaseRenderOptions, ChartHandle, ChartMountOptions, ChartRenderTheme } from '@bridge-ui/core/Domain';
|
|
3
|
-
/**
|
|
4
|
-
* Family-specific pieces of a plot.
|
|
5
|
-
*/
|
|
6
|
-
export type EchartsPlotFamily<Options extends ChartBaseRenderOptions> = {
|
|
7
|
-
/**
|
|
8
|
-
* Wires pointer events to `emit` (the active index, `null` on leave).
|
|
9
|
-
*/
|
|
10
|
-
attach: (chart: ECharts, emit: (index: null | number) => void, getOptions: () => Options) => void;
|
|
11
|
-
/**
|
|
12
|
-
* Builds the ECharts option.
|
|
13
|
-
*/
|
|
14
|
-
build: (options: Options) => EChartsCoreOption;
|
|
15
|
-
/**
|
|
16
|
-
* Tooltip anchor for the item at `index`.
|
|
17
|
-
*/
|
|
18
|
-
getAnchor: (chart: ECharts, options: Options, index: number) => null | ChartAnchor;
|
|
19
|
-
/**
|
|
20
|
-
* Emphasizes a legend item (`null` clears).
|
|
21
|
-
*/
|
|
22
|
-
highlight: (chart: ECharts, options: Options, id: null | string) => void;
|
|
23
|
-
/**
|
|
24
|
-
* Shows the pointer for keyboard navigation (`null` clears).
|
|
25
|
-
*/
|
|
26
|
-
showActive: (chart: ECharts, options: Options, index: null | number) => void;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Label style shared by axes and plot labels.
|
|
30
|
-
*/
|
|
31
|
-
export declare function labelStyle(theme: ChartRenderTheme): {
|
|
32
|
-
color: string;
|
|
33
|
-
fontSize: number;
|
|
34
|
-
fontFamily: string;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Item layout computed by ECharts for a single-series plot (pie slice
|
|
38
|
-
* sector, funnel trapezoid). Reads the internal model; `null` when missing.
|
|
39
|
-
*/
|
|
40
|
-
export declare function readItemLayout(chart: ECharts, dataIndex: number): null | Record<string, unknown>;
|
|
41
|
-
/**
|
|
42
|
-
* Mounts a plot into `options.element` and returns its handle.
|
|
43
|
-
*/
|
|
44
|
-
export declare function mountEchartsPlot<Options extends ChartBaseRenderOptions>(options: ChartMountOptions<Options>, family: EchartsPlotFamily<Options>): ChartHandle<Options>;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { get as e, isFunction as t, isNil as n } from "es-toolkit/compat";
|
|
2
|
-
import { init as r } from "echarts/core";
|
|
3
|
-
//#region src/Utils/Charts/echarts/plot.ts
|
|
4
|
-
function i(e) {
|
|
5
|
-
return {
|
|
6
|
-
color: e.textColor,
|
|
7
|
-
fontSize: e.fontSize,
|
|
8
|
-
fontFamily: e.fontFamily
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
function a(r, i) {
|
|
12
|
-
let a = e(r, "getModel");
|
|
13
|
-
if (!t(a)) return null;
|
|
14
|
-
let o = a.call(r)?.getSeriesByIndex?.(0)?.getData?.()?.getItemLayout?.(i);
|
|
15
|
-
return n(o) ? null : o;
|
|
16
|
-
}
|
|
17
|
-
function o(e, t) {
|
|
18
|
-
let i = e, a = null, o = null, s = !1, c = (t) => {
|
|
19
|
-
s || t === o || (o = t, e.onActiveIndexChange(t));
|
|
20
|
-
}, l = () => n(a) ? i.width <= 0 || i.height <= 0 ? null : (a = r(e.element, null, {
|
|
21
|
-
renderer: "svg",
|
|
22
|
-
width: i.width,
|
|
23
|
-
height: i.height
|
|
24
|
-
}), t.attach(a, c, () => i), a.getZr().on("globalout", () => {
|
|
25
|
-
c(null);
|
|
26
|
-
}), a) : a, u = () => {
|
|
27
|
-
let e = l();
|
|
28
|
-
if (n(e)) return;
|
|
29
|
-
let { width: r, height: a } = i;
|
|
30
|
-
(e.getWidth() !== r || e.getHeight() !== a) && e.resize({
|
|
31
|
-
width: r,
|
|
32
|
-
height: a
|
|
33
|
-
}), e.setOption(t.build(i), { replaceMerge: ["series"] });
|
|
34
|
-
};
|
|
35
|
-
return u(), {
|
|
36
|
-
update: (e) => {
|
|
37
|
-
i = e, u();
|
|
38
|
-
},
|
|
39
|
-
destroy: () => {
|
|
40
|
-
a?.dispose(), a = null;
|
|
41
|
-
},
|
|
42
|
-
getAnchor: (e) => n(a) ? null : t.getAnchor(a, i, e),
|
|
43
|
-
highlight: (e) => {
|
|
44
|
-
n(a) || t.highlight(a, i, e);
|
|
45
|
-
},
|
|
46
|
-
setActiveIndex: (e) => {
|
|
47
|
-
n(a) || (s = !0, o = e, t.showActive(a, i, e), s = !1);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
//#endregion
|
|
52
|
-
export { i as labelStyle, o as mountEchartsPlot, a as readItemLayout };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ScatterSeriesOption } from 'echarts/charts';
|
|
2
|
-
import { GridComponentOption, TooltipComponentOption } from 'echarts/components';
|
|
3
|
-
import { ComposeOption } from 'echarts/core';
|
|
4
|
-
import { ChartHandle, ChartMountOptions, ChartScatterRenderOptions } from '@bridge-ui/core/Domain';
|
|
5
|
-
type EChartsScatterOption = ComposeOption<GridComponentOption | ScatterSeriesOption | TooltipComponentOption>;
|
|
6
|
-
/**
|
|
7
|
-
* Builds the ECharts option for a scatter plot.
|
|
8
|
-
*/
|
|
9
|
-
export declare function buildEchartsScatterOption(options: ChartScatterRenderOptions): EChartsScatterOption;
|
|
10
|
-
/**
|
|
11
|
-
* Mounts a scatter plot (tree-shaken: scatter series only).
|
|
12
|
-
*/
|
|
13
|
-
export declare function mountEchartsScatter(options: ChartMountOptions<ChartScatterRenderOptions>): ChartHandle<ChartScatterRenderOptions>;
|
|
14
|
-
export {};
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import { labelStyle as e, mountEchartsPlot as t } from "./plot.js";
|
|
2
|
-
import { get as n, isArray as r, isEmpty as i, isNil as a, isNumber as o } from "es-toolkit/compat";
|
|
3
|
-
import { findChartScatterRange as s, isChartValue as c, scaleChartBubbleSize as l } from "@bridge-ui/core/Domain";
|
|
4
|
-
import { ScatterChart as u } from "echarts/charts";
|
|
5
|
-
import { GridComponent as d, TooltipComponent as f } from "echarts/components";
|
|
6
|
-
import { use as p } from "echarts/core";
|
|
7
|
-
import { SVGRenderer as m } from "echarts/renderers";
|
|
8
|
-
//#region src/Utils/Charts/echarts/scatter.ts
|
|
9
|
-
p([
|
|
10
|
-
u,
|
|
11
|
-
d,
|
|
12
|
-
m,
|
|
13
|
-
f
|
|
14
|
-
]);
|
|
15
|
-
var h = .7;
|
|
16
|
-
function g(e, t, n) {
|
|
17
|
-
let i = r(n) ? n[2] : void 0, o = t.symbolSize ?? e.symbolSize;
|
|
18
|
-
return !c(i) || a(e.sizeDomain) ? o : l({
|
|
19
|
-
value: i,
|
|
20
|
-
range: e.bubbleSize,
|
|
21
|
-
domain: e.sizeDomain
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
function _(e) {
|
|
25
|
-
return i(e.colorRanges) ? e.data : e.data.map((t) => {
|
|
26
|
-
let n = c(t[1]) ? s(e, t[1]) : void 0;
|
|
27
|
-
return a(n) ? t : {
|
|
28
|
-
value: t,
|
|
29
|
-
itemStyle: { color: n.color }
|
|
30
|
-
};
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
function v(t, n) {
|
|
34
|
-
let { theme: r } = t;
|
|
35
|
-
return {
|
|
36
|
-
scale: !0,
|
|
37
|
-
min: n.min,
|
|
38
|
-
max: n.max,
|
|
39
|
-
name: n.label,
|
|
40
|
-
type: "value",
|
|
41
|
-
show: n.hidden !== !0,
|
|
42
|
-
splitNumber: n.tickCount,
|
|
43
|
-
nameTextStyle: e(r),
|
|
44
|
-
axisLine: { lineStyle: { color: r.axisColor } },
|
|
45
|
-
splitLine: {
|
|
46
|
-
show: n.grid ?? !0,
|
|
47
|
-
lineStyle: { color: r.gridColor }
|
|
48
|
-
},
|
|
49
|
-
axisLabel: {
|
|
50
|
-
...e(r),
|
|
51
|
-
formatter: a(n.formatTick) ? void 0 : (e) => n.formatTick?.(Number(e)) ?? String(e)
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
function y(e) {
|
|
56
|
-
let { theme: t } = e, n = Math.round(t.fontSize * 2.25), r = !a(e.sizeDomain);
|
|
57
|
-
return {
|
|
58
|
-
animation: e.animation,
|
|
59
|
-
tooltip: {
|
|
60
|
-
show: !0,
|
|
61
|
-
trigger: "item",
|
|
62
|
-
showContent: !1
|
|
63
|
-
},
|
|
64
|
-
yAxis: {
|
|
65
|
-
...v(e, e.yAxis),
|
|
66
|
-
nameLocation: "end"
|
|
67
|
-
},
|
|
68
|
-
textStyle: {
|
|
69
|
-
fontSize: t.fontSize,
|
|
70
|
-
fontFamily: t.fontFamily
|
|
71
|
-
},
|
|
72
|
-
xAxis: {
|
|
73
|
-
...v(e, e.xAxis),
|
|
74
|
-
nameGap: n,
|
|
75
|
-
nameLocation: "middle"
|
|
76
|
-
},
|
|
77
|
-
grid: {
|
|
78
|
-
left: 4,
|
|
79
|
-
outerBoundsMode: "same",
|
|
80
|
-
outerBoundsContain: "axisLabel",
|
|
81
|
-
top: a(e.yAxis.label) ? 12 : n,
|
|
82
|
-
right: r ? e.bubbleSize[1] / 2 : 12,
|
|
83
|
-
bottom: a(e.xAxis.label) ? 4 : n
|
|
84
|
-
},
|
|
85
|
-
series: e.series.map((t) => ({
|
|
86
|
-
id: t.id,
|
|
87
|
-
type: "scatter",
|
|
88
|
-
name: t.name,
|
|
89
|
-
data: _(t),
|
|
90
|
-
emphasis: {
|
|
91
|
-
scale: 1.2,
|
|
92
|
-
focus: "series"
|
|
93
|
-
},
|
|
94
|
-
symbolSize: (n) => g(e, t, n),
|
|
95
|
-
itemStyle: {
|
|
96
|
-
color: t.color,
|
|
97
|
-
opacity: r ? h : 1
|
|
98
|
-
}
|
|
99
|
-
}))
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
function b(e, t, n) {
|
|
103
|
-
let r = e.points.findIndex((e) => e.seriesIndex === t && e.dataIndex === n);
|
|
104
|
-
return r === -1 ? null : r;
|
|
105
|
-
}
|
|
106
|
-
var x = {
|
|
107
|
-
build: y,
|
|
108
|
-
highlight: (e, t, n) => {
|
|
109
|
-
e.dispatchAction({ type: "downplay" }), a(n) || e.dispatchAction({
|
|
110
|
-
seriesId: n,
|
|
111
|
-
type: "highlight"
|
|
112
|
-
});
|
|
113
|
-
},
|
|
114
|
-
attach: (e, t, r) => {
|
|
115
|
-
e.on("mouseover", (e) => {
|
|
116
|
-
let i = n(e, "seriesIndex"), a = n(e, "dataIndex");
|
|
117
|
-
o(i) && o(a) && t(b(r(), i, a));
|
|
118
|
-
}), e.on("mouseout", () => {
|
|
119
|
-
t(null);
|
|
120
|
-
});
|
|
121
|
-
},
|
|
122
|
-
showActive: (e, t, n) => {
|
|
123
|
-
e.dispatchAction({ type: "downplay" });
|
|
124
|
-
let r = a(n) ? void 0 : t.points[n];
|
|
125
|
-
if (a(r)) {
|
|
126
|
-
e.dispatchAction({ type: "hideTip" });
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
let i = {
|
|
130
|
-
dataIndex: r.dataIndex,
|
|
131
|
-
seriesIndex: r.seriesIndex
|
|
132
|
-
};
|
|
133
|
-
e.dispatchAction({
|
|
134
|
-
...i,
|
|
135
|
-
type: "highlight"
|
|
136
|
-
}), e.dispatchAction({
|
|
137
|
-
...i,
|
|
138
|
-
type: "showTip"
|
|
139
|
-
});
|
|
140
|
-
},
|
|
141
|
-
getAnchor: (e, t, n) => {
|
|
142
|
-
let i = t.points[n], s = a(i) ? void 0 : t.series[i.seriesIndex];
|
|
143
|
-
if (a(i) || a(s)) return null;
|
|
144
|
-
let c = e.convertToPixel({ seriesIndex: i.seriesIndex }, [i.x, i.y]);
|
|
145
|
-
if (!r(c) || !o(c[0]) || !o(c[1])) return null;
|
|
146
|
-
let l = g(t, s, a(i.size) ? [i.x, i.y] : [
|
|
147
|
-
i.x,
|
|
148
|
-
i.y,
|
|
149
|
-
i.size
|
|
150
|
-
]);
|
|
151
|
-
return {
|
|
152
|
-
x: c[0],
|
|
153
|
-
y: c[1] - l / 2
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
function S(e) {
|
|
158
|
-
return t(e, x);
|
|
159
|
-
}
|
|
160
|
-
//#endregion
|
|
161
|
-
export { y as buildEchartsScatterOption, S as mountEchartsScatter };
|