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,4 @@
1
+ import React from "react";
2
+ import type { contentProps, contentRefProps } from "../../type";
3
+ declare const Content: React.ForwardRefExoticComponent<contentProps & React.RefAttributes<contentRefProps>>;
4
+ export default Content;
@@ -0,0 +1,29 @@
1
+ import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
2
+ import { jsx as _jsx } from "@ice/jsx-runtime/jsx-runtime";
3
+ import React, { useRef, useImperativeHandle, forwardRef } from "react";
4
+ import styles from "./index.module.less";
5
+ import VirtuosoList from "../virtuosoList";
6
+ const Content = /*#__PURE__*/ forwardRef((props, ref)=>{
7
+ const { prefix, contentConfig, apiRef } = props;
8
+ const { className = "" } = contentConfig;
9
+ const listRef = useRef(null);
10
+ useImperativeHandle(ref, ()=>{
11
+ return _object_spread({}, listRef.current);
12
+ });
13
+ const getCls = (clsName)=>{
14
+ return styles[clsName] + " " + prefix + "-" + clsName;
15
+ };
16
+ return /*#__PURE__*/ _jsx("div", {
17
+ className: `${getCls("content")} ${className}`,
18
+ children: /*#__PURE__*/ _jsx("div", {
19
+ className: `${getCls("contentList")}`,
20
+ children: /*#__PURE__*/ _jsx(VirtuosoList, {
21
+ ref: listRef,
22
+ prefix: prefix,
23
+ contentConfig: contentConfig,
24
+ apiRef: apiRef
25
+ })
26
+ })
27
+ });
28
+ });
29
+ export default Content;
@@ -0,0 +1,8 @@
1
+ .content{
2
+ width: 100%;
3
+ height: 100%;
4
+ .contentList{
5
+ width: 100%;
6
+ height: 100%;
7
+ }
8
+ }
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ interface CopyIconProps {
3
+ prefix: string;
4
+ content: string;
5
+ }
6
+ declare const CopyIcon: (props: CopyIconProps) => React.JSX.Element;
7
+ export default CopyIcon;
@@ -0,0 +1,58 @@
1
+ import { jsx as _jsx } from "@ice/jsx-runtime/jsx-runtime";
2
+ import React, { useEffect, useState, useRef } from "react";
3
+ import styles from "./index.module.less";
4
+ import { copyText } from "../../../utils/dom";
5
+ const copyIconSvg = /*#__PURE__*/ _jsx("i", {
6
+ children: /*#__PURE__*/ _jsx("svg", {
7
+ xmlns: "http://www.w3.org/2000/svg",
8
+ width: "1em",
9
+ height: "1em",
10
+ viewBox: "0 0 20 20",
11
+ fill: "currentColor",
12
+ children: /*#__PURE__*/ _jsx("path", {
13
+ d: "M7.97375 3H15.7106C16.0526 3 16.3806 3.13585 16.6224 3.37768C16.8642 3.6195 17.0001 3.94748 17.0001 4.28947V12.0263C17.0001 12.3683 16.8642 12.6963 16.6224 12.9381C16.3806 13.1799 16.0526 13.3158 15.7106 13.3158H7.97375C7.63176 13.3158 7.30377 13.1799 7.06195 12.9381C6.82013 12.6963 6.68427 12.3683 6.68427 12.0263V4.28947C6.68427 3.94748 6.82013 3.6195 7.06195 3.37768C7.30377 3.13585 7.63176 3 7.97375 3ZM7.97375 4.10526C7.92489 4.10526 7.87804 4.12467 7.84349 4.15922C7.80894 4.19376 7.78954 4.24062 7.78954 4.28947V12.0263C7.78954 12.0505 7.7943 12.0745 7.80356 12.0968C7.81281 12.1192 7.82638 12.1395 7.84349 12.1566C7.86059 12.1737 7.8809 12.1872 7.90325 12.1965C7.9256 12.2058 7.94955 12.2105 7.97375 12.2105H15.7106C15.7594 12.2105 15.8063 12.1911 15.8408 12.1566C15.8754 12.122 15.8948 12.0752 15.8948 12.0263V4.28947C15.8948 4.24062 15.8754 4.19376 15.8408 4.15922C15.8063 4.12467 15.7594 4.10526 15.7106 4.10526H7.97375ZM12.2106 14.4211C12.2106 14.2745 12.2688 14.1339 12.3724 14.0303C12.4761 13.9266 12.6167 13.8684 12.7632 13.8684C12.9098 13.8684 13.0504 13.9266 13.154 14.0303C13.2576 14.1339 13.3159 14.2745 13.3159 14.4211V15.7105C13.3159 16.0525 13.18 16.3805 12.9382 16.6223C12.6963 16.8641 12.3684 17 12.0264 17H4.28953C3.94755 17 3.61956 16.8641 3.37774 16.6223C3.13592 16.3805 3.00006 16.0525 3.00006 15.7105V7.97368C3.00006 7.63169 3.13592 7.30371 3.37774 7.06189C3.61956 6.82007 3.94755 6.68421 4.28953 6.68421H5.57901C5.72558 6.68421 5.86614 6.74243 5.96978 6.84607C6.07342 6.94971 6.13164 7.09028 6.13164 7.23684C6.13164 7.38341 6.07342 7.52397 5.96978 7.62761C5.86614 7.73125 5.72558 7.78947 5.57901 7.78947H4.28953C4.24068 7.78947 4.19382 7.80888 4.15928 7.84343C4.12473 7.87797 4.10532 7.92483 4.10532 7.97368V15.7105C4.10532 15.7594 4.12473 15.8062 4.15928 15.8408C4.19382 15.8753 4.24068 15.8947 4.28953 15.8947H12.0264C12.0752 15.8947 12.1221 15.8753 12.1566 15.8408C12.1912 15.8062 12.2106 15.7594 12.2106 15.7105V14.4211Z"
14
+ })
15
+ })
16
+ });
17
+ const copySuccessSvg = /*#__PURE__*/ _jsx("i", {
18
+ children: /*#__PURE__*/ _jsx("svg", {
19
+ width: "1em",
20
+ height: "1em",
21
+ "shape-rendering": "geometricPrecision",
22
+ fill: "currentColor",
23
+ viewBox: "0 0 12 7",
24
+ xmlns: "http://www.w3.org/2000/svg",
25
+ children: /*#__PURE__*/ _jsx("path", {
26
+ d: "M11.2242 0.375687C11.4586 0.610002 11.4586 0.989901 11.2242 1.22422L4.82424 7.62422C4.58992 7.85853 4.21003 7.85853 3.97571 7.62422L0.775712 4.42422C0.541397 4.1899 0.541397 3.81 0.775712 3.57569C1.01003 3.34137 1.38993 3.34137 1.62424 3.57569L4.39998 6.35142L10.3757 0.375687C10.61 0.141373 10.9899 0.141373 11.2242 0.375687Z"
27
+ })
28
+ })
29
+ });
30
+ const CopyIcon = (props)=>{
31
+ const { prefix, content } = props;
32
+ const [copySuccess, setCopySuccess] = useState(false);
33
+ const timer = useRef(null);
34
+ useEffect(()=>{
35
+ return ()=>{
36
+ clearTimeout(timer.current);
37
+ };
38
+ }, []);
39
+ const getCls = (clsName)=>{
40
+ return styles[clsName] + " " + prefix + "-" + clsName;
41
+ };
42
+ const copyTextClick = ()=>{
43
+ if (copySuccess) return;
44
+ copyText(content);
45
+ setCopySuccess(true);
46
+ clearTimeout(timer.current);
47
+ timer.current = setTimeout(()=>{
48
+ console.log("定时器定时器");
49
+ setCopySuccess(false);
50
+ }, 2000);
51
+ };
52
+ return /*#__PURE__*/ _jsx("div", {
53
+ onClick: ()=>copyTextClick(),
54
+ className: `${getCls("msgItem-action-copy")} ${copySuccess ? getCls("msgItem-action-copy-success") : ""}`,
55
+ children: copySuccess ? copySuccessSvg : copyIconSvg
56
+ });
57
+ };
58
+ export default CopyIcon;
@@ -0,0 +1,22 @@
1
+ .msgItem-action-copy {
2
+ cursor: pointer;
3
+ border-radius: 2px;
4
+ display: flex;
5
+ line-height: 1;
6
+ &.msgItem-action-copy-success {
7
+ color: #f4523b;
8
+ background-color: transparent;
9
+ &>i{
10
+ color: #f4523b;
11
+ font-size: 20px;
12
+ transform:scale(0.8);
13
+ }
14
+ }
15
+ & > i {
16
+ color: rgba(140, 140, 140, 1);
17
+ font-size: 20px;
18
+ }
19
+ &:hover {
20
+ background-color: rgba(0, 0, 0, 0.04);
21
+ }
22
+ }
@@ -0,0 +1,3 @@
1
+ import type { errorMessageProps } from "../../type";
2
+ declare const errorCallback: (errObj: errorMessageProps) => void;
3
+ export default errorCallback;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import message from "../../../message";
3
+ const errorCallback = (errObj)=>{
4
+ message.customError(errObj.message);
5
+ };
6
+ export default errorCallback;
@@ -0,0 +1,3 @@
1
+ import type { fileStatus } from "../../type";
2
+ export declare const fileIconRender: (suffix: string, customRender: any) => any;
3
+ export declare const statusRender: (status: fileStatus, customRender: any) => any;