@zgfe/modules-attribution 1.1.6-alpha.1 → 1.1.6-mt.2

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.
Files changed (34) hide show
  1. package/README.md +35 -35
  2. package/es/components/common/styles/index.less +27 -27
  3. package/es/components/option/index.js +16 -13
  4. package/es/components/option/styles/index.less +17 -17
  5. package/es/components/searchTime/index.js +5 -5
  6. package/es/components/searchTime/styles/index.less +19 -19
  7. package/es/components/tableList/styles/index.less +18 -18
  8. package/es/components/title/index.js +13 -42
  9. package/es/components/title/searchTitle.js +8 -8
  10. package/es/components/title/styles/index.less +84 -84
  11. package/es/components/title/styles/search.less +27 -27
  12. package/es/images/empty.png +0 -0
  13. package/es/modules/chart/demo/index.d.ts +2 -1
  14. package/es/modules/chart/index.js +11 -8
  15. package/es/modules/content/index.js +13 -10
  16. package/es/modules/content/styles/index.less +7 -7
  17. package/es/modules/content/utils.js +6 -3
  18. package/es/modules/home/demo/create.d.ts +2 -1
  19. package/es/modules/home/demo/edit.d.ts +2 -1
  20. package/es/modules/home/demo/index.d.ts +2 -1
  21. package/es/modules/home/demo/scene.d.ts +2 -1
  22. package/es/modules/home/demo/styles/index.less +33 -33
  23. package/es/modules/home/index.js +31 -27
  24. package/es/modules/home/styles/index.less +68 -68
  25. package/es/modules/searchPanel/components/attributableEvents.js +31 -31
  26. package/es/modules/searchPanel/components/globalAttribute.d.ts +1 -1
  27. package/es/modules/searchPanel/components/globalAttribute.js +13 -13
  28. package/es/modules/searchPanel/components/index.js +6 -6
  29. package/es/modules/searchPanel/components/targetEvent.js +10 -10
  30. package/es/modules/searchPanel/index.js +41 -38
  31. package/es/modules/searchPanel/styles/index.less +225 -225
  32. package/es/style/image/ring.svg +8 -8
  33. package/es/style/index.less +47 -47
  34. package/package.json +9 -2
