@zgfe/business-lib 1.1.3-user.6 → 1.1.3-user.7

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,10 @@
1
1
  import React, { useContext } from 'react';
2
- import { Space } from 'antd';
2
+ import { Space, Tooltip } from 'antd';
3
3
  import { PlusOutlined } from '@ant-design/icons';
4
4
  import './styles/conditionTypeList.less';
5
5
  import { BizUserConditionContext } from '.';
6
6
  import BizGlobalDataContext from '../context';
7
+ import IconFont from '../icon/iconFont';
7
8
 
8
9
  var ConditionTypeList = function ConditionTypeList(props) {
9
10
  var onAdd = props.onAdd,
@@ -13,7 +14,8 @@ var ConditionTypeList = function ConditionTypeList(props) {
13
14
  var _useContext = useContext(BizUserConditionContext),
14
15
  textMode = _useContext.textMode,
15
16
  openTagCondition = _useContext.openTagCondition,
16
- openCdpCondition = _useContext.openCdpCondition;
17
+ openCdpCondition = _useContext.openCdpCondition,
18
+ cdpTip = _useContext.cdpTip;
17
19
 
18
20
  var _useContext2 = useContext(BizGlobalDataContext),
19
21
  menuNameMap = _useContext2.menuNameMap;
@@ -67,7 +69,11 @@ var ConditionTypeList = function ConditionTypeList(props) {
67
69
  onClick: function onClick() {
68
70
  return onAdd('cdp');
69
71
  }
70
- }, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(PlusOutlined, null), /*#__PURE__*/React.createElement("span", null, "\u660E\u7EC6\u6570\u636E"))) : null));
72
+ }, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(PlusOutlined, null), /*#__PURE__*/React.createElement("span", null, "\u660E\u7EC6\u6570\u636E"), cdpTip ? /*#__PURE__*/React.createElement(Tooltip, {
73
+ title: cdpTip
74
+ }, /*#__PURE__*/React.createElement(IconFont, {
75
+ type: "tishiicon"
76
+ })) : null)) : null));
71
77
  };
72
78
 
73
79
  ConditionTypeList.defaultProps = {
@@ -346,7 +346,7 @@ var CdpCondition = function CdpCondition(props) {
346
346
  }, "\u660E\u7EC6\u6570\u636E"), cdpConditions.map(function (item, index) {
347
347
  return /*#__PURE__*/React.createElement(CdpConditionItem, {
348
348
  value: item,
349
- key: (item === null || item === void 0 ? void 0 : item.fieldName) || index,
349
+ key: "".concat(item === null || item === void 0 ? void 0 : item.datasetId).concat(item === null || item === void 0 ? void 0 : item.operator).concat(index),
350
350
  onChange: function onChange(data) {
351
351
  return onChangeCondition(data, index);
352
352
  }
@@ -217,9 +217,7 @@ var Text = function Text(props) {
217
217
  backgroundColor: '#effcff',
218
218
  padding: '6px 7px'
219
219
  }
220
- }, /*#__PURE__*/React.createElement("span", {
221
- className: "".concat(classPrefix, "-text-desc-value")
222
- }, /*#__PURE__*/React.createElement("span", null, "("), dataset.map(function (value) {
220
+ }, dataset.map(function (value) {
223
221
  if (!value) return null;
224
222
  var operator = value.operator,
225
223
  _value$params = value.params,
@@ -252,7 +250,7 @@ var Text = function Text(props) {
252
250
  return /*#__PURE__*/React.createElement("span", {
253
251
  key: Math.random()
254
252
  }, "".concat(value.datasetName, "\u4E2D").concat(value.fieldName).concat(valuesDom));
255
- }), /*#__PURE__*/React.createElement("span", null, ")")));
253
+ }));
256
254
  }
257
255
 
258
256
  function renderPropValues(attr) {
@@ -53,7 +53,8 @@ var BizUserCondition = function BizUserCondition(props) {
53
53
  defaultValue = props.defaultValue,
54
54
  openTagCondition = props.openTagCondition,
55
55
  openCdpCondition = props.openCdpCondition,
56
- userTagsData = props.userTagsData;
56
+ userTagsData = props.userTagsData,
57
+ cdpTip = props.cdpTip;
57
58
 
58
59
  var _useState = useState([]),
59
60
  _useState2 = _slicedToArray(_useState, 2),
@@ -216,6 +217,7 @@ var BizUserCondition = function BizUserCondition(props) {
216
217
  textMode: props.textMode,
217
218
  openTagCondition: openTagCondition,
218
219
  openCdpCondition: openCdpCondition,
220
+ cdpTip: cdpTip,
219
221
  userTagsData: userTagsData !== null && userTagsData !== void 0 ? userTagsData : [],
220
222
  isRealTime: props.isRealTime,
221
223
  envNameList: envNameList,
@@ -36,6 +36,7 @@ export declare namespace BizUserConditionT {
36
36
  userTagsData?: UserTagsDataI[];
37
37
  isRealTime?: boolean;
38
38
  openCdpCondition?: boolean;
39
+ cdpTip?: string;
39
40
  }
40
41
  interface UserTagsDataI {
41
42
  appId: number;
@@ -132,7 +133,7 @@ export declare namespace BizUserConditionT {
132
133
  orConditions: Conditions[number];
133
134
  }
134
135
  type ShowListT = ShowItemI[];
135
- type GlobalContext = Pick<BizUserConditionT.PropsI, 'orConditionNum' | 'eventAttrNum' | 'openTagCondition' | 'userTagsData' | 'openCdpCondition' | 'textMode' | 'isRealTime'> & {
136
+ type GlobalContext = Pick<BizUserConditionT.PropsI, 'orConditionNum' | 'eventAttrNum' | 'openTagCondition' | 'userTagsData' | 'openCdpCondition' | 'textMode' | 'isRealTime' | 'cdpTip'> & {
136
137
  envNameList: string[];
137
138
  userPropsMap: {
138
139
  [key: string]: UserProp;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/business-lib",
3
- "version": "1.1.3-user.6",
3
+ "version": "1.1.3-user.7",
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": "003987b1574225b054c23ac7f3372ccf79bb3a47"
63
+ "gitHead": "2cbc14e2d80f1278719e7214b8715988c3e51709"
64
64
  }