@unicom-cloud/ui 0.8.99 → 0.8.100

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.
Files changed (136) hide show
  1. package/Anchor.js +3 -1
  2. package/Badge.js +7 -6
  3. package/Copy.js +49 -2
  4. package/Flex.js +12 -0
  5. package/Grid.js +1 -1
  6. package/LiquidFill.js +3 -2
  7. package/Marquee.js +3 -2
  8. package/QrCode.js +3 -2
  9. package/Splitter.js +4 -5
  10. package/Tag.js +3 -2
  11. package/Tour.js +3 -2
  12. package/alert/index.js +38 -39
  13. package/anchor/index.js +5 -3
  14. package/badge/index.js +19 -18
  15. package/copy/index.js +83 -35
  16. package/flex/index.js +59 -0
  17. package/flex/interface.js +34 -0
  18. package/flex/utils.js +13 -0
  19. package/grid/{GridItem.js → Item.js} +15 -15
  20. package/grid/index.js +1 -1
  21. package/index.js +503 -493
  22. package/input/Button.js +39 -34
  23. package/input/Textarea.js +108 -104
  24. package/liquid-fill/index.js +3 -2
  25. package/marquee/index.js +3 -2
  26. package/package.json +1 -1
  27. package/qr-code/index.js +3 -2
  28. package/segmented/index.js +112 -104
  29. package/spin/index.js +75 -62
  30. package/splitter/Panel.js +39 -0
  31. package/splitter/SplitBar.js +157 -0
  32. package/splitter/Splitter.js +139 -0
  33. package/splitter/hooks/useEvent.js +12 -0
  34. package/splitter/hooks/useItems.js +26 -0
  35. package/splitter/hooks/useResizable.js +26 -0
  36. package/splitter/hooks/useResize.js +68 -0
  37. package/splitter/hooks/useSizes.js +60 -0
  38. package/splitter/index.js +5 -115
  39. package/style.css +1 -1
  40. package/table/Table.js +1 -1
  41. package/table/hook/useThResizable.js +72 -26
  42. package/table/tbody/Td.js +80 -77
  43. package/table/th-resizable/index.js +92 -35
  44. package/tag/index.js +42 -41
  45. package/tooltip/index.js +89 -82
  46. package/tour/index.js +5 -6
  47. package/types/common/space/index.d.ts +2 -1
  48. package/types/pc/affix/interface.d.ts +0 -2
  49. package/types/pc/alert/index.d.ts +2 -2
  50. package/types/pc/anchor/index.d.ts +2 -1
  51. package/types/pc/anchor/interface.d.ts +0 -2
  52. package/types/pc/auto-complete/interface.d.ts +0 -6
  53. package/types/pc/avatar/interface.d.ts +0 -4
  54. package/types/pc/breadcrumb/interface.d.ts +0 -3
  55. package/types/pc/carousel/interface.d.ts +2 -6
  56. package/types/pc/cascader/interface.d.ts +6 -18
  57. package/types/pc/checkbox/interface.d.ts +0 -1
  58. package/types/pc/collapse/interface.d.ts +0 -2
  59. package/types/pc/color-picker/interface.d.ts +0 -2
  60. package/types/pc/config-provider/interface.d.ts +13 -17
  61. package/types/pc/copy/interface.d.ts +2 -1
  62. package/types/pc/date-picker/interface.d.ts +0 -17
  63. package/types/pc/descriptions/interface.d.ts +0 -1
  64. package/types/pc/drawer/interface.d.ts +0 -7
  65. package/types/pc/dropdown/interface.d.ts +0 -1
  66. package/types/pc/flex/index.d.ts +9 -0
  67. package/types/pc/flex/interface.d.ts +61 -0
  68. package/types/pc/flex/utils.d.ts +9 -0
  69. package/types/pc/form/interface.d.ts +9 -22
  70. package/types/pc/form/util.d.ts +1 -1
  71. package/types/pc/grid/index.d.ts +3 -3
  72. package/types/pc/grid/interface.d.ts +1 -6
  73. package/types/pc/image/interface.d.ts +0 -13
  74. package/types/pc/index.d.ts +6 -2
  75. package/types/pc/input/Textarea.d.ts +2 -6
  76. package/types/pc/input/interface.d.ts +5 -13
  77. package/types/pc/input-number/interface.d.ts +0 -4
  78. package/types/pc/input-tag/interface.d.ts +0 -13
  79. package/types/pc/layout/interface.d.ts +0 -1
  80. package/types/pc/link/interface.d.ts +0 -1
  81. package/types/pc/list/interface.d.ts +0 -4
  82. package/types/pc/menu/interface.d.ts +0 -8
  83. package/types/pc/message/interface.d.ts +0 -2
  84. package/types/pc/modal/interface.d.ts +0 -5
  85. package/types/pc/notification/interface.d.ts +0 -1
  86. package/types/pc/pagination/interface.d.ts +0 -2
  87. package/types/pc/popconfirm/interface.d.ts +8 -10
  88. package/types/pc/popover/interface.d.ts +0 -1
  89. package/types/pc/progress/interface.d.ts +0 -3
  90. package/types/pc/resize-box/interface.d.ts +1 -7
  91. package/types/pc/select/interface.d.ts +0 -12
  92. package/types/pc/select-view/interface.d.ts +0 -7
  93. package/types/pc/slider/interface.d.ts +0 -4
  94. package/types/pc/space/index.d.ts +1 -0
  95. package/types/pc/spin/interface.d.ts +4 -1
  96. package/types/pc/splitter/Panel.d.ts +8 -0
  97. package/types/pc/splitter/SplitBar.d.ts +21 -0
  98. package/types/pc/splitter/Splitter.d.ts +4 -0
  99. package/types/pc/splitter/hooks/useEvent.d.ts +3 -0
  100. package/types/pc/splitter/hooks/useItems.d.ts +10 -0
  101. package/types/pc/splitter/hooks/useResizable.d.ts +8 -0
  102. package/types/pc/splitter/hooks/useResize.d.ts +4 -0
  103. package/types/pc/splitter/hooks/useSizes.d.ts +5 -0
  104. package/types/pc/splitter/index.d.ts +8 -4
  105. package/types/pc/splitter/interface.d.ts +181 -38
  106. package/types/pc/statistic/interface.d.ts +0 -4
  107. package/types/pc/steps/interface.d.ts +0 -3
  108. package/types/pc/table/hook/useThResizable.d.ts +2 -2
  109. package/types/pc/table/interface.d.ts +4 -15
  110. package/types/pc/tabs/interface.d.ts +0 -7
  111. package/types/pc/tag/index.d.ts +2 -0
  112. package/types/pc/tag/interface.d.ts +0 -1
  113. package/types/pc/time-picker/interface.d.ts +0 -7
  114. package/types/pc/tooltip/interface.d.ts +4 -1
  115. package/types/pc/transfer/interface.d.ts +2 -9
  116. package/types/pc/tree/interface.d.ts +2 -8
  117. package/types/pc/tree-select/interface.d.ts +0 -8
  118. package/types/pc/trigger/interface.d.ts +0 -5
  119. package/types/pc/typography/EditContent.d.ts +2 -1
  120. package/types/pc/typography/interface.d.ts +45 -30
  121. package/types/pc/upload/interface.d.ts +6 -11
  122. package/types/pc/utils/index.d.ts +1 -0
  123. package/types/pc/utils/names.d.ts +6 -0
  124. package/types/pc/utils/toArray.d.ts +7 -0
  125. package/types/pc/verification-code/interface.d.ts +0 -2
  126. package/types/pc/watermark/interface.d.ts +0 -2
  127. package/typography/Base.js +73 -73
  128. package/typography/EditContent.js +43 -33
  129. package/typography/Ellipsis.js +117 -184
  130. package/typography/Operations.js +97 -49
  131. package/typography/useCssEllipsis.js +7 -6
  132. package/utils/index.js +117 -115
  133. package/utils/names.js +4 -0
  134. package/utils/toArray.js +12 -0
  135. package/version/index.js +1 -1
  136. /package/types/pc/grid/{GridItem.d.ts → Item.d.ts} +0 -0
