@zgfe/modules-attribution 1.0.2-alpha.5 → 1.0.2-alpha.6

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, {
@@ -293,28 +304,16 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
293
304
  }),
294
305
  options: [{
295
306
  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")
307
+ label: attributionTypeTooltip(0)
300
308
  }, {
301
309
  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")
310
+ label: attributionTypeTooltip(1)
306
311
  }, {
307
312
  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")
313
+ label: attributionTypeTooltip(2)
312
314
  }, {
313
315
  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")
316
+ label: attributionTypeTooltip(3)
318
317
  }]
319
318
  })), /*#__PURE__*/React.createElement("p", {
320
319
  className: "p"
@@ -40,6 +40,17 @@
40
40
  margin: 0 16px;
41
41
  }
42
42
  }
43
+
44
+ #attribution-type{
45
+ position: relative;
46
+ .attribution-type-tooltip {
47
+ left: 200px!important;
48
+ &-distance{
49
+ left: 170px!important;
50
+ }
51
+ }
52
+ }
53
+
43
54
  &-otherEvent {
44
55
  color: #021429;
45
56
  font-size: 14px;
@@ -206,7 +217,4 @@
206
217
  margin-top: -14px;
207
218
  color: #fb5547;
208
219
  }
209
- }
210
- .attribution-type-options {
211
-
212
- }
220
+ }
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.6",
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": "91105cd64e8ea5ae05c94085e1b2bc4ad1e1cc2b"
54
54
  }