@zgfe/modules-event 1.0.6 → 1.0.29-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 (38) hide show
  1. package/es/components/eventFilter/index.js +72 -22
  2. package/es/components/eventFilter/setCascade.d.ts +3 -0
  3. package/es/components/eventFilter/setCascade.js +286 -0
  4. package/es/components/eventFilter/styles/index.less +114 -2
  5. package/es/components/renderContent/index.js +14 -25
  6. package/es/components/renderContent/types.d.ts +0 -1
  7. package/es/components/searchPanel/index.js +19 -6
  8. package/es/components/searchPanel/styles/index.less +5 -1
  9. package/es/components/searchPanel/types.d.ts +2 -2
  10. package/es/components/table/index.js +60 -9
  11. package/es/components/table/styles/index.less +48 -0
  12. package/es/components/table/types.d.ts +0 -1
  13. package/es/components/topBar/index.d.ts +6 -1
  14. package/es/components/topBar/index.js +39 -22
  15. package/es/components/topBar/styles/index.less +24 -29
  16. package/es/components/topBar/types.d.ts +0 -1
  17. package/es/constants/apis.d.ts +3 -1
  18. package/es/constants/apis.js +4 -2
  19. package/es/constants/fields.d.ts +0 -14
  20. package/es/constants/fields.js +1 -45
  21. package/es/modules/chart/demo/panel.js +7 -2
  22. package/es/modules/chart/index.js +105 -36
  23. package/es/modules/chart/types.d.ts +3 -0
  24. package/es/modules/content/index.d.ts +1 -1
  25. package/es/modules/content/index.js +94 -55
  26. package/es/modules/content/styles/index.less +12 -0
  27. package/es/modules/content/utils.d.ts +1 -1
  28. package/es/modules/content/utils.js +19 -18
  29. package/es/modules/home/demo/edit.js +6 -7
  30. package/es/modules/home/demo/index.js +1 -1
  31. package/es/modules/home/index.js +53 -35
  32. package/es/modules/home/styles/index.less +4 -4
  33. package/es/modules/topPanel/index.js +36 -8
  34. package/es/modules/topPanel/styles/index.less +5 -4
  35. package/es/types.d.ts +6 -0
  36. package/es/utils/formData.d.ts +2 -1
  37. package/es/utils/formData.js +39 -9
  38. package/package.json +24 -20
@@ -10,7 +10,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
10
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
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
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
- import React, { useContext, useEffect, useState } from 'react';
13
+ import React, { useContext, useEffect, useState, useRef } from 'react';
14
14
  import { Spin } from 'antd';
15
15
  import { BizGlobalDataContext, BizTargetFromPanel } from '@zgfe/business-lib';
16
16
  import './styles/index.less';
@@ -26,11 +26,16 @@ var ModuleEvent = function ModuleEvent(props) {
26
26
  eventGroupList = _useContext.eventGroupList,
27
27
  eventEnvList = _useContext.eventEnvList,
28
28
  userPropList = _useContext.userPropList,
29
- userGroupList = _useContext.userGroupList;
29
+ userGroupList = _useContext.userGroupList,
30
+ useBizStoreLoading = _useContext.useBizStoreLoading;
30
31
  var _useState = useState(),
31
32
  _useState2 = _slicedToArray(_useState, 2),
32
33
  searchData = _useState2[0],
33
34
  setSearchData = _useState2[1];
35
+ var _useState3 = useState(),
36
+ _useState4 = _slicedToArray(_useState3, 2),
37
+ completedSearchData = _useState4[0],
38
+ setCompletedSearchData = _useState4[1];
34
39
  var onChangeUrlParam = function onChangeUrlParam(data) {
35
40
  clearTimeout(onChangeTimer);
36
41
  onChangeTimer = setTimeout(function () {
@@ -39,39 +44,39 @@ var ModuleEvent = function ModuleEvent(props) {
39
44
  });
40
45
  }, 500);
41
46
  };
