@zgfe/modules-attribution 1.0.2-alpha.5 → 1.0.2-alpha.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,6 +1,8 @@
1
1
  .table-list {
2
2
  margin-top: 25px;
3
- margin-bottom: 40px;
3
+ .ant-table-wrapper{
4
+ margin-bottom: 40px;
5
+ }
4
6
  &-empty-tips {
5
7
  margin-top: 112px;
6
8
  text-align: center;
@@ -5,3 +5,7 @@ export declare const chartTypes: {
5
5
  value: string;
6
6
  }[];
7
7
  export declare const searchFields: SearchPanelTypes.FieldProp[];
8
+ export declare const attributionTypeTooltips: {
9
+ text: string;
10
+ title: string;
11
+ }[];
@@ -29,4 +29,17 @@ export var searchFields = [{
29
29
  max: 5,
30
30
  addLabel: '添加属性',
31
31
  required: false
32
+ }];
33
+ export var attributionTypeTooltips = [{
34
+ text: '首次触点归因',
35
+ title: '完成目标事件的「待归因事件」中,第一个「待归因事件」贡献为100%'
36
+ }, {
37
+ text: '末次触点归因',
38
+ title: '完成目标事件的「待归因事件」中,最后一个「待归因事件」贡献为100%'
39
+ }, {
40
+ text: '线性归因',
41
+ title: '完成目标事件的「待归因事件」中,所有「待归因事件」平均分配贡献'
42
+ }, {
43
+ text: '位置归因',
44
+ title: '完成目标事件的「待归因事件」中,首位和末位「待归因事件」各获40%贡献,其余「待归因事件」平分20%贡献'
32
45
  }];
@@ -16,7 +16,7 @@ import GlobalAttribute from './components/globalAttribute';
16
16
  import './styles/index.less';
17
17
  import _ from 'lodash';
18
18
  import { targetChangeCallback, operableOrNotHandle } from './utils';
19
- import { searchFields } from '../../constants/fields';
19
+ import { searchFields, attributionTypeTooltips } from '../../constants/fields';
20
20
  import { AttributableContext } from '../../types';
21
21
  export var classPrefix = 'form-box';
22
22
  var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
@@ -173,6 +173,16 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
173
173
  _useState24 = _slicedToArray(_useState23, 2),
174
174
  windowType = _useState24[0],
175
175
  setWindowType = _useState24[1];
176
+ var attributionTypeTooltip = function attributionTypeTooltip(type) {
177
+ return /*#__PURE__*/React.createElement(Tooltip, {
178
+ overlayClassName: "attribution-type-tooltip ".concat(type === 2 || type === 3 ? 'attribution-type-tooltip-distance' : ''),
179
+ placement: "right",
180
+ getPopupContainer: function getPopupContainer() {
181
+ return document.getElementById('attribution-type');
182
+ },
183
+ title: attributionTypeTooltips[type].title
184
+ }, attributionTypeTooltips[type].text);
185
+ };
176
186
  return /*#__PURE__*/React.createElement("div", {
177
187
  className: classPrefix
178
188
  }, /*#__PURE__*/React.createElement("p", {
@@ -270,7 +280,8 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
270
280
  color: 'red'
271
281
  }
272
282
  }, "* "), "\u5F52\u56E0\u6A21\u578B"), /*#__PURE__*/React.createElement("div", {
273
- className: "".concat(classPrefix, "-bottom-form")
283
+ className: "".concat(classPrefix, "-bottom-form"),
284
+ id: "attribution-type"
274
285
  }, /*#__PURE__*/React.createElement("p", {
275
286
  className: "p"
276
287
  }, "\u5206\u6790\u6A21\u578B"), /*#__PURE__*/React.createElement(Form.Item, {
@@ -281,6 +292,9 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
281
292
  }]
282
293
  }, /*#__PURE__*/React.createElement(Select, {
283
294
  className: "attribution-type",
295
+ getPopupContainer: function getPopupContainer() {
296
+ return document.getElementById('attribution-type');
297
+ },
284
298
  placeholder: "\u8BF7\u9009\u62E9",
285
299
  style: {
286
300
  width: 208
@@ -293,28 +307,16 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
293
307
  }),
294
308
  options: [{
295
309
  value: 1,
296
- label: /*#__PURE__*/React.createElement(Tooltip, {
297
- placement: "right",
298
- title: "\u5B8C\u6210\u76EE\u6807\u4E8B\u4EF6\u7684\u300C\u5F85\u5F52\u56E0\u4E8B\u4EF6\u300D\u4E2D\uFF0C\u7B2C\u4E00\u4E2A\u300C\u5F85\u5F52\u56E0\u4E8B\u4EF6\u300D\u8D21\u732E\u4E3A100%"
299
- }, "\u9996\u6B21\u89E6\u70B9\u5F52\u56E0")
310
+ label: attributionTypeTooltip(0)
300
311
  }, {
301
312
  value: 2,
302
- label: /*#__PURE__*/React.createElement(Tooltip, {
303
- placement: "right",
304
- title: "\u5B8C\u6210\u76EE\u6807\u4E8B\u4EF6\u7684\u300C\u5F85\u5F52\u56E0\u4E8B\u4EF6\u300D\u4E2D\uFF0C\u6700\u540E\u4E00\u4E2A\u300C\u5F85\u5F52\u56E0\u4E8B\u4EF6\u300D\u8D21\u732E\u4E3A100%"
305
- }, "\u672B\u6B21\u89E6\u70B9\u5F52\u56E0")
313
+ label: attributionTypeTooltip(1)
306
314
  }, {
307
315
  value: 3,
308
- label: /*#__PURE__*/React.createElement(Tooltip, {
309
- placement: "right",
310
- title: "\u5B8C\u6210\u76EE\u6807\u4E8B\u4EF6\u7684\u300C\u5F85\u5F52\u56E0\u4E8B\u4EF6\u300D\u4E2D\uFF0C\u6240\u6709\u300C\u5F85\u5F52\u56E0\u4E8B\u4EF6\u300D\u5E73\u5747\u5206\u914D\u8D21\u732E"
311
- }, "\u7EBF\u6027\u5F52\u56E0")
316
+ label: attributionTypeTooltip(2)
312
317
  }, {
313
318
  value: 4,
314
- label: /*#__PURE__*/React.createElement(Tooltip, {
315
- placement: "right",
316
- title: "\u5B8C\u6210\u76EE\u6807\u4E8B\u4EF6\u7684\u300C\u5F85\u5F52\u56E0\u4E8B\u4EF6\u300D\u4E2D\uFF0C\u9996\u4F4D\u548C\u672B\u4F4D\u300C\u5F85\u5F52\u56E0\u4E8B\u4EF6\u300D\u5404\u83B740%\u8D21\u732E\uFF0C\u5176\u4F59\u300C\u5F85\u5F52\u56E0\u4E8B\u4EF6\u300D\u5E73\u520620%\u8D21\u732E"
317
- }, "\u4F4D\u7F6E\u5F52\u56E0")
319
+ label: attributionTypeTooltip(3)
318
320
  }]
319
321
  })), /*#__PURE__*/React.createElement("p", {
320
322
  className: "p"
@@ -40,6 +40,21 @@
40
40
  margin: 0 16px;
41
41
  }
42
42
  }
