@zgfe/business-lib 1.2.51-heyh.0 → 1.2.51-heyh.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/iconfont/demo_index.html +49 -26
- package/es/assets/iconfont/iconfont.css +11 -7
- package/es/assets/iconfont/iconfont.js +1 -1
- package/es/assets/iconfont/iconfont.json +14 -7
- package/es/assets/iconfont/iconfont.ttf +0 -0
- package/es/assets/iconfont/iconfont.woff +0 -0
- package/es/assets/iconfont/iconfont.woff2 +0 -0
- package/es/chart/demo/data/data.d.ts +2 -0
- package/es/chart/demo/data/data.js +5 -37
- package/es/chart/demo/line_bar_stack.js +0 -1
- package/es/chart/index.js +10 -0
- package/es/chart/styles/index.less +45 -0
- package/es/chart/util/chartOptionConfig.js +12 -0
- package/es/chart/util/formatData.js +3 -1
- package/es/chart/util/formatOption.js +21 -11
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/platformSelector/demo/index.d.ts +3 -0
- package/es/platformSelector/demo/index.js +16 -0
- package/es/platformSelector/index.d.ts +16 -0
- package/es/platformSelector/index.js +44 -0
- package/es/platformSelector/styles/index.less +22 -0
- package/es/platformSelector/types.d.ts +6 -0
- package/es/platformSelector/types.js +1 -0
- package/es/platformSelector/util.d.ts +2 -0
- package/es/platformSelector/util.js +44 -0
- package/es/userCondition/conditions/cdpCondition.js +8 -1
- package/es/userCondition/conditions/cdpCshCondition.js +15 -2
- package/es/userCondition/conditions/styles/cdpCondition.less +6 -0
- package/es/userCondition/conditions/styles/cdpCshCondition.less +6 -0
- package/es/userGroup/overlay.js +6 -5
- package/es/userGroupHeader/index.js +7 -4
- package/package.json +2 -2
|
@@ -5,6 +5,20 @@
|
|
|
5
5
|
"css_prefix_text": "",
|
|
6
6
|
"description": "诸葛业务平台",
|
|
7
7
|
"glyphs": [
|
|
8
|
+
{
|
|
9
|
+
"icon_id": "41442688",
|
|
10
|
+
"name": "quanping 1",
|
|
11
|
+
"font_class": "a-quanping1",
|
|
12
|
+
"unicode": "e64f",
|
|
13
|
+
"unicode_decimal": 58959
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"icon_id": "41214661",
|
|
17
|
+
"name": "鸿蒙",
|
|
18
|
+
"font_class": "hongmeng",
|
|
19
|
+
"unicode": "e64a",
|
|
20
|
+
"unicode_decimal": 58954
|
|
21
|
+
},
|
|
8
22
|
{
|
|
9
23
|
"icon_id": "41358802",
|
|
10
24
|
"name": "帮助中心",
|
|
@@ -54,13 +68,6 @@
|
|
|
54
68
|
"unicode": "e7cc",
|
|
55
69
|
"unicode_decimal": 59340
|
|
56
70
|
},
|
|
57
|
-
{
|
|
58
|
-
"icon_id": "41214661",
|
|
59
|
-
"name": "鸿蒙",
|
|
60
|
-
"font_class": "hongmeng",
|
|
61
|
-
"unicode": "e64a",
|
|
62
|
-
"unicode_decimal": 58954
|
|
63
|
-
},
|
|
64
71
|
{
|
|
65
72
|
"icon_id": "41211242",
|
|
66
73
|
"name": "其他",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,49 +1,17 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
xAxis: ['2022-12-01', '2022-12-02', '2022-12-03', '2022-12-04', '2022-12-05', '2022-12-06', '2022-12-07', '2022-12-08', '2022-12-09', '2022-12-10', '2022-12-11', '
|
|
2
|
+
xAxis: ['2022-12-01', '2022-12-02', '2022-12-03', '2022-12-04', '2022-12-05', '2022-12-06', '2022-12-07', '2022-12-08', '2022-12-09', '2022-12-10', '2022-12-11', '2024-08-19', '2024-09-16', '2024-10-16'],
|
|
3
3
|
series: [{
|
|
4
|
-
names: ['付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功'],
|
|
5
|
-
values: [26, 27, 43, 44, 40, 34, 33, 33, 34, 24, 30, 31, 31, 38],
|
|
6
|
-
orderNum: 1
|
|
7
|
-
}, {
|
|
8
|
-
names: ['注册-发送手机验证码'],
|
|
9
|
-
values: [11, 10, 7, 5, 13, 18, 14, 17, 11, 6, 10, 12, 15, 10],
|
|
10
|
-
orderNum: 1
|
|
11
|
-
}, {
|
|
12
|
-
names: ['搜索商品'],
|
|
13
|
-
values: [75, 68, 86, 80, 87, 71, 72, 81, 77, 74, 78, 76, 76, 79],
|
|
14
|
-
orderNum: 2
|
|
15
|
-
}, {
|
|
16
4
|
names: ['pv'],
|
|
17
5
|
values: [104, 89, 109, 103, 112, 93, 87, 101, 101, 97, 102, 110, 106, 98],
|
|
6
|
+
minValues: [null, null, null, null, null, null, null, null, null, null, null, 102, 0, 1, 2],
|
|
7
|
+
mixValues: [null, null, null, null, null, null, null, null, null, null, null, 666, 1111, 2222],
|
|
18
8
|
orderNum: 3
|
|
19
9
|
}, {
|
|
20
10
|
names: ['申请退货2'],
|
|
21
11
|
values: [5, 11, 14, 9, 8, 14, 9, 10, 12, 12, 14, 16, 12, 10],
|
|
12
|
+
minValues: [null, null, null, null, null, null, null, null, null, null, null, null, 44, 55, 66],
|
|
13
|
+
mixValues: [null, null, null, null, null, null, null, null, null, null, null, null, 888, 5555],
|
|
22
14
|
orderNum: 4
|
|
23
|
-
}, {
|
|
24
|
-
names: ['搜索商品'],
|
|
25
|
-
values: [75, 68, 86, 80, 87, 71, 72, 81, 77, 74, 78, 76, 76, 79],
|
|
26
|
-
orderNum: 5
|
|
27
|
-
}, {
|
|
28
|
-
names: ['付款成功11付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功'],
|
|
29
|
-
values: [26, 27, 43, 44, 40, 34, 33, 33, 34, 24, 30, 31, 31, 38],
|
|
30
|
-
orderNum: 1
|
|
31
|
-
}, {
|
|
32
|
-
names: ['查看商品详情'],
|
|
33
|
-
values: [122, 107, 132, 113, 133, 115, 106, 127, 132, 117, 119, 123, 119, 117],
|
|
34
|
-
orderNum: 2
|
|
35
|
-
}, {
|
|
36
|
-
names: ['scroll'],
|
|
37
|
-
values: [98, 96, 106, 109, 113, 105, 91, 111, 99, 99, 104, 108, 116, 92],
|
|
38
|
-
orderNum: 3
|
|
39
|
-
}, {
|
|
40
|
-
names: ['click'],
|
|
41
|
-
values: [108, 102, 111, 90, 111, 105, 91, 129, 117, 101, 109, 109, 105, 96],
|
|
42
|
-
orderNum: 4
|
|
43
|
-
}, {
|
|
44
|
-
names: ['申请退货'],
|
|
45
|
-
values: [5, 11, 14, 9, 8, 14, 9, 10, 12, 12, 14, 16, 12, 10],
|
|
46
|
-
orderNum: 5
|
|
47
15
|
}]
|
|
48
16
|
};
|
|
49
17
|
export var barData = {
|
|
@@ -146,7 +146,6 @@ export default (function () {
|
|
|
146
146
|
htmlArray.push("<div class=\"biz-chart-tooltip-item\">\n <div class=\"biz-chart-tooltip-content\">\n <span class=\"biz-tooltip-order\" style=\"background:".concat(params.color, "\"></span>\n <div class=\"biz-tooltip-name\">").concat(params.seriesName, "</div>\n </div> \n <span class=\"biz-chart-tooltip-value\">").concat(params.value, "</span>\n </div>"));
|
|
147
147
|
return htmlArray.join('');
|
|
148
148
|
};
|
|
149
|
-
console.log('colorList', colorList);
|
|
150
149
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(BizChart, {
|
|
151
150
|
showList: showList,
|
|
152
151
|
data: data,
|
package/es/chart/index.js
CHANGED
|
@@ -71,6 +71,16 @@ var BizChart = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
71
71
|
option.series.forEach(function (series, seriesIndex) {
|
|
72
72
|
var dashedItem = addDashedSeries(series, index - 1);
|
|
73
73
|
dashedItem.itemStyle.normal.color = dashedItem.lineStyle.normal.color = option.color[seriesIndex];
|
|
74
|
+
dashedItem.markArea = {
|
|
75
|
+
itemStyle: {
|
|
76
|
+
color: 'rgba(22, 93, 255, 0.08)'
|
|
77
|
+
},
|
|
78
|
+
data: [[{
|
|
79
|
+
xAxis: option.xAxis.data[index]
|
|
80
|
+
}, {
|
|
81
|
+
xAxis: option.xAxis.data[option.xAxis.data.length - 1]
|
|
82
|
+
}]]
|
|
83
|
+
};
|
|
74
84
|
dashedSeries.push(dashedItem);
|
|
75
85
|
});
|
|
76
86
|
option.series = option.series.concat(dashedSeries);
|
|
@@ -65,4 +65,49 @@
|
|
|
65
65
|
font-weight: 500;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
+
|
|
69
|
+
.biz-chart-tooltip-item-new {
|
|
70
|
+
min-height: @height-sm;
|
|
71
|
+
margin-bottom: 4px;
|
|
72
|
+
padding: 0px @padding-xs;
|
|
73
|
+
font-size: @font-size-sm;
|
|
74
|
+
background: @white;
|
|
75
|
+
border-radius: @border-radius-small;
|
|
76
|
+
box-shadow: @box-shadow-small;
|
|
77
|
+
.biz-chart-tooltip-content {
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
color: @text-color-secondary;
|
|
81
|
+
|
|
82
|
+
.biz-tooltip-marker {
|
|
83
|
+
width: 8px;
|
|
84
|
+
height: 8px;
|
|
85
|
+
margin-right: @margin-xs;
|
|
86
|
+
border-radius: 50%;
|
|
87
|
+
}
|
|
88
|
+
.biz-tooltip-order {
|
|
89
|
+
display: flex;
|
|
90
|
+
align-items: center;
|
|
91
|
+
justify-content: center;
|
|
92
|
+
width: 12.8px;
|
|
93
|
+
height: 12.8px;
|
|
94
|
+
margin-right: @margin-xs;
|
|
95
|
+
color: #fff;
|
|
96
|
+
font-weight: 500;
|
|
97
|
+
font-size: 8.96px;
|
|
98
|
+
background: #457dff;
|
|
99
|
+
border-radius: 50%;
|
|
100
|
+
}
|
|
101
|
+
.biz-tooltip-name {
|
|
102
|
+
max-width: 300px;
|
|
103
|
+
white-space: pre-wrap;
|
|
104
|
+
word-wrap: break-word;
|
|
105
|
+
word-break: break-all;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
&-value {
|
|
109
|
+
font-weight: 700;
|
|
110
|
+
// font-size: 14px;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
68
113
|
}
|
|
@@ -161,6 +161,7 @@ export var getChartOption = function getChartOption(chartType, data) {
|
|
|
161
161
|
yAxis.minInterval = 1;
|
|
162
162
|
}
|
|
163
163
|
var series = [];
|
|
164
|
+
var seriesObject = {};
|
|
164
165
|
if (chartType === 'bar') {
|
|
165
166
|
seriesItem.barMaxWidth = 40;
|
|
166
167
|
}
|
|
@@ -174,6 +175,9 @@ export var getChartOption = function getChartOption(chartType, data) {
|
|
|
174
175
|
yAxisIndex: item.yAxisIndex
|
|
175
176
|
} : {});
|
|
176
177
|
});
|
|
178
|
+
series.map(function (item) {
|
|
179
|
+
seriesObject[item.name] = item;
|
|
180
|
+
});
|
|
177
181
|
} else {
|
|
178
182
|
series = [_objectSpread(_objectSpread(_objectSpread({
|
|
179
183
|
name: seriesName || '',
|
|
@@ -189,6 +193,14 @@ export var getChartOption = function getChartOption(chartType, data) {
|
|
|
189
193
|
tooltip.axisPointer = tooltip.axisPointer || {};
|
|
190
194
|
tooltip.axisPointer.type = chartType === 'bar' || chartType === 'line_bar' || chartType === 'muit_y' ? 'shadow' : 'line';
|
|
191
195
|
tooltip.formatter = function (params) {
|
|
196
|
+
if (Object.keys(seriesObject).length > 0) {
|
|
197
|
+
params.map(function (item) {
|
|
198
|
+
var _minValues = seriesObject[item.seriesName].minValues;
|
|
199
|
+
var _mixValues = seriesObject[item.seriesName].mixValues;
|
|
200
|
+
item.minValues = _minValues ? _minValues[item.dataIndex] : null;
|
|
201
|
+
item.mixValues = _mixValues ? _mixValues[item.dataIndex] : null;
|
|
202
|
+
});
|
|
203
|
+
}
|
|
192
204
|
return tooltipFormatter ? tooltipFormatter(params) : tooltip.trigger === 'item' ? tooltipFormatterItemDefault(params, data.resultFormatMap, unit) : tooltipFormatterDefault(params, data.resultFormatMap, unit);
|
|
193
205
|
};
|
|
194
206
|
if (legendPosition === 'top') {
|
|
@@ -66,7 +66,9 @@ export var formatChartData = function formatChartData(data, showAll, showList, r
|
|
|
66
66
|
} else {
|
|
67
67
|
sData.push(_objectSpread(_objectSpread({
|
|
68
68
|
name: showName,
|
|
69
|
-
data: seriesItem.values
|
|
69
|
+
data: seriesItem.values,
|
|
70
|
+
minValues: seriesItem === null || seriesItem === void 0 ? void 0 : seriesItem.minValues,
|
|
71
|
+
mixValues: seriesItem === null || seriesItem === void 0 ? void 0 : seriesItem.mixValues
|
|
70
72
|
}, seriesItem.stack ? {
|
|
71
73
|
stack: seriesItem.stack
|
|
72
74
|
} : {}), {}, {
|
|
@@ -20,16 +20,22 @@ var tooltipFormatterDefault = function tooltipFormatterDefault(params, resultFor
|
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
22
|
seriesMap[item.seriesName] = item.value;
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
var unitHandle = function unitHandle(_value) {
|
|
24
|
+
var _data = _value;
|
|
25
|
+
if (item.seriesName.indexOf('CTR') > -1) {
|
|
26
|
+
_data += '%';
|
|
27
|
+
} else if (resultFormatMap && resultFormatMap[item.seriesName] && /percent/.test(resultFormatMap[item.seriesName])) {
|
|
28
|
+
_data = util.toThousands(_data) + '%';
|
|
29
|
+
} else if (unit && unit === 'time') {
|
|
30
|
+
_data = util.timeFormat(_data, 'hhhmmmsss', 1);
|
|
31
|
+
} else {
|
|
32
|
+
_data = util.toThousands(_data) + (unit || '');
|
|
33
|
+
}
|
|
34
|
+
return _data;
|
|
35
|
+
};
|
|
36
|
+
var lineLabel = unitHandle(item.value);
|
|
37
|
+
var minValues = item.minValues && unitHandle(item.minValues);
|
|
38
|
+
var mixValues = item.mixValues && unitHandle(item.mixValues);
|
|
33
39
|
var name = item.seriesName.trim();
|
|
34
40
|
if (item.seriesType === 'bar' && params.length === 1 && !name) {
|
|
35
41
|
name = (item.data && item.data.label ? item.data.label : item.name).trim();
|
|
@@ -37,7 +43,11 @@ var tooltipFormatterDefault = function tooltipFormatterDefault(params, resultFor
|
|
|
37
43
|
var nameArr = name.split('|:|');
|
|
38
44
|
name = nameArr[0];
|
|
39
45
|
var orderNum = nameArr[1];
|
|
40
|
-
|
|
46
|
+
if (item.minValues === null && item.mixValues === null) {
|
|
47
|
+
htmlArray.push("<div class=\"biz-chart-tooltip-item\">\n <div class=\"biz-chart-tooltip-content\">\n <span class=\"".concat(orderNum ? 'biz-tooltip-order' : 'biz-tooltip-marker', "\" style=\"background:").concat(item.color, "\">").concat(orderNum || '', "</span>\n <div class=\"biz-tooltip-name\">").concat(name, "</div>\n </div> \n <span class=\"biz-chart-tooltip-value\">").concat(lineLabel, "</span>\n </div>"));
|
|
48
|
+
} else {
|
|
49
|
+
htmlArray.push("<div class=\"biz-chart-tooltip-item-new\">\n <div class=\"biz-chart-tooltip-content\">\n <span class=\"".concat(orderNum ? 'biz-tooltip-order' : 'biz-tooltip-marker', "\" style=\"background:").concat(item.color, "\">").concat(orderNum || '', "</span>\n <div class=\"biz-tooltip-name\">").concat(name, "</div>\n </div> \n <div>\n <div>\n <span>\u9884\u6D4B\u503C\uFF1A</span>\n <span class=\"biz-chart-tooltip-item-new-value\">").concat(lineLabel, "</span>\n </div>\n <div>\n <span>\u9884\u6D4B\u6700\u5927\u503C\uFF1A</span>\n <span class=\"biz-chart-tooltip-item-new-value\">").concat(mixValues, "</span>\n </div>\n <div>\n <span>\u9884\u6D4B\u6700\u5C0F\u503C\uFF1A</span>\n <span class=\"biz-chart-tooltip-item-new-value\">").concat(minValues, "</span>\n </div>\n </div>\n </div>"));
|
|
50
|
+
}
|
|
41
51
|
});
|
|
42
52
|
return htmlArray.join('');
|
|
43
53
|
};
|
package/es/index.d.ts
CHANGED
|
@@ -46,8 +46,9 @@ import { chartColors } from './chart/util/color';
|
|
|
46
46
|
import useBizStore from './hooks/useBizStore';
|
|
47
47
|
import useChanged from './hooks/useChanged';
|
|
48
48
|
import useSubject from './hooks/useSubject';
|
|
49
|
+
import BizPlatformSelector from './platformSelector';
|
|
49
50
|
import DataSetGroup from './dataSetGroup';
|
|
50
|
-
export { BizTargetDimension, BizTargetFromPanel, BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizLayout, BizAnalysisLayout, BizDetailLayout, BizUserGroup, BizUserGroupHeader, IconFont, ColorIcon, BizFormulaTarget, BizAUMFormulaTarget, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetFromPanelContext, BizTargetCondition, BizDatePicker, BizQuickDatePicker, BizLoading, BizConditionItem, BizConditionGroup, BizAttrCondition, BizAttrConditionGroup, BizUserCondition, BizProductCondition, BizAddToScene, BizAddToPanel, BizCycleTime, BizDnd, BizLoginForm, DemoWrapper, SocketClient, ajax, util, base64, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig, chartColors, useBizStore, useChanged, useSubject, DataSetGroup, };
|
|
51
|
+
export { BizTargetDimension, BizTargetFromPanel, BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizLayout, BizAnalysisLayout, BizDetailLayout, BizUserGroup, BizUserGroupHeader, IconFont, ColorIcon, BizFormulaTarget, BizAUMFormulaTarget, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetFromPanelContext, BizTargetCondition, BizDatePicker, BizQuickDatePicker, BizLoading, BizConditionItem, BizConditionGroup, BizAttrCondition, BizAttrConditionGroup, BizUserCondition, BizProductCondition, BizAddToScene, BizAddToPanel, BizCycleTime, BizDnd, BizLoginForm, DemoWrapper, SocketClient, ajax, util, base64, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig, chartColors, useBizStore, useChanged, useSubject, DataSetGroup, BizPlatformSelector, };
|
|
51
52
|
export type { UserGroupTypes } from './userGroup/types';
|
|
52
53
|
export type { BizProductConditionT } from './productCondition/types';
|
|
53
54
|
export type { BizSelectTypes } from './select/types';
|
package/es/index.js
CHANGED
|
@@ -45,5 +45,6 @@ import { chartColors } from './chart/util/color';
|
|
|
45
45
|
import useBizStore from './hooks/useBizStore';
|
|
46
46
|
import useChanged from './hooks/useChanged';
|
|
47
47
|
import useSubject from './hooks/useSubject';
|
|
48
|
+
import BizPlatformSelector from './platformSelector';
|
|
48
49
|
import DataSetGroup from './dataSetGroup';
|
|
49
|
-
export { BizTargetDimension, BizTargetFromPanel, BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizLayout, BizAnalysisLayout, BizDetailLayout, BizUserGroup, BizUserGroupHeader, IconFont, ColorIcon, BizFormulaTarget, BizAUMFormulaTarget, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetFromPanelContext, BizTargetCondition, BizDatePicker, BizQuickDatePicker, BizLoading, BizConditionItem, BizConditionGroup, BizAttrCondition, BizAttrConditionGroup, BizUserCondition, BizProductCondition, BizAddToScene, BizAddToPanel, BizCycleTime, BizDnd, BizLoginForm, DemoWrapper, SocketClient, ajax, util, base64, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig, chartColors, useBizStore, useChanged, useSubject, DataSetGroup };
|
|
50
|
+
export { BizTargetDimension, BizTargetFromPanel, BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizLayout, BizAnalysisLayout, BizDetailLayout, BizUserGroup, BizUserGroupHeader, IconFont, ColorIcon, BizFormulaTarget, BizAUMFormulaTarget, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetFromPanelContext, BizTargetCondition, BizDatePicker, BizQuickDatePicker, BizLoading, BizConditionItem, BizConditionGroup, BizAttrCondition, BizAttrConditionGroup, BizUserCondition, BizProductCondition, BizAddToScene, BizAddToPanel, BizCycleTime, BizDnd, BizLoginForm, DemoWrapper, SocketClient, ajax, util, base64, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig, chartColors, useBizStore, useChanged, useSubject, DataSetGroup, BizPlatformSelector };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BizPlatformSelector } from '@zgfe/business-lib';
|
|
3
|
+
import InnerDemo from '../../demoWrapper/innerDemo';
|
|
4
|
+
export default (function () {
|
|
5
|
+
return /*#__PURE__*/React.createElement(InnerDemo, null, /*#__PURE__*/React.createElement("div", {
|
|
6
|
+
style: {
|
|
7
|
+
padding: '16px',
|
|
8
|
+
border: '1px solid #eee',
|
|
9
|
+
background: '#ddd'
|
|
10
|
+
}
|
|
11
|
+
}, /*#__PURE__*/React.createElement(BizPlatformSelector, {
|
|
12
|
+
onChange: function onChange(value) {
|
|
13
|
+
console.log('>>>>>>>>回传值', value);
|
|
14
|
+
}
|
|
15
|
+
})));
|
|
16
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { platItemProp } from './types';
|
|
3
|
+
import './styles/index.less';
|
|
4
|
+
declare const BizPlatformSelector: React.FC<{
|
|
5
|
+
onChange: (val: {
|
|
6
|
+
key: number;
|
|
7
|
+
value: string;
|
|
8
|
+
}) => void;
|
|
9
|
+
defaultValue?: {
|
|
10
|
+
key: number;
|
|
11
|
+
value: string;
|
|
12
|
+
};
|
|
13
|
+
value?: number;
|
|
14
|
+
valueOption?: platItemProp[];
|
|
15
|
+
}>;
|
|
16
|
+
export default BizPlatformSelector;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
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 _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; }
|
|
5
|
+
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; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React, { useState, useEffect } from 'react';
|
|
8
|
+
import { BizSelect } from '@zgfe/business-lib';
|
|
9
|
+
import { platformOption } from './util';
|
|
10
|
+
import './styles/index.less';
|
|
11
|
+
var BizPlatformSelector = function BizPlatformSelector(props) {
|
|
12
|
+
var classPrefix = 'biz-platform-selector';
|
|
13
|
+
var _useState = useState(),
|
|
14
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
15
|
+
currentValue = _useState2[0],
|
|
16
|
+
setCurrentValue = _useState2[1];
|
|
17
|
+
useEffect(function () {
|
|
18
|
+
if (props.value) {
|
|
19
|
+
var selectValue = platformOption.find(function (item) {
|
|
20
|
+
return item.key === props.value;
|
|
21
|
+
});
|
|
22
|
+
setCurrentValue(selectValue || platformOption[0]);
|
|
23
|
+
}
|
|
24
|
+
}, [props.value]);
|
|
25
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
className: classPrefix
|
|
27
|
+
}, /*#__PURE__*/React.createElement(BizSelect, {
|
|
28
|
+
className: "".concat(classPrefix, "-select"),
|
|
29
|
+
overlayClassName: "".concat(classPrefix, "-select-overlay"),
|
|
30
|
+
options: props.valueOption && props.valueOption.length ? props.valueOption : platformOption,
|
|
31
|
+
overlayWidth: 134,
|
|
32
|
+
keyField: "key",
|
|
33
|
+
labelField: "value",
|
|
34
|
+
value: currentValue,
|
|
35
|
+
defaultValue: props.defaultValue ? props.defaultValue : {
|
|
36
|
+
value: '全部平台',
|
|
37
|
+
key: 0
|
|
38
|
+
},
|
|
39
|
+
onChange: function onChange(val) {
|
|
40
|
+
props.onChange(val);
|
|
41
|
+
}
|
|
42
|
+
}));
|
|
43
|
+
};
|
|
44
|
+
export default BizPlatformSelector;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@import '../../assets/styles/inner.less';
|
|
2
|
+
.biz-platform-selector {
|
|
3
|
+
width: 134px;
|
|
4
|
+
border: 1px solid #f2f3f4;
|
|
5
|
+
border-radius: 4px;
|
|
6
|
+
.biz-platform-selector-select .biz-select-handle-input {
|
|
7
|
+
background-color: #fff;
|
|
8
|
+
.biz-select-handle-content .biz-select-handle-icon .bsicon {
|
|
9
|
+
color: #9aa1a9;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
.biz-platform-selector-select-overlay .biz-select-list-panel .biz-select-option {
|
|
14
|
+
.biz-select-option-icon .bsicon {
|
|
15
|
+
color: #9aa1a9;
|
|
16
|
+
}
|
|
17
|
+
&:hover {
|
|
18
|
+
.biz-select-option-icon .bsicon {
|
|
19
|
+
color: #165dff;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconFont } from '@zgfe/business-lib';
|
|
3
|
+
export var platformOption = [{
|
|
4
|
+
key: 0,
|
|
5
|
+
value: '全部平台'
|
|
6
|
+
}, {
|
|
7
|
+
key: 1,
|
|
8
|
+
value: 'Android',
|
|
9
|
+
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
10
|
+
type: "android1",
|
|
11
|
+
size: 16
|
|
12
|
+
})
|
|
13
|
+
}, {
|
|
14
|
+
key: 2,
|
|
15
|
+
value: 'IOS',
|
|
16
|
+
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
17
|
+
type: "ios1",
|
|
18
|
+
size: 16
|
|
19
|
+
})
|
|
20
|
+
}, {
|
|
21
|
+
key: 3,
|
|
22
|
+
value: 'JS',
|
|
23
|
+
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
24
|
+
type: "a-js2",
|
|
25
|
+
size: 16
|
|
26
|
+
})
|
|
27
|
+
}, {
|
|
28
|
+
key: 4,
|
|
29
|
+
value: '微信小程序',
|
|
30
|
+
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
31
|
+
type: "weixinxiaochengxu",
|
|
32
|
+
size: 16
|
|
33
|
+
})
|
|
34
|
+
}, {
|
|
35
|
+
key: 5,
|
|
36
|
+
value: '服务端',
|
|
37
|
+
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
38
|
+
type: "fuwuqi",
|
|
39
|
+
size: 16
|
|
40
|
+
})
|
|
41
|
+
}, {
|
|
42
|
+
key: -1,
|
|
43
|
+
value: '其他'
|
|
44
|
+
}];
|
|
@@ -21,6 +21,7 @@ import moment from 'moment';
|
|
|
21
21
|
import { BizUserConditionContext } from '..';
|
|
22
22
|
import request from '../../utils/ajax';
|
|
23
23
|
import Apis from '../../constants/apis';
|
|
24
|
+
import IconFont from '../../icon/iconFont';
|
|
24
25
|
var classPrefix = 'biz-user-condition-cdp';
|
|
25
26
|
var CdpConditionItem = function CdpConditionItem(props) {
|
|
26
27
|
var _useContext = useContext(BizUserConditionContext),
|
|
@@ -263,7 +264,13 @@ var CdpConditionItem = function CdpConditionItem(props) {
|
|
|
263
264
|
keyField: "metaDatasetId",
|
|
264
265
|
value: dataset,
|
|
265
266
|
onChange: onTableChange
|
|
266
|
-
}),
|
|
267
|
+
}), /*#__PURE__*/React.createElement("a", {
|
|
268
|
+
target: "_blank",
|
|
269
|
+
href: "https://docs.zhugeio.com/datamanager/detail_data.html"
|
|
270
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
271
|
+
type: "bangzhu",
|
|
272
|
+
className: "".concat(classPrefix, "-select-tips")
|
|
273
|
+
})), dataset ? /*#__PURE__*/React.createElement("div", {
|
|
267
274
|
className: "".concat(classPrefix, "-item")
|
|
268
275
|
}, /*#__PURE__*/React.createElement(BizSelect, {
|
|
269
276
|
className: "".concat(classPrefix, "-select-field"),
|
|
@@ -21,6 +21,7 @@ import moment from 'moment';
|
|
|
21
21
|
import { BizUserConditionContext } from '..';
|
|
22
22
|
import request from '../../utils/ajax';
|
|
23
23
|
import Apis from '../../constants/apis';
|
|
24
|
+
import IconFont from '../../icon/iconFont';
|
|
24
25
|
var classPrefix = 'biz-user-condition-cdp-csh';
|
|
25
26
|
var CdpConditionItem = function CdpConditionItem(props) {
|
|
26
27
|
var _useContext = useContext(BizUserConditionContext),
|
|
@@ -407,7 +408,13 @@ var CdpConditionItem = function CdpConditionItem(props) {
|
|
|
407
408
|
keyField: "metaDatasetId",
|
|
408
409
|
value: subDataset,
|
|
409
410
|
onChange: onSubTableChange
|
|
410
|
-
}), /*#__PURE__*/React.createElement("
|
|
411
|
+
}), /*#__PURE__*/React.createElement("a", {
|
|
412
|
+
target: "_blank",
|
|
413
|
+
href: "https://docs.zhugeio.com/datamanager/detail_data.html"
|
|
414
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
415
|
+
type: "bangzhu",
|
|
416
|
+
className: "".concat(classPrefix, "-select-tips")
|
|
417
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
411
418
|
className: "".concat(classPrefix, "-item")
|
|
412
419
|
}, /*#__PURE__*/React.createElement(BizSelect, {
|
|
413
420
|
className: "".concat(classPrefix, "-select-field"),
|
|
@@ -464,7 +471,13 @@ var CdpConditionItem = function CdpConditionItem(props) {
|
|
|
464
471
|
keyField: "metaDatasetId",
|
|
465
472
|
value: dataset,
|
|
466
473
|
onChange: onTableChange
|
|
467
|
-
}),
|
|
474
|
+
}), /*#__PURE__*/React.createElement("a", {
|
|
475
|
+
target: "_blank",
|
|
476
|
+
href: "https://docs.zhugeio.com/datamanager/detail_data.html"
|
|
477
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
478
|
+
type: "bangzhu",
|
|
479
|
+
className: "".concat(classPrefix, "-select-tips")
|
|
480
|
+
})), dataset ? /*#__PURE__*/React.createElement("div", {
|
|
468
481
|
className: "".concat(classPrefix, "-item")
|
|
469
482
|
}, /*#__PURE__*/React.createElement(BizSelect, {
|
|
470
483
|
className: "".concat(classPrefix, "-select-field"),
|
package/es/userGroup/overlay.js
CHANGED
|
@@ -45,7 +45,8 @@ var Overlay = function Overlay(_ref2) {
|
|
|
45
45
|
var _useContext = useContext(BizGlobalDataContext),
|
|
46
46
|
userGroupList = _useContext.userGroupList,
|
|
47
47
|
showUserGroupModal = _useContext.showUserGroupModal,
|
|
48
|
-
setUserGroupList = _useContext.setUserGroupList
|
|
48
|
+
setUserGroupList = _useContext.setUserGroupList,
|
|
49
|
+
currentApp = _useContext.currentApp;
|
|
49
50
|
var _useState5 = useState(),
|
|
50
51
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
51
52
|
currentGroup = _useState6[0],
|
|
@@ -96,10 +97,10 @@ var Overlay = function Overlay(_ref2) {
|
|
|
96
97
|
className: "".concat(classPrefix, "-typelist")
|
|
97
98
|
}, [{
|
|
98
99
|
type: 'userGroup',
|
|
99
|
-
label: '
|
|
100
|
+
label: "".concat((currentApp === null || currentApp === void 0 ? void 0 : currentApp.type) === 'user' ? '用户' : '主体', "\u5206\u7FA4")
|
|
100
101
|
}, {
|
|
101
102
|
type: 'tag',
|
|
102
|
-
label: '
|
|
103
|
+
label: "".concat((currentApp === null || currentApp === void 0 ? void 0 : currentApp.type) === 'user' ? '用户' : '主体', "\u6807\u7B7E")
|
|
103
104
|
}].map(function (item) {
|
|
104
105
|
return /*#__PURE__*/React.createElement("div", {
|
|
105
106
|
key: item.type,
|
|
@@ -123,13 +124,13 @@ var Overlay = function Overlay(_ref2) {
|
|
|
123
124
|
}, /*#__PURE__*/React.createElement(Search, {
|
|
124
125
|
show: true,
|
|
125
126
|
onChange: onSearch,
|
|
126
|
-
placeholder: "\u641C\u7D22\
|
|
127
|
+
placeholder: "\u641C\u7D22\u5206\u7FA4\u540D\u79F0"
|
|
127
128
|
}), /*#__PURE__*/React.createElement("a", {
|
|
128
129
|
className: "".concat(classPrefix, "-add"),
|
|
129
130
|
onClick: onClickAdd
|
|
130
131
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
131
132
|
type: "zengjia"
|
|
132
|
-
}), "\
|
|
133
|
+
}), "\u6DFB\u52A0\u5206\u7FA4")), showList.length > 10 ? /*#__PURE__*/React.createElement(List, {
|
|
133
134
|
data: showList || [],
|
|
134
135
|
itemHeight: 32,
|
|
135
136
|
itemKey: "id",
|