42
- var _useState3 = useState(),
43
- _useState4 = _slicedToArray(_useState3, 2),
44
- selectEventData = _useState4[0],
45
- setSelectEventData = _useState4[1];
46
47
  var _useState5 = useState(true),
47
48
  _useState6 = _slicedToArray(_useState5, 2),
48
49
  loading = _useState6[0],
49
50
  setLoading = _useState6[1];
50
- var _useState7 = useState(true),
51
+ var _useState7 = useState(false),
51
52
  _useState8 = _slicedToArray(_useState7, 2),
52
- pageLoading = _useState8[0],
53
- setPageLoading = _useState8[1];
54
- var _useState9 = useState(),
53
+ refreshLoading = _useState8[0],
54
+ setRefreshLoading = _useState8[1];
55
+ var _useState9 = useState(true),
55
56
  _useState10 = _slicedToArray(_useState9, 2),
56
- title = _useState10[0],
57
- setTitle = _useState10[1];
57
+ pageLoading = _useState10[0],
58
+ setPageLoading = _useState10[1];
58
59
  var _useState11 = useState(),
59
60
  _useState12 = _slicedToArray(_useState11, 2),
60
- panelId = _useState12[0],
61
- setPanelId = _useState12[1];
61
+ title = _useState12[0],
62
+ setTitle = _useState12[1];
62
63
  var _useState13 = useState(),
63
64
  _useState14 = _slicedToArray(_useState13, 2),
64
- elementId = _useState14[0],
65
- setElementId = _useState14[1];
65
+ panelId = _useState14[0],
66
+ setPanelId = _useState14[1];
66
67
  var _useState15 = useState(),
67
68
  _useState16 = _slicedToArray(_useState15, 2),
