@zgfe/modules-attribution 1.0.2-alpha.1 → 1.0.2-alpha.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.
@@ -106,6 +106,8 @@ var AttributionContent = /*#__PURE__*/React.forwardRef(function (props, ref) {
106
106
  };
107
107
  return /*#__PURE__*/React.createElement("div", {
108
108
  className: classPrefix
109
+ }, /*#__PURE__*/React.createElement("div", {
110
+ className: "".concat(classPrefix, "-top-content")
109
111
  }, /*#__PURE__*/React.createElement("div", {
110
112
  className: "".concat(classPrefix, "-top-content-box")
111
113
  }, /*#__PURE__*/React.createElement(SearchPanel, {
@@ -113,7 +115,7 @@ var AttributionContent = /*#__PURE__*/React.forwardRef(function (props, ref) {
113
115
  defaultValue: searchData,
114
116
  onChange: onChangeSearch,
115
117
  resetTime: resetTime
116
- })), /*#__PURE__*/React.createElement("div", {
118
+ }))), /*#__PURE__*/React.createElement("div", {
117
119
  className: "".concat(classPrefix, "-bottom-content-box")
118
120
  }, /*#__PURE__*/React.createElement("div", {
119
121
  className: "".concat(classPrefix, "-bottom-content-box-times")
@@ -14,20 +14,24 @@
14
14
  font-weight: 500;
15
15
  font-size: 16px;
16
16
  line-height: 48px;
17
- border-bottom: 1px solid #f2f3f4;
18
17
  }
19
18
  &-content {
20
19
  width: 100%;
21
20
  height: 100%;
22
21
  // overflow: auto;
23
22
  overflow-x: hidden;
24
- background: #fafafb;
23
+ background: #fff;
25
24
  border-top: 1px solid #eaeaea;
26
25
  .attribution-content {
27
- &-top-content-box {
28
- margin: 16px 24px;
29
- padding: 24px;
30
- background: #fff;
26
+ &-top-content {
27
+ background: #fafafb;
28
+ padding: 16px 24px;
29
+ &-box{
30
+ padding: 24px;
31
+ background: #fff;
32
+ border: 1px solid #ECEDF0;
33
+ border-radius: 8px;
34
+ }
31
35
  }
32
36
  &-bottom-content-box {
33
37
  min-height: 382px;
@@ -102,6 +102,10 @@ var AttributableEvents = function AttributableEvents(props) {
102
102
  var onEventDelete = function onEventDelete() {
103
103
  if (formData && formData.sourceFilters.length <= 1) {
104
104
  setReasonData(undefined);
105
+ setAttrSelectShow(false);
106
+ setFilters(undefined);
107
+ setIsAdd(false);
108
+ setBizAttributeSelectorValue(undefined);
105
109
  onChangeHandle(undefined, undefined, undefined);
106
110
  return;
107
111
  }
@@ -264,7 +268,9 @@ var AttributableEvents = function AttributableEvents(props) {
264
268
  onClick: function onClick() {
265
269
  return onAdd();
266
270
  }
267
- })))), /*#__PURE__*/React.createElement("div", null, (filters || isAdd) && /*#__PURE__*/React.createElement(BizAttrConditionGroup, {
271
+ })))), /*#__PURE__*/React.createElement("div", null, (filters || isAdd) && /*#__PURE__*/React.createElement("div", {
272
+ className: "".concat(count > 0 ? 'attr-box-show' : '')
273
+ }, /*#__PURE__*/React.createElement(BizAttrConditionGroup, {
268
274
  ref: conditionRef,
269
275
  value: filters,
270
276
  onlyAnd: true,
@@ -273,6 +279,6 @@ var AttributableEvents = function AttributableEvents(props) {
273
279
  eventIdList: [eventId],
274
280
  onChange: onChangeFilters,
275
281
  onConditionsCount: setCount
276
- })));
282
+ }))));
277
283
  };
278
284
  export default AttributableEvents;
