@zgfe/modules-attribution 1.0.1-alpha.18 → 1.0.1-alpha.19
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,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { attributionContentProps } from './types';
|
|
3
3
|
import './styles/index.less';
|
|
4
|
-
declare const
|
|
5
|
-
export default
|
|
4
|
+
declare const AttributionContent: React.ForwardRefExoticComponent<attributionContentProps.Props & React.RefAttributes<any>>;
|
|
5
|
+
export default AttributionContent;
|
|
@@ -19,7 +19,7 @@ import { TableList, OptionGroup, SearchTime } from '../../components';
|
|
|
19
19
|
var CancelToken = Request.CancelToken;
|
|
20
20
|
var cancel;
|
|
21
21
|
var classPrefix = 'attribution-content';
|
|
22
|
-
var
|
|
22
|
+
var AttributionContent = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
23
23
|
var _useState = useState(props.value),
|
|
24
24
|
_useState2 = _slicedToArray(_useState, 2),
|
|
25
25
|
searchData = _useState2[0],
|
|
@@ -141,4 +141,4 @@ var InsightContent = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
141
141
|
tableDataList: tableDataList
|
|
142
142
|
})));
|
|
143
143
|
});
|
|
144
|
-
export default
|
|
144
|
+
export default AttributionContent;
|
package/es/modules/home/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import './styles/index.less';
|
|
|
13
13
|
import { AttributableContext } from '../../types';
|
|
14
14
|
import EditTitle from '../../components/title';
|
|
15
15
|
import { getInitDate, initTarget } from '../../constants/initData';
|
|
16
|
-
import
|
|
16
|
+
import AttributionContent from '../content';
|
|
17
17
|
var classPrefix = 'attribution-container';
|
|
18
18
|
var AttributionHome = function AttributionHome(props) {
|
|
19
19
|
var _props$defaultValue;
|
|
@@ -49,7 +49,7 @@ var AttributionHome = function AttributionHome(props) {
|
|
|
49
49
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
50
50
|
buttonDisable = _useState16[0],
|
|
51
51
|
setButtonDisable = _useState16[1];
|
|
52
|
-
var
|
|
52
|
+
var attributionRef = useRef(null);
|
|
53
53
|
useEffect(function () {
|
|
54
54
|
setPageLoading(true);
|
|
55
55
|
if (!props.defaultValue) {
|
|
@@ -80,15 +80,15 @@ var AttributionHome = function AttributionHome(props) {
|
|
|
80
80
|
setLoading(flag);
|
|
81
81
|
};
|
|
82
82
|
var onSave = function onSave() {
|
|
83
|
-
if (
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
if (attributionRef) {
|
|
84
|
+
attributionRef.current.onGetSearchData();
|
|
85
|
+
attributionRef.current.savePanel();
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
88
|
var onSaveAs = function onSaveAs() {
|
|
89
|
-
if (
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
if (attributionRef) {
|
|
90
|
+
attributionRef.current.onGetSearchData();
|
|
91
|
+
attributionRef.current.saveAsPanel();
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
94
|
if (pageLoading) {
|
|
@@ -120,8 +120,8 @@ var AttributionHome = function AttributionHome(props) {
|
|
|
120
120
|
className: "".concat(classPrefix, "-header-title")
|
|
121
121
|
}, "\u5F52\u56E0\u5206\u6790"), /*#__PURE__*/React.createElement("div", {
|
|
122
122
|
className: "".concat(classPrefix, "-content ").concat(panelId ? classPrefix + '-content2' : '')
|
|
123
|
-
}, /*#__PURE__*/React.createElement(
|
|
124
|
-
ref:
|
|
123
|
+
}, /*#__PURE__*/React.createElement(AttributionContent, {
|
|
124
|
+
ref: attributionRef,
|
|
125
125
|
value: searchData,
|
|
126
126
|
onSearching: function onSearching(val) {
|
|
127
127
|
return setSearching(val);
|
|
@@ -46,7 +46,7 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
46
46
|
setEventIdList = _useState8[1];
|
|
47
47
|
var _useContext2 = useContext(BizGlobalDataContext),
|
|
48
48
|
eventGroupList = _useContext2.eventGroupList;
|
|
49
|
-
var _useState9 = useState(
|
|
49
|
+
var _useState9 = useState(-1),
|
|
50
50
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
51
51
|
windowCnt = _useState10[0],
|
|
52
52
|
setWindowCnt = _useState10[1];
|
|
@@ -81,7 +81,7 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
81
81
|
setOtherEvent(defaultValue.otherEvent);
|
|
82
82
|
setWindowCnt(defaultValue.windowCnt);
|
|
83
83
|
setwindowTypeUnit(defaultValue.windowType);
|
|
84
|
-
defaultValue.windowCnt ==
|
|
84
|
+
defaultValue.windowCnt == -1 ? setWindowType(1) : setWindowType(2);
|
|
85
85
|
}
|
|
86
86
|
var _attrCount = {};
|
|
87
87
|
var _sourceCount = {};
|
|
@@ -283,7 +283,7 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
283
283
|
},
|
|
284
284
|
onChange: function onChange(e) {
|
|
285
285
|
setWindowType(e);
|
|
286
|
-
e === 1 ? setWindowCnt(
|
|
286
|
+
e === 1 ? setWindowCnt(-1) : setWindowCnt(1);
|
|
287
287
|
},
|
|
288
288
|
options: [{
|
|
289
289
|
value: 1,
|
|
@@ -299,7 +299,8 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
299
299
|
},
|
|
300
300
|
value: windowCnt,
|
|
301
301
|
onChange: function onChange(e) {
|
|
302
|
-
|
|
302
|
+
if (e !== null && e <= 0) return;
|
|
303
|
+
setWindowCnt(e);
|
|
303
304
|
}
|
|
304
305
|
}), /*#__PURE__*/React.createElement(Select, {
|
|
305
306
|
value: windowTypeUnit,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-attribution",
|
|
3
|
-
"version": "1.0.1-alpha.
|
|
3
|
+
"version": "1.0.1-alpha.19",
|
|
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": "
|
|
53
|
+
"gitHead": "672e6e4544e74848eb0be22362dfcde65dc2e559"
|
|
54
54
|
}
|