bhd-components 0.10.12 → 0.10.13

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 (116) hide show
  1. package/README.md +1 -1
  2. package/dist/index.esm.es5.development.css +768 -0
  3. package/dist/index.esm.es5.development.js +3130 -159
  4. package/dist/index.esm.es5.production.css +1 -1
  5. package/dist/index.esm.es5.production.js +1 -1
  6. package/dist/vendor.esm.es5.development.js +2515 -1100
  7. package/dist/vendor.esm.es5.production.js +136 -136
  8. package/es2017/AIMessageList/components/content/index.d.ts +4 -0
  9. package/es2017/AIMessageList/components/content/index.js +29 -0
  10. package/es2017/AIMessageList/components/content/index.module.less +8 -0
  11. package/es2017/AIMessageList/components/copyIcon/index.d.ts +7 -0
  12. package/es2017/AIMessageList/components/copyIcon/index.js +73 -0
  13. package/es2017/AIMessageList/components/copyIcon/index.module.less +23 -0
  14. package/es2017/AIMessageList/components/errorCallback/index.d.ts +3 -0
  15. package/es2017/AIMessageList/components/errorCallback/index.js +6 -0
  16. package/es2017/AIMessageList/components/fileList/fileIcon.d.ts +3 -0
  17. package/es2017/AIMessageList/components/fileList/fileIcon.js +970 -0
  18. package/es2017/AIMessageList/components/fileList/index.d.ts +4 -0
  19. package/es2017/AIMessageList/components/fileList/index.js +315 -0
  20. package/es2017/AIMessageList/components/fileList/index.module.less +95 -0
  21. package/es2017/AIMessageList/components/footer/index.d.ts +10 -0
  22. package/es2017/AIMessageList/components/footer/index.js +398 -0
  23. package/es2017/AIMessageList/components/footer/index.module.less +51 -0
  24. package/es2017/AIMessageList/components/header/index.d.ts +9 -0
  25. package/es2017/AIMessageList/components/header/index.js +94 -0
  26. package/es2017/AIMessageList/components/header/index.module.less +31 -0
  27. package/es2017/AIMessageList/components/referencesIcon/index.d.ts +9 -0
  28. package/es2017/AIMessageList/components/referencesIcon/index.js +63 -0
  29. package/es2017/AIMessageList/components/referencesIcon/index.module.less +14 -0
  30. package/es2017/AIMessageList/components/refreshBtn/index.d.ts +4 -0
  31. package/es2017/AIMessageList/components/refreshBtn/index.js +29 -0
  32. package/es2017/AIMessageList/components/refreshBtn/index.module.less +12 -0
  33. package/es2017/AIMessageList/components/remarkBtn/index.d.ts +4 -0
  34. package/es2017/AIMessageList/components/remarkBtn/index.js +51 -0
  35. package/es2017/AIMessageList/components/remarkBtn/index.module.less +13 -0
  36. package/es2017/AIMessageList/components/renderReferrnce/index.d.ts +10 -0
  37. package/es2017/AIMessageList/components/renderReferrnce/index.js +68 -0
  38. package/es2017/AIMessageList/components/renderReferrnce/index.module.less +64 -0
  39. package/es2017/AIMessageList/components/sendBtn/index.d.ts +4 -0
  40. package/es2017/AIMessageList/components/sendBtn/index.js +51 -0
  41. package/es2017/AIMessageList/components/sendBtn/index.module.less +25 -0
  42. package/es2017/AIMessageList/components/uplodaFileBtn/index.d.ts +4 -0
  43. package/es2017/AIMessageList/components/uplodaFileBtn/index.js +33 -0
  44. package/es2017/AIMessageList/components/uplodaFileBtn/index.module.less +5 -0
  45. package/es2017/AIMessageList/components/virtuosoList/index.d.ts +5 -0
  46. package/es2017/AIMessageList/components/virtuosoList/index.js +696 -0
  47. package/es2017/AIMessageList/components/virtuosoList/index.module.less +467 -0
  48. package/es2017/AIMessageList/index.d.ts +4 -0
  49. package/es2017/AIMessageList/index.js +58 -0
  50. package/es2017/AIMessageList/index.module.less +20 -0
  51. package/es2017/AIMessageList/type.d.ts +307 -0
  52. package/es2017/customerService/index.js +1 -0
  53. package/es2017/images/loading2.js +2 -0
  54. package/es2017/index.d.ts +1 -0
  55. package/es2017/index.js +1 -0
  56. package/es2017/utils/Date.d.ts +2 -1
  57. package/es2017/utils/Date.js +2 -1
  58. package/es2017/utils/dom.d.ts +4 -1
  59. package/es2017/utils/dom.js +44 -1
  60. package/es2017/utils/number.d.ts +1 -0
  61. package/es2017/utils/number.js +9 -0
  62. package/esm/AIMessageList/components/content/index.d.ts +4 -0
  63. package/esm/AIMessageList/components/content/index.js +29 -0
  64. package/esm/AIMessageList/components/content/index.module.less +8 -0
  65. package/esm/AIMessageList/components/copyIcon/index.d.ts +7 -0
  66. package/esm/AIMessageList/components/copyIcon/index.js +76 -0
  67. package/esm/AIMessageList/components/copyIcon/index.module.less +23 -0
  68. package/esm/AIMessageList/components/errorCallback/index.d.ts +3 -0
  69. package/esm/AIMessageList/components/errorCallback/index.js +6 -0
  70. package/esm/AIMessageList/components/fileList/fileIcon.d.ts +3 -0
  71. package/esm/AIMessageList/components/fileList/fileIcon.js +970 -0
  72. package/esm/AIMessageList/components/fileList/index.d.ts +4 -0
  73. package/esm/AIMessageList/components/fileList/index.js +337 -0
  74. package/esm/AIMessageList/components/fileList/index.module.less +95 -0
  75. package/esm/AIMessageList/components/footer/index.d.ts +10 -0
  76. package/esm/AIMessageList/components/footer/index.js +414 -0
  77. package/esm/AIMessageList/components/footer/index.module.less +51 -0
  78. package/esm/AIMessageList/components/header/index.d.ts +9 -0
  79. package/esm/AIMessageList/components/header/index.js +96 -0
  80. package/esm/AIMessageList/components/header/index.module.less +31 -0
  81. package/esm/AIMessageList/components/referencesIcon/index.d.ts +9 -0
  82. package/esm/AIMessageList/components/referencesIcon/index.js +65 -0
  83. package/esm/AIMessageList/components/referencesIcon/index.module.less +14 -0
  84. package/esm/AIMessageList/components/refreshBtn/index.d.ts +4 -0
  85. package/esm/AIMessageList/components/refreshBtn/index.js +31 -0
  86. package/esm/AIMessageList/components/refreshBtn/index.module.less +12 -0
  87. package/esm/AIMessageList/components/remarkBtn/index.d.ts +4 -0
  88. package/esm/AIMessageList/components/remarkBtn/index.js +51 -0
  89. package/esm/AIMessageList/components/remarkBtn/index.module.less +13 -0
  90. package/esm/AIMessageList/components/renderReferrnce/index.d.ts +10 -0
  91. package/esm/AIMessageList/components/renderReferrnce/index.js +72 -0
  92. package/esm/AIMessageList/components/renderReferrnce/index.module.less +64 -0
  93. package/esm/AIMessageList/components/sendBtn/index.d.ts +4 -0
  94. package/esm/AIMessageList/components/sendBtn/index.js +53 -0
  95. package/esm/AIMessageList/components/sendBtn/index.module.less +25 -0
  96. package/esm/AIMessageList/components/uplodaFileBtn/index.d.ts +4 -0
  97. package/esm/AIMessageList/components/uplodaFileBtn/index.js +33 -0
  98. package/esm/AIMessageList/components/uplodaFileBtn/index.module.less +5 -0
  99. package/esm/AIMessageList/components/virtuosoList/index.d.ts +5 -0
  100. package/esm/AIMessageList/components/virtuosoList/index.js +673 -0
  101. package/esm/AIMessageList/components/virtuosoList/index.module.less +467 -0
  102. package/esm/AIMessageList/index.d.ts +4 -0
  103. package/esm/AIMessageList/index.js +58 -0
  104. package/esm/AIMessageList/index.module.less +20 -0
  105. package/esm/AIMessageList/type.d.ts +307 -0
  106. package/esm/customerService/index.js +1 -0
  107. package/esm/images/loading2.js +2 -0
  108. package/esm/index.d.ts +1 -0
  109. package/esm/index.js +1 -0
  110. package/esm/utils/Date.d.ts +2 -1
  111. package/esm/utils/Date.js +2 -1
  112. package/esm/utils/dom.d.ts +4 -1
  113. package/esm/utils/dom.js +45 -1
  114. package/esm/utils/number.d.ts +1 -0
  115. package/esm/utils/number.js +9 -0
  116. 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,73 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } 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__*/ _jsxs("svg", {
7
+ width: "1em",
8
+ height: "1em",
9
+ viewBox: "0 0 14 14",
10
+ shapeRendering: "geometricPrecision",
11
+ fill: "currentColor",
12
+ xmlns: "http://www.w3.org/2000/svg",
13
+ children: [
14
+ /*#__PURE__*/ _jsx("g", {
15
+ clipPath: "url(#clip0_518_8403)",
16
+ children: /*#__PURE__*/ _jsx("path", {
17
+ d: "M6.16666 1.66666H13.1667C13.4761 1.66666 13.7728 1.78957 13.9916 2.00837C14.2104 2.22716 14.3333 2.5239 14.3333 2.83332V9.83332C14.3333 10.1427 14.2104 10.4395 13.9916 10.6583C13.7728 10.8771 13.4761 11 13.1667 11H6.16666C5.85724 11 5.5605 10.8771 5.34171 10.6583C5.12291 10.4395 5 10.1427 5 9.83332V2.83332C5 2.5239 5.12291 2.22716 5.34171 2.00837C5.5605 1.78957 5.85724 1.66666 6.16666 1.66666ZM6.16666 2.66666C6.12246 2.66666 6.08007 2.68422 6.04881 2.71547C6.01756 2.74673 6 2.78912 6 2.83332V9.83332C6 9.85521 6.00431 9.87688 6.01268 9.8971C6.02106 9.91732 6.03334 9.9357 6.04881 9.95117C6.06429 9.96665 6.08266 9.97893 6.10288 9.9873C6.1231 9.99568 6.14478 9.99999 6.16666 9.99999H13.1667C13.2109 9.99999 13.2533 9.98243 13.2845 9.95117C13.3158 9.91992 13.3333 9.87753 13.3333 9.83332V2.83332C13.3333 2.78912 13.3158 2.74673 13.2845 2.71547C13.2533 2.68422 13.2109 2.66666 13.1667 2.66666H6.16666ZM10 12C10 11.8674 10.0527 11.7402 10.1464 11.6464C10.2402 11.5527 10.3674 11.5 10.5 11.5C10.6326 11.5 10.7598 11.5527 10.8536 11.6464C10.9473 11.7402 11 11.8674 11 12V13.1667C11 13.4761 10.8771 13.7728 10.6583 13.9916C10.4395 14.2104 10.1427 14.3333 9.83333 14.3333H2.83333C2.52391 14.3333 2.22717 14.2104 2.00837 13.9916C1.78958 13.7728 1.66666 13.4761 1.66666 13.1667V6.16666C1.66666 5.85724 1.78958 5.56049 2.00837 5.3417C2.22717 5.12291 2.52391 4.99999 2.83333 4.99999H4C4.13261 4.99999 4.25978 5.05267 4.35355 5.14644C4.44732 5.2402 4.5 5.36738 4.5 5.49999C4.5 5.6326 4.44732 5.75978 4.35355 5.85354C4.25978 5.94731 4.13261 5.99999 4 5.99999H2.83333C2.78913 5.99999 2.74674 6.01755 2.71548 6.04881C2.68422 6.08006 2.66666 6.12245 2.66666 6.16666V13.1667C2.66666 13.2109 2.68422 13.2533 2.71548 13.2845C2.74674 13.3158 2.78913 13.3333 2.83333 13.3333H9.83333C9.87753 13.3333 9.91993 13.3158 9.95118 13.2845C9.98244 13.2533 10 13.2109 10 13.1667V12Z"
18
+ })
19
+ }),
20
+ /*#__PURE__*/ _jsx("defs", {
21
+ children: /*#__PURE__*/ _jsx("clipPath", {
22
+ id: "clip0_518_8403",
23
+ children: /*#__PURE__*/ _jsx("rect", {
24
+ width: "16",
25
+ height: "16"
26
+ })
27
+ })
28
+ })
29
+ ]
30
+ })
31
+ });
32
+ const copySuccessSvg = /*#__PURE__*/ _jsx("i", {
33
+ children: /*#__PURE__*/ _jsx("svg", {
34
+ width: "1em",
35
+ height: "1em",
36
+ shapeRendering: "geometricPrecision",
37
+ fill: "currentColor",
38
+ viewBox: "0 0 12 7",
39
+ xmlns: "http://www.w3.org/2000/svg",
40
+ children: /*#__PURE__*/ _jsx("path", {
41
+ 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"
42
+ })
43
+ })
44
+ });
45
+ const CopyIcon = (props)=>{
46
+ const { prefix, content } = props;
47
+ const [copySuccess, setCopySuccess] = useState(false);
48
+ const timer = useRef(null);
49
+ useEffect(()=>{
50
+ return ()=>{
51
+ clearTimeout(timer.current);
52
+ };
53
+ }, []);
54
+ const getCls = (clsName)=>{
55
+ return styles[clsName] + " " + prefix + "-" + clsName;
56
+ };
57
+ const copyTextClick = ()=>{
58
+ if (copySuccess) return;
59
+ copyText(content);
60
+ setCopySuccess(true);
61
+ clearTimeout(timer.current);
62
+ timer.current = setTimeout(()=>{
63
+ console.log("定时器定时器");
64
+ setCopySuccess(false);
65
+ }, 2000);
66
+ };
67
+ return /*#__PURE__*/ _jsx("div", {
68
+ onClick: ()=>copyTextClick(),
69
+ className: `${getCls("msgItem-action-copy")} ${copySuccess ? getCls("msgItem-action-copy-success") : ""}`,
70
+ children: copySuccess ? copySuccessSvg : copyIconSvg
71
+ });
72
+ };
73
+ export default CopyIcon;
@@ -0,0 +1,23 @@
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: 16px;
12
+ transform:scale(0.8);
13
+ }
14
+ }
15
+ & > i {
16
+ color: rgba(140, 140, 140, 1);
17
+ font-size: 16px;
18
+ display: flex;
19
+ }
20
+ &:hover {
21
+ background-color: rgba(0, 0, 0, 0.04);
22
+ }
23
+ }
@@ -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;