@baishuyun/ui-business 5.1.5 → 5.1.7
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-B2a7zGgi.js → AutoGridEChart-nA3DwlqB.js} +27 -25
- package/dist/BubbleChart/{BubbleChart-BPIsaE-C.js → BubbleChart-Bq-qzSTk.js} +3 -2
- package/dist/BubbleChart/index.js +2 -2
- package/dist/DeptsMemberSelector/{Department-12ftZfXD.js → Department-H6zGUr4c.js} +5 -5
- package/dist/DeptsMemberSelector/{DeptsMemberSelector-BXWGwgUq.js → DeptsMemberSelector-DjDAPVIj.js} +236 -236
- package/dist/DeptsMemberSelector/{DeptsUser-C8hYQ6z-.js → DeptsUser-Coh1rKPm.js} +3 -3
- package/dist/DeptsMemberSelector/{ExtraConcactPanel-BDNrz5rV.js → ExtraConcactPanel-CWKwVmbx.js} +216 -216
- package/dist/DeptsMemberSelector/{Member-B4tEHksu.js → Member-Ds_Qzw0L.js} +25 -22
- package/dist/DeptsMemberSelector/OrganizationPanel-CT3v_KVr.js +374 -0
- package/dist/DeptsMemberSelector/{TabGroup-Ds7bTbKL.js → TabGroup-Dht9ylk4.js} +13 -13
- package/dist/DeptsMemberSelector/index.js +7 -7
- package/dist/DeptsMemberSelector/subcomponents/Entity/Department/index.js +3 -3
- package/dist/DeptsMemberSelector/subcomponents/Entity/DeptsUser/index.js +4 -4
- package/dist/DeptsMemberSelector/subcomponents/Entity/Member/index.js +3 -3
- package/dist/Scatterplot/{Scatterplot-C1XSsAKR.js → Scatterplot-COVrzURp.js} +3 -2
- package/dist/Scatterplot/index.js +2 -2
- package/dist/components/BubbleChart/BubbleChart.type.d.ts +1 -0
- package/dist/components/DeptsMemberSelector/utils/departmentStatus.d.ts +3 -0
- package/dist/components/Scatterplot/Scatterplot.type.d.ts +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +10 -10
- package/dist/lang/en-US.json.d.ts +1 -0
- package/dist/lang/zh-CN.json.d.ts +1 -0
- package/dist/vendors/useLocale.js +2 -0
- package/package.json +3 -3
- package/dist/DeptsMemberSelector/OrganizationPanel-DoM4UNxv.js +0 -374
|
@@ -19,9 +19,10 @@ function l(e, t, n, r, i) {
|
|
|
19
19
|
return t && t.trim() || e.textFont || e.font;
|
|
20
20
|
}
|
|
21
21
|
function f(e, t) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
let n = { ...t };
|
|
23
|
+
n.fontSize = parseInt(n.fontSize), n.fontFamily = n.fontFamily || "verdana";
|
|
24
|
+
let r = d(n), i = document.createElement("canvas").getContext("2d") || {};
|
|
25
|
+
return i.font = r, i?.measureText(e)?.width || 0;
|
|
25
26
|
}
|
|
26
27
|
function p(e, t) {
|
|
27
28
|
if (Array.isArray(e)) for (let n = 0, r = e.length; n < r && t.apply(e[n], [n, e[n]]) !== !1; n++);
|
|
@@ -74,52 +75,53 @@ function l(e, t, n, r, i) {
|
|
|
74
75
|
return n > 10 ? e = 20 : n > 5 && (e = 10), e;
|
|
75
76
|
}
|
|
76
77
|
if (e.legend.type === "scroll") return s + 10 + m() + h() + g();
|
|
78
|
+
let _ = e.legend.itemWidth || 25, v = e.legend.itemGap ?? 10;
|
|
77
79
|
p(t, (e, t) => {
|
|
78
80
|
let i = f(t, r || {
|
|
79
81
|
fontFamily: "verdana",
|
|
80
82
|
fontSize: 10,
|
|
81
83
|
fontStyle: "normal",
|
|
82
84
|
fontWeight: "normal"
|
|
83
|
-
});
|
|
84
|
-
o
|
|
85
|
+
}) + v + _ + 5;
|
|
86
|
+
o > 0 && o + i > n ? (a++, o = i) : o += i;
|
|
85
87
|
});
|
|
86
|
-
function
|
|
87
|
-
let
|
|
88
|
-
if (!
|
|
89
|
-
let
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
};
|
|
93
|
-
if (
|
|
94
|
-
let n = Math.max(...
|
|
95
|
-
return Math.ceil(
|
|
88
|
+
function y(e, t, n, i) {
|
|
89
|
+
let a = i.legend;
|
|
90
|
+
if (!a.show) return 0;
|
|
91
|
+
let o = n.itemHeight || 25, s = n.itemGap ?? 10, c = a.itemWidth || 25, l = e.map((e) => e.name || e), u = n.textStyle || r || {
|
|
92
|
+
fontSize: 12,
|
|
93
|
+
fontFamily: "verdana"
|
|
94
|
+
}, d = (e) => f(e, u);
|
|
95
|
+
if (i.legend.left === "left" || i.legend.right === "right") {
|
|
96
|
+
let n = Math.max(0, ...l.map((e) => d(e))), r = c + 5 + n;
|
|
97
|
+
return Math.ceil(o * e.length / t) * (r + s) + 20;
|
|
96
98
|
}
|
|
97
99
|
return 0;
|
|
98
100
|
}
|
|
99
|
-
let
|
|
101
|
+
let b = y(u, i, e.legend, e), x = e.legend.itemHeight || 25, S = e.legend.itemGap ?? 10, C = typeof e.legend.padding == "number" ? e.legend.padding : Array.isArray(e.legend.padding) ? e.legend.padding[0] ?? 5 : 5, w = (a + 1) * x + a * S + C * 2, T = m(), E = h(), D = -5, O = -5, k = -5, A = -5;
|
|
100
102
|
return {
|
|
101
103
|
grid: {
|
|
102
104
|
top: (() => {
|
|
103
105
|
let t = 20;
|
|
104
|
-
return e.xAxis.position === "top" && (t +=
|
|
106
|
+
return e.xAxis.position === "top" && (t += T + 10), e.legend.show && (e.legend.top === "top" || e.legend.top === "") && (O += w, t += w), e.xAxis.title !== "" && e.xAxis.position === "top" && (t += 30), t;
|
|
105
107
|
})(),
|
|
106
108
|
bottom: (() => {
|
|
107
109
|
let t = 20;
|
|
108
|
-
return e.xAxis.position === "bottom" && (t +=
|
|
110
|
+
return e.xAxis.position === "bottom" && (t += T + 10), e.legend.show && e.legend.top === "bottom" && (D += w, t += w), e.xAxis.title !== "" && e.xAxis.position === "bottom" && (t += 30), t;
|
|
109
111
|
})(),
|
|
110
112
|
left: (() => {
|
|
111
113
|
let t = 20;
|
|
112
|
-
return e.yAxis.position === "left" && (t +=
|
|
114
|
+
return e.yAxis.position === "left" && (t += E), e.legend.show && e.legend.left === "left" && (k += b, t += b), e.yAxis.title !== "" && e.yAxis.position === "left" && (t += 10), t;
|
|
113
115
|
})(),
|
|
114
116
|
right: (() => {
|
|
115
|
-
let t = 20
|
|
116
|
-
return e.yAxis.position === "right" && (t += 10), e.legend.show && e.legend.left === "right" && (
|
|
117
|
+
let t = 20;
|
|
118
|
+
return e.yAxis.position === "right" && (t += E + 10), e.legend.show && e.legend.left === "right" && (A += b, t += b), e.yAxis.title !== "" && e.yAxis.position === "right" && (t += 30), t;
|
|
117
119
|
})()
|
|
118
120
|
},
|
|
119
|
-
titleBottomHeight:
|
|
120
|
-
titleTopHeight:
|
|
121
|
-
titleLeftHeight:
|
|
122
|
-
titleRightHeight:
|
|
121
|
+
titleBottomHeight: D,
|
|
122
|
+
titleTopHeight: O,
|
|
123
|
+
titleLeftHeight: k,
|
|
124
|
+
titleRightHeight: A
|
|
123
125
|
};
|
|
124
126
|
}
|
|
125
127
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as e } from "../vendors/echarts.js";
|
|
2
|
-
import { t } from "./AutoGridEChart-
|
|
2
|
+
import { t } from "./AutoGridEChart-nA3DwlqB.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) => {
|
|
@@ -80,6 +80,7 @@ var o = n((n, o) => {
|
|
|
80
80
|
padding: 10,
|
|
81
81
|
itemWidth: 12,
|
|
82
82
|
itemHeight: 14,
|
|
83
|
+
type: n.options.legend.type || "plain",
|
|
83
84
|
textStyle: { fontStyle: "normal" }
|
|
84
85
|
},
|
|
85
86
|
graphic: n.options.guideline?.map((e) => ({
|
|
@@ -125,7 +126,7 @@ var o = n((n, o) => {
|
|
|
125
126
|
distance: 5
|
|
126
127
|
}
|
|
127
128
|
};
|
|
128
|
-
return e.type === "fixed" && (e.field === n.options.xFields[0].tag && (t.xAxis = e.value || 0), e.field === n.options.yFields[0].tag && (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;
|
|
129
|
+
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;
|
|
129
130
|
})
|
|
130
131
|
},
|
|
131
132
|
color: p.find((e) => e.title === t.name) ? p.find((e) => e.title === t.name).color : "",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../vendors/echarts.js";
|
|
2
|
-
import "./AutoGridEChart-
|
|
3
|
-
import { t as e } from "./BubbleChart-
|
|
2
|
+
import "./AutoGridEChart-nA3DwlqB.js";
|
|
3
|
+
import { t as e } from "./BubbleChart-Bq-qzSTk.js";
|
|
4
4
|
//#region src/components/BubbleChart/index.ts
|
|
5
5
|
var t = e;
|
|
6
6
|
//#endregion
|
|
@@ -2,9 +2,9 @@ import { t as e } from "../vendors/simplebar-react.js";
|
|
|
2
2
|
import { t } from "../vendors/clsx.js";
|
|
3
3
|
import { r as n, t as r } from "./useDeptsMemberSelector-t7b8yu-A.js";
|
|
4
4
|
import { h as i } from "./services/contact/selector.service-CY5vQea8.js";
|
|
5
|
-
import {
|
|
5
|
+
import { a, i as o } from "./TabGroup-Dht9ylk4.js";
|
|
6
6
|
import { t as s } from "../vendors/useLocale.js";
|
|
7
|
-
import { t as c } from "./OrganizationPanel-
|
|
7
|
+
import { t as c } from "./OrganizationPanel-CT3v_KVr.js";
|
|
8
8
|
import { useMemo as l, useState as u } from "react";
|
|
9
9
|
import { Radio as d, Spin as f } from "antd";
|
|
10
10
|
import { Checkbox as p } from "@baishuyun/ui-base";
|
|
@@ -23,7 +23,7 @@ var v = {
|
|
|
23
23
|
"group-list__group": "_group-list__group_1ncb5_38",
|
|
24
24
|
"group-list": "_group-list_1ncb5_1"
|
|
25
25
|
}, y = (e) => e?._id ?? e?.id, b = (e) => e !== void 0, x = (e) => {
|
|
26
|
-
let { list: n } = e, { value: i, type: s, dispatch: c } = r(), l = s ===
|
|
26
|
+
let { list: n } = e, { value: i, type: s, dispatch: c } = r(), l = s === a.DEPARMENT, u = s === a.DEPARMENT_GROUP, f = y(i?.[0]), m = (t) => {
|
|
27
27
|
let r = n?.find((e) => y(e) === t.target.value);
|
|
28
28
|
r && c({
|
|
29
29
|
type: "insertOnly",
|
|
@@ -55,7 +55,7 @@ var v = {
|
|
|
55
55
|
},
|
|
56
56
|
children: /* @__PURE__ */ _("div", {
|
|
57
57
|
className: v["group-list__row"],
|
|
58
|
-
children: [e.showDepartmentIcon && /* @__PURE__ */ g(
|
|
58
|
+
children: [e.showDepartmentIcon && /* @__PURE__ */ g(o, {
|
|
59
59
|
type: "department",
|
|
60
60
|
size: 16
|
|
61
61
|
}), /* @__PURE__ */ g("span", {
|
|
@@ -95,7 +95,7 @@ var v = {
|
|
|
95
95
|
className: v["group-list__checkbox"],
|
|
96
96
|
children: /* @__PURE__ */ _("div", {
|
|
97
97
|
className: v["group-list__checkbox-row"],
|
|
98
|
-
children: [e.showDepartmentIcon && /* @__PURE__ */ g(
|
|
98
|
+
children: [e.showDepartmentIcon && /* @__PURE__ */ g(o, {
|
|
99
99
|
type: "department",
|
|
100
100
|
size: 16
|
|
101
101
|
}), /* @__PURE__ */ g("span", {
|