package/table/Table.js CHANGED
@@ -87,7 +87,7 @@ function ko(ce, st) {
87
87
  } = b, ze = ne(
88
88
  () => vo(m, H),
89
89
  [m, H]
90
- ), n = it?.("table"), ue = b.size || (["default", "middle", "small"].indexOf(Ne) > -1 ? Ne : "default"), D = w(null), u = w(null), pe = w(null), g = w(null), E = w(null), me = w(null), K = w(null), j = w(0), ge = w(!1), [Re, f] = bo(b), { currentFilters: Ct, defaultSorters: xt } = zt(), [O, ye] = V(1), [St, wt] = V(
90
+ ), n = it?.("table"), ue = b.size || (["default", "middle", "small", "mini"].indexOf(Ne) > -1 ? Ne : "default"), D = w(null), u = w(null), pe = w(null), g = w(null), E = w(null), me = w(null), K = w(null), j = w(0), ge = w(!1), [Re, f] = bo(b), { currentFilters: Ct, defaultSorters: xt } = zt(), [O, ye] = V(1), [St, wt] = V(
91
91
  N.pageSize || N.defaultPageSize || 10
92
92
  ), [He, ke] = V(Ct), [Pt, Tt] = V(0), [$t, Ft] = V([]), he = To(f), [Nt, Ee] = Po(
93
93
  Re,
@@ -1,39 +1,85 @@
1
- import { useState as h, useEffect as p } from "react";
1
+ import { useState as b, useEffect as a } from "react";
2
+ import "@unicom-cloud/utils/case-name";
3
+ import "@unicom-cloud/utils/class-name";
4
+ import "../../dist/tinycolor/chunk/BOzCVdr0.js";
5
+ import "@unicom-cloud/utils/constant/ui";
6
+ import "../../utils/contextHolder.js";
7
+ import "@unicom-cloud/utils/dayjs";
8
+ import "@unicom-cloud/utils/clipboard-copy";
9
+ import "../../components/common/utils/dayjs.js";
10
+ import "../../components/common/utils/dom.js";
11
+ import "@unicom-cloud/utils/file/fileToURL";
12
+ import "react/jsx-runtime";
13
+ import "lodash/escapeRegExp";
14
+ import "lodash/isArray";
15
+ import "lodash/isNumber";
16
+ import "lodash/isString";
17
+ import "lodash/isFunction";
18
+ import "lodash/throttle";
2
19
  import "../../components/common/utils/is.js";
3
- import x from "../th-resizable/index.js";
4
- import { isArray as b } from "@unicom-cloud/utils/is";
5
- function g(a = {}) {
6
- function c(e, n) {
20
+ import "lodash/camelCase";
21
+ import "lodash/capitalize";
22
+ import "lodash/cloneDeep";
23
+ import "lodash/debounce";
24
+ import "lodash/get";
25
+ import "lodash/has";
26
+ import "lodash/kebabCase";
27
+ import "lodash/merge";
28
+ import "lodash/mergeWith";
29
+ import "lodash/set";
30
+ import "lodash/setWith";
31
+ import "lodash/snakeCase";
32
+ import "lodash/startCase";
33
+ import "lodash/uniq";
34
+ import "lodash/upperFirst";
35
+ import "@unicom-cloud/utils/math";
36
+ import "lodash/isPlainObject";
37
+ import "../../dist/react-transition-group/src/CSSTransition.js";
38
+ import "../../dist/react-transition-group/src/ReplaceTransition.js";
39
+ import "../../dist/react-transition-group/src/SwitchTransition.js";
40
+ import "../../dist/react-transition-group/chunk/CPfP7aNL.js";
41
+ import "../../dist/react-transition-group/src/TransitionGroup.js";
42
+ import "../../components/common/utils/reactDOM.js";
43
+ import "@unicom-cloud/utils/file/saveAs";
44
+ import "@unicom-cloud/utils/screenfull";
45
+ import "@unicom-cloud/utils/constant/ui.js";
46
+ import "react-is";
47
+ import "@unicom-cloud/utils/tree";
48
+ import { isArray as C } from "@unicom-cloud/utils/is";
49
+ import "uuid";
50
+ import "../../dist/validate/src/index.js";
51
+ import "@unicom-cloud/utils/constant/keyboardCode";
52
+ import z from "../th-resizable/index.js";
53
+ function Rt(f = {}, c = []) {
54
+ const { columns: u } = f ?? {}, [d, m] = b(o(u));
55
+ function h(t, i) {
7
56
  return {
8
- column: e,
9
- onResize(o) {
10
- const { column: t = {}, width: d } = o ?? {};
11
- s((i) => {
12
- const f = i.find((u, C, z) => u === t || u.dataIndex === t.dataIndex && u.title == t.title);
13
- return f ? (f.width = d ?? t.width, r(i)) : i;
57
+ column: t,
58
+ onResize(p) {
59
+ const { column: r = {}, width: x } = p ?? {};
60
+ m((e) => {
61
+ const l = e.find((n, w, R) => n === r || n.dataIndex === r.dataIndex && n.title == r.title);
62
+ return l ? (l.width = x ?? r.width, o(e)) : e;
14
63
  });
15
64
  }
16
65
  };
17
66
  }
18
- function r(e) {
19
- return b(e) ? e.map((n, l, o) => {
20
- const t = n;
21
- return l < o.length - 1 && n.resizable !== !1 && !n.fixed && (t.onHeaderCell = c), t;
22
- }) : e;
67
+ function o(t) {
68
+ return C(t) ? t.map((i, s, p) => {
69
+ const r = i;
70
+ return s < p.length - 1 && i.resizable !== !1 && !i.fixed && (r.onHeaderCell = h), r;
71
+ }) : t;
23
72
  }
24
- const [m, s] = h(() => {
25
- const e = a.columns;
26
- return e ? r(e) : [];
27
- });
28
- return p(() => () => {
73
+ return a(() => (m(o(u)), () => {
74
+ }), [...c]), a(() => () => {
29
75
  }, []), {
30
- columns: m,
31
- setColumns(e) {
32
- return s(r(e));
76
+ columns: d,
77
+ setColumns(t) {
78
+ return m(o(t));
33
79
  },
34
- ThResizable: x
80
+ ThResizable: z
35
81
  };
36
82
  }
37
83
  export {
38
- g as default
84
+ Rt as default
39
85
  };
package/table/tbody/Td.js CHANGED
@@ -1,62 +1,62 @@
1
- import { jsx as s, jsxs as le } from "react/jsx-runtime";
2
- import U from "lodash/get";
1
+ import { jsx as s, jsxs as re } from "react/jsx-runtime";
2
+ import W from "lodash/get";
3
3
  import u from "lodash/isFunction";
4
- import $ from "lodash/isPlainObject";
5
- import S from "lodash/isString";
6
- import z, { useContext as re, useRef as C, useMemo as ie, useEffect as se } from "react";
4
+ import E from "lodash/isPlainObject";
5
+ import C from "lodash/isString";
6
+ import V, { useContext as ie, useRef as h, useMemo as se, useEffect as ce } from "react";
7
7
  import "../../config-provider/ConfigProvider.js";
8
- import ce from "../../components/common/hooks/useForceUpdate.js";
9
- import de from "../hook/useComponent.js";
10
- import { getOriginData as W } from "../util.js";
11
- import ae from "../../tooltip/index.js";
12
- import I from "@unicom-cloud/utils/class-name";
13
- import { mergedToString as fe } from "../../components/common/utils/mergedToString.js";
14
- import { pick as me } from "../../components/common/utils/pick.js";
15
- import pe from "../../config-provider/context.js";
16
- function ue(i) {
17
- return i && !z.isValidElement(i) && $(i);
18
- }
8
+ import de from "../../components/common/hooks/useForceUpdate.js";
9
+ import ae from "../hook/useComponent.js";
10
+ import { getOriginData as z } from "../util.js";
11
+ import fe from "../../tooltip/index.js";
12
+ import $ from "@unicom-cloud/utils/class-name";
13
+ import { mergedToString as me } from "../../components/common/utils/mergedToString.js";
14
+ import { pick as pe } from "../../components/common/utils/pick.js";
15
+ import ue from "../../config-provider/context.js";
19
16
  function Ce(i) {
20
- const E = ce(), {
21
- component: V,
22
- InnerComponentTd: A,
17
+ return i && !V.isValidElement(i) && E(i);
18
+ }
19
+ function he(i) {
20
+ const N = de(), {
21
+ component: A,
22
+ InnerComponentTd: K,
23
23
  column: e,
24
- columnIndex: N,
24
+ columnIndex: v,
25
25
  prefixCls: l,
26
- stickyClassName: K,
27
- stickyOffset: v,
28
- currentSorter: h,
29
- virtualized: q,
26
+ stickyClassName: q,
27
+ stickyOffset: M,
28
+ currentSorter: g,
29
+ virtualized: G,
30
30
  record: o,
31
31
  trIndex: r,
32
- level: M,
33
- placeholder: G = "-",
34
- indentSize: J,
35
- renderExpandIcon: Q,
32
+ level: T,
33
+ placeholder: J = "-",
34
+ indentSize: Q,
35
+ renderExpandIcon: X,
36
36
  rowKey: y,
37
- recordHaveChildren: T,
38
- haveTreeData: X
39
- } = i, { rtl: R } = re(pe), { ComponentBodyCell: b } = de(V), c = C(null), d = C(null), g = C(null), x = C(null), _ = e?.showTooltip !== !1 && e?.ellipsis, Y = I(
37
+ recordHaveChildren: b,
38
+ haveTreeData: Y
39
+ } = i, { rtl: R } = ie(ue), { ComponentBodyCell: _ } = ae(A), c = h(null), d = h(null), x = h(null), w = h(null), S = e?.tooltip?.show !== !1 && e?.ellipsis, Z = $(
40
40
  `${l}-td`,
41
- K,
41
+ q,
42
42
  {
43
- [`${l}-col-sorted`]: h && h.direction && h.field === e?.dataIndex
43
+ [`${l}-col-sorted`]: g && g.direction && g.field === e?.dataIndex
44
44
  },
45
45
  e?.className,
46
46
  u(e?.bodyClassName) ? e.bodyClassName(o, r) : e?.bodyClassName
47
47
  );
48
48
  let a = {}, k, B, n = {};
49
- e?.fixed === "left" && (n[R ? "right" : "left"] = v), e?.fixed === "right" && (n[R ? "left" : "right"] = v), $(e?.cellStyle) && (n = {
49
+ e?.fixed === "left" && (n[R ? "right" : "left"] = M), e?.fixed === "right" && (n[R ? "left" : "right"] = M), E(e?.cellStyle) && (n = {
50
50
  ...n,
51
51
  ...e?.cellStyle
52
- }), $(e?.bodyCellStyle) && (n = {
52
+ }), E(e?.bodyCellStyle) && (n = {
53
53
  ...n,
54
54
  ...e?.bodyCellStyle
55
55
  }), u(e?.bodyCellStyle) && (n = {
56
56
  ...n,
57
57
  ...e?.bodyCellStyle?.(o, r) ?? {}
58
- }), e?.align && (n.textAlign = e?.align), q && e.width && (n.width = e.width, n.minWidth = e.width, n.maxWidth = e.width);
59
- const { onHandleSave: Z, ...D } = e?.onCell ? e?.onCell(
58
+ }), e?.align && (n.textAlign = e?.align), G && e.width && (n.width = e.width, n.minWidth = e.width, n.maxWidth = e.width);
59
+ const { onHandleSave: ee, ...D } = e?.onCell ? e?.onCell(
60
60
  o,
61
61
  r,
62
62
  e,
@@ -64,51 +64,51 @@ function Ce(i) {
64
64
  // 潘启宝添加
65
65
  ) ?? {} : { onHandleSave: () => {
66
66
  } }, H = e?.render;
67
- let t = ie(() => H?.(
68
- U(o, e?.dataIndex ?? ""),
69
- W(o),
67
+ let t = se(() => H?.(
68
+ W(o, e?.dataIndex ?? ""),
69
+ z(o),
70
70
  r,
71
71
  e,
72
72
  // 潘启宝添加
73
73
  { rowKey: y }
74
74
  // 潘启宝添加
75
75
  ), [o, e, r]);
76
- if (u(H) || (t = U(o, e?.dataIndex ?? "")), ue(t) && (a = t?.props, k = a?.rowSpan, B = a?.colSpan, t = t?.children), k === 0 || B === 0)
76
+ if (u(H) || (t = W(o, e?.dataIndex ?? "")), Ce(t) && (a = t?.props, k = a?.rowSpan, B = a?.colSpan, t = t?.children), k === 0 || B === 0)
77
77
  return null;
78
- S(t) && (t = t.trim()), !t && t !== 0 && (t = e?.placeholder ?? G ?? "-");
79
- const ee = e?.ellipsis && S(t) ? {
80
- // title: cellChildren // 暂时不需要title属性了,因为单独加了tooltip组件,潘启宝2023年4月1日于广东省惠州市
81
- } : {}, w = X && e?.$$isFirstColumn, L = w && T;
82
- let f = w && M > 0 ? J * M : 0;
83
- w && !T && (f += 20);
84
- function te(p) {
85
- E();
78
+ C(t) && (t = t.trim()), !t && t !== 0 && (t = e?.placeholder ?? J ?? "-");
79
+ const te = e?.ellipsis && C(t) && !S ? {
80
+ title: t
81
+ } : {}, I = Y && e?.$$isFirstColumn, L = I && b;
82
+ let f = I && T > 0 ? Q * T : 0;
83
+ I && !b && (f += 20);
84
+ function ne(p) {
85
+ N();
86
86
  }
87
- const O = `${N}-${r}-${f}-${L}`, ne = /* @__PURE__ */ s(
87
+ const O = `${v}-${r}-${f}-${L}`, oe = /* @__PURE__ */ s(
88
88
  "div",
89
89
  {
90
90
  ref: c,
91
- className: I(`${l}-cell`, {
91
+ className: $(`${l}-cell`, {
92
92
  [`${l}-cell-text-ellipsis`]: e?.ellipsis
93
93
  }),
94
- ...ee,
95
- onMouseEnter: _ ? te : void 0,
96
- children: /* @__PURE__ */ le(
97
- b,
94
+ ...te,
95
+ onMouseEnter: S ? ne : void 0,
96
+ children: /* @__PURE__ */ re(
97
+ _,
98
98
  {
99
99
  ref: d,
100
100
  className: `${l}-cell-wrap-value`,
101
- ...S(b) ? {} : {
102
- rowData: W(o),
101
+ ...C(_) ? {} : {
102
+ rowData: z(o),
103
103
  column: e,
104
- onHandleSave: Z,
104
+ onHandleSave: ee,
105
105
  ...D
106
106
  },
107
107
  children: [
108
108
  !!f && /* @__PURE__ */ s(
109
109
  "span",
110
110
  {
111
- ref: g,
111
+ ref: x,
112
112
  className: `${l}-cell-indent`,
113
113
  style: { paddingLeft: f }
114
114
  }
@@ -116,12 +116,12 @@ function Ce(i) {
116
116
  !!L && /* @__PURE__ */ s(
117
117
  "span",
118
118
  {
119
- ref: x,
119
+ ref: w,
120
120
  className: `${l}-cell-expand-icon`,
121
- children: Q(o, y)
121
+ children: X(o, y)
122
122
  }
123
123
  ),
124
- i.___dangerouslySetInnerHTML___ ? /* @__PURE__ */ s(
124
+ i.___dangerouslySetInnerHTML___ && C(t) ? /* @__PURE__ */ s(
125
125
  "span",
126
126
  {
127
127
  dangerouslySetInnerHTML: {
@@ -137,11 +137,11 @@ function Ce(i) {
137
137
  O
138
138
  );
139
139
  let m = /* @__PURE__ */ s(
140
- A,
140
+ K,
141
141
  {
142
- className: Y,
142
+ className: Z,
143
143
  style: n,
144
- ...me(D, [
144
+ ...pe(D, [
145
145
  "onClick",
146
146
  "onDoubleClick",
147
147
  "onContextMenu",
@@ -153,29 +153,32 @@ function Ce(i) {
153
153
  "onMouseUp"
154
154
  ]),
155
155
  ...a,
156
- children: ne
156
+ children: oe
157
157
  },
158
- e?.key || e?.dataIndex || N
158
+ e?.key || e?.dataIndex || v
159
159
  );
160
- if (_) {
160
+ if (S) {
161
161
  let p = 0, P = 0, j = 0, F = 0;
162
- if (c.current instanceof Element && (p = c.current.getBoundingClientRect().width), d.current instanceof Element && (P = d.current.getBoundingClientRect().width), g.current instanceof Element && (j = g.current.getBoundingClientRect().width), x.current instanceof Element && (F = x.current.getBoundingClientRect().width), p < P + j + F) {
163
- const oe = u(e?.tooltipContentRender) ? e.tooltipContentRender(o, r, e) : fe(m);
162
+ if (c.current instanceof Element && (p = c.current.getBoundingClientRect().width), d.current instanceof Element && (P = d.current.getBoundingClientRect().width), x.current instanceof Element && (j = x.current.getBoundingClientRect().width), w.current instanceof Element && (F = w.current.getBoundingClientRect().width), p < P + j + F) {
163
+ const U = e?.tooltip?.render, le = u(U) ? U(o, r, e) : e?.tooltip?.content ?? me(m);
164
164
  m = /* @__PURE__ */ s(
165
- ae,
165
+ fe,
166
166
  {
167
- className: I(`${l}-cell-tooltip`, e.tooltipClassName),
168
- style: e.tooltipStyle,
169
- content: oe,
167
+ ...e?.tooltip,
168
+ className: $(
169
+ `${l}-cell-tooltip`,
170
+ e?.tooltip?.className
171
+ ),
172
+ content: le,
170
173
  children: m
171
174
  }
172
175
  );
173
176
  }
174
177
  }
175
- return se(() => (E(), () => {
178
+ return ce(() => (N(), () => {
176
179
  }), [c.current, d.current]), m;
177
180
  }
178
- const _e = z.memo(Ce);
181
+ const ke = V.memo(he);
179
182
  export {
180
- _e as default
183
+ ke as default
181
184
  };
@@ -1,46 +1,103 @@
1
- import { jsx as C, jsxs as M } from "react/jsx-runtime";
2
- import X from "lodash/isFunction";
3
- import { useRef as u, useContext as z, useCallback as o, useEffect as E } from "react";
1
+ import { jsx as h, jsxs as M, Fragment as P } from "react/jsx-runtime";
2
+ import { useRef as s, useContext as X, useEffect as j } from "react";
4
3
  import "../../config-provider/ConfigProvider.js";
5
- import T from "@unicom-cloud/utils/class-name";
6
- import { on as b, off as w } from "../../components/common/utils/dom.js";
7
- import { defaultComponent as j } from "../constant.js";
4
+ import "@unicom-cloud/utils/case-name";
5
+ import z from "@unicom-cloud/utils/class-name";
6
+ import "../../dist/tinycolor/chunk/BOzCVdr0.js";
7
+ import "@unicom-cloud/utils/constant/ui";
8
+ import "../../utils/contextHolder.js";
9
+ import "@unicom-cloud/utils/dayjs";
10
+ import "@unicom-cloud/utils/clipboard-copy";
11
+ import "../../components/common/utils/dayjs.js";
12
+ import { off as g, on as C } from "../../components/common/utils/dom.js";
13
+ import "@unicom-cloud/utils/file/fileToURL";
14
+ import "lodash/escapeRegExp";
15
+ import "lodash/isArray";
16
+ import "lodash/isNumber";
17
+ import "lodash/isString";
18
+ import "lodash/isFunction";
19
+ import "lodash/throttle";
20
+ import "../../components/common/utils/is.js";
21
+ import "lodash/camelCase";
22
+ import "lodash/capitalize";
23
+ import "lodash/cloneDeep";
24
+ import "lodash/debounce";
25
+ import "lodash/get";
26
+ import "lodash/has";
27
+ import "lodash/kebabCase";
28
+ import "lodash/merge";
29
+ import "lodash/mergeWith";
30
+ import "lodash/set";
31
+ import "lodash/setWith";
32
+ import "lodash/snakeCase";
33
+ import "lodash/startCase";
34
+ import "lodash/uniq";
35
+ import "lodash/upperFirst";
36
+ import "@unicom-cloud/utils/math";
37
+ import "lodash/isPlainObject";
38
+ import "../../dist/react-transition-group/src/CSSTransition.js";
39
+ import "../../dist/react-transition-group/src/ReplaceTransition.js";
40
+ import "../../dist/react-transition-group/src/SwitchTransition.js";
41
+ import "../../dist/react-transition-group/chunk/CPfP7aNL.js";
42
+ import "../../dist/react-transition-group/src/TransitionGroup.js";
43
+ import "../../components/common/utils/reactDOM.js";
44
+ import "@unicom-cloud/utils/file/saveAs";
45
+ import "@unicom-cloud/utils/screenfull";
46
+ import "@unicom-cloud/utils/constant/ui.js";
47
+ import "react-is";
48
+ import "@unicom-cloud/utils/tree";
49
+ import { isFunction as E, isPlainObject as T } from "@unicom-cloud/utils/is";
50
+ import "uuid";
51
+ import "../../dist/validate/src/index.js";
52
+ import "@unicom-cloud/utils/constant/keyboardCode";
53
+ import { defaultComponent as D } from "../constant.js";
8
54
  /* empty css */
9
- import D from "../../config-provider/context.js";
10
- function A(v) {
11
- let { className: r, children: m, column: a, onResize: l, ...f } = v;
12
- const p = j.header.th, n = u(null), x = u(null), t = u({}), { getPrefixCls: R } = z(D), d = R?.("table-th-resizable");
13
- if (!X(l)) return /* @__PURE__ */ C(p, { ref: n, ...f, className: r, children: m });
14
- const h = o((e) => {
15
- t.current.boundingClientRect = n.current.getBoundingClientRect(), t.current.pageX = e?.pageX ?? 0, N();
16
- }, []), s = o((e) => {
17
- g();
18
- }, []), c = o((e) => {
19
- let i = t.current.boundingClientRect.width + ((e?.pageX ?? 0) - t.current.pageX);
20
- i < 0 || (a.width = i, l?.({
21
- column: a,
22
- width: i,
23
- widthOrigin: t.current.boundingClientRect.width
55
+ import F from "../../config-provider/context.js";
56
+ function Bt(b) {
57
+ let {
58
+ className: r,
59
+ children: u,
60
+ column: i,
61
+ onResize: c,
62
+ ...w
63
+ } = b;
64
+ const v = D.header.th, f = s(null), x = s(null), o = s({}), { getPrefixCls: R } = X(F), a = R?.("table-th-resizable");
65
+ function l(t) {
66
+ o.current.boundingClientRect = f.current.getBoundingClientRect(), o.current.pageX = t?.pageX ?? 0, n(), N();
67
+ }
68
+ function e(t) {
69
+ n();
70
+ }
71
+ function m(t) {
72
+ let p = o.current.boundingClientRect.width + ((t?.pageX ?? 0) - o.current.pageX);
73
+ p < 0 || (T(i) && (i.width = p), c?.({
74
+ column: i,
75
+ width: p,
76
+ widthOrigin: o.current.boundingClientRect.width
24
77
  }));
25
- }, []), N = o((e) => {
26
- b(document, "mousemove", c), b(document, "mouseup", s);
27
- }, []), g = o((e) => {
28
- w(document, "mousemove", c), w(document, "mouseup", s);
29
- }, []);
30
- return r = T(r, d), E(() => (h(), c(), s(), () => {
31
- g();
32
- }), []), /* @__PURE__ */ M(p, { ref: n, ...f, className: r, children: [
33
- m,
34
- /* @__PURE__ */ C(
78
+ }
79
+ function N(t) {
80
+ C(document, "mousemove", m), C(document, "mouseup", e);
81
+ }
82
+ function n(t) {
83
+ g(document, "mousemove", m), g(document, "mouseup", e);
84
+ }
85
+ r = z(r, a), j(() => (l(), m(), e(), () => {
86
+ n();
87
+ }), []);
88
+ let d = u;
89
+ return E(c) && (d = /* @__PURE__ */ M(P, { children: [
90
+ u,
91
+ /* @__PURE__ */ h(
35
92
  "div",
36
93
  {
37
94
  ref: x,
38
- className: `${d}-cursor`,
39
- onMouseDown: h
95
+ className: `${a}-cursor`,
96
+ onMouseDown: l
40
97
  }
41
98
  )
42
- ] });
99
+ ] })), /* @__PURE__ */ h(v, { ref: f, ...w, className: r, children: d });
43
100
  }
44
101
  export {
45
- A as default
102
+ Bt as default
46
103
  };