@zgfe/modules-attribution 1.0.1-alpha.23 → 1.0.1-alpha.25

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.
@@ -2,6 +2,7 @@ import React, { useContext } from 'react';
2
2
  import { Table } from 'antd';
3
3
  import './styles/index.less';
4
4
  import { AttributableContext } from '../../types';
5
+ import empty from '../../images/empty.png';
5
6
  var TableList = function TableList(props) {
6
7
  var classPrefix = 'table-list';
7
8
  var tableDataList = props.tableDataList,
@@ -10,9 +11,11 @@ var TableList = function TableList(props) {
10
11
  searching = _useContext.searching;
11
12
  return /*#__PURE__*/React.createElement("div", {
12
13
  className: classPrefix
13
- }, !tableDataList.dataSource && !searching && /*#__PURE__*/React.createElement("p", {
14
+ }, !tableDataList.dataSource && !searching && /*#__PURE__*/React.createElement("div", {
14
15
  className: "".concat(classPrefix, "-empty-tips")
15
- }, "\u8BF7\u9009\u62E9\u6761\u4EF6\u8FDB\u884C\u67E5\u8BE2"), (tableDataList.dataSource || searching) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Table, {
16
+ }, /*#__PURE__*/React.createElement("img", {
17
+ src: empty
18
+ }), /*#__PURE__*/React.createElement("p", null, "\u8BF7\u9009\u62E9\u6761\u4EF6\u8FDB\u884C\u67E5\u8BE2")), (tableDataList.dataSource || searching) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Table, {
16
19
  dataSource: tableDataList.dataSource,
17
20
  columns: tableDataList.columns,
18
21
  rowKey: "key",
@@ -1,7 +1,15 @@
1
1
  .table-list {
2
2
  margin-top: 25px;
3
3
  &-empty-tips {
4
- margin-top: 150px;
4
+ margin-top: 112px;
5
5
  text-align: center;
6
+ img{
7
+ width: 88px;
8
+ height: 88px;
9
+ }
10
+ p{
11
+ color: #354354;
12
+ line-height: 20px;
13
+ }
6
14
  }
7
15
  }
Binary file
@@ -80,7 +80,9 @@ var AttributableEvents = function AttributableEvents(props) {
80
80
  if (value.attributionSubdivision && value.attributionSubdivision.conditions) {
81
81
  setBizAttributeSelectorValue({
82
82
  id: value.attributionSubdivision.conditions.attrId,
83
- propCategory: value.attributionSubdivision.conditions.propCategory
83
+ propCategory: value.attributionSubdivision.conditions.propCategory,
84
+ name: value.attributionSubdivision.conditions.attrName,
85
+ category: value.attributionSubdivision.conditions.category
84
86
  });
85
87
  setAttrSelectShow(true);
86
88
  }
@@ -128,8 +130,8 @@ var AttributableEvents = function AttributableEvents(props) {
128
130
  message.error('请先选择待归因事件');
129
131
  return;
130
132
  }
131
- if (count >= 10) {
132
- message.error('最多可添加10条属性筛选');
133
+ if (count >= 5) {
134
+ message.error('最多可添加5条属性筛选');
133
135
  return;
134
136
  }
135
137
  setIsAdd(true);
@@ -159,7 +161,9 @@ var AttributableEvents = function AttributableEvents(props) {
159
161
  } else {
160
162
  setBizAttributeSelectorValue({
161
163
  id: attr.id,
162
- propCategory: attr.propCategory
164
+ propCategory: attr.propCategory,
165
+ name: attr.name,
166
+ category: attr.category
163
167
  });
164
168
  }
165
169
  var _minceAttr = attr === undefined ? undefined : {
@@ -237,6 +241,7 @@ var AttributableEvents = function AttributableEvents(props) {
237
241
  })))), /*#__PURE__*/React.createElement("div", null, (filters || isAdd) && /*#__PURE__*/React.createElement(BizAttrConditionGroup, {
238
242
  ref: conditionRef,
239
243
  value: filters,
244
+ onlyAnd: true,
240
245
  enableEventProp: true,
241
246
  enableDelete: true,
242
247
  eventIdList: [eventId],
@@ -146,6 +146,7 @@ var TargetEvent = function TargetEvent(props) {
146
146
  }))), /*#__PURE__*/React.createElement("div", null, (filters || isAdd) && /*#__PURE__*/React.createElement(BizAttrConditionGroup, {
147
147
  ref: conditionRef,
148
148
  value: filters,
149
+ onlyAnd: true,
149
150
  enableEventProp: true,
150
151
  enableDelete: true,
151
152
  eventIdList: [eventId],
@@ -302,9 +302,10 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
302
302
  width: 80
303
303
  },
304
304
  value: windowCnt,
305
+ min: 1,
306
+ max: 365,
305
307
  onChange: function onChange(e) {
306
- if (e !== null && e <= 0) return;
307
- setWindowCnt(e);
308
+ setWindowCnt(Number(e));
308
309
  }
309
310
  }), /*#__PURE__*/React.createElement(Select, {
310
311
  value: windowTypeUnit,
@@ -35,6 +35,8 @@ export declare namespace SearchPanelTypes {
35
35
  interface bizAttributeSelectorValueProp {
36
36
  id?: number;
37
37
  propCategory?: string;
38
+ name?: string;
39
+ category?: string;
38
40
  }
39
41
  interface targetDataProp {
40
42
  event?: {
package/es/types.d.ts CHANGED
@@ -19,16 +19,17 @@ export interface FiltersProps {
19
19
  attributionSubdivision?: AttributionSubdivisionProps | undefined;
20
20
  }
21
21
  export interface AttributionSubdivisionProps {
22
- relation: 'and' | 'or';
23
- conditions: {
24
- attrId: number | undefined;
25
- propCategory: string | undefined;
26
- type: string | undefined;
27
- id?: number | undefined;
28
- name?: string | undefined;
29
- category?: string | undefined;
30
- attrName?: string | undefined;
31
- };
22
+ relation: string;
23
+ conditions: ConditionsnProps;
24
+ }
25
+ export interface ConditionsnProps {
26
+ attrId: number | undefined;
27
+ propCategory: string | undefined;
28
+ type: string | undefined;
29
+ id?: number | undefined;
30
+ name?: string | undefined;
31
+ category?: string | undefined;
32
+ attrName?: string | undefined;
32
33
  }
33
34
  export interface TableDataHandleProps {
34
35
  xAxis: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-attribution",
3
- "version": "1.0.1-alpha.23",
3
+ "version": "1.0.1-alpha.25",
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": "29c789967da8b0268c0d9e70e481252935120876"
53
+ "gitHead": "570f07d37e23c8c3152253e91955edd97f8a7cb3"
54
54
  }