neo-cmp-cli 1.13.15 → 1.13.17

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 (180) 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/neoLogin.js +1 -1
  5. package/dist/package.json.js +1 -1
  6. package/docs//351/200/232/347/224/250/344/273/243/347/220/206/346/216/245/345/217/243/forward.zip +0 -0
  7. 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 +13 -0
  8. package/package.json +1 -1
  9. package/template/antd-custom-cmp-template/package.json +1 -1
  10. package/template/asset-manage-template/package.json +2 -2
  11. package/template/echarts-custom-cmp-template/package.json +1 -1
  12. package/template/empty-custom-cmp-template/package.json +2 -2
  13. package/template/map-custom-cmp-template/package.json +1 -1
  14. package/template/neo-bi-cmps/neo.config.js +7 -1
  15. package/template/neo-bi-cmps/package.json +8 -7
  16. package/template/neo-bi-cmps/public/403.html +77 -0
  17. package/template/neo-bi-cmps/src/assets/icon/barChart.svg +1 -0
  18. package/template/neo-bi-cmps/src/assets/icon/card.svg +1 -0
  19. package/template/neo-bi-cmps/src/assets/icon/filter.svg +1 -0
  20. package/template/neo-bi-cmps/src/assets/icon/funnel.svg +1 -0
  21. package/template/neo-bi-cmps/src/assets/icon/tab.svg +1 -0
  22. package/template/neo-bi-cmps/src/components/filterBar__c/README.md +3 -14
  23. package/template/neo-bi-cmps/src/components/filterBar__c/common.scss +29 -0
  24. package/template/neo-bi-cmps/src/components/filterBar__c/index.tsx +668 -146
  25. package/template/neo-bi-cmps/src/components/filterBar__c/model.ts +26 -48
  26. package/template/neo-bi-cmps/src/components/filterBar__c/style.scss +46 -139
  27. package/template/neo-bi-cmps/src/components/targetNumber__c/customStyleConfig/index.tsx +11 -10
  28. package/template/neo-bi-cmps/src/components/targetNumber__c/index.tsx +9 -16
  29. package/template/neo-bi-cmps/src/utils/common.ts +231 -0
  30. package/template/neo-bi-cmps/src/utils/filter2chartFilter.ts +268 -0
  31. package/template/neo-bi-cmps/src/utils/filterBar.ts +140 -0
  32. package/template/neo-bi-cmps/src/utils/pipelineFunnel.ts +341 -0
  33. package/template/neo-bi-cmps/src/utils/queryByCustomSQL.ts +117 -0
  34. package/template/neo-bi-cmps/src/utils/requestDebounce.ts +22 -0
  35. package/template/neo-bi-cmps/src/utils/simpleTable.tsx +344 -0
  36. package/template/neo-bi-cmps/src/utils/stageSwitch.ts +15 -0
  37. package/template/neo-bi-cmps/src/utils/stageTimeChart.ts +90 -0
  38. package/template/neo-bi-cmps/src/utils/targetNumber.ts +12 -0
  39. package/template/neo-custom-cmp-template/package.json +2 -2
  40. package/template/neo-h5-cmps/package.json +2 -2
  41. package/template/neo-order-cmps/package.json +2 -2
  42. package/template/neo-pipeline-cmps/.prettierrc.js +12 -0
  43. package/template/neo-pipeline-cmps/@types/neo-ui-common.d.ts +36 -0
  44. package/template/neo-pipeline-cmps/README.md +99 -0
  45. package/template/neo-pipeline-cmps/commitlint.config.js +59 -0
  46. package/template/neo-pipeline-cmps/neo.config.js +124 -0
  47. package/template/neo-pipeline-cmps/package.json +66 -0
  48. package/template/neo-pipeline-cmps/public/403.html +77 -0
  49. package/template/neo-pipeline-cmps/public/css/base.css +283 -0
  50. package/template/neo-pipeline-cmps/public/demo.html +2453 -0
  51. package/template/neo-pipeline-cmps/public/scripts/app/bluebird.js +6679 -0
  52. package/template/neo-pipeline-cmps/public/template.html +13 -0
  53. package/template/neo-pipeline-cmps/src/assets/css/common.scss +127 -0
  54. package/template/neo-pipeline-cmps/src/assets/css/mixin.scss +47 -0
  55. package/template/neo-pipeline-cmps/src/assets/icon/barChart.svg +1 -0
  56. package/template/neo-pipeline-cmps/src/assets/icon/card.svg +1 -0
  57. package/template/neo-pipeline-cmps/src/assets/icon/filter.svg +1 -0
  58. package/template/neo-pipeline-cmps/src/assets/icon/funnel.svg +1 -0
  59. package/template/neo-pipeline-cmps/src/assets/icon/tab.svg +1 -0
  60. package/template/neo-pipeline-cmps/src/assets/img/AIBtn.gif +0 -0
  61. package/template/neo-pipeline-cmps/src/assets/img/NeoCRM.jpg +0 -0
  62. package/template/neo-pipeline-cmps/src/assets/img/aiLogo.png +0 -0
  63. package/template/neo-pipeline-cmps/src/assets/img/card-list.svg +1 -0
  64. package/template/neo-pipeline-cmps/src/assets/img/contact-form.svg +1 -0
  65. package/template/neo-pipeline-cmps/src/assets/img/custom-form.svg +1 -0
  66. package/template/neo-pipeline-cmps/src/assets/img/custom-widget.svg +1 -0
  67. package/template/neo-pipeline-cmps/src/assets/img/data-list.svg +1 -0
  68. package/template/neo-pipeline-cmps/src/assets/img/detail.svg +1 -0
  69. package/template/neo-pipeline-cmps/src/assets/img/favicon.png +0 -0
  70. package/template/neo-pipeline-cmps/src/assets/img/map.svg +1 -0
  71. package/template/neo-pipeline-cmps/src/assets/img/search.svg +1 -0
  72. package/template/neo-pipeline-cmps/src/assets/img/table.svg +1 -0
  73. package/template/neo-pipeline-cmps/src/components/filterBar__c/README.md +24 -0
  74. package/template/neo-pipeline-cmps/src/components/filterBar__c/common.scss +29 -0
  75. package/template/neo-pipeline-cmps/src/components/filterBar__c/index.tsx +730 -0
  76. package/template/neo-pipeline-cmps/src/components/filterBar__c/model.ts +50 -0
  77. package/template/neo-pipeline-cmps/src/components/filterBar__c/style.scss +119 -0
  78. package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/index.tsx +415 -0
  79. package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/model.ts +79 -0
  80. package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/style.scss +83 -0
  81. package/template/neo-pipeline-cmps/src/components/showHealthResult__c/index.tsx +463 -0
  82. package/template/neo-pipeline-cmps/src/components/showHealthResult__c/model.ts +45 -0
  83. package/template/neo-pipeline-cmps/src/components/showHealthResult__c/style.scss +137 -0
  84. package/template/neo-pipeline-cmps/src/components/simpleTable__c/README.md +90 -0
  85. package/template/neo-pipeline-cmps/src/components/simpleTable__c/common.scss +195 -0
  86. package/template/neo-pipeline-cmps/src/components/simpleTable__c/index.tsx +665 -0
  87. package/template/neo-pipeline-cmps/src/components/simpleTable__c/model.ts +124 -0
  88. package/template/neo-pipeline-cmps/src/components/simpleTable__c/style.scss +193 -0
  89. package/template/neo-pipeline-cmps/src/components/stageSwitch__c/index.tsx +511 -0
  90. package/template/neo-pipeline-cmps/src/components/stageSwitch__c/model.ts +70 -0
  91. package/template/{neo-bi-cmps → neo-pipeline-cmps}/src/components/stageSwitch__c/style.scss +4 -2
  92. package/template/neo-pipeline-cmps/src/components/stageTimeChart__c/index.tsx +455 -0
  93. package/template/neo-pipeline-cmps/src/components/stageTimeChart__c/model.ts +103 -0
  94. package/template/{neo-bi-cmps → neo-pipeline-cmps}/src/components/stageTimeChart__c/style.scss +3 -2
  95. package/template/neo-pipeline-cmps/src/utils/common.ts +229 -0
  96. package/template/neo-pipeline-cmps/src/utils/filter2chartFilter.ts +268 -0
  97. package/template/neo-pipeline-cmps/src/utils/filterBar.ts +140 -0
  98. package/template/neo-pipeline-cmps/src/utils/pipelineFunnel.ts +343 -0
  99. package/template/neo-pipeline-cmps/src/utils/queryByCustomSQL.ts +117 -0
  100. package/template/neo-pipeline-cmps/src/utils/requestDebounce.ts +22 -0
  101. package/template/neo-pipeline-cmps/src/utils/simpleTable.tsx +344 -0
  102. package/template/neo-pipeline-cmps/src/utils/stageSwitch.ts +15 -0
  103. package/template/neo-pipeline-cmps/src/utils/stageTimeChart.ts +90 -0
  104. package/template/neo-pipeline-cmps/src/utils/targetNumber.ts +12 -0
  105. package/template/neo-pipeline-cmps/tsconfig.json +40 -0
  106. package/template/neo-web-entity-grid/package.json +2 -2
  107. package/template/neo-web-form/package.json +2 -2
  108. package/template/react-custom-cmp-template/package.json +1 -1
  109. package/template/react-ts-custom-cmp-template/package.json +1 -1
  110. package/template/vue2-custom-cmp-template/package.json +1 -1
  111. package/template/neo-bi-cmps/.npmrc copy +0 -1
  112. package/template/neo-bi-cmps/docs/gartner-pipeline-apis.md +0 -251
  113. package/template/neo-bi-cmps/docs/gartner-pipeline-prd.md +0 -389
  114. package/template/neo-bi-cmps/docs/neo-backend-dev/SKILL.md +0 -188
  115. package/template/neo-bi-cmps/docs/neo-backend-dev/references/01-Trigger/345/274/200/345/217/221.md +0 -183
  116. package/template/neo-bi-cmps/docs/neo-backend-dev/references/02-/350/207/252/345/256/232/344/271/211API/345/274/200/345/217/221.md +0 -196
  117. package/template/neo-bi-cmps/docs/neo-backend-dev/references/03-SDK/345/267/245/345/205/267/347/261/273/346/216/245/345/217/243.md +0 -346
  118. package/template/neo-bi-cmps/docs/neo-backend-dev/references/04-/350/256/241/345/210/222/344/275/234/344/270/232/345/274/200/345/217/221.md +0 -188
  119. package/template/neo-bi-cmps/docs/neo-backend-dev/references/05-/351/241/265/351/235/242/345/274/200/345/217/221.md +0 -293
  120. package/template/neo-bi-cmps/docs/neo-backend-dev/references/06-/346/265/201/347/250/213/346/211/251/345/261/225/345/274/200/345/217/221.md +0 -175
  121. package/template/neo-bi-cmps/docs/neo-backend-dev/references/PaaS/345/271/263/345/217/260/345/274/200/345/217/221/346/211/213/345/206/214/350/247/243/350/257/273.md +0 -313
  122. package/template/neo-bi-cmps/docs/neo-backend-dev/references/auth-config.md +0 -77
  123. package/template/neo-bi-cmps/docs/neo-backend-dev/scripts/deploy_server_script.py +0 -118
  124. package/template/neo-bi-cmps/docs/neo-backend-dev/scripts/download_server_script.py +0 -74
  125. package/template/neo-bi-cmps/docs/neo-backend-dev/scripts/gen_entity_desc.py +0 -69
  126. package/template/neo-bi-cmps/docs/neo-backend-dev/scripts/gen_entitylist.py +0 -87
  127. package/template/neo-bi-cmps/docs/neo-backend-dev/scripts/query_crm.py +0 -65
  128. package/template/neo-bi-cmps/docs/neo-backend-dev/scripts/uninstall_server_script.py +0 -48
  129. package/template/neo-bi-cmps/docs/neo-backend-dev/scripts/update_model_jar.py +0 -49
  130. package/template/neo-bi-cmps/docs/neo-frontend-dev/SKILL.md +0 -138
  131. package/template/neo-bi-cmps/docs/neo-frontend-dev/references/auth-config.md +0 -77
  132. package/template/neo-bi-cmps/docs/neo-frontend-dev/references/component-dev.md +0 -205
  133. package/template/neo-bi-cmps/docs/neo-frontend-dev/references/entityTable-example.md +0 -167
  134. package/template/neo-bi-cmps/docs/neo-frontend-dev/references/templates.md +0 -38
  135. package/template/neo-bi-cmps/docs/neo-frontend-dev/scripts/gen_entity_desc.py +0 -69
  136. package/template/neo-bi-cmps/docs/neo-frontend-dev/scripts/gen_entitylist.py +0 -87
  137. package/template/neo-bi-cmps/docs/neo-frontend-dev/scripts/query_crm.py +0 -65
  138. package/template/neo-bi-cmps/docs//350/264/246/345/217/267/347/233/270/345/205/263/344/277/241/346/201/257.md +0 -10
  139. package/template/neo-bi-cmps/src/components/aiCommitDrawer__c/README.md +0 -52
  140. package/template/neo-bi-cmps/src/components/aiCommitDrawer__c/index.tsx +0 -183
  141. package/template/neo-bi-cmps/src/components/aiCommitDrawer__c/model.ts +0 -90
  142. package/template/neo-bi-cmps/src/components/aiCommitDrawer__c/style.scss +0 -218
  143. package/template/neo-bi-cmps/src/components/forecastChart__c/README.md +0 -31
  144. package/template/neo-bi-cmps/src/components/forecastChart__c/index.tsx +0 -158
  145. package/template/neo-bi-cmps/src/components/forecastChart__c/model.ts +0 -40
  146. package/template/neo-bi-cmps/src/components/forecastChart__c/style.scss +0 -154
  147. package/template/neo-bi-cmps/src/components/forecastGrid__c/README.md +0 -36
  148. package/template/neo-bi-cmps/src/components/forecastGrid__c/index.tsx +0 -86
  149. package/template/neo-bi-cmps/src/components/forecastGrid__c/model.ts +0 -62
  150. package/template/neo-bi-cmps/src/components/forecastGrid__c/style.scss +0 -48
  151. package/template/neo-bi-cmps/src/components/gapCloser__c/README.md +0 -24
  152. package/template/neo-bi-cmps/src/components/gapCloser__c/index.tsx +0 -100
  153. package/template/neo-bi-cmps/src/components/gapCloser__c/model.ts +0 -46
  154. package/template/neo-bi-cmps/src/components/gapCloser__c/style.scss +0 -60
  155. package/template/neo-bi-cmps/src/components/kpiCards__c/README.md +0 -35
  156. package/template/neo-bi-cmps/src/components/kpiCards__c/index.tsx +0 -70
  157. package/template/neo-bi-cmps/src/components/kpiCards__c/model.ts +0 -50
  158. package/template/neo-bi-cmps/src/components/kpiCards__c/style.scss +0 -33
  159. package/template/neo-bi-cmps/src/components/oppList__c/README.md +0 -52
  160. package/template/neo-bi-cmps/src/components/oppList__c/index.tsx +0 -285
  161. package/template/neo-bi-cmps/src/components/oppList__c/model.ts +0 -86
  162. package/template/neo-bi-cmps/src/components/oppList__c/style.scss +0 -133
  163. package/template/neo-bi-cmps/src/components/pipelineFunnel__c/index.tsx +0 -130
  164. package/template/neo-bi-cmps/src/components/pipelineFunnel__c/model.ts +0 -66
  165. package/template/neo-bi-cmps/src/components/pipelineFunnel__c/style.scss +0 -133
  166. package/template/neo-bi-cmps/src/components/stageSwitch__c/index.tsx +0 -118
  167. package/template/neo-bi-cmps/src/components/stageSwitch__c/model.ts +0 -92
  168. package/template/neo-bi-cmps/src/components/stageTimeChart__c/index.tsx +0 -126
  169. package/template/neo-bi-cmps/src/components/stageTimeChart__c/model.ts +0 -57
  170. package/template/neo-bi-cmps/src/components/tabSwitch__c/README.md +0 -37
  171. package/template/neo-bi-cmps/src/components/tabSwitch__c/index.tsx +0 -80
  172. package/template/neo-bi-cmps/src/components/tabSwitch__c/model.ts +0 -45
  173. package/template/neo-bi-cmps/src/components/tabSwitch__c/style.scss +0 -37
  174. package/template/neo-bi-cmps/src/utils/axiosFetcher.ts +0 -37
  175. package/template/neo-bi-cmps/src/utils/queryObjectData.ts +0 -76
  176. package/template/neo-bi-cmps/src/utils/xobjects.ts +0 -162
  177. /package/template/neo-bi-cmps/{docs/prototype-pipeline-forecasting.html → public/demo.html} +0 -0
  178. /package/template/{neo-bi-cmps → neo-pipeline-cmps}/src/components/pipelineFunnel__c/README.md +0 -0
  179. /package/template/{neo-bi-cmps → neo-pipeline-cmps}/src/components/stageSwitch__c/README.md +0 -0
  180. /package/template/{neo-bi-cmps → neo-pipeline-cmps}/src/components/stageTimeChart__c/README.md +0 -0
