@baishuyun/ui-business 5.2.3 → 6.0.1

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.
@@ -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,5 +1,5 @@
1
1
  import "./configContext-kYu9qTM2.js";
2
- import { t as e } from "./ConfigProvider-Cwc-Gz9h.js";
2
+ import { t as e } from "./ConfigProvider-CU5Z39Ex.js";
3
3
  //#region src/components/ConfigProvider/index.ts
4
4
  var t = e;
5
5
  //#endregion
@@ -6,7 +6,7 @@ interface PreFetchedNode {
6
6
  [key: string]: any;
7
7
  }
8
8
  type ConfigProps = {
9
- locale: 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
- export type { ConfigProps, Locale, PreFetchedNode };
18
+ type ConfigContextValue = Omit<ConfigProps, 'locale'> & {
19
+ locale: Locale;
20
+ };
21
+ export type { ConfigContextValue, ConfigProps, Locale, PreFetchedNode };
@@ -1,3 +1,3 @@
1
- import { ConfigProps } from '../ConfigProvider.type';
2
- declare const ConfigContext: import('react').Context<ConfigProps>;
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,7 +13,7 @@ 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-Cwc-Gz9h.js";
16
+ import { t as s } from "./ConfigProvider/ConfigProvider-CU5Z39Ex.js";
17
17
  import { t as c } from "./vendors/echarts.js";
18
18
  import "./BubbleChart/AutoGridEChart-BQsZw7nv.js";
19
19
  import { t as l } from "./BubbleChart/BubbleChart-BN3msB5e.js";
@@ -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 + t.dataList[0].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": "5.2.3",
3
+ "version": "6.0.1",
4
4
  "description": "百数云业务组件库",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -43,22 +43,22 @@
43
43
  "author": "BSY Team",
44
44
  "license": "MIT",
45
45
  "peerDependencies": {
46
- "@baishuyun/ui-base": ">=2.4.1",
46
+ "@baishuyun/ui-base": ">=6.1.0",
47
47
  "ahooks": ">=3.7.0",
48
- "antd": ">=5.1.2",
48
+ "antd": ">=6.0.0 <7.0.0",
49
49
  "immer": "^10.0.0",
50
50
  "motion": "^11.18.2",
51
51
  "react": ">=18.3.1",
52
52
  "react-dom": ">=18.3.1"
53
53
  },
54
54
  "devDependencies": {
55
- "@ant-design/icons": "^6.0.0",
55
+ "@ant-design/icons": "^6.2.3",
56
56
  "@types/lodash-es": "^4.17.12",
57
57
  "@types/react": "^18.3.1",
58
58
  "@types/react-dom": "^18.3.0",
59
59
  "@vitejs/plugin-react": "^6.0.0",
60
60
  "ahooks": "^3.9.3",
61
- "antd": "^5.27.0",
61
+ "antd": "^6.4.2",
62
62
  "glob": "^11.0.3",
63
63
  "immer": "^10.1.1",
64
64
  "motion": "^11.18.2",
@@ -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": "3.0.2"
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 };