bhd-components 0.7.34 → 0.7.36

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 (34) hide show
  1. package/README.md +1 -1
  2. package/dist/{e6319651.esm.es5.production.js → 60ad30a5.esm.es5.production.js} +10 -10
  3. package/dist/{8f785a2d.esm.es5.development.js → d10092aa.esm.es5.development.js} +256 -256
  4. package/dist/index.esm.es5.development.css +0 -3
  5. package/dist/index.esm.es5.development.js +126 -47
  6. package/dist/index.esm.es5.production.css +1 -1
  7. package/dist/index.esm.es5.production.js +1 -1
  8. package/es2017/bhdAppLayout/components/BhdTableSimple/index.js +24 -35
  9. package/es2017/bhdAppLayout/components/BhdTableSimple/index.less +0 -6
  10. package/es2017/bhdAppLayout/components/BhdTableSimple/index/347/232/204/345/211/257/346/234/254.js +120 -0
  11. package/es2017/bhdTipModal/index.js +4 -1
  12. package/es2017/bhdTipModal/modal.d.ts +6 -0
  13. package/es2017/bhdTipModal/modal.js +15 -0
  14. package/es2017/index.d.ts +1 -0
  15. package/es2017/index.js +1 -0
  16. package/es2017/message/index.d.ts +12 -13
  17. package/es2017/message/index.js +14 -3
  18. package/es2017/provider/config.d.ts +7 -1
  19. package/es2017/provider/config.js +7 -1
  20. package/es2017/provider/index.js +21 -4
  21. package/esm/bhdAppLayout/components/BhdTableSimple/index.js +24 -37
  22. package/esm/bhdAppLayout/components/BhdTableSimple/index.less +0 -6
  23. package/esm/bhdAppLayout/components/BhdTableSimple/index/347/232/204/345/211/257/346/234/254.js +122 -0
  24. package/esm/bhdTipModal/index.js +4 -1
  25. package/esm/bhdTipModal/modal.d.ts +6 -0
  26. package/esm/bhdTipModal/modal.js +15 -0
  27. package/esm/index.d.ts +1 -0
  28. package/esm/index.js +1 -0
  29. package/esm/message/index.d.ts +12 -13
  30. package/esm/message/index.js +60 -2
  31. package/esm/provider/config.d.ts +7 -1
  32. package/esm/provider/config.js +7 -1
  33. package/esm/provider/index.js +21 -4
  34. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { z as zhCN, C as ConfigProvider, _ as _extends, a as _object_destructuring_empty, j as jsx, b as _object_spread_props, S as StyleProvider, t as transform, c as _object_spread, d as _sliced_to_array, T as Tooltip, e as Table$2, f as jsxs, I as Icon, m as message, E as ExclamationCircleFilled, P as Pagination, g as Select, h as CaretDownOutlined, M as Modal, i as _inherits, k as _create_super, l as _create_class, n as _class_call_check, o as _define_property, p as _assert_this_initialized, q as _async_to_generator, L as LeftOutlined, R as RightOutlined, r as MinusOutlined, s as PlusOutlined, u as __generator, v as Input, w as SearchOutlined, x as CloseOutlined, X, y as I, H, A as Remarkable, D as Drawer, B as HighlightJS, Z as ZoomInOutlined, F as _to_consumable_array } from './8f785a2d.esm.es5.development.js';