@@ -1,90 +0,0 @@
1
- export class AiCommitDrawerModel {
2
- label: string = 'AI推荐抽屉';
3
- description: string =
4
- '展示AI推荐的Commit商机,支持From Pipeline和From Commit两个Tab';
5
- iconUrl: string = 'https://custom-widgets.bj.bcebos.com/aiCommitDrawer.svg';
6
- targetPage: string[] = ['all'];
7
- targetDevice: string = 'all';
8
-
9
- defaultComProps = {
10
- visible: false,
11
- totalAmount: '$6,800,000',
12
- closedAmount: '$3,200,000',
13
- closedCount: 5,
14
- tabs: [
15
- {
16
- key: 'pipeline',
17
- label: 'From Open Pipeline',
18
- amount: '$2,500,000',
19
- count: 2,
20
- },
21
- { key: 'commit', label: 'From Commit', amount: '$1,800,000', count: 2 },
22
- ],
23
- pipelineDeals: [
24
- {
25
- id: '1',
26
- name: 'Starlight Initiative',
27
- account: 'Tencent',
28
- amount: '$500,000',
29
- stage: 'Pipeline',
30
- closeDate: '2026-05-20',
31
- aiScore: '52%',
32
- description:
33
- 'Strong engagement signals and past wins with this account',
34
- },
35
- {
36
- id: '2',
37
- name: 'Galaxy Partnership',
38
- account: 'Alibaba',
39
- amount: '$2,000,000',
40
- stage: 'Best Case',
41
- closeDate: '2026-05-10',
42
- aiScore: '45%',
43
- description: 'High product usage and active engagement in last 7 days',
44
- },
45
- ],
46
- commitDeals: [
47
- {
48
- id: '3',
49
- name: 'Aurora Solution',
50
- account: 'ByteDance',
51
- amount: '$800,000',
52
- stage: 'Commit',
53
- closeDate: '2026-04-30',
54
- aiScore: '91%',
55
- },
56
- {
57
- id: '4',
58
- name: 'Apollo Project',
59
- account: 'Huawei Tech',
60
- amount: '$1,000,000',
61
- stage: 'Commit',
62
- closeDate: '2026-04-15',
63
- aiScore: '86%',
64
- },
65
- ],
66
- };
67
-
68
- functions = [
69
- {
70
- apiKey: 'openDrawer',
71
- label: '打开抽屉',
72
- helpTextKey: '打开AI推荐抽屉',
73
- },
74
- {
75
- apiKey: 'closeDrawer',
76
- label: '关闭抽屉',
77
- helpTextKey: '关闭AI推荐抽屉',
78
- },
79
- ];
80
-
81
- propsSchema = [
82
- {
83
- type: 'boolean',
84
- name: 'visible',
85
- label: '是否显示',
86
- },
87
- ];
88
- }
89
-
90
- export default AiCommitDrawerModel;
@@ -1,218 +0,0 @@
1
- .ai-commit-drawer__c-overlay {
2
- position: fixed;
3
- top: 0;
4
- left: 0;
5
- right: 0;
6
- bottom: 0;
7
- background: rgba(0, 0, 0, 0.3);
8
- z-index: 150;
9
- }
10
-
11
- .ai-commit-drawer__c {
12
- position: fixed;
13
- top: 0;
14
- right: 0;
15
- width: 480px;
16
- height: 100%;
17
- background: #fff;
18
- box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
19
- overflow-y: auto;
20
- padding: 24px;
21
-
22
- .drawer-header {
23
- display: flex;
24
- justify-content: space-between;
25
- align-items: center;
26
- margin-bottom: 20px;
27
-
28
- h3 {
29
- font-size: 16px;
30
- margin: 0;
31
- }
32
-
33
- .close-btn {
34
- border: none;
35
- background: none;
36
- font-size: 20px;
37
- cursor: pointer;
38
- color: #999;
39
-
40
- &:hover {
41
- color: #333;
42
- }
43
- }
44
- }
45
-
46
- .drawer-summary {
47
- font-size: 12px;
48
- color: #888;
49
- margin-bottom: 20px;
50
-
51
- .summary-amount {
52
- font-weight: 700;
53
- color: #6366f1;
54
- font-size: 16px;
55
- }
56
-
57
- .summary-desc {
58
- margin-left: 4px;
59
- }
60
- }
61
-
62
- .closed-summary {
63
- background: #f8f9fa;
64
- border-radius: 10px;
65
- padding: 16px;
66
- margin-bottom: 20px;
67
-
68
- .closed-info {
69
- display: flex;
70
- justify-content: space-between;
71
- align-items: center;
72
- }
73
-
74
- .closed-label {
75
- font-size: 12px;
76
- color: #888;
77
- margin-bottom: 2px;
78
- }
79
-
80
- .closed-amount {
81
- font-size: 20px;
82
- font-weight: 700;
83
- }
84
-
85
- .closed-count {
86
- font-size: 12px;
87
- color: #999;
88
- }
89
- }
90
-
91
- .drawer-tabs {
92
- display: flex;
93
- gap: 0;
94
- margin-bottom: 16px;
95
- border-bottom: 2px solid #e5e7eb;
96
- }
97
-
98
- .ai-commit-tab {
99
- padding: 8px 16px;
100
- font-size: 13px;
101
- font-weight: 600;
102
- cursor: pointer;
103
- border: none;
104
- background: none;
105
- color: #999;
106
- border-bottom: 2px solid transparent;
107
- margin-bottom: -2px;
108
- transition: all 0.2s;
109
- white-space: nowrap;
110
-
111
- &:hover {
112
- color: #6366f1;
113
- }
114
-
115
- &.active {
116
- color: #6366f1;
117
- border-bottom-color: #6366f1;
118
- }
119
- }
120
-
121
- .drawer-content {
122
- .deal-card {
123
- border: 1px solid #e5e7eb;
124
- border-left: 3px solid #6366f1;
125
- border-radius: 10px;
126
- padding: 14px;
127
- margin-bottom: 10px;
128
-
129
- .deal-card-header {
130
- display: flex;
131
- justify-content: space-between;
132
- align-items: start;
133
- margin-bottom: 6px;
134
- }
135
-
136
- .deal-info {
137
- flex: 1;
138
- }
139
-
140
- .deal-name {
141
- font-weight: 600;
142
- font-size: 14px;
143
- }
144
-
145
- .deal-account {
146
- font-size: 12px;
147
- color: #888;
148
- }
149
-
150
- .deal-meta {
151
- font-size: 11px;
152
- color: #888;
153
- margin-top: 2px;
154
- }
155
-
156
- .deal-stage {
157
- background: #f0f0f0;
158
- padding: 1px 6px;
159
- border-radius: 3px;
160
- font-size: 10px;
161
- }
162
-
163
- .deal-score {
164
- color: #6366f1;
165
- font-weight: 600;
166
- font-size: 13px;
167
- }
168
-
169
- .deal-description {
170
- font-size: 12px;
171
- color: #666;
172
- background: #f8f9fa;
173
- padding: 6px 8px;
174
- border-radius: 4px;
175
- margin-bottom: 10px;
176
- }
177
-
178
- .deal-actions {
179
- display: flex;
180
- gap: 8px;
181
- }
182
-
183
- .btn-prioritize {
184
- flex: 1;
185
- padding: 7px;
186
- border: none;
187
- border-radius: 6px;
188
- background: #6366f1;
189
- color: #fff;
190
- cursor: pointer;
191
- font-size: 12px;
192
- font-weight: 600;
193
- transition: opacity 0.2s;
194
-
195
- &:hover {
196
- opacity: 0.9;
197
- }
198
- }
199
-
200
- .btn-dismiss {
201
- flex: 1;
202
- padding: 7px;
203
- border: 1px solid #ddd;
204
- border-radius: 6px;
205
- background: #fff;
206
- cursor: pointer;
207
- font-size: 12px;
208
- color: #666;
209
- transition: all 0.2s;
210
-
211
- &:hover {
212
- border-color: #6366f1;
213
- color: #6366f1;
214
- }
215
- }
216
- }
217
- }
218
- }
@@ -1,31 +0,0 @@
1
- # ForecastChart 组件
2
-
3
- 预测看板图表组件,展示预测数据的堆叠柱状图。
4
-
5
- ## 使用方式
6
-
7
- ```tsx
8
- import ForecastChart from './components/forecastChart__c';
9
-
10
- <ForecastChart
11
- title="Forecast Overview"
12
- quotaValue="$10M"
13
- forecastValue="$7.5M"
14
- aiValue="$6.8M"
15
- columns={[
16
- { label: 'Closed', value: '$3.2M', color: '#3b82f6' },
17
- { label: 'Commit', value: '$2.5M', color: '#22c55e' },
18
- ]}
19
- />
20
- ```
21
-
22
- ## Props
23
-
24
- | 属性 | 说明 | 类型 | 默认值 |
25
- |------|------|------|--------|
26
- | title | 标题 | string | 'Forecast Overview' |
27
- | quotaValue | Quota值 | string | '$10M' |
28
- | forecastValue | Forecast值 | string | '$7.5M' |
29
- | aiValue | AI预测值 | string | '$6.8M' |
30
- | columns | 柱状图数据 | ChartColumn[] | [] |
31
- | showAiButton | 显示AI按钮 | boolean | true |
@@ -1,158 +0,0 @@
1
- /**
2
- * @file 预测看板图表组件
3
- * @description 展示预测数据的堆叠柱状图,包含Closed、Commit、Best Case、Pipeline等
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 ChartColumn {
12
- label: string;
13
- value: string;
14
- height: number;
15
- color: string;
16
- }
17
-
18
- interface ForecastChartProps {
19
- title?: string;
20
- quotaValue?: string;
21
- forecastValue?: string;
22
- aiValue?: string;
23
- columns?: ChartColumn[];
24
- showAiButton?: boolean;
25
- className?: string;
26
- style?: React.CSSProperties;
27
- }
28
-
29
- interface ForecastChartState {
30
- loading: boolean;
31
- }
32
-
33
- class ForecastChart extends BaseCmp<ForecastChartProps, ForecastChartState> {
34
- constructor(props: ForecastChartProps) {
35
- super(props);
36
- this.state = {
37
- loading: false,
38
- };
39
- }
40
-
41
- componentDidMount() {
42
- console.log('ForecastChart 组件挂载');
43
- }
44
-
45
- getScaleHeight = (value: string, max: string): number => {
46
- const numValue = parseFloat(value.replace(/[$,M]/g, ''));
47
- const numMax = parseFloat(max.replace(/[$,M]/g, ''));
48
- if (isNaN(numValue) || isNaN(numMax) || numMax === 0) return 0;
49
- return (numValue / numMax) * 100;
50
- };
51
-
52
- render() {
53
- const {
54
- title = 'Forecast Overview',
55
- quotaValue = '$10M',
56
- forecastValue = '$7.5M',
57
- aiValue = '$6.8M',
58
- columns = [],
59
- showAiButton = true,
60
- className,
61
- style,
62
- } = this.props;
63
-
64
- const maxValue = 10; // 默认最大值 $10M
65
- const chartHeight = 190; // 总高度
66
- const gridLineHeight = chartHeight * 0.8; // 网格区域高度
67
-
68
- // 计算Quota、Forecast、AI基准线位置
69
- const quotaPos = 0; // 顶部
70
- const forecastPos = this.getScaleHeight(forecastValue, quotaValue);
71
- const aiPos = this.getScaleHeight(aiValue, quotaValue);
72
-
73
- return (
74
- <div className={`forecast-chart__c ${className || ''}`} style={style}>
75
- <div className="chart-header">
76
- <h3 className="chart-title">{title}</h3>
77
- {showAiButton && (
78
- <span
79
- className="ai-btn"
80
- onClick={() => console.log('AI Analysis clicked')}
81
- title="AI Analysis"
82
- >
83
-
84
- </span>
85
- )}
86
- </div>
87
-
88
- <div className="chart-content">
89
- <div className="chart-y-axis">
90
- <span>$10M</span>
91
- <span>$8M</span>
92
- <span>$6M</span>
93
- <span>$4M</span>
94
- <span>$2M</span>
95
- <span>$0</span>
96
- </div>
97
-
98
- <div className="chart-main">
99
- {/* 网格线 */}
100
- <div className="chart-grid">
101
- <div style={{ top: '0%' }} />
102
- <div style={{ top: '20%' }} />
103
- <div style={{ top: '40%' }} />
104
- <div style={{ top: '60%' }} />
105
- <div style={{ top: '80%' }} />
106
- <div style={{ top: '100%' }} />
107
- </div>
108
-
109
- {/* Quota基准线 */}
110
- <div className="chart-quota-line" style={{ top: `${quotaPos}%` }}>
111
- <span className="quota-label">Quota: {quotaValue}</span>
112
- </div>
113
-
114
- {/* Forecast基准线 */}
115
- <div
116
- className="chart-forecast-line"
117
- style={{ top: `${forecastPos}%` }}
118
- >
119
- <span className="forecast-label">Forecast {forecastValue}</span>
120
- </div>
121
-
122
- {/* AI基准线 */}
123
- <div className="chart-ai-line" style={{ top: `${aiPos}%` }}>
124
- <span className="ai-label">✨ AI {aiValue}</span>
125
- </div>
126
-
127
- {/* 柱状图 */}
128
- <div className="chart-bars">
129
- {columns.map((col, index) => {
130
- const heightPercent = this.getScaleHeight(
131
- col.value,
132
- quotaValue,
133
- );
134
- return (
135
- <div key={index} className="chart-bar">
136
- <span className="bar-value" style={{ color: col.color }}>
137
- {col.value}
138
- </span>
139
- <div
140
- className="bar-column"
141
- style={{
142
- height: `${(heightPercent / 100) * gridLineHeight}px`,
143
- backgroundColor: col.color,
144
- }}
145
- />
146
- <span className="bar-label">{col.label}</span>
147
- </div>
148
- );
149
- })}
150
- </div>
151
- </div>
152
- </div>
153
- </div>
154
- );
155
- }
156
- }
157
-
158
- export default StatusHoc(ForecastChart);
@@ -1,40 +0,0 @@
1
- export class ForecastChartModel {
2
- label: string = '预测看板图表';
3
- description: string =
4
- '展示预测数据的堆叠柱状图,包含Closed、Commit、Best Case、Pipeline等';
5
- iconUrl: string = 'https://custom-widgets.bj.bcebos.com/forecastChart.svg';
6
- targetPage: string[] = ['all'];
7
- targetDevice: string = 'all';
8
-
9
- defaultComProps = {
10
- title: 'Forecast Overview',
11
- quotaValue: '$10M',
12
- forecastValue: '$7.5M',
13
- aiValue: '$6.8M',
14
- columns: [
15
- { label: 'Closed', value: '$3.2M', height: 61, color: '#3b82f6' },
16
- { label: 'Commit', value: '$2.5M', height: 47, color: '#22c55e' },
17
- { label: 'Best Case', value: '$1.8M', height: 34, color: '#10b981' },
18
- { label: 'Pipeline', value: '$2.5M', height: 47, color: '#93c5fd' },
19
- ],
20
- showAiButton: true,
21
- };
22
-
23
- functions = [
24
- {
25
- apiKey: 'refreshData',
26
- label: '刷新数据',
27
- helpTextKey: '刷新预测图表数据',
28
- },
29
- ];
30
-
31
- propsSchema = [
32
- {
33
- type: 'string',
34
- name: 'title',
35
- label: '标题',
36
- },
37
- ];
38
- }
39
-
40
- export default ForecastChartModel;
@@ -1,154 +0,0 @@
1
- .forecast-chart__c {
2
- background: #fff;
3
- border-radius: 8px;
4
- padding: 20px;
5
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
6
-
7
- .chart-header {
8
- display: flex;
9
- justify-content: space-between;
10
- align-items: center;
11
- margin-bottom: 16px;
12
- }
13
-
14
- .chart-title {
15
- font-size: 14px;
16
- font-weight: 600;
17
- margin: 0;
18
- }
19
-
20
- .ai-btn {
21
- cursor: pointer;
22
- font-size: 16px;
23
- transition: transform 0.2s;
24
-
25
- &:hover {
26
- transform: scale(1.1);
27
- }
28
- }
29
-
30
- .chart-content {
31
- display: flex;
32
- gap: 16px;
33
- flex: 1;
34
- align-items: flex-end;
35
- height: 220px;
36
- }
37
-
38
- .chart-y-axis {
39
- width: 50px;
40
- display: flex;
41
- flex-direction: column;
42
- justify-content: space-between;
43
- align-items: flex-end;
44
- padding-right: 8px;
45
- font-size: 11px;
46
- color: #999;
47
- }
48
-
49
- .chart-main {
50
- flex: 1;
51
- position: relative;
52
- padding: 16px 16px 40px 0;
53
- }
54
-
55
- .chart-grid {
56
- position: absolute;
57
- left: 0;
58
- right: 0;
59
- top: 20px;
60
- bottom: 50px;
61
-
62
- div {
63
- position: absolute;
64
- width: 100%;
65
- border-top: 1px solid #eee;
66
- }
67
- }
68
-
69
- .chart-quota-line {
70
- position: absolute;
71
- left: 0;
72
- right: 0;
73
- border-top: 2.5px solid #22c55e;
74
- z-index: 5;
75
-
76
- .quota-label {
77
- position: absolute;
78
- top: -18px;
79
- left: 0;
80
- font-size: 11px;
81
- background: #22c55e;
82
- color: #fff;
83
- padding: 1px 8px;
84
- border-radius: 3px;
85
- }
86
- }
87
-
88
- .chart-forecast-line {
89
- position: absolute;
90
- left: 0;
91
- right: 0;
92
- border-top: 2px solid #8b5cf6;
93
- z-index: 5;
94
-
95
- .forecast-label {
96
- position: absolute;
97
- top: -16px;
98
- right: 0;
99
- font-size: 10px;
100
- color: #8b5cf6;
101
- }
102
- }
103
-
104
- .chart-ai-line {
105
- position: absolute;
106
- left: 0;
107
- right: 0;
108
- border-top: 2px dashed #a78bfa;
109
- z-index: 5;
110
-
111
- .ai-label {
112
- position: absolute;
113
- top: -16px;
114
- right: 80px;
115
- font-size: 10px;
116
- color: #a78bfa;
117
- }
118
- }
119
-
120
- .chart-bars {
121
- position: absolute;
122
- left: 0;
123
- right: 0;
124
- top: 20px;
125
- bottom: 50px;
126
- display: flex;
127
- align-items: flex-end;
128
- gap: 0;
129
- }
130
-
131
- .chart-bar {
132
- flex: 0 0 60px;
133
- display: flex;
134
- flex-direction: column;
135
- align-items: center;
136
- }
137
-
138
- .bar-value {
139
- font-size: 11px;
140
- font-weight: 600;
141
- margin-bottom: 4px;
142
- }
143
-
144
- .bar-column {
145
- width: 50px;
146
- border-radius: 4px 4px 0 0;
147
- }
148
-
149
- .bar-label {
150
- font-size: 10px;
151
- color: #666;
152
- margin-top: 6px;
153
- }
154
- }