@baishuyun/ui-business 3.0.3 → 3.0.4

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.
@@ -1,4 +1,4 @@
1
- import { jsx as e, jsxs as d, Fragment as S } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as u, Fragment as S } from "react/jsx-runtime";
2
2
  import { O as M } from "../../../OrganizationPanel-DcwvZ6X4.js";
3
3
  import { useRequest as k } from "ahooks";
4
4
  import { d as R } from "../../../../vendors/services/data/member.service.js";
@@ -10,7 +10,7 @@ import { S as C } from "../../../../vendors/simplebar-react.js";
10
10
  import { g as O } from "../../../../vendors/services/corp/outsider.service.js";
11
11
  import { useState as G, useMemo as j } from "react";
12
12
  const _ = (a) => {
13
- const { list: n } = a, { value: o, type: r, dispatch: s } = y(), h = r === v.DEPARMENT, m = r === v.DEPARMENT_GROUP, u = o?.[0]?._id, c = (t) => {
13
+ const { list: n } = a, { value: o, type: r, dispatch: s } = y(), h = r === v.DEPARMENT, d = r === v.DEPARMENT_GROUP, m = o?.[0]?._id, c = (t) => {
14
14
  const p = n?.find((f) => f._id === t.target.value);
15
15
  p && s({
16
16
  type: "insertOnly",
@@ -35,8 +35,8 @@ const _ = (a) => {
35
35
  }
36
36
  });
37
37
  };
38
- return /* @__PURE__ */ e("div", { className: "entity-group-list", children: /* @__PURE__ */ d("ul", { className: "font-0", children: [
39
- h && /* @__PURE__ */ e(b.Group, { value: u, onChange: c, className: "w-full", children: n.map((t) => /* @__PURE__ */ e(
38
+ return /* @__PURE__ */ e("div", { className: "entity-group-list", children: /* @__PURE__ */ u("ul", { className: "font-0", children: [
39
+ h && /* @__PURE__ */ e(b.Group, { value: m, onChange: c, className: "w-full", children: n.map((t) => /* @__PURE__ */ e(
40
40
  "li",
41
41
  {
42
42
  className: x("rounded-[4px] cursor-pointer font-0", {
@@ -56,7 +56,7 @@ const _ = (a) => {
56
56
  },
57
57
  t._id
58
58
  )) }),
59
- m && /* @__PURE__ */ e(S, { children: /* @__PURE__ */ e(N.Group, { value: I, onChange: D, children: n.map((t) => /* @__PURE__ */ e(
59
+ d && /* @__PURE__ */ e(S, { children: /* @__PURE__ */ e(N.Group, { value: I, onChange: D, children: n.map((t) => /* @__PURE__ */ e(
60
60
  "li",
61
61
  {
62
62
  className: x("rounded-[4px] cursor-pointer font-0 px-[10px]", {
@@ -73,7 +73,7 @@ const _ = (a) => {
73
73
  departmentLimit: []
74
74
  })
75
75
  ), s = o?.departmentList || [];
76
- return /* @__PURE__ */ e("div", { className: "p-1 external-contact-entit relative", children: /* @__PURE__ */ e(E, { spinning: r, tip: n("common.loading"), children: /* @__PURE__ */ d(C, { style: { height: a - 8 }, children: [
76
+ return /* @__PURE__ */ e("div", { className: "p-1 external-contact-entit relative", children: /* @__PURE__ */ e(E, { spinning: r, tip: n("common.loading"), children: /* @__PURE__ */ u(C, { style: { height: a - 8 }, children: [
77
77
  /* @__PURE__ */ e(_, { list: s }),
78
78
  s.length === 0 && !r && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e("span", { className: "text-[#999]", children: n("department.noAvailable") }) })
79
79
  ] }) }) });
@@ -81,8 +81,8 @@ const _ = (a) => {
81
81
  const { containerHeight: a } = y(), { t: n } = g(), [o] = G([
82
82
  { key: "default", label: n("externalContact.defaultGroup") },
83
83
  { key: "custom", label: n("externalContact.customGroup") }
84
- ]), [r, s] = G("default"), { data: h, loading: m } = k(() => O()), u = h?.list || [], c = r === "default" ? u.filter((l) => l.type === "1") : u.filter((l) => l.type !== "1");
85
- return /* @__PURE__ */ d("div", { className: "external-contact-entity relative flex", children: [
84
+ ]), [r, s] = G("default"), { data: h, loading: d } = k(() => O()), m = h?.list || [], c = r === "default" ? m.filter((l) => l.type === "1") : m.filter((l) => l.type !== "1");
85
+ return /* @__PURE__ */ u("div", { className: "external-contact-entity relative flex", children: [
86
86
  /* @__PURE__ */ e("aside", { className: "basis-[192px] p-1", children: /* @__PURE__ */ e("ul", { className: "flex flex-col", children: o.map((l) => /* @__PURE__ */ e(
87
87
  "li",
88
88
  {
@@ -97,13 +97,10 @@ const _ = (a) => {
97
97
  },
98
98
  l.key
99
99
  )) }) }),
100
- /* @__PURE__ */ d("div", { className: "flex-1 border-l border-[#E0E0E0]", children: [
101
- "312",
102
- /* @__PURE__ */ e(E, { spinning: m, tip: n("common.loading"), children: /* @__PURE__ */ d(C, { style: { height: a - 8, padding: "4px" }, children: [
103
- c.length > 0 && /* @__PURE__ */ e(_, { list: c, type: "group" }),
104
- c.length === 0 && !m && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e("span", { className: "text-[#999]", children: n("externalContact.noAvailableGroup") }) })
105
- ] }) })
106
- ] })
100
+ /* @__PURE__ */ e("div", { className: "flex-1 border-l border-[#E0E0E0]", children: /* @__PURE__ */ e(E, { spinning: d, tip: n("common.loading"), children: /* @__PURE__ */ u(C, { style: { height: a - 8, padding: "4px" }, children: [
101
+ c.length > 0 && /* @__PURE__ */ e(_, { list: c, type: "group" }),
102
+ c.length === 0 && !d && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e("span", { className: "text-[#999]", children: n("externalContact.noAvailableGroup") }) })
103
+ ] }) }) })
107
104
  ] });
108
105
  }, Q = () => {
109
106
  const { t: a } = g();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baishuyun/ui-business",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "description": "百数云业务组件库",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",