@@ -7,7 +7,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import { BizAttrConditionGroup, IconFont } from '@zgfe/business-lib';
8
8
  import React, { useEffect, useRef, useState } from 'react';
9
9
  var GlobalAttribute = function GlobalAttribute(props) {
10
- var classPrefix = 'mi-left-form';
10
+ var classPrefix = 'form-box';
11
11
  var max = props.max,
12
12
  onChange = props.onChange,
13
13
  setAttrGlobalCount = props.setAttrGlobalCount;
@@ -33,13 +33,15 @@ var GlobalAttribute = function GlobalAttribute(props) {
33
33
  }
34
34
  }, [props.eventIdList, props.value]);
35
35
  var onAdd = function onAdd() {
36
- if (props.eventIdList[0] === -100) return;
36
+ if (props.eventIdList && props.eventIdList.length <= 0 || props.eventIdList[0] === -100) return;
37
37
  conditionRef.current.add();
38
38
  };
39
39
  useEffect(function () {
40
40
  setAttrGlobalCount(count);
41
41
  }, [count]);
42
- return /*#__PURE__*/React.createElement("div", null, props.eventIdList && props.eventIdList[0] === -100 ? '' : /*#__PURE__*/React.createElement(BizAttrConditionGroup, {
42
+ return /*#__PURE__*/React.createElement("div", null, props.eventIdList && props.eventIdList[0] === -100 ? '' : /*#__PURE__*/React.createElement("div", {
43
+ className: "".concat(count > 0 ? 'attr-box-show' : '')
44
+ }, /*#__PURE__*/React.createElement(BizAttrConditionGroup, {
43
45
  ref: conditionRef,
44
46
  value: props.value,
45
47
  onlyAnd: true,
@@ -48,7 +50,7 @@ var GlobalAttribute = function GlobalAttribute(props) {
48
50
  eventIdList: props.eventIdList,
49
51
  onChange: onChange,
50
52
  onConditionsCount: setCount
51
- }), count < max && /*#__PURE__*/React.createElement("div", {
53
+ })), count < max && /*#__PURE__*/React.createElement("div", {
52
54
  className: "".concat(classPrefix, "-add ").concat(props.eventIdList && props.eventIdList.length <= 0 ? 'disabled' : ''),
53
55
  onClick: onAdd
54
56
  }, /*#__PURE__*/React.createElement(IconFont, {
@@ -147,7 +147,9 @@ var TargetEvent = function TargetEvent(props) {
147
147
  onClick: function onClick() {
148
148
  return onAdd();
149
149
  }
150
- }))), /*#__PURE__*/React.createElement("div", null, (filters || isAdd) && /*#__PURE__*/React.createElement(BizAttrConditionGroup, {
150
+ }))), /*#__PURE__*/React.createElement("div", null, (filters || isAdd) && /*#__PURE__*/React.createElement("div", {
151
+ className: "".concat(count > 0 ? 'attr-box-show' : '')
152
+ }, /*#__PURE__*/React.createElement(BizAttrConditionGroup, {
151
153
  ref: conditionRef,
152
154
  value: undefined,
153
155
  onlyAnd: true,
@@ -156,6 +158,6 @@ var TargetEvent = function TargetEvent(props) {
156
158
  eventIdList: [eventId],
157
159
  onChange: onChangeFilters,
158
160
  onConditionsCount: setCount
159
- })));
161
+ }))));
160
162
  };
161
163
  export default TargetEvent;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { SearchPanelTypes } from './types';
3
3
  import './styles/index.less';
4
- export declare const classPrefix = "mi-left-form";
4
+ export declare const classPrefix = "form-box";
5
5
  declare const SearchPanel: React.ForwardRefExoticComponent<SearchPanelTypes.Props & React.RefAttributes<any>>;
6
6
  export default SearchPanel;
@@ -18,7 +18,7 @@ import _ from 'lodash';
18
18
  import { targetChangeCallback, operableOrNotHandle } from './utils';
