@zgfe/business-lib 1.1.11-insight.1 → 1.1.12

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.
@@ -1,9 +1,7 @@
1
1
  @import '../../assets/styles/variable.less';
2
2
 
3
3
  .biz-chart-tooltip {
4
- max-height: 324px;
5
4
  padding: @padding-xs;
6
- overflow: auto;
7
5
  background-color: rgba(250, 251, 253, 0.8);
8
6
  border-color: transparent;
9
7
  backdrop-filter: blur(4px);
@@ -20,7 +18,7 @@
20
18
  display: flex;
21
19
  align-items: center;
22
20
  justify-content: space-between;
23
- min-height: @height-sm;
21
+ height: @height-sm;
24
22
  padding: 0px @padding-xs;
25
23
  font-size: @font-size-sm;
26
24
  background: @white;
@@ -32,22 +30,15 @@
32
30
  }
33
31
 
34
32
  .biz-chart-tooltip-content {
35
- display: flex;
36
- align-items: center;
37
33
  color: @text-color-secondary;
38
34
 
39
35
  .biz-tooltip-marker {
36
+ display: inline-block;
40
37
  width: 8px;
41
38
  height: 8px;
42
39
  margin-right: @margin-xs;
43
40
  border-radius: 50%;
44
41
  }
45
- .biz-tooltip-name {
46
- max-width: 300px;
47
- white-space: pre-wrap;
48
- word-wrap: break-word;
49
- word-break: break-all;
50
- }
51
42
  }
52
43
 
53
44
  .biz-chart-tooltip-value {
@@ -87,7 +87,6 @@ export var yAxisConfig = {
87
87
  };
88
88
  export var tooltipConfig = {
89
89
  trigger: 'axis',
90
- enterable: true,
91
90
  confine: false,
92
91
  backgroundColor: 'rgba(250, 251, 253, 0.8)',
93
92
  borderColor: 'transparent',
@@ -27,7 +27,7 @@ var tooltipFormatterDefault = function tooltipFormatterDefault(params) {
27
27
  }
28
28
 
29
29
  var name = (params.length > 1 ? item.seriesName : item.data && item.data.label ? item.data.label : item.name).trim();
30
- htmlArray.push("<div class=\"biz-chart-tooltip-item\">\n <div class=\"biz-chart-tooltip-content\">\n <span class=\"biz-tooltip-marker\" style=\"background:".concat(item.color, "\"></span>\n <div class=\"biz-tooltip-name\">").concat(name, "</div>\n </div> \n <span class=\"biz-chart-tooltip-value\">").concat(lineLabel, "</span>\n </div>"));
30
+ htmlArray.push("<div class=\"biz-chart-tooltip-item\">\n <span class=\"biz-chart-tooltip-content\">\n <span class=\"biz-tooltip-marker\" style=\"background:".concat(item.color, "\"></span>").concat(name, "\n </span> \n <span class=\"biz-chart-tooltip-value\">").concat(lineLabel, "</span>\n </div>"));
31
31
  });
32
32
  return htmlArray.join('');
33
33
  };
@@ -1,4 +1,3 @@
1
- import { Tooltip } from 'antd';
2
1
  import React from 'react';
3
2
  import { classPrefix } from '.';
4
3
  import IconFont from '../icon/iconFont';
