@baishuyun/ui-business 6.0.0 → 6.0.2
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/BubbleChart/{AutoGridEChart-BQsZw7nv.js → AutoGridEChart-CUNnImhh.js} +7 -7
- package/dist/BubbleChart/{BubbleChart-BN3msB5e.js → BubbleChart-zh6fCv3l.js} +9 -4
- package/dist/BubbleChart/index.js +2 -2
- package/dist/ConfigProvider/ConfigProvider-CU5Z39Ex.js +27 -0
- package/dist/ConfigProvider/index.js +1 -1
- package/dist/Scatterplot/{Scatterplot-BZC0IKc0.js → Scatterplot-3Dpd_7-a.js} +10 -5
- package/dist/Scatterplot/index.js +2 -2
- package/dist/components/ConfigProvider/ConfigProvider.type.d.ts +5 -2
- package/dist/components/ConfigProvider/context/configContext.d.ts +2 -2
- package/dist/index.js +5 -5
- package/package.json +3 -3
- package/dist/ConfigProvider/ConfigProvider-Cwc-Gz9h.js +0 -26
|
@@ -102,15 +102,15 @@ function l(e, t, n, r, i) {
|
|
|
102
102
|
})(),
|
|
103
103
|
bottom: (() => {
|
|
104
104
|
let t = 20;
|
|
105
|
-
return e.xAxis.position
|
|
105
|
+
return ["bottom", "zero"].includes(e.xAxis.position) && (t += C + 10), e.legend.show && (e.legend.top === "bottom" || e.legend.top === "zero") && (T += S, t += S), e.xAxis.title !== "" && (e.legend.top === "bottom" || e.xAxis.position === "zero") && (t += 30), t;
|
|
106
106
|
})(),
|
|
107
107
|
left: (() => {
|
|
108
108
|
let t = 20;
|
|
109
|
-
return e.yAxis.position
|
|
109
|
+
return ["left", "zero"].includes(e.yAxis.position) && (t += w), e.legend.show && (e.legend.left === "left" || e.legend.left === "zero") && (D += v, t += v), e.yAxis.title !== "" && (e.yAxis.position === "left" || e.yAxis.position === "zero") && (t += 10), t;
|
|
110
110
|
})(),
|
|
111
111
|
right: (() => {
|
|
112
112
|
let t = 20;
|
|
113
|
-
return e.yAxis.position === "right" && (t += w + 10), e.legend.show && e.legend.left === "right" && (
|
|
113
|
+
return e.yAxis.position === "right" && (t += w + 10), e.legend.show && e.legend.left === "right" && (O += v, t += v), e.yAxis.title !== "" && e.yAxis.position === "right" && (t += 30), t;
|
|
114
114
|
})()
|
|
115
115
|
},
|
|
116
116
|
titleBottomHeight: T,
|
|
@@ -136,7 +136,7 @@ var u = {
|
|
|
136
136
|
if (!f.current) return;
|
|
137
137
|
p.current = t(f.current);
|
|
138
138
|
let e = v();
|
|
139
|
-
|
|
139
|
+
p.current.setOption(e, !0), p.current.on("click", function(e) {
|
|
140
140
|
n.onChartClick && n.onChartClick(e, n.options, n.dataList);
|
|
141
141
|
});
|
|
142
142
|
let r = () => {
|
|
@@ -154,7 +154,7 @@ var u = {
|
|
|
154
154
|
if (!p.current) return;
|
|
155
155
|
let e = v();
|
|
156
156
|
p.current.setOption(e, !0);
|
|
157
|
-
}, [n.option]),
|
|
157
|
+
}, [n.option]), /* @__PURE__ */ c("div", {
|
|
158
158
|
className: e(n.className, u["auto-grid-echart"]),
|
|
159
159
|
children: [
|
|
160
160
|
/* @__PURE__ */ s("div", {
|
|
@@ -167,12 +167,12 @@ var u = {
|
|
|
167
167
|
}),
|
|
168
168
|
/* @__PURE__ */ s("div", {
|
|
169
169
|
className: e(u["xAxis-title"]),
|
|
170
|
-
style: n.option.xAxis?.position
|
|
170
|
+
style: ["bottom", "zero"].includes(n.option.xAxis?.position) ? { bottom: h.titleBottomHeight + 20 } : n.option.xAxis?.position === "top" ? { top: h.titleTopHeight + 20 } : void 0,
|
|
171
171
|
children: /* @__PURE__ */ s("span", { children: n.option.xAxis?.title })
|
|
172
172
|
}),
|
|
173
173
|
/* @__PURE__ */ s("div", {
|
|
174
174
|
className: e(u["yAxis-title"]),
|
|
175
|
-
style: n.option.yAxis?.position
|
|
175
|
+
style: ["left", "zero"].includes(n.option.yAxis?.position) ? { left: h.titleLeftHeight } : n.option.yAxis?.position === "right" ? { right: h.titleRightHeight + 20 } : void 0,
|
|
176
176
|
children: /* @__PURE__ */ s("span", { children: n.option.yAxis?.title })
|
|
177
177
|
})
|
|
178
178
|
]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as e } from "../vendors/echarts.js";
|
|
2
|
-
import { t } from "./AutoGridEChart-
|
|
2
|
+
import { t } from "./AutoGridEChart-CUNnImhh.js";
|
|
3
3
|
import { forwardRef as n, useImperativeHandle as r, useRef as i } from "react";
|
|
4
4
|
import { jsx as a } from "react/jsx-runtime";
|
|
5
5
|
var o = n((n, o) => {
|
|
@@ -29,7 +29,8 @@ var o = n((n, o) => {
|
|
|
29
29
|
min: n.options.xAxis?.min || void 0,
|
|
30
30
|
max: n.options.xAxis?.max || void 0,
|
|
31
31
|
title: n.options.xAxis?.title?.text || "",
|
|
32
|
-
position: n.options.xAxis?.position
|
|
32
|
+
position: n.options.xAxis?.position,
|
|
33
|
+
axisLine: { onZero: n.options.xAxis?.position === "zero" }
|
|
33
34
|
},
|
|
34
35
|
yAxis: {
|
|
35
36
|
axisLabel: {
|
|
@@ -41,7 +42,8 @@ var o = n((n, o) => {
|
|
|
41
42
|
min: n.options.yAxis?.min || void 0,
|
|
42
43
|
max: n.options.yAxis?.max || void 0,
|
|
43
44
|
title: n.options.yAxis?.title?.text,
|
|
44
|
-
position: n.options.yAxis?.position
|
|
45
|
+
position: n.options.yAxis?.position,
|
|
46
|
+
axisLine: { onZero: n.options.yAxis?.position === "zero" }
|
|
45
47
|
},
|
|
46
48
|
grid: {
|
|
47
49
|
top: 20,
|
|
@@ -130,7 +132,10 @@ var o = n((n, o) => {
|
|
|
130
132
|
return e.type === "fixed" && (e.field === n.options.xFields[0].tag && (t.xAxis = e.value || 0), (e.field === n.options.yFields[0].tag || e.field === "") && (t.yAxis = e.value || 0)), e.type === "dynamic" && (e.field === n.options.xFields[0].tag && (e.aggregate === "max" && (t.xAxis = d.max), e.aggregate === "min" && (t.xAxis = d.min), e.aggregate === "avg" && (t.xAxis = d.avg)), e.field === n.options.yFields[0].tag && (e.aggregate === "max" && (t.yAxis = f.max), e.aggregate === "min" && (t.yAxis = f.min), e.aggregate === "avg" && (t.yAxis = f.avg)), t.type = e.aggregate), t;
|
|
131
133
|
})
|
|
132
134
|
},
|
|
133
|
-
color:
|
|
135
|
+
color: (() => {
|
|
136
|
+
let e = p.find((e) => e.title === t.name);
|
|
137
|
+
return e ? e.color : "";
|
|
138
|
+
})(),
|
|
134
139
|
label: {
|
|
135
140
|
show: n.options.chart_label.enable,
|
|
136
141
|
distance: 5,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../vendors/echarts.js";
|
|
2
|
-
import "./AutoGridEChart-
|
|
3
|
-
import { t as e } from "./BubbleChart-
|
|
2
|
+
import "./AutoGridEChart-CUNnImhh.js";
|
|
3
|
+
import { t as e } from "./BubbleChart-zh6fCv3l.js";
|
|
4
4
|
//#region src/components/BubbleChart/index.ts
|
|
5
5
|
var t = e;
|
|
6
6
|
//#endregion
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { t as e } from "./configContext-kYu9qTM2.js";
|
|
2
|
+
import { r as t } from "../vendors/services/apiService.js";
|
|
3
|
+
import { useEffect as n } from "react";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
import { useConfig as i } from "@baishuyun/ui-base/ConfigProvider";
|
|
6
|
+
//#region src/components/ConfigProvider/ConfigProvider.tsx
|
|
7
|
+
var a = (e) => e === "zh-CN" || e === "zh-TW" || e === "en-US", o = (o) => {
|
|
8
|
+
let s = i(), { locale: c, axiosInstance: l, responseAdapter: u, preFetchedNodes: d } = o, f = c ?? (a(s.locale) ? s.locale : "zh-CN");
|
|
9
|
+
return n(() => {
|
|
10
|
+
l && t({
|
|
11
|
+
axiosInstance: l,
|
|
12
|
+
responseAdapter: u
|
|
13
|
+
});
|
|
14
|
+
}, [l, u]), n(() => {
|
|
15
|
+
d && d.length > 0 && sessionStorage.setItem("preset_bsy_dept_member", JSON.stringify(d));
|
|
16
|
+
}, [d]), /* @__PURE__ */ r(e.Provider, {
|
|
17
|
+
value: {
|
|
18
|
+
locale: f,
|
|
19
|
+
axiosInstance: l,
|
|
20
|
+
responseAdapter: u,
|
|
21
|
+
preFetchedNodes: d
|
|
22
|
+
},
|
|
23
|
+
children: o.children
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { o as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../BubbleChart/AutoGridEChart-
|
|
1
|
+
import { t as e } from "../BubbleChart/AutoGridEChart-CUNnImhh.js";
|
|
2
2
|
import { forwardRef as t, useImperativeHandle as n, useRef as r } from "react";
|
|
3
3
|
import { jsx as i } from "react/jsx-runtime";
|
|
4
4
|
var a = t((t, a) => {
|
|
@@ -28,11 +28,12 @@ var a = t((t, a) => {
|
|
|
28
28
|
min: t.options.xAxis?.min || void 0,
|
|
29
29
|
max: t.options.xAxis?.max || void 0,
|
|
30
30
|
title: t.options.xAxis?.title?.text || "",
|
|
31
|
-
position: t.options.xAxis?.position
|
|
31
|
+
position: t.options.xAxis?.position,
|
|
32
|
+
axisLine: { onZero: t.options.xAxis?.position === "zero" }
|
|
32
33
|
},
|
|
33
34
|
yAxis: {
|
|
34
35
|
axisLabel: {
|
|
35
|
-
color: "#
|
|
36
|
+
color: "#666",
|
|
36
37
|
fontSize: 10,
|
|
37
38
|
show: !0,
|
|
38
39
|
rotate: t.options.yAxis?.label?.rotation?.toString() || "45"
|
|
@@ -40,7 +41,8 @@ var a = t((t, a) => {
|
|
|
40
41
|
min: t.options.yAxis?.min || void 0,
|
|
41
42
|
max: t.options.yAxis?.max || void 0,
|
|
42
43
|
title: t.options.yAxis?.title?.text,
|
|
43
|
-
position: t.options.yAxis?.position
|
|
44
|
+
position: t.options.yAxis?.position,
|
|
45
|
+
axisLine: { onZero: t.options.yAxis?.position === "zero" }
|
|
44
46
|
},
|
|
45
47
|
tooltip: {
|
|
46
48
|
trigger: "item",
|
|
@@ -122,7 +124,10 @@ var a = t((t, a) => {
|
|
|
122
124
|
return e.type === "fixed" && (e.field === t.options.xFields[0].tag && (n.xAxis = e.value || 0), (e.field === t.options.yFields[0].tag || e.field === "") && (n.yAxis = e.value || 0)), e.type === "dynamic" && (e.field === t.options.xFields[0].tag && (e.aggregate === "max" && (n.xAxis = u.max), e.aggregate === "min" && (n.xAxis = u.min), e.aggregate === "avg" && (n.xAxis = u.avg)), e.field === t.options.yFields[0].tag && (e.aggregate === "max" && (n.yAxis = d.max), e.aggregate === "min" && (n.yAxis = d.min), e.aggregate === "avg" && (n.yAxis = d.avg)), n.type = e.aggregate), n;
|
|
123
125
|
})
|
|
124
126
|
},
|
|
125
|
-
color:
|
|
127
|
+
color: (() => {
|
|
128
|
+
let t = f.find((t) => t.title === e.name);
|
|
129
|
+
return t ? t.color : "";
|
|
130
|
+
})(),
|
|
126
131
|
label: {
|
|
127
132
|
show: t.options.chart_label.enable,
|
|
128
133
|
position: "top",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../vendors/echarts.js";
|
|
2
|
-
import "../BubbleChart/AutoGridEChart-
|
|
3
|
-
import { t as e } from "./Scatterplot-
|
|
2
|
+
import "../BubbleChart/AutoGridEChart-CUNnImhh.js";
|
|
3
|
+
import { t as e } from "./Scatterplot-3Dpd_7-a.js";
|
|
4
4
|
//#region src/components/Scatterplot/index.ts
|
|
5
5
|
var t = e;
|
|
6
6
|
//#endregion
|
|
@@ -6,7 +6,7 @@ interface PreFetchedNode {
|
|
|
6
6
|
[key: string]: any;
|
|
7
7
|
}
|
|
8
8
|
type ConfigProps = {
|
|
9
|
-
locale
|
|
9
|
+
locale?: Locale;
|
|
10
10
|
axiosInstance?: AxiosInstance;
|
|
11
11
|
responseAdapter?: ApiServiceProvider['responseAdapter'];
|
|
12
12
|
/**
|
|
@@ -15,4 +15,7 @@ type ConfigProps = {
|
|
|
15
15
|
*/
|
|
16
16
|
preFetchedNodes?: PreFetchedNode[];
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
type ConfigContextValue = Omit<ConfigProps, 'locale'> & {
|
|
19
|
+
locale: Locale;
|
|
20
|
+
};
|
|
21
|
+
export type { ConfigContextValue, ConfigProps, Locale, PreFetchedNode };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const ConfigContext: import('react').Context<
|
|
1
|
+
import { ConfigContextValue } from '../ConfigProvider.type';
|
|
2
|
+
declare const ConfigContext: import('react').Context<ConfigContextValue>;
|
|
3
3
|
export default ConfigContext;
|
package/dist/index.js
CHANGED
|
@@ -13,11 +13,11 @@ import "./DeptsMemberSelector/RelationShipList-CS5uhLos.js";
|
|
|
13
13
|
import "./DeptsMemberSelector/RelationShipDepts-__eb4oDP.js";
|
|
14
14
|
import "./DeptsMemberSelector/Member-BY8mtQb0.js";
|
|
15
15
|
import "./DeptsMemberSelector/Department-6R-BZNZ4.js";
|
|
16
|
-
import { t as s } from "./ConfigProvider/ConfigProvider-
|
|
16
|
+
import { t as s } from "./ConfigProvider/ConfigProvider-CU5Z39Ex.js";
|
|
17
17
|
import { t as c } from "./vendors/echarts.js";
|
|
18
|
-
import "./BubbleChart/AutoGridEChart-
|
|
19
|
-
import { t as l } from "./BubbleChart/BubbleChart-
|
|
20
|
-
import { t as u } from "./Scatterplot/Scatterplot-
|
|
18
|
+
import "./BubbleChart/AutoGridEChart-CUNnImhh.js";
|
|
19
|
+
import { t as l } from "./BubbleChart/BubbleChart-zh6fCv3l.js";
|
|
20
|
+
import { t as u } from "./Scatterplot/Scatterplot-3Dpd_7-a.js";
|
|
21
21
|
import { forwardRef as d, useEffect as f, useImperativeHandle as p, useRef as m } from "react";
|
|
22
22
|
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
23
23
|
//#region src/components/ProgressChart/ProgressChart.module.scss
|
|
@@ -154,7 +154,7 @@ var _ = "_gauge_semicircle_my4si_5", v = {
|
|
|
154
154
|
children: [/* @__PURE__ */ g("span", { children: [t.dataList[0].text, ":"] }), /* @__PURE__ */ h("span", { children: t.dataList[0].sum })]
|
|
155
155
|
}), t.options.chart_label.target.enable && /* @__PURE__ */ g("div", {
|
|
156
156
|
className: e(v["chart-label-target-enable"]),
|
|
157
|
-
children: [/* @__PURE__ */ g("span", { children: [t.dataList[1].text, ":"] }), /* @__PURE__ */ h("span", { children: t.dataList[1].sum
|
|
157
|
+
children: [/* @__PURE__ */ g("span", { children: [t.dataList[1].text, ":"] }), /* @__PURE__ */ h("span", { children: t.dataList[1].sum })]
|
|
158
158
|
})]
|
|
159
159
|
})
|
|
160
160
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baishuyun/ui-business",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2",
|
|
4
4
|
"description": "百数云业务组件库",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"author": "BSY Team",
|
|
44
44
|
"license": "MIT",
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@baishuyun/ui-base": ">=6.
|
|
46
|
+
"@baishuyun/ui-base": ">=6.1.0",
|
|
47
47
|
"ahooks": ">=3.7.0",
|
|
48
48
|
"antd": ">=6.0.0 <7.0.0",
|
|
49
49
|
"immer": "^10.0.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"sass": "^1.90.0",
|
|
68
68
|
"vite": "^8.0.0",
|
|
69
69
|
"vite-plugin-dts": "^4.5.4",
|
|
70
|
-
"@baishuyun/ui-base": "6.
|
|
70
|
+
"@baishuyun/ui-base": "6.1.0"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"autoprefixer": "^10.4.21",
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./configContext-kYu9qTM2.js";
|
|
2
|
-
import { r as t } from "../vendors/services/apiService.js";
|
|
3
|
-
import { useEffect as n } from "react";
|
|
4
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
-
//#region src/components/ConfigProvider/ConfigProvider.tsx
|
|
6
|
-
var i = (i) => {
|
|
7
|
-
let { locale: a, axiosInstance: o, responseAdapter: s, preFetchedNodes: c } = i;
|
|
8
|
-
return n(() => {
|
|
9
|
-
o && t({
|
|
10
|
-
axiosInstance: o,
|
|
11
|
-
responseAdapter: s
|
|
12
|
-
});
|
|
13
|
-
}, [o, s]), n(() => {
|
|
14
|
-
c && c.length > 0 && sessionStorage.setItem("preset_bsy_dept_member", JSON.stringify(c));
|
|
15
|
-
}, [c]), /* @__PURE__ */ r(e.Provider, {
|
|
16
|
-
value: {
|
|
17
|
-
locale: a,
|
|
18
|
-
axiosInstance: o,
|
|
19
|
-
responseAdapter: s,
|
|
20
|
-
preFetchedNodes: c
|
|
21
|
-
},
|
|
22
|
-
children: i.children
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
//#endregion
|
|
26
|
-
export { i as t };
|