neo-cmp-cli 1.13.16 → 1.13.18

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 (182) hide show
  1. package/README.md +2 -1
  2. package/dist/index2.js +1 -1
  3. package/dist/main2.js +1 -1
  4. package/dist/neo/env.js +1 -1
  5. package/dist/neo/neoLogin.js +1 -1
  6. package/dist/neo/pushCmp.js +1 -1
  7. package/dist/package.json.js +1 -1
  8. package/package.json +3 -2
  9. package/template/antd-custom-cmp-template/package.json +1 -1
  10. package/template/asset-manage-template/docs/README.md +1 -232
  11. package/template/asset-manage-template/package.json +2 -2
  12. package/template/echarts-custom-cmp-template/package.json +1 -1
  13. package/template/empty-custom-cmp-template/package.json +2 -2
  14. package/template/map-custom-cmp-template/package.json +1 -1
  15. package/template/neo-bi-cmps/neo.config.js +7 -1
  16. package/template/neo-bi-cmps/package.json +8 -7
  17. package/template/neo-bi-cmps/public/403.html +77 -0
  18. package/template/neo-bi-cmps/public/demo.html +2453 -0
  19. package/template/neo-bi-cmps/src/assets/icon/barChart.svg +1 -0
  20. package/template/neo-bi-cmps/src/assets/icon/card.svg +1 -0
  21. package/template/neo-bi-cmps/src/assets/icon/filter.svg +1 -0
  22. package/template/neo-bi-cmps/src/assets/icon/funnel.svg +1 -0
  23. package/template/neo-bi-cmps/src/assets/icon/tab.svg +1 -0
  24. package/template/neo-bi-cmps/src/components/filterBar__c/README.md +3 -14
  25. package/template/neo-bi-cmps/src/components/filterBar__c/common.scss +29 -0
  26. package/template/neo-bi-cmps/src/components/filterBar__c/index.tsx +668 -146
  27. package/template/neo-bi-cmps/src/components/filterBar__c/model.ts +26 -48
  28. package/template/neo-bi-cmps/src/components/filterBar__c/style.scss +46 -139
  29. package/template/neo-bi-cmps/src/components/targetNumber__c/customStyleConfig/index.tsx +11 -10
  30. package/template/neo-bi-cmps/src/components/targetNumber__c/index.tsx +9 -16
  31. package/template/neo-bi-cmps/src/components/targetNumber__c/model.ts +1 -1
  32. package/template/neo-bi-cmps/src/utils/common.ts +231 -0
  33. package/template/neo-bi-cmps/src/utils/filter2chartFilter.ts +268 -0
  34. package/template/neo-bi-cmps/src/utils/filterBar.ts +140 -0
  35. package/template/neo-bi-cmps/src/utils/pipelineFunnel.ts +341 -0
  36. package/template/{neo-h5-cmps/src/utils/queryObjectData.ts → neo-bi-cmps/src/utils/queryByCustomSQL.ts} +18 -13
  37. package/template/neo-bi-cmps/src/utils/requestDebounce.ts +22 -0
  38. package/template/neo-bi-cmps/src/utils/simpleTable.tsx +344 -0
  39. package/template/neo-bi-cmps/src/utils/stageSwitch.ts +15 -0
  40. package/template/neo-bi-cmps/src/utils/stageTimeChart.ts +90 -0
  41. package/template/neo-bi-cmps/src/utils/targetNumber.ts +12 -0
  42. package/template/neo-custom-cmp-template/docs/README.md +0 -231
  43. package/template/neo-custom-cmp-template/package.json +2 -2
  44. package/template/neo-h5-cmps/package.json +2 -2
  45. package/template/neo-h5-cmps/src/components/entityList__c/index.tsx +1 -2
  46. package/template/neo-h5-cmps/src/components/entityTabs__c/index.tsx +1 -1
  47. package/template/neo-h5-cmps/src/components/globalSearchInput__c/index.tsx +1 -1
  48. package/template/neo-h5-cmps/src/components/openChatPageBtn__c/index.tsx +1 -2
  49. package/template/neo-order-cmps/package.json +2 -2
  50. package/template/neo-pipeline-cmps/.prettierrc.js +12 -0
  51. package/template/neo-pipeline-cmps/@types/neo-ui-common.d.ts +36 -0
  52. package/template/neo-pipeline-cmps/README.md +99 -0
  53. package/template/neo-pipeline-cmps/commitlint.config.js +59 -0
  54. package/template/neo-pipeline-cmps/neo.config.js +135 -0
  55. package/template/neo-pipeline-cmps/package.json +66 -0
  56. package/template/neo-pipeline-cmps/public/403.html +77 -0
  57. package/template/neo-pipeline-cmps/public/css/base.css +283 -0
  58. package/template/neo-pipeline-cmps/public/demo.html +2453 -0
  59. package/template/neo-pipeline-cmps/public/scripts/app/bluebird.js +6679 -0
  60. package/template/neo-pipeline-cmps/public/template.html +13 -0
  61. package/template/neo-pipeline-cmps/src/assets/css/common.scss +127 -0
  62. package/template/neo-pipeline-cmps/src/assets/css/mixin.scss +47 -0
  63. package/template/neo-pipeline-cmps/src/assets/icon/barChart.svg +1 -0
  64. package/template/neo-pipeline-cmps/src/assets/icon/card.svg +1 -0
  65. package/template/neo-pipeline-cmps/src/assets/icon/filter.svg +1 -0
  66. package/template/neo-pipeline-cmps/src/assets/icon/funnel.svg +1 -0
  67. package/template/neo-pipeline-cmps/src/assets/icon/tab.svg +1 -0
  68. package/template/neo-pipeline-cmps/src/assets/img/AIBtn.gif +0 -0
  69. package/template/neo-pipeline-cmps/src/assets/img/NeoCRM.jpg +0 -0
  70. package/template/neo-pipeline-cmps/src/assets/img/aiLogo.png +0 -0
  71. package/template/neo-pipeline-cmps/src/assets/img/card-list.svg +1 -0
  72. package/template/neo-pipeline-cmps/src/assets/img/contact-form.svg +1 -0
  73. package/template/neo-pipeline-cmps/src/assets/img/custom-form.svg +1 -0
  74. package/template/neo-pipeline-cmps/src/assets/img/custom-widget.svg +1 -0
  75. package/template/neo-pipeline-cmps/src/assets/img/data-list.svg +1 -0
  76. package/template/neo-pipeline-cmps/src/assets/img/detail.svg +1 -0
  77. package/template/neo-pipeline-cmps/src/assets/img/favicon.png +0 -0
  78. package/template/neo-pipeline-cmps/src/assets/img/map.svg +1 -0
  79. package/template/neo-pipeline-cmps/src/assets/img/search.svg +1 -0
  80. package/template/neo-pipeline-cmps/src/assets/img/table.svg +1 -0
  81. package/template/neo-pipeline-cmps/src/components/filterBar__c/README.md +24 -0
  82. package/template/neo-pipeline-cmps/src/components/filterBar__c/common.scss +29 -0
  83. package/template/neo-pipeline-cmps/src/components/filterBar__c/index.tsx +731 -0
  84. package/template/neo-pipeline-cmps/src/components/filterBar__c/model.ts +52 -0
  85. package/template/neo-pipeline-cmps/src/components/filterBar__c/style.scss +119 -0
  86. package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/README.md +39 -0
  87. package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/index.tsx +416 -0
  88. package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/model.ts +80 -0
  89. package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/style.scss +83 -0
  90. package/template/neo-pipeline-cmps/src/components/showHealthResult__c/index.tsx +470 -0
  91. package/template/neo-pipeline-cmps/src/components/showHealthResult__c/model.ts +45 -0
  92. package/template/neo-pipeline-cmps/src/components/showHealthResult__c/style.scss +137 -0
  93. package/template/neo-pipeline-cmps/src/components/simpleTable__c/README.md +89 -0
  94. package/template/neo-pipeline-cmps/src/components/simpleTable__c/common.scss +195 -0
  95. package/template/neo-pipeline-cmps/src/components/simpleTable__c/index.tsx +667 -0
  96. package/template/neo-pipeline-cmps/src/components/simpleTable__c/model.ts +124 -0
  97. package/template/neo-pipeline-cmps/src/components/simpleTable__c/style.scss +192 -0
  98. package/template/neo-pipeline-cmps/src/components/stageSwitch__c/README.md +36 -0
  99. package/template/neo-pipeline-cmps/src/components/stageSwitch__c/index.tsx +513 -0
  100. package/template/neo-pipeline-cmps/src/components/stageSwitch__c/model.ts +71 -0
  101. package/template/{neo-bi-cmps → neo-pipeline-cmps}/src/components/stageSwitch__c/style.scss +4 -2
  102. package/template/neo-pipeline-cmps/src/components/stageTimeChart__c/README.md +37 -0
  103. package/template/neo-pipeline-cmps/src/components/stageTimeChart__c/index.tsx +455 -0
  104. package/template/neo-pipeline-cmps/src/components/stageTimeChart__c/model.ts +106 -0
  105. package/template/{neo-bi-cmps → neo-pipeline-cmps}/src/components/stageTimeChart__c/style.scss +3 -2
  106. package/template/neo-pipeline-cmps/src/utils/common.ts +229 -0
  107. package/template/neo-pipeline-cmps/src/utils/filter2chartFilter.ts +266 -0
  108. package/template/neo-pipeline-cmps/src/utils/filterBar.ts +140 -0
  109. package/template/neo-pipeline-cmps/src/utils/pipelineFunnel.ts +343 -0
  110. package/template/neo-pipeline-cmps/src/utils/queryByCustomSQL.ts +121 -0
  111. package/template/neo-pipeline-cmps/src/utils/requestDebounce.ts +22 -0
  112. package/template/neo-pipeline-cmps/src/utils/simpleTable.tsx +349 -0
  113. package/template/neo-pipeline-cmps/src/utils/stageSwitch.ts +15 -0
  114. package/template/neo-pipeline-cmps/src/utils/stageTimeChart.ts +90 -0
  115. package/template/neo-pipeline-cmps/src/utils/targetNumber.ts +12 -0
  116. package/template/neo-pipeline-cmps/tsconfig.json +40 -0
  117. package/template/neo-web-entity-grid/package.json +2 -2
  118. package/template/neo-web-form/package.json +2 -2
  119. package/template/neo-web-form/src/components/batchAddTable__c/index.tsx +161 -41
  120. package/template/neo-web-form/src/components/batchAddTable__c/model.ts +4 -2
  121. package/template/react-custom-cmp-template/package.json +1 -1
  122. package/template/react-ts-custom-cmp-template/package.json +1 -1
  123. package/template/vue2-custom-cmp-template/package.json +1 -1
  124. package/template/asset-manage-template/src/utils/axiosFetcher.ts +0 -37
  125. package/template/asset-manage-template/src/utils/queryObjectData.ts +0 -112
  126. package/template/asset-manage-template/src/utils/xobjects.ts +0 -162
  127. package/template/neo-bi-cmps/.npmrc copy +0 -1
  128. package/template/neo-bi-cmps/src/components/aiCommitDrawer__c/README.md +0 -52
  129. package/template/neo-bi-cmps/src/components/aiCommitDrawer__c/index.tsx +0 -183
  130. package/template/neo-bi-cmps/src/components/aiCommitDrawer__c/model.ts +0 -90
  131. package/template/neo-bi-cmps/src/components/aiCommitDrawer__c/style.scss +0 -218
  132. package/template/neo-bi-cmps/src/components/forecastChart__c/README.md +0 -31
  133. package/template/neo-bi-cmps/src/components/forecastChart__c/index.tsx +0 -158
  134. package/template/neo-bi-cmps/src/components/forecastChart__c/model.ts +0 -40
  135. package/template/neo-bi-cmps/src/components/forecastChart__c/style.scss +0 -154
  136. package/template/neo-bi-cmps/src/components/forecastGrid__c/README.md +0 -36
  137. package/template/neo-bi-cmps/src/components/forecastGrid__c/index.tsx +0 -86
  138. package/template/neo-bi-cmps/src/components/forecastGrid__c/model.ts +0 -62
  139. package/template/neo-bi-cmps/src/components/forecastGrid__c/style.scss +0 -48
  140. package/template/neo-bi-cmps/src/components/gapCloser__c/README.md +0 -24
  141. package/template/neo-bi-cmps/src/components/gapCloser__c/index.tsx +0 -100
  142. package/template/neo-bi-cmps/src/components/gapCloser__c/model.ts +0 -46
  143. package/template/neo-bi-cmps/src/components/gapCloser__c/style.scss +0 -60
  144. package/template/neo-bi-cmps/src/components/kpiCards__c/README.md +0 -35
  145. package/template/neo-bi-cmps/src/components/kpiCards__c/index.tsx +0 -70
  146. package/template/neo-bi-cmps/src/components/kpiCards__c/model.ts +0 -50
  147. package/template/neo-bi-cmps/src/components/kpiCards__c/style.scss +0 -33
  148. package/template/neo-bi-cmps/src/components/oppList__c/README.md +0 -52
  149. package/template/neo-bi-cmps/src/components/oppList__c/index.tsx +0 -285
  150. package/template/neo-bi-cmps/src/components/oppList__c/model.ts +0 -86
  151. package/template/neo-bi-cmps/src/components/oppList__c/style.scss +0 -133
  152. package/template/neo-bi-cmps/src/components/pipelineFunnel__c/README.md +0 -39
  153. package/template/neo-bi-cmps/src/components/pipelineFunnel__c/index.tsx +0 -130
  154. package/template/neo-bi-cmps/src/components/pipelineFunnel__c/model.ts +0 -66
  155. package/template/neo-bi-cmps/src/components/pipelineFunnel__c/style.scss +0 -133
  156. package/template/neo-bi-cmps/src/components/stageSwitch__c/README.md +0 -36
  157. package/template/neo-bi-cmps/src/components/stageSwitch__c/index.tsx +0 -118
  158. package/template/neo-bi-cmps/src/components/stageSwitch__c/model.ts +0 -92
  159. package/template/neo-bi-cmps/src/components/stageTimeChart__c/README.md +0 -37
  160. package/template/neo-bi-cmps/src/components/stageTimeChart__c/index.tsx +0 -126
  161. package/template/neo-bi-cmps/src/components/stageTimeChart__c/model.ts +0 -57
  162. package/template/neo-bi-cmps/src/components/tabSwitch__c/README.md +0 -37
  163. package/template/neo-bi-cmps/src/components/tabSwitch__c/index.tsx +0 -80
  164. package/template/neo-bi-cmps/src/components/tabSwitch__c/model.ts +0 -45
  165. package/template/neo-bi-cmps/src/components/tabSwitch__c/style.scss +0 -37
  166. package/template/neo-bi-cmps/src/utils/axiosFetcher.ts +0 -37
  167. package/template/neo-bi-cmps/src/utils/queryObjectData.ts +0 -76
  168. package/template/neo-bi-cmps/src/utils/xobjects.ts +0 -162
  169. package/template/neo-custom-cmp-template/src/utils/axiosFetcher.ts +0 -37
  170. package/template/neo-custom-cmp-template/src/utils/queryObjectData.ts +0 -112
  171. package/template/neo-custom-cmp-template/src/utils/xobjects.ts +0 -162
  172. package/template/neo-h5-cmps/src/utils/axiosFetcher.ts +0 -37
  173. package/template/neo-h5-cmps/src/utils/xobjects.ts +0 -167
  174. package/template/neo-order-cmps/src/utils/axiosFetcher.ts +0 -37
  175. package/template/neo-order-cmps/src/utils/queryObjectData.ts +0 -112
  176. package/template/neo-order-cmps/src/utils/xobjects.ts +0 -162
  177. package/template/neo-web-entity-grid/src/utils/axiosFetcher.ts +0 -37
  178. package/template/neo-web-entity-grid/src/utils/queryObjectData.ts +0 -112
  179. package/template/neo-web-entity-grid/src/utils/xobjects.ts +0 -167
  180. package/template/neo-web-form/src/utils/axiosFetcher.ts +0 -37
  181. package/template/neo-web-form/src/utils/queryObjectData.ts +0 -112
  182. package/template/neo-web-form/src/utils/xobjects.ts +0 -167
