neo-cmp-cli 1.13.18 → 1.13.20
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/README.md +217 -600
- package/dist/neo/neoRequire.js +1 -1
- package/dist/package.json.js +1 -1
- package/package.json +1 -2
- package/template/asset-manage-template/package.json +2 -2
- package/template/echarts-custom-cmp-template/package.json +1 -1
- package/template/empty-custom-cmp-template/package.json +2 -2
- package/template/neo-bi-cmps/package.json +2 -2
- package/template/neo-bi-cmps/src/components/filterBar__c/common.scss +1 -1
- package/template/neo-bi-cmps/src/components/filterBar__c/index.tsx +18 -10
- package/template/neo-bi-cmps/src/components/filterBar__c/model.ts +8 -2
- package/template/neo-bi-cmps/src/utils/common.ts +18 -20
- package/template/neo-bi-cmps/src/utils/filter2chartFilter.ts +4 -6
- package/template/neo-bi-cmps/src/utils/pipelineFunnel.ts +4 -2
- package/template/neo-bi-cmps/src/utils/simpleTable.tsx +21 -16
- package/template/neo-custom-cmp-template/package.json +2 -2
- package/template/neo-custom-cmp-template/src/components/customApi__c/README.md +90 -0
- package/template/neo-custom-cmp-template/src/components/customApi__c/index.tsx +184 -0
- package/template/neo-custom-cmp-template/src/components/customApi__c/model.ts +53 -0
- package/template/neo-custom-cmp-template/src/components/customApi__c/style.scss +116 -0
- package/template/neo-custom-cmp-template/src/components/entityTable__c/index.tsx +5 -1
- package/template/neo-custom-cmp-template/src/components/simpleCmp__c/index.tsx +4 -1
- package/template/neo-h5-cmps/neo.config.js +1 -1
- package/template/neo-h5-cmps/package.json +2 -2
- package/template/neo-h5-cmps/src/components/entityList__c/index.tsx +0 -1
- package/template/neo-order-cmps/package.json +1 -1
- package/template/neo-pipeline-cmps/package.json +1 -1
- package/template/neo-pipeline-cmps/src/components/filterBar__c/model.ts +10 -2
- package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/index.tsx +1 -0
- package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/model.ts +14 -2
- package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/reset.scss +4 -0
- package/template/neo-pipeline-cmps/src/components/showHealthResult__c/index.tsx +2 -1
- package/template/neo-pipeline-cmps/src/components/stageSwitch__c/model.ts +14 -2
- package/template/neo-pipeline-cmps/src/components/stageTimeChart__c/model.ts +14 -2
- package/template/neo-web-entity-grid/package.json +1 -1
- package/template/neo-web-entity-grid/src/components/createForm__c/index.tsx +271 -259
- package/template/neo-web-entity-grid/src/components/createForm__c/model.ts +17 -3
- package/template/neo-web-entity-grid/src/components/createForm__c/resetAntd.scss +0 -1
- package/template/neo-web-entity-grid/src/components/createForm__c/style.scss +1 -1
- package/template/neo-web-entity-grid/src/components/entityGrid2__c/index.tsx +5 -1
- package/template/neo-web-entity-grid/src/components/entityGrid2__c/model.ts +4 -3
- package/template/neo-web-entity-grid/src/components/entityGrid3__c/index.tsx +1 -1
- package/template/neo-web-entity-grid/src/components/searchForm__c/index.tsx +4 -3
- package/template/neo-web-entity-grid/src/components/searchForm__c/model.ts +9 -4
- package/template/neo-web-entity-grid/src/components/searchForm__c/style.scss +2 -1
- package/template/neo-web-form/package.json +2 -2
- package/template/neo-web-form/src/components/batchAddTable__c/index.tsx +19 -19
- package/template/neo-web-form/src/components/batchAddTable__c/model.ts +11 -15
- package/template/neo-web-form/src/components/listSummary__c/index.tsx +6 -5
- package/template/react-custom-cmp-template/package.json +1 -1
- package/docs/H5/347/253/257 NeoEntityList /344/275/277/347/224/250/350/257/264/346/230/216.md" +0 -293
- package/docs/Web/347/253/257 NeoEntityGrid /344/275/277/347/224/250/350/257/264/346/230/216.md" +0 -1206
- package/docs//345/217/257/347/224/250/345/261/236/346/200/247/351/205/215/347/275/256/351/241/271.md +0 -801
- package/docs//351/200/232/347/224/250/344/273/243/347/220/206/346/216/245/345/217/243/forward.zip +0 -0
- package/docs//351/200/232/347/224/250/344/273/243/347/220/206/346/216/245/345/217/243//350/207/252/345/256/232/344/271/211API:/351/200/232/347/224/250/344/273/243/347/220/206/346/216/245/345/217/243/344/275/277/347/224/250/350/257/264/346/230/216.md +0 -13
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file 自定义 API(通用代理)示例组件
|
|
3
|
+
* @description 通过平台「通用代理」自定义 API 转发请求,获取第三方列表数据并以表格展示
|
|
4
|
+
*/
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { Table, Spin, Empty } from 'antd';
|
|
7
|
+
// @ts-ignore
|
|
8
|
+
import { customApi } from 'neo-open-api';
|
|
9
|
+
// @ts-ignore
|
|
10
|
+
import { BaseCmp } from 'neo-ui-common';
|
|
11
|
+
// @ts-ignore
|
|
12
|
+
import { NeoEvent } from 'neo-ui-common';
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
import isEqual from 'lodash/isEqual';
|
|
15
|
+
|
|
16
|
+
import './style.scss';
|
|
17
|
+
|
|
18
|
+
const DEFAULT_POSTS_URL = 'https://jsonplaceholder.typicode.com/posts';
|
|
19
|
+
/**
|
|
20
|
+
* 其他可测试的接口
|
|
21
|
+
常用列表接口(直接访问):
|
|
22
|
+
文章列表:https://jsonplaceholder.typicode.com/posts
|
|
23
|
+
用户列表:https://jsonplaceholder.typicode.com/users
|
|
24
|
+
待办列表:https://jsonplaceholder.typicode.com/todos
|
|
25
|
+
评论列表:https://jsonplaceholder.typicode.com/comments
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
interface CustomApiCmpProps {
|
|
29
|
+
fetchConfig?: any; // 自定义API配置
|
|
30
|
+
data?: any;
|
|
31
|
+
className?: string;
|
|
32
|
+
title?: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface CustomApiCmpState {
|
|
36
|
+
dataSource: any[];
|
|
37
|
+
loading: boolean;
|
|
38
|
+
error: string | null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const POST_COLUMNS = [
|
|
42
|
+
{ title: '用户 ID', dataIndex: 'userId', key: 'userId', width: 88 },
|
|
43
|
+
{ title: '标题', dataIndex: 'title', key: 'title', ellipsis: true },
|
|
44
|
+
{ title: '正文', dataIndex: 'body', key: 'body', ellipsis: true },
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
function normalizePostsResult(result: any): { rows: any[]; errorMsg?: string } {
|
|
48
|
+
if (result === null || result === undefined) {
|
|
49
|
+
return { rows: [], errorMsg: '接口无返回' };
|
|
50
|
+
}
|
|
51
|
+
// SDK / 通用代理有时直接将第三方响应解析为数组
|
|
52
|
+
if (Array.isArray(result)) {
|
|
53
|
+
return { rows: result };
|
|
54
|
+
}
|
|
55
|
+
if (result.status === false) {
|
|
56
|
+
return { rows: [], errorMsg: result.msg || '请求失败' };
|
|
57
|
+
}
|
|
58
|
+
const raw = result.data;
|
|
59
|
+
if (Array.isArray(raw)) {
|
|
60
|
+
return { rows: raw };
|
|
61
|
+
}
|
|
62
|
+
if (raw && Array.isArray(raw.records)) {
|
|
63
|
+
return { rows: raw.records };
|
|
64
|
+
}
|
|
65
|
+
if (raw && Array.isArray(raw.list)) {
|
|
66
|
+
return { rows: raw.list };
|
|
67
|
+
}
|
|
68
|
+
return { rows: [], errorMsg: '返回数据格式不是列表' };
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export default class CustomApiCmp extends BaseCmp<
|
|
72
|
+
CustomApiCmpProps,
|
|
73
|
+
CustomApiCmpState
|
|
74
|
+
> {
|
|
75
|
+
constructor(props: CustomApiCmpProps) {
|
|
76
|
+
super(props);
|
|
77
|
+
this.state = {
|
|
78
|
+
dataSource: [],
|
|
79
|
+
loading: false,
|
|
80
|
+
error: null,
|
|
81
|
+
};
|
|
82
|
+
this.loadData = this.loadData.bind(this);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
componentDidMount() {
|
|
86
|
+
this.loadData();
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
componentDidUpdate(prevProps: CustomApiCmpProps) {
|
|
90
|
+
if (!isEqual(prevProps.fetchConfig, this.props.fetchConfig)) {
|
|
91
|
+
this.loadData();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@NeoEvent.function
|
|
96
|
+
async loadData() {
|
|
97
|
+
const { fetchConfig } = this.props;
|
|
98
|
+
const targetUrl = DEFAULT_POSTS_URL;
|
|
99
|
+
|
|
100
|
+
this.setState({ loading: true, error: null });
|
|
101
|
+
|
|
102
|
+
let result: any = {};
|
|
103
|
+
|
|
104
|
+
try {
|
|
105
|
+
// 通过自定义API获取数据
|
|
106
|
+
if (fetchConfig) {
|
|
107
|
+
// 根据用户配置的自定义API相关数据获取数据
|
|
108
|
+
result = await customApi.run(fetchConfig);
|
|
109
|
+
const { rows, errorMsg } = normalizePostsResult(result);
|
|
110
|
+
if (errorMsg) {
|
|
111
|
+
this.setState({ dataSource: [], loading: false, error: errorMsg });
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
this.setState({ dataSource: rows, loading: false, error: null });
|
|
115
|
+
return;
|
|
116
|
+
} else {
|
|
117
|
+
result = await customApi.run({
|
|
118
|
+
apiUrl: '/rest/data/v2.0/scripts/api/proxy/forward', // 平台通用接口代理
|
|
119
|
+
methodType: 'POST',
|
|
120
|
+
data: {
|
|
121
|
+
url: targetUrl,
|
|
122
|
+
method: 'GET',
|
|
123
|
+
data: {test: 333},
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const { rows, errorMsg } = normalizePostsResult(result);
|
|
129
|
+
if (errorMsg) {
|
|
130
|
+
this.setState({ dataSource: [], loading: false, error: errorMsg });
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
this.setState({ dataSource: rows, loading: false, error: null });
|
|
134
|
+
} catch (error: any) {
|
|
135
|
+
this.setState({
|
|
136
|
+
dataSource: [],
|
|
137
|
+
loading: false,
|
|
138
|
+
error: error?.message || '获取数据失败',
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
render() {
|
|
144
|
+
const { dataSource, loading, error } = this.state;
|
|
145
|
+
const { className, title: propsTitle } = this.props;
|
|
146
|
+
const displayTitle = propsTitle || '自定义 API 示例';
|
|
147
|
+
|
|
148
|
+
console.log('this.props:', this.props);
|
|
149
|
+
|
|
150
|
+
return (
|
|
151
|
+
<div className={`customApi__c ${className || ''}`}>
|
|
152
|
+
<div className="table-wrapper">
|
|
153
|
+
<div className="panel-header">
|
|
154
|
+
<h3>{displayTitle}</h3>
|
|
155
|
+
</div>
|
|
156
|
+
<div className="table-container">
|
|
157
|
+
<Spin spinning={loading} tip="加载数据中...">
|
|
158
|
+
{error ? (
|
|
159
|
+
<Empty
|
|
160
|
+
image={Empty.PRESENTED_IMAGE_SIMPLE}
|
|
161
|
+
description={
|
|
162
|
+
<div>
|
|
163
|
+
<div style={{ color: '#ff4d4f', marginBottom: 8 }}>
|
|
164
|
+
{error}
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
}
|
|
168
|
+
/>
|
|
169
|
+
) : (
|
|
170
|
+
<Table
|
|
171
|
+
columns={POST_COLUMNS}
|
|
172
|
+
dataSource={dataSource}
|
|
173
|
+
rowKey="id"
|
|
174
|
+
pagination={{ pageSize: 10, showSizeChanger: true }}
|
|
175
|
+
scroll={{ y: 'max-content' }}
|
|
176
|
+
/>
|
|
177
|
+
)}
|
|
178
|
+
</Spin>
|
|
179
|
+
</div>
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file 自定义 API(通用代理)示例 — 编辑器描述
|
|
3
|
+
*/
|
|
4
|
+
export class CustomApiCmpModel {
|
|
5
|
+
label: string = '自定义API示例';
|
|
6
|
+
|
|
7
|
+
description: string =
|
|
8
|
+
'通过通用代理 customApi.run 请求 JSONPlaceholder posts 并以表格展示';
|
|
9
|
+
|
|
10
|
+
iconUrl: string = 'https://custom-widgets.bj.bcebos.com/table.svg';
|
|
11
|
+
|
|
12
|
+
targetPage: string[] = ['all'];
|
|
13
|
+
|
|
14
|
+
targetDevice: string = 'web';
|
|
15
|
+
|
|
16
|
+
defaultComProps = {
|
|
17
|
+
title: '自定义 API 示例',
|
|
18
|
+
fetchConfig: {
|
|
19
|
+
apiUrl: '/rest/data/v2.0/scripts/api/proxy/forward',
|
|
20
|
+
methodType: 'POST',
|
|
21
|
+
data: {
|
|
22
|
+
url: 'https://jsonplaceholder.typicode.com/posts',
|
|
23
|
+
method: 'GET',
|
|
24
|
+
data: {test: 111},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
functions = [
|
|
30
|
+
{
|
|
31
|
+
apiKey: 'loadData',
|
|
32
|
+
label: '刷新表格',
|
|
33
|
+
helpTextKey: '刷新当前表格数据',
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
propsSchema = [
|
|
38
|
+
{
|
|
39
|
+
type: 'panelInput',
|
|
40
|
+
name: 'title',
|
|
41
|
+
label: '表格标题',
|
|
42
|
+
placeholder: '请输入表格标题',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
type: 'customApi',
|
|
46
|
+
name: 'fetchConfig',
|
|
47
|
+
label: '自定义API',
|
|
48
|
+
description: '请选择自定义API;Data 中 Value 可填 JSON。',
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export default CustomApiCmpModel;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
.customApi__c {
|
|
2
|
+
.table-wrapper {
|
|
3
|
+
border: 1px solid #ddd;
|
|
4
|
+
border-radius: 4px;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.panel-header {
|
|
11
|
+
padding: 15px;
|
|
12
|
+
background: #f5f5f5;
|
|
13
|
+
border-bottom: 1px solid #ddd;
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: space-between;
|
|
16
|
+
align-items: center;
|
|
17
|
+
|
|
18
|
+
h3 {
|
|
19
|
+
margin: 0;
|
|
20
|
+
font-size: 16px;
|
|
21
|
+
font-weight: 600;
|
|
22
|
+
color: #262626;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.table-container {
|
|
27
|
+
flex: 1;
|
|
28
|
+
overflow-y: auto;
|
|
29
|
+
|
|
30
|
+
.ant-table {
|
|
31
|
+
.ant-table-thead > tr > th {
|
|
32
|
+
background-color: #f9f9f9;
|
|
33
|
+
font-weight: 600;
|
|
34
|
+
color: #262626;
|
|
35
|
+
border-bottom: 1px solid #eee;
|
|
36
|
+
padding: 10px;
|
|
37
|
+
text-align: left;
|
|
38
|
+
font-size: 13px;
|
|
39
|
+
position: sticky;
|
|
40
|
+
top: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ant-table-tbody > tr > td {
|
|
44
|
+
border-bottom: 1px solid #eee;
|
|
45
|
+
padding: 10px;
|
|
46
|
+
text-align: left;
|
|
47
|
+
font-size: 13px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ant-table-tbody > tr:hover > td {
|
|
51
|
+
background-color: #f5f5f5;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ant-empty {
|
|
56
|
+
padding: 40px 0;
|
|
57
|
+
|
|
58
|
+
.ant-empty-description {
|
|
59
|
+
color: #8c8c8c;
|
|
60
|
+
font-size: 14px;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ant-spin {
|
|
66
|
+
.ant-spin-dot {
|
|
67
|
+
font-size: 20px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.ant-spin-text {
|
|
71
|
+
color: #8c8c8c;
|
|
72
|
+
font-size: 14px;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// 响应式设计
|
|
77
|
+
@media (max-width: 768px) {
|
|
78
|
+
.panel-header {
|
|
79
|
+
padding: 12px;
|
|
80
|
+
|
|
81
|
+
h3 {
|
|
82
|
+
font-size: 14px;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.table-container {
|
|
87
|
+
.ant-table {
|
|
88
|
+
.ant-table-thead > tr > th,
|
|
89
|
+
.ant-table-tbody > tr > td {
|
|
90
|
+
padding: 8px 12px;
|
|
91
|
+
font-size: 12px;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@media (max-width: 576px) {
|
|
98
|
+
.panel-header {
|
|
99
|
+
padding: 10px;
|
|
100
|
+
|
|
101
|
+
h3 {
|
|
102
|
+
font-size: 13px;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.table-container {
|
|
107
|
+
.ant-table {
|
|
108
|
+
.ant-table-thead > tr > th,
|
|
109
|
+
.ant-table-tbody > tr > td {
|
|
110
|
+
padding: 6px 8px;
|
|
111
|
+
font-size: 12px;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -341,7 +341,11 @@ export default class EntityTable extends BaseCmp<
|
|
|
341
341
|
|
|
342
342
|
// 对象类型字段或实际值为对象时:转为字符串展示
|
|
343
343
|
column.render = (value: any) => {
|
|
344
|
-
if (
|
|
344
|
+
if (
|
|
345
|
+
value !== null &&
|
|
346
|
+
value !== undefined &&
|
|
347
|
+
typeof value === 'object'
|
|
348
|
+
) {
|
|
345
349
|
return objectValueToString(value);
|
|
346
350
|
}
|
|
347
351
|
return value;
|
|
@@ -16,7 +16,10 @@ interface CustomCmpStates {
|
|
|
16
16
|
[key: string]: any;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export default class CustomCmp extends BaseCmp<
|
|
19
|
+
export default class CustomCmp extends BaseCmp<
|
|
20
|
+
CustomCmpProps,
|
|
21
|
+
CustomCmpStates
|
|
22
|
+
> {
|
|
20
23
|
constructor(props: CustomCmpProps) {
|
|
21
24
|
super(props);
|
|
22
25
|
}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"axios": "^1.7.0",
|
|
40
40
|
"antd-mobile": "^2.3.3",
|
|
41
41
|
"lodash": "^4.17.23",
|
|
42
|
-
"neo-open-api": "^1.2.
|
|
42
|
+
"neo-open-api": "^1.2.8",
|
|
43
43
|
"tslib": "2.3.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@types/react": "^16.9.11",
|
|
50
50
|
"@types/react-dom": "^16.9.15",
|
|
51
51
|
"@types/axios": "^0.14.0",
|
|
52
|
-
"neo-cmp-cli": "^1.13.
|
|
52
|
+
"neo-cmp-cli": "^1.13.20",
|
|
53
53
|
"husky": "^4.2.5",
|
|
54
54
|
"lint-staged": "^10.2.9",
|
|
55
55
|
"prettier": "^2.0.5"
|
|
@@ -26,7 +26,6 @@ export default class EntityListCmp extends React.PureComponent<EntityListProps>
|
|
|
26
26
|
<NeoEntityList
|
|
27
27
|
{...restProps}
|
|
28
28
|
name="entityList"
|
|
29
|
-
entityApiKey={'customContact__c'}
|
|
30
29
|
onItemClickIntercept={(data: any, entity: any) => {
|
|
31
30
|
// 自定义点击处理
|
|
32
31
|
console.log('点击了列表项', data, entity);
|
|
@@ -26,8 +26,16 @@ export class FilterBarModel {
|
|
|
26
26
|
label: 'After filter conditions change',
|
|
27
27
|
helpText:
|
|
28
28
|
'Triggered when any filter option or custom time range changes; event params include closeDate, closeDateCustomRange (for non-custom: current relative period start/end Unix ms timestamps; for custom: RangePicker start/end), opportunityOwner (owner multi-select id array), businessType, businessTypeLabel (business type display name), changesSince, changesSinceCustomTime (for Custom Changes Since: selected date midnight; otherwise for non-custom Close Date: period start midnight)',
|
|
29
|
-
eventParams:
|
|
30
|
-
|
|
29
|
+
eventParams: [
|
|
30
|
+
{
|
|
31
|
+
apiKey: 'eventParam',
|
|
32
|
+
children: [
|
|
33
|
+
{ apiKey: 'data', label: 'Current filter data', type: 'Object' },
|
|
34
|
+
],
|
|
35
|
+
label: 'Event parameters',
|
|
36
|
+
type: 'Object',
|
|
37
|
+
},
|
|
38
|
+
],
|
|
31
39
|
},
|
|
32
40
|
];
|
|
33
41
|
|
|
@@ -21,8 +21,20 @@ export class PipelineFunnelModel {
|
|
|
21
21
|
label: 'Triggered on stage click',
|
|
22
22
|
helpText:
|
|
23
23
|
'Triggered when clicking a funnel stage; event params include activeStage (current active stage)',
|
|
24
|
-
eventParams:
|
|
25
|
-
|
|
24
|
+
eventParams: [
|
|
25
|
+
{
|
|
26
|
+
apiKey: 'eventParam',
|
|
27
|
+
children: [
|
|
28
|
+
{
|
|
29
|
+
apiKey: 'activeStage',
|
|
30
|
+
label: 'Current active stage',
|
|
31
|
+
type: 'String',
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
label: 'Event parameters',
|
|
35
|
+
type: 'Object',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
26
38
|
},
|
|
27
39
|
];
|
|
28
40
|
|
|
@@ -185,6 +185,7 @@ function buildHealthRadarOption(
|
|
|
185
185
|
return {
|
|
186
186
|
tooltip: {
|
|
187
187
|
trigger: 'item',
|
|
188
|
+
position: 'inside',
|
|
188
189
|
},
|
|
189
190
|
radar: {
|
|
190
191
|
indicator,
|
|
@@ -212,7 +213,7 @@ function buildHealthRadarOption(
|
|
|
212
213
|
data: [
|
|
213
214
|
{
|
|
214
215
|
value: items.map((i) => i.score),
|
|
215
|
-
name: 'Health
|
|
216
|
+
name: 'Opportunity Health',
|
|
216
217
|
areaStyle: {
|
|
217
218
|
color: 'rgba(99,102,241,0.2)',
|
|
218
219
|
},
|
|
@@ -19,8 +19,20 @@ export class StageSwitchModel {
|
|
|
19
19
|
label: 'After active stage changes',
|
|
20
20
|
helpText:
|
|
21
21
|
'Triggered after the active stage changes; event params include activeStage (current active stage)',
|
|
22
|
-
eventParams:
|
|
23
|
-
|
|
22
|
+
eventParams: [
|
|
23
|
+
{
|
|
24
|
+
apiKey: 'eventParam',
|
|
25
|
+
children: [
|
|
26
|
+
{
|
|
27
|
+
apiKey: 'activeStage',
|
|
28
|
+
label: 'Current active stage',
|
|
29
|
+
type: 'String',
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
label: 'Event parameters',
|
|
33
|
+
type: 'Object',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
24
36
|
},
|
|
25
37
|
];
|
|
26
38
|
|
|
@@ -33,8 +33,20 @@ export class StageTimeChartModel {
|
|
|
33
33
|
label: 'Triggered on stage bar click',
|
|
34
34
|
helpText:
|
|
35
35
|
'Triggered when clicking a stage bar; event params include activeStage (current active stage)',
|
|
36
|
-
eventParams:
|
|
37
|
-
|
|
36
|
+
eventParams: [
|
|
37
|
+
{
|
|
38
|
+
apiKey: 'eventParam',
|
|
39
|
+
children: [
|
|
40
|
+
{
|
|
41
|
+
apiKey: 'activeStage',
|
|
42
|
+
label: 'Current active stage',
|
|
43
|
+
type: 'String',
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
label: 'Event parameters',
|
|
47
|
+
type: 'Object',
|
|
48
|
+
},
|
|
49
|
+
],
|
|
38
50
|
},
|
|
39
51
|
];
|
|
40
52
|
|