bhd-components 0.7.42 → 0.8.0

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.
@@ -120933,7 +120933,7 @@ function requireD () {
120933
120933
  + 'pragma private protected public pure ref return scope shared static struct '
120934
120934
  + 'super switch synchronized template this throw try typedef typeid typeof union '
120935
120935
  + 'unittest version void volatile while with __FILE__ __LINE__ __gshared|10 '
120936
- + '__thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ "0.7.42"',
120936
+ + '__thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ "0.8.0"',
120937
120937
  built_in:
120938
120938
  'bool cdouble cent cfloat char creal dchar delegate double dstring float function '
120939
120939
  + 'idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar '
@@ -1,5 +1,5 @@
1
- import { z as zhCN, A as App, _ as _object_spread, a as AntdMessage, M as Modal$1, b as AntdNotification, C as ConfigProvider, c as _extends, d as _object_destructuring_empty, j as jsx, e as _object_spread_props, f as jsxs, t as transform, S as StyleProvider, g as _sliced_to_array, T as Tooltip, h as Table$2, I as Icon, E as ExclamationCircleFilled, i as _to_consumable_array, P as Pagination$1, k as Select, l as CaretDownOutlined, m as _inherits, n as _create_super, o as _create_class, p as _class_call_check, q as _define_property, r as _assert_this_initialized, s as _async_to_generator, L as LeftOutlined, R as RightOutlined, u as MinusOutlined, v as PlusOutlined, w as __generator, x as Input, y as SearchOutlined, B as CloseOutlined, X, D as I, H, F as Remarkable, G as Drawer, J as HighlightJS, Z as ZoomInOutlined } from './c6e292ae.esm.es5.development.js';
2
- export { K as Affix, N as Alert, O as Anchor, a as AntdMessage, A as App, Q as AutoComplete, U as Avatar, W as BackTop, Y as Badge, $ as Breadcrumb, a0 as Button, a1 as Calendar, a2 as Card, a3 as Carousel, a4 as Cascader, a5 as Checkbox, a6 as Col, a7 as Collapse, a8 as DatePicker, a9 as Descriptions, aa as Divider, G as Drawer, ab as Dropdown, ac as Empty, V as FloatButton, ad as Form, ae as Grid, af as Image, x as Input, ag as InputNumber, ah as Layout, ai as List, aj as Mentions, ak as Menu, M as Modal, al as Popconfirm, am as Popover, an as Progress, aM as QRCode, ao as Radio, ap as Rate, aq as Result, ar as Row, as as Segmented, k as Select, at as Skeleton, au as Slider, av as Space, aw as Spin, ax as Statistic, ay as Steps, az as Switch, aA as Tabs, aB as Tag, aD as TimePicker, aE as Timeline, T as Tooltip, aF as Tour, aG as Transfer, aH as Tree, aI as TreeSelect, aJ as Typography, aK as Upload, aL as Watermark, aO as en_US, b as notification, aC as theme, aN as version, z as zh_CN } from './c6e292ae.esm.es5.development.js';
1
+ import { z as zhCN, A as App, _ as _object_spread, a as AntdMessage, M as Modal$1, b as AntdNotification, C as ConfigProvider, c as _extends, d as _object_destructuring_empty, j as jsx, e as _object_spread_props, f as jsxs, t as transform, S as StyleProvider, g as _sliced_to_array, T as Tooltip, h as Table$2, I as Icon, E as ExclamationCircleFilled, i as _to_consumable_array, P as Pagination$1, k as Select, l as CaretDownOutlined, m as _inherits, n as _create_super, o as _create_class, p as _class_call_check, q as _define_property, r as _assert_this_initialized, s as _async_to_generator, L as LeftOutlined, R as RightOutlined, u as MinusOutlined, v as PlusOutlined, w as __generator, x as Input, y as SearchOutlined, B as CloseOutlined, X, D as I, H, F as Remarkable, G as Drawer, J as HighlightJS, Z as ZoomInOutlined } from './de88944c.esm.es5.development.js';
2
+ export { K as Affix, N as Alert, O as Anchor, a as AntdMessage, A as App, Q as AutoComplete, U as Avatar, W as BackTop, Y as Badge, $ as Breadcrumb, a0 as Button, a1 as Calendar, a2 as Card, a3 as Carousel, a4 as Cascader, a5 as Checkbox, a6 as Col, a7 as Collapse, a8 as DatePicker, a9 as Descriptions, aa as Divider, G as Drawer, ab as Dropdown, ac as Empty, V as FloatButton, ad as Form, ae as Grid, af as Image, x as Input, ag as InputNumber, ah as Layout, ai as List, aj as Mentions, ak as Menu, M as Modal, al as Popconfirm, am as Popover, an as Progress, aM as QRCode, ao as Radio, ap as Rate, aq as Result, ar as Row, as as Segmented, k as Select, at as Skeleton, au as Slider, av as Space, aw as Spin, ax as Statistic, ay as Steps, az as Switch, aA as Tabs, aB as Tag, aD as TimePicker, aE as Timeline, T as Tooltip, aF as Tour, aG as Transfer, aH as Tree, aI as TreeSelect, aJ as Typography, aK as Upload, aL as Watermark, aO as en_US, b as notification, aC as theme, aN as version, z as zh_CN } from './de88944c.esm.es5.development.js';
3
3
  import * as React from 'react';
4
4
  import { useState, useRef, useEffect, useLayoutEffect, forwardRef, useImperativeHandle } from 'react';
5
5
  import { Fragment } from 'react/jsx-runtime';
@@ -3304,11 +3304,13 @@ var ScreenshotTool = /*#__PURE__*/ forwardRef(function(props, ref) {
3304
3304
  var _useState = _sliced_to_array(useState(), 2), crop = _useState[0], setCrop = _useState[1];
3305
3305
  var _useState1 = _sliced_to_array(useState(), 2), completedCrop = _useState1[0], setCompletedCrop = _useState1[1];
3306
3306
  var _useState2 = _sliced_to_array(useState(16 / 9), 2), aspect = _useState2[0]; _useState2[1];
3307
- var _useState3 = _sliced_to_array(useState({
3307
+ var _useState3 = _sliced_to_array(useState(window.devicePixelRatio), 2), devicePixelRatio = _useState3[0]; _useState3[1];
3308
+ var _useState4 = _sliced_to_array(useState(true), 2), isFirst = _useState4[0], setIsFirst = _useState4[1];
3309
+ var _useState5 = _sliced_to_array(useState({
3308
3310
  top: 0,
3309
3311
  left: 0
3310
- }), 2), btnPosition = _useState3[0], setBtnPosition = _useState3[1];
3311
- var _useState4 = _sliced_to_array(useState(false), 2), showBtn = _useState4[0], setShowBtn = _useState4[1];
3312
+ }), 2), btnPosition = _useState5[0], setBtnPosition = _useState5[1];
3313
+ var _useState6 = _sliced_to_array(useState(false), 2), showBtn = _useState6[0], setShowBtn = _useState6[1];
3312
3314
  function centerAspectCrop(mediaWidth, mediaHeight, aspect) {
3313
3315
  return I(H({
3314
3316
  unit: "%",
@@ -3336,10 +3338,10 @@ var ScreenshotTool = /*#__PURE__*/ forwardRef(function(props, ref) {
3336
3338
  image.src = imgBese64; // 将'your_image_url'替换为你自己的图片URL
3337
3339
  // 等待图片加载完成后再进行操作
3338
3340
  image.onload = function() {
3339
- var x = completedCrop.x; // 起始点x坐标
3340
- var y = completedCrop.y; // 起始点y坐标
3341
- var width = completedCrop.width; // 需要裁剪的区域宽度
3342
- var height = completedCrop.height; // 需要裁剪的区域高度
3341
+ var x = parseInt((completedCrop.x * devicePixelRatio).toString()); // 起始点x坐标
3342
+ var y = parseInt((completedCrop.y * devicePixelRatio).toString()); // 起始点y坐标
3343
+ var width = parseInt((completedCrop.width * devicePixelRatio).toString()); // 需要裁剪的区域宽度
3344
+ var height = parseInt((completedCrop.height * devicePixelRatio).toString()); // 需要裁剪的区域高度
3343
3345
  // 设置canvas大小与裁剪区域相同
3344
3346
  canvas.width = width;
3345
3347
  canvas.height = height;
@@ -3360,7 +3362,7 @@ var ScreenshotTool = /*#__PURE__*/ forwardRef(function(props, ref) {
3360
3362
  var y = e.y;
3361
3363
  var h = e.height;
3362
3364
  var w = e.width;
3363
- var top = y + h + 8;
3365
+ var top = y + h + (isFirst ? 21 : 8);
3364
3366
  var left = x + w - 88;
3365
3367
  if (top + 42 > window.innerHeight) {
3366
3368
  top = top - 50;
@@ -3370,6 +3372,7 @@ var ScreenshotTool = /*#__PURE__*/ forwardRef(function(props, ref) {
3370
3372
  left: left
3371
3373
  });
3372
3374
  setShowBtn(true);
3375
+ setIsFirst(false);
3373
3376
  };
3374
3377
  return /*#__PURE__*/ jsxs("div", {
3375
3378
  className: modules_63b47c51.screenshot_Modal,
@@ -3824,10 +3827,10 @@ var CustomerService = function(props) {
3824
3827
  w: window.innerWidth,
3825
3828
  h: window.innerHeight
3826
3829
  },
3827
- wrcReplyTime: 500,
3828
- wrcWindowMode: false,
3830
+ wrcReplyTime: 20,
3831
+ wrcWindowMode: true,
3829
3832
  hiddenScrollBar: {
3830
- state: false
3833
+ state: true
3831
3834
  },
3832
3835
  completeCallback: function(param) {
3833
3836
  var base64 = param.base64;
@@ -3840,6 +3843,19 @@ var CustomerService = function(props) {
3840
3843
  triggerCallback: function() {
3841
3844
  // 截图组件加载完毕调用此方法来完成框选区域的截图
3842
3845
  plugin.completeScreenshot();
3846
+ },
3847
+ cancelCallback: function(err) {
3848
+ if (err.code === -1) {
3849
+ console.log(err);
3850
+ newShowType.current = false;
3851
+ if (saveShowType != -1) {
3852
+ setShowType(saveShowType);
3853
+ } else {
3854
+ setShowType(1);
3855
+ }
3856
+ setShowScreenshot(false);
3857
+ onCancel();
3858
+ }
3843
3859
  }
3844
3860
  });
3845
3861
  // modernScreenshot
@@ -7215,6 +7231,9 @@ var CustomerService = function(props) {
7215
7231
  }),
7216
7232
  (showType == 4 || showType == 5) && /*#__PURE__*/ jsxs("div", {
7217
7233
  className: "".concat(styles.ChatWindow_Drawer),
7234
+ style: {
7235
+ display: "".concat(!showScreenshot ? "none" : "flex")
7236
+ },
7218
7237
  id: "",
7219
7238
  children: [
7220
7239
  /*#__PURE__*/ jsx("div", {