bhd-components 0.5.5 → 0.5.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.
Files changed (117) hide show
  1. package/dist/1bddec89.esm.es5.production.js +72 -0
  2. package/dist/535fc6c5.esm.es5.development.js +95493 -0
  3. package/dist/CustomerService.esm.es5.development.css +2827 -0
  4. package/dist/CustomerService.esm.es5.development.js +3823 -0
  5. package/dist/CustomerService.esm.es5.production.css +1 -0
  6. package/dist/CustomerService.esm.es5.production.js +1 -0
  7. package/dist/vendor.esm.es5.development.esm.es5.development.css +117 -0
  8. package/dist/vendor.esm.es5.production.esm.es5.production.css +9 -0
  9. package/es2017/customerService/contactsList/index.d.ts +13 -0
  10. package/es2017/customerService/contactsList/index.js +313 -0
  11. package/es2017/customerService/contactsList/index.module.less +187 -0
  12. package/es2017/customerService/function.d.ts +17 -0
  13. package/es2017/customerService/function.js +67 -0
  14. package/es2017/customerService/historyFun/index.d.ts +13 -0
  15. package/es2017/customerService/historyFun/index.js +241 -0
  16. package/es2017/customerService/historyFun/index.module.less +189 -0
  17. package/es2017/customerService/images/knowledge_icon.png +0 -0
  18. package/es2017/customerService/images/voice_btn.gif +0 -0
  19. package/es2017/customerService/index.d.ts +16 -0
  20. package/es2017/customerService/index.js +2493 -0
  21. package/es2017/customerService/index.module.less +727 -0
  22. package/es2017/customerService/useMediaRecorder.d.ts +9 -0
  23. package/es2017/customerService/useMediaRecorder.js +78 -0
  24. package/es2017/customerService/voice_btn.gif +0 -0
  25. package/es2017/icons/components/custom-ai_icon.d.ts +4 -0
  26. package/es2017/icons/components/custom-ai_icon.js +58 -0
  27. package/es2017/icons/components/custom-contacts.d.ts +4 -0
  28. package/es2017/icons/components/custom-contacts.js +29 -0
  29. package/es2017/icons/components/custom-copy.d.ts +4 -0
  30. package/es2017/icons/components/custom-copy.js +36 -0
  31. package/es2017/icons/components/custom-dislike.d.ts +4 -0
  32. package/es2017/icons/components/custom-dislike.js +22 -0
  33. package/es2017/icons/components/custom-duihao.d.ts +4 -0
  34. package/es2017/icons/components/custom-duihao.js +22 -0
  35. package/es2017/icons/components/custom-exit_full_screen.d.ts +4 -0
  36. package/es2017/icons/components/custom-exit_full_screen.js +26 -0
  37. package/es2017/icons/components/custom-full_screen.d.ts +4 -0
  38. package/es2017/icons/components/custom-full_screen.js +22 -0
  39. package/es2017/icons/components/custom-like.d.ts +4 -0
  40. package/es2017/icons/components/custom-like.js +22 -0
  41. package/es2017/icons/components/custom-quote.d.ts +4 -0
  42. package/es2017/icons/components/custom-quote.js +31 -0
  43. package/es2017/icons/components/custom-record.d.ts +4 -0
  44. package/es2017/icons/components/custom-record.js +37 -0
  45. package/es2017/icons/components/custom-reloading.d.ts +4 -0
  46. package/es2017/icons/components/custom-reloading.js +26 -0
  47. package/es2017/icons/components/custom-retract.d.ts +4 -0
  48. package/es2017/icons/components/custom-retract.js +27 -0
  49. package/es2017/icons/components/custom-round_close.d.ts +4 -0
  50. package/es2017/icons/components/custom-round_close.js +24 -0
  51. package/es2017/icons/components/custom-sending.d.ts +4 -0
  52. package/es2017/icons/components/custom-sending.js +22 -0
  53. package/es2017/icons/components/custom-sound_recording.d.ts +4 -0
  54. package/es2017/icons/components/custom-sound_recording.js +22 -0
  55. package/es2017/icons/components/index.d.ts +15 -0
  56. package/es2017/icons/components/index.js +15 -0
  57. package/es2017/index.d.ts +1 -0
  58. package/es2017/index.js +1 -0
  59. package/es2017/provider/config.js +3 -3
  60. package/esm/customerService/contactsList/index.d.ts +13 -0
  61. package/esm/customerService/contactsList/index.js +326 -0
  62. package/esm/customerService/contactsList/index.module.less +187 -0
  63. package/esm/customerService/function.d.ts +17 -0
  64. package/esm/customerService/function.js +69 -0
  65. package/esm/customerService/historyFun/index.d.ts +13 -0
  66. package/esm/customerService/historyFun/index.js +256 -0
  67. package/esm/customerService/historyFun/index.module.less +189 -0
  68. package/esm/customerService/images/knowledge_icon.png +0 -0
  69. package/esm/customerService/images/voice_btn.gif +0 -0
  70. package/esm/customerService/index.d.ts +16 -0
  71. package/esm/customerService/index.js +2576 -0
  72. package/esm/customerService/index.module.less +727 -0
  73. package/esm/customerService/useMediaRecorder.d.ts +9 -0
  74. package/esm/customerService/useMediaRecorder.js +121 -0
  75. package/esm/customerService/voice_btn.gif +0 -0
  76. package/esm/icons/components/custom-ai_icon.d.ts +4 -0
  77. package/esm/icons/components/custom-ai_icon.js +60 -0
  78. package/esm/icons/components/custom-contacts.d.ts +4 -0
  79. package/esm/icons/components/custom-contacts.js +31 -0
  80. package/esm/icons/components/custom-copy.d.ts +4 -0
  81. package/esm/icons/components/custom-copy.js +38 -0
  82. package/esm/icons/components/custom-dislike.d.ts +4 -0
  83. package/esm/icons/components/custom-dislike.js +24 -0
  84. package/esm/icons/components/custom-duihao.d.ts +4 -0
  85. package/esm/icons/components/custom-duihao.js +24 -0
  86. package/esm/icons/components/custom-exit_full_screen.d.ts +4 -0
  87. package/esm/icons/components/custom-exit_full_screen.js +28 -0
  88. package/esm/icons/components/custom-full_screen.d.ts +4 -0
  89. package/esm/icons/components/custom-full_screen.js +24 -0
  90. package/esm/icons/components/custom-like.d.ts +4 -0
  91. package/esm/icons/components/custom-like.js +24 -0
  92. package/esm/icons/components/custom-quote.d.ts +4 -0
  93. package/esm/icons/components/custom-quote.js +33 -0
  94. package/esm/icons/components/custom-record.d.ts +4 -0
  95. package/esm/icons/components/custom-record.js +39 -0
  96. package/esm/icons/components/custom-reloading.d.ts +4 -0
  97. package/esm/icons/components/custom-reloading.js +28 -0
  98. package/esm/icons/components/custom-retract.d.ts +4 -0
  99. package/esm/icons/components/custom-retract.js +29 -0
  100. package/esm/icons/components/custom-round_close.d.ts +4 -0
  101. package/esm/icons/components/custom-round_close.js +26 -0
  102. package/esm/icons/components/custom-sending.d.ts +4 -0
  103. package/esm/icons/components/custom-sending.js +24 -0
  104. package/esm/icons/components/custom-sound_recording.d.ts +4 -0
  105. package/esm/icons/components/custom-sound_recording.js +24 -0
  106. package/esm/icons/components/index.d.ts +15 -0
  107. package/esm/icons/components/index.js +15 -0
  108. package/esm/index.d.ts +1 -0
  109. package/esm/index.js +1 -0
  110. package/esm/provider/config.js +3 -3
  111. package/package.json +10 -2
  112. package/dist/1951bd5c.esm.es5.development.js +0 -45417
  113. package/dist/28cd83d3.esm.es5.production.js +0 -256
  114. package/dist/table.esm.es5.development.css +0 -772
  115. package/dist/table.esm.es5.development.js +0 -289
  116. package/dist/table.esm.es5.production.css +0 -1
  117. package/dist/table.esm.es5.production.js +0 -1
