@zgfe/modules-attribution 1.0.2-alpha.0 → 1.0.2-alpha.1
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.
|
@@ -11,6 +11,7 @@ import _ from 'lodash';
|
|
|
11
11
|
import { Tooltip, message } from 'antd';
|
|
12
12
|
var AttributableEvents = function AttributableEvents(props) {
|
|
13
13
|
var value = props.value,
|
|
14
|
+
fieldsLength = props.fieldsLength,
|
|
14
15
|
setMincePropCount = props.setMincePropCount,
|
|
15
16
|
mincePropCount = props.mincePropCount,
|
|
16
17
|
attrSourceCount = props.attrSourceCount,
|
|
@@ -100,7 +101,8 @@ var AttributableEvents = function AttributableEvents(props) {
|
|
|
100
101
|
}, [count]);
|
|
101
102
|
var onEventDelete = function onEventDelete() {
|
|
102
103
|
if (formData && formData.sourceFilters.length <= 1) {
|
|
103
|
-
|
|
104
|
+
setReasonData(undefined);
|
|
105
|
+
onChangeHandle(undefined, undefined, undefined);
|
|
104
106
|
return;
|
|
105
107
|
}
|
|
106
108
|
if (ReasonData) {
|
|
@@ -189,7 +191,11 @@ var AttributableEvents = function AttributableEvents(props) {
|
|
|
189
191
|
var onChangeHandle = function onChangeHandle(reason, filterData, minceAttr) {
|
|
190
192
|
if (props.onChange) {
|
|
191
193
|
var _reason$event2;
|
|
192
|
-
if (!reason || !reason.event || !((_reason$event2 = reason.event) === null || _reason$event2 === void 0 ? void 0 : _reason$event2.id))
|
|
194
|
+
if (!reason || !reason.event || !((_reason$event2 = reason.event) === null || _reason$event2 === void 0 ? void 0 : _reason$event2.id)) {
|
|
195
|
+
props.onChange(undefined);
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
;
|
|
193
199
|
var event = reason.event;
|
|
194
200
|
var data = {
|
|
195
201
|
eventId: event === null || event === void 0 ? void 0 : event.id,
|
|
@@ -222,7 +228,7 @@ var AttributableEvents = function AttributableEvents(props) {
|
|
|
222
228
|
popupContainer: false,
|
|
223
229
|
defaultSelectAble: false,
|
|
224
230
|
onChange: onChangeReason,
|
|
225
|
-
|
|
231
|
+
value: bizEventSelectorDefaultValue,
|
|
226
232
|
selectList: eventIdList,
|
|
227
233
|
placeholder: "\u8BF7\u9009\u62E9\u4E8B\u4EF6"
|
|
228
234
|
}), attrSelectShow && /*#__PURE__*/React.createElement(BizAttributeSelector, {
|
|
@@ -239,7 +245,7 @@ var AttributableEvents = function AttributableEvents(props) {
|
|
|
239
245
|
}
|
|
240
246
|
}), /*#__PURE__*/React.createElement("div", {
|
|
241
247
|
className: "button-box"
|
|
242
|
-
}, notClickable === false && /*#__PURE__*/React.createElement(IconFont, {
|
|
248
|
+
}, (notClickable === false || fieldsLength && fieldsLength > 1) && /*#__PURE__*/React.createElement(IconFont, {
|
|
243
249
|
type: "qingchu",
|
|
244
250
|
onClick: onEventDelete
|
|
245
251
|
}), /*#__PURE__*/React.createElement(Tooltip, {
|
|
@@ -225,6 +225,7 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
225
225
|
key: field.key,
|
|
226
226
|
className: "".concat(classPrefix, "-item")
|
|
227
227
|
}), /*#__PURE__*/React.createElement(SearchContent, {
|
|
228
|
+
fieldsLength: fields.length,
|
|
228
229
|
type: item.type,
|
|
229
230
|
key: field.key,
|
|
230
231
|
eventIdList: eventIdList,
|
|
@@ -18,8 +18,9 @@ export declare namespace SearchPanelTypes {
|
|
|
18
18
|
interface PanelProp {
|
|
19
19
|
type: string;
|
|
20
20
|
value?: FiltersProps;
|
|
21
|
+
fieldsLength?: number;
|
|
21
22
|
eventIdList?: number[];
|
|
22
|
-
onChange?: (data: FiltersProps) => void;
|
|
23
|
+
onChange?: (data: FiltersProps | undefined) => void;
|
|
23
24
|
onDelete: () => void;
|
|
24
25
|
formData: SearchValueProps;
|
|
25
26
|
setAttrTargetCount: Function;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-attribution",
|
|
3
|
-
"version": "1.0.2-alpha.
|
|
3
|
+
"version": "1.0.2-alpha.1",
|
|
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.
|
|
40
|
+
"@zgfe/business-lib": "1.1.41-attribution.11",
|
|
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": "
|
|
53
|
+
"gitHead": "06f899b8b276b467b3bc18082b4e8ce6d7af90b9"
|
|
54
54
|
}
|