neo-cmp-cli 1.13.17 → 1.13.19

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 (91) hide show
  1. package/README.md +23 -3
  2. package/dist/index2.js +1 -1
  3. package/dist/neo/env.js +1 -1
  4. package/dist/neo/pushCmp.js +1 -1
  5. package/dist/package.json.js +1 -1
  6. package/package.json +3 -2
  7. package/template/asset-manage-template/docs/README.md +1 -232
  8. package/template/echarts-custom-cmp-template/package.json +1 -1
  9. package/template/neo-bi-cmps/package.json +1 -1
  10. package/template/neo-bi-cmps/src/components/filterBar__c/common.scss +1 -1
  11. package/template/neo-bi-cmps/src/components/filterBar__c/index.tsx +18 -10
  12. package/template/neo-bi-cmps/src/components/filterBar__c/model.ts +8 -2
  13. package/template/neo-bi-cmps/src/components/targetNumber__c/model.ts +1 -1
  14. package/template/neo-bi-cmps/src/utils/common.ts +18 -20
  15. package/template/neo-bi-cmps/src/utils/filter2chartFilter.ts +4 -6
  16. package/template/neo-bi-cmps/src/utils/pipelineFunnel.ts +4 -2
  17. package/template/neo-bi-cmps/src/utils/simpleTable.tsx +21 -16
  18. package/template/neo-custom-cmp-template/docs/README.md +0 -231
  19. package/template/neo-custom-cmp-template/package.json +1 -1
  20. package/template/neo-h5-cmps/src/components/entityList__c/index.tsx +1 -2
  21. package/template/neo-h5-cmps/src/components/entityTabs__c/index.tsx +1 -1
  22. package/template/neo-h5-cmps/src/components/globalSearchInput__c/index.tsx +1 -1
  23. package/template/neo-h5-cmps/src/components/openChatPageBtn__c/index.tsx +1 -2
  24. package/template/neo-pipeline-cmps/neo.config.js +11 -0
  25. package/template/neo-pipeline-cmps/src/assets/css/common.scss +16 -16
  26. package/template/neo-pipeline-cmps/src/assets/css/mixin.scss +5 -5
  27. package/template/neo-pipeline-cmps/src/components/filterBar__c/README.md +9 -9
  28. package/template/neo-pipeline-cmps/src/components/filterBar__c/common.scss +5 -5
  29. package/template/neo-pipeline-cmps/src/components/filterBar__c/index.tsx +47 -46
  30. package/template/neo-pipeline-cmps/src/components/filterBar__c/model.ts +22 -12
  31. package/template/neo-pipeline-cmps/src/components/filterBar__c/style.scss +1 -1
  32. package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/README.md +17 -17
  33. package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/index.tsx +24 -22
  34. package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/model.ts +31 -18
  35. package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/reset.scss +4 -0
  36. package/template/neo-pipeline-cmps/src/components/showHealthResult__c/index.tsx +33 -26
  37. package/template/neo-pipeline-cmps/src/components/showHealthResult__c/model.ts +9 -9
  38. package/template/neo-pipeline-cmps/src/components/simpleTable__c/README.md +53 -54
  39. package/template/neo-pipeline-cmps/src/components/simpleTable__c/common.scss +5 -5
  40. package/template/neo-pipeline-cmps/src/components/simpleTable__c/index.tsx +70 -68
  41. package/template/neo-pipeline-cmps/src/components/simpleTable__c/model.ts +41 -41
  42. package/template/neo-pipeline-cmps/src/components/simpleTable__c/style.scss +2 -3
  43. package/template/neo-pipeline-cmps/src/components/stageSwitch__c/README.md +15 -15
  44. package/template/neo-pipeline-cmps/src/components/stageSwitch__c/index.tsx +35 -33
  45. package/template/neo-pipeline-cmps/src/components/stageSwitch__c/model.ts +29 -16
  46. package/template/neo-pipeline-cmps/src/components/stageTimeChart__c/README.md +18 -18
  47. package/template/neo-pipeline-cmps/src/components/stageTimeChart__c/index.tsx +20 -20
  48. package/template/neo-pipeline-cmps/src/components/stageTimeChart__c/model.ts +34 -19
  49. package/template/neo-pipeline-cmps/src/utils/common.ts +14 -14
  50. package/template/neo-pipeline-cmps/src/utils/filter2chartFilter.ts +21 -23
  51. package/template/neo-pipeline-cmps/src/utils/filterBar.ts +14 -14
  52. package/template/neo-pipeline-cmps/src/utils/pipelineFunnel.ts +5 -5
  53. package/template/neo-pipeline-cmps/src/utils/queryByCustomSQL.ts +26 -22
  54. package/template/neo-pipeline-cmps/src/utils/requestDebounce.ts +3 -3
  55. package/template/neo-pipeline-cmps/src/utils/simpleTable.tsx +31 -26
  56. package/template/neo-pipeline-cmps/src/utils/stageSwitch.ts +1 -1
  57. package/template/neo-pipeline-cmps/src/utils/stageTimeChart.ts +5 -5
  58. package/template/neo-pipeline-cmps/src/utils/targetNumber.ts +2 -2
  59. package/template/neo-web-entity-grid/src/components/createForm__c/index.tsx +271 -259
  60. package/template/neo-web-entity-grid/src/components/createForm__c/model.ts +17 -3
  61. package/template/neo-web-entity-grid/src/components/createForm__c/resetAntd.scss +0 -1
  62. package/template/neo-web-entity-grid/src/components/createForm__c/style.scss +1 -1
  63. package/template/neo-web-entity-grid/src/components/entityGrid2__c/index.tsx +5 -1
  64. package/template/neo-web-entity-grid/src/components/entityGrid2__c/model.ts +4 -3
  65. package/template/neo-web-entity-grid/src/components/entityGrid3__c/index.tsx +1 -1
  66. package/template/neo-web-entity-grid/src/components/searchForm__c/index.tsx +4 -3
  67. package/template/neo-web-entity-grid/src/components/searchForm__c/model.ts +9 -4
  68. package/template/neo-web-entity-grid/src/components/searchForm__c/style.scss +2 -1
  69. package/template/neo-web-form/package.json +1 -1
  70. package/template/neo-web-form/src/components/batchAddTable__c/index.tsx +179 -59
  71. package/template/neo-web-form/src/components/batchAddTable__c/model.ts +12 -14
  72. package/template/neo-web-form/src/components/listSummary__c/index.tsx +6 -5
  73. package/template/react-custom-cmp-template/package.json +1 -1
  74. package/template/asset-manage-template/src/utils/axiosFetcher.ts +0 -37
  75. package/template/asset-manage-template/src/utils/queryObjectData.ts +0 -112
  76. package/template/asset-manage-template/src/utils/xobjects.ts +0 -162
  77. package/template/neo-custom-cmp-template/src/utils/axiosFetcher.ts +0 -37
  78. package/template/neo-custom-cmp-template/src/utils/queryObjectData.ts +0 -112
  79. package/template/neo-custom-cmp-template/src/utils/xobjects.ts +0 -162
  80. package/template/neo-h5-cmps/src/utils/axiosFetcher.ts +0 -37
  81. package/template/neo-h5-cmps/src/utils/queryObjectData.ts +0 -112
  82. package/template/neo-h5-cmps/src/utils/xobjects.ts +0 -167
  83. package/template/neo-order-cmps/src/utils/axiosFetcher.ts +0 -37
  84. package/template/neo-order-cmps/src/utils/queryObjectData.ts +0 -112
  85. package/template/neo-order-cmps/src/utils/xobjects.ts +0 -162
  86. package/template/neo-web-entity-grid/src/utils/axiosFetcher.ts +0 -37
  87. package/template/neo-web-entity-grid/src/utils/queryObjectData.ts +0 -112
  88. package/template/neo-web-entity-grid/src/utils/xobjects.ts +0 -167
  89. package/template/neo-web-form/src/utils/axiosFetcher.ts +0 -37
  90. package/template/neo-web-form/src/utils/queryObjectData.ts +0 -112
  91. package/template/neo-web-form/src/utils/xobjects.ts +0 -167
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @file XObject 数据表格组件(简化版)
3
- * @description 基于 Neo 平台的 XObject 实体对象数据表格组件,仅支持数据展示
2
+ * @file XObject data table component (simplified version)
3
+ * @description XObject entity data table component based on the Neo platform, supports data display only
4
4
  */