@@ -46,7 +45,8 @@ var SelectOption = function SelectOption(props) {
46
45
 
47
46
  return /*#__PURE__*/React.createElement("div", {
48
47
  className: "".concat(classPrefix, "-option ").concat(multiple ? classPrefix + '-option-multiple' : '', " ").concat(checked ? 'active' : '', " ").concat(disabled ? 'disabled' : ''),
49
- onClick: onClick
48
+ onClick: onClick,
49
+ title: option[props.labelField]
50
50
  }, multiple && (checked ? /*#__PURE__*/React.createElement(IconFont, {
51
51
  className: "".concat(classPrefix, "-checkbox ").concat(classPrefix, "-checked"),
52
52
  type: 'a-Property1xuanzhong'
@@ -55,12 +55,9 @@ var SelectOption = function SelectOption(props) {
55
55
  type: 'a-Property1moren'
56
56
  })), (option === null || option === void 0 ? void 0 : option.icon) && /*#__PURE__*/React.createElement("span", {
57
57
  className: "".concat(classPrefix, "-option-icon")
58
- }, option === null || option === void 0 ? void 0 : option.icon), /*#__PURE__*/React.createElement(Tooltip, {
59
- title: option[props.labelField],
60
- zIndex: 100000
61
- }, /*#__PURE__*/React.createElement("span", {
58
+ }, option === null || option === void 0 ? void 0 : option.icon), /*#__PURE__*/React.createElement("span", {
62
59
  className: "".concat(classPrefix, "-option-label")
63
- }, renderLabel(option))), !disabled && /*#__PURE__*/React.createElement("span", {
60
+ }, renderLabel(option)), !disabled && /*#__PURE__*/React.createElement("span", {
64
61
  className: "".concat(classPrefix, "-option-btn")
65
62
  }, props.extra && props.extra(option)));
66
63
  };
@@ -31,8 +31,7 @@ var BizTargetCondition = function BizTargetCondition(props) {
31
31
  setTargetData = _useState2[1];
32
32
 
33
33
  var _useContext = useContext(BizGlobalDataContext),
34
- _useContext$eventGrou = _useContext.eventGroupList,
35
- eventGroupList = _useContext$eventGrou === void 0 ? [] : _useContext$eventGrou;
34
+ eventGroupList = _useContext.eventGroupList;
36
35
 
37
36
  var _useState3 = useState({
38
37
  analysisIndex: 'number'
package/es/utils/ajax.js CHANGED
@@ -49,7 +49,7 @@ var errorHandler = function errorHandler(error) {
49
49
  return response;
50
50
  };
51
51
 
52
- function responseErrorHandler(url, apiResult, errorTitle) {
52
+ function responseErrorHandler(url, apiResult, errorTitle, notifyType) {
53
53
  if (/\.jsp/.test(url)) {
54
54
  return apiResult;
55
55
  }
@@ -77,7 +77,7 @@ function responseErrorHandler(url, apiResult, errorTitle) {
77
77
 
78
78
  if (!flag) {
79
79
  message = apiResult.msg || message;
80
- notification.error({
80
+ notification[notifyType || 'error']({
81
81
  message: errorTitle || "\u8BF7\u6C42\u9519\u8BEF",
82
82
  description: message
83
83
  });
@@ -140,7 +140,7 @@ function _request() {
140
140
 
141
141
  case 13:
142
142
  res = _context.sent;
143
- return _context.abrupt("return", responseWrapper ? responseWrapper(url, responseErrorHandler(url, res, options === null || options === void 0 ? void 0 : options.errorTitle)) : responseErrorHandler(url, res, options === null || options === void 0 ? void 0 : options.errorTitle));
143
+ return _context.abrupt("return", responseWrapper ? responseWrapper(url, responseErrorHandler(url, res, options === null || options === void 0 ? void 0 : options.errorTitle, options === null || options === void 0 ? void 0 : options.notifyType)) : responseErrorHandler(url, res, options === null || options === void 0 ? void 0 : options.errorTitle, options === null || options === void 0 ? void 0 : options.notifyType));
144
144
 
145
145
  case 17:
146
146
  _context.prev = 17;
@@ -84,6 +84,7 @@ export declare class ApiResult<T> implements InterfaceApiResult<T> {
84
84
  }
85
85
  export declare type ajaxConfig<T> = RequestOptionsInit & {
86
86
  errorTitle?: string;
87
+ notifyType?: 'warning' | 'error' | 'info';
87
88
  optionsWrapper?: (url: string, options?: RequestOptionsInit) => {
88
89
  url: string;
89
90
  options?: RequestOptionsInit;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/business-lib",
3
- "version": "1.1.11-insight.1",
3
+ "version": "1.1.12",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -60,5 +60,5 @@
60
60
  "react": "^16.12.0 || ^17.0.0",
61
61
  "yorkie": "^2.0.0"
62
62
  },
63
- "gitHead": "eda6d32cdf2b104bb099ce3803426754b616335e"
63
+ "gitHead": "5b2d20352f9fbb9919f21397c60a21aa55b9bd7f"
64
64
  }