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.
Files changed (87) hide show
  1. package/README.md +1 -1
  2. package/dist/index.esm.es5.development.css +454 -363
  3. package/dist/index.esm.es5.development.js +333 -325
  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.css +119 -0
  7. package/dist/{a5565b8a.esm.es5.development.js → vendor.esm.es5.development.js} +8472 -7204
  8. package/dist/vendor.esm.es5.production.css +11 -0
  9. package/dist/vendor.esm.es5.production.js +485 -0
  10. package/es2017/bhdAppLayout/components/BhdTableSimple/index.js +1 -1
  11. package/es2017/bhdAppLayout/components/BhdTableSimple/index/347/232/204/345/211/257/346/234/254.js +2 -2
  12. package/es2017/bhdAppLayout/index.js +16 -16
  13. package/es2017/bhdDatePicker/index.d.ts +1 -2
  14. package/es2017/bhdDatePicker/index.js +253 -256
  15. package/es2017/bhdDatePicker/index.module.less +120 -8
  16. package/es2017/bhdSelect/index.js +4 -4
  17. package/es2017/bhdTipModal/index.js +6 -6
  18. package/es2017/customerService/contactsList.d.ts +2 -2
  19. package/es2017/customerService/contactsList.js +2 -2
  20. package/es2017/customerService/function.js +2 -1
  21. package/es2017/customerService/historyFun.d.ts +2 -2
  22. package/es2017/customerService/historyFun.js +2 -2
  23. package/es2017/customerService/index.d.ts +2 -2
  24. package/es2017/customerService/index.js +5 -5
  25. package/es2017/customerService/js-screen-shot/lib/common-methods/GetCanvasImgData.js +1 -1
  26. package/es2017/customerService/js-screen-shot/lib/common-methods/SaveBorderArrInfo.js +1 -1
  27. package/es2017/customerService/js-screen-shot/lib/common-methods/SaveCanvasToBase64.js +3 -2
  28. package/es2017/customerService/js-screen-shot/lib/common-methods/SaveCanvasToImage.js +2 -1
  29. package/es2017/customerService/js-screen-shot/lib/common-methods/ZoomCutOutBoxPosition.d.ts +3 -3
  30. package/es2017/customerService/js-screen-shot/lib/main-entrance/CreateDom.js +4 -3
  31. package/es2017/customerService/js-screen-shot/lib/main-entrance/InitData.js +2 -2
  32. package/es2017/customerService/js-screen-shot/lib/split-methods/DrawCutOutBox.js +6 -5
  33. package/es2017/customerService/js-screen-shot/lib/split-methods/SetPlugInParameters.js +15 -14
  34. package/es2017/customerService/js-screen-shot/lib/split-methods/ToolClickEvent.js +1 -1
  35. package/es2017/customerService/js-screen-shot/lib/split-methods/drawCrossImg.js +2 -1
  36. package/es2017/customerService/js-screen-shot/main.js +38 -35
  37. package/es2017/customerService/screenshotTool.d.ts +2 -2
  38. package/es2017/customerService/screenshotTool.js +2 -2
  39. package/es2017/customerService/teacherList.d.ts +2 -2
  40. package/es2017/customerService/teacherList.js +2 -2
  41. package/es2017/i18n/en_US.js +4 -1
  42. package/es2017/i18n/zh_CN.js +4 -1
  43. package/es2017/icons/index.js +2 -2
  44. package/es2017/index.js +14 -14
  45. package/es2017/provider/index.js +2 -2
  46. package/es2017/table/index.js +4 -4
  47. package/es2017/tableSelect/index.js +3 -3
  48. package/es2017/textTootip/index.js +1 -1
  49. package/es2017/titleBar/index.js +3 -3
  50. package/es2017/viewImage/index.js +13 -13
  51. package/esm/bhdAppLayout/index.js +15 -15
  52. package/esm/bhdDatePicker/index.d.ts +1 -2
  53. package/esm/bhdDatePicker/index.js +254 -257
  54. package/esm/bhdDatePicker/index.module.less +120 -8
  55. package/esm/bhdSelect/index.js +1 -1
  56. package/esm/bhdTipModal/index.js +1 -1
  57. package/esm/customerService/contactsList.d.ts +2 -2
  58. package/esm/customerService/contactsList.js +1 -1
  59. package/esm/customerService/function.js +2 -1
  60. package/esm/customerService/historyFun.d.ts +2 -2
  61. package/esm/customerService/historyFun.js +1 -1
  62. package/esm/customerService/index.d.ts +2 -2
  63. package/esm/customerService/index.js +1 -1
  64. package/esm/customerService/js-screen-shot/lib/common-methods/SaveCanvasToBase64.js +3 -2
  65. package/esm/customerService/js-screen-shot/lib/common-methods/SaveCanvasToImage.js +2 -1
  66. package/esm/customerService/js-screen-shot/lib/common-methods/ZoomCutOutBoxPosition.d.ts +3 -3
  67. package/esm/customerService/js-screen-shot/lib/main-entrance/CreateDom.js +4 -3
  68. package/esm/customerService/js-screen-shot/lib/split-methods/DrawCutOutBox.js +5 -4
  69. package/esm/customerService/js-screen-shot/lib/split-methods/SetPlugInParameters.js +15 -14
  70. package/esm/customerService/js-screen-shot/lib/split-methods/drawCrossImg.js +2 -1
  71. package/esm/customerService/js-screen-shot/main.js +31 -28
  72. package/esm/customerService/screenshotTool.d.ts +2 -2
  73. package/esm/customerService/screenshotTool.js +1 -1
  74. package/esm/customerService/teacherList.d.ts +2 -2
  75. package/esm/customerService/teacherList.js +1 -1
  76. package/esm/i18n/en_US.js +4 -1
  77. package/esm/i18n/zh_CN.js +4 -1
  78. package/esm/icons/index.js +1 -1
  79. package/esm/index.js +14 -14
  80. package/esm/tableSelect/index.js +1 -1
  81. package/esm/viewImage/index.js +3 -3
  82. package/package.json +1 -1
  83. package/dist/deb6cc9b.esm.es5.production.js +0 -485
  84. package/dist/vendor.esm.es5.development.esm.es5.development.css +0 -119
  85. package/dist/vendor.esm.es5.production.esm.es5.production.css +0 -11
  86. package/es2017/customerService/screenShotPlugin.esm.js +0 -6515
  87. package/esm/customerService/screenShotPlugin.esm.js +0 -6516
@@ -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 html2canvas$1, G as Remarkable, J as Drawer, K as HighlightJS, Z as ZoomInOutlined, N as DatePicker, O as dayjs, Q as Button } from './a5565b8a.esm.es5.development.js';
2
- export { U as Affix, V as Alert, W as Anchor, a as AntdMessage, A as App, Y as AutoComplete, $ as Avatar, a1 as BackTop, a2 as Badge, a3 as Breadcrumb, Q as Button, a4 as Calendar, a5 as Card, a6 as Carousel, a7 as Cascader, a8 as Checkbox, a9 as Col, aa as Collapse, N as DatePicker, ab as Descriptions, ac as Divider, J as Drawer, ad as Dropdown, ae as Empty, a0 as FloatButton, af as Form, ag as Grid, ah as Image, x as Input, ai as InputNumber, aj as Layout, ak as List, al as Mentions, am as Menu, M as Modal, an as Popconfirm, ao as Popover, ap as Progress, aO as QRCode, aq as Radio, ar as Rate, as as Result, at as Row, au as Segmented, k as Select, av as Skeleton, aw as Slider, ax as Space, ay as Spin, az as Statistic, aA as Steps, aB as Switch, aC as Tabs, aD as Tag, aF as TimePicker, aG as Timeline, T as Tooltip, aH as Tour, aI as Transfer, aJ as Tree, aK as TreeSelect, aL as Typography, aM as Upload, aN as Watermark, aQ as en_US, b as notification, aE as theme, aP as version, z as zh_CN } from './a5565b8a.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 html2canvas$1, G as Remarkable, J as Drawer, K as HighlightJS, Z as ZoomInOutlined, N as DatePicker, O as Button, Q as _type_of } from './vendor.esm.es5.development.js';
2
+ export { U as Affix, V as Alert, W as Anchor, a as AntdMessage, A as App, Y as AutoComplete, $ as Avatar, a1 as BackTop, a2 as Badge, a3 as Breadcrumb, O as Button, a4 as Calendar, a5 as Card, a6 as Carousel, a7 as Cascader, a8 as Checkbox, a9 as Col, aa as Collapse, N as DatePicker, ab as Descriptions, ac as Divider, J as Drawer, ad as Dropdown, ae as Empty, a0 as FloatButton, af as Form, ag as Grid, ah as Image, x as Input, ai as InputNumber, aj as Layout, ak as List, al as Mentions, am as Menu, M as Modal, an as Popconfirm, ao as Popover, ap as Progress, aO as QRCode, aq as Radio, ar as Rate, as as Result, at as Row, au as Segmented, k as Select, av as Skeleton, aw as Slider, ax as Space, ay as Spin, az as Statistic, aA as Steps, aB as Switch, aC as Tabs, aD as Tag, aF as TimePicker, aG as Timeline, T as Tooltip, aH as Tour, aI as Transfer, aJ as Tree, aK as TreeSelect, aL as Typography, aM as Upload, aN as Watermark, aQ as en_US, b as notification, aE as theme, aP as version, z as zh_CN } from './vendor.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';
@@ -433,7 +433,10 @@ var zh_CN = {
433
433
  清空条件: "清空条件",
434
434
  noData: "暂无数据",
435
435
  "系统繁忙,稍后重试!": "系统繁忙,稍后重试!",
436
- Load: "正在加载..."
436
+ Load: "正在加载...",
437
+ 确定: "确定",
438
+ 此刻: "此刻",
439
+ 今天: "今天"
437
440
  };
438
441
  var zh_CN$1 = zh_CN;
439
442
 
