bhd-components 0.10.2 → 0.10.4

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.
@@ -47,8 +47,13 @@ export interface contentConfigProps {
47
47
  }>; // 列表数据
48
48
  loadMore?: boolean; // 是否开启加载更多 // 默认为true
49
49
  helloMsg?: string; //欢迎语
50
+ pageSize?: number; //每页数量 默认为30
50
51
  coverRenderText?: (item, html) => React.ReactNode; // 覆盖文本内容
51
- coverRenderReferences?: (item:dataItemType,referenceNode:React.ReactNode) => React.ReactNode;//覆盖引用内容
52
+ coverRenderReferences?: (
53
+ item: dataItemType,
54
+ referenceNode: React.ReactNode
55
+ ) => React.ReactNode; //覆盖引用内容
56
+ onRecordMessage?: (item: dataItemType) => void; // 发送和接收的消息记录
52
57
  }
53
58
 
54
59
  // content props
@@ -80,13 +85,19 @@ export interface sendMsgAjaxParams {
80
85
  params: (
81
86
  value: string,
82
87
  refereces: referenceType,
83
- fileList: fileCustomProps[]
88
+ fileList: fileCustomProps[],
89
+ beforeInfo:any,
84
90
  ) => string;
85
91
  onOpen?: (res: Response) => void;
86
92
  onMessage?: (ev: EventSourceMessage) => { id: string; content: string };
87
93
  onClose?: () => void;
88
94
  onError?: (err: any) => void;
89
95
  coverProps?: object;
96
+ beforeSendMsg: (
97
+ value: string,
98
+ refereces: referenceType,
99
+ fileList: fileCustomProps[]
100
+ ) => Promise<any>;
90
101
  }
91
102
 
92
103
  // footer file Props
@@ -98,7 +109,12 @@ export interface fileUploadProps {
98
109
  multiple?: boolean; // 是否允许多选
99
110
  customRequest: (
100
111
  file: File
101
- ) => Promise<{ url: string; fileId: string; source: File,status:fileStatus }>; // 自定义上传方法
112
+ ) => Promise<{
113
+ url: string;
114
+ fileId: string;
115
+ source: File;
116
+ status: fileStatus;
117
+ }>; // 自定义上传方法
102
118
  mapUploadCount?: number; // 并发上传的数量 默认为1
103
119
  deleteFileAjax?: (fileId: string) => Promise<{ fileId: string }>; // 删除文件的ajax 返回删除文件的fileId
104
120
  statusText?: (status: fileStatus) => React.ReactNode; // 自定义状态显示
@@ -125,7 +141,7 @@ export interface footerRefProps {
125
141
  clearText: () => void; // 清空输入框
126
142
  getCanSendMsg: () => boolean; //获取当前是否允许发送消息的状态
127
143
  stopMessage: () => void; //停止发送消息
128
- setReferences:(reference:referenceType)=>void;// 添加引用
144
+ setReferences: (reference: referenceType) => void; // 添加引用
129
145
  }
130
146
 
131
147
  // sendBtn Props
@@ -150,10 +166,9 @@ export interface fileListProps {
150
166
  prefix: string;
151
167
  fileUpload: fileUploadProps;
152
168
  errorCallback: (error: errorMessageProps) => void;
153
- changeFileCanSending:(flag:boolean)=>void;
169
+ changeFileCanSending: (flag: boolean) => void;
154
170
  }
155
171
 
156
-
157
172
  // file 自定义对象
158
173
 
159
174
  export interface fileCustomProps {
@@ -173,8 +188,8 @@ export interface FileListRefProps {
173
188
  deleteFile: (fileId: string) => void;
174
189
  updateFile: (fileId: string, status: fileStatus) => void;
175
190
  getFileList: () => fileCustomProps[];
176
- vaildFile: (file: File,fileId?:string) => boolean;// 校验文件是否合规
177
- fileToCustomFile:(file:File)=>fileCustomProps
191
+ vaildFile: (file: File, fileId?: string) => boolean; // 校验文件是否合规
192
+ fileToCustomFile: (file: File) => fileCustomProps;
178
193
  }
179
194
 
180
195
  // error Message
@@ -220,7 +235,8 @@ export interface VirtuosoListProps {
220
235
  export interface VirtuosoListRefProps {
221
236
  addMsg: (msg: dataItemType) => void;
222
237
  updateMsg: (id: string, obj: any) => void;
223
- clearInputing: () => void;//清楚正在输入的inputing
238
+ clearInputing: () => void; //清楚正在输入的inputing
239
+ recordMsg: (item: dataItemType) => void;
224
240
  }
225
241
 
226
242
  export interface contentRefProps extends VirtuosoListRefProps {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bhd-components",
3
- "version": "0.10.2",
3
+ "version": "0.10.4",
4
4
  "description": "组件功能描述",
5
5
  "config": {
6
6
  "commitizen": {