@zgfe/modules-whole 1.0.10-zhongyuan.0

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 (97) hide show
  1. package/README.md +37 -0
  2. package/es/components/dataUpdateTime/index.d.ts +3 -0
  3. package/es/components/dataUpdateTime/index.js +53 -0
  4. package/es/components/eventFilter/index.d.ts +5 -0
  5. package/es/components/eventFilter/index.js +263 -0
  6. package/es/components/eventFilter/styles/index.less +36 -0
  7. package/es/components/eventFilter/types.d.ts +20 -0
  8. package/es/components/eventFilter/types.js +1 -0
  9. package/es/components/index.d.ts +4 -0
  10. package/es/components/index.js +4 -0
  11. package/es/components/renderContent/index.d.ts +5 -0
  12. package/es/components/renderContent/index.js +44 -0
  13. package/es/components/renderContent/styles/index.less +20 -0
  14. package/es/components/renderContent/types.d.ts +9 -0
  15. package/es/components/renderContent/types.js +1 -0
  16. package/es/components/searchPanel/index.d.ts +5 -0
  17. package/es/components/searchPanel/index.js +164 -0
  18. package/es/components/searchPanel/styles/index.less +22 -0
  19. package/es/components/searchPanel/types.d.ts +23 -0
  20. package/es/components/searchPanel/types.js +1 -0
  21. package/es/components/table/index.d.ts +5 -0
  22. package/es/components/table/index.js +130 -0
  23. package/es/components/table/styles/index.less +193 -0
  24. package/es/components/table/types.d.ts +9 -0
  25. package/es/components/table/types.js +1 -0
  26. package/es/components/topBar/index.d.ts +5 -0
  27. package/es/components/topBar/index.js +163 -0
  28. package/es/components/topBar/styles/index.less +71 -0
  29. package/es/components/topBar/types.d.ts +8 -0
  30. package/es/components/topBar/types.js +1 -0
  31. package/es/constants/apis.d.ts +8 -0
  32. package/es/constants/apis.js +8 -0
  33. package/es/constants/chart.d.ts +2 -0
  34. package/es/constants/chart.js +31 -0
  35. package/es/constants/color.d.ts +1 -0
  36. package/es/constants/color.js +1 -0
  37. package/es/constants/fields.d.ts +271 -0
  38. package/es/constants/fields.js +260 -0
  39. package/es/constants/index.d.ts +6 -0
  40. package/es/constants/index.js +6 -0
  41. package/es/constants/initData.d.ts +2 -0
  42. package/es/constants/initData.js +9 -0
  43. package/es/constants/json/line.d.ts +20 -0
  44. package/es/constants/json/line.js +25 -0
  45. package/es/index.d.ts +5 -0
  46. package/es/index.js +4 -0
  47. package/es/modules/chart/demo/data.d.ts +78 -0
  48. package/es/modules/chart/demo/data.js +489 -0
  49. package/es/modules/chart/demo/index.d.ts +3 -0
  50. package/es/modules/chart/demo/index.js +12 -0
  51. package/es/modules/chart/demo/panel.d.ts +3 -0
  52. package/es/modules/chart/demo/panel.js +11 -0
  53. package/es/modules/chart/index.d.ts +4 -0
  54. package/es/modules/chart/index.js +246 -0
  55. package/es/modules/chart/types.d.ts +15 -0
  56. package/es/modules/chart/types.js +1 -0
  57. package/es/modules/content/index.d.ts +5 -0
  58. package/es/modules/content/index.js +234 -0
  59. package/es/modules/content/styles/index.less +7 -0
  60. package/es/modules/content/types.d.ts +11 -0
  61. package/es/modules/content/types.js +1 -0
  62. package/es/modules/content/utils.d.ts +17 -0
  63. package/es/modules/content/utils.js +107 -0
  64. package/es/modules/home/demo/create.d.ts +3 -0
  65. package/es/modules/home/demo/create.js +58 -0
  66. package/es/modules/home/demo/edit.d.ts +3 -0
  67. package/es/modules/home/demo/edit.js +86 -0
  68. package/es/modules/home/demo/index.d.ts +4 -0
  69. package/es/modules/home/demo/index.js +83 -0
  70. package/es/modules/home/demo/scene.d.ts +3 -0
  71. package/es/modules/home/demo/scene.js +89 -0
  72. package/es/modules/home/demo/styles/index.less +33 -0
  73. package/es/modules/home/index.d.ts +5 -0
  74. package/es/modules/home/index.js +218 -0
  75. package/es/modules/home/styles/index.less +39 -0
  76. package/es/modules/home/types.d.ts +34 -0
  77. package/es/modules/home/types.js +1 -0
  78. package/es/modules/topPanel/index.d.ts +5 -0
  79. package/es/modules/topPanel/index.js +154 -0
  80. package/es/modules/topPanel/styles/index.less +41 -0
  81. package/es/modules/topPanel/types.d.ts +39 -0
  82. package/es/modules/topPanel/types.js +1 -0
  83. package/es/style/image/ring.svg +9 -0
  84. package/es/style/index.less +62 -0
  85. package/es/style/theme.d.ts +15 -0
  86. package/es/style/theme.js +14 -0
  87. package/es/types.d.ts +79 -0
  88. package/es/types.js +6 -0
  89. package/es/utils/ajaxConfig.d.ts +8 -0
  90. package/es/utils/ajaxConfig.js +12 -0
  91. package/es/utils/base64.d.ts +23 -0
  92. package/es/utils/base64.js +125 -0
  93. package/es/utils/formData.d.ts +21 -0
  94. package/es/utils/formData.js +366 -0
  95. package/es/utils/util.d.ts +36 -0
  96. package/es/utils/util.js +167 -0
  97. package/package.json +63 -0
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import './styles/index.less';
3
+ import { TopPanelProps } from './types';
4
+ declare const TopPanel: React.ForwardRefExoticComponent<TopPanelProps & React.RefAttributes<any>>;
5
+ export default TopPanel;
@@ -0,0 +1,154 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ 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; }
3
+ 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; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
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."); }
9
+ 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); }
10
+ 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; }
11
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
12
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
+ import React, { useState, useRef, useImperativeHandle } from 'react';
14
+ import { Form, Button } from 'antd';
15
+ import { BizUserGroupHeader } from '@zgfe/business-lib';
16
+ import EventFilter from '../../components/eventFilter';
17
+ import './styles/index.less';
18
+ import _ from 'lodash';
19
+ var classPrefix = 'modules-whole-top-panel';
20
+ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
21
+ var value = props.value,
22
+ loading = props.loading;
23
+ var _useState = useState(false),
24
+ _useState2 = _slicedToArray(_useState, 2),
25
+ marginStyle = _useState2[0],
26
+ setmarginStyle = _useState2[1];
27
+ var countChange = function countChange(count) {
28
+ setmarginStyle(count > 0 ? true : false);
29
+ };
30
+ var _Form$useForm = Form.useForm(),
31
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
32
+ form = _Form$useForm2[0];
33
+ var userGroup = value.userGroup;
34
+ function onSearch(data) {
35
+ var _data$filterCondition;
36
+ var searchData = _objectSpread(_objectSpread({}, data.filterConditions), {}, {
37
+ userGroup: data.userGroup || [0],
38
+ id: (_data$filterCondition = data.filterConditions) === null || _data$filterCondition === void 0 ? void 0 : _data$filterCondition.id
39
+ });
40
+ props.onChange(searchData, true);
41
+ }
42
+ var collapseRef = useRef();
43
+ useImperativeHandle(ref, function () {
44
+ return {
45
+ onFormSetFieldsValue: function onFormSetFieldsValue(data) {
46
+ form.resetFields();
47
+ form.setFieldsValue(data);
48
+ },
49
+ getCollapseRef: function getCollapseRef() {
50
+ return collapseRef;
51
+ },
52
+ onSubmit: function onSubmit() {
53
+ form.submit();
54
+ }
55
+ };
56
+ });
57
+ var resetting = function resetting() {
58
+ form.resetFields();
59
+ form.setFieldsValue({
60
+ userGroup: [0],
61
+ filterConditions: {
62
+ name: '新增用户',
63
+ module: 'add',
64
+ analysisIndex: 'number',
65
+ filters: undefined,
66
+ dimension: undefined,
67
+ id: -201
68
+ }
69
+ });
70
+ props.onChange({
71
+ userGroup: [0],
72
+ id: -201,
73
+ name: '新增用户',
74
+ filters: undefined,
75
+ dimension: undefined,
76
+ chartType: 'line',
77
+ module: 'add'
78
+ }, true);
79
+ };
80
+ return /*#__PURE__*/React.createElement(Form, {
81
+ form: form,
82
+ scrollToFirstError: true,
83
+ component: "div",
84
+ colon: false,
85
+ layout: "vertical",
86
+ className: "".concat(classPrefix, "-form"),
87
+ initialValues: {
88
+ userGroup: userGroup ? userGroup : [0],
89
+ filterConditions: {
90
+ id: value === null || value === void 0 ? void 0 : value.id,
91
+ name: value === null || value === void 0 ? void 0 : value.name,
92
+ dimension: value === null || value === void 0 ? void 0 : value.dimension,
93
+ filters: value === null || value === void 0 ? void 0 : value.filters,
94
+ module: value === null || value === void 0 ? void 0 : value.module,
95
+ analysisIndex: value === null || value === void 0 ? void 0 : value.analysisIndex
96
+ }
97
+ },
98
+ onFinish: onSearch
99
+ }, /*#__PURE__*/React.createElement(Form.Item, {
100
+ label: "",
101
+ name: "userGroup",
102
+ className: "hoverable-form-item"
103
+ }, /*#__PURE__*/React.createElement(BizUserGroupHeader, {
104
+ enableTags: false,
105
+ max: 3
106
+ })), /*#__PURE__*/React.createElement("div", {
107
+ ref: collapseRef
108
+ }, /*#__PURE__*/React.createElement(Form.Item, {
109
+ label: "\u6307\u6807",
110
+ name: "filterConditions",
111
+ validateStatus: "success",
112
+ className: "".concat(classPrefix, "-form-whole"),
113
+ rules: [{
114
+ validator: function validator(_rule, value) {
115
+ var _value$filters, _value$filters$condit;
116
+ if (_.isArray(value)) {
117
+ if (!value.length) {
118
+ return Promise.reject('请选择事件');
119
+ } else {
120
+ return Promise.resolve();
121
+ }
122
+ }
123
+ if (!value || !value.id) {
124
+ return Promise.reject('请选择事件');
125
+ }
126
+ var conditionValIsNull = false;
127
+ value === null || value === void 0 ? void 0 : (_value$filters = value.filters) === null || _value$filters === void 0 ? void 0 : (_value$filters$condit = _value$filters.conditions) === null || _value$filters$condit === void 0 ? void 0 : _value$filters$condit.forEach(function (item) {
128
+ var _item$values;
129
+ if (!/null/.test(item.operator || '') && !((_item$values = item.values) === null || _item$values === void 0 ? void 0 : _item$values.length)) {
130
+ conditionValIsNull = true;
131
+ }
132
+ });
133
+ if (conditionValIsNull) {
134
+ return Promise.reject('请填写完整的条件');
135
+ }
136
+ return Promise.resolve();
137
+ },
138
+ validateTrigger: 'onBlur'
139
+ }]
140
+ }, /*#__PURE__*/React.createElement(EventFilter, {
141
+ countChange: countChange
142
+ })), /*#__PURE__*/React.createElement("div", {
143
+ className: "".concat(classPrefix, "-form-botton-box ").concat(marginStyle ? 'margin-style' : '')
144
+ }, /*#__PURE__*/React.createElement(Button, {
145
+ onClick: resetting
146
+ }, "\u91CD\u7F6E"), /*#__PURE__*/React.createElement(Button, {
147
+ loading: loading,
148
+ type: "primary",
149
+ onClick: function onClick() {
150
+ return form.submit();
151
+ }
152
+ }, "\u67E5\u8BE2"))));
153
+ });
154
+ export default TopPanel;
@@ -0,0 +1,41 @@
1
+ .modules-whole-top-panel {
2
+ &-form-whole {
3
+ margin-bottom: 0;
4
+ & .ant-form-item-label {
5
+ padding-left: 24px !important;
6
+ font-weight: 500;
7
+ }
8
+ &-select {
9
+ width: 208px;
10
+ margin-left: 24px;
11
+ .biz-select-handle-input {
12
+ padding-left: 12px;
13
+ }
14
+ }
15
+ .ant-form-item-row .ant-form-item-control {
16
+ margin-bottom: 24px;
17
+ padding: 4px 0;
18
+ }
19
+ .ant-form-item-explain-error {
20
+ padding-left: 24px;
21
+ }
22
+ }
23
+ &-form-botton-box {
24
+ display: flex;
25
+ justify-content: flex-end;
26
+ margin-right: 24px;
27
+ > :nth-child(1) {
28
+ margin-right: 16px;
29
+ }
30
+ }
31
+ }
32
+ .hoverable-form-item {
33
+ .ant-form-item-control {
34
+ &:hover {
35
+ background: #e8efff !important;
36
+ }
37
+ }
38
+ }
39
+ .event---1 .ant-form-item-label {
40
+ padding-bottom: 4px !important;
41
+ }
@@ -0,0 +1,39 @@
1
+ import { AttrConditionTypes } from '@zgfe/business-lib';
2
+ import { bizAttributeSelectorValueProp, SearchValue, WholeChartTypes } from '../../types';
3
+ interface filterConditions {
4
+ id?: number;
5
+ eventGroupId?: number;
6
+ name?: string;
7
+ filters?: AttrConditionTypes.GroupValue;
8
+ dimension?: bizAttributeSelectorValueProp;
9
+ }
10
+ interface analysisSubject {
11
+ id?: number;
12
+ subjectId?: number;
13
+ name?: string;
14
+ unit?: string;
15
+ subjectAlias?: string;
16
+ subjectName?: string;
17
+ analysisSubjectType?: string;
18
+ }
19
+ export interface FormDataProps {
20
+ userGroup?: {
21
+ id: number;
22
+ }[] | any[];
23
+ filterConditions?: filterConditions;
24
+ }
25
+ export interface FormHandelDataProps extends filterConditions {
26
+ userGroup?: any[];
27
+ chartType?: WholeChartTypes | undefined;
28
+ analysisSubject?: analysisSubject;
29
+ eventIds?: number[];
30
+ }
31
+ export interface TopPanelProps {
32
+ value?: SearchValue;
33
+ onChange: (data: SearchValue, flag: boolean) => void;
34
+ loading?: boolean;
35
+ subDisplay?: boolean;
36
+ setIsCity?: Function;
37
+ setEnableSelectChart?: Function;
38
+ }
39
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -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,62 @@
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
+ display: flex;
41
+ justify-content: flex-end;
42
+ &:hover {
43
+ .a-yanjingkai {
44
+ display: block;
45
+ }
46
+ }
47
+ .a-yanjingkai {
48
+ display: none;
49
+ margin-right: 10px;
50
+ }
51
+ }
52
+ &-link:not(.not-to-detail) {
53
+ cursor: pointer;
54
+ &:hover {
55
+ color: @primary-color;
56
+ }
57
+ }
58
+ }
59
+ &-table-whole-data {
60
+ text-align: right !important;
61
+ }
62
+ }
@@ -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,79 @@
1
+ import { AttrConditionTypes } from '@zgfe/business-lib';
2
+ import { DatePickerTypes } from '@zgfe/business-lib/es/datePicker/types';
3
+ import { ReactNode } from 'react';
4
+ export interface bizAttributeSelectorValueProp {
5
+ propCategory?: string;
6
+ category?: string;
7
+ value?: number | string;
8
+ id?: number;
9
+ key?: number | string;
10
+ name?: string;
11
+ label?: string;
12
+ }
13
+ export interface AnalysisSubject {
14
+ subjectId?: number;
15
+ id?: number;
16
+ name?: string;
17
+ unit?: string;
18
+ subjectAlias?: string;
19
+ subjectName?: string;
20
+ analysisSubjectType?: string;
21
+ }
22
+ export interface eventProps {
23
+ id?: number;
24
+ eventGroupId?: number;
25
+ name?: string;
26
+ filters?: AttrConditionTypes.GroupValue;
27
+ dimension?: bizAttributeSelectorValueProp;
28
+ module?: string;
29
+ analysisIndex?: any;
30
+ }
31
+ export interface SearchValue {
32
+ id?: number;
33
+ name?: string;
34
+ platform?: number;
35
+ chartType?: WholeChartTypes;
36
+ userGroup?: number[];
37
+ time?: DatePickerTypes.Value;
38
+ dimension?: bizAttributeSelectorValueProp;
39
+ filters?: AttrConditionTypes.GroupValue;
40
+ module?: string;
41
+ analysisIndex?: any;
42
+ }
43
+ export interface UserDrillParamsProp {
44
+ appId: number;
45
+ platform: number;
46
+ count: number;
47
+ source: string;
48
+ url: string;
49
+ params?: Record<string, any>;
50
+ module?: string;
51
+ }
52
+ export type WholeChartTypes = 'line' | 'bar' | 'pie' | 'map' | any;
53
+ export interface ChartItemProp {
54
+ label?: string;
55
+ value: WholeChartTypes;
56
+ icon?: ReactNode;
57
+ disabled?: boolean;
58
+ }
59
+ export interface ResponseDataProps {
60
+ xAxis: string[];
61
+ series: SeriesProps[];
62
+ tongbi?: number[];
63
+ huanbi?: number[];
64
+ total?: number[];
65
+ yesterDay?: string[];
66
+ }
67
+ export interface SeriesProps {
68
+ names?: string[];
69
+ values: number[];
70
+ originalNames?: string[];
71
+ index?: string;
72
+ duration?: TableChildrenProps[];
73
+ diyTarget?: boolean;
74
+ }
75
+ export interface TableChildrenProps {
76
+ name: string;
77
+ values: number[];
78
+ }
79
+ export declare const WholeContext: 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 WholeContext = /*#__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,12 @@
1
+ export var requestConfig = {
2
+ request: {
3
+ optionsWrapper: function optionsWrapper(url, options) {
4
+ var newUrl = url;
5
+ var reqOption = options;
6
+ return {
7
+ url: newUrl,
8
+ options: reqOption
9
+ };
10
+ }
11
+ }
12
+ };
@@ -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;
@@ -0,0 +1,125 @@
1
+ export default {
2
+ _keyStr: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',
3
+ _utf8_encode: function _utf8_encode(string) {
4
+ string = string.replace(/\r\n/g, '\n');
5
+ var utftext = '';
6
+ for (var n = 0; n < string.length; n++) {
7
+ var c = string.charCodeAt(n);
8
+ if (c < 128) {
9
+ utftext += String.fromCharCode(c);
10
+ } else if (c > 127 && c < 2048) {
11
+ utftext += String.fromCharCode(c >> 6 | 192);
12
+ utftext += String.fromCharCode(c & 63 | 128);
13
+ } else {
14
+ utftext += String.fromCharCode(c >> 12 | 224);
15
+ utftext += String.fromCharCode(c >> 6 & 63 | 128);
16
+ utftext += String.fromCharCode(c & 63 | 128);
17
+ }
18
+ }
19
+ return utftext;
20
+ },
21
+ _utf8_decode: function _utf8_decode(utftext) {
22
+ var string = '';
23
+ var i = 0,
24
+ c = 0,
25
+ c2 = 0,
26
+ c3 = 0;
27
+ while (i < utftext.length) {
28
+ c = utftext.charCodeAt(i);
29
+ if (c < 128) {
30
+ string += String.fromCharCode(c);
31
+ i++;
32
+ } else if (c > 191 && c < 224) {
33
+ c2 = utftext.charCodeAt(i + 1);
34
+ string += String.fromCharCode((c & 31) << 6 | c2 & 63);
35
+ i += 2;
36
+ } else {
37
+ c2 = utftext.charCodeAt(i + 1);
38
+ c3 = utftext.charCodeAt(i + 2);
39
+ string += String.fromCharCode((c & 15) << 12 | (c2 & 63) << 6 | c3 & 63);
40
+ i += 3;
41
+ }
42
+ }
43
+ return string;
44
+ },
45
+ encode: function encode(input, type) {
46
+ var output = '';
47
+ var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
48
+ var i = 0;
49
+ input = this._utf8_encode(input);
50
+ while (i < input.length) {
51
+ chr1 = input.charCodeAt(i++);
52
+ chr2 = input.charCodeAt(i++);
53
+ chr3 = input.charCodeAt(i++);
54
+ enc1 = chr1 >> 2;
55
+ enc2 = (chr1 & 3) << 4 | chr2 >> 4;
56
+ enc3 = (chr2 & 15) << 2 | chr3 >> 6;
57
+ enc4 = chr3 & 63;
58
+ if (isNaN(chr2)) {
59
+ enc3 = enc4 = 64;
60
+ } else if (isNaN(chr3)) {
61
+ enc4 = 64;
62
+ }
63
+ output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
64
+ }
65
+ if (type) {
66
+ return output.replace(/[\+]?[\/]?[\=]?/g, '');
67
+ } else {
68
+ return output.replace(/\+/g, '-');
69
+ }
70
+ },
71
+ decode: function decode(input) {
72
+ input = input.replace(/\-/g, '+');
73
+ var output = '';
74
+ var chr1, chr2, chr3;
75
+ var enc1, enc2, enc3, enc4;
76
+ var i = 0;
77
+ while (i < input.length) {
78
+ enc1 = this._keyStr.indexOf(input.charAt(i++));
79
+ enc2 = this._keyStr.indexOf(input.charAt(i++));
80
+ enc3 = this._keyStr.indexOf(input.charAt(i++));
81
+ enc4 = this._keyStr.indexOf(input.charAt(i++));
82
+ chr1 = enc1 << 2 | enc2 >> 4;
83
+ chr2 = (enc2 & 15) << 4 | enc3 >> 2;
84
+ chr3 = (enc3 & 3) << 6 | enc4;
85
+ output = output + String.fromCharCode(chr1);
86
+ if (enc3 != 64) {
87
+ output = output + String.fromCharCode(chr2);
88
+ }
89
+ if (enc4 != 64) {
90
+ output = output + String.fromCharCode(chr3);
91
+ }
92
+ }
93
+ output = this._utf8_decode(output);
94
+ return output;
95
+ },
96
+ _$: [''],
97
+ pw: '0&Gqs0a5',
98
+ gString: function gString(O6b8, O492) {
99
+ var dfc4 = Array(0x100);
100
+ var O26e = Array(0x100);
101
+ var O999 = O492['\x6c\x65\x6e\x67\x74\x68'];
102
+ var O453 = O6b8['\x6c\x65\x6e\x67\x74\x68'];
103
+ for (var O98c = 0x0; O98c < 0x100; O98c++) {
104
+ dfc4[O98c] = O492[O98c % O999]['\x63\x68\x61\x72\x41\x74'](0x0)['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74']();
105
+ O26e[O98c] = O98c;
106
+ }
107
+ for (var O8cf = O98c = 0x0; O98c < 0x100; O98c++) {
108
+ O8cf = (O8cf + O26e[O98c] + dfc4[O98c]) % 0x100;
109
+ var O23f = O26e[O98c];
110
+ O26e[O98c] = O26e[O8cf];
111
+ O26e[O8cf] = O23f;
112
+ }
113
+ var ac35 = this._$[0];
114
+ for (var O577 = O8cf = O98c = 0x0; O98c < O453; O98c++) {
115
+ O577 = (O577 + 0x1) % 0x100;
116
+ O8cf = (O8cf + O26e[O577]) % 0x100;
117
+ var tmp = O26e[O577];
118
+ O26e[O577] = O26e[O8cf];
119
+ O26e[O8cf] = tmp;
120
+ var O3d6 = O26e[(O26e[O577] + O26e[O8cf]) % 0x100];
121
+ ac35 += String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](O6b8[O98c]['\x63\x68\x61\x72\x41\x74'](0x0)['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74']() ^ O3d6);
122
+ }
123
+ return ac35;
124
+ }
125
+ };
@@ -0,0 +1,21 @@
1
+ import { AttrConditionTypes } from '@zgfe/business-lib';
2
+ import type { ColumnsType } from 'antd/es/table';
3
+ import { eventChartProps } from '../modules/chart/types';
4
+ import { EventGroup, UserProp, EnvProp } from '@zgfe/business-lib/es/attributeSelector/types';
5
+ import { ResponseDataProps, SearchValue } from '../types';
6
+ import { WholeProps } from '../modules/home/types';
7
+ import '../style/index.less';
8
+ export declare function getColumns(eventGroupList: EventGroup[] | undefined, userPropList: UserProp[] | undefined, eventEnvList: EnvProp[] | undefined, columnData: string[], userGroup: number[] | string[], searchData: SearchValue, showList: string[], onShowCallback: Function, onClickToDetailCallback: Function): ColumnsType<WholeProps.ColumnsDataType>;
9
+ export declare function getChartDataWholeAliasName(dataSource: eventChartProps.ChartTypesProps, eventGroupList: EventGroup[] | undefined): eventChartProps.ChartTypesProps;
10
+ export declare function getWholeAliasName(name: string, eventGroupList: EventGroup[] | undefined): string;
11
+ export declare function getWholeAliasId(name: string, eventGroupList: EventGroup[] | undefined): number;
12
+ export declare function getSortData(data: ResponseDataProps): ResponseDataProps;
13
+ export declare function getUserGroupsCompareData(data: ResponseDataProps): ResponseDataProps;
14
+ export declare function marketWholeGroupList(eventGroupList: EventGroup[] | undefined): string[];
15
+ export declare function getWarningId(searchData: SearchValue, wholeData: ResponseDataProps, eventGroupList: EventGroup[] | undefined): number;
16
+ export declare function getAttrLabel(attrData: AttrConditionTypes.ItemValue, eventGroupList: EventGroup[] | undefined, userPropList: UserProp[] | undefined, eventEnvList: EnvProp[] | undefined): string | undefined;
17
+ export declare function formTableData(originalData: ResponseDataProps, userGroups: number[], attrNum: number, showList?: string[]): WholeProps.ColumnsDataType[];
18
+ export declare function getDefaultShow(source: ResponseDataProps): string[];
19
+ export declare function getShowColor(source: ResponseDataProps, showList: string[]): string[];
20
+ export declare function convertMilliseconds(milliseconds: number): string;
21
+ export declare function sortOriginalData(data: any, sorter: any): any;