2
- export { G as Affix, J as Alert, K as Anchor, aF as App, N as AutoComplete, O as Avatar, U as BackTop, V as Badge, W as Breadcrumb, Y as Button, $ as Calendar, a0 as Card, a1 as Carousel, a2 as Cascader, a3 as Checkbox, a4 as Col, a5 as Collapse, a6 as DatePicker, a7 as Descriptions, a8 as Divider, D as Drawer, a9 as Dropdown, aa as Empty, Q as FloatButton, ab as Form, ac as Grid, ad as Image, v as Input, ae as InputNumber, af as Layout, ag as List, ah as Mentions, ai as Menu, M as Modal, ak as Popconfirm, al as Popover, am as Progress, aM as QRCode, an as Radio, ao as Rate, ap as Result, aq as Row, ar as Segmented, g as Select, as as Skeleton, at as Slider, au as Space, av as Spin, aw as Statistic, ax as Steps, ay as Switch, az as Tabs, aA as Tag, aC as TimePicker, aD as Timeline, T as Tooltip, aE as Tour, aG as Transfer, aH as Tree, aI as TreeSelect, aJ as Typography, aK as Upload, aL as Watermark, aO as en_US, aj as notification, aB as theme, aN as version, z as zh_CN } from './8f785a2d.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, S as StyleProvider, t as transform, f as jsxs, 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, 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 './d10092aa.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 './d10092aa.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';
@@ -48,13 +48,31 @@ var config = {
48
48
  }
49
49
  }
50
50
  },
51
- locale: zhCN
51
+ locale: zhCN,
52
+ message: {
53
+ top: 100,
54
+ duration: 3,
55
+ maxCount: 1
56
+ },
57
+ notification: {}
52
58
  };
53
59
  var config$1 = config;
54
60
 
61
+ var Modal = {};
62
+ var message = {};
63
+ function BhdTipModal$2() {
64
+ var staticFunction = App.useApp();
65
+ message = _object_spread({}, AntdMessage, staticFunction.message);
66
+ Modal = _object_spread({}, Modal$1, staticFunction.modal);
67
+ _object_spread({}, AntdNotification, staticFunction.notification);
68
+ console.log("mess1", staticFunction, message);
69
+ return null;
70
+ }
71
+
55
72
  var Provider = function(Component) {
56
73
  var customConfig = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
57
74
  var AppConfig = Object.assign(config$1, customConfig);
75
+ var _AppConfig_message = AppConfig.message, message = _AppConfig_message === void 0 ? {} : _AppConfig_message, _AppConfig_notification = AppConfig.notification, notification = _AppConfig_notification === void 0 ? {} : _AppConfig_notification;
58
76
  ConfigProvider.config(AppConfig);
59
77
  ConfigProvider.__proto__.lang = AppConfig.locale.locale;
60
78
  return function(_param) {
@@ -65,7 +83,14 @@ var Provider = function(Component) {
65
83
  transformers: [
66
84
  transform
67
85
  ],
68
- children: /*#__PURE__*/ jsx(Component, _object_spread({}, props))
86
+ children: /*#__PURE__*/ jsxs(App, {
87
+ message: message,
88
+ notification: notification,
89
+ children: [
90
+ /*#__PURE__*/ jsx(BhdTipModal$2, {}),
91
+ /*#__PURE__*/ jsx(Component, _object_spread({}, props))
92
+ ]
93
+ })
69
94
  })
70
95
  }));
71
96
  };
@@ -74,13 +99,21 @@ Provider.Component = function(props) {
74
99
  var AppConfig = Object.assign(config$1, props);
75
100
  ConfigProvider.__proto__.lang = AppConfig.locale.locale;
76
101
  ConfigProvider.config(AppConfig);
102
+ var _AppConfig_message = AppConfig.message, message = _AppConfig_message === void 0 ? {} : _AppConfig_message, _AppConfig_notification = AppConfig.notification, notification = _AppConfig_notification === void 0 ? {} : _AppConfig_notification;
77
103
  return /*#__PURE__*/ jsx(ConfigProvider, _object_spread_props(_object_spread({}, AppConfig), {
78
104
  children: /*#__PURE__*/ jsx(StyleProvider, {
79
105
  hashPriority: "high",
80
106
  transformers: [
81
107
  transform
82
108
  ],
83
- children: props.children
109
+ children: /*#__PURE__*/ jsxs(App, {
110
+ message: message,
111
+ notification: notification,
112
+ children: [
113
+ /*#__PURE__*/ jsx(BhdTipModal$2, {}),
114
+ props.children
115
+ ]
116
+ })
84
117
  })
85
118
  }));
86
119
  };
