@zgfe/modules-event 1.0.29-zhongyuanE.17 → 1.0.29-zhongyuanE.23

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/es/components/eventFilter/index.d.ts +5 -0
  2. package/es/components/eventFilter/index.js +315 -0
  3. package/es/components/eventFilter/setCascade.d.ts +3 -0
  4. package/es/components/eventFilter/setCascade.js +286 -0
  5. package/es/components/eventFilter/types.d.ts +21 -0
  6. package/es/components/eventFilter/types.js +1 -0
  7. package/es/components/index.d.ts +4 -0
  8. package/es/components/index.js +4 -0
  9. package/es/components/renderContent/index.d.ts +5 -0
  10. package/es/components/renderContent/index.js +46 -0
  11. package/es/components/renderContent/styles/index.less +19 -0
  12. package/es/components/renderContent/types.d.ts +8 -0
  13. package/es/components/renderContent/types.js +1 -0
  14. package/es/components/searchPanel/index.d.ts +5 -0
  15. package/es/components/searchPanel/index.js +134 -0
  16. package/es/components/searchPanel/styles/index.less +22 -0
  17. package/es/components/searchPanel/types.d.ts +28 -0
  18. package/es/components/searchPanel/types.js +1 -0
  19. package/es/components/table/index.d.ts +6 -0
  20. package/es/components/table/index.js +319 -0
  21. package/es/components/table/styles/index.css +236 -0
  22. package/es/components/table/styles/index.less +249 -0
  23. package/es/components/table/types.d.ts +10 -0
  24. package/es/components/table/types.js +1 -0
  25. package/es/components/topBar/index.d.ts +10 -0
  26. package/es/components/topBar/index.js +174 -0
  27. package/es/components/topBar/styles/index.less +58 -0
  28. package/es/components/topBar/types.d.ts +8 -0
  29. package/es/components/topBar/types.js +1 -0
  30. package/es/constants/apis.d.ts +10 -0
  31. package/es/constants/apis.js +10 -0
  32. package/es/constants/chart.d.ts +2 -0
  33. package/es/constants/chart.js +31 -0
  34. package/es/constants/color.d.ts +1 -0
  35. package/es/constants/color.js +1 -0
  36. package/es/constants/fields.d.ts +251 -0
  37. package/es/constants/fields.js +177 -0
  38. package/es/constants/index.d.ts +6 -0
  39. package/es/constants/index.js +6 -0
  40. package/es/constants/initData.d.ts +2 -0
  41. package/es/constants/initData.js +9 -0
  42. package/es/index.d.ts +6 -0
  43. package/es/index.js +5 -0
  44. package/es/modules/chart/demo/data.d.ts +73 -0
  45. package/es/modules/chart/demo/data.js +484 -0
  46. package/es/modules/chart/demo/index.d.ts +3 -0
  47. package/es/modules/chart/demo/index.js +51 -0
  48. package/es/modules/chart/demo/panel.d.ts +3 -0
  49. package/es/modules/chart/demo/panel.js +16 -0
  50. package/es/modules/chart/index.d.ts +4 -0
  51. package/es/modules/chart/index.js +253 -0
  52. package/es/modules/chart/types.d.ts +19 -0
  53. package/es/modules/chart/types.js +1 -0
  54. package/es/modules/content/index.d.ts +5 -0
  55. package/es/modules/content/index.js +302 -0
  56. package/es/modules/content/styles/index.less +19 -0
  57. package/es/modules/content/types.d.ts +11 -0
  58. package/es/modules/content/types.js +1 -0
  59. package/es/modules/content/utils.d.ts +18 -0
  60. package/es/modules/content/utils.js +134 -0
  61. package/es/modules/home/demo/create.d.ts +3 -0
  62. package/es/modules/home/demo/create.js +58 -0
  63. package/es/modules/home/demo/edit.d.ts +3 -0
  64. package/es/modules/home/demo/edit.js +73 -0
  65. package/es/modules/home/demo/index.d.ts +4 -0
  66. package/es/modules/home/demo/index.js +55 -0
  67. package/es/modules/home/demo/scene.d.ts +3 -0
  68. package/es/modules/home/demo/scene.js +89 -0
  69. package/es/modules/home/demo/styles/index.less +33 -0
  70. package/es/modules/home/index.d.ts +5 -0
  71. package/es/modules/home/index.js +184 -0
  72. package/es/modules/home/styles/index.less +49 -0
  73. package/es/modules/home/types.d.ts +34 -0
  74. package/es/modules/home/types.js +1 -0
  75. package/es/modules/topPanel/index.d.ts +5 -0
  76. package/es/modules/topPanel/index.js +246 -0
  77. package/es/modules/topPanel/styles/index.less +50 -0
  78. package/es/modules/topPanel/types.d.ts +46 -0
  79. package/es/modules/topPanel/types.js +1 -0
  80. package/es/style/theme.d.ts +15 -0
  81. package/es/style/theme.js +14 -0
  82. package/es/types.d.ts +86 -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 +20 -0
  89. package/es/utils/formData.js +406 -0
  90. package/es/utils/util.d.ts +32 -0
  91. package/es/utils/util.js +139 -0
  92. package/package.json +2 -2
