bhd-components 0.9.29 → 0.10.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.
Files changed (103) hide show
  1. package/dist/index.esm.es5.development.css +662 -0
  2. package/dist/index.esm.es5.development.js +2694 -159
  3. package/dist/index.esm.es5.production.css +1 -1
  4. package/dist/index.esm.es5.production.js +1 -1
  5. package/dist/vendor.esm.es5.development.js +3940 -638
  6. package/dist/vendor.esm.es5.production.js +136 -136
  7. package/es2017/AIMessageList/components/content/index.d.ts +4 -0
  8. package/es2017/AIMessageList/components/content/index.js +29 -0
  9. package/es2017/AIMessageList/components/content/index.module.less +8 -0
  10. package/es2017/AIMessageList/components/copyIcon/index.d.ts +7 -0
  11. package/es2017/AIMessageList/components/copyIcon/index.js +58 -0
  12. package/es2017/AIMessageList/components/copyIcon/index.module.less +22 -0
  13. package/es2017/AIMessageList/components/errorCallback/index.d.ts +3 -0
  14. package/es2017/AIMessageList/components/errorCallback/index.js +6 -0
  15. package/es2017/AIMessageList/components/fileList/fileIcon.d.ts +3 -0
  16. package/es2017/AIMessageList/components/fileList/fileIcon.js +970 -0
  17. package/es2017/AIMessageList/components/fileList/index.d.ts +4 -0
  18. package/es2017/AIMessageList/components/fileList/index.js +299 -0
  19. package/es2017/AIMessageList/components/fileList/index.module.less +95 -0
  20. package/es2017/AIMessageList/components/footer/index.d.ts +10 -0
  21. package/es2017/AIMessageList/components/footer/index.js +296 -0
  22. package/es2017/AIMessageList/components/footer/index.module.less +51 -0
  23. package/es2017/AIMessageList/components/header/index.d.ts +9 -0
  24. package/es2017/AIMessageList/components/header/index.js +94 -0
  25. package/es2017/AIMessageList/components/header/index.module.less +31 -0
  26. package/es2017/AIMessageList/components/referencesIcon/index.d.ts +9 -0
  27. package/es2017/AIMessageList/components/referencesIcon/index.js +37 -0
  28. package/es2017/AIMessageList/components/referencesIcon/index.module.less +13 -0
  29. package/es2017/AIMessageList/components/renderReferrnce/index.d.ts +10 -0
  30. package/es2017/AIMessageList/components/renderReferrnce/index.js +68 -0
  31. package/es2017/AIMessageList/components/renderReferrnce/index.module.less +64 -0
  32. package/es2017/AIMessageList/components/sendBtn/index.d.ts +4 -0
  33. package/es2017/AIMessageList/components/sendBtn/index.js +46 -0
  34. package/es2017/AIMessageList/components/sendBtn/index.module.less +25 -0
  35. package/es2017/AIMessageList/components/uplodaFileBtn/index.d.ts +4 -0
  36. package/es2017/AIMessageList/components/uplodaFileBtn/index.js +33 -0
  37. package/es2017/AIMessageList/components/uplodaFileBtn/index.module.less +5 -0
  38. package/es2017/AIMessageList/components/virtuosoList/index.d.ts +5 -0
  39. package/es2017/AIMessageList/components/virtuosoList/index.js +507 -0
  40. package/es2017/AIMessageList/components/virtuosoList/index.module.less +381 -0
  41. package/es2017/AIMessageList/index.d.ts +4 -0
  42. package/es2017/AIMessageList/index.js +58 -0
  43. package/es2017/AIMessageList/index.module.less +20 -0
  44. package/es2017/AIMessageList/type.d.ts +242 -0
  45. package/es2017/customerService/index.js +1 -0
  46. package/es2017/images/loading2.js +2 -0
  47. package/es2017/index.d.ts +1 -0
  48. package/es2017/index.js +1 -0
  49. package/es2017/utils/Date.d.ts +2 -1
  50. package/es2017/utils/Date.js +2 -1
  51. package/es2017/utils/dom.d.ts +4 -1
  52. package/es2017/utils/dom.js +44 -1
  53. package/es2017/utils/number.d.ts +1 -0
  54. package/es2017/utils/number.js +9 -0
  55. package/esm/AIMessageList/components/content/index.d.ts +4 -0
  56. package/esm/AIMessageList/components/content/index.js +29 -0
  57. package/esm/AIMessageList/components/content/index.module.less +8 -0
  58. package/esm/AIMessageList/components/copyIcon/index.d.ts +7 -0
  59. package/esm/AIMessageList/components/copyIcon/index.js +61 -0
  60. package/esm/AIMessageList/components/copyIcon/index.module.less +22 -0
  61. package/esm/AIMessageList/components/errorCallback/index.d.ts +3 -0
  62. package/esm/AIMessageList/components/errorCallback/index.js +6 -0
  63. package/esm/AIMessageList/components/fileList/fileIcon.d.ts +3 -0
  64. package/esm/AIMessageList/components/fileList/fileIcon.js +970 -0
  65. package/esm/AIMessageList/components/fileList/index.d.ts +4 -0
  66. package/esm/AIMessageList/components/fileList/index.js +325 -0
  67. package/esm/AIMessageList/components/fileList/index.module.less +95 -0
  68. package/esm/AIMessageList/components/footer/index.d.ts +10 -0
  69. package/esm/AIMessageList/components/footer/index.js +304 -0
  70. package/esm/AIMessageList/components/footer/index.module.less +51 -0
  71. package/esm/AIMessageList/components/header/index.d.ts +9 -0
  72. package/esm/AIMessageList/components/header/index.js +96 -0
  73. package/esm/AIMessageList/components/header/index.module.less +31 -0
  74. package/esm/AIMessageList/components/referencesIcon/index.d.ts +9 -0
  75. package/esm/AIMessageList/components/referencesIcon/index.js +39 -0
  76. package/esm/AIMessageList/components/referencesIcon/index.module.less +13 -0
  77. package/esm/AIMessageList/components/renderReferrnce/index.d.ts +10 -0
  78. package/esm/AIMessageList/components/renderReferrnce/index.js +72 -0
  79. package/esm/AIMessageList/components/renderReferrnce/index.module.less +64 -0
  80. package/esm/AIMessageList/components/sendBtn/index.d.ts +4 -0
  81. package/esm/AIMessageList/components/sendBtn/index.js +48 -0
  82. package/esm/AIMessageList/components/sendBtn/index.module.less +25 -0
  83. package/esm/AIMessageList/components/uplodaFileBtn/index.d.ts +4 -0
  84. package/esm/AIMessageList/components/uplodaFileBtn/index.js +33 -0
  85. package/esm/AIMessageList/components/uplodaFileBtn/index.module.less +5 -0
  86. package/esm/AIMessageList/components/virtuosoList/index.d.ts +5 -0
  87. package/esm/AIMessageList/components/virtuosoList/index.js +484 -0
  88. package/esm/AIMessageList/components/virtuosoList/index.module.less +381 -0
  89. package/esm/AIMessageList/index.d.ts +4 -0
  90. package/esm/AIMessageList/index.js +58 -0
  91. package/esm/AIMessageList/index.module.less +20 -0
  92. package/esm/AIMessageList/type.d.ts +242 -0
  93. package/esm/customerService/index.js +1 -0
  94. package/esm/images/loading2.js +2 -0
  95. package/esm/index.d.ts +1 -0
  96. package/esm/index.js +1 -0
  97. package/esm/utils/Date.d.ts +2 -1
  98. package/esm/utils/Date.js +2 -1
  99. package/esm/utils/dom.d.ts +4 -1
  100. package/esm/utils/dom.js +45 -1
  101. package/esm/utils/number.d.ts +1 -0
  102. package/esm/utils/number.js +9 -0
  103. package/package.json +2 -1
