@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 InsightContent: React.ForwardRefExoticComponent<attributionContentProps.Props & React.RefAttributes<any>>;
5
- export default InsightContent;
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 InsightContent = /*#__PURE__*/React.forwardRef(function (props, ref) {
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 InsightContent;
144
+ export default AttributionContent;
@@ -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 InsightContent from '../content';
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 insightRef = useRef(null);
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 (insightRef) {
84
- insightRef.current.onGetSearchData();
85
- insightRef.current.savePanel();
83
+ if (attributionRef) {
84
+ attributionRef.current.onGetSearchData();
85
+ attributionRef.current.savePanel();
86
86
  }
87
87
  };
88
88
  var onSaveAs = function onSaveAs() {
89
- if (insightRef) {
90
- insightRef.current.onGetSearchData();
91
- insightRef.current.saveAsPanel();
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(InsightContent, {
124
- ref: insightRef,
123
+ }, /*#__PURE__*/React.createElement(AttributionContent, {
124
+ ref: attributionRef,
125
125
  value: searchData,
126
126
  onSearching: function onSearching(val) {
127
127
  return setSearching(val);
@@ -19,7 +19,8 @@
19
19
  &-content {
20
20
  width: 100%;
21
21
  height: 100%;
22
- overflow: auto;
22
+ // overflow: auto;
23
+ overflow-x: hidden;
23
24
  background: #fafafb;
24
25
  border-top: 1px solid #eaeaea;
25
26
  .attribution-content {
@@ -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(0),
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 == 0 ? setWindowType(1) : setWindowType(2);
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(0) : setWindowCnt(1);
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
- return setWindowCnt(e);
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.18",
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": "a5b79c7b13aa1420950945d4b84b36de1bc7b75e"
53
+ "gitHead": "672e6e4544e74848eb0be22362dfcde65dc2e559"
54
54
  }