@@ -1,100 +0,0 @@
1
- /**
2
- * @file Gap Closer组件
3
- * @description 展示Rescue Commit和Upgrade Candidates两类Gap Closer卡片
4
- */
5
- import * as React from 'react';
6
- // @ts-ignore
7
- import { BaseCmp, StatusHoc, NeoEvent } from 'neo-ui-common';
8
-
9
- import './style.scss';
10
-
11
- interface GapCloserCard {
12
- type: 'rescue' | 'upgrade';
13
- title: string;
14
- amount: string;
15
- dealCount: number;
16
- description: string;
17
- }
18
-
19
- interface GapCloserProps {
20
- cards?: GapCloserCard[];
21
- onViewDeals?: (type: 'rescue' | 'upgrade') => void;
22
- className?: string;
23
- style?: React.CSSProperties;
24
- }
25
-
26
- interface GapCloserState {
27
- loading: boolean;
28
- }
29
-
30
- class GapCloser extends BaseCmp<GapCloserProps, GapCloserState> {
31
- constructor(props: GapCloserProps) {
32
- super(props);
33
- this.state = {
34
- loading: false,
35
- };
36
- }
37
-
38
- componentDidMount() {
39
- console.log('GapCloser 组件挂载');
40
- }
41
-
42
- getCardStyle = (type: 'rescue' | 'upgrade') => {
43
- if (type === 'rescue') {
44
- return {
45
- background: 'linear-gradient(135deg, #fff7ed, #ffedd5)',
46
- borderLeftColor: '#f59e0b',
47
- };
48
- }
49
- return {
50
- background: 'linear-gradient(135deg, #f0f0ff, #e8e8ff)',
51
- borderLeftColor: '#6366f1',
52
- };
53
- };
54
-
55
- getCardTitleStyle = (type: 'rescue' | 'upgrade') => {
56
- return type === 'rescue' ? '#92400e' : '#4338ca';
57
- };
58
-
59
- render() {
60
- const { cards = [], onViewDeals, className, style } = this.props;
61
-
62
- return (
63
- <div className={`gap-closer__c ${className || ''}`} style={style}>
64
- {cards.map((card, index) => (
65
- <div
66
- key={index}
67
- className="gap-card"
68
- style={this.getCardStyle(card.type)}
69
- >
70
- <div
71
- className="gap-card-title"
72
- style={{ color: this.getCardTitleStyle(card.type) }}
73
- >
74
- {card.type === 'rescue' ? '⚠' : '✨'} {card.title}
75
- </div>
76
- <div className="gap-card-amount">
77
- <span className="amount-value">{card.amount}</span>
78
- <span className="amount-count">
79
- · {card.dealCount} deals{' '}
80
- {card.type === 'rescue' ? 'at risk' : 'to pull in'}
81
- </span>
82
- </div>
83
- <div className="gap-card-desc">{card.description}</div>
84
- <button
85
- className="gap-card-btn"
86
- style={{
87
- backgroundColor: card.type === 'rescue' ? '#f59e0b' : '#6366f1',
88
- }}
89
- onClick={() => onViewDeals?.(card.type)}
90
- >
91
- View Deals
92
- </button>
93
- </div>
94
- ))}
95
- </div>
96
- );
97
- }
98
- }
99
-
100
- export default StatusHoc(GapCloser);
@@ -1,46 +0,0 @@
1
- export class GapCloserModel {
2
- label: string = 'Gap Closer';
3
- description: string =
4
- '展示Rescue Commit和Upgrade Candidates两类Gap Closer卡片';
5
- iconUrl: string = 'https://custom-widgets.bj.bcebos.com/gapCloser.svg';
6
- targetPage: string[] = ['all'];
7
- targetDevice: string = 'all';
8
-
9
- defaultComProps = {
10
- cards: [
11
- {
12
- type: 'rescue' as const,
13
- title: 'Rescue Commit',
14
- amount: '$1,200,000',
15
- dealCount: 3,
16
- description:
17
- 'Committed deals not fully AI-backed, still worth rescuing',
18
- },
19
- {
20
- type: 'upgrade' as const,
21
- title: 'Upgrade Candidates',
22
- amount: '$2,500,000',
23
- dealCount: 4,
24
- description:
25
- 'High win-rate deals from Open Pipeline worth upgrading to Commit',
26
- },
27
- ],
28
- };
29
-
30
- functions = [
31
- {
32
- apiKey: 'openRescueDrawer',
33
- label: '打开Rescue抽屉',
34
- helpTextKey: '打开Rescue Commit抽屉',
35
- },
36
- {
37
- apiKey: 'openUpgradeDrawer',
38
- label: '打开Upgrade抽屉',
39
- helpTextKey: '打开Upgrade Candidates抽屉',
40
- },
41
- ];
42
-
43
- propsSchema = [];
44
- }
45
-
46
- export default GapCloserModel;
@@ -1,60 +0,0 @@
1
- .gap-closer__c {
2
- display: flex;
3
- flex-direction: column;
4
- gap: 10px;
5
-
6
- .gap-card {
7
- background: #fff;
8
- border-radius: 8px;
9
- padding: 12px 14px;
10
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
11
- border-left: 3px solid;
12
- flex: 1;
13
- display: flex;
14
- flex-direction: column;
15
- justify-content: center;
16
- }
17
-
18
- .gap-card-title {
19
- font-size: 13px;
20
- font-weight: 600;
21
- margin-bottom: 6px;
22
- }
23
-
24
- .gap-card-amount {
25
- margin-bottom: 6px;
26
- }
27
-
28
- .amount-value {
29
- font-size: 20px;
30
- font-weight: 700;
31
- color: #333;
32
- }
33
-
34
- .amount-count {
35
- font-size: 11px;
36
- color: #888;
37
- }
38
-
39
- .gap-card-desc {
40
- font-size: 11px;
41
- color: #78716c;
42
- margin-bottom: 8px;
43
- }
44
-
45
- .gap-card-btn {
46
- padding: 7px 14px;
47
- border: none;
48
- border-radius: 6px;
49
- color: #fff;
50
- cursor: pointer;
51
- font-size: 12px;
52
- font-weight: 600;
53
- width: 100%;
54
- transition: opacity 0.2s;
55
-
56
- &:hover {
57
- opacity: 0.9;
58
- }
59
- }
60
- }
@@ -1,35 +0,0 @@
1
- # KpiCards 组件
2
-
3
- KPI指标卡片组件,展示Quota、Closed、Forecast、AI Forecast等核心KPI指标。
4
-
5
- ## 使用方式
6
-
7
- ```tsx
8
- import KpiCards from './components/kpiCards__c';
9
-
10
- <KpiCards
11
- columns={2}
12
- items={[
13
- { label: 'Quota', value: '$10,000,000' },
14
- { label: 'Closed', value: '$3,200,000', subLabel: 'Gap: $6,800,000', subDirection: 'negative' },
15
- ]}
16
- />
17
- ```
18
-
19
- ## Props
20
-
21
- | 属性 | 说明 | 类型 | 默认值 |
22
- |------|------|------|--------|
23
- | items | KPI数据 | KpiItem[] | [] |
24
- | columns | 列数 | number | 2 |
25
- | className | 自定义类名 | string | - |
26
- | style | 自定义样式 | React.CSSProperties | - |
27
-
28
- ## KpiItem
29
-
30
- | 属性 | 说明 | 类型 |
31
- |------|------|------|
32
- | label | 指标名称 | string |
33
- | value | 指标值 | string |
34
- | subLabel | 副文本 | string |
35
- | subDirection | 副文本方向 | 'negative' \| 'positive' |
@@ -1,70 +0,0 @@
1
- /**
2
- * @file KPI指标卡片组件
3
- * @description 展示Quota、Closed、Forecast、AI Forecast等核心KPI指标
4
- */
5
- import * as React from 'react';
6
- // @ts-ignore
7
- import { BaseCmp, StatusHoc, NeoEvent } from 'neo-ui-common';
8
-
9
- import './style.scss';
10
-
11
- interface KpiItem {
12
- label: string;
13
- value: string;
14
- subLabel?: string;
15
- subDirection?: 'negative' | 'positive';
16
- }
17
-
18
- interface KpiCardsProps {
19
- items?: KpiItem[];
20
- columns?: number;
21
- className?: string;
22
- style?: React.CSSProperties;
23
- }
24
-
25
- interface KpiCardsState {
26
- loading: boolean;
27
- }
28
-
29
- class KpiCards extends BaseCmp<KpiCardsProps, KpiCardsState> {
30
- constructor(props: KpiCardsProps) {
31
- super(props);
32
- this.state = {
33
- loading: false,
34
- };
35
- }
36
-
37
- componentDidMount() {
38
- console.log('KpiCards 组件挂载');
39
- }
40
-
41
- render() {
42
- const { items = [], columns = 2, className, style } = this.props;
43
-
44
- return (
45
- <div
46
- className={`kpi-cards__c ${className || ''}`}
47
- style={{
48
- ...style,
49
- display: 'grid',
50
- gridTemplateColumns: `repeat(${columns}, 1fr)`,
51
- gap: '8px',
52
- }}
53
- >
54
- {items.map((item, index) => (
55
- <div key={index} className="kpi-card">
56
- <div className="kpi-label">{item.label}</div>
57
- <div className="kpi-value">{item.value}</div>
58
- {item.subLabel && (
59
- <div className={`kpi-sub ${item.subDirection || ''}`}>
60
- {item.subLabel}
61
- </div>
62
- )}
63
- </div>
64
- ))}
65
- </div>
66
- );
67
- }
68
- }
69
-
70
- export default StatusHoc(KpiCards);
@@ -1,50 +0,0 @@
1
- export class KpiCardsModel {
2
- label: string = 'KPI指标卡片';
3
- description: string = '展示Quota、Closed、Forecast、AI Forecast等核心KPI指标';
4
- iconUrl: string = 'https://custom-widgets.bj.bcebos.com/kpiCards.svg';
5
- targetPage: string[] = ['all'];
6
- targetDevice: string = 'all';
7
-
8
- defaultComProps = {
9
- columns: 2,
10
- items: [
11
- { label: 'Quota', value: '$10,000,000' },
12
- {
13
- label: 'Closed',
14
- value: '$3,200,000',
15
- subLabel: 'Gap: $6,800,000',
16
- subDirection: 'negative',
17
- },
18
- {
19
- label: 'Forecast',
20
- value: '$7,500,000',
21
- subLabel: 'Gap: $2,500,000',
22
- subDirection: 'negative',
23
- },
24
- {
25
- label: '✨ AI Forecast',
26
- value: '$6,800,000',
27
- subLabel: 'Gap: $3,200,000',
28
- subDirection: 'negative',
29
- },
30
- ],
31
- };
32
-
33
- functions = [
34
- {
35
- apiKey: 'refreshData',
36
- label: '刷新数据',
37
- helpTextKey: '刷新KPI指标数据',
38
- },
39
- ];
40
-
41
- propsSchema = [
42
- {
43
- type: 'number',
44
- name: 'columns',
45
- label: '列数',
46
- },
47
- ];
48
- }
49
-
50
- export default KpiCardsModel;
@@ -1,33 +0,0 @@
1
- .kpi-cards__c {
2
- .kpi-card {
3
- background: #fff;
4
- border-radius: 8px;
5
- padding: 16px 20px;
6
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
7
-
8
- .kpi-label {
9
- font-size: 12px;
10
- color: #888;
11
- margin-bottom: 4px;
12
- }
13
-
14
- .kpi-value {
15
- font-size: 22px;
16
- font-weight: 700;
17
- }
18
-
19
- .kpi-sub {
20
- font-size: 12px;
21
- color: #999;
22
- margin-top: 4px;
23
-
24
- &.negative {
25
- color: #ef4444;
26
- }
27
-
28
- &.positive {
29
- color: #22c55e;
30
- }
31
- }
32
- }
33
- }
@@ -1,52 +0,0 @@
1
- # OppList 组件
2
-
3
- 商机列表组件,展示商机数据表格,支持排序、筛选、Tab切换等功能。
4
-
5
- ## 使用方式
6
-
7
- ```tsx
8
- import OppList from './components/oppList__c';
9
-
10
- <OppList
11
- title="Opportunity List"
12
- tabs={[
13
- { key: 'watch', label: '✨ Prioritized Deals' },
14
- { key: 'all', label: 'All Opportunities' },
15
- ]}
16
- filterChips={['All (3)', 'Rescue (1)', 'Upgrade (2)']}
17
- columns={['Name', 'Amount', 'Close Date', 'Stage']}
18
- rows={[...]}
19
- onRowClick={(opp) => console.log('Clicked:', opp)}
20
- />
21
- ```
22
-
23
- ## Props
24
-
25
- | 属性 | 说明 | 类型 | 默认值 |
26
- |------|------|------|--------|
27
- | title | 标题 | string | 'Opportunity List' |
28
- | summaryText | 摘要文本 | string | - |
29
- | tabs | Tab配置 | OppTab[] | [] |
30
- | activeTab | 当前Tab | string | 第一个Tab |
31
- | filterChips | 筛选 Chips | string[] | [] |
32
- | columns | 表头列 | string[] | [] |
33
- | rows | 商机数据 | Opportunity[] | [] |
34
- | onTabChange | Tab切换回调 | (tab: string) => void | - |
35
- | onChipChange | Chip切换回调 | (chip: string) => void | - |
36
- | onSort | 排序回调 | (column: string) => void | - |
37
- | onRowClick | 行点击回调 | (opp: Opportunity) => void | - |
38
-
39
- ## Opportunity
40
-
41
- | 属性 | 说明 | 类型 |
42
- |------|------|------|
43
- | name | 商机名称 | string |
44
- | account | 账户 | string |
45
- | forecastType | 预测类型 | string |
46
- | amount | 金额 | string |
47
- | closeDate | 关闭日期 | string |
48
- | stage | 阶段 | string |
49
- | aiScore | AI评分 | string |
50
- | aiWinRate | AI赢率 | string |
51
- | lastActivity | 最近活动 | string |
52
- | source | 来源 | 'rescue' \| 'upgrade' \| 'all' |