@@ -0,0 +1,64 @@
1
+ .footerReferences {
2
+ width: 100%;
3
+ display: flex;
4
+ align-items: center;
5
+ gap: 8px;
6
+ padding: 12px 16px;
7
+ padding-top: 0;
8
+ box-sizing: border-box;
9
+ overflow: hidden;
10
+ .footerReferences_left {
11
+ padding: 8px;
12
+ background: #e7e7e7;
13
+ border-radius: 2px;
14
+ color: rgba(0, 0, 0, 0.65);
15
+ font-size: 12px;
16
+ line-height: 18px;
17
+ flex: 1;
18
+ overflow: hidden;
19
+
20
+ /* 两行出现省略号 */
21
+ .footerReferences_left_text {
22
+ width: 100%;
23
+ max-height: 36px;
24
+ word-break: break-all;
25
+ display: -webkit-box;
26
+ -webkit-line-clamp: 2;
27
+ -webkit-box-orient: vertical;
28
+ overflow: hidden;
29
+ text-overflow: ellipsis;
30
+ word-wrap: break-word;
31
+ }
32
+ .footerReferences_left_file{
33
+ width: 100%;
34
+ box-sizing: border-box;
35
+ border-radius: 2px;
36
+ display: flex;
37
+ align-items: center;
38
+ gap: 8px;
39
+ overflow: hidden;
40
+ .footerReferences_left_file_icon{
41
+ flex-shrink: 0;
42
+ &>i{
43
+ font-size: 24px;
44
+ }
45
+ }
46
+ .footerReferences_left_file_title{
47
+ flex: 1;
48
+ white-space: nowrap;
49
+ overflow: hidden;
50
+ text-overflow: ellipsis;
51
+ }
52
+ }
53
+ }
54
+ .footerReferences_right {
55
+ cursor: pointer;
56
+ display: flex;
57
+ :global {
58
+ .anticon-close-circle {
59
+ font-size: 20px;
60
+ color: #bfbfbf;
61
+ }
62
+ }
63
+ }
64
+ }
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { sendBtnProps } from "../../type";
3
+ declare const SendBtn: (props: sendBtnProps) => React.JSX.Element;
4
+ export default SendBtn;
@@ -0,0 +1,46 @@
1
+ import { jsx as _jsx } from "@ice/jsx-runtime/jsx-runtime";
2
+ import React from "react";
3
+ import styles from "./index.module.less";
4
+ import { Popover } from "antd";
5
+ const sendBtnSvg = /*#__PURE__*/ _jsx("svg", {
6
+ xmlns: "http://www.w3.org/2000/svg",
7
+ width: "1em",
8
+ height: "1em",
9
+ viewBox: "0 0 24 24",
10
+ fill: "currentColor",
11
+ children: /*#__PURE__*/ _jsx("path", {
12
+ d: "M20.3831 4.11378C20.0797 3.96207 19.7763 3.96207 19.6246 4.11378L4.45533 11.6984C4.15195 11.6984 4.00024 12.0018 4.00024 12.3052C4.00024 12.6085 4.15195 12.9119 4.30364 12.9119L7.94426 15.1874C8.24766 15.3391 8.55105 15.3391 8.85443 15.0357L16.8942 7.7544L17.1975 7.90609L9.91627 15.6425C9.76458 15.7941 9.76458 15.9458 9.76458 16.0975V19.4348C9.76458 19.7381 9.91627 20.0415 10.2197 20.1932C10.523 20.3449 10.8264 20.1932 10.9781 20.0415L12.7984 18.2212L16.4391 20.6483C16.5908 20.8 16.7425 20.8 16.8942 20.8H17.1975C17.5009 20.6483 17.6526 20.4966 17.6526 20.1932L20.6865 5.02393C20.6865 4.56885 20.6865 4.26547 20.3831 4.11378Z"
13
+ })
14
+ });
15
+ const sendingSvg = /*#__PURE__*/ _jsx("svg", {
16
+ xmlns: "http://www.w3.org/2000/svg",
17
+ width: "1em",
18
+ height: "1em",
19
+ viewBox: "0 0 16 16",
20
+ fill: "currentColor",
21
+ children: /*#__PURE__*/ _jsx("path", {
22
+ d: "M8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0ZM8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1ZM9.5 5C9.89782 5 10.2792 5.15815 10.5605 5.43945C10.8419 5.72076 11 6.10218 11 6.5V9.5C11 9.89782 10.8419 10.2792 10.5605 10.5605C10.2792 10.8419 9.89782 11 9.5 11H6.5C6.10218 11 5.72076 10.8419 5.43945 10.5605C5.15815 10.2792 5 9.89782 5 9.5V6.5C5 6.10218 5.15815 5.72076 5.43945 5.43945C5.72076 5.15815 6.10218 5 6.5 5H9.5Z"
23
+ })
24
+ });
25
+ const SendBtn = (props)=>{
26
+ const { prefix, canSendMsg, sending, stopMessage } = props;
27
+ const getCls = (clsName)=>{
28
+ return styles[clsName] + " " + prefix + "-" + clsName;
29
+ };
30
+ if (sending) {
31
+ return /*#__PURE__*/ _jsx(Popover, {
32
+ content: "停止生成",
33
+ overlayClassName: styles.popover,
34
+ children: /*#__PURE__*/ _jsx("i", {
35
+ className: `${getCls("sendingIcon")}`,
36
+ onClick: ()=>stopMessage(),
37
+ children: sendingSvg
38
+ })
39
+ });
40
+ }
41
+ return /*#__PURE__*/ _jsx("i", {
42
+ className: `${getCls("sendBtnIcon")} ${canSendMsg ? "" : getCls("disabled")}`,
43
+ children: sendBtnSvg
44
+ });
45
+ };
46
+ export default SendBtn;
@@ -0,0 +1,25 @@
1
+ .sendBtnIcon {
2
+ font-size: 24px;
3
+ display: flex;
4
+ cursor: pointer;
5
+ color: #5991ef;
6
+ &.disabled {
7
+ color: rgba(0, 0, 0, 0.25);
8
+ cursor: not-allowed;
9
+ }
10
+ }
11
+
12
+ .sendingIcon {
13
+ font-size: 18px;
14
+ display: flex;
15
+ cursor: pointer;
16
+ color: #f4523b;
17
+ }
18
+
19
+ .popover {
20
+ :global {
21
+ .bhd-popover-inner-content {
22
+ color: rgba(0, 0, 0, 0.65)!important;
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { uploadFileBtnProps } from "../../type";
3
+ declare const SendBtn: (props: uploadFileBtnProps) => React.JSX.Element;
4
+ export default SendBtn;
@@ -0,0 +1,33 @@
1
+ import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
2
+ import { jsx as _jsx } from "@ice/jsx-runtime/jsx-runtime";
3
+ import React from "react";
4
+ import styles from "./index.module.less";
5
+ import { Upload } from "antd";
6
+ const uplodaFileBtnSvg = /*#__PURE__*/ _jsx("svg", {
7
+ xmlns: "http://www.w3.org/2000/svg",
8
+ width: "1em",
9
+ height: "1em",
10
+ viewBox: "0 0 24 24",
11
+ fill: "curretnColor",
12
+ children: /*#__PURE__*/ _jsx("path", {
13
+ d: "M18.6853 7.62742C17.8428 6.79307 16.7044 6.32615 15.5187 6.3287H15.5067C14.9307 6.3287 14.3694 6.43537 13.8347 6.64871C13.2814 6.86872 12.7814 7.19407 12.3547 7.61542L8.1774 11.7449C7.93976 11.9789 7.75147 12.2582 7.62368 12.5663C7.49588 12.8743 7.43118 13.2049 7.4334 13.5384C7.43474 14.2157 7.70273 14.8531 8.18673 15.3318C8.67073 15.8118 9.31339 16.0745 9.99872 16.0758H10.0041C10.6867 16.0758 11.328 15.8145 11.808 15.3411L15.4747 11.7169C15.5343 11.6586 15.5818 11.5889 15.6141 11.512C15.6465 11.435 15.6632 11.3524 15.6632 11.2689C15.6632 11.1855 15.6465 11.1028 15.6141 11.0259C15.5818 10.949 15.5343 10.8793 15.4747 10.8209C15.3544 10.7019 15.1919 10.6351 15.0227 10.6351C14.8534 10.6351 14.691 10.7019 14.5707 10.8209L10.904 14.4437C10.7851 14.5612 10.6442 14.6541 10.4893 14.717C10.3344 14.78 10.1686 14.8117 10.0014 14.8104H10.0001C9.65919 14.8107 9.33196 14.6766 9.08939 14.4371C8.96981 14.3197 8.87485 14.1796 8.81006 14.0251C8.74527 13.8705 8.71195 13.7046 8.71206 13.537C8.71037 13.3709 8.7422 13.2062 8.80567 13.0527C8.86913 12.8992 8.96291 12.7601 9.08139 12.6437L13.2587 8.51146C13.8576 7.9204 14.6666 7.59138 15.508 7.59676H15.5173C16.3656 7.59544 17.1802 7.92894 17.784 8.5248C18.388 9.12216 18.7213 9.91686 18.7227 10.7636C18.7254 11.1781 18.6451 11.5889 18.4864 11.9718C18.3277 12.3548 18.0938 12.702 17.7987 12.993L13.3667 17.3799C12.4776 18.2529 11.2794 18.7389 10.0334 18.7319H10.0214C8.76654 18.7335 7.56186 18.2394 6.66941 17.3572C6.22896 16.9252 5.8792 16.4096 5.64062 15.8406C5.40205 15.2716 5.27948 14.6607 5.28009 14.0437C5.27585 13.4298 5.39486 12.8212 5.63007 12.2541C5.86528 11.6871 6.2119 11.1729 6.64941 10.7422L12.3734 5.08464C12.4332 5.02626 12.4808 4.95648 12.5133 4.87942C12.5458 4.80236 12.5625 4.71958 12.5625 4.63595C12.5625 4.55233 12.5458 4.46954 12.5133 4.39248C12.4808 4.31543 12.4332 4.24565 12.3734 4.18727C12.2529 4.06755 12.0901 4.00025 11.9203 4C11.7505 3.99975 11.5875 4.06658 11.4667 4.18593L5.74675 9.84486C5.18956 10.3931 4.74792 11.0476 4.44792 11.7694C4.14792 12.4913 3.99564 13.266 4.00009 14.0477C4.00143 14.8211 4.15076 15.5745 4.44542 16.2865C4.75105 17.0251 5.20126 17.6952 5.76956 18.2574C6.33787 18.8196 7.01282 19.2624 7.75473 19.56C8.47206 19.8493 9.23472 19.996 10.0174 20H10.0347C11.6174 20.0024 13.1375 19.3822 14.2667 18.2732L18.7 13.8904C19.1135 13.4806 19.4414 12.9926 19.6646 12.4549C19.8877 11.9172 20.0018 11.3404 20 10.7582C19.999 10.1753 19.8823 9.59842 19.6566 9.06098C19.4309 8.52354 19.1008 8.03627 18.6853 7.62742Z"
14
+ })
15
+ });
16
+ const SendBtn = (props)=>{
17
+ const { prefix, fileUpload, customRequest } = props;
18
+ const uplodaProps = _object_spread({}, fileUpload);
19
+ const getCls = (clsName)=>{
20
+ return styles[clsName] + " " + prefix + "-" + clsName;
21
+ };
22
+ return /*#__PURE__*/ _jsx(Upload, {
23
+ fileList: [],
24
+ accept: uplodaProps.accept,
25
+ customRequest: customRequest,
26
+ multiple: !!uplodaProps.multiple,
27
+ children: /*#__PURE__*/ _jsx("i", {
28
+ className: `${getCls("uploadFileBtn")}`,
29
+ children: uplodaFileBtnSvg
30
+ })
31
+ });
32
+ };
33
+ export default SendBtn;
@@ -0,0 +1,5 @@
1
+ .uploadFileBtn{
2
+ font-size: 24px;
3
+ display: flex;
4
+ cursor: pointer;
5
+ }
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import type { VirtuosoListProps, VirtuosoListRefProps } from "../../type";
3
+ import "highlight.js/styles/github.css";
4
+ declare const VirtuosoList: React.ForwardRefExoticComponent<VirtuosoListProps & React.RefAttributes<VirtuosoListRefProps>>;
5
+ export default VirtuosoList;