package/es/types.d.ts ADDED
@@ -0,0 +1,86 @@
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
+ encryptionType?: number;
11
+ }
12
+ export interface AnalysisSubject {
13
+ subjectId?: number;
14
+ id?: number;
15
+ name?: string;
16
+ unit?: string;
17
+ subjectAlias?: string;
18
+ subjectName?: string;
19
+ analysisSubjectType?: string;
20
+ }
21
+ export interface eventProps {
22
+ id?: number;
23
+ eventGroupId?: number;
24
+ name?: string;
25
+ filters?: AttrConditionTypes.GroupValue;
26
+ dimension?: bizAttributeSelectorValueProp;
27
+ }
28
+ export interface SearchValue {
29
+ id?: number;
30
+ eventIds?: number[];
31
+ eventGroupId?: number;
32
+ name?: string;
33
+ platform?: number;
34
+ chartType?: EventChartTypes;
35
+ userGroup?: number[];
36
+ analysisIndex?: string;
37
+ analysisAttr?: string;
38
+ time?: DatePickerTypes.Value;
39
+ dimension?: bizAttributeSelectorValueProp;
40
+ filters?: AttrConditionTypes.GroupValue;
41
+ analysisSubject?: AnalysisSubject;
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 EventChartTypes = 'line' | 'bar' | 'pie' | 'map';
53
+ export interface ChartItemProp {
54
+ label?: string;
55
+ value: EventChartTypes;
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
+ sum?: number;
67
+ yValues: number[];
68
+ userGroupEventTimeSum: [{
69
+ [k: string]: number[];
70
+ }];
71
+ eventPvTitle: string;
72
+ }
73
+ export interface SeriesProps {
74
+ names?: string[];
75
+ values: number[];
76
+ originalNames?: string[];
77
+ index?: string;
78
+ duration?: TableChildrenProps[];
79
+ diyTarget?: boolean;
80
+ attrSum?: number;
81
+ }
82
+ export interface TableChildrenProps {
83
+ name: string;
84
+ values: number[];
85
+ }
86
+ 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;
@@ -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,20 @@
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 { EventProps } from '../modules/home/types';
7
+ import '../style/index.less';
8
+ export declare function sortOriginalData(data: any, sorter: any): any;
9
+ 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, onSelectEvent?: (id: number, name: string) => void): ColumnsType<EventProps.ColumnsDataType>;
10
+ export declare function getChartDataEventAliasName(dataSource: eventChartProps.ChartTypesProps, eventGroupList: EventGroup[] | undefined): eventChartProps.ChartTypesProps;
11
+ export declare function getEventAliasName(name: string, eventGroupList: EventGroup[] | undefined): string;
12
+ export declare function getEventAliasId(name: any, eventGroupList: EventGroup[] | undefined): number;
13
+ export declare function getSortData(data: ResponseDataProps): ResponseDataProps;
14
+ export declare function getUserGroupsCompareData(data: ResponseDataProps): ResponseDataProps;
15
+ export declare function marketEventGroupList(eventGroupList: EventGroup[] | undefined): string[];
16
+ export declare function getWarningId(searchData: SearchValue, eventData: ResponseDataProps, eventGroupList: EventGroup[] | undefined): number;
17
+ export declare function getAttrLabel(attrData: AttrConditionTypes.ItemValue, eventGroupList: EventGroup[] | undefined, userPropList: UserProp[] | undefined, eventEnvList: EnvProp[] | undefined): string | undefined;
18
+ export declare function formTableData(originalData: ResponseDataProps, userGroups: number[], attrNum: number, showList?: string[]): EventProps.ColumnsDataType[];
19
+ export declare function getDefaultShow(source: ResponseDataProps): string[];
20
+ export declare function getShowColor(source: ResponseDataProps, showList: string[]): string[];