@zgfe/modules-event 0.0.2-alpha.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 (92) hide show
  1. package/README.md +35 -0
  2. package/es/components/common/index.d.ts +6 -0
  3. package/es/components/common/index.js +17 -0
  4. package/es/components/common/styles/index.less +27 -0
  5. package/es/components/eventFilter/index.d.ts +4 -0
  6. package/es/components/eventFilter/index.js +160 -0
  7. package/es/components/eventFilter/styles/index.less +24 -0
  8. package/es/components/eventFilter/types.d.ts +11 -0
  9. package/es/components/eventFilter/types.js +1 -0
  10. package/es/components/index.d.ts +5 -0
  11. package/es/components/index.js +5 -0
  12. package/es/components/renderContent/index.d.ts +5 -0
  13. package/es/components/renderContent/index.js +54 -0
  14. package/es/components/renderContent/styles/index.less +24 -0
  15. package/es/components/renderContent/types.d.ts +12 -0
  16. package/es/components/renderContent/types.js +1 -0
  17. package/es/components/searchPanel/index.d.ts +5 -0
  18. package/es/components/searchPanel/index.js +107 -0
  19. package/es/components/searchPanel/styles/index.less +18 -0
  20. package/es/components/searchPanel/types.d.ts +16 -0
  21. package/es/components/searchPanel/types.js +1 -0
  22. package/es/components/table/index.d.ts +6 -0
  23. package/es/components/table/index.js +221 -0
  24. package/es/components/table/styles/index.less +87 -0
  25. package/es/components/table/types.d.ts +9 -0
  26. package/es/components/table/types.js +1 -0
  27. package/es/components/topBar/index.d.ts +4 -0
  28. package/es/components/topBar/index.js +105 -0
  29. package/es/components/topBar/styles/index.less +48 -0
  30. package/es/components/topBar/types.d.ts +7 -0
  31. package/es/components/topBar/types.js +1 -0
  32. package/es/constants/apis.d.ts +6 -0
  33. package/es/constants/apis.js +6 -0
  34. package/es/constants/chart.d.ts +2 -0
  35. package/es/constants/chart.js +31 -0
  36. package/es/constants/color.d.ts +1 -0
  37. package/es/constants/color.js +1 -0
  38. package/es/constants/fields.d.ts +220 -0
  39. package/es/constants/fields.js +205 -0
  40. package/es/constants/index.d.ts +6 -0
  41. package/es/constants/index.js +6 -0
  42. package/es/constants/initData.d.ts +2 -0
  43. package/es/constants/initData.js +9 -0
  44. package/es/index.d.ts +4 -0
  45. package/es/index.js +3 -0
  46. package/es/modules/chart/demo/data.d.ts +79 -0
  47. package/es/modules/chart/demo/data.js +490 -0
  48. package/es/modules/chart/demo/index.d.ts +2 -0
  49. package/es/modules/chart/demo/index.js +51 -0
  50. package/es/modules/chart/demo/panel.d.ts +2 -0
  51. package/es/modules/chart/demo/panel.js +30 -0
  52. package/es/modules/chart/index.d.ts +4 -0
  53. package/es/modules/chart/index.js +153 -0
  54. package/es/modules/chart/types.d.ts +15 -0
  55. package/es/modules/chart/types.js +1 -0
  56. package/es/modules/content/index.d.ts +5 -0
  57. package/es/modules/content/index.js +255 -0
  58. package/es/modules/content/styles/index.less +18 -0
  59. package/es/modules/content/types.d.ts +10 -0
  60. package/es/modules/content/types.js +1 -0
  61. package/es/modules/content/utils.d.ts +2 -0
  62. package/es/modules/content/utils.js +8 -0
  63. package/es/modules/home/demo/create.d.ts +2 -0
  64. package/es/modules/home/demo/create.js +50 -0
  65. package/es/modules/home/demo/edit.d.ts +2 -0
  66. package/es/modules/home/demo/edit.js +100 -0
  67. package/es/modules/home/demo/index.d.ts +3 -0
  68. package/es/modules/home/demo/index.js +50 -0
  69. package/es/modules/home/demo/scene.d.ts +2 -0
  70. package/es/modules/home/demo/scene.js +74 -0
  71. package/es/modules/home/demo/styles/index.less +33 -0
  72. package/es/modules/home/index.d.ts +5 -0
  73. package/es/modules/home/index.js +122 -0
  74. package/es/modules/home/styles/index.less +40 -0
  75. package/es/modules/home/types.d.ts +20 -0
  76. package/es/modules/home/types.js +1 -0
  77. package/es/style/image/noData.png +0 -0
  78. package/es/style/image/ring.svg +9 -0
  79. package/es/style/index.less +47 -0
  80. package/es/style/theme.d.ts +15 -0
  81. package/es/style/theme.js +14 -0
  82. package/es/types.d.ts +60 -0
  83. package/es/types.js +6 -0
  84. package/es/utils/ajaxConfig.d.ts +8 -0
  85. package/es/utils/ajaxConfig.js +40 -0
  86. package/es/utils/base64.d.ts +23 -0
  87. package/es/utils/base64.js +125 -0
  88. package/es/utils/formData.d.ts +10 -0
  89. package/es/utils/formData.js +226 -0
  90. package/es/utils/util.d.ts +32 -0
  91. package/es/utils/util.js +139 -0
  92. package/package.json +57 -0
