@zgfe/modules-event 0.0.2-alpha.10

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 +174 -0
  7. package/es/components/eventFilter/styles/index.less +25 -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 +207 -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 +111 -0
  29. package/es/components/topBar/styles/index.less +49 -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 +154 -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 +266 -0
  58. package/es/modules/content/styles/index.less +18 -0
  59. package/es/modules/content/types.d.ts +11 -0
  60. package/es/modules/content/types.js +1 -0
  61. package/es/modules/content/utils.d.ts +5 -0
  62. package/es/modules/content/utils.js +37 -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 +89 -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 +86 -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 +124 -0
  74. package/es/modules/home/styles/index.less +44 -0
  75. package/es/modules/home/types.d.ts +19 -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 +61 -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 +227 -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,220 @@
1
+ export declare const platformOption: {
2
+ key: number;
3
+ value: string;
4
+ }[];
5
+ export declare const chartTypes: ({
6
+ label: string;
7
+ value: string;
8
+ icon: string;
9
+ children?: undefined;
10
+ disabled?: undefined;
11
+ } | {
12
+ label: string;
13
+ icon: string;
14
+ value: string;
15
+ children: ({
16
+ label: string;
17
+ value: string;
18
+ icon: string;
19
+ disabled?: undefined;
20
+ } | {
21
+ label: string;
22
+ value: string;
23
+ icon: string;
24
+ disabled: boolean;
25
+ })[];
26
+ disabled?: undefined;
27
+ } | {
28
+ label: string;
29
+ value: string;
30
+ icon: string;
31
+ disabled: boolean;
32
+ children?: undefined;
33
+ })[];
34
+ export declare const addPanelFields: ({
35
+ label: string;
36
+ name: string;
37
+ extendName: string;
38
+ type: string;
39
+ options: never[];
40
+ children: string[];
41
+ fieldNames: {
42
+ label: string;
43
+ value: string;
44
+ };
45
+ rules: {
46
+ required: boolean;
47
+ message: string;
48
+ }[];
49
+ direction?: undefined;
50
+ dependenceFields?: undefined;
51
+ } | {
52
+ label: string;
53
+ name: string;
54
+ type: string;
55
+ rules: {
56
+ required: boolean;
57
+ message: string;
58
+ }[];
59
+ extendName?: undefined;
60
+ options?: undefined;
61
+ children?: undefined;
62
+ fieldNames?: undefined;
63
+ direction?: undefined;
64
+ dependenceFields?: undefined;
65
+ } | {
66
+ label: string;
67
+ name: string;
68
+ type: string;
69
+ options: ({
70
+ label: string;
71
+ value: string;
72
+ icon: string;
73
+ children?: undefined;
74
+ disabled?: undefined;
75
+ } | {
76
+ label: string;
77
+ icon: string;
78
+ value: string;
79
+ children: ({
80
+ label: string;
81
+ value: string;
82
+ icon: string;
83
+ disabled?: undefined;
84
+ } | {
85
+ label: string;
86
+ value: string;
87
+ icon: string;
88
+ disabled: boolean;
89
+ })[];
90
+ disabled?: undefined;
91
+ } | {
92
+ label: string;
93
+ value: string;
94
+ icon: string;
95
+ disabled: boolean;
96
+ children?: undefined;
97
+ })[];
98
+ rules: {
99
+ required: boolean;
100
+ message: string;
101
+ }[];
102
+ extendName?: undefined;
103
+ children?: undefined;
104
+ fieldNames?: undefined;
105
+ direction?: undefined;
106
+ dependenceFields?: undefined;
107
+ } | {
108
+ label: string;
109
+ name: string;
110
+ type: string;
111
+ direction: string;
112
+ dependenceFields: {
113
+ chart: string;
114
+ };
115
+ options: {
116
+ label: string;
117
+ value: string;
118
+ }[];
119
+ rules: {
120
+ required: boolean;
121
+ message: string;
122
+ }[];
123
+ extendName?: undefined;
124
+ children?: undefined;
125
+ fieldNames?: undefined;
126
+ })[];
127
+ export declare const editPanelFields: ({
128
+ label: string;
129
+ name: string;
130
+ type: string;
131
+ options: ({
132
+ label: string;
133
+ value: string;
134
+ icon: string;
135
+ children?: undefined;
136
+ disabled?: undefined;
137
+ } | {
138
+ label: string;
139
+ icon: string;
140
+ value: string;
141
+ children: ({
142
+ label: string;
143
+ value: string;
144
+ icon: string;
145
+ disabled?: undefined;
146
+ } | {
147
+ label: string;
148
+ value: string;
149
+ icon: string;
150
+ disabled: boolean;
151
+ })[];
152
+ disabled?: undefined;
153
+ } | {
154
+ label: string;
155
+ value: string;
156
+ icon: string;
157
+ disabled: boolean;
158
+ children?: undefined;
159
+ })[];
160
+ rules: {
161
+ required: boolean;
162
+ message: string;
163
+ }[];
164
+ direction?: undefined;
165
+ dependenceFields?: undefined;
166
+ } | {
167
+ label: string;
168
+ name: string;
169
+ type: string;
170
+ direction: string;
171
+ dependenceFields: {
172
+ chart: string;
173
+ };
174
+ options: {
175
+ label: string;
176
+ value: string;
177
+ }[];
178
+ rules: {
179
+ required: boolean;
180
+ message: string;
181
+ }[];
182
+ })[];
183
+ export declare const addSceneFields: ({
184
+ label: string;
185
+ name: string;
186
+ type: string;
187
+ options: never[];
188
+ fieldNames: {
189
+ label: string;
190
+ value: string;
191
+ };
192
+ rules: {
193
+ required: boolean;
194
+ message: string;
195
+ }[];
196
+ } | {
197
+ label: string;
198
+ name: string;
199
+ type: string;
200
+ rules: {
201
+ required: boolean;
202
+ message: string;
203
+ }[];
204
+ options?: undefined;
205
+ fieldNames?: undefined;
206
+ })[];
207
+ export declare const indexObject: {
208
+ [key: string]: string;
209
+ };
210
+ export declare const BuiltinIndicators: {
211
+ id: number;
212
+ name: string;
213
+ eventList: {
214
+ name: string;
215
+ id: number;
216
+ type: string;
217
+ isBuiltIn: boolean;
218
+ attrList: never[];
219
+ }[];
220
+ };
@@ -0,0 +1,205 @@
1
+ export var platformOption = [{
2
+ key: 0,
3
+ value: '全部'
4
+ }, {
5
+ key: 1,
6
+ value: 'Android'
7
+ }, {
8
+ key: 2,
9
+ value: 'IOS'
10
+ }, {
11
+ key: 3,
12
+ value: 'JS'
13
+ }];
14
+ export var chartTypes = [{
15
+ label: '趋势图',
16
+ value: 'line',
17
+ icon: 'qushitu1'
18
+ }, {
19
+ label: '汇总图',
20
+ value: 'bar',
21
+ icon: 'huizongtu'
22
+ }, {
23
+ label: '占比图',
24
+ value: 'pie',
25
+ icon: 'bingtu'
26
+ }, {
27
+ label: '表格',
28
+ icon: 'biaoge',
29
+ value: 'grid',
30
+ children: [{
31
+ label: '',
32
+ value: 'line',
33
+ icon: 'qushitu1'
34
+ }, {
35
+ label: '',
36
+ value: 'bar',
37
+ icon: 'huizongtu'
38
+ }, {
39
+ label: '',
40
+ value: 'pie',
41
+ icon: 'bingtu'
42
+ }, {
43
+ label: '',
44
+ value: 'map',
45
+ icon: 'ditu',
46
+ disabled: true
47
+ }]
48
+ }, {
49
+ label: '地图',
50
+ value: 'map',
51
+ icon: 'ditu',
52
+ disabled: true
53
+ }, {
54
+ label: '数值',
55
+ value: 'number',
56
+ icon: 'fenshu',
57
+ disabled: true
58
+ }];
59
+ export var addPanelFields = [{
60
+ label: '看板',
61
+ name: 'panel',
62
+ extendName: 'range',
63
+ type: 'selectToInput',
64
+ options: [],
65
+ children: ['range'],
66
+ fieldNames: {
67
+ label: 'name',
68
+ value: 'id'
69
+ },
70
+ rules: [{
71
+ required: true,
72
+ message: '请选择看板'
73
+ }]
74
+ }, {
75
+ label: '名称',
76
+ name: 'name',
77
+ type: 'input',
78
+ rules: [{
79
+ required: true,
80
+ message: '请输入名称'
81
+ }]
82
+ }, {
83
+ label: '样式',
84
+ name: 'chart',
85
+ type: 'tab',
86
+ options: chartTypes,
87
+ rules: [{
88
+ required: true,
89
+ message: '请选择图表'
90
+ }]
91
+ }, {
92
+ label: '显示',
93
+ name: 'show',
94
+ type: 'radio',
95
+ direction: 'vertical',
96
+ dependenceFields: {
97
+ chart: 'line'
98
+ },
99
+ options: [{
100
+ label: '动态显示数据最多的10个分组',
101
+ value: 'dynamic'
102
+ }, {
103
+ label: '固定显示当前选择的分组',
104
+ value: 'fix'
105
+ }],
106
+ rules: [{
107
+ required: true,
108
+ message: '请选择'
109
+ }]
110
+ }];
111
+ export var editPanelFields = [{
112
+ label: '样式',
113
+ name: 'chart',
114
+ type: 'tab',
115
+ options: chartTypes,
116
+ rules: [{
117
+ required: true,
118
+ message: '请选择图表'
119
+ }]
120
+ }, {
121
+ label: '显示',
122
+ name: 'show',
123
+ type: 'radio',
124
+ direction: 'vertical',
125
+ dependenceFields: {
126
+ chart: 'line'
127
+ },
128
+ options: [{
129
+ label: '动态显示数据最多的10个分组',
130
+ value: 'dynamic'
131
+ }, {
132
+ label: '固定显示当前选择的分组',
133
+ value: 'fix'
134
+ }],
135
+ rules: [{
136
+ required: true,
137
+ message: '请选择'
138
+ }]
139
+ }];
140
+ export var addSceneFields = [{
141
+ label: '场景分类',
142
+ name: 'class',
143
+ type: 'selectToInput',
144
+ options: [],
145
+ fieldNames: {
146
+ label: 'groupName',
147
+ value: 'groupId'
148
+ },
149
+ rules: [{
150
+ required: true,
151
+ message: '请选择场景分类'
152
+ }]
153
+ }, {
154
+ label: '场景名称',
155
+ name: 'name',
156
+ type: 'input',
157
+ rules: [{
158
+ required: true,
159
+ message: '请输入场景名称'
160
+ }]
161
+ }];
162
+ export var indexObject = {
163
+ number: '人数',
164
+ times: '次数',
165
+ per: '人均次数',
166
+ sum: '总和',
167
+ avg: '均值',
168
+ duration_times: '分布',
169
+ median: '中位数'
170
+ };
171
+ export var BuiltinIndicators = {
172
+ id: -2,
173
+ name: '整体',
174
+ eventList: [{
175
+ name: '新增用户',
176
+ id: -201,
177
+ type: 'add',
178
+ isBuiltIn: true,
179
+ attrList: []
180
+ }, {
181
+ name: '活跃用户',
182
+ id: -202,
183
+ type: 'active',
184
+ isBuiltIn: true,
185
+ attrList: []
186
+ }, {
187
+ name: '访问次数',
188
+ id: -203,
189
+ type: 'times',
190
+ isBuiltIn: true,
191
+ attrList: []
192
+ }, {
193
+ name: '平均使用时长',
194
+ id: -204,
195
+ type: 'duration_avg',
196
+ isBuiltIn: true,
197
+ attrList: []
198
+ }, {
199
+ name: '使用时长分布',
200
+ id: -205,
201
+ type: 'duration',
202
+ isBuiltIn: true,
203
+ attrList: []
204
+ }]
205
+ };
@@ -0,0 +1,6 @@
1
+ import Apis from './apis';
2
+ import { chartTypeOptions } from './chart';
3
+ import { chartColors } from './color';
4
+ import { chartTypes, addPanelFields, editPanelFields, addSceneFields } from './fields';
5
+ import { getInitDate } from './initData';
6
+ export { Apis, chartTypeOptions, chartColors, chartTypes, addPanelFields, editPanelFields, addSceneFields, getInitDate, };
@@ -0,0 +1,6 @@
1
+ import Apis from './apis';
2
+ import { chartTypeOptions } from './chart';
3
+ import { chartColors } from './color';
4
+ import { chartTypes, addPanelFields, editPanelFields, addSceneFields } from './fields';
5
+ import { getInitDate } from './initData';
6
+ export { Apis, chartTypeOptions, chartColors, chartTypes, addPanelFields, editPanelFields, addSceneFields, getInitDate };
@@ -0,0 +1,2 @@
1
+ import { DatePickerTypes } from '@zgfe/business-lib/es/datePicker/types';
2
+ export declare function getInitDate(includeToday?: boolean): DatePickerTypes.Value;
@@ -0,0 +1,9 @@
1
+ import moment from 'moment';
2
+ export function getInitDate(includeToday) {
3
+ return {
4
+ unit: 'day',
5
+ relative: [7, 0],
6
+ begin: moment().subtract(7, 'days').format('YYYY-MM-DD'),
7
+ end: moment().subtract(includeToday ? 0 : 1, 'days').format('YYYY-MM-DD')
8
+ };
9
+ }
package/es/index.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ /// <reference path="../typings.d.ts" />
2
+ import EventChart from './modules/chart';
3
+ import ModuleEvent from './modules/home';
4
+ export { ModuleEvent, EventChart };
package/es/index.js ADDED
@@ -0,0 +1,3 @@
1
+ import EventChart from './modules/chart';
2
+ import ModuleEvent from './modules/home';
3
+ export { ModuleEvent, EventChart };
@@ -0,0 +1,79 @@
1
+ export declare const result: {
2
+ xAxis: string[];
3
+ series: ({
4
+ duration: never[];
5
+ index: string;
6
+ names: string[];
7
+ values: number[];
8
+ } | {
9
+ duration: {
10
+ name: string;
11
+ values: number[];
12
+ }[];
13
+ index: null;
14
+ names: string[];
15
+ values: number[];
16
+ })[];
17
+ };
18
+ export declare const totalResult: {
19
+ xAxis: string[];
20
+ series: ({
21
+ duration: never[];
22
+ index: string;
23
+ names: string[];
24
+ original_names: never[];
25
+ p_total: never[];
26
+ total: never[];
27
+ values: number[];
28
+ } | {
29
+ duration: never[];
30
+ index: null;
31
+ names: string[];
32
+ original_names: never[];
33
+ p_total: never[];
34
+ total: never[];
35
+ values: number[];
36
+ })[];
37
+ };
38
+ export declare const searchData: {
39
+ targets: {
40
+ type: string;
41
+ alias: string;
42
+ eventId: number;
43
+ eventName: string;
44
+ eventGroupId: number;
45
+ analysisDimension: {
46
+ analysisIndex: string;
47
+ };
48
+ }[];
49
+ userGroup: number[];
50
+ time: {
51
+ unit: string;
52
+ relative: number[];
53
+ begin: string;
54
+ end: string;
55
+ };
56
+ chartType: string;
57
+ };
58
+ export declare const totalSearchData: {
59
+ appId: number;
60
+ platform: number;
61
+ targets: {
62
+ type: string;
63
+ alias: string;
64
+ eventId: number;
65
+ eventName: string;
66
+ eventGroupId: number;
67
+ analysisDimension: {
68
+ analysisIndex: string;
69
+ };
70
+ }[];
71
+ userGroup: number[];
72
+ time: {
73
+ unit: string;
74
+ relative: number[];
75
+ begin: string;
76
+ end: string;
77
+ };
78
+ chartType: string;
79
+ };