bhd-components 0.10.31 → 0.10.33
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/es2017/customerService/function.d.ts +2 -1
- package/es2017/customerService/function.js +11 -1
- package/es2017/customerService/index.js +295 -53
- package/es2017/customerService/index.module.less +116 -1
- package/es2017/customerService/index2.module.less +77 -2
- package/es2017/customerService/viewMemaid.d.ts +3 -0
- package/es2017/customerService/viewMemaid.js +57 -0
- package/es2017/typings.d.ts +1 -1
- package/esm/customerService/function.d.ts +2 -1
- package/esm/customerService/function.js +11 -1
- package/esm/customerService/index.js +306 -62
- package/esm/customerService/index.module.less +116 -1
- package/esm/customerService/index2.module.less +77 -2
- package/esm/customerService/viewMemaid.d.ts +3 -0
- package/esm/customerService/viewMemaid.js +75 -0
- package/esm/typings.d.ts +1 -1
- package/package.json +4 -2
- package/dist/index.esm.es5.development.css +0 -14245
- package/dist/index.esm.es5.development.js +0 -16026
- package/dist/index.esm.es5.production.css +0 -10
- package/dist/index.esm.es5.production.js +0 -1
- package/dist/vendor.esm.es5.development.css +0 -119
- package/dist/vendor.esm.es5.development.js +0 -182666
- package/dist/vendor.esm.es5.production.css +0 -11
- package/dist/vendor.esm.es5.production.js +0 -493
|
@@ -200,6 +200,10 @@
|
|
|
200
200
|
width: 6px;
|
|
201
201
|
height: 4px;
|
|
202
202
|
}
|
|
203
|
+
&::-webkit-scrollbar-thumb {
|
|
204
|
+
border-radius: 4px;
|
|
205
|
+
background-color: rgba(181, 184, 198, 0.8);
|
|
206
|
+
}
|
|
203
207
|
}
|
|
204
208
|
.left {
|
|
205
209
|
.head_sculpture {
|
|
@@ -498,7 +502,67 @@
|
|
|
498
502
|
margin: 4px 0;
|
|
499
503
|
margin-bottom: 8px;
|
|
500
504
|
border-radius: 0 0 4px 4px;
|
|
505
|
+
&.mermaid{
|
|
506
|
+
text-align: center;
|
|
507
|
+
border-top: 1px solid rgba(0, 0, 0, 0.06);
|
|
508
|
+
border-radius: 4px;
|
|
509
|
+
margin: 0;
|
|
510
|
+
svg{
|
|
511
|
+
height: auto;
|
|
512
|
+
width: 100%;
|
|
513
|
+
|
|
514
|
+
:global{
|
|
515
|
+
.messageText {
|
|
516
|
+
stroke: none !important;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
501
521
|
}
|
|
522
|
+
.maskZoomBox{
|
|
523
|
+
position: relative;
|
|
524
|
+
display: inline-block;
|
|
525
|
+
max-width: 100%;
|
|
526
|
+
padding: 0 !important;
|
|
527
|
+
>img{
|
|
528
|
+
max-width: 100%;
|
|
529
|
+
}
|
|
530
|
+
.zoomBox{
|
|
531
|
+
width: 20px;
|
|
532
|
+
height: 20px;
|
|
533
|
+
font-size: 20px;
|
|
534
|
+
color: #fff;
|
|
535
|
+
display: none;
|
|
536
|
+
position: absolute;
|
|
537
|
+
top: 50%;
|
|
538
|
+
left: 50%;
|
|
539
|
+
transform: translate(-50%, -50%);
|
|
540
|
+
z-index: 2;
|
|
541
|
+
cursor: pointer;
|
|
542
|
+
}
|
|
543
|
+
&::after{
|
|
544
|
+
content: '';
|
|
545
|
+
position: absolute;
|
|
546
|
+
top: 0;
|
|
547
|
+
left: 0;
|
|
548
|
+
width: 100%;
|
|
549
|
+
height: 100%;
|
|
550
|
+
background-color: rgba(0, 0, 0, .3);
|
|
551
|
+
border-radius: 4px;
|
|
552
|
+
display: none;
|
|
553
|
+
align-items: center;
|
|
554
|
+
justify-content: center;
|
|
555
|
+
z-index: 1;
|
|
556
|
+
}
|
|
557
|
+
&:hover{
|
|
558
|
+
&::after{
|
|
559
|
+
display: flex;
|
|
560
|
+
}
|
|
561
|
+
.zoomBox{
|
|
562
|
+
display: block;
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
}
|
|
502
566
|
// 最后一行操作按钮
|
|
503
567
|
.operate_modal_bottom{
|
|
504
568
|
position: relative;
|
|
@@ -863,6 +927,9 @@
|
|
|
863
927
|
position: relative;
|
|
864
928
|
top: 2px;
|
|
865
929
|
}
|
|
930
|
+
&:has(+ pre.mermaid) {
|
|
931
|
+
display: none !important;
|
|
932
|
+
}
|
|
866
933
|
}
|
|
867
934
|
:global{
|
|
868
935
|
.copy_success{
|
|
@@ -1063,6 +1130,11 @@
|
|
|
1063
1130
|
border-radius: 4px;
|
|
1064
1131
|
background-color: #f4f4f4;
|
|
1065
1132
|
}
|
|
1133
|
+
&.mermaid{
|
|
1134
|
+
background: #fafafa !important;
|
|
1135
|
+
color: #111;
|
|
1136
|
+
text-align: center;
|
|
1137
|
+
}
|
|
1066
1138
|
}
|
|
1067
1139
|
}
|
|
1068
1140
|
//隐藏聊天头像
|
|
@@ -1155,8 +1227,9 @@
|
|
|
1155
1227
|
.Drawer_buttom {
|
|
1156
1228
|
display: flex;
|
|
1157
1229
|
align-items: flex-end;
|
|
1158
|
-
margin-bottom: 12px;
|
|
1230
|
+
// margin-bottom: 12px;
|
|
1159
1231
|
padding: 0 16px;
|
|
1232
|
+
padding-bottom: 12px;
|
|
1160
1233
|
.input_wrap {
|
|
1161
1234
|
// display: flex;
|
|
1162
1235
|
align-items: flex-end;
|
|
@@ -2164,3 +2237,45 @@
|
|
|
2164
2237
|
strong {
|
|
2165
2238
|
font-weight: bold !important;
|
|
2166
2239
|
}
|
|
2240
|
+
|
|
2241
|
+
.viewMedia_Modal {
|
|
2242
|
+
:global {
|
|
2243
|
+
.bhd-modal {
|
|
2244
|
+
width: 100% !important;
|
|
2245
|
+
height: 100% !important;
|
|
2246
|
+
min-height: 600px;
|
|
2247
|
+
margin: 0;
|
|
2248
|
+
padding: 0;
|
|
2249
|
+
overflow: hidden;
|
|
2250
|
+
max-width: none;
|
|
2251
|
+
.bhd-modal-content {
|
|
2252
|
+
width: 100%;
|
|
2253
|
+
height: 100%;
|
|
2254
|
+
background: transparent;
|
|
2255
|
+
box-shadow: none;
|
|
2256
|
+
border-radius: none;
|
|
2257
|
+
.bhd-modal-body {
|
|
2258
|
+
width: 100%;
|
|
2259
|
+
height: 100%;
|
|
2260
|
+
padding: 0px;
|
|
2261
|
+
}
|
|
2262
|
+
}
|
|
2263
|
+
}
|
|
2264
|
+
.bhd-modal-close-x{
|
|
2265
|
+
color: #fff !important;
|
|
2266
|
+
}
|
|
2267
|
+
}
|
|
2268
|
+
}
|
|
2269
|
+
.viewMemaid{
|
|
2270
|
+
width: 100%;
|
|
2271
|
+
height: 100%;
|
|
2272
|
+
display: flex;
|
|
2273
|
+
align-items: center;
|
|
2274
|
+
justify-content: center;
|
|
2275
|
+
|
|
2276
|
+
> *{
|
|
2277
|
+
background: #fafafa;
|
|
2278
|
+
padding: 10px;
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2281
|
+
}
|
|
@@ -197,6 +197,10 @@
|
|
|
197
197
|
width: 6px;
|
|
198
198
|
height: 4px;
|
|
199
199
|
}
|
|
200
|
+
&::-webkit-scrollbar-thumb {
|
|
201
|
+
border-radius: 4px;
|
|
202
|
+
background-color: rgba(181, 184, 198, 0.8);
|
|
203
|
+
}
|
|
200
204
|
}
|
|
201
205
|
.left {
|
|
202
206
|
.head_sculpture {
|
|
@@ -491,7 +495,69 @@
|
|
|
491
495
|
margin: 4px 0;
|
|
492
496
|
margin-bottom: 8px;
|
|
493
497
|
border-radius: 0 0 4px 4px;
|
|
494
|
-
|
|
498
|
+
&.mermaid{
|
|
499
|
+
text-align: center;
|
|
500
|
+
border-top: 1px solid rgba(0, 0, 0, 0.06);
|
|
501
|
+
border-radius: 4px;
|
|
502
|
+
margin:0;
|
|
503
|
+
|
|
504
|
+
svg{
|
|
505
|
+
height: auto;
|
|
506
|
+
width: 100%;
|
|
507
|
+
:global{
|
|
508
|
+
.messageText {
|
|
509
|
+
stroke: none !important;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
.maskZoomBox{
|
|
517
|
+
position: relative;
|
|
518
|
+
display: inline-block;
|
|
519
|
+
max-width: 100%;
|
|
520
|
+
padding: 0 !important;
|
|
521
|
+
>img{
|
|
522
|
+
max-width: 100%;
|
|
523
|
+
}
|
|
524
|
+
.zoomBox{
|
|
525
|
+
width: 20px;
|
|
526
|
+
height: 20px;
|
|
527
|
+
font-size: 20px;
|
|
528
|
+
color: #fff;
|
|
529
|
+
display: none;
|
|
530
|
+
position: absolute;
|
|
531
|
+
top: 50%;
|
|
532
|
+
left: 50%;
|
|
533
|
+
transform: translate(-50%, -50%);
|
|
534
|
+
z-index: 2;
|
|
535
|
+
cursor: pointer;
|
|
536
|
+
}
|
|
537
|
+
&::after{
|
|
538
|
+
content: '';
|
|
539
|
+
position: absolute;
|
|
540
|
+
top: 0;
|
|
541
|
+
left: 0;
|
|
542
|
+
width: 100%;
|
|
543
|
+
height: 100%;
|
|
544
|
+
background-color: rgba(0, 0, 0, .3);
|
|
545
|
+
border-radius: 4px;
|
|
546
|
+
display: none;
|
|
547
|
+
align-items: center;
|
|
548
|
+
justify-content: center;
|
|
549
|
+
z-index: 1;
|
|
550
|
+
}
|
|
551
|
+
&:hover{
|
|
552
|
+
&::after{
|
|
553
|
+
display: flex;
|
|
554
|
+
}
|
|
555
|
+
.zoomBox{
|
|
556
|
+
display: block;
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
|
|
495
561
|
// 最后一行操作按钮
|
|
496
562
|
.operate_modal_bottom{
|
|
497
563
|
position: relative;
|
|
@@ -856,6 +922,9 @@
|
|
|
856
922
|
position: relative;
|
|
857
923
|
top: 2px;
|
|
858
924
|
}
|
|
925
|
+
&:has(+ pre.mermaid) {
|
|
926
|
+
display: none !important;
|
|
927
|
+
}
|
|
859
928
|
}
|
|
860
929
|
:global{
|
|
861
930
|
.copy_success{
|
|
@@ -1054,6 +1123,11 @@
|
|
|
1054
1123
|
border-radius: 4px;
|
|
1055
1124
|
background-color: #f4f4f4;
|
|
1056
1125
|
}
|
|
1126
|
+
&.mermaid{
|
|
1127
|
+
background: #fafafa !important;
|
|
1128
|
+
color: #111;
|
|
1129
|
+
text-align: center;
|
|
1130
|
+
}
|
|
1057
1131
|
}
|
|
1058
1132
|
}
|
|
1059
1133
|
//隐藏聊天头像
|
|
@@ -1146,8 +1220,9 @@
|
|
|
1146
1220
|
.Drawer_buttom {
|
|
1147
1221
|
display: flex;
|
|
1148
1222
|
align-items: flex-end;
|
|
1149
|
-
margin-bottom: 12px;
|
|
1223
|
+
// margin-bottom: 12px;
|
|
1150
1224
|
padding: 0 16px;
|
|
1225
|
+
padding-bottom: 12px;
|
|
1151
1226
|
.input_wrap {
|
|
1152
1227
|
// display: flex;
|
|
1153
1228
|
align-items: flex-end;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
|
|
2
|
+
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
3
|
+
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
4
|
+
import { jsx as _jsx } from "@ice/jsx-runtime/jsx-runtime";
|
|
5
|
+
import React, { useEffect } from "react";
|
|
6
|
+
import styles from "./index.module.less";
|
|
7
|
+
import { Modal } from "antd";
|
|
8
|
+
// @ts-ignore
|
|
9
|
+
import mermaid from "mermaid";
|
|
10
|
+
mermaid.initialize({
|
|
11
|
+
startOnLoad: false,
|
|
12
|
+
theme: "default",
|
|
13
|
+
securityLevel: "loose",
|
|
14
|
+
fontFamily: "Arial, sans-serif",
|
|
15
|
+
flowchart: {
|
|
16
|
+
htmlLabels: true,
|
|
17
|
+
curve: "basis"
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
function ViewMemaid(props) {
|
|
21
|
+
var visible = props.visible, className = props.className, _props_getContainer = props.getContainer, getContainer = _props_getContainer === void 0 ? function() {
|
|
22
|
+
return document.body;
|
|
23
|
+
} : _props_getContainer, _props_onCancel = props.onCancel, onCancel = _props_onCancel === void 0 ? function() {} : _props_onCancel, content = props.content;
|
|
24
|
+
var _React_useState = _sliced_to_array(React.useState(content), 2), contentText = _React_useState[0], setContentText = _React_useState[1];
|
|
25
|
+
useEffect(function() {
|
|
26
|
+
var _dom;
|
|
27
|
+
var dom = document.getElementById(content);
|
|
28
|
+
console.log("dom", dom, content);
|
|
29
|
+
setContentText(((_dom = dom) === null || _dom === void 0 ? void 0 : _dom.textContent) || "");
|
|
30
|
+
var timer = setTimeout(/*#__PURE__*/ _async_to_generator(function() {
|
|
31
|
+
return _ts_generator(this, function(_state) {
|
|
32
|
+
switch(_state.label){
|
|
33
|
+
case 0:
|
|
34
|
+
return [
|
|
35
|
+
4,
|
|
36
|
+
mermaid.init({
|
|
37
|
+
querySelector: ".".concat(styles.viewMemaid),
|
|
38
|
+
suppressErrors: true
|
|
39
|
+
}, ".".concat(styles.viewMemaid))
|
|
40
|
+
];
|
|
41
|
+
case 1:
|
|
42
|
+
_state.sent();
|
|
43
|
+
clearTimeout(timer);
|
|
44
|
+
return [
|
|
45
|
+
2
|
|
46
|
+
];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}), 100);
|
|
50
|
+
}, [
|
|
51
|
+
content
|
|
52
|
+
]);
|
|
53
|
+
return /*#__PURE__*/ _jsx(Modal, {
|
|
54
|
+
transitionName: "",
|
|
55
|
+
maskTransitionName: "",
|
|
56
|
+
title: null,
|
|
57
|
+
footer: null,
|
|
58
|
+
closable: true,
|
|
59
|
+
centered: true,
|
|
60
|
+
// destroyOnClose
|
|
61
|
+
open: visible,
|
|
62
|
+
keyboard: false,
|
|
63
|
+
onCancel: onCancel,
|
|
64
|
+
maskStyle: {
|
|
65
|
+
background: "rgba(0, 0, 0, 0.65)"
|
|
66
|
+
},
|
|
67
|
+
wrapClassName: "".concat(styles.viewMedia_Modal, " ").concat(className || ""),
|
|
68
|
+
getContainer: getContainer,
|
|
69
|
+
children: visible && /*#__PURE__*/ _jsx("div", {
|
|
70
|
+
className: styles.viewMemaid,
|
|
71
|
+
children: contentText
|
|
72
|
+
})
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
export default ViewMemaid;
|
package/esm/typings.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bhd-components",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.33",
|
|
4
4
|
"description": "组件功能描述",
|
|
5
5
|
"config": {
|
|
6
6
|
"commitizen": {
|
|
@@ -42,7 +42,8 @@
|
|
|
42
42
|
"scripts": {
|
|
43
43
|
"start:large-memory": "node --max-old-space-size=8192 node_modules/.bin/ice-pkg start",
|
|
44
44
|
"start": "ice-pkg start",
|
|
45
|
-
"build": "ice-pkg build",
|
|
45
|
+
"build:1": "ice-pkg build",
|
|
46
|
+
"build":"node --max-old-space-size=8192 node_modules/.bin/ice-pkg build",
|
|
46
47
|
"build:esm": "cross-env NODE_TYPE=esm ice-pkg build",
|
|
47
48
|
"build:online": "cross-env NODE_TYPE=online ice-pkg build ",
|
|
48
49
|
"build:online_dev": "cross-env NODE_TYPE=online_dev ice-pkg build ",
|
|
@@ -76,6 +77,7 @@
|
|
|
76
77
|
"html2canvas": "^1.4.1",
|
|
77
78
|
"less": "^4.1.3",
|
|
78
79
|
"less-loader": "^11.1.0",
|
|
80
|
+
"mermaid": "^8.14.0",
|
|
79
81
|
"raw-loader": "^4.0.2",
|
|
80
82
|
"react-cropper": "^2.3.3",
|
|
81
83
|
"react-image-crop": "^11.0.5",
|