19
19
  import { searchFields } from '../../constants/fields';
20
20
  import { AttributableContext } from '../../types';
21
- export var classPrefix = 'mi-left-form';
21
+ export var classPrefix = 'form-box';
22
22
  var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
23
23
  var defaultValue = props.defaultValue,
24
24
  resetTime = props.resetTime;
@@ -175,7 +175,9 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
175
175
  setWindowType = _useState24[1];
176
176
  return /*#__PURE__*/React.createElement("div", {
177
177
  className: classPrefix
178
- }, /*#__PURE__*/React.createElement(Skeleton, {
178
+ }, /*#__PURE__*/React.createElement("p", {
179
+ className: "".concat(classPrefix, "-bottom-form-title")
180
+ }, "\u9009\u62E9\u4E8B\u4EF6"), /*#__PURE__*/React.createElement(Skeleton, {
179
181
  loading: loading,
180
182
  active: true,
181
183
  paragraph: {
@@ -189,9 +191,10 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
189
191
  }, searchFields.map(function (item) {
190
192
  if (item.type === 'globalFilters') {
191
193
  return /*#__PURE__*/React.createElement(Form.Item, {
192
- key: item.key
194
+ key: item.key,
195
+ className: "".concat(classPrefix, "-form-item")
193
196
  }, /*#__PURE__*/React.createElement(Form.Item, {
194
- className: "".concat(classPrefix, "-title")
197
+ className: "".concat(classPrefix, "-title global-attr")
195
198
  }, item.label), /*#__PURE__*/React.createElement(Form.Item, {
196
199
  className: "".concat(classPrefix, "-item"),
197
200
  name: item.name
@@ -208,6 +211,7 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
208
211
  var add = _ref.add,
209
212
  remove = _ref.remove;
210
213
  return /*#__PURE__*/React.createElement(Form.Item, {
214
+ className: "".concat(classPrefix, "-form-item"),
211
215
  key: "".concat(item.key, "-item-").concat(index)
212
216
  }, /*#__PURE__*/React.createElement(Form.Item, {
213
217
  className: "".concat(classPrefix, "-title")
@@ -216,7 +220,7 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
216
220
  color: 'red'
217
221
  }
218
222
  }, "* "), item.label, /*#__PURE__*/React.createElement(Tooltip, {
219
- placement: "left",
223
+ placement: "right",
220
224
  title: item.tips
221
225
  }, /*#__PURE__*/React.createElement(IconFont, {
222
226
  type: "tishiicon"
@@ -281,6 +285,12 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
281
285
  style: {
282
286
  width: 208
283
287
  },
288
+ suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
289
+ type: "xiangxia",
290
+ style: {
291
+ color: '#021429'
292
+ }
293
+ }),
284
294
  options: [{
285
295
  value: 1,
286
296
  label: '首次触点归因'
@@ -307,6 +317,12 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
307
317
  style: {
308
318
  width: 208
309
319
  },
320
+ suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
321
+ type: "xiangxia",
322
+ style: {
323
+ color: '#021429'
324
+ }
325
+ }),
310
326
  onChange: function onChange(e) {
311
327
  setWindowType(e);
312
328
  e === 1 ? setWindowCnt(-1) : setWindowCnt(1);
@@ -338,6 +354,12 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
338
354
  onChange: function onChange(e) {
339
355
  return setwindowTypeUnit(e);
340
356
  },
357
+ suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
358
+ type: "xiangxia",
359
+ style: {
360
+ color: '#021429'
361
+ }
362
+ }),
341
363
  options: [{
342
364
  value: 'day',
343
365
  label: '天'
@@ -357,6 +379,6 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
357
379
  onClick: function onClick() {
358
380
  return onFinish(true);
359
381
  }
360
- }, "\u63D0\u4EA4")))));
382
+ }, "\u67E5\u8BE2")))));
361
383
  });
362
384
  export default SearchPanel;