@@ -1,289 +0,0 @@
1
- import { _ as _sliced_to_array, j as jsx, a as _object_spread_props, b as _object_spread, T as Tooltip, c as Table$1 } from './1951bd5c.esm.es5.development.js';
2
- import { useState, useRef, useEffect } from 'react';
3
- import 'react/jsx-runtime';
4
- import 'react-dom';
5
-
6
- var modules_63b47c51 = {"Table":"index_module_Table__dfa8dab0","SmallTable":"index_module_SmallTable__dfa8dab0","columnTootipClassName":"index_module_columnTootipClassName__dfa8dab0"};
7
-
8
- var getTextSize = function(str) {
9
- var fontSize = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 14;
10
- var result = 0;
11
- var ele = document.createElement("div");
12
- ele.style.position = "absolute";
13
- ele.style.whiteSpace = "nowrap";
14
- ele.style.fontSize = fontSize + "px";
15
- ele.style.opacity = "0";
16
- ele.innerText = str;
17
- document.body.append(ele);
18
- result = ele.getBoundingClientRect().width;
19
- document.body.removeChild(ele);
20
- return result;
21
- };
22
- var TextTootip = function(props) {
23
- var children = props.children, title = props.title, width = props.width;
24
- var _useState = _sliced_to_array(useState(false), 2), open = _useState[0], setOpen = _useState[1];
25
- var mouseEnter = function(e) {
26
- var w = 0;
27
- if (typeof width === "function") {
28
- w = width(e);
29
- } else {
30
- w = width;
31
- }
32
- if (!w) {
33
- setOpen(true);
34
- } else {
35
- setOpen(getTextSize(title) < w ? false : true);
36
- }
37
- };
38
- var mouseLeave = function() {
39
- setOpen(false);
40
- };
41
- return /*#__PURE__*/ jsx(Tooltip, _object_spread_props(_object_spread({}, props), {
42
- open: open,
43
- children: /*#__PURE__*/ jsx("span", {
44
- onMouseEnter: mouseEnter,
45
- onMouseLeave: mouseLeave,
46
- children: children
47
- })
48
- }));
49
- };
50
- var TextTootip$1 = TextTootip;
51
-
52
- var widthPercentage = /^\d+%$/;
53
- var widthPx = /^\d+px$/;
54
- /* 获取元素的宽度 */ var getElementPadding = function(node) {
55
- var computedStyle = {};
56
- if (window.getComputedStyle) {
57
- computedStyle = getComputedStyle(node, null);
58
- } else {
59
- computedStyle = node.currentStyle; //兼容IE的写法
60
- }
61
- return parseFloat(computedStyle["padding-left"]) + parseFloat(computedStyle["padding-right"]);
62
- };
63
- //获取宽度
64
- var getParentWidth = function(node) {
65
- try {
66
- while(node && node.nodeName !== "TD"){
67
- node = node.parentElement;
68
- }
69
- var padding = getElementPadding(node);
70
- return node.clientWidth - padding;
71
- } catch (error) {
72
- return null;
73
- }
74
- };
75
- // const defaultWidthRang: widthRangType = [180, 240, 320]; //默认自适应的值 [最小值,最佳值,最大值]
76
- //传入的参数为onCell==>需要进行函数合并
77
- /* 记录的滚动条宽度 */ var recordScrollBarWidth = 0;
78
- function getScrollbarWidth() {
79
- // Creating invisible container
80
- var outer = document.createElement("div");
81
- outer.style.visibility = "hidden";
82
- outer.style.overflow = "scroll"; // forcing scrollbar to appear
83
- // outer.style.msOverflowStyle = 'scrollbar'; // needed for WinJS apps
84
- document.body.appendChild(outer);
85
- // Creating inner element and placing it in the container
86
- var inner = document.createElement("div");
87
- outer.appendChild(inner);
88
- // Calculating difference between container's full width and the child width
89
- var scrollbarWidth = outer.offsetWidth - inner.offsetWidth;
90
- // Removing temporary elements from the DOM
91
- outer.parentNode.removeChild(outer);
92
- return scrollbarWidth;
93
- }
94
- var Table = function(props) {
95
- var tableRef = useRef(null);
96
- var timerRef = useRef({
97
- timer: null
98
- });
99
- var _props_defaultWidthRang = props.defaultWidthRang, defaultWidthRang = _props_defaultWidthRang === void 0 ? [
100
- 180,
101
- 240,
102
- 320
103
- ] : _props_defaultWidthRang, _props_isFixedLeft = props.isFixedLeft, isFixedLeft = _props_isFixedLeft === void 0 ? true : _props_isFixedLeft, _props_isFixedRight = props.isFixedRight, isFixedRight = _props_isFixedRight === void 0 ? true : _props_isFixedRight, _props_bordered = props.bordered, bordered = _props_bordered === void 0 ? false : _props_bordered, kind = props.kind;
104
- var _useState = _sliced_to_array(useState(props.columns || []), 2), columns = _useState[0], setColumns = _useState[1];
105
- var _useState1 = _sliced_to_array(useState(props.scroll || undefined), 2), scrollObject = _useState1[0], setScrollObject = _useState1[1];
106
- var columnTootipClassName = props.columnTootipClassName, columnTootipColor = props.columnTootipColor;
107
- var initColumns = function() {
108
- // let scrollBarDom = tableRef.current.getElementsByClassName(
109
- // "bhd-table-cell-scrollbar"
110
- // )[0];
111
- var scrollBarWidth = getScrollbarWidth();
112
- recordScrollBarWidth = scrollBarWidth || recordScrollBarWidth;
113
- var tableWidth = bordered ? tableRef.current.offsetWidth - 2 - recordScrollBarWidth : tableRef.current.offsetWidth - recordScrollBarWidth;
114
- var _initColumnsWidth = initColumnsWidth(props.columns, tableWidth), selfColumns = _initColumnsWidth.columns;
115
- setColumns(selfColumns);
116
- var obj = scrollObject ? scrollObject : {};
117
- obj = _object_spread_props(_object_spread({}, obj), {
118
- x: tableWidth
119
- });
120
- setScrollObject(obj);
121
- };
122
- var initColumnsWidth = function(columns, tableWidth) {
123
- var autoNum = 0; //自适应的列数
124
- var minWidth = 0; //最小宽度
125
- var scrollWidth = 0; //出现滚动条时 滚动宽度
126
- columns = columns.map(function(item) {
127
- item.width = item.width || "auto";
128
- // item.width=parseFloat(item.width)
129
- if (widthPercentage.test(item.width)) {
130
- //检测到宽度为百分比 则转换为具体px 如大于100% 则视为自适应
131
- item.width = parseFloat(item.width) >= 100 ? "auto" : tableWidth * parseFloat(item.width) / 100;
132
- } else if (typeof item.width === "number") {
133
- //检测为number 则为具体的像素值
134
- item.width = item.width;
135
- } else if (widthPx.test(item.width)) {
136
- //检测为 "12px" 则为具体的值
137
- item.width = parseFloat(item.width);
138
- } else {
139
- //其它为auto
140
- item.width = "auto";
141
- }
142
- if (item.width === "auto") {
143
- autoNum += 1;
144
- if (!item.widthRang) {
145
- //没有设置自适应区间的 走默认区间
146
- item.widthRang = defaultWidthRang;
147
- }
148
- minWidth += item.widthRang[0];
149
- scrollWidth += item.widthRang[1];
150
- } else {
151
- minWidth += item.width;
152
- scrollWidth += item.width;
153
- }
154
- if (!item.onColumnCell) {
155
- item.onColumnCell = item.onCell || function() {
156
- return {};
157
- };
158
- }
159
- if (!item.render) {
160
- item.ellipsis = {
161
- showTitle: false
162
- };
163
- item.render = function(text) {
164
- return /*#__PURE__*/ jsx(TextTootip$1, {
165
- width: function(e) {
166
- return getParentWidth(e.target);
167
- },
168
- title: text,
169
- trigger: "hover",
170
- overlayClassName: columnTootipClassName || modules_63b47c51.columnTootipClassName,
171
- color: columnTootipColor || "#FFF",
172
- children: /*#__PURE__*/ jsx("span", {
173
- children: text
174
- })
175
- });
176
- };
177
- }
178
- return item;
179
- });
180
- var diff = tableWidth - minWidth;
181
- if (diff > 0) {
182
- var avgWidth = autoNum === 0 ? diff : 0;
183
- // 有多余空间 平均分配至每个自适应的列
184
- columns = columns.map(function(item) {
185
- if (item.width === "auto") {
186
- //自适应列均分 多出来的宽度(除最后一列)
187
- item.width = item.widthRang[0] + diff / autoNum;
188
- if (item.width > item.widthRang[2]) {
189
- //超过最大宽度 则取最大宽度 多出来的值均分至每一列
190
- avgWidth += item.width - item.widthRang[2];
191
- item.width = item.widthRang[2];
192
- }
193
- }
194
- return item;
195
- });
196
- columns = columns.map(function(item, index) {
197
- //存在适应自适应列侯 多余宽度 则平均分配每一列(除最后一列)
198
- if (avgWidth > 0 && index !== columns.length - 1) {
199
- item.width += avgWidth / (columns.length - 1);
200
- }
201
- return item;
202
- });
203
- } else if (diff < 0) {
204
- //宽度不足 自适应列取最佳宽度 并出现滚动条 且第一列 最后一列 固定
205
- columns = columns.map(function(item, index) {
206
- if (isFixedLeft && index === 0) {
207
- item.fixed = "left";
208
- }
209
- if (isFixedRight && index === columns.length - 1) {
210
- item.fixed = "right";
211
- }
212
- if (item.width === "auto") {
213
- item.width = item.widthRang[1];
214
- }
215
- return item;
216
- });
217
- } else {
218
- // 相等 自适应列取最小宽度
219
- columns = columns.map(function(item) {
220
- if (item.width === "auto") {
221
- item.width = item.widthRang[0];
222
- }
223
- return item;
224
- });
225
- }
226
- columns.map(function(item) {
227
- item.onCell = function(record, rowIndex) {
228
- var obj = typeof item.onColumnCell === "function" ? item.onColumnCell(record, rowIndex) : {};
229
- obj.style = obj.style ? obj.style : {};
230
- return _object_spread_props(_object_spread({}, obj), {
231
- style: _object_spread({
232
- maxWidth: item.width + "px"
233
- }, obj.style)
234
- });
235
- };
236
- // if(isNaN(item.width)){
237
- // console.log("宽度宽度",item,item.width,item.widthRang)
238
- // }
239
- return item;
240
- });
241
- return {
242
- columns: columns,
243
- scrollWidth: scrollWidth
244
- };
245
- };
246
- var onResize = function() {
247
- clearTimeout(timerRef.current.timer);
248
- timerRef.current.timer = setTimeout(function() {
249
- initColumns();
250
- }, 1000);
251
- };
252
- useEffect(function() {
253
- initColumns();
254
- window.addEventListener("resize", onResize);
255
- return function() {
256
- clearTimeout(timerRef.current.timer);
257
- window.removeEventListener("resize", onResize);
258
- };
259
- }, [
260
- props.columns
261
- ]);
262
- useEffect(function() {
263
- setScrollObject(props.scroll || undefined);
264
- }, [
265
- props.scroll
266
- ]);
267
- var config = _object_spread_props(_object_spread({
268
- bordered: false
269
- }, props), {
270
- columns: columns,
271
- scroll: scrollObject || {
272
- x: "auto"
273
- }
274
- });
275
- return /*#__PURE__*/ jsx("div", {
276
- className: "".concat(modules_63b47c51.Table, " ").concat(kind === "simple" ? modules_63b47c51.SmallTable : ""),
277
- ref: tableRef,
278
- children: /*#__PURE__*/ jsx(Table$1, _object_spread({}, config))
279
- });
280
- };
281
- Table.SELECTION_COLUMN = Table$1.SELECTION_COLUMN;
282
- Table.EXPAND_COLUMN = Table$1.EXPAND_COLUMN;
283
- Table.SELECTION_ALL = Table$1.SELECTION_ALL;
284
- Table.SELECTION_INVERT = Table$1.SELECTION_INVERT;
285
- Table.SELECTION_NONE = Table$1.SELECTION_NONE;
286
- Table.Column = Table$1.Column;
287
- Table.ColumnGroup = Table$1.ColumnGroup;
288
-
289
- export { Table as default };
@@ -1 +0,0 @@
1
- .index_module_Table__dfa8dab0{width:100%}.index_module_Table__dfa8dab0 table td,.index_module_Table__dfa8dab0 table th{border:none;border-bottom:1px solid #e8e8e8}.index_module_Table__dfa8dab0 table>.bhd-table-thead>tr>.bhd-table-cell{background:#fafafa;color:rgba(0,0,0,.85);font-size:16px;font-weight:400;white-space:nowrap}.index_module_Table__dfa8dab0 table>.bhd-table-thead>tr>.bhd-table-cell:first-child{padding-left:40px}.index_module_Table__dfa8dab0 table>.bhd-table-thead>tr>.bhd-table-cell:last-child{padding-right:40px}.index_module_Table__dfa8dab0 table>.bhd-table-thead>tr>.bhd-table-cell:before{display:none}.index_module_Table__dfa8dab0 table tbody tr.bhd-table-placeholder:hover td{background-color:#fff}.index_module_Table__dfa8dab0 table tbody tr:not(.bhd-table-placeholder){background:transparent}.index_module_Table__dfa8dab0 table tbody tr:not(.bhd-table-placeholder):hover td{background-color:#ffeeeb!important}.index_module_Table__dfa8dab0 table tbody tr:not(.bhd-table-placeholder) td{word-wrap:break-word;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:break-all}.index_module_Table__dfa8dab0 table tbody tr:not(.bhd-table-placeholder) td:first-child{padding-left:40px}.index_module_Table__dfa8dab0 table tbody tr:not(.bhd-table-placeholder) td:last-child{padding-right:40px}.index_module_Table__dfa8dab0 table tbody tr:not(.bhd-table-placeholder) td.bhd-table-selection-column{-webkit-padding-end:16px;padding-inline-end:16px}.index_module_Table__dfa8dab0 .bhd-table-wrapper .bhd-table-selection-col{width:72px!important}.index_module_Table__dfa8dab0 .bhd-table-wrapper .bhd-table-tbody>tr.bhd-table-row-selected>td{background:#fff}.index_module_Table__dfa8dab0 .bhd-table-wrapper .bhd-table-cell-fix-left-first:after,.index_module_Table__dfa8dab0 .bhd-table-wrapper .bhd-table-cell-fix-left-last:after{right:2px}.index_module_Table__dfa8dab0 .bhd-table-wrapper .bhd-table-cell-fix-right-first:after,.index_module_Table__dfa8dab0 .bhd-table-wrapper .bhd-table-cell-fix-right-last:after{left:2px}.index_module_Table__dfa8dab0 .bhd-pagination .bhd-pagination-item{border-color:transparent}.index_module_Table__dfa8dab0 .bhd-pagination .bhd-pagination-item-link{background:none!important;border:none!important}.index_module_Table__dfa8dab0 .bhd-pagination .bhd-pagination-item-active{background-color:#f4523b}.index_module_Table__dfa8dab0 .bhd-pagination .bhd-pagination-item-active:hover{background-color:#ff7d66}.index_module_Table__dfa8dab0 .bhd-pagination .bhd-pagination-item-active:hover>a,.index_module_Table__dfa8dab0 .bhd-pagination .bhd-pagination-item-active>a{color:#fff}.index_module_Table__dfa8dab0 .bhd-pagination.bhd-pagination-disabled .bhd-pagination-item{background:none!important;border:none!important;color:rgba(0,0,0,.25)!important}.index_module_Table__dfa8dab0 .bhd-pagination.bhd-pagination-disabled .bhd-pagination-item a{color:rgba(0,0,0,.25)!important}.index_module_Table__dfa8dab0 .bhd-pagination.bhd-pagination-mini .bhd-pagination-item{margin-right:8px!important}.index_module_Table__dfa8dab0 .bhd-pagination.bhd-pagination-mini .bhd-pagination-item:not(.bhd-pagination-item-active):hover{background-color:transparent!important}.index_module_Table__dfa8dab0 .bhd-table-cell .bhd-select-single:not(.bhd-select-customize-input) .bhd-select-selector .bhd-select-selection-search-input{height:auto}.index_module_Table__dfa8dab0 .bhd-table-cell .bhd-select-single:not(.bhd-select-customize-input) .bhd-select-selector{height:24px;padding-left:0}.index_module_Table__dfa8dab0 .bhd-table-cell .bhd-select-selector .bhd-select-selection-search{inset-inline-start:0}.index_module_Table__dfa8dab0 .bhd-table-cell .bhd-select-selector .bhd-select-selection-item{color:rgba(0,0,0,.85);font-size:16px;font-weight:500;line-height:24px}.index_module_Table__dfa8dab0 .bhd-table-cell .bhd-select .bhd-select-arrow{color:rgba(0,0,0,.65);margin-top:-5px}.index_module_Table__dfa8dab0 .bhd-table-cell .bhd-select .bhd-select-arrow>.anticon{pointer-events:none}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0{width:100%}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 table td,.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 table th{border:none;border-bottom:1px solid #ebebeb;color:rgba(0,0,0,.65)}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 table>.bhd-table-thead>tr>.bhd-table-cell{background-color:#fafafa;color:rgba(0,0,0,.85);font-family:PingFang SC,helvetica neue,Source Han Sans CN,hiragino sans gb,arial,microsoft yahei ui,microsoft yahei,simsun,"sans-serif"!important;font-size:16px;font-weight:600;padding-bottom:7px;padding-top:7px;vertical-align:middle;white-space:nowrap}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 table>.bhd-table-thead>tr>.bhd-table-cell:first-child{padding-left:16px}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 table>.bhd-table-thead>tr>.bhd-table-cell:last-child{padding-right:16px}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 table>.bhd-table-thead>tr>.bhd-table-cell:before{display:none}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 table>.bhd-table-thead>tr>.bhd-table-cell.bhd-table-selection-column{-webkit-padding-end:0;padding-inline-end:0;padding-right:0}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 table>.bhd-table-thead>tr>.bhd-table-cell.bhd-table-selection-column+.bhd-table-cell{padding-left:8px}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 table tbody tr.bhd-table-placeholder:hover td{background-color:#fff}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 table tbody tr.bhd-table-placeholder>.bhd-table-cell{border-bottom:none}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 table tbody tr:not(.bhd-table-placeholder){background:transparent}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 table tbody tr:not(.bhd-table-placeholder):hover td{background-color:#f5f5f5!important;color:rgba(0,0,0,.85)}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 table tbody tr:not(.bhd-table-placeholder) td{word-wrap:break-word;overflow:hidden;padding-bottom:13px;padding-top:13px;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap;word-break:break-all}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 table tbody tr:not(.bhd-table-placeholder) td:first-child{padding-left:16px}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 table tbody tr:not(.bhd-table-placeholder) td:last-child{padding-right:16px}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 table tbody tr:not(.bhd-table-placeholder) td.bhd-table-selection-column{-webkit-padding-end:0;padding-inline-end:0;padding-right:0}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 table tbody tr:not(.bhd-table-placeholder) td.bhd-table-selection-column+.bhd-table-cell{padding-left:8px}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-table-container table>thead>tr:first-child>:first-child{border-top-left-radius:0}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-table-container table>thead>tr:first-child>:last-child{border-top-right-radius:0}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 table,.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 table .bhd-table-header{border-radius:0}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-table-container{border-top-left-radius:0;border-top-right-radius:0}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-table,.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-table-wrapper .bhd-table .bhd-table-header{border-radius:0}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-table-wrapper .bhd-table-selection-col{width:40px!important}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-table-wrapper .bhd-table-tbody>tr.bhd-table-row-selected>td{background:#fff}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-table-wrapper .bhd-table-cell-fix-left-first:after,.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-table-wrapper .bhd-table-cell-fix-left-last:after{right:2px}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-table-wrapper .bhd-table-cell-fix-right-first:after,.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-table-wrapper .bhd-table-cell-fix-right-last:after{left:2px}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-pagination .bhd-pagination-item{border-color:transparent}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-pagination .bhd-pagination-item-link{background:none!important;border:none!important}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-pagination .bhd-pagination-item-active{background-color:#f4523b}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-pagination .bhd-pagination-item-active:hover{background-color:#ff7d66}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-pagination .bhd-pagination-item-active:hover>a,.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-pagination .bhd-pagination-item-active>a{color:#fff}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-pagination.bhd-pagination-disabled .bhd-pagination-item{background:none!important;border:none!important;color:rgba(0,0,0,.25)!important}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-pagination.bhd-pagination-disabled .bhd-pagination-item a{color:rgba(0,0,0,.25)!important}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-pagination.bhd-pagination-mini .bhd-pagination-item{margin-right:8px!important}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-pagination.bhd-pagination-mini .bhd-pagination-item:not(.bhd-pagination-item-active):hover{background-color:transparent!important}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-table-cell .bhd-select-single:not(.bhd-select-customize-input) .bhd-select-selector .bhd-select-selection-search-input{height:auto}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-table-cell .bhd-select-single:not(.bhd-select-customize-input) .bhd-select-selector{height:24px;padding-left:0}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-table-cell .bhd-select-selector .bhd-select-selection-search{inset-inline-start:0}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-table-cell .bhd-select-selector .bhd-select-selection-item{color:rgba(0,0,0,.85);font-size:16px;font-weight:600;line-height:24px}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-table-cell .bhd-select .bhd-select-arrow{color:rgba(0,0,0,.65);margin-top:-5px}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-table-cell .bhd-select-open .bhd-select-arrow{color:#f4523b}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-table-column-has-sorters .bhd-table-column-sorters{justify-content:flex-start}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-table-column-has-sorters .bhd-table-column-sorters>.bhd-table-column-title{flex:none}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-table-column-has-sorters .bhd-table-column-sorters>.bhd-table-column-sorter{color:rgba(0,0,0,.65);margin-left:8px}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-table-column-has-sorters .bhd-table-column-sorters>.bhd-table-column-sorter .bhd-table-column-sorter-inner .bhd-table-column-sorter-down{margin-top:-.1em}.index_module_Table__dfa8dab0.index_module_SmallTable__dfa8dab0 .bhd-table-column-has-sorters .bhd-table-column-sorters>.bhd-table-column-sorter .bhd-table-column-sorter-inner .bhd-table-column-sorter-up{margin-bottom:-.1em}.index_module_columnTootipClassName__dfa8dab0 .bhd-tooltip-content .bhd-tooltip-inner{color:rgba(0,0,0,.85);word-break:break-all}
@@ -1 +0,0 @@
1
- import{_ as t,j as e,a as n,b as i,T as o,c as r}from"./28cd83d3.esm.es5.production.js";import{useState as l,useRef as d,useEffect as a}from"react";import"react/jsx-runtime";import"react-dom";var u={Table:"index_module_Table__dfa8dab0",SmallTable:"index_module_SmallTable__dfa8dab0",columnTootipClassName:"index_module_columnTootipClassName__dfa8dab0"},c=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:14,n=0,i=document.createElement("div");return i.style.position="absolute",i.style.whiteSpace="nowrap",i.style.fontSize=e+"px",i.style.opacity="0",i.innerText=t,document.body.append(i),n=i.getBoundingClientRect().width,document.body.removeChild(i),n},s=function(r){var d=r.children,a=r.title,u=r.width,s=t(l(!1),2),m=s[0],h=s[1];return e(o,n(i({},r),{open:m,children:e("span",{onMouseEnter:function(t){var e=0;(e="function"==typeof u?u(t):u)?h(!(c(a)<e)):h(!0)},onMouseLeave:function(){h(!1)},children:d})}))},m=/^\d+%$/,h=/^\d+px$/,f=function(t){var e={};return parseFloat((e=window.getComputedStyle?getComputedStyle(t,null):t.currentStyle)["padding-left"])+parseFloat(e["padding-right"])},p=function(t){try{for(;t&&"TD"!==t.nodeName;)t=t.parentElement;var e=f(t);return t.clientWidth-e}catch(t){return null}},w=0,C=function(o){var c=d(null),f=d({timer:null}),C=o.defaultWidthRang,v=void 0===C?[180,240,320]:C,E=o.isFixedLeft,T=void 0===E||E,N=o.isFixedRight,g=void 0===N||N,y=o.bordered,_=void 0!==y&&y,L=o.kind,b=t(l(o.columns||[]),2),x=b[0],S=b[1],R=t(l(o.scroll||void 0),2),O=R[0],F=R[1],I=o.columnTootipClassName,W=o.columnTootipColor,M=function(){(t=document.createElement("div")).style.visibility="hidden",t.style.overflow="scroll",document.body.appendChild(t),e=document.createElement("div"),t.appendChild(e),r=t.offsetWidth-e.offsetWidth,t.parentNode.removeChild(t),w=r||w;var t,e,r,l=_?c.current.offsetWidth-2-w:c.current.offsetWidth-w,d=A(o.columns,l).columns;S(d);var a=O||{};a=n(i({},a),{x:l}),F(a)},A=function(t,o){var r=0,l=0,d=0;t=t.map(function(t){return t.width=t.width||"auto",m.test(t.width)?t.width=parseFloat(t.width)>=100?"auto":o*parseFloat(t.width)/100:"number"==typeof t.width?t.width=t.width:h.test(t.width)?t.width=parseFloat(t.width):t.width="auto","auto"===t.width?(r+=1,t.widthRang||(t.widthRang=v),l+=t.widthRang[0],d+=t.widthRang[1]):(l+=t.width,d+=t.width),t.onColumnCell||(t.onColumnCell=t.onCell||function(){return{}}),t.render||(t.ellipsis={showTitle:!1},t.render=function(t){return e(s,{width:function(t){return p(t.target)},title:t,trigger:"hover",overlayClassName:I||u.columnTootipClassName,color:W||"#FFF",children:e("span",{children:t})})}),t});var a=o-l;if(a>0){var c=0===r?a:0;t=(t=t.map(function(t){return"auto"===t.width&&(t.width=t.widthRang[0]+a/r,t.width>t.widthRang[2]&&(c+=t.width-t.widthRang[2],t.width=t.widthRang[2])),t})).map(function(e,n){return c>0&&n!==t.length-1&&(e.width+=c/(t.length-1)),e})}else t=a<0?t.map(function(e,n){return T&&0===n&&(e.fixed="left"),g&&n===t.length-1&&(e.fixed="right"),"auto"===e.width&&(e.width=e.widthRang[1]),e}):t.map(function(t){return"auto"===t.width&&(t.width=t.widthRang[0]),t});return t.map(function(t){return t.onCell=function(e,o){var r="function"==typeof t.onColumnCell?t.onColumnCell(e,o):{};return r.style=r.style?r.style:{},n(i({},r),{style:i({maxWidth:t.width+"px"},r.style)})},t}),{columns:t,scrollWidth:d}},U=function(){clearTimeout(f.current.timer),f.current.timer=setTimeout(function(){M()},1e3)};a(function(){return M(),window.addEventListener("resize",U),function(){clearTimeout(f.current.timer),window.removeEventListener("resize",U)}},[o.columns]),a(function(){F(o.scroll||void 0)},[o.scroll]);var j=n(i({bordered:!1},o),{columns:x,scroll:O||{x:"auto"}});return e("div",{className:"".concat(u.Table," ").concat("simple"===L?u.SmallTable:""),ref:c,children:e(r,i({},j))})};C.SELECTION_COLUMN=r.SELECTION_COLUMN,C.EXPAND_COLUMN=r.EXPAND_COLUMN,C.SELECTION_ALL=r.SELECTION_ALL,C.SELECTION_INVERT=r.SELECTION_INVERT,C.SELECTION_NONE=r.SELECTION_NONE,C.Column=r.Column,C.ColumnGroup=r.ColumnGroup;export{C as default};