@zgfe/modules-attribution 1.1.6-alpha.0 → 1.1.6-guiyang-optimize.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.
- package/es/components/option/index.js +16 -13
- package/es/components/searchTime/index.js +5 -5
- package/es/components/title/index.js +17 -18
- package/es/components/title/searchTitle.js +8 -8
- package/es/modules/chart/demo/index.d.ts +2 -1
- package/es/modules/chart/index.js +12 -9
- package/es/modules/content/index.js +13 -10
- package/es/modules/content/utils.js +6 -3
- package/es/modules/home/demo/create.d.ts +2 -1
- package/es/modules/home/demo/edit.d.ts +2 -1
- package/es/modules/home/demo/index.d.ts +2 -1
- package/es/modules/home/demo/scene.d.ts +2 -1
- package/es/modules/home/index.js +42 -38
- package/es/modules/searchPanel/components/attributableEvents.js +31 -31
- package/es/modules/searchPanel/components/globalAttribute.d.ts +1 -9
- package/es/modules/searchPanel/components/globalAttribute.js +25 -25
- package/es/modules/searchPanel/components/index.d.ts +1 -3
- package/es/modules/searchPanel/components/index.js +22 -10
- package/es/modules/searchPanel/components/targetEvent.js +10 -10
- package/es/modules/searchPanel/index.js +45 -40
- package/es/modules/searchPanel/utils.d.ts +1 -1
- package/es/modules/searchPanel/utils.js +69 -17
- package/package.json +3 -3
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
function
|
|
2
|
-
function
|
|
3
|
-
function
|
|
4
|
-
function
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
5
8
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
-
function _unsupportedIterableToArray(
|
|
7
|
-
function _arrayLikeToArray(
|
|
8
|
-
function _iterableToArrayLimit(
|
|
9
|
-
function _arrayWithHoles(
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
11
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
10
13
|
import { BizGlobalDataContext, IconFont, BizAddToScene, BizAddToPanel } from '@zgfe/business-lib';
|
|
11
14
|
import { Button } from 'antd';
|
|
12
15
|
import React, { useContext, useImperativeHandle, useState } from 'react';
|
|
@@ -90,7 +93,7 @@ var OptionGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
90
93
|
};
|
|
91
94
|
return /*#__PURE__*/React.createElement("div", {
|
|
92
95
|
className: classPrefix
|
|
93
|
-
}, !panelId && /*#__PURE__*/React.createElement(Button, {
|
|
96
|
+
}, !panelId && (/*#__PURE__*/React.createElement(Button, {
|
|
94
97
|
disabled: buttonDisable || searching || !authority[100061],
|
|
95
98
|
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
96
99
|
className: "".concat(classPrefix, "-icon"),
|
|
@@ -100,7 +103,7 @@ var OptionGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
100
103
|
_onGetSearchData && _onGetSearchData();
|
|
101
104
|
setShowSceneDialog(true);
|
|
102
105
|
}
|
|
103
|
-
}, "\u6DFB\u52A0\u5230\u5E38\u7528\u573A\u666F"), !panelId && /*#__PURE__*/React.createElement(Button, {
|
|
106
|
+
}, "\u6DFB\u52A0\u5230\u5E38\u7528\u573A\u666F")), !panelId && (/*#__PURE__*/React.createElement(Button, {
|
|
104
107
|
disabled: buttonDisable || searching || !authority[100062],
|
|
105
108
|
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
106
109
|
className: "".concat(classPrefix, "-icon"),
|
|
@@ -110,7 +113,7 @@ var OptionGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
110
113
|
_onGetSearchData && _onGetSearchData();
|
|
111
114
|
setShowPanelDialog(true);
|
|
112
115
|
}
|
|
113
|
-
}, "\u6DFB\u52A0\u5230\u770B\u677F"), showSceneDialog && /*#__PURE__*/React.createElement(BizAddToScene, {
|
|
116
|
+
}, "\u6DFB\u52A0\u5230\u770B\u677F")), showSceneDialog && (/*#__PURE__*/React.createElement(BizAddToScene, {
|
|
114
117
|
params: _objectSpread({
|
|
115
118
|
app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
116
119
|
module: 'attribution'
|
|
@@ -121,7 +124,7 @@ var OptionGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
121
124
|
onOk: function onOk(data) {
|
|
122
125
|
return _onOk('scene', data);
|
|
123
126
|
}
|
|
124
|
-
}), showPanelDialog && /*#__PURE__*/React.createElement(BizAddToPanel, {
|
|
127
|
+
})), showPanelDialog && (/*#__PURE__*/React.createElement(BizAddToPanel, {
|
|
125
128
|
defaultValue: panelValue,
|
|
126
129
|
params: _objectSpread({
|
|
127
130
|
app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
@@ -136,6 +139,6 @@ var OptionGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
136
139
|
onOk: function onOk(data) {
|
|
137
140
|
return _onOk('panel', data);
|
|
138
141
|
}
|
|
139
|
-
}));
|
|
142
|
+
})));
|
|
140
143
|
});
|
|
141
144
|
export default OptionGroup;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _slicedToArray(
|
|
1
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
2
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
function _unsupportedIterableToArray(
|
|
4
|
-
function _arrayLikeToArray(
|
|
5
|
-
function _iterableToArrayLimit(
|
|
6
|
-
function _arrayWithHoles(
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
7
|
import { BizDatePicker } from '@zgfe/business-lib';
|
|
8
8
|
import React, { useContext, useState, useEffect } from 'react';
|
|
9
9
|
import { getInitDate } from '../../constants';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _slicedToArray(
|
|
1
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
2
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
function _unsupportedIterableToArray(
|
|
4
|
-
function _arrayLikeToArray(
|
|
5
|
-
function _iterableToArrayLimit(
|
|
6
|
-
function _arrayWithHoles(
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
7
|
import { Input, Menu, Dropdown, Button, message } from 'antd';
|
|
8
8
|
import React, { useContext, useRef, useState } from 'react';
|
|
9
9
|
import { ajax, IconFont } from '@zgfe/business-lib';
|
|
@@ -11,11 +11,14 @@ import './styles/index.less';
|
|
|
11
11
|
import Apis from '../../constants/apis';
|
|
12
12
|
import { AttributableContext } from '../../types';
|
|
13
13
|
var classPrefix = 'attribution-title';
|
|
14
|
-
var EditTitle = function EditTitle(
|
|
15
|
-
var title =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
var EditTitle = function EditTitle(_ref) {
|
|
15
|
+
var _ref$title = _ref.title,
|
|
16
|
+
title = _ref$title === void 0 ? '归因' : _ref$title,
|
|
17
|
+
_ref$type = _ref.type,
|
|
18
|
+
type = _ref$type === void 0 ? 'edit' : _ref$type,
|
|
19
|
+
onSave = _ref.onSave,
|
|
20
|
+
onSaveAs = _ref.onSaveAs,
|
|
21
|
+
onEditTitle = _ref.onEditTitle;
|
|
19
22
|
var _useState = useState(title),
|
|
20
23
|
_useState2 = _slicedToArray(_useState, 2),
|
|
21
24
|
curTitle = _useState2[0],
|
|
@@ -93,7 +96,7 @@ var EditTitle = function EditTitle(props) {
|
|
|
93
96
|
if (res.flag === 101) {
|
|
94
97
|
message.success('编辑成功');
|
|
95
98
|
setPrevTitle(value);
|
|
96
|
-
if (
|
|
99
|
+
if (onEditTitle) onEditTitle(value);
|
|
97
100
|
} else {
|
|
98
101
|
message.error('编辑失败');
|
|
99
102
|
setCurTitle(prevTitle);
|
|
@@ -136,7 +139,7 @@ var EditTitle = function EditTitle(props) {
|
|
|
136
139
|
onChange: onChange
|
|
137
140
|
}), !curTitle ? /*#__PURE__*/React.createElement("span", {
|
|
138
141
|
className: "".concat(classPrefix, "-error-tip")
|
|
139
|
-
}, "\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A") : null)), type === 'edit' ? /*#__PURE__*/React.createElement("div", {
|
|
142
|
+
}, "\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A") : null)), type === 'edit' ? (/*#__PURE__*/React.createElement("div", {
|
|
140
143
|
className: "".concat(classPrefix, "-option")
|
|
141
144
|
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
142
145
|
overlayClassName: "".concat(classPrefix, "-dropdown"),
|
|
@@ -167,7 +170,7 @@ var EditTitle = function EditTitle(props) {
|
|
|
167
170
|
disabled: panelDisabled || buttonDisable || searching,
|
|
168
171
|
type: "primary",
|
|
169
172
|
onClick: onSaveAs
|
|
170
|
-
}, "\u53E6\u5B58\u4E3A")) : /*#__PURE__*/React.createElement("div", {
|
|
173
|
+
}, "\u53E6\u5B58\u4E3A"))) : (/*#__PURE__*/React.createElement("div", {
|
|
171
174
|
className: "".concat(classPrefix, "-title-btn")
|
|
172
175
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
173
176
|
className: "attribution-btn",
|
|
@@ -180,10 +183,6 @@ var EditTitle = function EditTitle(props) {
|
|
|
180
183
|
disabled: panelDisabled || buttonDisable || searching || !curTitle,
|
|
181
184
|
type: "primary",
|
|
182
185
|
onClick: onSaveAs
|
|
183
|
-
}, "\u4FDD\u5B58")));
|
|
184
|
-
};
|
|
185
|
-
EditTitle.defaultProps = {
|
|
186
|
-
title: '归因',
|
|
187
|
-
type: 'edit'
|
|
186
|
+
}, "\u4FDD\u5B58"))));
|
|
188
187
|
};
|
|
189
188
|
export default EditTitle;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _slicedToArray(
|
|
1
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
2
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
function _unsupportedIterableToArray(
|
|
4
|
-
function _arrayLikeToArray(
|
|
5
|
-
function _iterableToArrayLimit(
|
|
6
|
-
function _arrayWithHoles(
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
7
|
import React, { useState } from 'react';
|
|
8
8
|
import { SearchOutlined } from '@ant-design/icons';
|
|
9
9
|
import './styles/search.less';
|
|
@@ -33,15 +33,15 @@ var SearchTitle = function SearchTitle(props) {
|
|
|
33
33
|
className: classPrefix
|
|
34
34
|
}, /*#__PURE__*/React.createElement("span", {
|
|
35
35
|
className: "".concat(classPrefix, "-title")
|
|
36
|
-
}, props.title), isSearch ? /*#__PURE__*/React.createElement(BizSearchInput, {
|
|
36
|
+
}, props.title), isSearch ? (/*#__PURE__*/React.createElement(BizSearchInput, {
|
|
37
37
|
className: "".concat(classPrefix, "-input"),
|
|
38
38
|
onChange: onSearch,
|
|
39
39
|
onBlur: onBlur
|
|
40
|
-
}) : /*#__PURE__*/React.createElement(SearchOutlined, {
|
|
40
|
+
})) : (/*#__PURE__*/React.createElement(SearchOutlined, {
|
|
41
41
|
className: "".concat(classPrefix, "-icon"),
|
|
42
42
|
onClick: function onClick() {
|
|
43
43
|
return setIsSearch(true);
|
|
44
44
|
}
|
|
45
|
-
}));
|
|
45
|
+
})));
|
|
46
46
|
};
|
|
47
47
|
export default SearchTitle;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
function
|
|
2
|
-
function
|
|
3
|
-
function
|
|
4
|
-
function
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
5
8
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
-
function _unsupportedIterableToArray(
|
|
7
|
-
function _arrayLikeToArray(
|
|
8
|
-
function _iterableToArrayLimit(
|
|
9
|
-
function _arrayWithHoles(
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
11
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
10
13
|
import React, { useContext, useEffect, useState } from 'react';
|
|
11
14
|
import { Empty } from 'antd';
|
|
12
15
|
import request from '../../utils/request';
|
|
@@ -61,7 +64,7 @@ var AttributeChart = function AttributeChart(props) {
|
|
|
61
64
|
setLoading(false);
|
|
62
65
|
});
|
|
63
66
|
};
|
|
64
|
-
if (!tableDataList.dataSource.length || !tableDataList.columns.length) {
|
|
67
|
+
if (!(tableDataList === null || tableDataList === void 0 ? void 0 : tableDataList.dataSource) || !tableDataList.dataSource.length || !tableDataList.columns.length) {
|
|
65
68
|
return /*#__PURE__*/React.createElement(Empty, {
|
|
66
69
|
image: Empty.PRESENTED_IMAGE_SIMPLE,
|
|
67
70
|
description: "\u6682\u65E0\u6570\u636E"
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
function
|
|
2
|
-
function
|
|
3
|
-
function
|
|
4
|
-
function
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
5
8
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
-
function _unsupportedIterableToArray(
|
|
7
|
-
function _arrayLikeToArray(
|
|
8
|
-
function _iterableToArrayLimit(
|
|
9
|
-
function _arrayWithHoles(
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
11
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
10
13
|
import React, { useEffect, useState, useRef } from 'react';
|
|
11
14
|
import SearchPanel from '../searchPanel';
|
|
12
15
|
import './styles/index.less';
|
|
@@ -83,11 +86,11 @@ var AttributionContent = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
83
86
|
}, /*#__PURE__*/React.createElement(SearchTime, {
|
|
84
87
|
time: searchData === null || searchData === void 0 ? void 0 : searchData.time,
|
|
85
88
|
onChange: onChangeContent
|
|
86
|
-
}), searchData && /*#__PURE__*/React.createElement(OptionGroup, {
|
|
89
|
+
}), searchData && (/*#__PURE__*/React.createElement(OptionGroup, {
|
|
87
90
|
ref: ref,
|
|
88
91
|
searchData: searchData,
|
|
89
92
|
onGetSearchData: onGetSearchData
|
|
90
|
-
})), /*#__PURE__*/React.createElement(AttributeChart, {
|
|
93
|
+
}))), /*#__PURE__*/React.createElement(AttributeChart, {
|
|
91
94
|
params: params,
|
|
92
95
|
onChangeLoading: setLoading,
|
|
93
96
|
searchType: 0
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
function
|
|
2
|
-
function
|
|
3
|
-
function
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
7
|
import { nanoid } from 'nanoid';
|
|
5
8
|
export var handleTableData = function handleTableData(data) {
|
|
6
9
|
var tableData = {};
|
package/es/modules/home/index.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
function
|
|
2
|
-
function
|
|
3
|
-
function
|
|
4
|
-
function
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
5
8
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
-
function _unsupportedIterableToArray(
|
|
7
|
-
function _arrayLikeToArray(
|
|
8
|
-
function _iterableToArrayLimit(
|
|
9
|
-
function _arrayWithHoles(
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
11
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
10
13
|
import React, { useEffect, useRef, useState } from 'react';
|
|
11
14
|
import { Spin } from 'antd';
|
|
12
15
|
import './styles/index.less';
|
|
@@ -15,8 +18,12 @@ import EditTitle from '../../components/title';
|
|
|
15
18
|
import { getInitDate, initTarget } from '../../constants/initData';
|
|
16
19
|
import AttributionContent from '../content';
|
|
17
20
|
var classPrefix = 'attribution-container';
|
|
18
|
-
var AttributionHome = function AttributionHome(
|
|
19
|
-
var
|
|
21
|
+
var AttributionHome = function AttributionHome(_ref) {
|
|
22
|
+
var _ref$includeToday = _ref.includeToday,
|
|
23
|
+
includeToday = _ref$includeToday === void 0 ? true : _ref$includeToday,
|
|
24
|
+
defaultValue = _ref.defaultValue,
|
|
25
|
+
panelDisabled = _ref.panelDisabled,
|
|
26
|
+
afterEditTarget = _ref.afterEditTarget;
|
|
20
27
|
var _useState = useState(),
|
|
21
28
|
_useState2 = _slicedToArray(_useState, 2),
|
|
22
29
|
searchData = _useState2[0],
|
|
@@ -34,31 +41,31 @@ var AttributionHome = function AttributionHome(props) {
|
|
|
34
41
|
title = _useState8[0],
|
|
35
42
|
setTitle = _useState8[1];
|
|
36
43
|
var _useState9 = useState(),
|
|
37
|
-
|
|
38
|
-
panelId =
|
|
39
|
-
setPanelId =
|
|
40
|
-
var
|
|
44
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
45
|
+
panelId = _useState0[0],
|
|
46
|
+
setPanelId = _useState0[1];
|
|
47
|
+
var _useState1 = useState(),
|
|
48
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
49
|
+
elementId = _useState10[0],
|
|
50
|
+
setElementId = _useState10[1];
|
|
51
|
+
var _useState11 = useState(false),
|
|
41
52
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
var _useState13 = useState(
|
|
53
|
+
searching = _useState12[0],
|
|
54
|
+
setSearching = _useState12[1];
|
|
55
|
+
var _useState13 = useState(true),
|
|
45
56
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
var _useState15 = useState(true),
|
|
49
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
50
|
-
buttonDisable = _useState16[0],
|
|
51
|
-
setButtonDisable = _useState16[1];
|
|
57
|
+
buttonDisable = _useState14[0],
|
|
58
|
+
setButtonDisable = _useState14[1];
|
|
52
59
|
var attributionRef = useRef(null);
|
|
53
60
|
useEffect(function () {
|
|
54
61
|
setPageLoading(true);
|
|
55
|
-
if (!
|
|
62
|
+
if (!defaultValue) {
|
|
56
63
|
initSearch();
|
|
57
64
|
} else {
|
|
58
|
-
setPanelId(
|
|
59
|
-
setElementId(
|
|
60
|
-
setTitle(
|
|
61
|
-
var initData =
|
|
65
|
+
setPanelId(defaultValue.panelId);
|
|
66
|
+
setElementId(defaultValue.id);
|
|
67
|
+
setTitle(defaultValue.name);
|
|
68
|
+
var initData = defaultValue.data;
|
|
62
69
|
if (!initData) {
|
|
63
70
|
initSearch();
|
|
64
71
|
} else {
|
|
@@ -73,7 +80,7 @@ var AttributionHome = function AttributionHome(props) {
|
|
|
73
80
|
setSearchData({
|
|
74
81
|
targetFilters: initTarget,
|
|
75
82
|
sourceFilters: initTarget,
|
|
76
|
-
time: getInitDate(
|
|
83
|
+
time: getInitDate(includeToday)
|
|
77
84
|
});
|
|
78
85
|
};
|
|
79
86
|
var changeLoading = function changeLoading(flag) {
|
|
@@ -105,18 +112,18 @@ var AttributionHome = function AttributionHome(props) {
|
|
|
105
112
|
searching: searching,
|
|
106
113
|
buttonDisable: buttonDisable,
|
|
107
114
|
setButtonDisable: setButtonDisable,
|
|
108
|
-
panelDisabled:
|
|
109
|
-
includeToday:
|
|
115
|
+
panelDisabled: panelDisabled,
|
|
116
|
+
includeToday: includeToday,
|
|
110
117
|
changeLoading: changeLoading,
|
|
111
|
-
afterEditTarget:
|
|
118
|
+
afterEditTarget: afterEditTarget
|
|
112
119
|
}
|
|
113
|
-
}, panelId && /*#__PURE__*/React.createElement(EditTitle, {
|
|
120
|
+
}, panelId && (/*#__PURE__*/React.createElement(EditTitle, {
|
|
114
121
|
title: title,
|
|
115
|
-
type:
|
|
122
|
+
type: defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.panelType,
|
|
116
123
|
onSave: onSave,
|
|
117
124
|
onSaveAs: onSaveAs,
|
|
118
125
|
onEditTitle: setTitle
|
|
119
|
-
}), !panelId && /*#__PURE__*/React.createElement("div", {
|
|
126
|
+
})), !panelId && /*#__PURE__*/React.createElement("div", {
|
|
120
127
|
className: "".concat(classPrefix, "-header-title")
|
|
121
128
|
}, "\u5F52\u56E0"), /*#__PURE__*/React.createElement("div", {
|
|
122
129
|
className: "".concat(classPrefix, "-content ").concat(panelId ? classPrefix + '-content2' : '')
|
|
@@ -128,7 +135,4 @@ var AttributionHome = function AttributionHome(props) {
|
|
|
128
135
|
}
|
|
129
136
|
}))));
|
|
130
137
|
};
|
|
131
|
-
AttributionHome.defaultProps = {
|
|
132
|
-
includeToday: true
|
|
133
|
-
};
|
|
134
138
|
export default AttributionHome;
|