68
- showList = _useState16[0],
69
- setShowList = _useState16[1];
69
+ elementId = _useState16[0],
70
+ setElementId = _useState16[1];
71
+ var _useState17 = useState(),
72
+ _useState18 = _slicedToArray(_useState17, 2),
73
+ showListHome = _useState18[0],
74
+ setShowListHome = _useState18[1];
70
75
  useEffect(function () {
71
76
  setPageLoading(true);
72
77
  if (props.defaultValue) {
73
78
  var _props$defaultValue;
74
- setShowList(props.defaultValue.chosen_data);
79
+ setShowListHome(props.defaultValue.chosen_data);
75
80
  setPanelId(props.defaultValue.panelId);
76
81
  setTitle(props.defaultValue.name);
77
82
  if ((_props$defaultValue = props.defaultValue) === null || _props$defaultValue === void 0 ? void 0 : _props$defaultValue.id) {
@@ -95,23 +100,33 @@ var ModuleEvent = function ModuleEvent(props) {
95
100
  chartType: 'line'
96
101
  });
97
102
  };
103
+ var eventContentRef = useRef();
98
104
  var onSelectEvent = function onSelectEvent(id, name) {
99
105
  if ((searchData === null || searchData === void 0 ? void 0 : searchData.id) === undefined) {
100
- setSelectEventData({
106
+ var _eventContentRef$curr;
107
+ setSearchData({
108
+ id: id,
109
+ name: name,
101
110
  analysisIndex: searchData === null || searchData === void 0 ? void 0 : searchData.analysisIndex,
102
111
  chartType: searchData === null || searchData === void 0 ? void 0 : searchData.chartType,
103
112
  time: searchData === null || searchData === void 0 ? void 0 : searchData.time,
104
- userGroup: searchData === null || searchData === void 0 ? void 0 : searchData.userGroup,
105
- id: id,
106
- name: name
113
+ userGroup: searchData === null || searchData === void 0 ? void 0 : searchData.userGroup
114
+ });
115
+ eventContentRef === null || eventContentRef === void 0 ? void 0 : (_eventContentRef$curr = eventContentRef.current) === null || _eventContentRef$curr === void 0 ? void 0 : _eventContentRef$curr.onFormSetFieldsValue({
116
+ filterConditions: {
117
+ id: id,
118
+ name: name
119
+ },
120
+ userGroup: searchData === null || searchData === void 0 ? void 0 : searchData.userGroup
107
121
  });
108
122
  }
109
123
  };
110
- if (pageLoading) {
124
+ if (pageLoading || useBizStoreLoading) {
111
125
  return /*#__PURE__*/React.createElement(Spin, null);
112
126
  }
113
- return /*#__PURE__*/React.createElement("div", {
114
- className: classPrefix
127
+ return /*#__PURE__*/React.createElement(Spin, {
128
+ spinning: false,
129
+ wrapperClassName: classPrefix
115
130
  }, /*#__PURE__*/React.createElement(BizTargetFromPanel, {
116
131
  value: panelId ? {
117
132
  panelId: panelId,
@@ -122,18 +137,21 @@ var ModuleEvent = function ModuleEvent(props) {
122
137
  app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
123
138
  module: 'event'
124
139
  }, searchData),
125
- showList: showList
140
+ showList: showListHome
126
141
  }
127
142
  } : undefined,
128
143
  disabled: props === null || props === void 0 ? void 0 : props.panelDisabled,
129
144
  styleOptions: chartTypes,
130
145
  afterEditTarget: props.afterEditTarget
131
- }), !panelId && /*#__PURE__*/React.createElement("div", {
132
- className: "".concat(classPrefix, "-header-title")
133
- }, "\u4E8B\u4EF6\u5206\u6790"), /*#__PURE__*/React.createElement(EventContext.Provider, {
146
+ }, /*#__PURE__*/React.createElement(EventContext.Provider, {
134
147
  value: {
148
+ refreshLoading: refreshLoading,
149
+ setRefreshLoading: setRefreshLoading,
150
+ currentApp: currentApp,
135
151
  loading: loading,
136
152
  setLoading: setLoading,
153
+ showListHome: showListHome,
154
+ setShowListHome: setShowListHome,
137
155
  panelId: panelId,
138
156
  elementId: elementId,
139
157
  eventGroupList: eventGroupList,
@@ -141,8 +159,9 @@ var ModuleEvent = function ModuleEvent(props) {
141
159
  userPropList: userPropList,
142
160
  searchData: searchData,
143
161
  setSearchData: setSearchData,
162
+ completedSearchData: completedSearchData,
163
+ setCompletedSearchData: setCompletedSearchData,
144
164
  onChangeUrlParam: onChangeUrlParam,
145
- selectEventData: selectEventData,
146
165
  onSelectEvent: onSelectEvent,
147
166
  panelName: title,
148
167
  includeToday: props.includeToday,
@@ -154,11 +173,10 @@ var ModuleEvent = function ModuleEvent(props) {
154
173
  }
155
174
  }, /*#__PURE__*/React.createElement(EventContent, {
156
175
  elementId: elementId,
176
+ ref: eventContentRef,
157
177
  value: searchData,
158
- show: showList,
159
- initSearch: initSearch,
160
- onChangeShow: setShowList
161
- })));
178
+ initSearch: initSearch
179
+ }))));
162
180
  };
163
181
  ModuleEvent.defaultProps = {
164
182
  includeToday: true
@@ -1,11 +1,11 @@
1
1
  .event-module-container {
2
2
  width: 100%;
3
3
  min-width: 1000px;
4
- height: auto;
4
+ height: 100% !important;
5
5
  background: #fafafb;
6
6
  &-header-title {
7
7
  height: 48px;
8
- padding: 0px 24px;
8
+ padding: 0px 16px;
9
9
  color: #021429;
10
10
  font-weight: 500;
11
11
  font-size: 16px;
@@ -14,7 +14,7 @@
14
14
  }
15
15
  .biz-layout-top {
16
16
  margin-top: 2px;
17
- padding-top: 0;
17
+ padding: 0 16px 16px;
18
18
  .biz-user-group-header {
19
19
  .ant-space-item {
20
20
  color: #5f6085;
@@ -23,7 +23,7 @@
23
23
  }
24
24
  .ant-spin-container {
25
25
  width: 100%;
26
- // height: 100%;
26
+ height: 100%;
27
27
  }
28
28
 
29
29
  .biz-select-option:not(.biz-select-option-multiple),
@@ -10,14 +10,17 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
10
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
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
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
- import React, { useState, useEffect } from 'react';
14
- import { Form, Button } from 'antd';
15
- import { BizUserGroupHeader, BizSelect, useSubject } from '@zgfe/business-lib';
13
+ import React, { useState, useEffect, useRef, useImperativeHandle, useContext } from 'react';
14
+ import { Form, Button, Tooltip } from 'antd';
15
+ import { BizUserGroupHeader, BizSelect, useSubject, IconFont } from '@zgfe/business-lib';
16
16
  import EventFilter from '../../components/eventFilter';
17
17
  import './styles/index.less';
18
18
  import _ from 'lodash';
19
+ import { EventContext } from '../../types';
19
20
  var classPrefix = 'modules-event-top-panel';
20
21
  var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
22
+ var _useContext = useContext(EventContext),
23
+ currentApp = _useContext.currentApp;
21
24
  var value = props.value,
22
25
  setIsCity = props.setIsCity,
23
26
  setEnableSelectChart = props.setEnableSelectChart,
@@ -62,6 +65,21 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
62
65
  });
63
66
  props.onChange(searchData, true);
64
67
  }
68
+ var collapseRef = useRef();
69
+ useImperativeHandle(ref, function () {
70
+ return {
71
+ onFormSetFieldsValue: function onFormSetFieldsValue(data) {
72
+ form.resetFields();
73
+ form.setFieldsValue(data);
74
+ },
75
+ getCollapseRef: function getCollapseRef() {
76
+ return collapseRef;
77
+ },
78
+ submit: function submit() {
79
+ return form.submit();
80
+ }
81
+ };
82
+ });
65
83
  var resetting = function resetting() {
66
84
  form.resetFields();
67
85
  form.setFieldsValue({
@@ -115,12 +133,22 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
115
133
  scrollToFirstError: true,
116
134
  onFinish: onSearch
117
135
  }, !subDisplay ? null : /*#__PURE__*/React.createElement(Form.Item, {
118
- label: "\u5206\u6790\u4E3B\u4F53",
136
+ label: /*#__PURE__*/React.createElement("div", {
137
+ className: "".concat(classPrefix, "-label-hasIcon")
138
+ }, /*#__PURE__*/React.createElement("span", null, "\u7EDF\u8BA1\u53E3\u5F84"), "\xA0\xA0", /*#__PURE__*/React.createElement(Tooltip, {
139
+ title: "\u5E2E\u52A9",
140
+ placement: "top"
141
+ }, /*#__PURE__*/React.createElement(IconFont, {
142
+ type: "bangzhu",
143
+ onClick: function onClick() {
144
+ return window.open('https://docs.zhugeio.com/datamanager/Statistical_caliber.html', '_blank');
145
+ }
146
+ }))),
119
147
  className: "".concat(classPrefix, "-form-event hoverable-form-item")
120
148
  }, /*#__PURE__*/React.createElement(BizSelect, {
121
149
  className: "".concat(classPrefix, "-form-event-select"),
122
150
  options: [{
123
- label: '用户',
151
+ label: (currentApp === null || currentApp === void 0 ? void 0 : currentApp.type) != 'user' ? '主体' : '用户',
124
152
  value: 'user'
125
153
  }, {
126
154
  label: '事件属性',
@@ -146,7 +174,7 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
146
174
  max: 3,
147
175
  enableTags: true
148
176
  })) : /*#__PURE__*/React.createElement(Form.Item, {
149
- label: "\u4E3B\u4F53\u540D\u79F0",
177
+ label: "\u53E3\u5F84\u540D\u79F0",
150
178
  name: "analysisSubject",
151
179
  className: "".concat(classPrefix, "-form-event hoverable-form-item"),
152
180
  rules: [{
@@ -154,7 +182,7 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
154
182
  if (value && (value.id || value.subjectId)) {
155
183
  return Promise.resolve();
156
184
  } else {
157
- return Promise.reject('请选择分析主体');
185
+ return Promise.reject('请选择口径名称');
158
186
  }
159
187
  }
160
188
  }]
@@ -165,7 +193,7 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
165
193
  labelField: "subjectName",
166
194
  keyField: "id"
167
195
  })), /*#__PURE__*/React.createElement("div", {
168
- ref: ref
196
+ ref: collapseRef
169
197
  }, /*#__PURE__*/React.createElement(Form.Item, {
170
198
  label: "\u4E8B\u4EF6",
171
199
  name: "filterConditions",
@@ -31,10 +31,11 @@
31
31
  border-color: #29bd52;
32
32
  }
33
33
  }
34
- &-form {
35
- // .ant-form-item-has-error .biz-event-select {
36
- // border: 1px solid @error-color !important;
37
- // }
34
+
35
+ &-label-hasIcon {
36
+ .bsicon {
37
+ cursor: pointer;
38
+ }
38
39
  }
39
40
  }
40
41
  .hoverable-form-item {
package/es/types.d.ts CHANGED
@@ -62,6 +62,12 @@ export interface ResponseDataProps {
62
62
  huanbi?: number[];
63
63
  total?: number[];
64
64
  yesterDay?: string[];
65
+ sum?: number;
66
+ yValues: number[];
67
+ userGroupEventTimeSum: [{
68
+ [k: string]: number[];
69
+ }];
70
+ eventPvTitle: string;
65
71
  }
66
72
  export interface SeriesProps {
67
73
  names?: string[];
@@ -5,10 +5,11 @@ import { EventGroup, UserProp, EnvProp } from '@zgfe/business-lib/es/attributeSe
5
5
  import { ResponseDataProps, SearchValue } from '../types';
6
6
  import { EventProps } from '../modules/home/types';
7
7
  import '../style/index.less';
8
+ export declare function sortOriginalData(data: any, sorter: any): any;
8
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>;
9
10
  export declare function getChartDataEventAliasName(dataSource: eventChartProps.ChartTypesProps, eventGroupList: EventGroup[] | undefined): eventChartProps.ChartTypesProps;
10
11
  export declare function getEventAliasName(name: string, eventGroupList: EventGroup[] | undefined): string;
11
- export declare function getEventAliasId(name: string, eventGroupList: EventGroup[] | undefined): number;
12
+ export declare function getEventAliasId(name: any, eventGroupList: EventGroup[] | undefined): number;
12
13
  export declare function getSortData(data: ResponseDataProps): ResponseDataProps;
13
14
  export declare function getUserGroupsCompareData(data: ResponseDataProps): ResponseDataProps;
14
15
  export declare function marketEventGroupList(eventGroupList: EventGroup[] | undefined): string[];
@@ -1,3 +1,9 @@
1
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread 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 _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
6
+ 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; }
1
7
  import { util, IconFont } from '@zgfe/business-lib';
2
8
  import React from 'react';
3
9
  import { message } from 'antd';
@@ -9,6 +15,23 @@ import { Tooltip } from 'antd';
9
15
  import '../style/index.less';
10
16
  import { getValue } from '../modules/content/utils';
11
17
  var classPrefix = 'event-form-data';
18
+ export function sortOriginalData(data, sorter) {
19
+ var columnKey = sorter.columnKey,
20
+ order = sorter.order;
21
+ if (columnKey && order) {
22
+ var sortedData = _toConsumableArray(data).sort(function (a, b) {
23
+ if (order === 'ascend') {
24
+ return a[columnKey] - b[columnKey];
25
+ } else if (order === 'descend') {
26
+ return b[columnKey] - a[columnKey];
27
+ }
28
+ return 0;
29
+ });
30
+ return sortedData;
31
+ } else {
32
+ return data;
33
+ }
34
+ }
12
35
  export function getColumns(eventGroupList, userPropList, eventEnvList, columnData, userGroup, searchData, showList, onShowCallback, onClickToDetailCallback, onSelectEvent) {
13
36
  var marketEventNameList = marketEventGroupList(eventGroupList);
14
37
  var data = [{
@@ -23,7 +46,7 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
23
46
  render: function render(_, record) {
24
47
  var isActive = showList.includes(record.nameGroup);
25
48
  var cannotClick = showList.length >= 10 && !isActive;
26
- return /*#__PURE__*/React.createElement("div", {
49
+ return record.color ? /*#__PURE__*/React.createElement("div", {
27
50
  className: "".concat(classPrefix, "-table-td-show"),
28
51
  onClick: function onClick() {
29
52
  if (cannotClick) return;
@@ -33,7 +56,9 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
33
56
  style: {
34
57
  background: isActive ? record.color : '#D9D9D9'
35
58
  }
36
- }));
59
+ })) : /*#__PURE__*/React.createElement("div", {
60
+ className: "".concat(classPrefix, "-table-td-show")
61
+ });
37
62
  }
38
63
  }];
39
64
  if (!(searchData === null || searchData === void 0 ? void 0 : searchData.analysisSubject) && (userGroup.length > 1 || userGroup[0] !== 0)) {
@@ -45,7 +70,11 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
45
70
  ellipsis: true,
46
71
  fixed: 'left',
47
72
  render: function render(text) {
48
- return text;
73
+ return /*#__PURE__*/React.createElement("div", {
74
+ className: "tooltip-userGroup-box"
75
+ }, /*#__PURE__*/React.createElement(Tooltip, {
76
+ title: text
77
+ }, /*#__PURE__*/React.createElement("div", null, text)));
49
78
  }
50
79
  });
51
80
  }
@@ -90,7 +119,7 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
90
119
  key: 'eventName',
91
120
  ellipsis: true,
92
121
  fixed: 'left',
93
- render: function render(val) {
122
+ render: function render(val, record) {
94
123
  var _val = val;
95
124
  return /*#__PURE__*/React.createElement("div", {
96
125
  className: "tooltip-name-box"
@@ -99,7 +128,7 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
99
128
  }, /*#__PURE__*/React.createElement("div", {
100
129
  className: "tooltip-name-box-market",
101
130
  onClick: function onClick() {
102
- onSelectEvent && onSelectEvent(getEventAliasId(val, eventGroupList), val);
131
+ !record.isAdd && onSelectEvent && onSelectEvent(getEventAliasId(record === null || record === void 0 ? void 0 : record.originalName, eventGroupList), val);
103
132
  }
104
133
  }, /*#__PURE__*/React.createElement(IconFont, {
105
134
  type: "shoucang",
@@ -137,18 +166,19 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
137
166
  align: 'center',
138
167
  ellipsis: true,
139
168
  dataIndex: "field".concat(i),
169
+ defaultSortOrder: i === columnData.length - 1 ? 'descend' : null,
140
170
  className: "".concat(classPrefix, "-table-event-data"),
141
171
  sorter: function sorter(a, b) {
142
- return a["field".concat(i)] - b["field".concat(i)];
172
+ return a.isAdd || b.isAdd ? 0 : a["field".concat(i)] - b["field".concat(i)];
143
173
  },
144
174
  render: function render(text, record) {
145
175
  var click = text > 0 && (searchData.analysisIndex === 'number' ? true : false);
146
176
  return /*#__PURE__*/React.createElement("div", {
147
- className: "".concat(classPrefix, "-table-td-link ").concat(click ? '' : 'not-to-detail'),
177
+ className: "".concat(classPrefix, "-table-td-link ").concat(!record.isAdd && click ? '' : 'not-to-detail'),
148
178
  onClick: function onClick() {
149
- click ? onClickToDetailCallback(record, columnData[i], text) : null;
179
+ !record.isAdd && click ? onClickToDetailCallback(record, columnData[i], text) : null;
150
180
  }
151
- }, click && /*#__PURE__*/React.createElement(IconFont, {
181
+ }, !record.isAdd && click && /*#__PURE__*/React.createElement(IconFont, {
152
182
  type: "a-yanjingkai"
153
183
  }), text);
154
184
  }
package/package.json CHANGED
@@ -1,26 +1,27 @@
1
1
  {
2
2
  "name": "@zgfe/modules-event",
3
- "version": "1.0.6",
4
- "scripts": {
5
- "start": "dumi dev",
6
- "docs:build": "dumi build",
7
- "docs:deploy": "gh-pages -d docs-dist",
8
- "build": "father-build",
9
- "deploy": "npm run docs:build && npm run docs:deploy",
10
- "prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
11
- "test": "umi-test",
12
- "test:coverage": "umi-test --coverage",
13
- "prepublishOnly": "npm run build",
14
- "pub": "lerna publish"
15
- },
3
+ "version": "1.0.29-zhongyuan.0",
16
4
  "module": "es/index.js",
17
5
  "typings": "es/index.d.ts",
18
- "gitHooks": {
19
- "pre-commit": "lint-staged"
6
+ "private": false,
7
+ "publishConfig": {
8
+ "access": "public"
20
9
  },
21
10
  "files": [
22
11
  "es"
23
12
  ],
13
+ "scripts": {
14
+ "build": "father-build",
15
+ "deploy": "npm run docs:build && npm run docs:deploy",
16
+ "docs:build": "dumi build",
17
+ "docs:deploy": "gh-pages -d docs-dist",
18
+ "prepublishOnly": "npm run build",
19
+ "prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
20
+ "pub": "lerna publish",
21
+ "start": "dumi dev",
22
+ "test": "umi-test",
23
+ "test:coverage": "umi-test --coverage"
24
+ },
24
25
  "lint-staged": {
25
26
  "*.{js,jsx,less,md,json}": [
26
27
  "prettier --write"
@@ -29,6 +30,10 @@
29
30
  "prettier --parser=typescript --write"
30
31
  ]
31
32
  },
33
+ "dependencies": {
34
+ "react-copy-to-clipboard": "^5.1.0",
35
+ "react-highlight": "^0.15.0"
36
+ },
32
37
  "devDependencies": {
33
38
  "@testing-library/jest-dom": "^5.15.1",
34
39
  "@testing-library/react": "^12.1.2",
@@ -36,7 +41,7 @@
36
41
  "@types/lodash": "^4.14.191",
37
42
  "@umijs/fabric": "^2.8.1",
38
43
  "@umijs/test": "^3.0.5",
39
- "@zgfe/business-lib": "1.2.17",
44
+ "@zgfe/business-lib": "1.2.70-hxd.1",
40
45
  "antd": "^4.22.6",
41
46
  "dumi": "^1.1.0",
42
47
  "echarts": "^5.3.2",
@@ -49,9 +54,8 @@
49
54
  "react": "^16.12.0 || ^17.0.0",
50
55
  "yorkie": "^2.0.0"
51
56
  },
52
- "gitHead": "2f2ec3eaf3e08f9cf57575ec2a07751305a4a436",
53
- "dependencies": {
54
- "react-copy-to-clipboard": "^5.1.0",
55
- "react-highlight": "^0.15.0"
57
+ "gitHead": "3304351c056bc30d6684a212920d2ae01905885b",
58
+ "gitHooks": {
59
+ "pre-commit": "lint-staged"
56
60
  }
57
61
  }