@zgfe/business-lib 1.0.15-user.4 → 1.0.15

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 (100) hide show
  1. package/es/assets/styles/chunks.less +4 -3
  2. package/es/assets/styles/resetAntd.less +1 -40
  3. package/es/assets/theme.js +2 -0
  4. package/es/attrConditions/components/operateList.d.ts +0 -1
  5. package/es/attrConditions/components/operateList.js +2 -2
  6. package/es/attrConditions/components/stringList.d.ts +0 -1
  7. package/es/attrConditions/components/stringList.js +2 -2
  8. package/es/attrConditions/components/valuesList.d.ts +0 -1
  9. package/es/attrConditions/components/valuesList.js +4 -5
  10. package/es/attrConditions/demo/index.js +8 -7
  11. package/es/attrConditions/index.js +4 -14
  12. package/es/attrConditions/styles/index.less +2 -3
  13. package/es/attrConditions/types.d.ts +0 -3
  14. package/es/attrConditions/utils/operates.js +2 -2
  15. package/es/attributeSelector/index.js +4 -8
  16. package/es/attributeSelector/listPanel.js +19 -32
  17. package/es/attributeSelector/styles/index.less +3 -3
  18. package/es/attributeSelector/types.d.ts +0 -7
  19. package/es/attributeSelector/types.js +1 -8
  20. package/es/attributeSelector/util.js +2 -3
  21. package/es/eventSelector/index.js +4 -10
  22. package/es/eventSelector/listPanel.js +0 -2
  23. package/es/eventSelector/styles/index.less +5 -5
  24. package/es/eventSelector/types.d.ts +0 -4
  25. package/es/index.d.ts +2 -3
  26. package/es/index.js +2 -3
  27. package/es/mock/event.js +0 -214
  28. package/es/select/demo/index.js +4 -10
  29. package/es/select/demo/multiple.js +3 -10
  30. package/es/select/handle.js +2 -4
  31. package/es/select/index.d.ts +2 -2
  32. package/es/select/index.js +5 -7
  33. package/es/select/overlay.js +1 -1
  34. package/es/select/styles/handle.less +13 -23
  35. package/es/select/types.d.ts +1 -3
  36. package/es/userCondition/conditionTypeList.js +6 -29
  37. package/es/userCondition/conditionWrap.js +2 -4
  38. package/es/userCondition/conditions/eventCondition.js +4 -14
  39. package/es/userCondition/conditions/periodCondition.js +10 -20
  40. package/es/userCondition/conditions/propCondition.js +8 -28
  41. package/es/userCondition/conditions/runTimesCondition.js +2 -2
  42. package/es/userCondition/conditions/styles/eventCondition.less +7 -9
  43. package/es/userCondition/conditions/styles/periodCondition.less +0 -3
  44. package/es/userCondition/conditions/styles/propCondition.less +3 -3
  45. package/es/userCondition/conditions/styles/runTimesCondition.less +0 -3
  46. package/es/userCondition/demo/index.js +31 -234
  47. package/es/userCondition/index.d.ts +1 -1
  48. package/es/userCondition/index.js +9 -30
  49. package/es/userCondition/orConditions.js +28 -70
  50. package/es/userCondition/relationLabel.js +1 -6
  51. package/es/userCondition/styles/conditionTypeList.less +1 -1
  52. package/es/userCondition/styles/conditionWrap.less +0 -3
  53. package/es/userCondition/styles/index.less +1 -20
  54. package/es/userCondition/styles/orConditions.less +2 -20
  55. package/es/userCondition/styles/relationLabel.less +3 -4
  56. package/es/userCondition/types.d.ts +2 -21
  57. package/es/userCondition/util.d.ts +1 -5
  58. package/es/userCondition/util.js +0 -42
  59. package/es/utils/type.d.ts +2 -2
  60. package/package.json +2 -5
  61. package/es/assets/theme.d.ts +0 -15
  62. package/es/select/demo/children.d.ts +0 -2
  63. package/es/select/demo/children.js +0 -81
  64. package/es/userCondition/conditions/constants.d.ts +0 -21
  65. package/es/userCondition/conditions/constants.js +0 -21
  66. package/es/userCondition/conditions/styles/tagsCondition.less +0 -18
  67. package/es/userCondition/conditions/styles/textDesc.less +0 -17
  68. package/es/userCondition/conditions/tagsCondition.d.ts +0 -9
  69. package/es/userCondition/conditions/tagsCondition.js +0 -107
  70. package/es/userCondition/conditions/textDesc.d.ts +0 -9
  71. package/es/userCondition/conditions/textDesc.js +0 -197
  72. package/es/userTagsSelector/cascaderOverlay.d.ts +0 -5
  73. package/es/userTagsSelector/cascaderOverlay.js +0 -114
  74. package/es/userTagsSelector/components/search/index.d.ts +0 -8
  75. package/es/userTagsSelector/components/search/index.js +0 -16
  76. package/es/userTagsSelector/components/search/index.less +0 -6
  77. package/es/userTagsSelector/context.d.ts +0 -3
  78. package/es/userTagsSelector/context.js +0 -2
  79. package/es/userTagsSelector/demo/index.d.ts +0 -2
  80. package/es/userTagsSelector/demo/index.js +0 -48
  81. package/es/userTagsSelector/groups/groupOption.d.ts +0 -5
  82. package/es/userTagsSelector/groups/groupOption.js +0 -42
  83. package/es/userTagsSelector/groups/index.d.ts +0 -4
  84. package/es/userTagsSelector/groups/index.js +0 -86
  85. package/es/userTagsSelector/groups/styles/index.less +0 -0
  86. package/es/userTagsSelector/groups/styles/option.less +0 -50
  87. package/es/userTagsSelector/index.d.ts +0 -6
  88. package/es/userTagsSelector/index.js +0 -110
  89. package/es/userTagsSelector/multipleCheckPanel/checkOption.d.ts +0 -5
  90. package/es/userTagsSelector/multipleCheckPanel/checkOption.js +0 -45
  91. package/es/userTagsSelector/multipleCheckPanel/index.d.ts +0 -4
  92. package/es/userTagsSelector/multipleCheckPanel/index.js +0 -80
  93. package/es/userTagsSelector/multipleCheckPanel/styles/index.less +0 -0
  94. package/es/userTagsSelector/multipleCheckPanel/styles/option.less +0 -39
  95. package/es/userTagsSelector/styles/cascaderOverlay.less +0 -27
  96. package/es/userTagsSelector/styles/index.less +0 -10
  97. package/es/userTagsSelector/types.d.ts +0 -67
  98. package/es/userTagsSelector/types.js +0 -1
  99. package/es/userTagsSelector/util.d.ts +0 -4
  100. package/es/userTagsSelector/util.js +0 -38
