@zgfe/business-lib 1.0.13-alpha.0 → 1.0.13-alpha.3
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.
- package/es/assets/styles/chunks.less +2 -2
- package/es/assets/styles/resetAntd.less +7 -6
- package/es/assets/styles/variable.less +1 -16
- package/es/assets/theme.d.ts +6 -1
- package/es/assets/theme.js +8 -3
- package/es/attrConditions/components/operateList.js +7 -2
- package/es/attrConditions/components/stringList.js +2 -3
- package/es/attrConditions/demo/group.js +1 -0
- package/es/attrConditions/demo/index.js +1 -0
- package/es/attrConditions/index.js +11 -5
- package/es/attrConditions/styles/index.less +2 -2
- package/es/attrConditions/types.d.ts +1 -0
- package/es/attributeSelector/index.js +3 -1
- package/es/attributeSelector/listPanel.js +2 -2
- package/es/attributeSelector/option.d.ts +2 -1
- package/es/attributeSelector/styles/index.less +1 -1
- package/es/attributeSelector/types.d.ts +5 -1
- package/es/attributeSelector/util.js +11 -6
- package/es/chart/util/chartOptionConfig.d.ts +1 -1
- package/es/chart/util/chartOptionConfig.js +3 -3
- package/es/context/index.d.ts +9 -0
- package/es/datePicker/styles/index.less +1 -1
- package/es/eventSelector/listPanel.js +1 -1
- package/es/mock/user.js +2 -2
- package/es/select/styles/index.less +1 -1
- package/es/targetConditionGroup/data/operates.js +0 -3
- package/es/targetSelector/editBox.js +2 -1
- package/es/targetSelector/styles/index.less +4 -0
- package/es/utils/ajax.js +3 -3
- package/es/utils/type.d.ts +2 -0
- package/package.json +2 -2
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// 通用hover样式,适用于下拉选项等
|
|
8
8
|
.__default-hover {
|
|
9
9
|
color: @primary-color;
|
|
10
|
-
background: @primary-1;
|
|
10
|
+
background: color(~`colorPalette('@{primary-color}', 0.1) `);
|
|
11
11
|
border-color: @primary-color;
|
|
12
12
|
cursor: pointer;
|
|
13
13
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
.__default-focused {
|
|
21
21
|
background-color: #fff;
|
|
22
22
|
border-color: @primary-color;
|
|
23
|
-
box-shadow: 0 0 0 4px @primary-1;
|
|
23
|
+
box-shadow: 0 0 0 4px color(~`colorPalette('@{primary-color}', 0.1) `);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
// 下拉组件操作栏样式
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
// 输入框
|
|
38
38
|
.ant-input {
|
|
39
39
|
background-color: @background-color-base!important;
|
|
40
|
-
border-color: @background-color-base!important;
|
|
40
|
+
// border-color: @background-color-base!important;
|
|
41
41
|
border-radius: @border-radius-small!important;
|
|
42
42
|
|
|
43
43
|
&:focus,
|
|
44
44
|
&-focused {
|
|
45
45
|
background-color: #fff !important;
|
|
46
|
-
box-shadow: 0 0 0 4px @primary-1!important;
|
|
46
|
+
box-shadow: 0 0 0 4px color(~`colorPalette('@{primary-color}', 0.1) `) !important;
|
|
47
47
|
}
|
|
48
48
|
&.ant-input-status-error {
|
|
49
49
|
border-color: @error-color !important;
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
// 选择框下拉选项
|
|
63
63
|
.ant-select-item {
|
|
64
64
|
height: @height-lg!important;
|
|
65
|
-
padding:
|
|
65
|
+
padding: @padding-xs @padding-sm!important;
|
|
66
66
|
border-radius: @border-radius-normal!important;
|
|
67
67
|
|
|
68
68
|
&:hover:not(.ant-select-item-option-disabled, .ant-select-item-option-selected) {
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
|
|
237
237
|
/*日期范围内背景色*/
|
|
238
238
|
.ant-picker-cell-in-range::before {
|
|
239
|
-
background: @primary-1!important;
|
|
239
|
+
background: color(~`colorPalette('@{primary-color}', 0.1) `) !important;
|
|
240
240
|
}
|
|
241
241
|
|
|
242
242
|
/*日期范围内的hover效果-背景不变*/
|
|
@@ -251,7 +251,7 @@
|
|
|
251
251
|
.ant-picker-panel
|
|
252
252
|
> :not(.ant-picker-date-panel)
|
|
253
253
|
.ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover-end::before {
|
|
254
|
-
background: @primary-1!important;
|
|
254
|
+
background: color(~`colorPalette('@{primary-color}', 0.1) `) !important;
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
/*日期范围内的hover效果*/
|
|
@@ -298,6 +298,7 @@
|
|
|
298
298
|
|
|
299
299
|
.ant-modal-body {
|
|
300
300
|
max-height: 400px !important;
|
|
301
|
+
padding-top: @padding-xs !important;
|
|
301
302
|
padding-bottom: 0 !important;
|
|
302
303
|
overflow: auto !important;
|
|
303
304
|
}
|
|
@@ -396,7 +397,7 @@
|
|
|
396
397
|
|
|
397
398
|
.ant-table-tbody > tr.ant-table-row:hover > td,
|
|
398
399
|
.ant-table-tbody > tr > td.ant-table-cell-row-hover {
|
|
399
|
-
background: @primary-1!important;
|
|
400
|
+
background: color(~`colorPalette('@{primary-color}', 0.1) `) !important;
|
|
400
401
|
}
|
|
401
402
|
}
|
|
402
403
|
|
|
@@ -5,24 +5,9 @@
|
|
|
5
5
|
@border-radius-normal: 8px;
|
|
6
6
|
@border-radius-large: 20px;
|
|
7
7
|
@option-height: @height-lg;
|
|
8
|
-
@background-color-base: #fafafb;
|
|
9
8
|
@background-color-gray: #f6f6f6;
|
|
10
9
|
@icon-width: 24px;
|
|
11
10
|
|
|
12
|
-
@shadow-color: rgba(0, 0, 0, 0.1);
|
|
13
11
|
@shadow-color-light: rgba(0, 0, 0, 0.1);
|
|
14
|
-
@box-shadow-base: 0px 4px 10px @shadow-color;
|
|
15
12
|
@box-shadow-small: 0px 1px 2px @shadow-color-light;
|
|
16
|
-
@box-shadow-form: 0 0 0 4px @primary-1;
|
|
17
|
-
|
|
18
|
-
// 正文
|
|
19
|
-
@text-color: #021429;
|
|
20
|
-
// 次要
|
|
21
|
-
@text-color-secondary: #5f6085;
|
|
22
|
-
// 中性色/重要-文标题2
|
|
23
|
-
@tooltip-bg: #242541;
|
|
24
|
-
// 错误颜色
|
|
25
|
-
@error-color: #fb5547;
|
|
26
|
-
|
|
27
|
-
// text-btn hover背景色
|
|
28
|
-
@btn-text-hover-bg: #cacdd4;
|
|
13
|
+
@box-shadow-form: 0 0 0 4px color(~`colorPalette('@{primary-color}', 0.1) `);
|
package/es/assets/theme.d.ts
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
'primary-color': string;
|
|
3
3
|
'border-color-base': string;
|
|
4
|
-
'
|
|
4
|
+
'background-color-base': string;
|
|
5
5
|
'text-color': string;
|
|
6
6
|
'text-color-secondary': string;
|
|
7
|
+
'tooltip-bg': string;
|
|
7
8
|
'error-color': string;
|
|
9
|
+
'shadow-color': string;
|
|
10
|
+
'box-shadow-base': string;
|
|
11
|
+
'btn-text-hover-bg': string;
|
|
8
12
|
'warning-color': string;
|
|
13
|
+
'border-color-split': string;
|
|
9
14
|
};
|
|
10
15
|
export default _default;
|
package/es/assets/theme.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
'primary-color': '#165dff',
|
|
3
3
|
'border-color-base': '#ECEDF0',
|
|
4
|
-
'
|
|
4
|
+
'background-color-base': '#fafafb',
|
|
5
5
|
'text-color': '#021429',
|
|
6
6
|
'text-color-secondary': '#5f6085',
|
|
7
|
-
'
|
|
8
|
-
'
|
|
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'
|
|
9
14
|
};
|
|
@@ -20,7 +20,7 @@ var BizOperateList = function BizOperateList(props) {
|
|
|
20
20
|
var _props$attr2;
|
|
21
21
|
|
|
22
22
|
var _useState = useState({
|
|
23
|
-
value:
|
|
23
|
+
value: ''
|
|
24
24
|
}),
|
|
25
25
|
_useState2 = _slicedToArray(_useState, 2),
|
|
26
26
|
current = _useState2[0],
|
|
@@ -39,7 +39,7 @@ var BizOperateList = function BizOperateList(props) {
|
|
|
39
39
|
setOptions(optionData);
|
|
40
40
|
var flag = true;
|
|
41
41
|
|
|
42
|
-
if (current) {
|
|
42
|
+
if (current.value) {
|
|
43
43
|
optionData.forEach(function (item) {
|
|
44
44
|
if (item.value === current.value) {
|
|
45
45
|
if (current.name && current.name === item.name) {
|
|
@@ -47,6 +47,11 @@ var BizOperateList = function BizOperateList(props) {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
|
+
} else if (props.defaultValue) {
|
|
51
|
+
setCurrent({
|
|
52
|
+
value: props.defaultValue
|
|
53
|
+
});
|
|
54
|
+
return;
|
|
50
55
|
}
|
|
51
56
|
|
|
52
57
|
if (!flag) return;
|
|
@@ -16,7 +16,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
16
16
|
|
|
17
17
|
import React, { useContext, useEffect, useState } from 'react';
|
|
18
18
|
import { classPrefix } from '..';
|
|
19
|
-
import { PropCategory } from '../../attributeSelector/types';
|
|
20
19
|
import Apis from '../../constants/apis';
|
|
21
20
|
import BizGlobalDataContext from '../../context';
|
|
22
21
|
import BizSelect from '../../select';
|
|
@@ -84,8 +83,8 @@ var StringList = function StringList(props) {
|
|
|
84
83
|
app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
85
84
|
platform: currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform,
|
|
86
85
|
limit: 10000,
|
|
87
|
-
attr: (attrData === null || attrData === void 0 ? void 0 : attrData.
|
|
88
|
-
dimension_sub:
|
|
86
|
+
attr: (attrData === null || attrData === void 0 ? void 0 : attrData.id) || 0,
|
|
87
|
+
dimension_sub: attrData === null || attrData === void 0 ? void 0 : attrData.dimensionSub,
|
|
89
88
|
v: ''
|
|
90
89
|
};
|
|
91
90
|
|
|
@@ -62,18 +62,22 @@ var BizConditionItem = function BizConditionItem(props) {
|
|
|
62
62
|
id: data.attrId,
|
|
63
63
|
propCategory: data.propCategory,
|
|
64
64
|
type: data.type,
|
|
65
|
-
key: data.attrId
|
|
65
|
+
key: data.attrId,
|
|
66
|
+
dimensionSub: data.dimensionSub || 'event_attr'
|
|
66
67
|
};
|
|
67
68
|
}
|
|
68
69
|
} else if (data.propCategory === PropCategory.UserProp || data.propCategory === PropCategory.EnvProp) {
|
|
69
70
|
if (data.attrName) {
|
|
71
|
+
var aId = data.attrId || 0;
|
|
70
72
|
attrData = {
|
|
73
|
+
id: aId,
|
|
71
74
|
name: data.attrName,
|
|
72
75
|
propCategory: data.propCategory,
|
|
73
76
|
type: data.type,
|
|
74
77
|
category: data.category,
|
|
75
|
-
key: "".concat(data.propCategory, "-").concat(data.attrName),
|
|
76
|
-
subtype: data.subtype
|
|
78
|
+
key: "".concat(data.propCategory, "-").concat(data.dimensionSub || data.attrName, "-").concat(aId),
|
|
79
|
+
subtype: data.subtype,
|
|
80
|
+
dimensionSub: data.dimensionSub || data.attrName
|
|
77
81
|
};
|
|
78
82
|
}
|
|
79
83
|
}
|
|
@@ -92,14 +96,16 @@ var BizConditionItem = function BizConditionItem(props) {
|
|
|
92
96
|
if (props.onChange) {
|
|
93
97
|
if (!attr) return;
|
|
94
98
|
var responseData = {
|
|
99
|
+
attrId: attr.id,
|
|
95
100
|
propCategory: attr.propCategory,
|
|
96
101
|
type: attr.type,
|
|
97
102
|
operator: operate,
|
|
98
|
-
values: values || []
|
|
103
|
+
values: values || [],
|
|
104
|
+
dimensionSub: attr.dimensionSub
|
|
99
105
|
};
|
|
100
106
|
|
|
101
107
|
if (attr.propCategory === PropCategory.EventProp) {
|
|
102
|
-
responseData.
|
|
108
|
+
responseData.attrName = attr.label;
|
|
103
109
|
} else {
|
|
104
110
|
responseData.attrName = attr.name;
|
|
105
111
|
responseData.category = attr.category;
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.ant-input {
|
|
26
|
-
background-color: @background-color-gray;
|
|
26
|
+
background-color: @background-color-gray !important;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.biz-attr-select-del-icon {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
|
|
62
62
|
&-input {
|
|
63
63
|
.ant-input-group-addon {
|
|
64
|
-
background-color: @background-color-gray;
|
|
64
|
+
background-color: @background-color-gray !important;
|
|
65
65
|
border: none;
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -144,6 +144,8 @@ var BizAttributeSelector = function BizAttributeSelector(props) {
|
|
|
144
144
|
|
|
145
145
|
BizAttributeSelector.defaultProps = {
|
|
146
146
|
enableDelete: false,
|
|
147
|
-
placeholder: '请选择'
|
|
147
|
+
placeholder: '请选择',
|
|
148
|
+
propSymbol: '*',
|
|
149
|
+
optionsHeaderTip: '带*的属性每日凌晨更新'
|
|
148
150
|
};
|
|
149
151
|
export default BizAttributeSelector;
|
|
@@ -166,7 +166,7 @@ var AttrListPanel = function AttrListPanel(props) {
|
|
|
166
166
|
return setSearchValue(val);
|
|
167
167
|
},
|
|
168
168
|
placeholder: "\u641C\u7D22\u5C5E\u6027"
|
|
169
|
-
}), showList.length ? /*#__PURE__*/React.createElement(Anchor, {
|
|
169
|
+
}), showList.length ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Anchor, {
|
|
170
170
|
className: "".concat(classPrefix, "-anchor-panel"),
|
|
171
171
|
affix: false,
|
|
172
172
|
onClick: function onClick(e) {
|
|
@@ -191,7 +191,7 @@ var AttrListPanel = function AttrListPanel(props) {
|
|
|
191
191
|
title: /*#__PURE__*/React.createElement(Button, {
|
|
192
192
|
size: "small"
|
|
193
193
|
}, "\u89E6\u53D1\u73AF\u5883")
|
|
194
|
-
})) : null, /*#__PURE__*/React.createElement("div", {
|
|
194
|
+
}))) : null, /*#__PURE__*/React.createElement("div", {
|
|
195
195
|
id: anchor.container,
|
|
196
196
|
className: "".concat(classPrefix, "-container")
|
|
197
197
|
}, showList.length ? showList : /*#__PURE__*/React.createElement("div", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { AttributeSelect } from './types';
|
|
3
3
|
declare const Option: React.FC<{
|
|
4
4
|
option?: AttributeSelect.Value;
|
|
@@ -9,6 +9,7 @@ declare const Option: React.FC<{
|
|
|
9
9
|
text: string;
|
|
10
10
|
color?: string;
|
|
11
11
|
};
|
|
12
|
+
propSymbol?: ReactNode;
|
|
12
13
|
checked?: boolean;
|
|
13
14
|
onClick?: (option: AttributeSelect.Value) => void;
|
|
14
15
|
}>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
export declare enum PropType {
|
|
2
3
|
STRING = 1,
|
|
3
4
|
NUMBER = 2,
|
|
@@ -23,10 +24,12 @@ export interface EventGroup {
|
|
|
23
24
|
eventList: AnalysisEvent[];
|
|
24
25
|
}
|
|
25
26
|
export interface BasicProp {
|
|
27
|
+
id: number;
|
|
26
28
|
label?: string;
|
|
27
29
|
alias?: string;
|
|
28
30
|
type?: PropType;
|
|
29
31
|
realTime?: boolean;
|
|
32
|
+
dimensionSub?: string;
|
|
30
33
|
}
|
|
31
34
|
export interface UserProp extends BasicProp {
|
|
32
35
|
name: string;
|
|
@@ -43,7 +46,6 @@ export interface EnvProp extends BasicProp {
|
|
|
43
46
|
}
|
|
44
47
|
export interface EventProp extends BasicProp {
|
|
45
48
|
eventId?: number;
|
|
46
|
-
id: number;
|
|
47
49
|
propCategory: 'eventProp';
|
|
48
50
|
key?: number;
|
|
49
51
|
isHidden?: boolean;
|
|
@@ -66,6 +68,8 @@ export declare namespace AttributeSelect {
|
|
|
66
68
|
enableUserProp?: boolean;
|
|
67
69
|
enableEnvProp?: boolean;
|
|
68
70
|
eventIdList?: number[];
|
|
71
|
+
propSymbol?: ReactNode;
|
|
72
|
+
optionsHeaderTip?: string;
|
|
69
73
|
onChange?: (value: Value) => void;
|
|
70
74
|
onDelete?: (value?: Value) => void;
|
|
71
75
|
}
|
|
@@ -28,7 +28,8 @@ export default function convertAttributeData(store) {
|
|
|
28
28
|
label: item.attr_name,
|
|
29
29
|
propCategory: 'eventProp',
|
|
30
30
|
type: item.prop_type,
|
|
31
|
-
realTime: true
|
|
31
|
+
realTime: true,
|
|
32
|
+
dimensionSub: item.dimension_sub || 'event_attr'
|
|
32
33
|
};
|
|
33
34
|
}),
|
|
34
35
|
id: e.event_id,
|
|
@@ -42,27 +43,31 @@ export default function convertAttributeData(store) {
|
|
|
42
43
|
});
|
|
43
44
|
res.envPropList = (_store$envPropList = store.envPropList) === null || _store$envPropList === void 0 ? void 0 : _store$envPropList.map(function (prop) {
|
|
44
45
|
return {
|
|
46
|
+
id: prop.id || 0,
|
|
45
47
|
alias: prop.alias_name,
|
|
46
48
|
category: prop.category,
|
|
47
|
-
key: "envProp-".concat(prop.
|
|
49
|
+
key: "envProp-".concat(prop.dimension_sub, "-").concat(prop.id || 0),
|
|
48
50
|
label: prop.text,
|
|
49
51
|
name: prop.name,
|
|
50
52
|
propCategory: 'envProp',
|
|
51
53
|
type: prop.type,
|
|
52
|
-
realTime: true
|
|
54
|
+
realTime: true,
|
|
55
|
+
dimensionSub: prop.dimension_sub || prop.name
|
|
53
56
|
};
|
|
54
57
|
});
|
|
55
58
|
res.userPropList = (_store$userPropList = store.userPropList) === null || _store$userPropList === void 0 ? void 0 : _store$userPropList.map(function (prop) {
|
|
56
59
|
return {
|
|
60
|
+
id: prop.id || 0,
|
|
57
61
|
alias: prop.alias_name,
|
|
58
62
|
category: prop.category,
|
|
59
|
-
key: "userProp-".concat(prop.
|
|
60
|
-
label: prop.text,
|
|
63
|
+
key: "userProp-".concat(prop.dimension_sub, "-").concat(prop.id || 0),
|
|
64
|
+
label: prop.text || prop.name,
|
|
61
65
|
name: prop.name,
|
|
62
66
|
propCategory: 'userProp',
|
|
63
67
|
type: prop.type,
|
|
64
68
|
subtype: prop.subtype,
|
|
65
|
-
realTime: prop.category === 'custom'
|
|
69
|
+
realTime: prop.category === 'custom',
|
|
70
|
+
dimensionSub: prop.dimension_sub || prop.name
|
|
66
71
|
};
|
|
67
72
|
});
|
|
68
73
|
return res;
|
|
@@ -7,7 +7,7 @@ export declare const baseConfig: EChartsOption;
|
|
|
7
7
|
export declare const seriesConfig: any;
|
|
8
8
|
export declare const legendConfig: LegendComponentOption;
|
|
9
9
|
export declare const gridConfig: {
|
|
10
|
-
left:
|
|
10
|
+
left: string;
|
|
11
11
|
right: string;
|
|
12
12
|
bottom: number;
|
|
13
13
|
top: number;
|
|
@@ -44,7 +44,7 @@ export var legendConfig = {
|
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
export var gridConfig = {
|
|
47
|
-
left:
|
|
47
|
+
left: '2%',
|
|
48
48
|
right: '3%',
|
|
49
49
|
bottom: 0,
|
|
50
50
|
top: 24,
|
|
@@ -188,7 +188,7 @@ export var getChartOption = function getChartOption(chartType, data) {
|
|
|
188
188
|
legend.left = 'left';
|
|
189
189
|
legend.height = 'auto';
|
|
190
190
|
legend.width = 50;
|
|
191
|
-
grid.left =
|
|
191
|
+
grid.left = '10%';
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
if (chartType === 'line') {
|
|
@@ -230,7 +230,7 @@ export var getPieOption = function getPieOption() {
|
|
|
230
230
|
legend.left = 'left';
|
|
231
231
|
legend.height = 'auto';
|
|
232
232
|
legend.width = 50;
|
|
233
|
-
grid.left =
|
|
233
|
+
grid.left = '10%';
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
tooltip.trigger = 'item';
|
package/es/context/index.d.ts
CHANGED
|
@@ -5,12 +5,21 @@ interface AppInfoProps {
|
|
|
5
5
|
platform?: string | number;
|
|
6
6
|
[prop: string]: any;
|
|
7
7
|
}
|
|
8
|
+
interface UserInfo {
|
|
9
|
+
id: number;
|
|
10
|
+
username: string;
|
|
11
|
+
email: string;
|
|
12
|
+
companyId: number;
|
|
13
|
+
companyName: string;
|
|
14
|
+
}
|
|
8
15
|
export interface GlobalContextProps {
|
|
9
16
|
userGroupList?: Array<any>;
|
|
10
17
|
eventGroupList?: EventGroup[];
|
|
11
18
|
userPropList?: UserProp[];
|
|
12
19
|
eventEnvList?: EnvProp[];
|
|
13
20
|
currentApp?: AppInfoProps;
|
|
21
|
+
currentUser?: UserInfo;
|
|
22
|
+
isDemo?: boolean;
|
|
14
23
|
}
|
|
15
24
|
declare const BizGlobalDataContext: import("react").Context<GlobalContextProps>;
|
|
16
25
|
export default BizGlobalDataContext;
|
|
@@ -168,7 +168,7 @@ var EventListPanel = function EventListPanel(props) {
|
|
|
168
168
|
onChange: function onChange(val) {
|
|
169
169
|
return setSearchValue(val);
|
|
170
170
|
},
|
|
171
|
-
placeholder: "\u641C\u7D22\u4E8B\u4EF6"
|
|
171
|
+
placeholder: "\u641C\u7D22\u57CB\u70B9\u4E8B\u4EF6"
|
|
172
172
|
}), /*#__PURE__*/React.createElement("div", {
|
|
173
173
|
className: "".concat(classPrefix, "-list")
|
|
174
174
|
}, /*#__PURE__*/React.createElement(InfiniteScroll, {
|
package/es/mock/user.js
CHANGED
|
@@ -72,7 +72,8 @@ var BizEventNameEditBox = function BizEventNameEditBox(props) {
|
|
|
72
72
|
className: "".concat(classPrefix, "-footer")
|
|
73
73
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
74
74
|
onClick: onCancel,
|
|
75
|
-
type: "text"
|
|
75
|
+
type: "text",
|
|
76
|
+
className: "".concat(classPrefix, "-mr8")
|
|
76
77
|
}, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
|
|
77
78
|
onClick: onClick,
|
|
78
79
|
type: "primary"
|
package/es/utils/ajax.js
CHANGED
|
@@ -45,7 +45,7 @@ var errorHandler = function errorHandler(error) {
|
|
|
45
45
|
return response;
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
function responseErrorHandler(url, apiResult) {
|
|
48
|
+
function responseErrorHandler(url, apiResult, errorTitle) {
|
|
49
49
|
if (/\.jsp/.test(url)) {
|
|
50
50
|
return apiResult;
|
|
51
51
|
}
|
|
@@ -69,7 +69,7 @@ function responseErrorHandler(url, apiResult) {
|
|
|
69
69
|
if (!flag) {
|
|
70
70
|
message = apiResult.msg || message;
|
|
71
71
|
notification.error({
|
|
72
|
-
message: "\u8BF7\u6C42\u9519\u8BEF",
|
|
72
|
+
message: errorTitle || "\u8BF7\u6C42\u9519\u8BEF",
|
|
73
73
|
description: message
|
|
74
74
|
});
|
|
75
75
|
throw new Error(message);
|
|
@@ -131,7 +131,7 @@ function _request() {
|
|
|
131
131
|
|
|
132
132
|
case 13:
|
|
133
133
|
res = _context.sent;
|
|
134
|
-
return _context.abrupt("return", responseWrapper ? responseWrapper(url, responseErrorHandler(url, res)) : responseErrorHandler(url, res));
|
|
134
|
+
return _context.abrupt("return", responseWrapper ? responseWrapper(url, responseErrorHandler(url, res, options === null || options === void 0 ? void 0 : options.errorTitle)) : responseErrorHandler(url, res, options === null || options === void 0 ? void 0 : options.errorTitle));
|
|
135
135
|
|
|
136
136
|
case 17:
|
|
137
137
|
_context.prev = 17;
|
package/es/utils/type.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export declare namespace OldSystem {
|
|
|
40
40
|
prop_type: PropType;
|
|
41
41
|
}
|
|
42
42
|
interface UserProp {
|
|
43
|
+
id: number;
|
|
43
44
|
alias_name?: string;
|
|
44
45
|
category: 'fixed' | 'custom';
|
|
45
46
|
dimension_sub: string;
|
|
@@ -75,6 +76,7 @@ export declare class ApiResult<T> implements InterfaceApiResult<T> {
|
|
|
75
76
|
constructor(code: ResponseStatus, data: any, message?: string);
|
|
76
77
|
}
|
|
77
78
|
export declare type ajaxConfig<T> = RequestOptionsInit & {
|
|
79
|
+
errorTitle?: string;
|
|
78
80
|
optionsWrapper?: (url: string, options?: RequestOptionsInit) => {
|
|
79
81
|
url: string;
|
|
80
82
|
options?: RequestOptionsInit;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.0.13-alpha.
|
|
3
|
+
"version": "1.0.13-alpha.3",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"prettier": "^2.2.1",
|
|
60
60
|
"yorkie": "^2.0.0"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "889d6b7091fc5b4e2efe3ebf00892045597017f7"
|
|
63
63
|
}
|