@@ -431,19 +464,7 @@ var i18Conversion$1 = i18Conversion;
431
464
  className
432
465
  超长内容 出现滚动条 需在管理列定义好width 没有定义的max-width:300
433
466
  */ var BhdTableSimple = function(props) {
434
- var _props_className = props.className, className = _props_className === void 0 ? "" : _props_className; props.locale; props.borderBottom; var rowSelection = props.rowSelection, ajaxErr = props.ajaxErr, dataSource = props.dataSource, _props_kind = props.kind, kind = _props_kind === void 0 ? "simple" : _props_kind, loading = props.loading, _props_notDataText = props.notDataText, notDataText = _props_notDataText === void 0 ? i18Conversion$1("noData") : _props_notDataText, _props_components = props.components, components = _props_components === void 0 ? {
435
- table: null,
436
- header: {
437
- wrapper: null,
438
- row: null,
439
- cell: null
440
- },
441
- body: {
442
- wrapper: null,
443
- row: null,
444
- cell: null
445
- }
446
- } : _props_components;
467
+ var className = props.className; props.locale; props.borderBottom; var rowSelection = props.rowSelection, ajaxErr = props.ajaxErr, dataSource = props.dataSource, _props_kind = props.kind, kind = _props_kind === void 0 ? "simple" : _props_kind, loading = props.loading, _props_notDataText = props.notDataText, notDataText = _props_notDataText === void 0 ? i18Conversion$1("noData") : _props_notDataText;
447
468
  var renderTableText = function() {
448
469
  if (ajaxErr) {
449
470
  return /*#__PURE__*/ jsxs("div", {
@@ -460,11 +481,24 @@ var i18Conversion$1 = i18Conversion;
460
481
  });
461
482
  }
462
483
  if (loading) {
463
- return /*#__PURE__*/ jsx("div", {
464
- className: "app_BhdTableSimple_noTable",
484
+ return /*#__PURE__*/ jsxs("div", {
485
+ className: "app_BhdTableSimple_noTable app_BhdTableSimple_noTable_loadingTable",
465
486
  style: {
466
487
  minHeight: "150px"
467
- }
488
+ },
489
+ children: [
490
+ /*#__PURE__*/ jsx("img", {
491
+ src: Loading,
492
+ alt: "",
493
+ style: {
494
+ width: "48px",
495
+ height: "48px"
496
+ }
497
+ }),
498
+ /*#__PURE__*/ jsx("p", {
499
+ children: i18Conversion$1("Load")
500
+ })
501
+ ]
468
502
  });
469
503
  }
470
504
  return /*#__PURE__*/ jsxs("div", {
@@ -483,7 +517,7 @@ var i18Conversion$1 = i18Conversion;
483
517
  ]
484
518
  });
485
519
  };
486
- var loadingTable = /*#__PURE__*/ jsxs("div", {
520
+ /*#__PURE__*/ jsxs("div", {
487
521
  className: "app_BhdTableSimple_noTable app_BhdTableSimple_noTable_loadingTable",
488
522
  children: [
489
523
  /*#__PURE__*/ jsx("img", {
@@ -499,39 +533,25 @@ var i18Conversion$1 = i18Conversion;
499
533
  })
500
534
  ]
501
535
  });
502
- if (kind === "simple") {
503
- className += " app_BhdTableSimple_simple";
504
- }
505
- if (loading) {
506
- if (!components.body) {
507
- components.body = {
508
- wrapper: null,
509
- row: null,
510
- cell: null
511
- };
512
- }
513
- components = _object_spread_props(_object_spread({}, components.body), {
514
- body: {
515
- wrapper: function() {
516
- return loadingTable;
517
- }
518
- }
519
- });
520
- }
521
536
  var tableProps = _object_spread_props(_object_spread({
522
537
  style: {
523
538
  width: "100%"
524
539
  }
525
540
  }, props), {
526
541
  loading: false,
527
- components: components,
528
- dataSource: ajaxErr ? [] : dataSource,
542
+ dataSource: ajaxErr || loading ? [] : dataSource,
529
543
  className: "app_BhdTableSimple ".concat(className || " ", " ").concat(rowSelection ? "app_BhdTableSimple_rowSelection" : ""),
530
544
  locale: {
531
545
  emptyText: renderTableText()
532
546
  },
533
547
  scroll: props.scroll
534
548
  });
549
+ if (kind === "simple") {
550
+ className += " app_BhdTableSimple_simple";
551
+ }
552
+ // if (loading) {
553
+ // return loadingTable;
554
+ // }
535
555
  return /*#__PURE__*/ jsx(Table$1, _object_spread({}, tableProps));
536
556
  };
537
557
  var BhdTableSimple$1 = BhdTableSimple;
@@ -1095,9 +1115,11 @@ var CustomWenhaoRound = function(props) {
1095
1115
  };
1096
1116
  var CustomWenhaoRound$1 = CustomWenhaoRound;
1097
1117
 
1098
- var BhdMessage = _object_spread_props(_object_spread({}, message), {
1118
+ var _message, _message1, _message2, _message3, _message4, _message5, _message6, _message7, _message8;
1119
+ var BhdMessage = _object_spread_props(_object_spread({}, AntdMessage), {
1099
1120
  customSuccess: function(config) {
1100
1121
  var className = modules_63b47c51$8.customSuccess;
1122
+ console.log("customSuccess", message);
1101
1123
  if (typeof config === "string") {
1102
1124
  return message.success({
1103
1125
  content: config,
@@ -1133,6 +1155,60 @@ var BhdMessage = _object_spread_props(_object_spread({}, message), {
1133
1155
  className: "".concat(className, " ").concat(config.className || ""),
1134
1156
  icon: config.icon || /*#__PURE__*/ jsx(ExclamationCircleFilled, {})
1135
1157
  }));
1158
+ },
1159
+ open: function() {
1160
+ for(var _len = arguments.length, arg = new Array(_len), _key = 0; _key < _len; _key++){
1161
+ arg[_key] = arguments[_key];
1162
+ }
1163
+ return (_message = message).open.apply(_message, _to_consumable_array(arg));
1164
+ },
1165
+ destroy: function() {
1166
+ for(var _len = arguments.length, arg = new Array(_len), _key = 0; _key < _len; _key++){
1167
+ arg[_key] = arguments[_key];
1168
+ }
1169
+ return (_message1 = message).destroy.apply(_message1, _to_consumable_array(arg));
1170
+ },
1171
+ error: function() {
1172
+ for(var _len = arguments.length, arg = new Array(_len), _key = 0; _key < _len; _key++){
1173
+ arg[_key] = arguments[_key];
1174
+ }
1175
+ return (_message2 = message).error.apply(_message2, _to_consumable_array(arg));
1176
+ },
1177
+ info: function() {
1178
+ for(var _len = arguments.length, arg = new Array(_len), _key = 0; _key < _len; _key++){
1179
+ arg[_key] = arguments[_key];
1180
+ }
1181
+ return (_message3 = message).info.apply(_message3, _to_consumable_array(arg));
1182
+ },
1183
+ loading: function() {
1184
+ for(var _len = arguments.length, arg = new Array(_len), _key = 0; _key < _len; _key++){
1185
+ arg[_key] = arguments[_key];
1186
+ }
1187
+ return (_message4 = message).loading.apply(_message4, _to_consumable_array(arg));
1188
+ },
1189
+ success: function() {
1190
+ for(var _len = arguments.length, arg = new Array(_len), _key = 0; _key < _len; _key++){
1191
+ arg[_key] = arguments[_key];
1192
+ }
1193
+ return (_message5 = message).success.apply(_message5, _to_consumable_array(arg));
1194
+ },
1195
+ useMessage: function() {
1196
+ for(var _len = arguments.length, arg = new Array(_len), _key = 0; _key < _len; _key++){
1197
+ arg[_key] = arguments[_key];
1198
+ }
1199
+ return (_message6 = message).useMessage.apply(_message6, _to_consumable_array(arg));
1200
+ },
1201
+ warning: function() {
1202
+ for(var _len = arguments.length, arg = new Array(_len), _key = 0; _key < _len; _key++){
1203
+ arg[_key] = arguments[_key];
1204
+ }
1205
+ return (_message7 = message).warning.apply(_message7, _to_consumable_array(arg));
1206
+ },
1207
+ _InternalPanelDoNotUseOrYouWillBeFired: function() {
1208
+ for(var _len = arguments.length, arg = new Array(_len), _key = 0; _key < _len; _key++){
1209
+ arg[_key] = arguments[_key];
1210
+ }
1211
+ return (_message8 = message)._InternalPanelDoNotUseOrYouWillBeFired.apply(_message8, _to_consumable_array(arg));
1136
1212
  }
1137
1213
  });
1138
1214
  var BhdMessage$1 = BhdMessage;
@@ -1482,6 +1558,7 @@ var initWarnModal = function(obj) {
1482
1558
  };
1483
1559
  var BhdTipModal = {
1484
1560
  confirm: function(obj) {
1561
+ console.log("Modal", Modal);
1485
1562
  var modal = Modal.confirm(initConFirmModal(obj));
1486
1563
  modal.updateModal = function() {
1487
1564
  var updateObj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
@@ -1490,6 +1567,7 @@ var BhdTipModal = {
1490
1567
  return modal;
1491
1568
  },
1492
1569
  success: function(obj) {
1570
+ console.log("Modal", Modal);
1493
1571
  var modal = Modal.confirm(initSuccessModal(obj));
1494
1572
  modal.updateModal = function() {
1495
1573
  var updateObj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
@@ -1498,6 +1576,7 @@ var BhdTipModal = {
1498
1576
  return modal;
1499
1577
  },
1500
1578
  custom: function(obj) {
1579
+ console.log("Modal", Modal);
1501
1580
  var modal = Modal.confirm(initCustomModal(obj));
1502
1581
  modal.updateModal = function() {
1503
1582
  var updateObj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
@@ -1980,7 +2059,7 @@ var AppViewImage = /*#__PURE__*/ forwardRef(function(props, ref) {
1980
2059
  }
1981
2060
  };
1982
2061
  });
1983
- return /*#__PURE__*/ jsx(Modal, {
2062
+ return /*#__PURE__*/ jsx(Modal$1, {
1984
2063
  transitionName: "",
1985
2064
  maskTransitionName: "",
1986
2065
  title: null,
@@ -6745,7 +6824,7 @@ var CustomerService = function(props) {
6745
6824
  })
6746
6825
  ]
6747
6826
  }),
6748
- /*#__PURE__*/ jsxs(Modal, {
6827
+ /*#__PURE__*/ jsxs(Modal$1, {
6749
6828
  title: "AI助手",
6750
6829
  open: showType == 2 ? true : false,
6751
6830
  onCancel: function() {
@@ -6969,7 +7048,7 @@ var CustomerService = function(props) {
6969
7048
  }),
6970
7049
  (showType == 4 || showType == 5) && /*#__PURE__*/ jsxs(Fragment, {
6971
7050
  children: [
6972
- /*#__PURE__*/ jsxs(Modal, {
7051
+ /*#__PURE__*/ jsxs(Modal$1, {
6973
7052
  title: "AI助手",
6974
7053
  open: showType == 4 ? true : false,
6975
7054
  onCancel: function() {