bhd-components 0.9.2 → 0.9.3
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.
- package/README.md +1 -1
- package/dist/index.esm.es5.development.css +454 -363
- package/dist/index.esm.es5.development.js +333 -325
- package/dist/index.esm.es5.production.css +1 -1
- package/dist/index.esm.es5.production.js +1 -1
- package/dist/vendor.esm.es5.development.css +119 -0
- package/dist/{a5565b8a.esm.es5.development.js → vendor.esm.es5.development.js} +8472 -7204
- package/dist/vendor.esm.es5.production.css +11 -0
- package/dist/vendor.esm.es5.production.js +485 -0
- package/es2017/bhdAppLayout/components/BhdTableSimple/index.js +1 -1
- package/es2017/bhdAppLayout/components/BhdTableSimple/index/347/232/204/345/211/257/346/234/254.js +2 -2
- package/es2017/bhdAppLayout/index.js +16 -16
- package/es2017/bhdDatePicker/index.d.ts +1 -2
- package/es2017/bhdDatePicker/index.js +253 -256
- package/es2017/bhdDatePicker/index.module.less +120 -8
- package/es2017/bhdSelect/index.js +4 -4
- package/es2017/bhdTipModal/index.js +6 -6
- package/es2017/customerService/contactsList.d.ts +2 -2
- package/es2017/customerService/contactsList.js +2 -2
- package/es2017/customerService/function.js +2 -1
- package/es2017/customerService/historyFun.d.ts +2 -2
- package/es2017/customerService/historyFun.js +2 -2
- package/es2017/customerService/index.d.ts +2 -2
- package/es2017/customerService/index.js +5 -5
- package/es2017/customerService/js-screen-shot/lib/common-methods/GetCanvasImgData.js +1 -1
- package/es2017/customerService/js-screen-shot/lib/common-methods/SaveBorderArrInfo.js +1 -1
- package/es2017/customerService/js-screen-shot/lib/common-methods/SaveCanvasToBase64.js +3 -2
- package/es2017/customerService/js-screen-shot/lib/common-methods/SaveCanvasToImage.js +2 -1
- package/es2017/customerService/js-screen-shot/lib/common-methods/ZoomCutOutBoxPosition.d.ts +3 -3
- package/es2017/customerService/js-screen-shot/lib/main-entrance/CreateDom.js +4 -3
- package/es2017/customerService/js-screen-shot/lib/main-entrance/InitData.js +2 -2
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawCutOutBox.js +6 -5
- package/es2017/customerService/js-screen-shot/lib/split-methods/SetPlugInParameters.js +15 -14
- package/es2017/customerService/js-screen-shot/lib/split-methods/ToolClickEvent.js +1 -1
- package/es2017/customerService/js-screen-shot/lib/split-methods/drawCrossImg.js +2 -1
- package/es2017/customerService/js-screen-shot/main.js +38 -35
- package/es2017/customerService/screenshotTool.d.ts +2 -2
- package/es2017/customerService/screenshotTool.js +2 -2
- package/es2017/customerService/teacherList.d.ts +2 -2
- package/es2017/customerService/teacherList.js +2 -2
- package/es2017/i18n/en_US.js +4 -1
- package/es2017/i18n/zh_CN.js +4 -1
- package/es2017/icons/index.js +2 -2
- package/es2017/index.js +14 -14
- package/es2017/provider/index.js +2 -2
- package/es2017/table/index.js +4 -4
- package/es2017/tableSelect/index.js +3 -3
- package/es2017/textTootip/index.js +1 -1
- package/es2017/titleBar/index.js +3 -3
- package/es2017/viewImage/index.js +13 -13
- package/esm/bhdAppLayout/index.js +15 -15
- package/esm/bhdDatePicker/index.d.ts +1 -2
- package/esm/bhdDatePicker/index.js +254 -257
- package/esm/bhdDatePicker/index.module.less +120 -8
- package/esm/bhdSelect/index.js +1 -1
- package/esm/bhdTipModal/index.js +1 -1
- package/esm/customerService/contactsList.d.ts +2 -2
- package/esm/customerService/contactsList.js +1 -1
- package/esm/customerService/function.js +2 -1
- package/esm/customerService/historyFun.d.ts +2 -2
- package/esm/customerService/historyFun.js +1 -1
- package/esm/customerService/index.d.ts +2 -2
- package/esm/customerService/index.js +1 -1
- package/esm/customerService/js-screen-shot/lib/common-methods/SaveCanvasToBase64.js +3 -2
- package/esm/customerService/js-screen-shot/lib/common-methods/SaveCanvasToImage.js +2 -1
- package/esm/customerService/js-screen-shot/lib/common-methods/ZoomCutOutBoxPosition.d.ts +3 -3
- package/esm/customerService/js-screen-shot/lib/main-entrance/CreateDom.js +4 -3
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawCutOutBox.js +5 -4
- package/esm/customerService/js-screen-shot/lib/split-methods/SetPlugInParameters.js +15 -14
- package/esm/customerService/js-screen-shot/lib/split-methods/drawCrossImg.js +2 -1
- package/esm/customerService/js-screen-shot/main.js +31 -28
- package/esm/customerService/screenshotTool.d.ts +2 -2
- package/esm/customerService/screenshotTool.js +1 -1
- package/esm/customerService/teacherList.d.ts +2 -2
- package/esm/customerService/teacherList.js +1 -1
- package/esm/i18n/en_US.js +4 -1
- package/esm/i18n/zh_CN.js +4 -1
- package/esm/icons/index.js +1 -1
- package/esm/index.js +14 -14
- package/esm/tableSelect/index.js +1 -1
- package/esm/viewImage/index.js +3 -3
- package/package.json +1 -1
- package/dist/deb6cc9b.esm.es5.production.js +0 -485
- package/dist/vendor.esm.es5.development.esm.es5.development.css +0 -119
- package/dist/vendor.esm.es5.production.esm.es5.production.css +0 -11
- package/es2017/customerService/screenShotPlugin.esm.js +0 -6515
- package/esm/customerService/screenShotPlugin.esm.js +0 -6516
|
@@ -255,6 +255,13 @@
|
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
+
// 多面板
|
|
259
|
+
.bhd-picker-panels {
|
|
260
|
+
& .bhd-picker-panel {
|
|
261
|
+
border: none;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
258
265
|
// 设置底部区域
|
|
259
266
|
.bhd-picker-footer {
|
|
260
267
|
padding: 12px 16px;
|
|
@@ -267,12 +274,14 @@
|
|
|
267
274
|
border-top: 1px solid @color-background-fillsecondary-Tr !important;
|
|
268
275
|
line-height: 30px !important;
|
|
269
276
|
align-items: center;
|
|
270
|
-
flex-direction: row-reverse;
|
|
271
|
-
justify-content: flex-start;
|
|
272
277
|
|
|
273
278
|
& .bhd-picker-footer-extra {
|
|
274
279
|
padding: 0;
|
|
275
280
|
line-height: 30px;
|
|
281
|
+
width: 100%;
|
|
282
|
+
display: flex;
|
|
283
|
+
flex-direction: column;
|
|
284
|
+
gap: 16px;
|
|
276
285
|
|
|
277
286
|
&:not(:last-child) {
|
|
278
287
|
border-bottom: none;
|
|
@@ -285,6 +294,16 @@
|
|
|
285
294
|
height: 30px;
|
|
286
295
|
gap: 10px;
|
|
287
296
|
align-items: center;
|
|
297
|
+
justify-content: flex-end;
|
|
298
|
+
width: 100%;
|
|
299
|
+
& > li {
|
|
300
|
+
line-height: 30px;
|
|
301
|
+
height: 30px;
|
|
302
|
+
margin: 0;
|
|
303
|
+
&.bhd-picker-ok {
|
|
304
|
+
font-size: 0;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
288
307
|
|
|
289
308
|
& .bhd-picker-now {
|
|
290
309
|
color: @color-background-primary-base;
|
|
@@ -294,6 +313,22 @@
|
|
|
294
313
|
}
|
|
295
314
|
}
|
|
296
315
|
|
|
316
|
+
// 自己扩展
|
|
317
|
+
& .bhddatepicker-picker-footer-extra-extend {
|
|
318
|
+
position: relative;
|
|
319
|
+
padding-bottom: 8px;
|
|
320
|
+
&::after {
|
|
321
|
+
content: "";
|
|
322
|
+
width: calc(100% + 100px);
|
|
323
|
+
height: 0px;
|
|
324
|
+
border-bottom: 1px solid @color-background-fillsecondary-Tr;
|
|
325
|
+
// background-color: @color-background-fillsecondary-Tr;
|
|
326
|
+
position: absolute;
|
|
327
|
+
left: -50px;
|
|
328
|
+
bottom: 0;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
297
332
|
// 今天按钮
|
|
298
333
|
.bhd-picker-today-btn {
|
|
299
334
|
font-size: 14px;
|
|
@@ -331,10 +366,9 @@
|
|
|
331
366
|
& .bhd-btn-primary {
|
|
332
367
|
height: 30px;
|
|
333
368
|
padding: 0 16px;
|
|
334
|
-
|
|
369
|
+
line-height: 30px;
|
|
335
370
|
border: none;
|
|
336
371
|
box-shadow: none;
|
|
337
|
-
line-height: 21px;
|
|
338
372
|
|
|
339
373
|
&:disabled,
|
|
340
374
|
&.disabled {
|
|
@@ -356,11 +390,12 @@
|
|
|
356
390
|
// }
|
|
357
391
|
}
|
|
358
392
|
|
|
359
|
-
//
|
|
393
|
+
// 默认颜色
|
|
360
394
|
.bhd-picker-cell-in-view {
|
|
361
395
|
color: @color-text-Secondary-Tr;
|
|
362
396
|
}
|
|
363
397
|
|
|
398
|
+
//禁用后的今天
|
|
364
399
|
.bhd-picker-cell-disabled.bhd-picker-cell-today
|
|
365
400
|
.bhd-picker-cell-inner::before {
|
|
366
401
|
border-color: @color-background-primary-base !important;
|
|
@@ -370,6 +405,64 @@
|
|
|
370
405
|
color: @color-text-quaternary-Tr !important;
|
|
371
406
|
}
|
|
372
407
|
}
|
|
408
|
+
|
|
409
|
+
&.showTime {
|
|
410
|
+
:global {
|
|
411
|
+
.bhd-picker-footer {
|
|
412
|
+
justify-content: flex-end;
|
|
413
|
+
.bhd-picker-footer-extra {
|
|
414
|
+
width: auto;
|
|
415
|
+
}
|
|
416
|
+
.bhd-picker-ranges {
|
|
417
|
+
width: auto;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
&.showExtraFooter {
|
|
422
|
+
:global {
|
|
423
|
+
.bhd-picker-footer {
|
|
424
|
+
justify-content: flex-start;
|
|
425
|
+
flex-direction: column;
|
|
426
|
+
.bhd-picker-footer-extra {
|
|
427
|
+
width: 100% !important;
|
|
428
|
+
}
|
|
429
|
+
.bhd-picker-ranges {
|
|
430
|
+
width: 100% !important;
|
|
431
|
+
&.showPresets {
|
|
432
|
+
position: absolute;
|
|
433
|
+
width: auto !important;
|
|
434
|
+
bottom: 12px;
|
|
435
|
+
right: 100px;
|
|
436
|
+
&.showNow {
|
|
437
|
+
right: 128px;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
// &.showNow {
|
|
447
|
+
// :global {
|
|
448
|
+
// .bhd-picker-footer {
|
|
449
|
+
// & > a.bhd-picker-today-btn {
|
|
450
|
+
// position: absolute;
|
|
451
|
+
// right: 91px;
|
|
452
|
+
// }
|
|
453
|
+
// }
|
|
454
|
+
// }
|
|
455
|
+
// }
|
|
456
|
+
|
|
457
|
+
// &.hideShow {
|
|
458
|
+
// :global {
|
|
459
|
+
// .bhd-picker-footer {
|
|
460
|
+
// & > a {
|
|
461
|
+
// display: none;
|
|
462
|
+
// }
|
|
463
|
+
// }
|
|
464
|
+
// }
|
|
465
|
+
// }
|
|
373
466
|
}
|
|
374
467
|
|
|
375
468
|
// 单选
|
|
@@ -701,12 +794,22 @@
|
|
|
701
794
|
// 隐藏底部
|
|
702
795
|
.bhd-picker-footer {
|
|
703
796
|
display: none !important;
|
|
797
|
+
.bhd-picker-ranges {
|
|
798
|
+
display: none !important;
|
|
799
|
+
}
|
|
800
|
+
.bhddatepicker-picker-footer-extra-extend {
|
|
801
|
+
padding-bottom: 0;
|
|
802
|
+
&::after {
|
|
803
|
+
display: none;
|
|
804
|
+
}
|
|
805
|
+
}
|
|
704
806
|
}
|
|
705
807
|
|
|
706
808
|
// 头部位置变更
|
|
707
809
|
.bhd-picker-header {
|
|
708
810
|
position: relative;
|
|
709
|
-
.bhd-picker-header-prev-btn
|
|
811
|
+
.bhd-picker-header-prev-btn,
|
|
812
|
+
.bhd-picker-header-super-prev-btn {
|
|
710
813
|
position: absolute;
|
|
711
814
|
right: 40px;
|
|
712
815
|
border: none !important;
|
|
@@ -715,7 +818,8 @@
|
|
|
715
818
|
position: absolute;
|
|
716
819
|
left: 0;
|
|
717
820
|
}
|
|
718
|
-
.bhd-picker-header-next-btn
|
|
821
|
+
.bhd-picker-header-next-btn,
|
|
822
|
+
.bhd-picker-header-super-next-btn {
|
|
719
823
|
position: absolute;
|
|
720
824
|
right: 0;
|
|
721
825
|
border: none !important;
|
|
@@ -726,6 +830,14 @@
|
|
|
726
830
|
color: @color-text-Secondary-Tr;
|
|
727
831
|
}
|
|
728
832
|
}
|
|
833
|
+
|
|
834
|
+
&.showExtraFooter {
|
|
835
|
+
:global {
|
|
836
|
+
.bhd-picker-footer {
|
|
837
|
+
display: flex !important;
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
}
|
|
729
841
|
}
|
|
730
842
|
}
|
|
731
843
|
|
|
@@ -762,7 +874,7 @@
|
|
|
762
874
|
}
|
|
763
875
|
tbody {
|
|
764
876
|
tr {
|
|
765
|
-
background-color:
|
|
877
|
+
background-color: transparent;
|
|
766
878
|
border: none !important;
|
|
767
879
|
td {
|
|
768
880
|
border: none !important;
|
|
@@ -3,11 +3,11 @@ import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
|
3
3
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@ice/jsx-runtime/jsx-runtime";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { useState, useEffect, useRef } from "react";
|
|
6
|
-
import { CaretDownOutlined, CustomArrow } from "../icons
|
|
6
|
+
import { CaretDownOutlined, CustomArrow } from "../icons";
|
|
7
7
|
import { Select, Input } from "antd";
|
|
8
8
|
import styles from "./index.module.less";
|
|
9
9
|
const Search = Input.Search;
|
|
10
|
-
const RenderDrop = ({ menu
|
|
10
|
+
const RenderDrop = ({ menu, bhdDropdownRef, mask, initHeight })=>{
|
|
11
11
|
useEffect(()=>{
|
|
12
12
|
if (mask) {
|
|
13
13
|
let parent = bhdDropdownRef.current.parentNode.parentNode.parentNode;
|
|
@@ -19,7 +19,7 @@ const RenderDrop = ({ menu , bhdDropdownRef , mask , initHeight })=>{
|
|
|
19
19
|
return menu;
|
|
20
20
|
};
|
|
21
21
|
const BhdSelect = (props)=>{
|
|
22
|
-
let { mask =false
|
|
22
|
+
let { mask = false, popupClassName = "", suffixIcon, className = "", optionClassName = "", children, showSearch, dropdownRender, search_placeholder, select_title, search_label = "label", options, arrowType = "default", searchClassName = "", useType = "", listHeight = 0 } = props;
|
|
23
23
|
const bhdDropdownRef = useRef(null);
|
|
24
24
|
const bhdSelectRef = useRef(null);
|
|
25
25
|
const [clientY, setclientY] = useState(0); //下拉列表距离顶部的高度
|
|
@@ -160,7 +160,7 @@ const BhdSelect = (props)=>{
|
|
|
160
160
|
},
|
|
161
161
|
children: /*#__PURE__*/ _jsx(Search, {
|
|
162
162
|
placeholder: search_placeholder ? search_placeholder : "请输入",
|
|
163
|
-
onChange: ({ target: { value
|
|
163
|
+
onChange: ({ target: { value } })=>{
|
|
164
164
|
setFilterValue(value);
|
|
165
165
|
},
|
|
166
166
|
className: `${styles.search} ${searchClassName || ""}`,
|
|
@@ -3,10 +3,10 @@ import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
|
3
3
|
import { jsx as _jsx, jsxs as _jsxs } from "@ice/jsx-runtime/jsx-runtime";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { Modal } from "./modal";
|
|
6
|
-
import { Confirm, Success, Info } from "../images
|
|
6
|
+
import { Confirm, Success, Info } from "../images";
|
|
7
7
|
import styles from "./index.module.less";
|
|
8
8
|
const initConFirmModal = (obj)=>{
|
|
9
|
-
let { title
|
|
9
|
+
let { title, content, cancelBtn = true, okText = "确定", keyboard = false, cancelText = "取消", autoFocusButton = null } = obj;
|
|
10
10
|
return _object_spread_props(_object_spread({
|
|
11
11
|
centered: true,
|
|
12
12
|
okText,
|
|
@@ -43,7 +43,7 @@ const initConFirmModal = (obj)=>{
|
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
45
|
const initSuccessModal = (obj)=>{
|
|
46
|
-
let { title
|
|
46
|
+
let { title, content, cancelBtn = true, keyboard = false, otherContent, okText = "确定", cancelText = "取消", autoFocusButton = null } = obj;
|
|
47
47
|
return _object_spread_props(_object_spread({
|
|
48
48
|
centered: true,
|
|
49
49
|
okText,
|
|
@@ -81,7 +81,7 @@ const initSuccessModal = (obj)=>{
|
|
|
81
81
|
});
|
|
82
82
|
};
|
|
83
83
|
const initCustomModal = (obj)=>{
|
|
84
|
-
let { title
|
|
84
|
+
let { title, content, keyboard = false, okText = "确定", cancelText = "取消", cancelBtn = true, okBtn = false, autoFocusButton = null } = obj;
|
|
85
85
|
return _object_spread_props(_object_spread({
|
|
86
86
|
centered: true,
|
|
87
87
|
okText,
|
|
@@ -107,7 +107,7 @@ const initCustomModal = (obj)=>{
|
|
|
107
107
|
});
|
|
108
108
|
};
|
|
109
109
|
const initInfoModal = (obj)=>{
|
|
110
|
-
let { title
|
|
110
|
+
let { title, content, cancelBtn = false, keyboard = false, okText = "确定", cancelText = "取消", autoFocusButton = null } = obj;
|
|
111
111
|
return _object_spread_props(_object_spread({
|
|
112
112
|
centered: true,
|
|
113
113
|
okText,
|
|
@@ -144,7 +144,7 @@ const initInfoModal = (obj)=>{
|
|
|
144
144
|
});
|
|
145
145
|
};
|
|
146
146
|
const initWarnModal = (obj)=>{
|
|
147
|
-
let { title
|
|
147
|
+
let { title, content, cancelBtn = false, keyboard = false, okText = "确定", cancelText = "取消", autoFocusButton = null } = obj;
|
|
148
148
|
return _object_spread_props(_object_spread({
|
|
149
149
|
centered: true,
|
|
150
150
|
okText,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
interface data {
|
|
3
3
|
type: number;
|
|
4
4
|
roomId: string;
|
|
@@ -10,5 +10,5 @@ interface data {
|
|
|
10
10
|
contactsList: any;
|
|
11
11
|
ref: any;
|
|
12
12
|
}
|
|
13
|
-
declare const ContactsList:
|
|
13
|
+
declare const ContactsList: React.ForwardRefExoticComponent<Omit<data, "ref"> & React.RefAttributes<unknown>>;
|
|
14
14
|
export default ContactsList;
|
|
@@ -2,11 +2,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "@ice/jsx-runtime/jsx-runtime";
|
|
|
2
2
|
import React, { forwardRef } from "react";
|
|
3
3
|
import styles from "./index.module.less";
|
|
4
4
|
import { Tooltip } from "antd";
|
|
5
|
-
import { CustomAiIcon, CustomRetract } from "../icons
|
|
5
|
+
import { CustomAiIcon, CustomRetract } from "../icons";
|
|
6
6
|
import { CloseOutlined } from "@ant-design/icons";
|
|
7
7
|
import { getByteLen, formatDate } from "./function"; //录音使用文件
|
|
8
8
|
const ContactsList = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
9
|
-
let { type
|
|
9
|
+
let { type, roomId, userData, http, urllocation, onClose, switchChatRoom, contactsList } = props;
|
|
10
10
|
//删除聊天室
|
|
11
11
|
const deleteRoom = (roomId)=>{
|
|
12
12
|
http.delete(`${urllocation}/chat-service/public/v1.0/rooms/${roomId}`, {}).then((res)=>{
|
|
@@ -122,11 +122,12 @@ const getBase64Image = (src)=>{
|
|
|
122
122
|
img.crossOrigin = '';
|
|
123
123
|
img.src = src;
|
|
124
124
|
img.onload = function() {
|
|
125
|
+
var _ctx;
|
|
125
126
|
const canvas = document.createElement('canvas');
|
|
126
127
|
canvas.width = img.width;
|
|
127
128
|
canvas.height = img.height;
|
|
128
129
|
const ctx = canvas.getContext('2d');
|
|
129
|
-
ctx === null ||
|
|
130
|
+
(_ctx = ctx) === null || _ctx === void 0 ? void 0 : _ctx.drawImage(img, 0, 0, img.width, img.height);
|
|
130
131
|
const ext = img.src.substring(img.src.lastIndexOf('.') + 1).toLowerCase();
|
|
131
132
|
const dataURL = canvas.toDataURL('image/' + ext);
|
|
132
133
|
resolve(dataURL);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import "highlight.js/styles/github.css";
|
|
3
3
|
interface data {
|
|
4
4
|
type: number;
|
|
@@ -9,5 +9,5 @@ interface data {
|
|
|
9
9
|
onClose: any;
|
|
10
10
|
loadSpecifiedData: any;
|
|
11
11
|
}
|
|
12
|
-
declare const HistoryFun: (props: data) => JSX.Element;
|
|
12
|
+
declare const HistoryFun: (props: data) => React.JSX.Element;
|
|
13
13
|
export default HistoryFun;
|
|
@@ -6,11 +6,11 @@ import styles from "./index.module.less";
|
|
|
6
6
|
//import "highlight.js/styles/default.css";
|
|
7
7
|
import "highlight.js/styles/github.css";
|
|
8
8
|
import { Input } from "antd";
|
|
9
|
-
import { CustomClose, CustomExpand, CustomAiIcon } from "../icons
|
|
9
|
+
import { CustomClose, CustomExpand, CustomAiIcon } from "../icons";
|
|
10
10
|
import { SearchOutlined } from "@ant-design/icons";
|
|
11
11
|
import { formatDate } from "./function"; //录音使用文件
|
|
12
12
|
const HistoryFun = (props)=>{
|
|
13
|
-
let { type
|
|
13
|
+
let { type, roomId, userData, http, urllocation, onClose, loadSpecifiedData } = props;
|
|
14
14
|
const [keyWordProblem, setKeyWordProblem] = useState(""); //搜索内容
|
|
15
15
|
const [showLoadingState, setShowLoadingState] = useState(1); //1,初始状态,2、无数据 ,3、不显示图片
|
|
16
16
|
const [pageNum, setPageNum] = useState(1);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import "highlight.js/styles/github.css";
|
|
3
3
|
interface Service {
|
|
4
4
|
type: string;
|
|
@@ -16,5 +16,5 @@ interface Service {
|
|
|
16
16
|
config: any;
|
|
17
17
|
screenshotAreaId: string;
|
|
18
18
|
}
|
|
19
|
-
declare const CustomerService: (props: Service) => JSX.Element;
|
|
19
|
+
declare const CustomerService: (props: Service) => React.JSX.Element;
|
|
20
20
|
export default CustomerService;
|
|
@@ -10,7 +10,7 @@ let styles = cssStyle;
|
|
|
10
10
|
if (false) {
|
|
11
11
|
styles = cssStyleOnline;
|
|
12
12
|
}
|
|
13
|
-
import { CustomAiIcon, CustomRecord, CustomFullScreen, CustomExitFullScreen, CustomReloading, CustomCopy, CustomLike, CustomDislike, CustomQuote, CustomSending, CustomContacts, CustomDuihao, CustomRoundClose, CustomScreenshot, CustomKnowledgeContent, CustomWenhaoRound } from "../icons
|
|
13
|
+
import { CustomAiIcon, CustomRecord, CustomFullScreen, CustomExitFullScreen, CustomReloading, CustomCopy, CustomLike, CustomDislike, CustomQuote, CustomSending, CustomContacts, CustomDuihao, CustomRoundClose, CustomScreenshot, CustomKnowledgeContent, CustomWenhaoRound } from "../icons";
|
|
14
14
|
import { CloseOutlined, RightOutlined, ZoomInOutlined } from "@ant-design/icons";
|
|
15
15
|
import HistoryFun from "./historyFun";
|
|
16
16
|
import ContactsList from "./contactsList";
|
|
@@ -22,7 +22,7 @@ import hljs from "highlight.js";
|
|
|
22
22
|
import "highlight.js/styles/github.css";
|
|
23
23
|
import { render } from "react-dom";
|
|
24
24
|
import Provider from "../provider";
|
|
25
|
-
const { TextArea
|
|
25
|
+
const { TextArea } = Input;
|
|
26
26
|
// import './html2canvas.test.js';
|
|
27
27
|
import knowledge_icon from "./images/knowledge_icon.png";
|
|
28
28
|
// import { useMediaRecorder } from "./useMediaRecorder"; //录音使用文件
|
|
@@ -31,7 +31,7 @@ import { readMessage, getByteLen, serverUrl, copyText, getDataTime, getQuery, re
|
|
|
31
31
|
// const screenShot = require('./screenShotPlugin.esm')
|
|
32
32
|
import ScreenShot from "./js-screen-shot/main";
|
|
33
33
|
const CustomerService = (props)=>{
|
|
34
|
-
let { userData
|
|
34
|
+
let { userData, http, urllocation, onCancel, serverName, fetchEventSource, initShowType, onEvent, stepIds, stepId, screenshotAreaId, config } = props;
|
|
35
35
|
// const { bese64String, startRecord, stopRecord } = useMediaRecorder(); //语音转文字
|
|
36
36
|
// const [voiceRecordingStatus, setVoiceRecordingStatus] = useState(3); //语音录制状态 3,语音识别完成 2,录制中, 1,录制结束
|
|
37
37
|
const [copyTextOBJ, setCopyTextObj] = useState([]); //复制的消息id
|
|
@@ -140,7 +140,7 @@ const CustomerService = (props)=>{
|
|
|
140
140
|
hiddenScrollBar: {
|
|
141
141
|
state: true
|
|
142
142
|
},
|
|
143
|
-
completeCallback: ({ base64
|
|
143
|
+
completeCallback: ({ base64 })=>{
|
|
144
144
|
// console.log(
|
|
145
145
|
// "截图组件加载完毕调用此方法来完成框选区域的截图",
|
|
146
146
|
// base64
|
|
@@ -1476,7 +1476,7 @@ const CustomerService = (props)=>{
|
|
|
1476
1476
|
maxPageSize: 5
|
|
1477
1477
|
};
|
|
1478
1478
|
} else if (flag == 3) {
|
|
1479
|
-
let { params: { VideoBriefSummaryId
|
|
1479
|
+
let { params: { VideoBriefSummaryId } } = config;
|
|
1480
1480
|
data = {
|
|
1481
1481
|
page: 1,
|
|
1482
1482
|
maxPageSize: 4,
|
|
@@ -10,7 +10,7 @@ import PlugInParameters from "../main-entrance/PlugInParameters";
|
|
|
10
10
|
const plugInParameters = new PlugInParameters();
|
|
11
11
|
const screenShotCanvas = (_data_getScreenShotContainer = data.getScreenShotContainer()) === null || _data_getScreenShotContainer === void 0 ? void 0 : _data_getScreenShotContainer.getContext("2d");
|
|
12
12
|
// 获取裁剪区域位置信息
|
|
13
|
-
const { startX
|
|
13
|
+
const { startX, startY, width, height } = data.getCutOutBoxPosition();
|
|
14
14
|
let base64 = "";
|
|
15
15
|
if (screenShotCanvas) {
|
|
16
16
|
if (isSave) {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @private
|
|
6
6
|
*/ export function saveBorderArrInfo(borderSize, positionInfo) {
|
|
7
7
|
// 获取裁剪框位置信息
|
|
8
|
-
const { startX
|
|
8
|
+
const { startX, startY, width, height } = positionInfo;
|
|
9
9
|
const halfBorderSize = borderSize / 2;
|
|
10
10
|
const borderArr = [];
|
|
11
11
|
// 移动, n北s南e东w西
|
|
@@ -14,8 +14,9 @@ export function saveCanvasToBase64(context, startX, startY, width, height, quali
|
|
|
14
14
|
// 将图片放进canvas中
|
|
15
15
|
imgContext.putImageData(img, 0, 0);
|
|
16
16
|
if (writeBase64) {
|
|
17
|
-
// 将图片自动添加至剪贴板中
|
|
18
|
-
|
|
17
|
+
var // 将图片自动添加至剪贴板中
|
|
18
|
+
_canvas;
|
|
19
|
+
(_canvas = canvas) === null || _canvas === void 0 ? void 0 : _canvas.toBlob((blob)=>{
|
|
19
20
|
var _navigator_clipboard;
|
|
20
21
|
if (blob == null) return;
|
|
21
22
|
const Clipboard = window.ClipboardItem;
|
|
@@ -12,13 +12,14 @@ export function saveCanvasToImage(context, startX, startY, width, height) {
|
|
|
12
12
|
// 获取裁剪框区域画布
|
|
13
13
|
const imgContext = getCanvas2dCtx(canvas, width, height);
|
|
14
14
|
if (imgContext) {
|
|
15
|
+
var _plugInParameters;
|
|
15
16
|
// 将图片放进裁剪框内
|
|
16
17
|
imgContext.putImageData(img, 0, 0);
|
|
17
18
|
const a = document.createElement("a");
|
|
18
19
|
// 获取图片
|
|
19
20
|
a.href = canvas.toDataURL("png");
|
|
20
21
|
// 获取用户传入的文件名
|
|
21
|
-
const imgName = (plugInParameters === null ||
|
|
22
|
+
const imgName = ((_plugInParameters = plugInParameters) === null || _plugInParameters === void 0 ? void 0 : _plugInParameters.getSaveImgTitle()) || new Date().getTime();
|
|
22
23
|
// 下载图片
|
|
23
24
|
a.download = `${imgName}.png`;
|
|
24
25
|
a.click();
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* @private
|
|
11
11
|
*/
|
|
12
12
|
export declare function zoomCutOutBoxPosition(currentX: number, currentY: number, startX: number, startY: number, width: number, height: number, option: number): {
|
|
13
|
-
tempStartX:
|
|
14
|
-
tempStartY:
|
|
15
|
-
tempWidth:
|
|
13
|
+
tempStartX: number;
|
|
14
|
+
tempStartY: number;
|
|
15
|
+
tempWidth: number;
|
|
16
16
|
tempHeight: number;
|
|
17
17
|
};
|
|
@@ -215,6 +215,7 @@ class CreateDom {
|
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
constructor(options){
|
|
218
|
+
var _options, _options1, _options2;
|
|
218
219
|
// 截图区域canvas容器
|
|
219
220
|
_define_property(this, "screenShotController", void 0);
|
|
220
221
|
// 截图工具栏容器
|
|
@@ -256,8 +257,8 @@ class CreateDom {
|
|
|
256
257
|
this.optionController = document.createElement("div");
|
|
257
258
|
// this.cutBoxSizeContainer = document.createElement("div");
|
|
258
259
|
this.textInputController = document.createElement("div");
|
|
259
|
-
this.completeCallback = options === null ||
|
|
260
|
-
this.closeCallback = options === null ||
|
|
260
|
+
this.completeCallback = (_options = options) === null || _options === void 0 ? void 0 : _options.completeCallback;
|
|
261
|
+
this.closeCallback = (_options1 = options) === null || _options1 === void 0 ? void 0 : _options1.closeCallback;
|
|
261
262
|
this.hiddenIcoArr = [];
|
|
262
263
|
this.optionController.addEventListener("click", (evt)=>{
|
|
263
264
|
const target = evt.target;
|
|
@@ -275,7 +276,7 @@ class CreateDom {
|
|
|
275
276
|
};
|
|
276
277
|
}
|
|
277
278
|
// 筛选需要隐藏的图标
|
|
278
|
-
if (options === null ||
|
|
279
|
+
if ((_options2 = options) === null || _options2 === void 0 ? void 0 : _options2.hiddenToolIco) {
|
|
279
280
|
for(const iconKey in options.hiddenToolIco){
|
|
280
281
|
if (options.hiddenToolIco[iconKey]) {
|
|
281
282
|
this.filterHideIcon(iconKey);
|
|
@@ -84,7 +84,7 @@ class InitData {
|
|
|
84
84
|
setScreenShotPosition(left, top) {
|
|
85
85
|
this.getScreenShotContainer();
|
|
86
86
|
if (screenShotController == null) return;
|
|
87
|
-
const { left: rLeft
|
|
87
|
+
const { left: rLeft, top: rTop } = getToolRelativePosition(left, top);
|
|
88
88
|
screenShotController.style.left = rLeft + "px";
|
|
89
89
|
screenShotController.style.top = rTop + "px";
|
|
90
90
|
}
|
|
@@ -194,7 +194,7 @@ class InitData {
|
|
|
194
194
|
// 设置截图工具位置信息
|
|
195
195
|
setToolInfo(left, top) {
|
|
196
196
|
toolController = document.getElementById("toolPanel");
|
|
197
|
-
const { left: rLeft
|
|
197
|
+
const { left: rLeft, top: rTop } = getToolRelativePosition(left, top);
|
|
198
198
|
toolController.style.left = rLeft + "px";
|
|
199
199
|
let sscTop = 0;
|
|
200
200
|
if (screenShotController) {
|
|
@@ -12,9 +12,10 @@ import PlugInParameters from "../main-entrance/PlugInParameters";
|
|
|
12
12
|
* @param drawBorders
|
|
13
13
|
* @private
|
|
14
14
|
*/ export function drawCutOutBox(mouseX, mouseY, width, height, context, borderSize, controller, imageController, drawBorders = true) {
|
|
15
|
+
var _controller, _controller1, _controller2, _controller3;
|
|
15
16
|
// 获取画布宽高
|
|
16
|
-
const canvasWidth = controller === null ||
|
|
17
|
-
const canvasHeight = controller === null ||
|
|
17
|
+
const canvasWidth = (_controller = controller) === null || _controller === void 0 ? void 0 : _controller.width;
|
|
18
|
+
const canvasHeight = (_controller1 = controller) === null || _controller1 === void 0 ? void 0 : _controller1.height;
|
|
18
19
|
const dpr = window.devicePixelRatio || 1;
|
|
19
20
|
const data = new PlugInParameters();
|
|
20
21
|
// 画布、图片不存在则return
|
|
@@ -58,9 +59,9 @@ import PlugInParameters from "../main-entrance/PlugInParameters";
|
|
|
58
59
|
context.save();
|
|
59
60
|
context.globalCompositeOperation = "destination-over";
|
|
60
61
|
// 图片尺寸使用canvas容器的css中的尺寸
|
|
61
|
-
let { imgWidth
|
|
62
|
-
imgWidth: parseInt(controller === null ||
|
|
63
|
-
imgHeight: parseInt(controller === null ||
|
|
62
|
+
let { imgWidth, imgHeight } = {
|
|
63
|
+
imgWidth: parseInt((_controller2 = controller) === null || _controller2 === void 0 ? void 0 : _controller2.style.width),
|
|
64
|
+
imgHeight: parseInt((_controller3 = controller) === null || _controller3 === void 0 ? void 0 : _controller3.style.height)
|
|
64
65
|
};
|
|
65
66
|
// 用户有传入截图dom绘制时使用其dom的尺寸
|
|
66
67
|
const screenShotDom = data.getScreenShotDom();
|
|
@@ -1,61 +1,62 @@
|
|
|
1
1
|
import PlugInParameters from "../main-entrance/PlugInParameters";
|
|
2
2
|
// 为插件的全局参数设置数据
|
|
3
3
|
export function setPlugInParameters(options) {
|
|
4
|
+
var _options, _options1, _options2, _options3, _options4, _options5, _options6, _options7, _options8, _options9, _options10, _options11, _options12, _options13, _options14;
|
|
4
5
|
const plugInParameters = new PlugInParameters();
|
|
5
6
|
// webrtc启用状态, 默认为true,如果设置了false则修改默认值
|
|
6
|
-
if ((options === null ||
|
|
7
|
+
if (((_options = options) === null || _options === void 0 ? void 0 : _options.enableWebRtc) === false) {
|
|
7
8
|
plugInParameters.setWebRtcStatus(false);
|
|
8
9
|
plugInParameters.setInitStatus(false);
|
|
9
10
|
}
|
|
10
11
|
// 读取并设置参数中的视频流数据
|
|
11
|
-
if ((options === null ||
|
|
12
|
+
if (((_options1 = options) === null || _options1 === void 0 ? void 0 : _options1.screenFlow) instanceof MediaStream) {
|
|
12
13
|
plugInParameters.setScreenFlow(options.screenFlow);
|
|
13
14
|
}
|
|
14
15
|
// 读取参数中的画布宽高, 两者都存在时才设置
|
|
15
|
-
if ((options === null ||
|
|
16
|
+
if (((_options2 = options) === null || _options2 === void 0 ? void 0 : _options2.canvasWidth) && ((_options3 = options) === null || _options3 === void 0 ? void 0 : _options3.canvasHeight)) {
|
|
16
17
|
plugInParameters.setCanvasSize(options.canvasWidth, options.canvasHeight);
|
|
17
18
|
}
|
|
18
19
|
// 读取参数设置默认展示截屏数据的状态,默认为false,如果设置了true才修改
|
|
19
|
-
if ((options === null ||
|
|
20
|
+
if (((_options4 = options) === null || _options4 === void 0 ? void 0 : _options4.showScreenData) === true) {
|
|
20
21
|
plugInParameters.setShowScreenDataStatus(true);
|
|
21
22
|
}
|
|
22
|
-
if ((options === null ||
|
|
23
|
+
if (((_options5 = options) === null || _options5 === void 0 ? void 0 : _options5.maskColor) && typeof options.maskColor === "object") {
|
|
23
24
|
plugInParameters.setMaskColor(options.maskColor);
|
|
24
25
|
}
|
|
25
26
|
// 调用者关闭了剪切板写入,则修改全局变量(默认为true)
|
|
26
|
-
if ((options === null ||
|
|
27
|
+
if (((_options6 = options) === null || _options6 === void 0 ? void 0 : _options6.writeBase64) === false) {
|
|
27
28
|
plugInParameters.setWriteImgState(options.writeBase64);
|
|
28
29
|
}
|
|
29
30
|
// 调用者传入了截图dom
|
|
30
|
-
if (options === null ||
|
|
31
|
+
if ((_options7 = options) === null || _options7 === void 0 ? void 0 : _options7.screenShotDom) {
|
|
31
32
|
plugInParameters.setScreenShotDom(options.screenShotDom);
|
|
32
33
|
}
|
|
33
34
|
// 调用者传入了裁剪区域边框像素点颜色信息
|
|
34
|
-
if (options === null ||
|
|
35
|
+
if ((_options8 = options) === null || _options8 === void 0 ? void 0 : _options8.cutBoxBdColor) {
|
|
35
36
|
plugInParameters.setCutBoxBdColor(options.cutBoxBdColor);
|
|
36
37
|
}
|
|
37
38
|
// 调用者传入了保存截图回调
|
|
38
|
-
if (options === null ||
|
|
39
|
+
if ((_options9 = options) === null || _options9 === void 0 ? void 0 : _options9.saveCallback) {
|
|
39
40
|
plugInParameters.setSaveCallback(options.saveCallback);
|
|
40
41
|
}
|
|
41
42
|
// 设置最大撤销次数
|
|
42
|
-
if (options === null ||
|
|
43
|
+
if ((_options10 = options) === null || _options10 === void 0 ? void 0 : _options10.maxUndoNum) {
|
|
43
44
|
plugInParameters.setMaxUndoNum(options.maxUndoNum);
|
|
44
45
|
}
|
|
45
46
|
// 箭头绘制工具是否使用等比例绘制方式
|
|
46
|
-
if (options === null ||
|
|
47
|
+
if ((_options11 = options) === null || _options11 === void 0 ? void 0 : _options11.useRatioArrow) {
|
|
47
48
|
plugInParameters.setRatioArrow(options.useRatioArrow);
|
|
48
49
|
}
|
|
49
50
|
// 设置图片自适应开启状态
|
|
50
|
-
if (options === null ||
|
|
51
|
+
if ((_options12 = options) === null || _options12 === void 0 ? void 0 : _options12.imgAutoFit) {
|
|
51
52
|
plugInParameters.setImgAutoFit(options.imgAutoFit);
|
|
52
53
|
}
|
|
53
54
|
// 设置图片保存时的文件名称
|
|
54
|
-
if (options === null ||
|
|
55
|
+
if ((_options13 = options) === null || _options13 === void 0 ? void 0 : _options13.saveImgTitle) {
|
|
55
56
|
plugInParameters.setSaveImgTitle(options.saveImgTitle);
|
|
56
57
|
}
|
|
57
58
|
// 确认截图时,是否需要销毁dom
|
|
58
|
-
if ((options === null ||
|
|
59
|
+
if (((_options14 = options) === null || _options14 === void 0 ? void 0 : _options14.destroyContainer) === false) {
|
|
59
60
|
plugInParameters.setDestroyContainerState(options.destroyContainer);
|
|
60
61
|
}
|
|
61
62
|
}
|