package/README.md CHANGED
@@ -1,35 +1,35 @@
1
- # modules-attribution
2
-
3
- 洞察分析
4
-
5
- ## Getting Started
6
-
7
- Install dependencies,
8
-
9
- ```bash
10
- $ npm i
11
- ```
12
-
13
- Start the dev server,
14
-
15
- ```bash
16
- $ npm start
17
- ```
18
-
19
- Build documentation,
20
-
21
- ```bash
22
- $ npm run docs:build
23
- ```
24
-
25
- Run test,
26
-
27
- ```bash
28
- $ npm test
29
- ```
30
-
31
- Build library via `father-build`,
32
-
33
- ```bash
34
- $ npm run build
35
- ```
1
+ # modules-attribution
2
+
3
+ 洞察分析
4
+
5
+ ## Getting Started
6
+
7
+ Install dependencies,
8
+
9
+ ```bash
10
+ $ npm i
11
+ ```
12
+
13
+ Start the dev server,
14
+
15
+ ```bash
16
+ $ npm start
17
+ ```
18
+
19
+ Build documentation,
20
+
21
+ ```bash
22
+ $ npm run docs:build
23
+ ```
24
+
25
+ Run test,
26
+
27
+ ```bash
28
+ $ npm test
29
+ ```
30
+
31
+ Build library via `father-build`,
32
+
33
+ ```bash
34
+ $ npm run build
35
+ ```
@@ -1,27 +1,27 @@
1
- @import '~@zgfe/business-lib/es/assets/styles/inner.less';
2
-
3
- .mi-common {
4
- &-loading-icon {
5
- z-index: 1000;
6
- display: inline-block;
7
- width: 40px;
8
- height: 40px;
9
- background: url('../../../style/image/ring.svg') no-repeat;
10
- background-size: contain;
11
- }
12
-
13
- &-none-text {
14
- color: @text-color;
15
- font-size: 16px;
16
- }
17
-
18
- &-none {
19
- width: 348px;
20
- height: 132px;
21
- background: url('../../../style/image/noData.png') no-repeat;
22
- }
23
-
24
- &-none-container {
25
- text-align: center;
26
- }
27
- }
1
+ @import '~@zgfe/business-lib/es/assets/styles/inner.less';
2
+
3
+ .mi-common {
4
+ &-loading-icon {
5
+ z-index: 1000;
6
+ display: inline-block;
7
+ width: 40px;
8
+ height: 40px;
9
+ background: url('../../../style/image/ring.svg') no-repeat;
10
+ background-size: contain;
11
+ }
12
+
13
+ &-none-text {
14
+ color: @text-color;
15
+ font-size: 16px;
16
+ }
17
+
18
+ &-none {
19
+ width: 348px;
20
+ height: 132px;
21
+ background: url('../../../style/image/noData.png') no-repeat;
22
+ }
23
+
24
+ &-none-container {
25
+ text-align: center;
26
+ }
27
+ }
@@ -1,12 +1,15 @@
1
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
3
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
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(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
7
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
9
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
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,17 +1,17 @@
1
- @import '~@zgfe/business-lib/es/assets/styles/variable.less';
2
-
3
- .option-group {
4
- display: flex;
5
- &-icon.bsicon {
6
- margin-right: @margin-xss;
7
- font-size: 18px;
8
- }
9
- .ant-btn {
10
- display: flex;
11
- align-items: center;
12
- padding: 0 12px;
13
- &:not(:first-child) {
14
- margin-left: 16px;
15
- }
16
- }
17
- }
1
+ @import '~@zgfe/business-lib/es/assets/styles/variable.less';
2
+
3
+ .option-group {
4
+ display: flex;
5
+ &-icon.bsicon {
6
+ margin-right: @margin-xss;
7
+ font-size: 18px;
8
+ }
9
+ .ant-btn {
10
+ display: flex;
11
+ align-items: center;
12
+ padding: 0 12px;
13
+ &:not(:first-child) {
14
+ margin-left: 16px;
15
+ }
16
+ }
17
+ }
@@ -1,9 +1,9 @@
1
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
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(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
5
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
6
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
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,19 +1,19 @@
1
- @import '~@zgfe/business-lib/es/assets/styles/variable.less';
2
-
3
- .attribution-search-panel {
4
- display: flex;
5
- align-items: center;
6
- justify-content: space-between;
7
- .biz-date-picker-wrap {
8
- > :nth-child(1) {
9
- display: none;
10
- }
11
- }
12
- &-search-right {
13
- display: flex;
14
- }
15
-
16
- &-select {
17
- width: 112px;
18
- }
19
- }
1
+ @import '~@zgfe/business-lib/es/assets/styles/variable.less';
2
+
3
+ .attribution-search-panel {
4
+ display: flex;
5
+ align-items: center;
6
+ justify-content: space-between;
7
+ .biz-date-picker-wrap {
8
+ > :nth-child(1) {
9
+ display: none;
10
+ }
11
+ }
12
+ &-search-right {
13
+ display: flex;
14
+ }
15
+
16
+ &-select {
17
+ width: 112px;
18
+ }
19
+ }
@@ -1,18 +1,18 @@
1
- .table-list {
2
- margin-top: 25px;
3
- .ant-table-wrapper{
4
- margin-bottom: 40px;
5
- }
6
- &-empty-tips {
7
- margin-top: 112px;
8
- text-align: center;
9
- img{
10
- width: 88px;
11
- height: 88px;
12
- }
13
- p{
14
- color: #354354;
15
- line-height: 20px;
16
- }
17
- }
18
- }
1
+ .table-list {
2
+ margin-top: 25px;
3
+ .ant-table-wrapper{
4
+ margin-bottom: 40px;
5
+ }
6
+ &-empty-tips {
7
+ margin-top: 112px;
8
+ text-align: center;
9
+ img{
10
+ width: 88px;
11
+ height: 88px;
12
+ }
13
+ p{
14
+ color: #354354;
15
+ line-height: 20px;
16
+ }
17
+ }
18
+ }
@@ -1,9 +1,9 @@
1
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
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(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
5
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
6
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
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,7 +11,11 @@ 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(props) {
14
+ var EditTitle = function EditTitle() {
15
+ var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
16
+ title: '归因',
17
+ type: 'edit'
18
+ };
15
19
  var title = props.title,
16
20
  type = props.type,
17
21
  onSave = props.onSave,
@@ -46,37 +50,8 @@ var EditTitle = function EditTitle(props) {
46
50
  cursor: 'end'
47
51
  });
48
52
  }
49
- }, {
50
- key: '2',
51
- label: '删除归因',
52
- icon: /*#__PURE__*/React.createElement(IconFont, {
53
- type: "shanchu"
54
- }),
55
- onClick: function onClick() {
56
- return onDelete();
57
- }
58
53
  }]