@@ -442,7 +445,10 @@ var en_US = {
442
445
  清空条件: "Emptying condition",
443
446
  noData: "No Data",
444
447
  "系统繁忙,稍后重试!": "System busy, try again later!",
445
- Load: "Loading..."
448
+ Load: "Loading...",
449
+ 确定: "OK",
450
+ 此刻: "Now",
451
+ 今天: "Today"
446
452
  };
447
453
  var en_US$1 = en_US;
448
454
 
@@ -2355,16 +2361,16 @@ var BhdSelect$1 = BhdSelect;
2355
2361
  var modules_63b47c51$2 = {"bhd_app_layout":"index_module_bhd_app_layout__32fa6256","bhd_app_layout_header":"index_module_bhd_app_layout_header__32fa6256","bhd_app_layout_main":"index_module_bhd_app_layout_main__32fa6256","bhd_app_layout_main_filter":"index_module_bhd_app_layout_main_filter__32fa6256","bhd_app_layout_main_filter_title":"index_module_bhd_app_layout_main_filter_title__32fa6256","bhd_app_layout_main_filter_ul":"index_module_bhd_app_layout_main_filter_ul__32fa6256","bhd_app_layout_main_filter_show_value":"index_module_bhd_app_layout_main_filter_show_value__32fa6256","bhd_app_layout_main_filter_clear":"index_module_bhd_app_layout_main_filter_clear__32fa6256","bhd_app_layout_main_table":"index_module_bhd_app_layout_main_table__32fa6256","bhd_app_layout_footer":"index_module_bhd_app_layout_footer__32fa6256"};
2356
2362
 