@@ -1,6 +1,16 @@
1
1
  @import '~@zgfe/business-lib/es/assets/styles/inner.less';
2
2
 
3
- .mi-left-form {
3
+ .form-box {
4
+ .xiangxia{
5
+ font-size: 14px!important;
6
+ }
7
+ &-form-item{
8
+ margin-bottom: 16px;
9
+ .attr-box-show{
10
+ margin-top: 12px;
11
+ }
12
+ }
13
+
4
14
  &-bottom-form-title {
5
15
  margin-top: 34px;
6
16
  margin-bottom: 16px;
@@ -71,13 +81,12 @@
71
81
  }
72
82
 
73
83
  &-item.ant-form-item {
74
- margin-bottom: 12px;
84
+ margin-bottom: 0px;
75
85
  }
76
86
 
77
87
  &-add {
78
88
  width: fit-content;
79
89
  height: 20px;
80
- margin-top: 8px;
81
90
  color: #165dff;
82
91
  font-size: 14px;
83
92
  line-height: 20px;
@@ -97,6 +106,10 @@
97
106
  }
98
107
  }
99
108
 
109
+ .global-attr{
110
+ margin-bottom: 0!important;
111
+ }
112
+
100
113
  .biz-condition-item-input {
101
114
  border-color: transparent;
102
115
  }
@@ -106,8 +119,8 @@
106
119
  }
107
120
  .attributable-events-box {
108
121
  .select-and-attr {
109
- display: flex;
110
122
  margin-bottom: 12px;
123
+ display: flex;
111
124
  .ant-dropdown-trigger {
112
125
  width: 208px;
113
126
  margin-right: 16px;
@@ -128,18 +141,13 @@
128
141
  right: 40px;
129
142
  }
130
143
  }
131
- // .biz-attr-select-handle:hover{
132
- // .xiangxia{
133
- // display: none;
134
- // }
135
- // }
136
144
  }
137
145
  .button-box {
138
146
  .qingchu,
139
147
  .tianjia2,
140
148
  .shaixuan {
141
149
  margin-top: 2px;
142
- margin-right: 20px;
150
+ margin-right: 16px;
143
151
  // color: #CCD0D4;
144
152
  color: #9aa1a9;
145
153
  font-size: 20px !important;
@@ -162,7 +170,6 @@
162
170
  .target-events-box {
163
171
  .selector-content {
164
172
  display: flex;
165
- margin-bottom: 12px;
166
173
  .ant-dropdown-trigger {
167
174
  width: 208px;
168
175
  margin-right: 16px;
@@ -175,7 +182,7 @@
175
182
  }
176
183
  }
177
184
  .shaixuan {
178
- margin: 2px 0 0 20px;
185
+ margin: 2px 0 0 16px;
179
186
  color: #9aa1a9;
180
187
  font-size: 20px !important;
181
188
  cursor: pointer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-attribution",
3
- "version": "1.0.2-alpha.1",
3
+ "version": "1.0.2-alpha.3",
4
4
  "module": "es/index.js",
5
5
  "typings": "es/index.d.ts",
6
6
  "files": [
@@ -37,7 +37,7 @@
37
37
  "@types/lodash": "^4.14.191",
38
38
  "@umijs/fabric": "^2.8.1",
39
39
  "@umijs/test": "^3.0.5",
40
- "@zgfe/business-lib": "1.1.41-attribution.11",
40
+ "@zgfe/business-lib": "1.1.41-attribution.16",
41
41
  "antd": "^4.22.6",
42
42
  "dumi": "^1.1.0",
43
43
  "echarts": "^5.3.2",
@@ -50,5 +50,5 @@
50
50
  "react": "^16.12.0 || ^17.0.0",
51
51
  "yorkie": "^2.0.0"
52
52
  },
53
- "gitHead": "06f899b8b276b467b3bc18082b4e8ce6d7af90b9"
53
+ "gitHead": "1f756584bf9a984a8017f88908113edf14ee5286"
54
54
  }