59
54
  });
60
- var onDelete = function onDelete() {
61
- changeLoading(true);
62
- ajax(Apis.delPanelElement, {
63
- method: 'post',
64
- data: {
65
- panel_id: panelId,
66
- element_id: elementId
67
- }
68
- }).then(function (res) {
69
- changeLoading(false);
70
- if ((res === null || res === void 0 ? void 0 : res.flag) === 101) {
71
- message.success('删除成功');
72
- callback('delete');
73
- } else {
74
- message.error('删除失败');
75
- }
76
- }).catch(function () {
77
- changeLoading(false);
78
- });
79
- };
80
55
  var onBlur = function onBlur(e) {
81
56
  var value = e.target.value.trim();
82
57
  if (value === prevTitle || !value) return;
@@ -136,7 +111,7 @@ var EditTitle = function EditTitle(props) {
136
111
  onChange: onChange
137
112
  }), !curTitle ? /*#__PURE__*/React.createElement("span", {
138
113
  className: "".concat(classPrefix, "-error-tip")
139
- }, "\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A") : null)), type === 'edit' ? /*#__PURE__*/React.createElement("div", {
114
+ }, "\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A") : null)), type === 'edit' ? (/*#__PURE__*/React.createElement("div", {
140
115
  className: "".concat(classPrefix, "-option")
141
116
  }, /*#__PURE__*/React.createElement(Dropdown, {
142
117
  overlayClassName: "".concat(classPrefix, "-dropdown"),
@@ -167,7 +142,7 @@ var EditTitle = function EditTitle(props) {
167
142
  disabled: panelDisabled || buttonDisable || searching,
168
143
  type: "primary",
169
144
  onClick: onSaveAs
170
- }, "\u53E6\u5B58\u4E3A")) : /*#__PURE__*/React.createElement("div", {
145
+ }, "\u53E6\u5B58\u4E3A"))) : (/*#__PURE__*/React.createElement("div", {
171
146
  className: "".concat(classPrefix, "-title-btn")
172
147
  }, /*#__PURE__*/React.createElement(Button, {
173
148
  className: "attribution-btn",
@@ -180,10 +155,6 @@ var EditTitle = function EditTitle(props) {
180
155
  disabled: panelDisabled || buttonDisable || searching || !curTitle,
181
156
  type: "primary",
182
157
  onClick: onSaveAs
183
- }, "\u4FDD\u5B58")));
184
- };
185
- EditTitle.defaultProps = {
186
- title: '归因',
187
- type: 'edit'
158
+ }, "\u4FDD\u5B58"))));
188
159
  };
189
160
  export default EditTitle;
@@ -1,9 +1,9 @@
1
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
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(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
5
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
6
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
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;