@@ -24,15 +24,13 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
24
24
 
25
25
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
26
26
 
27
- import React, { useEffect, useMemo, useState } from 'react';
27
+ import React, { useEffect, useState } from 'react';
28
28
  import { PlusOutlined } from '@ant-design/icons';
29
29
  import BizConditionItem from '../../attrConditions';
30
30
  import './styles/propCondition.less';
31
31
  import { useContext } from 'react';
32
32
  import { BizUserConditionContext, classPrefix } from '..';
33
33
  import { transformNumberOperate } from '../util';
34
- import { PropType } from '../../attributeSelector/types';
35
- import BizGlobalDataContext from '../../context';
36
34
  var numAttrTypeMap = {
37
35
  1: 'cont-string',
38
36
  2: 'cont-num',
@@ -45,28 +43,19 @@ var attrNumTypeMap = {
45
43
  };
46
44
 
47
45
  var PropCondition = function PropCondition(props) {
48
- var _useContext = useContext(BizGlobalDataContext),
49
- eventEnvList = _useContext.eventEnvList;
50
-
51
- var _useContext2 = useContext(BizUserConditionContext),
52
- eventAttrNum = _useContext2.eventAttrNum;
46
+ var _useContext = useContext(BizUserConditionContext),
47
+ eventAttrNum = _useContext.eventAttrNum;
53
48
 
54
49
  var isEvent = props.isEvent,
55
50
  label = props.label,
56
51
  attrs = props.attrs,
57
- dataId = props.dataId,
58
- eventId = props.eventId;
52
+ dataId = props.dataId;
59
53
 
60
54
  var _useState = useState([]),
61
55
  _useState2 = _slicedToArray(_useState, 2),
62
56
  showList = _useState2[0],
63
57
  setShowList = _useState2[1];
64
58
 
65
- var envNames = useMemo(function () {
66
- return eventEnvList ? eventEnvList.map(function (env) {
67
- return env.name;
68
- }) : [];
69
- }, [eventEnvList]);
70
59
  useEffect(function () {
71
60
  buildDefault();
72
61
  }, []);
@@ -108,8 +97,8 @@ var PropCondition = function PropCondition(props) {
108
97
  var newAttr = {
109
98
  attrName: attrName,
110
99
  attrId: attrId,
111
- category: category || 'custom',
112
- operator: type === PropType.NUMBER ? transformNumberOperate(operator) : operator,
100
+ category: category,
101
+ operator: transformNumberOperate(operator),
113
102
  params: values,
114
103
  attrType: numAttrTypeMap[type]
115
104
  };
@@ -141,9 +130,7 @@ var PropCondition = function PropCondition(props) {
141
130
 
142
131
  function getPropCategory(attrName) {
143
132
  if (!isEvent) return 'userProp';
144
- if (attrName === undefined) return 'eventProp';
145
- if (envNames.includes(attrName)) return 'envProp';
146
- return 'eventProp';
133
+ return attrName === undefined ? 'eventProp' : 'envProp';
147
134
  }
148
135
 
149
136
  function renderAttr(item, i) {
@@ -169,10 +156,6 @@ var PropCondition = function PropCondition(props) {
169
156
  attrId && (props.defaultValue.attrId = attrId);
170
157
  }
171
158
 
172
- if (isEvent) {
173
- props.eventIdList = [eventId];
174
- }
175
-
176
159
  return /*#__PURE__*/React.createElement("div", {
177
160
  className: "".concat(classPrefix, "-prop-condition-attr"),
178
161
  key: id
@@ -188,10 +171,7 @@ var PropCondition = function PropCondition(props) {
188
171
  onDelete: function onDelete() {
189
172
  return onRemoveAttr(i);
190
173
  },
191
- enableDelete: isEvent,
192
- border: false,
193
- destroyPopupOnHide: true,
194
- theme: "normal"
174
+ enableDelete: isEvent
195
175
  }, props))));
196
176
  }
197
177
 
@@ -21,10 +21,10 @@ var options = [{
21
21
  text: '<'
22
22
  }, {
23
23
  value: '>=',
24
- text: '≥'
24
+ text: '>='
25
25
  }, {
26
26
  value: '<=',
27
- text: '≤'
27
+ text: '<='
28
28
  }, {
29
29
  value: 'not equal',
30
30
  text: '≠'
@@ -8,13 +8,10 @@
8
8
  flex: 1;
9
9
  }
10
10
  .biz-user-condition-event {
11
- width: 255px;
11
+ width: 355px;
12
12
  .biz-event-select-handle {
13
13
  border-top-right-radius: 0;
14
14
  border-bottom-right-radius: 0;
15
- .biz-select-handle-input {
16
- background-color: @background-color-gray;
17
- }
18
15
  }
19
16
  }
20
17
  &-times-period-wrap {
@@ -24,12 +21,14 @@
24
21
  display: flex;
25
22
  align-items: center;
26
23
  justify-content: center;
27
- width: 38px;
28
- height: 40px;
24
+ width: 30px;
25
+ height: 42px;
29
26
  margin-right: @margin-xs;
30
- margin-left: @border-radius-small;
31
- background-color: @background-color-gray;
27
+ border: 1px solid @border-color-base;
28
+ border-left: none;
32
29
  border-radius: @border-radius-small;
30
+ border-top-left-radius: 0;
31
+ border-bottom-left-radius: 0;
33
32
  cursor: pointer;
34
33
  }
35
34
  &-attrs {
@@ -41,7 +40,6 @@
41
40
  &-label {
42
41
  display: flex;
43
42
  align-items: center;
44
- min-width: 28px;
45
43
  height: 42px;
46
44
  margin-right: @margin-xs;
47
45
  }
@@ -7,9 +7,6 @@
7
7
  &-values,
8
8
  &-unit {
9
9
  margin-right: @margin-xs;
10
- > input {
11
- border: none !important;
12
- }
13
10
  }
14
11
  &-operator {
15
12
  width: 129px;
@@ -26,9 +26,9 @@
26
26
  display: flex;
27
27
  align-items: center;
28
28
  justify-content: center;
29
- width: 40px;
30
- height: 40px;
31
- background-color: @background-color-gray;
29
+ width: 30px;
30
+ height: 30px;
31
+ border: 1px solid @border-color-base;
32
32
  border-radius: @border-radius-sx;
33
33
  cursor: pointer;
34
34
  }
@@ -9,9 +9,6 @@
9
9
  &-value {
10
10
  width: 58px;
11
11
  margin-right: @margin-xs;
12
- > input {
13
- border: none !important;
14
- }
15
12
  }
16
13
  .biz-user-condition-runtimes-tip {
17
14
  color: @primary-color;
@@ -10,196 +10,11 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
10
10
 
11
11
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
12
 
13
- import React, { useEffect, useMemo, useState } from 'react';
13
+ import React, { useEffect, useState } from 'react';
14
14
  import eventData from '../../mock/event';
15
15
  import envData from '../../mock/env';
16
16
  import userData from '../../mock/user';
17
17
  import { BizUserCondition, BizGlobalDataContext, convertAttributeData } from '@zgfe/business-lib';
18
- var getTagList = Promise.resolve([{
19
- appId: 51,
20
- createTime: '2022-07-05T13:48:51',
21
- del: 0,
22
- id: 286,
23
- isInner: 0,
24
- isStartup: 0,
25
- labelGroup: '行为标签',
26
- labelId: 66284406603776,
27
- labelName: 'test8(新增)',
28
- labelStatus: 1,
29
- updateTime: '2022-07-05T13:48:51'
30
- }, {
31
- appId: 51,
32
- createTime: '2022-07-05T13:47:38',
33
- del: 0,
34
- id: 285,
35
- isInner: 0,
36
- isStartup: 0,
37
- labelGroup: '预测标签',
38
- labelId: 66283215683584,
39
- labelName: 'test7(新增)',
40
- labelStatus: 1,
41
- updateTime: '2022-07-05T13:47:38'
42
- }, {
43
- appId: 51,
44
- createTime: '2022-07-05T13:47:10',
45
- del: 0,
46
- id: 284,
47
- isInner: 0,
48
- isStartup: 0,
49
- labelGroup: '其他标签',
50
- labelId: 66282747314176,
51
- labelName: 'test6(新增)',
52
- labelStatus: 1,
53
- updateTime: '2022-07-05T13:47:10'
54
- }, {
55
- appId: 51,
56
- createTime: '2022-07-05T13:44:20',
57
- del: 0,
58
- id: 283,
59
- isInner: 0,
60
- isStartup: 0,
61
- labelGroup: '其他标签',
62
- labelId: 66279963361280,
63
- labelName: 'test5(新增)',
64
- labelStatus: 1,
65
- updateTime: '2022-07-05T13:44:20'
66
- }, {
67
- appId: 51,
68
- createTime: '2022-07-05T13:43:08',
69
- del: 0,
70
- id: 282,
71
- isInner: 0,
72
- isStartup: 0,
73
- labelGroup: '活跃标签',
74
- labelId: 66278784057344,
75
- labelName: 'test3(新增)',
76
- labelStatus: 1,
77
- updateTime: '2022-07-05T13:43:08'
78
- }, {
79
- appId: 51,
80
- createTime: '2022-07-05T13:42:44',
81
- del: 0,
82
- id: 281,
83
- isInner: 0,
84
- isStartup: 0,
85
- labelGroup: '其他标签',
86
- labelId: 66278393724928,
87
- labelName: 'test2(新增)',
88
- labelStatus: 1,
89
- updateTime: '2022-07-05T13:42:44'
90
- }, {
91
- appId: 51,
92
- createTime: '2022-07-05T13:42:30',
93
- del: 0,
94
- id: 280,
95
- isInner: 0,
96
- isStartup: 0,
97
- labelGroup: '预测标签',
98
- labelId: 66278158696448,
99
- labelName: 'test1(新增)',
100
- labelStatus: 1,
101
- updateTime: '2022-07-05T13:42:30'
102
- }, {
103
- appId: 51,
104
- createTime: '2022-06-21T15:04:24',
105
- del: 0,
106
- id: 277,
107
- isInner: 0,
108
- isStartup: 0,
109
- labelGroup: '活跃标签',
110
- labelId: 46540583010304,
111
- labelName: '匿名用户',
112
- labelStatus: 0,
113
- updateTime: '2022-06-21T15:04:24'
114
- }, {
115
- appId: 51,
116
- createTime: '2022-06-10T11:10:52',
117
- del: 0,
118
- id: 197,
119
- isInner: 0,
120
- isStartup: 0,
121
- labelGroup: '活跃标签',
122
- labelId: 77384417755136,
123
- labelName: '手动更新1',
124
- labelStatus: 0,
125
- updateTime: '2022-06-10T11:32:31'
126
- }, {
127
- appId: 51,
128
- createTime: '2022-06-10T11:10:36',
129
- del: 0,
130
- id: 196,
131
- isInner: 0,
132
- isStartup: 0,
133
- labelGroup: '活跃标签',
134
- labelId: 77383474429952,
135
- labelName: '自动更新修改',
136
- labelStatus: 0,
137
- updateTime: '2022-06-10T11:11:13'
138
- }, {
139
- appId: 51,
140
- createTime: '2022-06-10T10:49:57',
141
- del: 0,
142
- id: 191,
143
- isInner: 0,
144
- isStartup: 0,
145
- labelGroup: '基本标签',
146
- labelId: 77388914425856,
147
- labelName: '一般价值',
148
- labelStatus: 0,
149
- updateTime: '2022-06-10T10:49:57'
150
- }]);
151
- var data = {
152
- json: [[{
153
- attrs: [{
154
- attrId: 114,
155
- attrName: 'name',
156
- category: 'custom',
157
- operator: 'equal',
158
- params: ['Safari', 'Microsoft Edge', 'Apple WebKit'],
159
- attrType: 'cont-string'
160
- }]
161
- }, {
162
- eventId: 24143016,
163
- runTimes: {
164
- operator: '>=',
165
- values: ['1']
166
- },
167
- attrs: [{
168
- attrId: 30183431,
169
- attrName: '用户open_id',
170
- category: 'custom',
171
- operator: 'equal',
172
- params: ['Apple WebKit', 'Safari', 'Microsoft Edge', 'Unknown'],
173
- attrType: 'cont-string'
174
- }],
175
- runPeriod: {
176
- operator: 'relative',
177
- values: ['30', '0']
178
- }
179
- }], [{
180
- eventId: '-3',
181
- runPeriod: {
182
- operator: 'relative',
183
- values: ['30', '0']
184
- },
185
- runTimes: {
186
- operator: '>=',
187
- values: ['1']
188
- },
189
- attrs: []
190
- }, {
191
- eventId: '-4',
192
- runPeriod: {
193
- operator: 'relative',
194
- values: ['30', '1']
195
- },
196
- runTimes: {
197
- operator: '>=',
198
- values: ['1']
199
- },
200
- attrs: []
201
- }]]
202
- };
203
18
  export default (function () {
204
19
  var _useState = useState({
205
20
  eventGroupList: [],
@@ -209,11 +24,6 @@ export default (function () {
209
24
  _useState2 = _slicedToArray(_useState, 2),
210
25
  setStore = _useState2[1];
211
26
 
212
- var _useState3 = useState([]),
213
- _useState4 = _slicedToArray(_useState3, 2),
214
- userTagsData = _useState4[0],
215
- setUserTagsData = _useState4[1];
216
-
217
27
  var newStore = convertAttributeData({
218
28
  eventList: eventData,
219
29
  userPropList: userData,
@@ -222,55 +32,42 @@ export default (function () {
222
32
  useEffect(function () {
223
33
  setStore(newStore);
224
34
  }, []);
225
- useEffect(function () {
226
- var tagsMap = {};
227
- getTagList.then(function (list) {
228
- var data = [];
229
- list.forEach(function (item) {
230
- var labelGroup = item.labelGroup;
231
-
232
- if (tagsMap[labelGroup]) {
233
- tagsMap[labelGroup].push(item);
234
- } else {
235
- tagsMap[labelGroup] = [item];
236
- data.push({
237
- labelGroup: labelGroup,
238
- children: tagsMap[labelGroup]
239
- });
240
- }
241
- });
242
- setUserTagsData(data);
243
- });
244
- }, []);
245
- var defaultValue = useMemo(function () {
246
- return data.json;
247
- }, [data]);
248
35
 
249
- function onChange(value) {
250
- console.log(JSON.stringify(value));
36
+ function onChange(data) {
37
+ console.log(JSON.stringify(data));
251
38
  }
252
39
 
253
- var descDom = /*#__PURE__*/React.createElement(BizUserCondition, {
254
- defaultValue: defaultValue,
255
- onChange: onChange,
256
- eventAttrNum: 3,
257
- openTagCondition: true,
258
- userTagsData: userTagsData,
259
- isRealTime: true
260
- });
40
+ var defaultValue = [[{
41
+ eventId: 7086293,
42
+ runTimes: {
43
+ operator: '>=',
44
+ values: ['1']
45
+ },
46
+ attrs: [{
47
+ attrId: 30183425,
48
+ operator: '=',
49
+ params: ['Apple WebKit', 'Unknown'],
50
+ attrType: 'cont-string'
51
+ }, {
52
+ attrId: 5461057,
53
+ operator: '>',
54
+ params: ['123'],
55
+ attrType: 'cont-num'
56
+ }],
57
+ runPeriod: {
58
+ operator: 'relative',
59
+ values: ['30', '0']
60
+ }
61
+ }]];
261
62
  return /*#__PURE__*/React.createElement(BizGlobalDataContext.Provider, {
262
63
  value: {
263
64
  eventGroupList: newStore.eventGroupList,
264
65
  userPropList: newStore.userPropList,
265
- eventEnvList: newStore.envPropList,
266
- currentApp: {
267
- appId: 160,
268
- platform: 0
269
- }
66
+ eventEnvList: newStore.envPropList
270
67
  }
271
- }, /*#__PURE__*/React.createElement("div", {
272
- style: {
273
- display: 'inline-block'
274
- }
275
- }, descDom));
68
+ }, /*#__PURE__*/React.createElement(BizUserCondition, {
69
+ defaultValue: defaultValue,
70
+ onChange: onChange,
71
+ eventAttrNum: 3
72
+ }));
276
73
  });
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { BizUserConditionT } from './types';
3
3
  import './styles/index.less';
4
- export declare const BizUserConditionContext: React.Context<Pick<BizUserConditionT.PropsI, "textMode" | "openTagCondition" | "orConditionNum" | "eventAttrNum" | "userTagsData" | "isRealTime">>;
4
+ export declare const BizUserConditionContext: React.Context<Pick<BizUserConditionT.PropsI, "eventAttrNum" | "orConditionNum">>;
5
5
  export declare const classPrefix = "biz-user-condition";
6
6
  declare const BizUserCondition: React.FC<BizUserConditionT.PropsI>;
7
7
  export default BizUserCondition;
@@ -24,21 +24,15 @@ import RelationLabel from './relationLabel';
24
24
  import OrConditions from './orConditions';
25
25
  import './styles/index.less';
26
26
  import { buildCondition } from './util';
27
- import _ from 'lodash';
28
27
  export var BizUserConditionContext = /*#__PURE__*/createContext({
29
28
  orConditionNum: 2,
30
- eventAttrNum: 1,
31
- textMode: false,
32
- openTagCondition: false,
33
- userTagsData: []
29
+ eventAttrNum: 1
34
30
  });
35
31
  export var classPrefix = 'biz-user-condition';
36
32
 
37
33
  var BizUserCondition = function BizUserCondition(props) {
38
34
  var andConditionNum = props.andConditionNum,
39
- defaultValue = props.defaultValue,
40
- openTagCondition = props.openTagCondition,
41
- userTagsData = props.userTagsData;
35
+ defaultValue = props.defaultValue;
42
36
 
43
37
  var _useState = useState([]),
44
38
  _useState2 = _slicedToArray(_useState, 2),
@@ -50,13 +44,7 @@ var BizUserCondition = function BizUserCondition(props) {
50
44
  dataList = _useState4[0],
51
45
  setDataList = _useState4[1];
52
46
 
53
- var _useState5 = useState(function () {
54
- if (defaultValue) {
55
- return _.cloneDeep(defaultValue);
56
- }
57
-
58
- return [];
59
- }),
47
+ var _useState5 = useState(defaultValue || []),
60
48
  _useState6 = _slicedToArray(_useState5, 2),
61
49
  value = _useState6[0],
62
50
  setValue = _useState6[1];
@@ -67,7 +55,7 @@ var BizUserCondition = function BizUserCondition(props) {
67
55
 
68
56
  function initShowList() {
69
57
  var showList = [];
70
- value.forEach(function (item) {
58
+ defaultValue.forEach(function (item) {
71
59
  showList.push({
72
60
  id: Math.random(),
73
61
  orConditions: item
@@ -118,17 +106,13 @@ var BizUserCondition = function BizUserCondition(props) {
118
106
 
119
107
  setValue(newValue);
120
108
  setDataList(newDataList);
121
- props.onChange && props.onChange(newValue);
109
+ props.onChange(newValue);
122
110
  }
123
111
 
124
112
  return /*#__PURE__*/React.createElement(BizUserConditionContext.Provider, {
125
113
  value: {
126
114
  orConditionNum: props.orConditionNum || 2,
127
- eventAttrNum: props.eventAttrNum || 1,
128
- textMode: props.textMode,
129
- openTagCondition: openTagCondition,
130
- userTagsData: userTagsData !== null && userTagsData !== void 0 ? userTagsData : [],
131
- isRealTime: props.isRealTime
115
+ eventAttrNum: props.eventAttrNum || 1
132
116
  }
133
117
  }, /*#__PURE__*/React.createElement("div", {
134
118
  className: classPrefix
@@ -137,10 +121,9 @@ var BizUserCondition = function BizUserCondition(props) {
137
121
  }, /*#__PURE__*/React.createElement(RelationLabel, {
138
122
  show: value.length >= 2
139
123
  }, "\u4E14"), showList.length ? /*#__PURE__*/React.createElement("div", {
140
- className: ["".concat(classPrefix, "-and-conditions-wrap"), props.textMode ? 'text-mode' : ''].join(' ')
141
- }, showList.map(function (item, i) {
124
+ className: "".concat(classPrefix, "-and-conditions-wrap")
125
+ }, showList.map(function (item) {
142
126
  return /*#__PURE__*/React.createElement(OrConditions, {
143
- showAndDesc: i > 0,
144
127
  orConditions: item.orConditions,
145
128
  key: item.id,
146
129
  onChange: function onChange(data) {
@@ -155,10 +138,6 @@ var BizUserCondition = function BizUserCondition(props) {
155
138
  };
156
139
 
157
140
  BizUserCondition.defaultProps = {
158
- andConditionNum: 5,
159
- textMode: false,
160
- openTagCondition: false,
161
- userTagsData: [],
162
- isRealTime: false
141
+ andConditionNum: 5
163
142
  };
164
143
  export default BizUserCondition;