bhd-components 0.9.15 → 0.9.17

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.
@@ -30,9 +30,17 @@ const BhdSelect = (props)=>{
30
30
  const renderSuffixIcon = ()=>{
31
31
  switch(arrowType){
32
32
  case "table":
33
- return /*#__PURE__*/ _jsx(CaretDownOutlined, {});
33
+ return /*#__PURE__*/ _jsx(CaretDownOutlined, {
34
+ style: {
35
+ pointerEvents: 'none'
36
+ }
37
+ });
34
38
  default:
35
- return /*#__PURE__*/ _jsx(CustomArrow, {});
39
+ return /*#__PURE__*/ _jsx(CustomArrow, {
40
+ style: {
41
+ pointerEvents: 'none'
42
+ }
43
+ });
36
44
  }
37
45
  };
38
46
  const filterOption = ()=>{
@@ -322,14 +322,14 @@ const HistoryFun = (props)=>{
322
322
  })
323
323
  ]
324
324
  }),
325
- /*#__PURE__*/ _jsx("div", {
326
- className: styles.main_list,
327
- id: "history_list",
328
- children: /*#__PURE__*/ _jsxs(Spin, {
329
- spinning: loading,
330
- tip: "加载中...",
325
+ /*#__PURE__*/ _jsx(Spin, {
326
+ spinning: loading,
327
+ tip: "加载中...",
328
+ children: /*#__PURE__*/ _jsxs("div", {
329
+ className: styles.main_list,
330
+ id: "history_list",
331
331
  children: [
332
- showLoadingState == 1 && /*#__PURE__*/ _jsxs("div", {
332
+ !loading && showLoadingState == 1 && /*#__PURE__*/ _jsxs("div", {
333
333
  className: styles.no_data,
334
334
  children: [
335
335
  /*#__PURE__*/ _jsx("img", {
@@ -340,7 +340,7 @@ const HistoryFun = (props)=>{
340
340
  })
341
341
  ]
342
342
  }),
343
- showLoadingState == 2 && /*#__PURE__*/ _jsxs("div", {
343
+ !loading && showLoadingState == 2 && /*#__PURE__*/ _jsxs("div", {
344
344
  className: styles.no_data,
345
345
  children: [
346
346
  /*#__PURE__*/ _jsx("img", {
@@ -351,7 +351,7 @@ const HistoryFun = (props)=>{
351
351
  })
352
352
  ]
353
353
  }),
354
- /*#__PURE__*/ _jsx("div", {
354
+ !loading && /*#__PURE__*/ _jsx("div", {
355
355
  className: styles.list_item,
356
356
  children: totalData.map((item)=>{
357
357
  let span = "";
@@ -2325,32 +2325,39 @@ const CustomerService = (props)=>{
2325
2325
  children: /*#__PURE__*/ _jsxs("div", {
2326
2326
  className: styles.main_content_flag,
2327
2327
  onMouseEnter: ()=>{
2328
- const dom = document.getElementById(item.id);
2329
- if (dom) {
2330
- const con_h = document.getElementById('chat_content').clientHeight - 24; //滚动区域的高度
2331
- const rectY = dom.getBoundingClientRect().y - 48;
2332
- const h = dom.clientHeight + 24; //当前元素高度
2333
- const topDom = dom.getElementsByClassName('operate_modal_showtop')[0];
2334
- const bottomDom = dom.getElementsByClassName('operate_modal_showbottom')[0];
2335
- if (topDom && bottomDom) {
2336
- console.log(h, con_h, rectY);
2337
- if (rectY > 0) {
2338
- topDom.style.cssText = "";
2339
- bottomDom.style.cssText = "visibility: hidden;";
2340
- // 上下都能显示时,显示到下边
2341
- if (h < con_h - rectY) {
2342
- topDom.style.cssText = "visibility: hidden;";
2343
- bottomDom.style.cssText = "";
2344
- }
2345
- } else {
2346
- // 上下都不显示
2347
- if (h > con_h && h - con_h > Math.abs(rectY)) {
2348
- console.log('rerererererer');
2349
- topDom.style.cssText = "visibility: hidden;";
2350
- bottomDom.style.cssText = `top:${-(h + rectY - 51)}px`;
2328
+ const isSmall = showType == 1 || showType == 3;
2329
+ const container = document.getElementById(isSmall ? "chat_content" : "chat_content_modal");
2330
+ if (container) {
2331
+ const dom = container.querySelector(`[id="${item.id}"]`);
2332
+ if (dom) {
2333
+ // const con_h=document.getElementById('chat_content').clientHeight-24;//滚动区域的高度
2334
+ const con_h = container.clientHeight - (isSmall ? 24 : 0); //滚动区域的高度;
2335
+ const rectY = dom.getBoundingClientRect().y - 48;
2336
+ const h = dom.clientHeight + (isSmall ? 24 : 0); //当前元素高度
2337
+ const topDom = dom.getElementsByClassName('operate_modal_showtop')[0];
2338
+ const bottomDom = dom.getElementsByClassName('operate_modal_showbottom')[0];
2339
+ // console.log({h,con_h,rectY,topDom,bottomDom})
2340
+ if (topDom && bottomDom) {
2341
+ if (rectY > 0) {
2342
+ topDom.style.cssText = "";
2343
+ bottomDom.style.cssText = "visibility: hidden;";
2344
+ // 上下都能显示时,显示到下边
2345
+ if (h < con_h - rectY) {
2346
+ console.log('上下都能显示时,显示到下边');
2347
+ topDom.style.cssText = "visibility: hidden;";
2348
+ bottomDom.style.cssText = "";
2349
+ }
2351
2350
  } else {
2352
- topDom.style.cssText = "visibility: hidden;";
2353
- bottomDom.style.cssText = "";
2351
+ // 上下都不显示
2352
+ if (h > con_h && h - con_h > Math.abs(rectY)) {
2353
+ console.log('上下都不显示');
2354
+ topDom.style.cssText = "visibility: hidden;";
2355
+ bottomDom.style.cssText = `top:${-(h + rectY - 51 - (isSmall ? 0 : 58))}px;`;
2356
+ } else {
2357
+ console.log('12312312');
2358
+ topDom.style.cssText = "visibility: hidden;";
2359
+ bottomDom.style.cssText = "";
2360
+ }
2354
2361
  }
2355
2362
  }
2356
2363
  }
@@ -1956,11 +1956,6 @@
1956
1956
  line-height: 100%; /* 14px */
1957
1957
  }
1958
1958
  }
1959
- :global{
1960
- .bhd-spin-nested-loading{
1961
- height:calc(100% - 130px)
1962
- }
1963
- }
1964
1959
  }
1965
1960
  }
1966
1961
  @keyframes mymove {
@@ -1985,6 +1980,12 @@
1985
1980
  .anticon {
1986
1981
  vertical-align: 0;
1987
1982
  }
1983
+ .bhd-spin-nested-loading {
1984
+ height: calc(100% - 72px - 57px);
1985
+ & >div>.bhd-spin{
1986
+ max-height:436px;
1987
+ }
1988
+ }
1988
1989
  }
1989
1990
  }
1990
1991
  //全屏下的历史记录
@@ -1946,11 +1946,6 @@
1946
1946
  line-height: 100%; /* 14px */
1947
1947
  }
1948
1948
  }
1949
- :global{
1950
- .bhd-spin-nested-loading{
1951
- height:calc(100% - 130px)
1952
- }
1953
- }
1954
1949
  }
1955
1950
  }
1956
1951
  @keyframes mymove {
@@ -1975,6 +1970,12 @@
1975
1970
  .anticon {
1976
1971
  vertical-align: 0;
1977
1972
  }
1973
+ .bhd-spin-nested-loading {
1974
+ height: calc(100% - 72px - 57px);
1975
+ & >div>.bhd-spin{
1976
+ max-height:436px;
1977
+ }
1978
+ }
1978
1979
  }
1979
1980
  }
1980
1981
  //全屏下的历史记录
@@ -1,6 +1,5 @@
1
1
  @import "../theme/variable.less";
2
2
  :global {
3
- /* 成功 */
4
3
  :local(.customSuccess) {
5
4
  &.bhd-message-notice {
6
5
  .bhd-message-notice-content {
@@ -27,7 +26,6 @@
27
26
  }
28
27
  }
29
28
  }
30
- /* 警告 */
31
29
 
32
30
  :local(.customWarning) {
33
31
  &.bhd-message-notice {
@@ -56,7 +54,6 @@
56
54
  }
57
55
  }
58
56
 
59
- /* 错误 */
60
57
 
61
58
  :local(.customError) {
62
59
  &.bhd-message-notice {
@@ -33,9 +33,17 @@ var BhdSelect = function(props) {
33
33
  var renderSuffixIcon = function() {
34
34
  switch(arrowType){
35
35
  case "table":
36
- return /*#__PURE__*/ _jsx(CaretDownOutlined, {});
36
+ return /*#__PURE__*/ _jsx(CaretDownOutlined, {
37
+ style: {
38
+ pointerEvents: "none"
39
+ }
40
+ });
37
41
  default:
38
- return /*#__PURE__*/ _jsx(CustomArrow, {});
42
+ return /*#__PURE__*/ _jsx(CustomArrow, {
43
+ style: {
44
+ pointerEvents: "none"
45
+ }
46
+ });
39
47
  }
40
48
  };
41
49
  var filterOption = function() {
@@ -327,14 +327,14 @@ var HistoryFun = function(props) {
327
327
  })
328
328
  ]
329
329
  }),
330
- /*#__PURE__*/ _jsx("div", {
331
- className: styles.main_list,
332
- id: "history_list",
333
- children: /*#__PURE__*/ _jsxs(Spin, {
334
- spinning: loading,
335
- tip: "加载中...",
330
+ /*#__PURE__*/ _jsx(Spin, {
331
+ spinning: loading,
332
+ tip: "加载中...",
333
+ children: /*#__PURE__*/ _jsxs("div", {
334
+ className: styles.main_list,
335
+ id: "history_list",
336
336
  children: [
337
- showLoadingState == 1 && /*#__PURE__*/ _jsxs("div", {
337
+ !loading && showLoadingState == 1 && /*#__PURE__*/ _jsxs("div", {
338
338
  className: styles.no_data,
339
339
  children: [
340
340
  /*#__PURE__*/ _jsx("img", {
@@ -345,7 +345,7 @@ var HistoryFun = function(props) {
345
345
  })
346
346
  ]
347
347
  }),
348
- showLoadingState == 2 && /*#__PURE__*/ _jsxs("div", {
348
+ !loading && showLoadingState == 2 && /*#__PURE__*/ _jsxs("div", {
349
349
  className: styles.no_data,
350
350
  children: [
351
351
  /*#__PURE__*/ _jsx("img", {
@@ -356,7 +356,7 @@ var HistoryFun = function(props) {
356
356
  })
357
357
  ]
358
358
  }),
359
- /*#__PURE__*/ _jsx("div", {
359
+ !loading && /*#__PURE__*/ _jsx("div", {
360
360
  className: styles.list_item,
361
361
  children: totalData.map(function(item) {
362
362
  var span = "";
@@ -2419,32 +2419,39 @@ var CustomerService = function(props) {
2419
2419
  children: /*#__PURE__*/ _jsxs("div", {
2420
2420
  className: styles.main_content_flag,
2421
2421
  onMouseEnter: function() {
2422
- var dom = document.getElementById(item.id);
2423
- if (dom) {
2424
- var con_h = document.getElementById("chat_content").clientHeight - 24; //滚动区域的高度
2425
- var rectY = dom.getBoundingClientRect().y - 48;
2426
- var h = dom.clientHeight + 24; //当前元素高度
2427
- var topDom = dom.getElementsByClassName("operate_modal_showtop")[0];
2428
- var bottomDom = dom.getElementsByClassName("operate_modal_showbottom")[0];
2429
- if (topDom && bottomDom) {
2430
- console.log(h, con_h, rectY);
2431
- if (rectY > 0) {
2432
- topDom.style.cssText = "";
2433
- bottomDom.style.cssText = "visibility: hidden;";
2434
- // 上下都能显示时,显示到下边
2435
- if (h < con_h - rectY) {
2436
- topDom.style.cssText = "visibility: hidden;";
2437
- bottomDom.style.cssText = "";
2438
- }
2439
- } else {
2440
- // 上下都不显示
2441
- if (h > con_h && h - con_h > Math.abs(rectY)) {
2442
- console.log("rerererererer");
2443
- topDom.style.cssText = "visibility: hidden;";
2444
- bottomDom.style.cssText = "top:".concat(-(h + rectY - 51), "px");
2422
+ var isSmall = showType == 1 || showType == 3;
2423
+ var container = document.getElementById(isSmall ? "chat_content" : "chat_content_modal");
2424
+ if (container) {
2425
+ var dom = container.querySelector('[id="'.concat(item.id, '"]'));
2426
+ if (dom) {
2427
+ // const con_h=document.getElementById('chat_content').clientHeight-24;//滚动区域的高度
2428
+ var con_h = container.clientHeight - (isSmall ? 24 : 0); //滚动区域的高度;
2429
+ var rectY = dom.getBoundingClientRect().y - 48;
2430
+ var h = dom.clientHeight + (isSmall ? 24 : 0); //当前元素高度
2431
+ var topDom = dom.getElementsByClassName("operate_modal_showtop")[0];
2432
+ var bottomDom = dom.getElementsByClassName("operate_modal_showbottom")[0];
2433
+ // console.log({h,con_h,rectY,topDom,bottomDom})
2434
+ if (topDom && bottomDom) {
2435
+ if (rectY > 0) {
2436
+ topDom.style.cssText = "";
2437
+ bottomDom.style.cssText = "visibility: hidden;";
2438
+ // 上下都能显示时,显示到下边
2439
+ if (h < con_h - rectY) {
2440
+ console.log("上下都能显示时,显示到下边");
2441
+ topDom.style.cssText = "visibility: hidden;";
2442
+ bottomDom.style.cssText = "";
2443
+ }
2445
2444
  } else {
2446
- topDom.style.cssText = "visibility: hidden;";
2447
- bottomDom.style.cssText = "";
2445
+ // 上下都不显示
2446
+ if (h > con_h && h - con_h > Math.abs(rectY)) {
2447
+ console.log("上下都不显示");
2448
+ topDom.style.cssText = "visibility: hidden;";
2449
+ bottomDom.style.cssText = "top:".concat(-(h + rectY - 51 - (isSmall ? 0 : 58)), "px;");
2450
+ } else {
2451
+ console.log("12312312");
2452
+ topDom.style.cssText = "visibility: hidden;";
2453
+ bottomDom.style.cssText = "";
2454
+ }
2448
2455
  }
2449
2456
  }
2450
2457
  }
@@ -1956,11 +1956,6 @@
1956
1956
  line-height: 100%; /* 14px */
1957
1957
  }
1958
1958
  }
1959
- :global{
1960
- .bhd-spin-nested-loading{
1961
- height:calc(100% - 130px)
1962
- }
1963
- }
1964
1959
  }
1965
1960
  }
1966
1961
  @keyframes mymove {
@@ -1985,6 +1980,12 @@
1985
1980
  .anticon {
1986
1981
  vertical-align: 0;
1987
1982
  }
1983
+ .bhd-spin-nested-loading {
1984
+ height: calc(100% - 72px - 57px);
1985
+ & >div>.bhd-spin{
1986
+ max-height:436px;
1987
+ }
1988
+ }
1988
1989
  }
1989
1990
  }
1990
1991
  //全屏下的历史记录
@@ -1946,11 +1946,6 @@
1946
1946
  line-height: 100%; /* 14px */
1947
1947
  }
1948
1948
  }
1949
- :global{
1950
- .bhd-spin-nested-loading{
1951
- height:calc(100% - 130px)
1952
- }
1953
- }
1954
1949
  }
1955
1950
  }
1956
1951
  @keyframes mymove {
@@ -1975,6 +1970,12 @@
1975
1970
  .anticon {
1976
1971
  vertical-align: 0;
1977
1972
  }
1973
+ .bhd-spin-nested-loading {
1974
+ height: calc(100% - 72px - 57px);
1975
+ & >div>.bhd-spin{
1976
+ max-height:436px;
1977
+ }
1978
+ }
1978
1979
  }
1979
1980
  }
1980
1981
  //全屏下的历史记录
@@ -1,6 +1,5 @@
1
1
  @import "../theme/variable.less";
2
2
  :global {
3
- /* 成功 */
4
3
  :local(.customSuccess) {
5
4
  &.bhd-message-notice {
6
5
  .bhd-message-notice-content {
@@ -27,7 +26,6 @@
27
26
  }
28
27
  }
29
28
  }
30
- /* 警告 */
31
29
 
32
30
  :local(.customWarning) {
33
31
  &.bhd-message-notice {
@@ -56,7 +54,6 @@
56
54
  }
57
55
  }
58
56
 
59
- /* 错误 */
60
57
 
61
58
  :local(.customError) {
62
59
  &.bhd-message-notice {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bhd-components",
3
- "version": "0.9.15",
3
+ "version": "0.9.17",
4
4
  "description": "组件功能描述",
5
5
  "config": {
6
6
  "commitizen": {
@@ -42,6 +42,7 @@
42
42
  "scripts": {
43
43
  "start": "ice-pkg start",
44
44
  "build": "ice-pkg build",
45
+ "build:esm": "cross-env NODE_TYPE=esm ice-pkg build",
45
46
  "build:online": "cross-env NODE_TYPE=online ice-pkg build ",
46
47
  "build:online_dev": "cross-env NODE_TYPE=online_dev ice-pkg build ",
47
48
  "prepublishOnly": "npm run build",
@@ -50,7 +51,9 @@
50
51
  "stylelint": "stylelint \"**/*.{css,scss,less}\"",
51
52
  "lint": "npm run eslint && npm run stylelint",
52
53
  "prepare": "husky install",
53
- "commit": "git add . && npx cz"
54
+ "commit": "git add . && npx cz",
55
+ "nodemon": "nodemon --config nodemon.json",
56
+ "proxy":"node lib/proxy/index.js"
54
57
  },
55
58
  "keywords": [
56
59
  "ice",
@@ -65,7 +68,6 @@
65
68
  "@rangermauve/fetch-event-source": "^1.0.3",
66
69
  "@swc/helpers": "^0.5.1",
67
70
  "antd": "5.6.1",
68
- "axios": "^1.6.0",
69
71
  "cross-env": "^7.0.3",
70
72
  "highlight.js": "^11.9.0",
71
73
  "html2canvas": "^1.4.1",
@@ -83,10 +85,14 @@
83
85
  "@iceworks/spec": "^1.0.0",
84
86
  "@types/react": "^18.0.0",
85
87
  "@types/react-dom": "^18.0.0",
88
+ "axios": "^1.6.0",
86
89
  "commitizen": "^4.3.0",
87
90
  "commitlint": "^19.4.0",
91
+ "cors": "^2.8.5",
88
92
  "cz-customizable": "^7.0.0",
89
93
  "eslint": "^7.0.0",
94
+ "express": "^4.21.1",
95
+ "http-proxy-middleware": "^3.0.3",
90
96
  "husky": "^9.0.11",
91
97
  "lint-staged": "^15.2.7",
92
98
  "react": "^18.0.0",