5
5
  import * as React from 'react';
6
6
  import { Table, Spin, Empty, Popover } from 'antd';
@@ -9,11 +9,11 @@ import { xObject } from 'neo-open-api'; // Neo Open API
9
9
  // @ts-ignore
10
10
  import isEqual from 'lodash/isEqual';
11
11
 
12
- // Neo Open API// 引入 neo-ui-common / BaseCmp
12
+ // Neo Open API// Import neo-ui-common / BaseCmp
13
13
  // @ts-ignore
14
14
  import { BaseCmp } from 'neo-ui-common';
15
15
 
16
- // 引入 neo-ui-common / NeoEvent
16
+ // Import neo-ui-common / NeoEvent
17
17
  // @ts-ignore
18
18
  import { NeoEvent } from 'neo-ui-common';
19
19
 
@@ -51,7 +51,7 @@ import './style.scss';
51
51
 
52
52
  export type { HistoryOppSnap } from '../../utils/simpleTable';
53
53
 
54
- /** 商机详情页 hash 路由(与平台 neoweb 一致) */
54
+ /** Opportunity detail page hash route (consistent with platform neoweb) */
55
55
  function buildOpportunityDetailUrl(id: string, objectApiKey: string): string {
56
56
  const q = new URLSearchParams({
57
57
  objectApiKey,
@@ -60,7 +60,7 @@ function buildOpportunityDetailUrl(id: string, objectApiKey: string): string {
60
60
  return `/bff/neoweb#/entityDetail/opportunity/${id}?${q.toString()}`;
61
61
  }
62
62
 
63
- /** 不在表格中展示的字段(仍可通过 xObjectDataApi.fields 拉取,用于 hover 卡片 / tooltip) */
63
+ /** Fields not displayed in the table (can still be fetched via xObjectDataApi.fields, used for hover cards / tooltips) */
64
64
  const HIDDEN_TABLE_COLUMN_KEYS = new Set([
65
65
  'customItem244__c',
66
66
  'customItem241__c',
@@ -68,15 +68,15 @@ const HIDDEN_TABLE_COLUMN_KEYS = new Set([
68
68
  'customItem246__c',
69
69
  'customItem247__c',
70
70
  'customItem245__c',
71
- // 'objectId', // 跳转到详情页需要
72
- // 'businessTypeId' // 跳转到详情页需要
71
+ // 'objectId', // Needed for navigating to detail page
72
+ // 'businessTypeId' // Needed for navigating to detail page
73
73
  ]);
74
74
 
75
- /** 历史商机 SQL stageSwitch 一致;字段顺序需与 query fields 一致(数组行按列下标解析) */
75
+ /** Historical opportunity SQL consistent with stageSwitch; field order must match query fields (array rows parsed by column index) */
76
76
  const HISTORY_OPPORTUNITY_BI_KEY = 'biCustomModel_397169_20260401104916618';
77
77
  const HISTORY_QUERY_FIELDS = [
78
- // 'id', // 历史版本ID
79
- 'opportunity_1__id', // 商机ID
78
+ // 'id', // Historical version ID
79
+ 'opportunity_1__id', // Opportunity ID
80
80
  'opportunity_1_closeDate',
81
81
  'opportunity_1_opportunityName',
82
82
  'opportunity_1_saleStageId',
@@ -86,76 +86,76 @@ const HISTORY_QUERY_FIELDS = [
86
86
  const defaultXObjectDataApi = {
87
87
  xObjectApiKey: 'opportunity',
88
88
  fields: [
89
- 'opportunityName', // OpportunityStageName 商机名称
89
+ 'opportunityName', // OpportunityStageName Opportunity Name
90
90
  'money', // Amount
91
91
  'closeDate', // Close Date
92
92
  'customItem248__c', // Stage
93
93
  // 'oppHealthAssessmentScore',
94
94
  'recentActivityRecordTime',
95
- 'oppHealthAssessmentLevel', // 1.AI Score; hover卡片:调用商机健康度接口
96
- 'customItem239__c', // 2.AI Win Rate: hover卡片展示的3个信息,对应商机上的3个字段(baselinepositiveFactorsnegativeFactors
95
+ 'oppHealthAssessmentLevel', // 1.AI Score; hover card: calls opportunity health assessment API
96
+ 'customItem239__c', // 2.AI Win Rate: 3 fields shown in hover card (baseline, positiveFactors, negativeFactors)
97
97
  'customItem244__c', // baseline
98
98
  'customItem241__c', // positiveFactors
99
99
  'customItem242__c', // negativeFactors
100
100
  'customItem246__c', // AmoutChanged
101
101
  'customItem247__c', // ClosedDateChanged
102
102
  'customItem245__c', // StageChanged
103
- // 'objectId', // 跳转到详情页需要
104
- // 'businessTypeId' // 跳转到详情页需要
103
+ // 'objectId', // Needed for navigating to detail page
104
+ // 'businessTypeId' // Needed for navigating to detail page
105
105
  ],
106
106
  page: 1,
107
107
  pageSize: 50,
108
108
  };
109
109
  /**
110
- * 组件属性接口
110
+ * Component props interface
111
111
  */
112
112
  interface SimpleTableProps {
113
- /** XObject 实体对象的 API Key,用于标识要操作的数据对象 */
113
+ /** XObject entity API Key, used to identify the data object to operate on */
114
114
  xObjectDataApi: {
115
115
  xObjectApiKey: string;
116
116
  fields: string[];
117
117
  fieldDescList?: any[];
118
118
  autoFetchData?: boolean;
119
119
  };
120
- /** Neo 平台传递的数据,包含系统信息等 */
120
+ /** Neo platform data, including system information */
121
121
  data?: any;
122
- entityData?: any; // Neo 平台自动获取的实体数据
123
- /** 是否为自定义实体对象 */
122
+ entityData?: any; // Entity data automatically fetched by Neo platform
123
+ /** Whether it is a custom entity object */
124
124
  custom?: boolean;
125
- /** 组件类名 */
125
+ /** Component class name */
126
126
  className?: string;
127
- /** 表格标题,优先使用此配置 */
127
+ /** Table title, takes priority */
128
128
  title?: string;
129
- /** 标题下方说明文案 */
129
+ /** Description text below the title */
130
130
  description?: string;
131
- /** 当前激活的销售阶段 */
131
+ /** Currently active sales stage */
132
132
  activeStage?: string;
133
133
  }
134
134
 
135
135
  /**
136
- * 组件状态接口
136
+ * Component state interface
137
137
  */
138
138
  interface SimpleTableState {
139
- /** 表格标题 */
139
+ /** Table title */
140
140
  title?: string;
141
141
  fieldList: FieldInfo[];
142
- /** 表格数据源 */
142
+ /** Table data source */
143
143
  dataSource: any[];
144
- /** 加载状态 */
144
+ /** Loading state */
145
145
  loading: boolean;
146
- /** 错误信息 */
146
+ /** Error message */
147
147
  error: string | null;
148
- activeStage: string; // 当前激活的销售阶段
148
+ activeStage: string; // Currently active sales stage
149
149
  /**
150
- * FilterBar 事件 payload 一致(closeDateCustomRange / opportunityOwner / businessType 等);
151
- * 默认值为 defaultFiltergetFilterWhere 仅从中取值
150
+ * Consistent with FilterBar event payload (closeDateCustomRange / opportunityOwner / businessType, etc.);
151
+ * Default value is defaultFilter, getFilterWhere only reads from it
152
152
  */
153
153
  filter: any;
154
154
  }
155
155
 
156
156
  /**
157
- * XObject 数据表格组件(简化版)
158
- * 仅支持数据展示,不支持增删改查操作
157
+ * XObject data table component (simplified version)
158
+ * Supports data display only, does not support CRUD operations
159
159
  */
160
160
  export default class SimpleTable extends BaseCmp<
161
161
  SimpleTableProps,
@@ -164,7 +164,7 @@ export default class SimpleTable extends BaseCmp<
164
164
  constructor(props: SimpleTableProps) {
165
165
  super(props);
166
166
 
167
- // 初始化组件状态
167
+ // Initialize component state
168
168
  this.state = {
169
169
  fieldList: [],
170
170
  dataSource: [],
@@ -190,38 +190,38 @@ export default class SimpleTable extends BaseCmp<
190
190
  const { xObjectApiKey } = defaultXObjectDataApi;
191
191
 
192
192
  if (xObjectApiKey) {
193
- // 初始化字段列表、加载数据
193
+ // Initialize field list and load data
194
194
  this.loadFieldList();
195
195
  this.loadData();
196
196
  }
197
197
 
198
198
  /*
199
- // 广播事件:更新 FilterBar filter
199
+ // Broadcast event: update FilterBar filter
200
200
  NeoEvent.listen('updateFilterData', (filterData: any) => {
201
- console.log('SimpleTable 监听到了一个广播事件 updateFilterData: ', filterData);
201
+ console.log('SimpleTable received a broadcast event updateFilterData: ', filterData);
202
202
  this.setFilter(filterData);
203
203
  });
204
204
 
205
- // 广播事件:更新当前激活的销售阶段
205
+ // Broadcast event: update the currently active sales stage
206
206
  NeoEvent.listen('updateActiveStage', (activeStage: string) => {
207
- console.log('SimpleTable 监听到了一个广播事件 updateActiveStage: ', activeStage);
207
+ console.log('SimpleTable received a broadcast event updateActiveStage: ', activeStage);
208
208
  this.updateActiveStage(activeStage);
209
209
  });
210
210
  */
211
211
  }
212
212
 
213
213
  /**
214
- * 加载字段列表
215
- * Neo 平台获取 XObject 的字段描述信息
214
+ * Load field list
215
+ * Fetch XObject field description information from the Neo platform
216
216
  */
217
217
  async loadFieldList() {
218
218
  const xObjectDataApi: any = defaultXObjectDataApi;
219
219
 
220
- // 方式一:直接从 props.xObjectDetailApi 中获取字段描述
220
+ // Method 1: Get field descriptions directly from props.xObjectDetailApi
221
221
  if (xObjectDataApi && xObjectDataApi.fieldDescList) {
222
222
  this.setState({ fieldList: xObjectDataApi.fieldDescList });
223
223
  } else {
224
- // 方式二:自行通过 OpenAPI SDK 获取字段描述
224
+ // Method 2: Fetch field descriptions via OpenAPI SDK
225
225
  if (!xObjectDataApi.xObjectApiKey) return;
226
226
  try {
227
227
  const resultData = await xObject.getDesc(xObjectDataApi.xObjectApiKey);
@@ -231,13 +231,13 @@ export default class SimpleTable extends BaseCmp<
231
231
  this.setState({ fieldList, title: result.label });
232
232
  }
233
233
  } catch (error) {
234
- console.error('获取字段列表失败:', error);
234
+ console.error('Failed to get field list:', error);
235
235
  }
236
236
  }
237
237
  }
238
238
 
239
239
  /**
240
- * 当前表格可见字段列表(与列配置一致)
240
+ * Current visible field list for the table (consistent with column configuration)
241
241
  */
242
242
  getCurFieldList(): FieldInfo[] {
243
243
  // const { xObjectDataApi } = this.props;
@@ -256,7 +256,7 @@ export default class SimpleTable extends BaseCmp<
256
256
  }
257
257
 
258
258
  /**
259
- * 汇总用金额字段 apiKey(与金额列一致,取第一个货币字段)
259
+ * Money field apiKey for summary (consistent with the money column, takes the first currency field)
260
260
  */
261
261
  getMoneyFieldApiKey(): string | null {
262
262
  const moneyField = this.getCurFieldList().find((f) => isMoneyField(f));
@@ -264,8 +264,8 @@ export default class SimpleTable extends BaseCmp<
264
264
  }
265
265
 
266
266
  /**
267
- * 生成表格列配置
268
- * @returns 表格列配置数组
267
+ * Generate table column configuration
268
+ * @returns Array of table column configurations
269
269
  */
270
270
  generateColumns() {
271
271
  const xObjectDataApi: any = defaultXObjectDataApi;
@@ -274,7 +274,7 @@ export default class SimpleTable extends BaseCmp<
274
274
  (field) => !HIDDEN_TABLE_COLUMN_KEYS.has(field.apiKey),
275
275
  );
276
276
 
277
- // 根据字段列表生成基础列配置
277
+ // Generate base column configuration from field list
278
278
  const columns: any[] = curFieldList.map((field) => {
279
279
  const col: any = {
280
280
  title: field.label,
@@ -396,7 +396,7 @@ export default class SimpleTable extends BaseCmp<
396
396
  }
397
397
 
398
398
  /**
399
- * FilterBar 结构 filter 转为 xObject.√ where 字符串数组(与 stageSwitch 一致,SDK 按顺序 and 拼接)
399
+ * Convert FilterBar structured filter to xObject.query where string array (consistent with stageSwitch, SDK concatenates with AND in order)
400
400
  */
401
401
  getFilterWhere(): string[] {
402
402
  const raw = this.state.filter;
@@ -424,9 +424,9 @@ export default class SimpleTable extends BaseCmp<
424
424
  }
425
425
 
426
426
  /*
427
- // 如果 activeStage 存在,则添加 stage 过滤条件
427
+ // If activeStage exists, add stage filter condition
428
428
  if (this.state.activeStage) {
429
- // customItem248__c 是销售阶段字段
429
+ // customItem248__c is the sales stage field
430
430
  where.push(`customItem248__c = '${this.state.activeStage}'`);
431
431
  }
432
432
  */
@@ -434,9 +434,11 @@ export default class SimpleTable extends BaseCmp<
434
434
  return where;
435
435
  }
436
436
 
437
- /** stageSwitch一致:历史商机自定义 SQL where(opportunity_1_* 字段) */
437
+ /** Consistent with stageSwitch: historical opportunity custom SQL where (opportunity_1_* fields) */
438
438
  getHistoryOpportunityQueryFilter(): string[] {
439
439
  const raw = this.state.filter;
440
+ const defaultFilter = getDefaultFilterByProps(this.props);
441
+
440
442
  const curFilter: Record<string, unknown> =
441
443
  raw && typeof raw === 'object' && !Array.isArray(raw)
442
444
  ? Object.keys(raw as object).length > 0
@@ -472,7 +474,7 @@ export default class SimpleTable extends BaseCmp<
472
474
  return where;
473
475
  }
474
476
 
475
- /** 查询期间初历史商机列表(与 stageSwitch.fetchHistoryOpportunityList 同源,字段按需求扩展) */
477
+ /** Query historical opportunity list for the period (same source as stageSwitch.fetchHistoryOpportunityList, fields extended as needed) */
476
478
  async fetchHistoryOpportunityList(): Promise<unknown[]> {
477
479
  const result = await queryByCustomSQL({
478
480
  xObjectApiKey: HISTORY_OPPORTUNITY_BI_KEY,
@@ -486,7 +488,7 @@ export default class SimpleTable extends BaseCmp<
486
488
  }
487
489
 
488
490
  /**
489
- * 加载表格数据
491
+ * Load table data
490
492
  */
491
493
  @NeoEvent.function
492
494
  async loadData() {
@@ -519,7 +521,7 @@ export default class SimpleTable extends BaseCmp<
519
521
 
520
522
  console.log('[SimpleTable__c] records:', records, historyRows);
521
523
 
522
- // 根据阶段过滤数据
524
+ // Filter data by stage
523
525
  if (this.state.activeStage) {
524
526
  records = records.filter((record: any) => {
525
527
  return record.customItem248__c === this.state.activeStage;
@@ -543,20 +545,20 @@ export default class SimpleTable extends BaseCmp<
543
545
  });
544
546
  } else {
545
547
  this.setState({
546
- error: result?.msg || '获取数据失败',
548
+ error: result?.msg || 'Failed to fetch data',
547
549
  loading: false,
548
550
  });
549
551
  }
550
552
  } catch (error: any) {
551
553
  this.setState({
552
- error: error.message || '获取数据失败',
554
+ error: error.message || 'Failed to fetch data',
553
555
  loading: false,
554
556
  });
555
557
  }
556
558
  }
557
559
 
558
560
  /**
559
- * stageSwitch 一致:更新 FilterBar filter 并重新拉取表格数据。
561
+ * Consistent with stageSwitch: update FilterBar filter and re-fetch table data.
560
562
  */
561
563
  @NeoEvent.function
562
564
  setFilter(filter?: any) {
@@ -570,7 +572,7 @@ export default class SimpleTable extends BaseCmp<
570
572
  }
571
573
 
572
574
  /**
573
- * 更新当前激活的销售阶段
575
+ * Update the currently active sales stage
574
576
  */
575
577
  @NeoEvent.function
576
578
  updateActiveStage(activeStage?: string) {
@@ -584,8 +586,8 @@ export default class SimpleTable extends BaseCmp<
584
586
  }
585
587
 
586
588
  /**
587
- * 渲染组件
588
- * @returns 组件 JSX 元素
589
+ * Render component
590
+ * @returns Component JSX element
589
591
  */
590
592
  render() {
591
593
  const { title: stateTitle, dataSource, loading, error } = this.state;
@@ -594,8 +596,8 @@ export default class SimpleTable extends BaseCmp<
594
596
  const { xObjectApiKey } = defaultXObjectDataApi;
595
597
  const columns = this.generateColumns();
596
598
 
597
- // 优先使用 props.title,其次使用 state.title,最后使用默认值
598
- const displayTitle = propsTitle || stateTitle || '数据表格';
599
+ // Use props.title first, then state.title, and finally the default value
600
+ const displayTitle = propsTitle || stateTitle || 'Data Table';
599
601
 
600
602
  const moneyKey = this.getMoneyFieldApiKey();
601
603
  const totalAmount = moneyKey ? sumMoneyRows(dataSource, moneyKey) : 0;
@@ -613,7 +615,7 @@ export default class SimpleTable extends BaseCmp<
613
615
  );
614
616
 
615
617
  return (
616
- <div className={`simpleTable__c ${className}`} data-time="2026.4.15 01">
618
+ <div className={`simpleTable__c ${className}`} data-time="2026.4.17 01">
617
619
  <div className="table-wrapper">
618
620
  <div className="panel-header">
619
621
  <div className="panel-header-text">
@@ -634,7 +636,7 @@ export default class SimpleTable extends BaseCmp<
634
636
  </div>
635
637
  </div>
636
638
  <div className="table-container">
637
- <Spin spinning={loading} tip="加载数据中...">
639
+ <Spin spinning={loading} tip="Loading data...">
638
640
  {error ? (
639
641
  <Empty
640
642
  image={Empty.PRESENTED_IMAGE_SIMPLE}
@@ -1,72 +1,72 @@
1
1
  /**
2
- * @file XObject 表格组件对接编辑器的描述文件(简化版)
3
- * @description 定义组件在 Neo 平台编辑器中的配置信息
2
+ * @file XObject table component editor descriptor file (simplified version)
3
+ * @description Defines the component configuration for the Neo platform editor
4
4
  * @author Neo Custom Widget CLI
5
5
  * @version 1.0.0
6
6
  */
7
7
  export class SimpleTableModel {
8
8
  /**
9
- * 组件类型标识
10
- * 用于标识组件的唯一性,在构建时根据当前组件目录名称自动生成
11
- * 注意:此字段在构建时会被自动替换,不需要手动设置
9
+ * Component type identifier
10
+ * Used to uniquely identify the component; automatically generated from the current component directory name during build
11
+ * Note: This field is automatically replaced during build and does not need to be set manually
12
12
  */
13
13
  // cmpType: string = 'simpleTable';
14
14
 
15
- /** 组件名称,用于设置在编辑器左侧组件面板中展示的名称 */
16
- label: string = '商机列表';
15
+ /** Component name, displayed in the editor's left component panel */
16
+ label: string = 'Opportunity List';
17
17
 
18
- /** 组件描述,用于设置在编辑器左侧组件面板中展示的描述 */
18
+ /** Component description, displayed in the editor's left component panel */
19
19
  description: string =
20
- '基于 XObject 的数据表格组件,仅支持数据展示,不支持增删改查操作';
20
+ 'Data table component based on XObject, supports data display only, does not support CRUD operations';
21
21
 
22
- /** 分类标签,用于设置在编辑器左侧组件面板哪个分类中展示 */
23
- // tags: string[] = ['自定义组件'];
22
+ /** Category tags, determines which category the component appears under in the editor's left component panel */
23
+ // tags: string[] = ['Custom Components'];
24
24
 
25
- /** 组件图标,用于设置在编辑器左侧组件面板中展示的图标 */
25
+ /** Component icon, displayed in the editor's left component panel */
26
26
  iconUrl: string = 'https://custom-widgets.bj.bcebos.com/table.svg';
27
27
 
28
28
  /**
29
- * 用于设置组件支持的页面类型
29
+ * Sets the page types supported by the component
30
30
  *
31
- * 当前 NeoCRM 平台存在的页面类型:
32
- * all: 1 全页面
33
- * entityFormPage: 4 实体表单页
34
- * customPage: 6 自定义页面
31
+ * Page types available in the current NeoCRM platform:
32
+ * all: 1 All pages
33
+ * entityFormPage: 4 Entity form page
34
+ * customPage: 6 Custom page
35
35
  */
36
36
  targetPage: string[] = ['all'];
37
37
 
38
38
  /**
39
- * 用于设置组件支持的终端类型
39
+ * Sets the device types supported by the component
40
40
  *
41
- * 当前 NeoCRM 平台存在的终端类型:
42
- * web: 网页端
43
- * mobile: 移动端
41
+ * Device types available in the current NeoCRM platform:
42
+ * web: Web
43
+ * mobile: Mobile
44
44
  */
45
45
  targetDevice: string = 'web';
46
46
 
47
- /** 初次插入页面的默认属性数据 */
47
+ /** Default property data when first inserted into a page */
48
48
  defaultComProps = {
49
49
  title: 'Opportunity List',
50
50
  activeStage: 'Prospecting',
51
51
  description: 'Filtered by Close Date, Opportunity Owner, Business Type',
52
52
  };
53
53
 
54
- // 当前组件支持的函数列表(其他组件可触发当前组件的函数)
54
+ // List of functions supported by the current component (other components can trigger these functions)
55
55
  functions = [
56
56
  {
57
57
  apiKey: 'loadData',
58
- label: '刷新表格',
59
- helpTextKey: '刷新当前表格数据',
58
+ label: 'Refresh Table',
59
+ helpTextKey: 'Refresh the current table data',
60
60
  },
61
61
  {
62
62
  apiKey: 'setFilter',
63
- label: '设置过滤条件',
63
+ label: 'Set Filter Conditions',
64
64
  helpTextKey:
65
- '设置与图表一致的 filtercloseDate / ownerId / entityType),并重新查询表格',
65
+ 'Set filter conditions consistent with the chart (closeDate / ownerId / entityType), and re-query the table',
66
66
  funcInParams: [
67
67
  {
68
68
  apiKey: 'filter',
69
- label: '过滤条件数据',
69
+ label: 'Filter condition data',
70
70
  type: 'Object',
71
71
  required: false,
72
72
  },
@@ -74,12 +74,12 @@ export class SimpleTableModel {
74
74
  },
75
75
  {
76
76
  apiKey: 'updateActiveStage',
77
- label: '更新当前激活阶段',
78
- helpTextKey: '设置当前激活的销售阶段',
77
+ label: 'Update Active Stage',
78
+ helpTextKey: 'Set the currently active sales stage',
79
79
  funcInParams: [
80
80
  {
81
81
  apiKey: 'activeStage',
82
- label: '当前激活阶段',
82
+ label: 'Current active stage',
83
83
  type: 'String',
84
84
  required: false,
85
85
  },
@@ -88,33 +88,33 @@ export class SimpleTableModel {
88
88
  ];
89
89
 
90
90
  /**
91
- * 组件属性配置模式
92
- * 支持静态配置:propsSchema,优先级比 propsSchemaCreator
93
- * 定义组件在编辑器中可配置的属性
91
+ * Component property configuration schema
92
+ * Supports static configuration: propsSchema, with lower priority than propsSchemaCreator
93
+ * Defines the configurable properties of the component in the editor
94
94
  */
95
95
  propsSchema = [
96
96
  {
97
97
  type: 'panelInput',
98
98
  name: 'title',
99
- label: '表格标题',
100
- placeholder: '请输入表格标题',
99
+ label: 'Table Title',
100
+ placeholder: 'Enter table title',
101
101
  },
102
102
  {
103
103
  type: 'panelInput',
104
104
  name: 'description',
105
- label: '表格说明',
106
- placeholder: '显示在标题下方的说明文字',
105
+ label: 'Table Description',
106
+ placeholder: 'Description text displayed below the title',
107
107
  },
108
108
  /*
109
109
  {
110
- type: 'xObjectDataApi', // 用于获取实体业务数据列表的配置项
110
+ type: 'xObjectDataApi', // Configuration item for fetching entity business data list
111
111
  name: 'xObjectDataApi',
112
- label: '实体数据源',
112
+ label: 'Entity Data Source',
113
113
  value: {
114
114
  xObjectApiKey: 'customContact__c',
115
115
  fields: ['name', 'phone__c'],
116
116
  },
117
- placeholder: '请选择实体数据源',
117
+ placeholder: 'Select entity data source',
118
118
  custom: true,
119
119
  },
120
120
  */
@@ -1,4 +1,4 @@
1
- /** 表头 AI 图标:用法同 openChatPageBtn openChatPageBtn-icon(背景图) */
1
+ /** Table header AI icon: same usage as openChatPageBtn's openChatPageBtn-icon (background image) */
2
2
  .simpleTable-th-title-with-ai-icon {
3
3
  display: inline-flex;
4
4
  align-items: center;
@@ -157,7 +157,7 @@
157
157
  color: #fff;
158
158
  }
159
159
 
160
- // 响应式设计
160
+ // Responsive design
161
161
  @media (max-width: 768px) {
162
162
  .panel-header {
163
163
  padding: 12px;
@@ -190,4 +190,3 @@
190
190
  }
191
191
  }
192
192
  }
193
-
@@ -1,8 +1,8 @@
1
- # StageSwitch 组件
1
+ # StageSwitch Component
2
2
 
3
- 阶段切换卡片组件,切换显示不同销售阶段的数据。
3
+ Stage switch card component that toggles between different sales stage data.
4
4
 
5
- ## 使用方式
5
+ ## Usage
6
6
 
7
7
  ```tsx
8
8
  import StageSwitch from './components/stageSwitch__c';
@@ -19,18 +19,18 @@ import StageSwitch from './components/stageSwitch__c';
19
19
 
20
20
  ## Props
21
21
 
22
- | 属性 | 说明 | 类型 | 默认值 |
23
- |------|------|------|--------|
24
- | stages | 阶段数据 | StageTab[] | [] |
25
- | activeStage | 当前阶段 | string | 第一个阶段 |
26
- | onStageChange | 阶段切换回调 | (stage: StageTab) => void | - |
22
+ | Property | Description | Type | Default |
23
+ |----------|-------------|------|---------|
24
+ | stages | Stage data | StageTab[] | [] |
25
+ | activeStage | Current stage | string | First stage |
26
+ | onStageChange | Stage switch callback | (stage: StageTab) => void | - |
27
27
 
28
28
  ## StageTab
29
29
 
30
- | 属性 | 说明 | 类型 |
31
- |------|------|------|
32
- | key | 唯一标识 | string |
33
- | name | 阶段名称 | string |
34
- | amount | 金额 | string |
35
- | count | 数量 | number |
36
- | changes | 变化数据 | { amount, amountDirection, count, countDirection } |
30
+ | Property | Description | Type |
31
+ |----------|-------------|------|
32
+ | key | Unique identifier | string |
33
+ | name | Stage name | string |
34
+ | amount | Amount | string |
35
+ | count | Count | number |
36
+ | changes | Change data | { amount, amountDirection, count, countDirection } |