2357
2363
  function BhdAppLayout(props) {
2358
- var _filterRef_current, _headRef_current, _otherHeadRef_current, _otherContentRef_current;
2364
+ var _filterRef_current, _filterRef, _headRef_current, _headRef, _otherHeadRef_current, _otherHeadRef, _otherContentRef_current, _otherContentRef, _filterConfig, _filterConfig1, _footerConfig;
2359
2365
  var className = props.className, headerClassName = props.headerClassName, tableBoxClassName = props.tableBoxClassName, headConfig = props.headConfig, filterConfig = props.filterConfig, headContent = props.headContent, otherContent = props.otherContent, tableConfig = props.tableConfig, footerConfig = props.footerConfig;
2360
2366
  var _useState = _sliced_to_array(useState(""), 2); _useState[0]; var setScrollY = _useState[1];
2361
2367
  var _useState1 = _sliced_to_array(useState(props.scrollConfig), 2), scrollConfig = _useState1[0], setScrollConfig = _useState1[1];
2362
2368
  var windowChange = function() {
2363
- var _headRef_current, _headRef_current1, _filterRef_current, _filterRef_current1, _otherHeadRef_current, _otherHeadRef_current1, _otherContentRef_current, _otherContentRef_current1;
2364
- var headRefHeight = isNaN(headRef === null || headRef === void 0 ? void 0 : (_headRef_current = headRef.current) === null || _headRef_current === void 0 ? void 0 : _headRef_current.offsetHeight) ? 0 : headRef === null || headRef === void 0 ? void 0 : (_headRef_current1 = headRef.current) === null || _headRef_current1 === void 0 ? void 0 : _headRef_current1.offsetHeight;
2365
- var filterRefHeight = isNaN(filterRef === null || filterRef === void 0 ? void 0 : (_filterRef_current = filterRef.current) === null || _filterRef_current === void 0 ? void 0 : _filterRef_current.offsetHeight) ? 0 : filterRef === null || filterRef === void 0 ? void 0 : (_filterRef_current1 = filterRef.current) === null || _filterRef_current1 === void 0 ? void 0 : _filterRef_current1.offsetHeight;
2366
- var otherHeadRefHeight = isNaN(otherHeadRef === null || otherHeadRef === void 0 ? void 0 : (_otherHeadRef_current = otherHeadRef.current) === null || _otherHeadRef_current === void 0 ? void 0 : _otherHeadRef_current.offsetHeight) ? 0 : otherHeadRef === null || otherHeadRef === void 0 ? void 0 : (_otherHeadRef_current1 = otherHeadRef.current) === null || _otherHeadRef_current1 === void 0 ? void 0 : _otherHeadRef_current1.offsetHeight;
2367
- var otherContentRefHeight = isNaN(otherContentRef === null || otherContentRef === void 0 ? void 0 : (_otherContentRef_current = otherContentRef.current) === null || _otherContentRef_current === void 0 ? void 0 : _otherContentRef_current.offsetHeight) ? 0 : otherContentRef === null || otherContentRef === void 0 ? void 0 : (_otherContentRef_current1 = otherContentRef.current) === null || _otherContentRef_current1 === void 0 ? void 0 : _otherContentRef_current1.offsetHeight;
2369
+ var _headRef_current, _headRef, _headRef_current1, _headRef1, _filterRef_current, _filterRef, _filterRef_current1, _filterRef1, _otherHeadRef_current, _otherHeadRef, _otherHeadRef_current1, _otherHeadRef1, _otherContentRef_current, _otherContentRef, _otherContentRef_current1, _otherContentRef1;
2370
+ var headRefHeight = isNaN((_headRef = headRef) === null || _headRef === void 0 ? void 0 : (_headRef_current = _headRef.current) === null || _headRef_current === void 0 ? void 0 : _headRef_current.offsetHeight) ? 0 : (_headRef1 = headRef) === null || _headRef1 === void 0 ? void 0 : (_headRef_current1 = _headRef1.current) === null || _headRef_current1 === void 0 ? void 0 : _headRef_current1.offsetHeight;
2371
+ var filterRefHeight = isNaN((_filterRef = filterRef) === null || _filterRef === void 0 ? void 0 : (_filterRef_current = _filterRef.current) === null || _filterRef_current === void 0 ? void 0 : _filterRef_current.offsetHeight) ? 0 : (_filterRef1 = filterRef) === null || _filterRef1 === void 0 ? void 0 : (_filterRef_current1 = _filterRef1.current) === null || _filterRef_current1 === void 0 ? void 0 : _filterRef_current1.offsetHeight;
2372
+ var otherHeadRefHeight = isNaN((_otherHeadRef = otherHeadRef) === null || _otherHeadRef === void 0 ? void 0 : (_otherHeadRef_current = _otherHeadRef.current) === null || _otherHeadRef_current === void 0 ? void 0 : _otherHeadRef_current.offsetHeight) ? 0 : (_otherHeadRef1 = otherHeadRef) === null || _otherHeadRef1 === void 0 ? void 0 : (_otherHeadRef_current1 = _otherHeadRef1.current) === null || _otherHeadRef_current1 === void 0 ? void 0 : _otherHeadRef_current1.offsetHeight;
2373
+ var otherContentRefHeight = isNaN((_otherContentRef = otherContentRef) === null || _otherContentRef === void 0 ? void 0 : (_otherContentRef_current = _otherContentRef.current) === null || _otherContentRef_current === void 0 ? void 0 : _otherContentRef_current.offsetHeight) ? 0 : (_otherContentRef1 = otherContentRef) === null || _otherContentRef1 === void 0 ? void 0 : (_otherContentRef_current1 = _otherContentRef1.current) === null || _otherContentRef_current1 === void 0 ? void 0 : _otherContentRef_current1.offsetHeight;
2368
2374
  var height = headRefHeight + filterRefHeight + otherHeadRefHeight + otherContentRefHeight + 56 + 16 + 60 + 50;
2369
2375
  var offsetHeight = "calc(100vh - ".concat(height, "px)");
2370
2376
  setScrollY(offsetHeight);
@@ -2382,10 +2388,10 @@ function BhdAppLayout(props) {
2382
2388
  useLayoutEffect(function() {
2383
2389
  windowChange();
2384
2390
  }, [
2385
- filterRef === null || filterRef === void 0 ? void 0 : (_filterRef_current = filterRef.current) === null || _filterRef_current === void 0 ? void 0 : _filterRef_current.offsetHeight,
2386
- headRef === null || headRef === void 0 ? void 0 : (_headRef_current = headRef.current) === null || _headRef_current === void 0 ? void 0 : _headRef_current.offsetHeight,
2387
- otherHeadRef === null || otherHeadRef === void 0 ? void 0 : (_otherHeadRef_current = otherHeadRef.current) === null || _otherHeadRef_current === void 0 ? void 0 : _otherHeadRef_current.offsetHeight,
2388
- otherContentRef === null || otherContentRef === void 0 ? void 0 : (_otherContentRef_current = otherContentRef.current) === null || _otherContentRef_current === void 0 ? void 0 : _otherContentRef_current.offsetHeight
2391
+ (_filterRef = filterRef) === null || _filterRef === void 0 ? void 0 : (_filterRef_current = _filterRef.current) === null || _filterRef_current === void 0 ? void 0 : _filterRef_current.offsetHeight,
2392
+ (_headRef = headRef) === null || _headRef === void 0 ? void 0 : (_headRef_current = _headRef.current) === null || _headRef_current === void 0 ? void 0 : _headRef_current.offsetHeight,
2393
+ (_otherHeadRef = otherHeadRef) === null || _otherHeadRef === void 0 ? void 0 : (_otherHeadRef_current = _otherHeadRef.current) === null || _otherHeadRef_current === void 0 ? void 0 : _otherHeadRef_current.offsetHeight,
2394
+ (_otherContentRef = otherContentRef) === null || _otherContentRef === void 0 ? void 0 : (_otherContentRef_current = _otherContentRef.current) === null || _otherContentRef_current === void 0 ? void 0 : _otherContentRef_current.offsetHeight
2389
2395
  ]);
2390
2396
  return /*#__PURE__*/ jsxs("div", {
2391
2397
  className: "".concat(modules_63b47c51$2.bhd_app_layout, " ").concat(modules_63b47c51$2.className, " ").concat(className || ""),
@@ -2402,7 +2408,7 @@ function BhdAppLayout(props) {
2402
2408
  /*#__PURE__*/ jsxs("main", {
2403
2409
  className: modules_63b47c51$2.bhd_app_layout_main,
2404
2410
  children: [
2405
- (filterConfig === null || filterConfig === void 0 ? void 0 : filterConfig.filterArr) && filterConfig.filterArr.length ? /*#__PURE__*/ jsxs("div", {
2411
+ ((_filterConfig = filterConfig) === null || _filterConfig === void 0 ? void 0 : _filterConfig.filterArr) && filterConfig.filterArr.length ? /*#__PURE__*/ jsxs("div", {
2406
2412
  ref: filterRef,
2407
2413
  className: modules_63b47c51$2.bhd_app_layout_main_filter,
2408
2414
  children: [
@@ -2441,7 +2447,7 @@ function BhdAppLayout(props) {
2441
2447
  })
2442
2448
  }),
2443
2449
  /*#__PURE__*/ jsx("div", {
2444
- onClick: filterConfig === null || filterConfig === void 0 ? void 0 : filterConfig.onClearAll,
2450
+ onClick: (_filterConfig1 = filterConfig) === null || _filterConfig1 === void 0 ? void 0 : _filterConfig1.onClearAll,
2445
2451
  className: modules_63b47c51$2.bhd_app_layout_main_filter_clear,
2446
2452
  children: i18Conversion$1("清空条件")
2447
2453
  })
@@ -2464,7 +2470,7 @@ function BhdAppLayout(props) {
2464
2470
  className: modules_63b47c51$2.bhd_app_layout_footer,
2465
2471
  children: [
2466
2472
  /*#__PURE__*/ jsx("div", {
2467
- children: (footerConfig === null || footerConfig === void 0 ? void 0 : footerConfig.leftDom) && footerConfig.leftDom
2473
+ children: ((_footerConfig = footerConfig) === null || _footerConfig === void 0 ? void 0 : _footerConfig.leftDom) && footerConfig.leftDom
2468
2474
  }),
2469
2475
  /*#__PURE__*/ jsx(Pagination, _object_spread({}, footerConfig))
2470
2476
  ]
@@ -4936,13 +4942,14 @@ function saveCanvasToImage(context, startX, startY, width, height) {
4936
4942
  // 获取裁剪框区域画布
4937
4943
  var imgContext = getCanvas2dCtx(canvas, width, height);
4938
4944
  if (imgContext) {
4945
+ var _plugInParameters;
4939
4946
  // 将图片放进裁剪框内
4940
4947
  imgContext.putImageData(img, 0, 0);
4941
4948
  var a = document.createElement("a");
4942
4949
  // 获取图片
4943
4950
  a.href = canvas.toDataURL("png");
4944
4951
  // 获取用户传入的文件名
4945
- var imgName = (plugInParameters === null || plugInParameters === void 0 ? void 0 : plugInParameters.getSaveImgTitle()) || new Date().getTime();
4952
+ var imgName = ((_plugInParameters = plugInParameters) === null || _plugInParameters === void 0 ? void 0 : _plugInParameters.getSaveImgTitle()) || new Date().getTime();
4946
4953
  // 下载图片
4947
4954
  a.download = "".concat(imgName, ".png");
4948
4955
  a.click();
@@ -4963,8 +4970,9 @@ function saveCanvasToBase64(context, startX, startY, width, height) {
4963
4970
  // 将图片放进canvas中
4964
4971
  imgContext.putImageData(img, 0, 0);
4965
4972
  if (writeBase64) {
4966
- // 将图片自动添加至剪贴板中
4967
- canvas === null || canvas === void 0 ? void 0 : canvas.toBlob(function(blob) {
4973
+ var // 将图片自动添加至剪贴板中
4974
+ _canvas;
4975
+ (_canvas = canvas) === null || _canvas === void 0 ? void 0 : _canvas.toBlob(function(blob) {
4968
4976
  var _navigator_clipboard;
4969
4977
  if (blob == null) return;
4970
4978
  var Clipboard = window.ClipboardItem;
@@ -5019,9 +5027,10 @@ function saveCanvasToBase64(context, startX, startY, width, height) {
5019
5027
  * @private
5020
5028
  */ function drawCutOutBox(mouseX, mouseY, width, height, context, borderSize, controller, imageController) {
5021
5029
  var drawBorders = arguments.length > 8 && arguments[8] !== void 0 ? arguments[8] : true;
5030
+ var _controller, _controller1, _controller2, _controller3;
5022
5031
  // 获取画布宽高
5023
- var canvasWidth = controller === null || controller === void 0 ? void 0 : controller.width;
5024
- var canvasHeight = controller === null || controller === void 0 ? void 0 : controller.height;
5032
+ var canvasWidth = (_controller = controller) === null || _controller === void 0 ? void 0 : _controller.width;
5033
+ var canvasHeight = (_controller1 = controller) === null || _controller1 === void 0 ? void 0 : _controller1.height;
5025
5034
  var dpr = window.devicePixelRatio || 1;
5026
5035
  var data = new PlugInParameters();
5027
5036
  // 画布、图片不存在则return
@@ -5066,8 +5075,8 @@ function saveCanvasToBase64(context, startX, startY, width, height) {
5066
5075
  context.globalCompositeOperation = "destination-over";
5067
5076
  // 图片尺寸使用canvas容器的css中的尺寸
5068
5077
  var _ref = {
5069
- imgWidth: parseInt(controller === null || controller === void 0 ? void 0 : controller.style.width),
5070
- imgHeight: parseInt(controller === null || controller === void 0 ? void 0 : controller.style.height)
5078
+ imgWidth: parseInt((_controller2 = controller) === null || _controller2 === void 0 ? void 0 : _controller2.style.width),
5079
+ imgHeight: parseInt((_controller3 = controller) === null || _controller3 === void 0 ? void 0 : _controller3.style.height)
5071
5080
  }, imgWidth = _ref.imgWidth, imgHeight = _ref.imgHeight;
5072
5081
  // 用户有传入截图dom绘制时使用其dom的尺寸
5073
5082
  var screenShotDom = data.getScreenShotDom();
@@ -5407,6 +5416,7 @@ function hiddenColorPanelStatus() {
5407
5416
  var CreateDom = /*#__PURE__*/ function() {
5408
5417
  function CreateDom(options) {
5409
5418
  _class_call_check(this, CreateDom);
5419
+ var _options, _options1, _options2;
5410
5420
  // 截图区域canvas容器
5411
5421
  _define_property(this, "screenShotController", void 0);
5412
5422
  // 截图工具栏容器
@@ -5448,8 +5458,8 @@ var CreateDom = /*#__PURE__*/ function() {
5448
5458
  this.optionController = document.createElement("div");
5449
5459
  // this.cutBoxSizeContainer = document.createElement("div");
5450
5460
  this.textInputController = document.createElement("div");
5451
- this.completeCallback = options === null || options === void 0 ? void 0 : options.completeCallback;
5452
- this.closeCallback = options === null || options === void 0 ? void 0 : options.closeCallback;
5461
+ this.completeCallback = (_options = options) === null || _options === void 0 ? void 0 : _options.completeCallback;
5462
+ this.closeCallback = (_options1 = options) === null || _options1 === void 0 ? void 0 : _options1.closeCallback;
5453
5463
  this.hiddenIcoArr = [];
5454
5464
  this.optionController.addEventListener("click", function(evt) {
5455
5465
  var target = evt.target;
@@ -5467,7 +5477,7 @@ var CreateDom = /*#__PURE__*/ function() {
5467
5477
  };
5468
5478
  }
5469
5479
  // 筛选需要隐藏的图标
5470
- if (options === null || options === void 0 ? void 0 : options.hiddenToolIco) {
5480
+ if ((_options2 = options) === null || _options2 === void 0 ? void 0 : _options2.hiddenToolIco) {
5471
5481
  for(var iconKey in options.hiddenToolIco){
5472
5482
  if (options.hiddenToolIco[iconKey]) {
5473
5483
  this.filterHideIcon(iconKey);
@@ -6441,61 +6451,62 @@ var KeyboardEventHandle = /*#__PURE__*/ function() {
6441
6451
 
6442
6452
  // 为插件的全局参数设置数据
6443
6453
  function setPlugInParameters(options) {
6454
+ var _options, _options1, _options2, _options3, _options4, _options5, _options6, _options7, _options8, _options9, _options10, _options11, _options12, _options13, _options14;
6444
6455
  var plugInParameters = new PlugInParameters();
6445
6456
  // webrtc启用状态, 默认为true,如果设置了false则修改默认值
6446
- if ((options === null || options === void 0 ? void 0 : options.enableWebRtc) === false) {
6457
+ if (((_options = options) === null || _options === void 0 ? void 0 : _options.enableWebRtc) === false) {
6447
6458
  plugInParameters.setWebRtcStatus(false);
6448
6459
  plugInParameters.setInitStatus(false);
6449
6460
  }
6450
6461
  // 读取并设置参数中的视频流数据
6451
- if ((options === null || options === void 0 ? void 0 : options.screenFlow) instanceof MediaStream) {
6462
+ if (((_options1 = options) === null || _options1 === void 0 ? void 0 : _options1.screenFlow) instanceof MediaStream) {
6452
6463
  plugInParameters.setScreenFlow(options.screenFlow);
6453
6464
  }
6454
6465
  // 读取参数中的画布宽高, 两者都存在时才设置
6455
- if ((options === null || options === void 0 ? void 0 : options.canvasWidth) && (options === null || options === void 0 ? void 0 : options.canvasHeight)) {
6466
+ if (((_options2 = options) === null || _options2 === void 0 ? void 0 : _options2.canvasWidth) && ((_options3 = options) === null || _options3 === void 0 ? void 0 : _options3.canvasHeight)) {
6456
6467
  plugInParameters.setCanvasSize(options.canvasWidth, options.canvasHeight);
6457
6468
  }
6458
6469
  // 读取参数设置默认展示截屏数据的状态,默认为false,如果设置了true才修改
6459
- if ((options === null || options === void 0 ? void 0 : options.showScreenData) === true) {
6470
+ if (((_options4 = options) === null || _options4 === void 0 ? void 0 : _options4.showScreenData) === true) {
6460
6471
  plugInParameters.setShowScreenDataStatus(true);
6461
6472
  }
6462
- if ((options === null || options === void 0 ? void 0 : options.maskColor) && typeof options.maskColor === "object") {
6473
+ if (((_options5 = options) === null || _options5 === void 0 ? void 0 : _options5.maskColor) && typeof options.maskColor === "object") {
6463
6474
  plugInParameters.setMaskColor(options.maskColor);
6464
6475
  }
6465
6476
  // 调用者关闭了剪切板写入,则修改全局变量(默认为true)
6466
- if ((options === null || options === void 0 ? void 0 : options.writeBase64) === false) {
6477
+ if (((_options6 = options) === null || _options6 === void 0 ? void 0 : _options6.writeBase64) === false) {
6467
6478
  plugInParameters.setWriteImgState(options.writeBase64);
6468
6479
  }
6469
6480
  // 调用者传入了截图dom
6470
- if (options === null || options === void 0 ? void 0 : options.screenShotDom) {
6481
+ if ((_options7 = options) === null || _options7 === void 0 ? void 0 : _options7.screenShotDom) {
6471
6482
  plugInParameters.setScreenShotDom(options.screenShotDom);
6472
6483
  }
6473
6484
  // 调用者传入了裁剪区域边框像素点颜色信息
6474
- if (options === null || options === void 0 ? void 0 : options.cutBoxBdColor) {
6485
+ if ((_options8 = options) === null || _options8 === void 0 ? void 0 : _options8.cutBoxBdColor) {
6475
6486
  plugInParameters.setCutBoxBdColor(options.cutBoxBdColor);
6476
6487
  }
6477
6488
  // 调用者传入了保存截图回调
6478
- if (options === null || options === void 0 ? void 0 : options.saveCallback) {
6489
+ if ((_options9 = options) === null || _options9 === void 0 ? void 0 : _options9.saveCallback) {
6479
6490
  plugInParameters.setSaveCallback(options.saveCallback);
6480
6491
  }
6481
6492
  // 设置最大撤销次数
6482
- if (options === null || options === void 0 ? void 0 : options.maxUndoNum) {
6493
+ if ((_options10 = options) === null || _options10 === void 0 ? void 0 : _options10.maxUndoNum) {
6483
6494
  plugInParameters.setMaxUndoNum(options.maxUndoNum);
6484
6495
  }
6485
6496
  // 箭头绘制工具是否使用等比例绘制方式
6486
- if (options === null || options === void 0 ? void 0 : options.useRatioArrow) {
6497
+ if ((_options11 = options) === null || _options11 === void 0 ? void 0 : _options11.useRatioArrow) {
6487
6498
  plugInParameters.setRatioArrow(options.useRatioArrow);
6488
6499
  }
6489
6500
  // 设置图片自适应开启状态
6490
- if (options === null || options === void 0 ? void 0 : options.imgAutoFit) {
6501
+ if ((_options12 = options) === null || _options12 === void 0 ? void 0 : _options12.imgAutoFit) {
6491
6502
  plugInParameters.setImgAutoFit(options.imgAutoFit);
6492
6503
  }
6493
6504
  // 设置图片保存时的文件名称
6494
- if (options === null || options === void 0 ? void 0 : options.saveImgTitle) {
6505
+ if ((_options13 = options) === null || _options13 === void 0 ? void 0 : _options13.saveImgTitle) {
6495
6506
  plugInParameters.setSaveImgTitle(options.saveImgTitle);
6496
6507
  }
6497
6508
  // 确认截图时,是否需要销毁dom
6498
- if ((options === null || options === void 0 ? void 0 : options.destroyContainer) === false) {
6509
+ if (((_options14 = options) === null || _options14 === void 0 ? void 0 : _options14.destroyContainer) === false) {
6499
6510
  plugInParameters.setDestroyContainerState(options.destroyContainer);
6500
6511
  }
6501
6512
  }
@@ -6512,6 +6523,7 @@ function drawCrossImg(html) {
6512
6523
  img.crossOrigin = "anonymous";
6513
6524
  img.src = "".concat(href, "&time=").concat(+new Date().getTime());
6514
6525
  img.onload = function() {
6526
+ var _canvas;
6515
6527
  var width = element.width;
6516
6528
  var height = element.height;
6517
6529
  var canvas = document.createElement("canvas");
@@ -6519,7 +6531,7 @@ function drawCrossImg(html) {
6519
6531
  canvas.height = height;
6520
6532
  var ctx = canvas.getContext("2d");
6521
6533
  ctx.drawImage(img, 0, 0, width, height);
6522
- var base64 = canvas === null || canvas === void 0 ? void 0 : canvas.toDataURL();
6534
+ var base64 = (_canvas = canvas) === null || _canvas === void 0 ? void 0 : _canvas.toDataURL();
6523
6535
  element.setAttribute("src", base64);
6524
6536
  resolve("转换成功");
6525
6537
  };
@@ -6633,6 +6645,7 @@ var ScreenShot = /*#__PURE__*/ function() {
6633
6645
  function ScreenShot(options) {
6634
6646
  var _this = this;
6635
6647
  _class_call_check(this, ScreenShot);
6648
+ var _options, _options1, _options2, _options3;
6636
6649
  // 当前实例的响应式data数据
6637
6650
  _define_property(this, "data", void 0);
6638
6651
  // video容器用于存放屏幕MediaStream流
@@ -7106,14 +7119,14 @@ var ScreenShot = /*#__PURE__*/ function() {
7106
7119
  // 获取截图区域canvas容器(获取的同时也会为InitData中的全局变量赋值)
7107
7120
  this.setGlobalParameter();
7108
7121
  // 修改截图容器可滚动状态
7109
- this.data.setNoScrollStatus(options === null || options === void 0 ? void 0 : options.noScroll);
7122
+ this.data.setNoScrollStatus((_options = options) === null || _options === void 0 ? void 0 : _options.noScroll);
7110
7123
  // 加载截图组件
7111
- this.load(options === null || options === void 0 ? void 0 : options.triggerCallback, options === null || options === void 0 ? void 0 : options.cancelCallback);
7124
+ this.load((_options1 = options) === null || _options1 === void 0 ? void 0 : _options1.triggerCallback, (_options2 = options) === null || _options2 === void 0 ? void 0 : _options2.cancelCallback);
7112
7125
  if (this.toolController == null || this.screenShotContainer == null || this.textInputController == null) {
7113
7126
  return;
7114
7127
  }
7115
7128
  // 截图组件加载完毕后,对层级进行调整
7116
- this.adjustContainerLevels((options === null || options === void 0 ? void 0 : options.level) ? options.level : 0);
7129
+ this.adjustContainerLevels(((_options3 = options) === null || _options3 === void 0 ? void 0 : _options3.level) ? options.level : 0);
7117
7130
  // 创建键盘事件监听
7118
7131
  this.keyboardEventHandle = new KeyboardEventHandle(this.screenShotContainer, this.toolController);
7119
7132
  // 给输入容器设置快捷键监听
@@ -7269,6 +7282,16 @@ var ScreenShot = /*#__PURE__*/ function() {
7269
7282
  // 将body内容绘制到图片容器里
7270
7283
  imgContext.putImageData(bodyImgData, 0, 0);
7271
7284
  } else {
7285
+ var // console.log("对视频容器的内容进行裁剪", {
7286
+ // wrcImgPosition: this.wrcImgPosition,
7287
+ // containerWidth,
7288
+ // containerHeight,
7289
+ // videoWidth,
7290
+ // videoHeight,
7291
+ // fixWidth,
7292
+ // fixHeight
7293
+ // });
7294
+ _imgContext;
7272
7295
  // 对webrtc源提供的图像宽高进行修复
7273
7296
  var fixWidth = containerWidth;
7274
7297
  var fixHeight = videoHeight * containerWidth / videoWidth;
@@ -7279,16 +7302,7 @@ var ScreenShot = /*#__PURE__*/ function() {
7279
7302
  // 对视频容器的内容进行裁剪
7280
7303
  fixWidth = _this.wrcImgPosition.w > 0 ? _this.wrcImgPosition.w : fixWidth;
7281
7304
  fixHeight = _this.wrcImgPosition.h > 0 ? _this.wrcImgPosition.h : fixHeight;
7282
- // console.log("对视频容器的内容进行裁剪", {
7283
- // wrcImgPosition: this.wrcImgPosition,
7284
- // containerWidth,
7285
- // containerHeight,
7286
- // videoWidth,
7287
- // videoHeight,
7288
- // fixWidth,
7289
- // fixHeight
7290
- // });
7291
- imgContext === null || imgContext === void 0 ? void 0 : imgContext.drawImage(_this.videoController, _this.wrcImgPosition.x, _this.wrcImgPosition.y, fixWidth, fixHeight);
7305
+ (_imgContext = imgContext) === null || _imgContext === void 0 ? void 0 : _imgContext.drawImage(_this.videoController, _this.wrcImgPosition.x, _this.wrcImgPosition.y, fixWidth, fixHeight);
7292
7306
  // // 要保存的字符串
7293
7307
  // const stringData = imgContext.canvas.toDataURL("png");
7294
7308
  // // dada 表示要转换的字符串数据,type 表示要转换的数据格式
@@ -7513,27 +7527,28 @@ var ScreenShot = /*#__PURE__*/ function() {
7513
7527
  {
7514
7528
  key: "setOptionalParameter",
7515
7529
  value: function setOptionalParameter(options) {
7530
+ var _options, _options1, _options2, _options3, _options4, _options5, _options6, _options7, _options8, _options9, _options10, _options11, _options12, _options13, _options14;
7516
7531
  // 单击截取全屏启用状态,默认为false
7517
- if ((options === null || options === void 0 ? void 0 : options.clickCutFullScreen) === true) {
7532
+ if (((_options = options) === null || _options === void 0 ? void 0 : _options.clickCutFullScreen) === true) {
7518
7533
  this.clickCutFullScreen = true;
7519
7534
  }
7520
7535
  // 判断调用者是否传了截图进来
7521
- if ((options === null || options === void 0 ? void 0 : options.imgSrc) != null) {
7536
+ if (((_options1 = options) === null || _options1 === void 0 ? void 0 : _options1.imgSrc) != null) {
7522
7537
  this.imgSrc = options.imgSrc;
7523
7538
  }
7524
7539
  // 是否加载跨域图片
7525
- if ((options === null || options === void 0 ? void 0 : options.loadCrossImg) === true) {
7540
+ if (((_options2 = options) === null || _options2 === void 0 ? void 0 : _options2.loadCrossImg) === true) {
7526
7541
  this.loadCrossImg = true;
7527
7542
  }
7528
7543
  // 跨域时的代理服务器地址
7529
- if (options === null || options === void 0 ? void 0 : options.proxyUrl) {
7544
+ if ((_options3 = options) === null || _options3 === void 0 ? void 0 : _options3.proxyUrl) {
7530
7545
  this.proxyUrl = options.proxyUrl;
7531
7546
  }
7532
- if (options === null || options === void 0 ? void 0 : options.useCORS) {
7547
+ if ((_options4 = options) === null || _options4 === void 0 ? void 0 : _options4.useCORS) {
7533
7548
  this.useCORS = options.useCORS;
7534
7549
  }
7535
7550
  // 设置截图容器的位置信息
7536
- if ((options === null || options === void 0 ? void 0 : options.position) != null) {
7551
+ if (((_options5 = options) === null || _options5 === void 0 ? void 0 : _options5.position) != null) {
7537
7552
  var _options_position, _options_position1;
7538
7553
  if (((_options_position = options.position) === null || _options_position === void 0 ? void 0 : _options_position.top) != null) {
7539
7554
  this.position.top = options.position.top;
@@ -7543,30 +7558,30 @@ var ScreenShot = /*#__PURE__*/ function() {
7543
7558
  }
7544
7559
  }
7545
7560
  // 截图容器dom
7546
- if (options === null || options === void 0 ? void 0 : options.screenShotDom) {
7561
+ if ((_options6 = options) === null || _options6 === void 0 ? void 0 : _options6.screenShotDom) {
7547
7562
  this.screenShotDom = options.screenShotDom;
7548
7563
  }
7549
7564
  // webrtc截图等待时间
7550
- if (options === null || options === void 0 ? void 0 : options.wrcReplyTime) {
7565
+ if ((_options7 = options) === null || _options7 === void 0 ? void 0 : _options7.wrcReplyTime) {
7551
7566
  this.wrcReplyTime = options.wrcReplyTime;
7552
7567
  }
7553
7568
  // 是否初始化裁剪框
7554
- if (options === null || options === void 0 ? void 0 : options.cropBoxInfo) {
7569
+ if ((_options8 = options) === null || _options8 === void 0 ? void 0 : _options8.cropBoxInfo) {
7555
7570
  this.cropBoxInfo = options.cropBoxInfo;
7556
7571
  }
7557
7572
  // 是否需要更改工具栏的展示位置
7558
- if (options === null || options === void 0 ? void 0 : options.toolPosition) {
7573
+ if ((_options9 = options) === null || _options9 === void 0 ? void 0 : _options9.toolPosition) {
7559
7574
  this.placement = options.toolPosition;
7560
7575
  }
7561
7576
  // 是否需要对webrtc模式下捕获到的内容进行裁剪
7562
- if (options === null || options === void 0 ? void 0 : options.wrcImgPosition) {
7577
+ if ((_options10 = options) === null || _options10 === void 0 ? void 0 : _options10.wrcImgPosition) {
7563
7578
  var _options_wrcImgPosition = options.wrcImgPosition, x = _options_wrcImgPosition.x, y = _options_wrcImgPosition.y;
7564
7579
  // 坐标需要取负数才能正确的裁剪
7565
7580
  this.wrcImgPosition.x = Math.abs(x) * -1;
7566
7581
  this.wrcImgPosition.y = Math.abs(y) * -1;
7567
7582
  }
7568
7583
  // 是否隐藏滚动条
7569
- if ((options === null || options === void 0 ? void 0 : options.hiddenScrollBar) != null) {
7584
+ if (((_options11 = options) === null || _options11 === void 0 ? void 0 : _options11.hiddenScrollBar) != null) {
7570
7585
  var _options_hiddenScrollBar = options.hiddenScrollBar, state = _options_hiddenScrollBar.state, color = _options_hiddenScrollBar.color, fillWidth = _options_hiddenScrollBar.fillWidth, fillHeight = _options_hiddenScrollBar.fillHeight, fillState = _options_hiddenScrollBar.fillState;
7571
7586
  this.hiddenScrollBar = {
7572
7587
  state: state,
@@ -7583,13 +7598,13 @@ var ScreenShot = /*#__PURE__*/ function() {
7583
7598
  }
7584
7599
  }
7585
7600
  // 是否启用窗口截图模式
7586
- if ((options === null || options === void 0 ? void 0 : options.wrcWindowMode) != null) {
7601
+ if (((_options12 = options) === null || _options12 === void 0 ? void 0 : _options12.wrcWindowMode) != null) {
7587
7602
  this.wrcWindowMode = options.wrcWindowMode;
7588
7603
  }
7589
- if ((options === null || options === void 0 ? void 0 : options.curTabState) != null) {
7604
+ if (((_options13 = options) === null || _options13 === void 0 ? void 0 : _options13.curTabState) != null) {
7590
7605
  this.curTabState = options.curTabState;
7591
7606
  }
7592
- if ((options === null || options === void 0 ? void 0 : options.customRightClickEvent) != null) {
7607
+ if (((_options14 = options) === null || _options14 === void 0 ? void 0 : _options14.customRightClickEvent) != null) {
7593
7608
  this.customRightClickEvent = options.customRightClickEvent;
7594
7609
  }
7595
7610
  }
@@ -11450,27 +11465,48 @@ window.appendDom = function(root, props) {
11450
11465
  };
11451
11466
  var CustomerService$1 = CustomerService;
11452
11467
 
11453
- var modules_63b47c51 = {"bhdDatePicker":"index_module_bhdDatePicker__b97a7e26","bhdDatePickerPopup":"index_module_bhdDatePickerPopup__b97a7e26","singlePicker":"index_module_singlePicker__b97a7e26","rangePicker":"index_module_rangePicker__b97a7e26","extraPicker":"index_module_extraPicker__b97a7e26","readonly":"index_module_readonly__b97a7e26"};
11468
+ var modules_63b47c51 = {"bhdDatePicker":"index_module_bhdDatePicker__3c4442cb","bhdDatePickerPopup":"index_module_bhdDatePickerPopup__3c4442cb","singlePicker":"index_module_singlePicker__3c4442cb","rangePicker":"index_module_rangePicker__3c4442cb","extraPicker":"index_module_extraPicker__3c4442cb","showTime":"index_module_showTime__3c4442cb","showExtraFooter":"index_module_showExtraFooter__3c4442cb","readonly":"index_module_readonly__3c4442cb"};
11454
11469
 
11455
11470
  var RangePicker = DatePicker.RangePicker;
11456
- var months = [
11457
- "一",
11458
- "二",
11459
- "三",
11460
- "四",
11461
- "五",
11462
- "六",
11463
- "七",
11464
- "八",
11465
- "九",
11466
- "十",
11467
- "十一",
11468
- "十二"
11469
- ];
11470
11471
  var BhdDatePicker = function(props) {
11471
- var _props_kind = props.kind, kind = _props_kind === void 0 ? "single" : _props_kind, _props_value = props.value, value = _props_value === void 0 ? props.kind === "range" ? [] : "" : _props_value, extraItems = props.extraItems, _props_extraReadonly = props.extraReadonly, extraReadonly = _props_extraReadonly === void 0 ? false : _props_extraReadonly, picker = props.picker, _props_useType = props.useType, useType = _props_useType === void 0 ? "" : _props_useType, className = props.className, popupClassName = props.popupClassName, showTime = props.showTime, _props_showNow = props.showNow, showNow = _props_showNow === void 0 ? true : _props_showNow, onClick = props.onClick, onBlur = props.onBlur, onChange = props.onChange, onOk = props.onOk, _props_presets = props.presets, presets = _props_presets === void 0 ? [] : _props_presets;
11472
+ var lang = ConfigProvider.lang === "en" ? "en_US" : "zh_CN";
11473
+ // if (lang === "en_US") {
11474
+ // const enUS = require("dayjs/locale/en");
11475
+ // dayjs.locale(enUS);
11476
+ // } else {
11477
+ // const zhCN = require("dayjs/locale/zh-cn");
11478
+ // dayjs.locale(zhCN);
11479
+ // }
11480
+ // 默认格式
11481
+ var getDefaultFormat = function() {
11482
+ if (props.format) {
11483
+ return props.format;
11484
+ } else {
11485
+ var fm = props.showTime ? "YYYY-MM-DD hh:mm:ss" : "YYYY-MM-DD";
11486
+ switch(props.picker){
11487
+ case undefined:
11488
+ case "date":
11489
+ break;
11490
+ case "week":
11491
+ fm = "YYYY-wo";
11492
+ break;
11493
+ case "month":
11494
+ fm = "YYYY-MM";
11495
+ break;
11496
+ case "quarter":
11497
+ fm = "YYYY-QQ";
11498
+ break;
11499
+ case "year":
11500
+ fm = "YYYY";
11501
+ break;
11502
+ }
11503
+ return fm;
11504
+ }
11505
+ };
11506
+ // 自己组件内使用的,或者自己处理的
11507
+ var _props_kind = props.kind, kind = _props_kind === void 0 ? "single" : _props_kind, extraItems = props.extraItems, _props_extraReadonly = props.extraReadonly, extraReadonly = _props_extraReadonly === void 0 ? false : _props_extraReadonly, _props_useType = props.useType, useType = _props_useType === void 0 ? "" : _props_useType, _props_open = props.open, open = _props_open === void 0 ? false : _props_open, mode = props.mode, picker = props.picker, _props_value = props.value, value = _props_value === void 0 ? props.kind === "range" ? [] : "" : _props_value, _props_format = props.format, format = _props_format === void 0 ? getDefaultFormat() : _props_format, _props_presets = props.presets, presets = _props_presets === void 0 ? [] : _props_presets, className = props.className, popupClassName = props.popupClassName, showTime = props.showTime, _props_showNow = props.showNow, showNow = _props_showNow === void 0 ? true : _props_showNow, _props_allowClear = props.allowClear, allowClear = _props_allowClear === void 0 ? true : _props_allowClear, onClick = props.onClick, onBlur = props.onBlur, onChange = props.onChange, onOk = props.onOk, onCalendarChange = props.onCalendarChange, onOpenChange = props.onOpenChange, onPanelChange = props.onPanelChange, disabledDate = props.disabledDate, cellRender = props.cellRender, renderExtraFooter = props.renderExtraFooter;
11472
11508
  var bhdDatePickerRef = useRef(null);
11473
- var _useState = _sliced_to_array(useState(false), 2), open = _useState[0], setOpen = _useState[1];
11509
+ var _useState = _sliced_to_array(useState(open), 2), panelOpen = _useState[0], setPanelOpen = _useState[1];
11474
11510
  var _useState1 = _sliced_to_array(useState("date"), 2), panelMode = _useState1[0], setPanelMode = _useState1[1];
11475
11511
  var _useState2 = _sliced_to_array(useState([
11476
11512
  "date",
@@ -11483,79 +11519,109 @@ var BhdDatePicker = function(props) {
11483
11519
  var _useState5 = _sliced_to_array(useState(value), 2), selectedRangeDate = _useState5[0], setSelectedRangeDate = _useState5[1];
11484
11520
  var _useState6 = _sliced_to_array(useState([]), 2), selectedRangeDateString = _useState6[0], setSelectedRangeDateString = _useState6[1];
11485
11521
  var _useState7 = _sliced_to_array(useState(false), 2), rangeOpenChange = _useState7[0], setRangeOpenChange = _useState7[1]; // 用于范围选择失去焦点后,判断是否关闭
11486
- var timer = useRef(null);
11487
11522
  useEffect(function() {
11488
11523
  setDefaultMode();
11489
- }, []);
11490
- useEffect(function() {
11491
- if (panelMode === "year") {
11492
- timer.current = setTimeout(function() {
11493
- var doms = document.getElementsByClassName("bhd-picker-decade-btn");
11494
- for(var index = 0; index < doms.length; index++){
11495
- var _doms_index, _doms_index_childNodes;
11496
- var dom = (_doms_index = doms[index]) === null || _doms_index === void 0 ? void 0 : (_doms_index_childNodes = _doms_index.childNodes) === null || _doms_index_childNodes === void 0 ? void 0 : _doms_index_childNodes[1];
11497
- if (dom) {
11498
- if (dom.textContent !== " ㅡ ") {
11499
- dom.textContent = " ㅡ ";
11500
- }
11501
- }
11502
- }
11503
- }, 0);
11524
+ if (kind === "range") {
11525
+ if (selectedRangeDate[0] && selectedRangeDate[1]) {
11526
+ setSelectedRangeDateString([
11527
+ selectedRangeDate[0].format(format),
11528
+ selectedRangeDate[1].format(format)
11529
+ ]);
11530
+ }
11531
+ } else {
11532
+ if (selectedDate) {
11533
+ setSelectedDateString(function(prevState) {
11534
+ selectedDateStringRef.current = selectedDate.format(format);
11535
+ return selectedDateStringRef.current;
11536
+ });
11537
+ }
11504
11538
  }
11505
- return function() {
11506
- clearTimeout(timer.current);
11507
- };
11508
- }, [
11509
- open,
11510
- panelMode
11511
- ]);
11539
+ }, []);
11540
+ // 传给 DatePicker 的props参数
11512
11541
  var getConfig = function() {
11513
- var config = _object_spread({}, props);
11514
- delete config.cellRender;
11515
- delete config.className;
11516
- delete config.prevIcon;
11517
- delete config.nextIcon;
11518
- delete config.superPrevIcon;
11519
- delete config.superNextIcon;
11542
+ var config = _object_spread_props(_object_spread({
11543
+ prevIcon: /*#__PURE__*/ jsx(CustomArrow$1, {
11544
+ style: {
11545
+ transform: "rotate(90deg)"
11546
+ }
11547
+ }),
11548
+ nextIcon: /*#__PURE__*/ jsx(CustomArrow$1, {
11549
+ style: {
11550
+ transform: "rotate(-90deg)"
11551
+ }
11552
+ }),
11553
+ superPrevIcon: /*#__PURE__*/ jsx(CustomArrow$1, {
11554
+ style: {
11555
+ transform: "rotate(90deg)"
11556
+ }
11557
+ }),
11558
+ superNextIcon: /*#__PURE__*/ jsx(CustomArrow$1, {
11559
+ style: {
11560
+ transform: "rotate(-90deg)"
11561
+ }
11562
+ })
11563
+ }, props), {
11564
+ //--------------- 下边是需要处理的
11565
+ className: "".concat(className, " ").concat(useType === "table" ? "table-date-picker" : ""),
11566
+ popupClassName: popupClassName,
11567
+ allowClear: allowClear,
11568
+ showTime: showTime,
11569
+ cellRender: cellRender,
11570
+ renderExtraFooter: selfRenderExtraFooter
11571
+ });
11572
+ //组件支持传入,防止再次传入DatePicker,所以删掉
11573
+ delete config.mode;
11520
11574
  delete config.open;
11521
11575
  delete config.onOpenChange;
11522
- delete config.renderExtraFooter;
11523
- delete config.useType;
11524
- delete config.showNow;
11525
11576
  delete config.onClick;
11526
11577
  delete config.onBlur;
11527
11578
  delete config.onOk;
11528
11579
  delete config.onChange;
11529
- delete config.presets;
11530
- delete config.mode;
11531
- if (kind === "single" || kind === "extra") {
11532
- delete config.value;
11580
+ delete config.useType; // 组件自己定义的
11581
+ delete config.presets; // 必须删掉,因为预设由官网的左侧换到底部
11582
+ delete config.showNow; // 必须删掉,因为官网的今天按钮有bug,不受showNow的值控制
11583
+ if (!config.cellRender) {
11584
+ config.cellRender = selfCellRender;
11533
11585
  }
11534
- if (kind === "extra" && picker !== "date") {
11535
- delete config.extraItems;
11586
+ // 单选
11587
+ if (kind === "single") {
11588
+ config.popupClassName = "\n ".concat(modules_63b47c51.bhdDatePickerPopup, " ").concat(modules_63b47c51.singlePicker, " ").concat(popupClassName || "", " ").concat(showTime ? modules_63b47c51.showTime : "", " ").concat(renderExtraFooter ? modules_63b47c51.showExtraFooter : "");
11536
11589
  }
11590
+ // 范围选择
11591
+ if (kind === "range") {
11592
+ config.popupClassName = "".concat(modules_63b47c51.bhdDatePickerPopup, " ").concat(modules_63b47c51.rangePicker, " ").concat(popupClassName || "", " ").concat(showTime ? modules_63b47c51.showTime : "", " ").concat(renderExtraFooter ? modules_63b47c51.showExtraFooter : "");
11593
+ }
11594
+ // 日常安排
11537
11595
  if (kind === "extra") {
11538
- delete config.disabledDate;
11596
+ delete config.showTime; // 日程安排的时候,不允许展示时间面板
11597
+ showTime = false; // 日程安排不选择时间
11598
+ config.popupClassName = "".concat(modules_63b47c51.bhdDatePickerPopup, " ").concat(modules_63b47c51.extraPicker, " ").concat(extraReadonly ? modules_63b47c51.readonly : "", " ").concat(popupClassName || "", " ").concat(showTime ? modules_63b47c51.showTime : "", " ").concat(renderExtraFooter ? modules_63b47c51.showExtraFooter : "");
11599
+ if (extraReadonly) {
11600
+ config.allowClear = false; // 日程安排查看时,不显示清除按钮
11601
+ }
11539
11602
  }
11540
11603
  return config;
11541
11604
  };
11542
11605
  // 设置默认mode
11543
11606
  var setDefaultMode = function() {
11607
+ if (kind === "single" || kind === "extra") {
11608
+ setPanelMode(mode || picker || "date");
11609
+ }
11544
11610
  if (kind === "range") {
11611
+ var _mode, _mode1;
11545
11612
  setRangePanelMode([
11546
- picker || "date",
11547
- picker || "date"
11613
+ ((_mode = mode) === null || _mode === void 0 ? void 0 : _mode[0]) || picker || "date",
11614
+ ((_mode1 = mode) === null || _mode1 === void 0 ? void 0 : _mode1[1]) || picker || "date"
11548
11615
  ]);
11549
- } else {
11550
- setPanelMode(picker || "date");
11551
11616
  }
11552
11617
  };
11553
11618
  //单元格渲染
11554
- var cellRender = function(current, info) {
11619
+ var selfCellRender = function(current, info) {
11555
11620
  if (info.type === "date") {
11556
11621
  var extraItem = null;
11557
11622
  if (kind === "extra") {
11558
- extraItem = extraItems === null || extraItems === void 0 ? void 0 : extraItems.find(function(item) {
11623
+ var _extraItems;
11624
+ extraItem = (_extraItems = extraItems) === null || _extraItems === void 0 ? void 0 : _extraItems.find(function(item) {
11559
11625
  return item.date.format("YYYYMMDD") === current.format("YYYYMMDD");
11560
11626
  });
11561
11627
  }
@@ -11572,71 +11638,101 @@ var BhdDatePicker = function(props) {
11572
11638
  })
11573
11639
  });
11574
11640
  }
11641
+ // 月份 中文模式下显示全名称(例:一月),英文模式下显示短名称(例:Jan)
11575
11642
  if (info.type === "month") {
11576
11643
  return /*#__PURE__*/ jsx("div", {
11577
11644
  className: "bhd-picker-cell-inner",
11578
- children: months[Number(current.format("M")) - 1] + ""
11645
+ children: current.format(lang === "zh_CN" ? "MMMM" : "MMM")
11579
11646
  });
11580
11647
  }
11581
11648
  return info.originNode;
11582
11649
  };
11583
11650
  //日期禁用
11584
- var disabledDate = function(current) {
11585
- // if (extraReadonly) {
11586
- // return true;
11587
- // }
11651
+ var selfDisabledDate = function(current) {
11652
+ // 或者是传过来的
11653
+ if (disabledDate) {
11654
+ return disabledDate(current);
11655
+ }
11588
11656
  // 不能选择的是没有日程安排的
11589
11657
  var extraItem = null;
11590
11658
  if (kind === "extra") {
11591
- extraItem = extraItems === null || extraItems === void 0 ? void 0 : extraItems.find(function(item) {
11659
+ var _extraItems;
11660
+ extraItem = (_extraItems = extraItems) === null || _extraItems === void 0 ? void 0 : _extraItems.find(function(item) {
11592
11661
  return item.date.format("YYYYMMDD") === current.format("YYYYMMDD");
11593
11662
  });
11594
11663
  if (extraReadonly && extraItem) {
11595
11664
  return false;
11596
11665
  }
11666
+ return !extraItem || current && extraItem.status === "noselectable";
11597
11667
  }
11598
- return !extraItem || current && extraItem.status === "noselectable";
11668
+ return false;
11599
11669
  };
11600
- // 渲染底部扩展内容
11601
- var renderExtraFooter = function(mode) {
11602
- return !showTime ? /*#__PURE__*/ jsxs("ul", {
11603
- className: "bhd-picker-ranges",
11670
+ // 渲染底部扩展内容(包括确定按钮、今天按钮、预设、传入的底部扩展)
11671
+ var selfRenderExtraFooter = function(mode) {
11672
+ var _selectedRangeDate, _selectedRangeDate1;
11673
+ return /*#__PURE__*/ jsxs(Fragment, {
11604
11674
  children: [
11605
- renderPresets(),
11606
- showNow && (kind === "single" || kind === "extra" && extraItems.filter(function(item) {
11607
- return item.status !== "noselectable" && item.date.format("YYYY-MM-DD") === dayjs().format("YYYY-MM-DD");
11608
- }).length > 0) && mode === "date" && /*#__PURE__*/ jsx("li", {
11609
- className: "bhd-picker-now",
11610
- children: /*#__PURE__*/ jsx("a", {
11611
- className: "bhd-picker-now-btn",
11612
- onClick: todayClick,
11613
- children: showTime ? "此刻" : "今天"
11614
- })
11675
+ renderExtraFooter && /*#__PURE__*/ jsx("div", {
11676
+ className: "bhddatepicker-picker-footer-extra-extend",
11677
+ children: renderExtraFooter()
11615
11678
  }),
11616
- /*#__PURE__*/ jsx("li", {
11617
- className: "bhd-picker-ok",
11618
- children: /*#__PURE__*/ jsx(Button, {
11619
- type: "primary",
11620
- disabled: kind === "range" ? !((selectedRangeDate === null || selectedRangeDate === void 0 ? void 0 : selectedRangeDate[0]) && (selectedRangeDate === null || selectedRangeDate === void 0 ? void 0 : selectedRangeDate[1])) : !(selectedDate && selectedDateString),
11621
- onClick: okClick,
11622
- children: "确定"
11679
+ !showTime ? /*#__PURE__*/ jsx(Fragment, {
11680
+ children: /*#__PURE__*/ jsxs("ul", {
11681
+ className: "bhd-picker-ranges",
11682
+ children: [
11683
+ selfRenderPresets(),
11684
+ renderNow(),
11685
+ /*#__PURE__*/ jsx("li", {
11686
+ className: "bhd-picker-ok",
11687
+ children: /*#__PURE__*/ jsx(Button, {
11688
+ type: "primary",
11689
+ disabled: kind === "range" ? !(((_selectedRangeDate = selectedRangeDate) === null || _selectedRangeDate === void 0 ? void 0 : _selectedRangeDate[0]) && ((_selectedRangeDate1 = selectedRangeDate) === null || _selectedRangeDate1 === void 0 ? void 0 : _selectedRangeDate1[1])) : !(selectedDate && selectedDateString),
11690
+ onClick: okClick,
11691
+ children: i18Conversion$1("确定")
11692
+ })
11693
+ })
11694
+ ]
11623
11695
  })
11696
+ }) : /*#__PURE__*/ jsx("ul", {
11697
+ className: "bhd-picker-ranges showPresets ".concat(showNow ? "showNow" : ""),
11698
+ children: selfRenderPresets()
11624
11699
  })
11625
11700
  ]
11626
- }) : /*#__PURE__*/ jsx("ul", {
11627
- className: "bhd-picker-ranges",
11628
- children: renderPresets()
11629
11701
  });
11630
11702
  };
11703
+ // 渲染今天
11704
+ var renderNow = function() {
11705
+ // 显示now
11706
+ if (showNow) {
11707
+ var _extraItems;
11708
+ // 日程安排时: extraItems中今天是否是可选或者已选择状态
11709
+ var hasNow = ((_extraItems = extraItems) === null || _extraItems === void 0 ? void 0 : _extraItems.filter(function(item) {
11710
+ return item.status !== "noselectable";
11711
+ }).length) > 0;
11712
+ if (kind === "single" || kind === "extra" && hasNow) {
11713
+ if (mode === "date" || mode === undefined) {
11714
+ return /*#__PURE__*/ jsx("li", {
11715
+ className: "bhd-picker-now",
11716
+ children: /*#__PURE__*/ jsx("a", {
11717
+ className: "bhd-picker-now-btn",
11718
+ onClick: todayClick,
11719
+ children: showTime ? i18Conversion$1("此刻") : i18Conversion$1("今天")
11720
+ })
11721
+ });
11722
+ }
11723
+ }
11724
+ }
11725
+ return null;
11726
+ };
11631
11727
  // 渲染预设
11632
- var renderPresets = function() {
11728
+ var selfRenderPresets = function() {
11633
11729
  return /*#__PURE__*/ jsx("li", {
11634
11730
  className: "bhd-picker-presets",
11635
11731
  children: presets.map(function(item, index) {
11636
11732
  return /*#__PURE__*/ jsx("a", {
11637
11733
  className: "bhd-picker-preset-btn",
11638
11734
  onClick: function() {
11639
- presetClick(item.value);
11735
+ presetClick(item);
11640
11736
  },
11641
11737
  children: item.label
11642
11738
  }, index);
@@ -11648,77 +11744,70 @@ var BhdDatePicker = function(props) {
11648
11744
  if (kind === "range") {
11649
11745
  if (selectedRangeDate[0] && selectedRangeDate[1] && selectedRangeDateString[0] && selectedRangeDateString[1]) {
11650
11746
  onChange && onChange(selectedRangeDate, selectedRangeDateString);
11651
- setOpen(false);
11747
+ setPanelOpen(false);
11652
11748
  } else {
11653
- setOpen(true);
11749
+ setPanelOpen(true);
11654
11750
  }
11655
11751
  } else {
11656
11752
  if (selectedDate && selectedDateString) {
11657
11753
  onChange && onChange(selectedDate, selectedDateString);
11658
- setOpen(false);
11754
+ setPanelOpen(false);
11659
11755
  }
11660
11756
  }
11661
11757
  };
11758
+ // 今天点击
11662
11759
  var todayClick = function() {
11663
- var today = dayjs();
11664
- var todayString = today.format(showTime ? "YYYY-MM-DD hh:mm:ss" : "YYYY-MM-DD");
11665
- setSelectedDate(today);
11666
- setSelectedDateString(todayString);
11667
- onChange && onChange(today, todayString);
11668
- setOpen(false);
11760
+ // var today = dayjs();
11761
+ // var todayString = today.format(format);
11762
+ // setSelectedDate((prevState) => {
11763
+ // selectedDateRef.current = today;
11764
+ // return selectedDateRef.current;
11765
+ // });
11766
+ // setSelectedDateString((prevState) => {
11767
+ // selectedDateStringRef.current = todayString;
11768
+ // return selectedDateStringRef.current;
11769
+ // });
11770
+ // onChange && onChange(today, todayString);
11771
+ // setPanelOpen(false);
11669
11772
  };
11670
11773
  //预设点击
11671
- var presetClick = function(value) {
11672
- var todayString = value.format(showTime ? "YYYY-MM-DD hh:mm:ss" : "YYYY-MM-DD");
11673
- setSelectedDate(value);
11674
- setSelectedDateString(todayString);
11675
- onChange && onChange(value, todayString);
11676
- setOpen(false);
11774
+ var presetClick = function(info) {
11775
+ console.log(_type_of(info.value));
11776
+ var value = typeof info.value === "function" ? info.value() : info.value;
11777
+ var valueString = value.format(format);
11778
+ setSelectedDate(function(prevState) {
11779
+ selectedDateRef.current = value;
11780
+ return selectedDateRef.current;
11781
+ });
11782
+ setSelectedDateString(function(prevState) {
11783
+ selectedDateStringRef.current = valueString;
11784
+ return selectedDateStringRef.current;
11785
+ });
11786
+ onChange && onChange(value, valueString);
11787
+ setPanelOpen(false);
11677
11788
  };
11678
11789
  return /*#__PURE__*/ jsxs("span", {
11679
11790
  className: "".concat(modules_63b47c51.bhdDatePicker),
11680
11791
  ref: bhdDatePickerRef,
11681
11792
  children: [
11682
- kind === "single" && /*#__PURE__*/ jsx(Fragment, {
11793
+ (kind === "single" || kind === "extra") && /*#__PURE__*/ jsx(Fragment, {
11683
11794
  children: /*#__PURE__*/ jsx(DatePicker, _object_spread_props(_object_spread({}, getConfig()), {
11684
- id: "pickerRef",
11685
- className: "".concat(className, " ").concat(useType === "table" ? "table-date-picker" : ""),
11686
- popupClassName: "".concat(modules_63b47c51.bhdDatePickerPopup, " ").concat(modules_63b47c51.singlePicker, " ").concat(popupClassName || ""),
11687
- cellRender: cellRender,
11688
- prevIcon: /*#__PURE__*/ jsx(CustomArrow$1, {
11689
- style: {
11690
- transform: "rotate(90deg)"
11691
- }
11692
- }),
11693
- nextIcon: /*#__PURE__*/ jsx(CustomArrow$1, {
11694
- style: {
11695
- transform: "rotate(-90deg)"
11696
- }
11697
- }),
11698
- superPrevIcon: /*#__PURE__*/ jsx(CustomArrow$1, {
11699
- style: {
11700
- transform: "rotate(90deg)"
11701
- }
11702
- }),
11703
- superNextIcon: /*#__PURE__*/ jsx(CustomArrow$1, {
11704
- style: {
11705
- transform: "rotate(-90deg)"
11706
- }
11707
- }),
11795
+ value: selectedDate,
11796
+ showNow: showTime ? showNow : false,
11797
+ mode: panelMode,
11798
+ open: panelOpen,
11799
+ disabledDate: selfDisabledDate,
11708
11800
  onPanelChange: function(value, mode) {
11709
11801
  setPanelMode(mode);
11802
+ onPanelChange && onPanelChange(value, mode);
11710
11803
  },
11711
- mode: panelMode,
11712
- open: open,
11713
11804
  onOpenChange: function(value) {
11714
11805
  // 打开设置默认mode
11715
11806
  if (value) {
11716
11807
  setDefaultMode();
11717
11808
  }
11809
+ onOpenChange && onOpenChange(value);
11718
11810
  },
11719
- showNow: showTime ? showNow : false,
11720
- defaultPickerValue: selectedDate,
11721
- value: selectedDate,
11722
11811
  onChange: function(date, dateString) {
11723
11812
  setSelectedDate(function(prevState) {
11724
11813
  selectedDateRef.current = date;
@@ -11729,149 +11818,68 @@ var BhdDatePicker = function(props) {
11729
11818
  return selectedDateStringRef.current;
11730
11819
  });
11731
11820
  },
11732
- onOk: function() {
11821
+ onOk: function(date) {
11733
11822
  if (showTime) {
11734
11823
  setTimeout(function() {
11735
- console.log({
11736
- selectedDate: selectedDateRef.current,
11737
- selectedDateString: selectedDateStringRef.current
11738
- });
11739
11824
  onChange && onChange(selectedDateRef.current, selectedDateStringRef.current);
11740
- setOpen(false);
11825
+ setPanelOpen(false);
11741
11826
  }, 0);
11742
11827
  }
11743
- onOk && onOk();
11828
+ onOk && onOk(date);
11744
11829
  },
11745
- onClick: function() {
11746
- setOpen(true);
11747
- onClick && onClick();
11830
+ onClick: function(e) {
11831
+ setPanelOpen(true);
11832
+ onClick && onClick(e);
11748
11833
  },
11749
- onBlur: function() {
11834
+ onBlur: function(e) {
11750
11835
  okClick();
11751
- setOpen(false);
11752
- onBlur && onBlur();
11753
- },
11754
- renderExtraFooter: renderExtraFooter
11836
+ setPanelOpen(false);
11837
+ onBlur && onBlur(e);
11838
+ }
11755
11839
  }))
11756
11840
  }),
11757
11841
  kind === "range" && /*#__PURE__*/ jsx(Fragment, {
11758
11842
  children: /*#__PURE__*/ jsx(RangePicker, _object_spread_props(_object_spread({}, getConfig()), {
11759
- className: "".concat(className, " ").concat(useType === "table" ? "table-date-picker" : ""),
11760
- popupClassName: "".concat(modules_63b47c51.bhdDatePickerPopup, " ").concat(modules_63b47c51.rangePicker, " ").concat(popupClassName || ""),
11761
- cellRender: cellRender,
11762
- prevIcon: /*#__PURE__*/ jsx(CustomArrow$1, {
11763
- style: {
11764
- transform: "rotate(90deg)"
11765
- }
11766
- }),
11767
- nextIcon: /*#__PURE__*/ jsx(CustomArrow$1, {
11768
- style: {
11769
- transform: "rotate(-90deg)"
11770
- }
11771
- }),
11772
- superPrevIcon: /*#__PURE__*/ jsx(CustomArrow$1, {
11773
- style: {
11774
- transform: "rotate(90deg)"
11775
- }
11776
- }),
11777
- superNextIcon: /*#__PURE__*/ jsx(CustomArrow$1, {
11778
- style: {
11779
- transform: "rotate(-90deg)"
11780
- }
11781
- }),
11843
+ value: selectedRangeDate,
11844
+ showNow: false,
11845
+ mode: rangePanelMode,
11846
+ open: panelOpen,
11847
+ disabledDate: selfDisabledDate,
11782
11848
  onPanelChange: function(value, mode) {
11783
11849
  setRangePanelMode(mode);
11850
+ onPanelChange && onPanelChange(value, mode);
11784
11851
  },
11785
- mode: rangePanelMode,
11786
- open: open,
11787
11852
  onOpenChange: function(value) {
11788
11853
  if (value) {
11789
11854
  setDefaultMode();
11790
11855
  }
11856
+ if (showTime) {
11857
+ setPanelOpen(value);
11858
+ }
11791
11859
  setRangeOpenChange(value);
11860
+ onOpenChange && onOpenChange(value);
11792
11861
  },
11793
- showNow: false,
11794
- defaultPickerValue: selectedRangeDate,
11795
- value: selectedRangeDate,
11796
- onClick: function() {
11797
- setOpen(true);
11798
- onClick && onClick();
11862
+ onClick: function(e) {
11863
+ setPanelOpen(true);
11864
+ onClick && onClick(e);
11799
11865
  },
11800
11866
  onCalendarChange: function(dates, dateStrings, info) {
11801
11867
  setSelectedRangeDate(dates);
11802
11868
  setSelectedRangeDateString(dateStrings);
11869
+ onCalendarChange && onCalendarChange(dates, dateStrings, info);
11803
11870
  },
11804
- onBlur: function() {
11805
- if ((selectedRangeDate === null || selectedRangeDate === void 0 ? void 0 : selectedRangeDate[0]) && (selectedRangeDate === null || selectedRangeDate === void 0 ? void 0 : selectedRangeDate[1])) {
11871
+ onBlur: function(e) {
11872
+ var _selectedRangeDate, _selectedRangeDate1, _selectedRangeDate2, _selectedRangeDate3;
11873
+ if (((_selectedRangeDate = selectedRangeDate) === null || _selectedRangeDate === void 0 ? void 0 : _selectedRangeDate[0]) && ((_selectedRangeDate1 = selectedRangeDate) === null || _selectedRangeDate1 === void 0 ? void 0 : _selectedRangeDate1[1])) {
11806
11874
  okClick();
11807
- setOpen(false);
11808
- } else if (!(selectedRangeDate === null || selectedRangeDate === void 0 ? void 0 : selectedRangeDate[0]) || !(selectedRangeDate === null || selectedRangeDate === void 0 ? void 0 : selectedRangeDate[1])) {
11809
- setOpen(rangeOpenChange);
11875
+ setPanelOpen(false);
11876
+ } else if (!((_selectedRangeDate2 = selectedRangeDate) === null || _selectedRangeDate2 === void 0 ? void 0 : _selectedRangeDate2[0]) || !((_selectedRangeDate3 = selectedRangeDate) === null || _selectedRangeDate3 === void 0 ? void 0 : _selectedRangeDate3[1])) {
11877
+ setPanelOpen(rangeOpenChange);
11810
11878
  }
11811
- onBlur && onBlur();
11812
- },
11813
- panelRender: function(panelNode) {
11814
- return panelNode;
11815
- },
11816
- renderExtraFooter: renderExtraFooter
11817
- }))
11818
- }),
11819
- kind === "extra" && /*#__PURE__*/ jsx(DatePicker, _object_spread_props(_object_spread({}, getConfig()), {
11820
- className: "".concat(className, " ").concat(useType === "table" ? "hide" : ""),
11821
- popupClassName: "".concat(modules_63b47c51.bhdDatePickerPopup, " ").concat(modules_63b47c51.extraPicker, " ").concat(extraReadonly ? modules_63b47c51.readonly : "", " ").concat(popupClassName || ""),
11822
- cellRender: cellRender,
11823
- prevIcon: /*#__PURE__*/ jsx(CustomArrow$1, {
11824
- style: {
11825
- transform: "rotate(90deg)"
11826
- }
11827
- }),
11828
- nextIcon: /*#__PURE__*/ jsx(CustomArrow$1, {
11829
- style: {
11830
- transform: "rotate(-90deg)"
11831
- }
11832
- }),
11833
- superPrevIcon: /*#__PURE__*/ jsx(CustomArrow$1, {
11834
- style: {
11835
- transform: "rotate(90deg)"
11836
- }
11837
- }),
11838
- superNextIcon: /*#__PURE__*/ jsx(CustomArrow$1, {
11839
- style: {
11840
- transform: "rotate(-90deg)"
11841
- }
11842
- }),
11843
- disabledDate: disabledDate,
11844
- allowClear: !extraReadonly,
11845
- onPanelChange: function(value, mode) {
11846
- setPanelMode(mode);
11847
- },
11848
- mode: panelMode,
11849
- onOpenChange: function(value) {
11850
- if (value) {
11851
- setDefaultMode();
11879
+ onBlur && onBlur(e);
11852
11880
  }
11853
- },
11854
- open: open,
11855
- showNow: false,
11856
- defaultPickerValue: selectedDate,
11857
- value: selectedDate,
11858
- onChange: function(date, dateString) {
11859
- setSelectedDate(date);
11860
- setSelectedDateString(dateString);
11861
- },
11862
- onClick: function() {
11863
- setOpen(true);
11864
- onClick && onClick();
11865
- },
11866
- onBlur: function() {
11867
- if (!extraReadonly) {
11868
- okClick();
11869
- }
11870
- setOpen(false);
11871
- onBlur && onBlur();
11872
- },
11873
- renderExtraFooter: extraReadonly ? null : renderExtraFooter
11874
- }))
11881
+ }))
11882
+ })
11875
11883
  ]
11876
11884
  });
11877
11885
  };