@@ -0,0 +1,50 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
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; }
7
+ import { DemoWrapper, setGlobalConfig } from '@zgfe/business-lib';
8
+ import React, { useEffect, useState } from 'react';
9
+ import { ModuleEvent } from '../../../index';
10
+ import './styles/index.less';
11
+ import { requestConfig } from '../../../utils/ajaxConfig';
12
+ import { Button } from 'antd';
13
+ export default (function () {
14
+ var _useState = useState(false),
15
+ _useState2 = _slicedToArray(_useState, 2),
16
+ isDetail = _useState2[0],
17
+ setIsDetail = _useState2[1];
18
+ var _useState3 = useState(),
19
+ _useState4 = _slicedToArray(_useState3, 2),
20
+ detailParams = _useState4[0],
21
+ setDetailParams = _useState4[1];
22
+ var _useState5 = useState(),
23
+ _useState6 = _slicedToArray(_useState5, 2),
24
+ searchParams = _useState6[0],
25
+ setSearchParams = _useState6[1];
26
+ useEffect(function () {
27
+ setGlobalConfig(requestConfig);
28
+ }, []);
29
+ var afterEditTarget = function afterEditTarget(type, data) {
30
+ console.log("".concat(type, "\u56DE\u8C03"), data);
31
+ };
32
+ var onUserDrill = function onUserDrill(data, searchData) {
33
+ console.log('onUserDrill:', data, searchData);
34
+ setIsDetail(true);
35
+ setSearchParams(searchData);
36
+ setDetailParams(data);
37
+ };
38
+ return /*#__PURE__*/React.createElement(DemoWrapper, {
39
+ needMeta: true,
40
+ defaultApp: 204
41
+ }, isDetail ? /*#__PURE__*/React.createElement("div", null, JSON.stringify(detailParams), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Button, {
42
+ onClick: function onClick() {
43
+ return setIsDetail(false);
44
+ }
45
+ }, "\u8FD4\u56DE")) : /*#__PURE__*/React.createElement(ModuleEvent, {
46
+ defaultValue: searchParams,
47
+ afterEditTarget: afterEditTarget,
48
+ onUserDrill: onUserDrill
49
+ }));
50
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: () => JSX.Element;
2
+ export default _default;
@@ -0,0 +1,74 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
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; }
7
+ import React, { useEffect, useState } from 'react';
8
+ import { DemoWrapper, setGlobalConfig } from '@zgfe/business-lib';
9
+ import { ModuleEvent } from '../../../index';
10
+ import { requestConfig } from '../../../utils/ajaxConfig';
11
+ import { Button } from 'antd';
12
+ var defaultValue = {
13
+ source: 'SCENE',
14
+ data: {
15
+ app_id: 177,
16
+ targets: [{
17
+ type: 'event',
18
+ alias: '事件概览',
19
+ eventId: -100,
20
+ eventName: '事件概览',
21
+ eventGroupId: 0,
22
+ analysisDimension: {
23
+ analysisIndex: 'number'
24
+ }
25
+ }],
26
+ userGroup: [0],
27
+ time: {
28
+ unit: 'month',
29
+ relative: [3, 1],
30
+ begin: '2022-09-27',
31
+ end: '2022-12-27'
32
+ },
33
+ chartType: 'line'
34
+ },
35
+ chosen_data: []
36
+ };
37
+ export default (function () {
38
+ var _useState = useState(false),
39
+ _useState2 = _slicedToArray(_useState, 2),
40
+ isDetail = _useState2[0],
41
+ setIsDetail = _useState2[1];
42
+ var _useState3 = useState(),
43
+ _useState4 = _slicedToArray(_useState3, 2),
44
+ detailParams = _useState4[0],
45
+ setDetailParams = _useState4[1];
46
+ var _useState5 = useState(defaultValue),
47
+ _useState6 = _slicedToArray(_useState5, 2),
48
+ searchParams = _useState6[0],
49
+ setSearchParams = _useState6[1];
50
+ useEffect(function () {
51
+ setGlobalConfig(requestConfig);
52
+ }, []);
53
+ var afterEditTarget = function afterEditTarget(type, data) {
54
+ console.log("".concat(type, "\u56DE\u8C03"), data);
55
+ };
56
+ var onUserDrill = function onUserDrill(data, searchData) {
57
+ console.log('onUserDrill:', data, searchData);
58
+ setIsDetail(true);
59
+ setSearchParams(searchData);
60
+ setDetailParams(data);
61
+ };
62
+ return /*#__PURE__*/React.createElement(DemoWrapper, {
63
+ needMeta: true,
64
+ defaultApp: 254
65
+ }, isDetail ? /*#__PURE__*/React.createElement("div", null, JSON.stringify(detailParams), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Button, {
66
+ onClick: function onClick() {
67
+ return setIsDetail(false);
68
+ }
69
+ }, "\u8FD4\u56DE")) : /*#__PURE__*/React.createElement(ModuleEvent, {
70
+ defaultValue: searchParams,
71
+ afterEditTarget: afterEditTarget,
72
+ onUserDrill: onUserDrill
73
+ }));
74
+ });
@@ -0,0 +1,33 @@
1
+ /*滚动条凹槽的颜色,还可以设置边框属性 */
2
+ ::-webkit-scrollbar-track-piece {
3
+ background-color: #fff;
4
+ -webkit-border-radius: 10px;
5
+ -moz-border-radius: 10px;
6
+ border-radius: 10px;
7
+ }
8
+
9
+ /*滚动条的宽度*/
10
+ ::-webkit-scrollbar {
11
+ width: 10px;
12
+ height: 10px;
13
+ }
14
+
15
+ /*滚动条的设置*/
16
+ ::-webkit-scrollbar-thumb {
17
+ background-color: #cacdd4;
18
+ background-clip: padding-box;
19
+ border: 2px solid #fff;
20
+ -webkit-border-radius: 10px;
21
+ -moz-border-radius: 10px;
22
+ border-radius: 10px;
23
+ }
24
+
25
+ /*滚动条鼠标移上去*/
26
+ ::-webkit-scrollbar-thumb:hover {
27
+ // background-color: #bbb;
28
+ }
29
+
30
+ ::-webkit-scrollbar-track-piece {
31
+ width: 6px;
32
+ height: 6px;
33
+ }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import './styles/index.less';
3
+ import { EventProps } from './types';
4
+ declare const ModuleEvent: React.FC<EventProps.Props>;
5
+ export default ModuleEvent;
@@ -0,0 +1,122 @@
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(); }
5
+ 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; }
10
+ import React, { useContext, useEffect, useState } from 'react';
11
+ import { Spin } from 'antd';
12
+ import { BizGlobalDataContext, BizTargetFromPanel } from '@zgfe/business-lib';
13
+ import './styles/index.less';
14
+ import { EventContext } from '../../types';
15
+ import { getInitDate } from '../../constants/initData';
16
+ import EventContent from '../content';
17
+ import { chartTypes } from '../../constants';
18
+ var classPrefix = 'event-container';
19
+ var ModuleEvent = function ModuleEvent(props) {
20
+ var _useContext = useContext(BizGlobalDataContext),
21
+ userGroupList = _useContext.userGroupList,
22
+ currentApp = _useContext.currentApp;
23
+ var _useState = useState(),
24
+ _useState2 = _slicedToArray(_useState, 2),
25
+ searchData = _useState2[0],
26
+ setSearchData = _useState2[1];
27
+ var _useState3 = useState(false),
28
+ _useState4 = _slicedToArray(_useState3, 2),
29
+ loading = _useState4[0],
30
+ setLoading = _useState4[1];
31
+ var _useState5 = useState(true),
32
+ _useState6 = _slicedToArray(_useState5, 2),
33
+ pageLoading = _useState6[0],
34
+ setPageLoading = _useState6[1];
35
+ var _useState7 = useState(),
36
+ _useState8 = _slicedToArray(_useState7, 2),
37
+ title = _useState8[0],
38
+ setTitle = _useState8[1];
39
+ var _useState9 = useState(),
40
+ _useState10 = _slicedToArray(_useState9, 2),
41
+ panelId = _useState10[0],
42
+ setPanelId = _useState10[1];
43
+ var _useState11 = useState(),
44
+ _useState12 = _slicedToArray(_useState11, 2),
45
+ elementId = _useState12[0],
46
+ setElementId = _useState12[1];
47
+ var _useState13 = useState(),
48
+ _useState14 = _slicedToArray(_useState13, 2),
49
+ showList = _useState14[0],
50
+ setShowList = _useState14[1];
51
+ useEffect(function () {
52
+ setPageLoading(true);
53
+ if (!props.defaultValue) {
54
+ initSearch();
55
+ } else {
56
+ setShowList(props.defaultValue.chosen_data);
57
+ setPanelId(props.defaultValue.panelId);
58
+ setElementId(props.defaultValue.id);
59
+ setTitle(props.defaultValue.name);
60
+ setSearchData(props.defaultValue.data);
61
+ }
62
+ setTimeout(function () {
63
+ setPageLoading(false);
64
+ }, 0);
65
+ }, []);
66
+ var initSearch = function initSearch() {
67
+ setSearchData({
68
+ userGroup: (userGroupList === null || userGroupList === void 0 ? void 0 : userGroupList.length) > 0 ? [userGroupList[0].id] : [0],
69
+ time: getInitDate(props.includeToday),
70
+ chartType: 'line'
71
+ });
72
+ };
73
+ var changeLoading = function changeLoading(flag) {
74
+ setLoading(flag);
75
+ };
76
+ if (pageLoading) {
77
+ return /*#__PURE__*/React.createElement(Spin, null);
78
+ }
79
+ return /*#__PURE__*/React.createElement(Spin, {
80
+ spinning: loading,
81
+ wrapperClassName: classPrefix
82
+ }, /*#__PURE__*/React.createElement(BizTargetFromPanel, {
83
+ value: panelId ? {
84
+ panelId: panelId,
85
+ target: {
86
+ id: elementId,
87
+ name: title,
88
+ params: _objectSpread({
89
+ app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
90
+ module: 'event'
91
+ }, searchData)
92
+ }
93
+ } : undefined,
94
+ styleOptions: chartTypes,
95
+ afterEditTarget: props.afterEditTarget,
96
+ children: ""
97
+ }), !panelId && /*#__PURE__*/React.createElement("div", {
98
+ className: "".concat(classPrefix, "-header-title")
99
+ }, "\u4E8B\u4EF6\u5206\u6790"), /*#__PURE__*/React.createElement(EventContext.Provider, {
100
+ value: {
101
+ panelId: panelId,
102
+ elementId: elementId,
103
+ searchData: searchData,
104
+ setSearchData: setSearchData,
105
+ panelName: title,
106
+ includeToday: props.includeToday,
107
+ enableAddScene: props.enableAddScene && (!props.defaultValue || props.defaultValue.source === 'EVENT'),
108
+ changeLoading: changeLoading,
109
+ afterEditTarget: props.afterEditTarget,
110
+ onUserDrill: props.onUserDrill
111
+ }
112
+ }, /*#__PURE__*/React.createElement(EventContent, {
113
+ value: searchData,
114
+ show: showList,
115
+ onChange: setSearchData,
116
+ initSearch: initSearch
117
+ })));
118
+ };
119
+ ModuleEvent.defaultProps = {
120
+ includeToday: true
121
+ };
122
+ export default ModuleEvent;
@@ -0,0 +1,40 @@
1
+ .event-container {
2
+ width: 100%;
3
+ min-width: 1000px;
4
+ height: 100%;
5
+ overflow: hidden;
6
+ &-header-title {
7
+ height: 48px;
8
+ padding: 0px 24px;
9
+ color: #021429;
10
+ font-weight: 500;
11
+ font-size: 16px;
12
+ line-height: 48px;
13
+ background: #fff;
14
+ }
15
+ .biz-layout-top {
16
+ margin-top: 2px;
17
+ padding: 24px 24px 24px 0;
18
+ .biz-user-group-header {
19
+ .ant-space-item {
20
+ color: #5f6085;
21
+ }
22
+ }
23
+ }
24
+ .ant-spin-container {
25
+ width: 100%;
26
+ height: 100%;
27
+ }
28
+
29
+ .biz-select-option:not(.biz-select-option-multiple),
30
+ .biz-attr-select-option {
31
+ &.active {
32
+ background: @primary-color !important;
33
+ }
34
+ }
35
+
36
+ // 设置下拉框最大高度
37
+ .biz-select-overlay {
38
+ max-height: 300px;
39
+ }
40
+ }
@@ -0,0 +1,20 @@
1
+ import { SearchValue } from '../../types';
2
+ export declare namespace EventProps {
3
+ interface Props {
4
+ defaultValue?: Value;
5
+ includeToday?: boolean;
6
+ enableAddScene?: boolean;
7
+ afterEditTarget?: (type: string, value?: any) => void;
8
+ onUserDrill: (data: any, searchData: SearchValue) => void;
9
+ }
10
+ interface Value {
11
+ panelId?: number;
12
+ panelType?: 'edit' | 'add';
13
+ source?: string;
14
+ name?: string;
15
+ id?: number;
16
+ data?: any;
17
+ chosen_data?: string[];
18
+ [props: string]: any;
19
+ }
20
+ }
@@ -0,0 +1 @@
1
+ export {};
Binary file
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: rgb(255, 255, 255); display: block; shape-rendering: auto;" width="80px" height="80px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
3
+ <circle cx="50" cy="50" r="32" stroke-width="4" stroke="#165dff" stroke-dasharray="50.26548245743669 50.26548245743669" fill="none" stroke-linecap="round">
4
+ <animateTransform attributeName="transform" type="rotate" dur="1s" repeatCount="indefinite" keyTimes="0;1" values="0 50 50;360 50 50"></animateTransform>
5
+ </circle>
6
+ <circle cx="50" cy="50" r="27" stroke-width="4" stroke="#85adfc" stroke-dasharray="42.411500823462205 42.411500823462205" stroke-dashoffset="42.411500823462205" fill="none" stroke-linecap="round">
7
+ <animateTransform attributeName="transform" type="rotate" dur="1s" repeatCount="indefinite" keyTimes="0;1" values="0 50 50;-360 50 50"></animateTransform>
8
+ </circle>
9
+ <!-- [ldio] generated by https://loading.io/ --></svg>
@@ -0,0 +1,47 @@
1
+ @import '~@zgfe/business-lib/es/assets/styles/variable.less';
2
+ .event-form-data {
3
+ &-table-td {
4
+ padding: 0 !important;
5
+
6
+ &-show {
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: center;
10
+ min-width: 60px;
11
+ height: 48px;
12
+ cursor: pointer;
13
+ span {
14
+ width: 10px;
15
+ height: 10px;
16
+ border-radius: 50%;
17
+ cursor: pointer;
18
+ }
19
+ }
20
+
21
+ &-name {
22
+ display: flex;
23
+ align-items: center;
24
+ .bsicon {
25
+ margin-right: 4px;
26
+ color: #fd9f41;
27
+ }
28
+
29
+ &-content {
30
+ display: inline-block;
31
+ max-width: 300px;
32
+ overflow: hidden;
33
+ white-space: nowrap;
34
+ text-overflow: ellipsis;
35
+ cursor: pointer;
36
+ }
37
+ }
38
+
39
+ &-link {
40
+ cursor: pointer;
41
+ &:hover {
42
+ color: @primary-color;
43
+ text-decoration: underline;
44
+ }
45
+ }
46
+ }
47
+ }
@@ -0,0 +1,15 @@
1
+ declare const _default: {
2
+ 'primary-color': string;
3
+ 'border-color-base': string;
4
+ 'background-color-base': string;
5
+ 'text-color': string;
6
+ 'text-color-secondary': string;
7
+ 'tooltip-bg': string;
8
+ 'error-color': string;
9
+ 'shadow-color': string;
10
+ 'box-shadow-base': string;
11
+ 'btn-text-hover-bg': string;
12
+ 'warning-color': string;
13
+ 'border-color-split': string;
14
+ };
15
+ export default _default;
@@ -0,0 +1,14 @@
1
+ export default {
2
+ 'primary-color': '#165dff',
3
+ 'border-color-base': '#ECEDF0',
4
+ 'background-color-base': '#fafafb',
5
+ 'text-color': '#021429',
6
+ 'text-color-secondary': '#5f6085',
7
+ 'tooltip-bg': '#242541',
8
+ 'error-color': '#fb5547',
9
+ 'shadow-color': 'rgba(0, 0, 0, 0.1)',
10
+ 'box-shadow-base': '0px 4px 10px rgba(0, 0, 0, 0.1)',
11
+ 'btn-text-hover-bg': '#cacdd4',
12
+ 'warning-color': '#FD9F41',
13
+ 'border-color-split': '#E8EFFF'
14
+ };
package/es/types.d.ts ADDED
@@ -0,0 +1,60 @@
1
+ import { TargetConditionTypes, AttrConditionTypes, BizSelectTypes, AttributeSelect } from '@zgfe/business-lib';
2
+ import { DatePickerTypes } from '@zgfe/business-lib/es/datePicker/types';
3
+ import { ReactNode } from 'react';
4
+ export interface bizAttributeSelectorValueProp {
5
+ id?: number;
6
+ propCategory?: string;
7
+ name?: string;
8
+ category?: string;
9
+ label?: string;
10
+ dimensionSub?: string;
11
+ }
12
+ export interface eventProps {
13
+ id?: number;
14
+ name?: string;
15
+ filters?: AttrConditionTypes.GroupValue;
16
+ eventAttr?: bizAttributeSelectorValueProp;
17
+ }
18
+ export interface SearchValue {
19
+ chartType?: EventChartTypes;
20
+ userGroup?: number[];
21
+ analysisIndex?: string;
22
+ analysisAttr?: string;
23
+ time?: DatePickerTypes.Value;
24
+ filterConditions?: eventProps[];
25
+ }
26
+ export interface SearchData {
27
+ userGroup?: Array<BizSelectTypes.Option>;
28
+ targets: Array<TargetConditionTypes.Value>;
29
+ globalFilters?: AttrConditionTypes.GroupValue;
30
+ globalDimensions?: Array<AttributeSelect.Value>;
31
+ chartType?: EventChartTypes;
32
+ time?: DatePickerTypes.Value;
33
+ }
34
+ export type EventChartTypes = 'line' | 'bar' | 'pie' | 'map';
35
+ export interface ChartItemProp {
36
+ label?: string;
37
+ value: EventChartTypes;
38
+ icon?: ReactNode;
39
+ disabled?: boolean;
40
+ }
41
+ export interface ResponseDataProps {
42
+ xAxis: string[];
43
+ series: SeriesProps[];
44
+ tongbi?: number[];
45
+ huanbi?: number[];
46
+ total?: number[];
47
+ yesterDay?: string[];
48
+ }
49
+ export interface SeriesProps {
50
+ names?: string[];
51
+ values: number[];
52
+ index?: string;
53
+ duration?: TableChildrenProps[];
54
+ diyTarget?: boolean;
55
+ }
56
+ export interface TableChildrenProps {
57
+ name: string;
58
+ values: number[];
59
+ }
60
+ export declare const EventContext: import("react").Context<any>;
package/es/types.js ADDED
@@ -0,0 +1,6 @@
1
+ import { createContext } from 'react';
2
+ var defaultContext = {
3
+ onUserDrill: null,
4
+ defaultSearch: {}
5
+ };
6
+ export var EventContext = /*#__PURE__*/createContext(defaultContext);
@@ -0,0 +1,8 @@
1
+ export declare const requestConfig: {
2
+ request: {
3
+ optionsWrapper(url: string, options?: any): {
4
+ url: string;
5
+ options: any;
6
+ };
7
+ };
8
+ };
@@ -0,0 +1,40 @@
1
+ import _ from 'lodash';
2
+ function setOptionWapper(url, options) {
3
+ var reqOption = _.cloneDeep(options);
4
+ if (/^\/v1|\.jsp$/.test(url)) {
5
+ if (reqOption.headers && reqOption.headers['Content-Type'] === 'application/x-www-form-urlencoded') {
6
+ return reqOption;
7
+ }
8
+ reqOption.headers = {
9
+ 'Content-Type': 'application/x-www-form-urlencoded'
10
+ };
11
+ var transformRequest = function transformRequest(param) {
12
+ var arr = [];
13
+ for (var key in param) {
14
+ arr.push("".concat(key, "=").concat(encodeURIComponent(param[key])));
15
+ }
16
+ return arr.join('&');
17
+ };
18
+ reqOption.data = transformRequest(options.data);
19
+ }
20
+ return reqOption;
21
+ }
22
+ export var requestConfig = {
23
+ request: {
24
+ optionsWrapper: function optionsWrapper(url, options) {
25
+ var newUrl = url;
26
+ var reqOption = options;
27
+ var ajaxUrlReg = '/analysis/api/common/proxy';
28
+ if (/^\/v1|\.jsp$/.test(url)) {
29
+ if (ajaxUrlReg && !url.includes(ajaxUrlReg)) {
30
+ newUrl = ajaxUrlReg + url;
31
+ reqOption = setOptionWapper(url, options);
32
+ }
33
+ }
34
+ return {
35
+ url: newUrl,
36
+ options: reqOption
37
+ };
38
+ }
39
+ }
40
+ };
@@ -0,0 +1,23 @@
1
+ declare const _default: {
2
+ _keyStr: string;
3
+ _utf8_encode: (string: string) => string;
4
+ _utf8_decode: (utftext: string) => string;
5
+ encode: (input: string, type?: any) => string;
6
+ decode: (input: string) => string;
7
+ _$: string[];
8
+ pw: string;
9
+ gString: (O6b8: {
10
+ [x: string]: (arg0: number) => {
11
+ (): any;
12
+ new (): any;
13
+ [x: string]: () => any;
14
+ };
15
+ }[], O492: {
16
+ [x: string]: (arg0: number) => {
17
+ (): any;
18
+ new (): any;
19
+ [x: string]: () => any;
20
+ };
21
+ }[]) => string;
22
+ };
23
+ export default _default;