43
+
44
+ #attribution-type{
45
+ position: relative;
46
+ .ant-select-dropdown{
47
+ z-index: 998;
48
+ }
49
+ .attribution-type-tooltip {
50
+ z-index: 999;
51
+ left: 200px!important;
52
+ &-distance{
53
+ left: 170px!important;
54
+ }
55
+ }
56
+ }
57
+
43
58
  &-otherEvent {
44
59
  color: #021429;
45
60
  font-size: 14px;
@@ -206,7 +221,4 @@
206
221
  margin-top: -14px;
207
222
  color: #fb5547;
208
223
  }
209
- }
210
- .attribution-type-options {
211
-
212
- }
224
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-attribution",
3
- "version": "1.0.2-alpha.5",
3
+ "version": "1.0.2-alpha.7",
4
4
  "module": "es/index.js",
5
5
  "typings": "es/index.d.ts",
6
6
  "files": [
@@ -50,5 +50,5 @@
50
50
  "react": "^16.12.0 || ^17.0.0",
51
51
  "yorkie": "^2.0.0"
52
52
  },
53
- "gitHead": "c3b7a19eae94d358b04dfd7d40f6b01ed9d74d80"
53
+ "gitHead": "3741b5f2463a0f51be9ab9a83d12c8e6b15a7869"
54
54
  }