@appthen/cli 1.2.11 → 1.2.13

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 (59) hide show
  1. package/bin/main.js +47 -0
  2. package/dist/index.js +6185 -15001
  3. package/package.json +8 -4
  4. package/tests/test-app/.appthen/shadow-space-100001-test-app-e99876b1.json +1197 -741
  5. package/tests/test-app/.appthen/space-config.json +2 -2
  6. package/tests/test-app/src/components/MessageCenter.tsx +506 -0
  7. package/tests/test-app/src/pages/CustomerManagement.tsx +535 -0
  8. package/tests/test-app/src/pages/CyberpunkDashboard.tsx +348 -0
  9. package/tests/test-app/src/pages/CyberpunkProductManagement.tsx +637 -0
  10. package/tests/test-app/src/pages/CyberpunkUserList.tsx +316 -0
  11. package/tests/test-app/src/pages/DashboardV2.tsx +334 -0
  12. package/tests/test-app/src/pages/DataReport.tsx +298 -0
  13. package/tests/test-app/src/pages/DataStatistics.tsx +317 -0
  14. package/tests/test-app/src/pages/DepartmentManagement.tsx +503 -0
  15. package/tests/test-app/src/pages/FileExplorer.tsx +441 -0
  16. package/tests/test-app/src/pages/OrderDetail.tsx +393 -0
  17. package/tests/test-app/src/pages/ProductManagement.tsx +521 -0
  18. package/tests/test-app/src/pages/ProjectTimeline.tsx +395 -0
  19. package/tests/test-app/src/pages/RoleManagement.tsx +523 -0
  20. package/tests/test-app/src/pages/StaticCyberpunkDashboard.tsx +462 -0
  21. package/tests/test-app/src/pages/StaticCyberpunkUserList.tsx +567 -0
  22. package/tests/test-app/src/pages/StudentWeaknessList.tsx +547 -0
  23. package/tests/test-app/src/pages/SystemSettings.tsx +422 -0
  24. package/tests/test-app/src/pages/TaskManagement.tsx +467 -0
  25. package/tests/test-app/src/pages/TicketManagement.tsx +402 -0
  26. package/tests/test-app/src/pages/UserProfile.tsx +404 -0
  27. package/tests/test-app/src/pages/WorkflowDesigner.tsx +434 -0
  28. package/tests/test-app/src/pages/admin/dashboard.tsx +591 -0
  29. package/tests/test-app/src/pages/article-list.tsx +222 -0
  30. package/tests/test-app/src/pages/babyProductRecommendationPage.tsx +168 -0
  31. package/tests/test-app/src/pages/category-list.tsx +179 -0
  32. package/tests/test-app/src/pages/comment-list.tsx +194 -0
  33. package/tests/test-app/src/pages/cyberpunk/cyberpunkCRMPage.tsx +1299 -0
  34. package/tests/test-app/src/pages/data-analytics.tsx +1872 -0
  35. package/tests/test-app/src/pages/data-overview.tsx +600 -0
  36. package/tests/test-app/src/pages/demo-error-page.tsx +119 -0
  37. package/tests/test-app/src/pages/department-list.tsx +183 -0
  38. package/tests/test-app/src/pages/goods-list.tsx +233 -0
  39. package/tests/test-app/src/pages/housekeeping/adminDashboardPage.tsx +880 -0
  40. package/tests/test-app/src/pages/mobile_terminal/uiHandsOnPractice.tsx +1 -1
  41. package/tests/test-app/src/pages/notice-list.tsx +217 -0
  42. package/tests/test-app/src/pages/order-detail.tsx +330 -0
  43. package/tests/test-app/src/pages/order-list.tsx +195 -0
  44. package/tests/test-app/src/pages/order-management.tsx +563 -0
  45. package/tests/test-app/src/pages/page/OrderList.tsx +230 -0
  46. package/tests/test-app/src/pages/role-list.tsx +184 -0
  47. package/tests/test-app/src/pages/simple/simplePage.tsx +92 -0
  48. package/tests/test-app/src/pages/simple-page.tsx +43 -0
  49. package/tests/test-app/src/pages/test-destructure.tsx +44 -0
  50. package/tests/test-app/src/pages/test-error-page.tsx +75 -0
  51. package/tests/test-app/src/pages/test-page-with-errors.tsx +51 -0
  52. package/tests/test-app/src/pages/test-page.tsx +101 -0
  53. package/tests/test-app/src/pages/test-render.tsx +52 -0
  54. package/tests/test-app/src/pages/test-return-type.tsx +41 -0
  55. package/tests/test-app/src/pages/test-type-assertion.tsx +37 -0
  56. package/tests/test-app/src/pages/ui/styleSelectorPage.tsx +1554 -0
  57. package/tests/test-app/src/pages/user-list.tsx +212 -0
  58. package/tests/test-app/src/pages/wrong-page.tsx +50 -0
  59. package/tests/test-app/.appthen/shadow-space-unknown-user-test-app-e99876b1.json +0 -1060
@@ -0,0 +1,348 @@
1
+ /**
2
+ * 赛博朋克仪表板
3
+ * 充满未来科技感的数据展示页面,采用霓虹配色和动态效果
4
+ *
5
+ * @type Page
6
+ * @route /cyberpunk-dashboard
7
+ * @screen 1920x1080 #0a0a0f
8
+ * @frames web
9
+ */
10
+ import React from 'react';
11
+
12
+
13
+
14
+ class IProps {
15
+ title?: string;
16
+ }
17
+
18
+ /*
19
+ * 数据与接口请求定义
20
+ */
21
+ class IState {
22
+ currentTime?: string;
23
+ systemStatus?: string;
24
+ cpuUsage?: number;
25
+ memoryUsage?: number;
26
+ networkSpeed?: number;
27
+ activeNodes?: number;
28
+ showDetails?: boolean;
29
+ selectedModule?: string;
30
+ modules?: {
31
+ /* @example 1 */id?: number,
32
+ /* @example 神经链接 */name?: string,
33
+ /* @example active */status?: string,
34
+ /* @example 89 */level?: number,
35
+ }[];
36
+ logs?: {
37
+ /* @example 1 */id?: number,
38
+ /* @example 23:59:45 */time?: string,
39
+ /* @example info */type?: string,
40
+ /* @example 系统初始化完成 */message?: string,
41
+ }[];
42
+ glitchMode?: boolean;
43
+ }
44
+
45
+ class Document extends React.Component<IProps, IState> {
46
+ state = {
47
+ currentTime: '',
48
+ systemStatus: 'ONLINE',
49
+ cpuUsage: 67,
50
+ memoryUsage: 54,
51
+ networkSpeed: 1024,
52
+ activeNodes: 42,
53
+ showDetails: false,
54
+ selectedModule: null,
55
+ modules: [
56
+ { id: 1, name: '神经链接', status: 'active', level: 89 },
57
+ { id: 2, name: '数据流', status: 'active', level: 76 },
58
+ { id: 3, name: '防火墙', status: 'warning', level: 45 },
59
+ { id: 4, name: '加密模块', status: 'active', level: 92 },
60
+ { id: 5, name: 'AI 核心', status: 'active', level: 98 },
61
+ { id: 6, name: '量子网络', status: 'offline', level: 0 },
62
+ ],
63
+ logs: [
64
+ { id: 1, time: '23:59:45', type: 'info', message: '系统初始化完成' },
65
+ { id: 2, time: '23:59:46', type: 'success', message: '神经链接已建立' },
66
+ { id: 3, time: '23:59:47', type: 'warning', message: '检测到异常数据包' },
67
+ { id: 4, time: '23:59:48', type: 'info', message: '防火墙更新中...' },
68
+ { id: 5, time: '23:59:49', type: 'success', message: '数据同步完成' },
69
+ ],
70
+ glitchMode: false,
71
+ };
72
+
73
+ componentDidMount() {
74
+ this.updateTime();
75
+ this.timer = setInterval(() => {
76
+ this.updateTime();
77
+ this.simulateData();
78
+ }, 1000);
79
+ }
80
+
81
+ componentWillUnmount() {
82
+ if (this.timer) {
83
+ clearInterval(this.timer);
84
+ }
85
+ }
86
+
87
+ updateTime() {
88
+ const now = new Date();
89
+ const timeStr = now.toLocaleTimeString('zh-CN', {
90
+ hour12: false,
91
+ });
92
+ this.setState({
93
+ currentTime: timeStr,
94
+ });
95
+ }
96
+
97
+ simulateData() {
98
+ this.setState({
99
+ cpuUsage: Math.floor(Math.random() * 40) + 50,
100
+ memoryUsage: Math.floor(Math.random() * 30) + 40,
101
+ networkSpeed: Math.floor(Math.random() * 500) + 800,
102
+ });
103
+ }
104
+
105
+ toggleDetails() {
106
+ this.setState({
107
+ showDetails: !this.state.showDetails,
108
+ });
109
+ }
110
+
111
+ selectModule(module) {
112
+ this.setState({
113
+ selectedModule: module,
114
+ });
115
+ }
116
+
117
+ toggleGlitchMode() {
118
+ this.setState({
119
+ glitchMode: !this.state.glitchMode,
120
+ });
121
+ }
122
+
123
+ getStatusColor(status) {
124
+ switch (status) {
125
+ case 'active':
126
+ return '#00ff88';
127
+ case 'warning':
128
+ return '#ffaa00';
129
+ case 'offline':
130
+ return '#ff0055';
131
+ default:
132
+ return '#00ffff';
133
+ }
134
+ }
135
+
136
+ getLogTypeColor(type) {
137
+ switch (type) {
138
+ case 'success':
139
+ return '#00ff88';
140
+ case 'warning':
141
+ return '#ffaa00';
142
+ case 'error':
143
+ return '#ff0055';
144
+ default:
145
+ return '#00ffff';
146
+ }
147
+ }
148
+
149
+ render() {
150
+ return (
151
+ <Page style={styles.container}>
152
+ <View style={styles.scanlines} />
153
+ <View style={styles.grid} />
154
+ <View style={styles.header}>
155
+ <View style={styles.headerLeft}>
156
+ <Text style={styles.logo}>CYBERPUNK</Text>
157
+ <Text style={styles.logoSub}>DASHBOARD v2.077</Text>
158
+ </View>
159
+ <View style={styles.headerCenter}>
160
+ <Text style={styles.time}>{this.state.currentTime}</Text>
161
+ </View>
162
+ <View style={styles.headerRight}>
163
+ <View style={styles.statusBadge}>
164
+ <Text style={styles.statusText}>{this.state.systemStatus}</Text>
165
+ </View>
166
+ </View>
167
+ </View>
168
+ <View style={styles.mainContent}>
169
+ <View style={styles.leftPanel}>
170
+ <View style={styles.panel}>
171
+ <Text style={styles.panelTitle}>系统状态</Text>
172
+ <View style={styles.statRow}>
173
+ <Text style={styles.statLabel}>CPU 使用率</Text>
174
+ <View style={styles.statBarContainer}>
175
+ <View
176
+ style={[
177
+ styles.statBar,
178
+ {
179
+ width: this.state.cpuUsage + '%',
180
+ backgroundColor:
181
+ this.state.cpuUsage > 80 ? '#ff0055' : '#00ffff',
182
+ },
183
+ ]}
184
+ />
185
+ </View>
186
+ <Text style={styles.statValue}>{this.state.cpuUsage}%</Text>
187
+ </View>
188
+ <View style={styles.statRow}>
189
+ <Text style={styles.statLabel}>内存使用</Text>
190
+ <View style={styles.statBarContainer}>
191
+ <View
192
+ style={[
193
+ styles.statBar,
194
+ {
195
+ width: this.state.memoryUsage + '%',
196
+ backgroundColor: '#ff00ff',
197
+ },
198
+ ]}
199
+ />
200
+ </View>
201
+ <Text style={styles.statValue}>{this.state.memoryUsage}%</Text>
202
+ </View>
203
+ <View style={styles.statRow}>
204
+ <Text style={styles.statLabel}>网络速度</Text>
205
+ <Text style={styles.statValue}>
206
+ {this.state.networkSpeed}MB/s
207
+ </Text>
208
+ </View>
209
+ <View style={styles.statRow}>
210
+ <Text style={styles.statLabel}>活跃节点</Text>
211
+ <Text style={styles.statValue}>
212
+ {this.state.activeNodes}/ 64
213
+ </Text>
214
+ </View>
215
+ </View>
216
+ <View style={styles.panel}>
217
+ <Text style={styles.panelTitle}>模块状态</Text>
218
+ {this.state.modules.map((module, index) => (
219
+ <View
220
+ key={module.id}
221
+ style={[
222
+ styles.moduleItem,
223
+ this.state.selectedModule?.id === module.id &&
224
+ styles.moduleItemSelected,
225
+ ]}
226
+ onClick={() => this.selectModule(module)}
227
+ >
228
+ <View
229
+ style={[
230
+ styles.moduleDot,
231
+ { backgroundColor: this.getStatusColor(module.status) },
232
+ ]}
233
+ />
234
+ <Text style={styles.moduleName}>{module.name}</Text>
235
+ <Text style={styles.moduleLevel}>{module.level}%</Text>
236
+ </View>
237
+ ))}
238
+ </View>
239
+ </View>
240
+ <View style={styles.centerPanel}>
241
+ <View style={styles.mainDisplay}>
242
+ <View style={styles.displayHeader}>
243
+ <Text style={styles.displayTitle}>数据可视化</Text>
244
+ <View style={styles.displayActions}>
245
+ <Button
246
+ style={styles.cyberButton}
247
+ onClick={() => this.toggleDetails()}
248
+ >
249
+ <Text style={styles.buttonText}>
250
+ {this.state.showDetails ? '隐藏详情' : '显示详情'}
251
+ </Text>
252
+ </Button>
253
+ <Button
254
+ style={[styles.cyberButton, styles.glitchButton]}
255
+ onClick={() => this.toggleGlitchMode()}
256
+ >
257
+ <Text style={styles.buttonText}>故障模式</Text>
258
+ </Button>
259
+ </View>
260
+ </View>
261
+ <View style={styles.dataDisplay}>
262
+ <View style={styles.dataGrid}>
263
+ {[1, 2, 3, 4, 5, 6, 7, 8, 9].map((item, index) => (
264
+ <View
265
+ key={item}
266
+ style={[
267
+ styles.dataBlock,
268
+ this.state.glitchMode && styles.dataBlockGlitch,
269
+ ]}
270
+ >
271
+ <Text style={styles.dataBlockLabel}>
272
+ DATA-{item.toString().padStart(3, '0')}
273
+ </Text>
274
+ <Text style={styles.dataBlockValue}>
275
+ {Math.floor(Math.random() * 1000)}
276
+ </Text>
277
+ </View>
278
+ ))}
279
+ </View>
280
+ {!!this.state.showDetails && (
281
+ <View style={styles.detailsPanel}>
282
+ <Text style={styles.detailsTitle}>详细数据分析</Text>
283
+ <View style={styles.detailsGrid}>
284
+ <View style={styles.detailItem}>
285
+ <Text style={styles.detailLabel}>数据吞吐量</Text>
286
+ <Text style={styles.detailValue}>2.4 TB/h</Text>
287
+ </View>
288
+ <View style={styles.detailItem}>
289
+ <Text style={styles.detailLabel}>响应时间</Text>
290
+ <Text style={styles.detailValue}>12 ms</Text>
291
+ </View>
292
+ <View style={styles.detailItem}>
293
+ <Text style={styles.detailLabel}>错误率</Text>
294
+ <Text style={styles.detailValue}>0.02%</Text>
295
+ </View>
296
+ <View style={styles.detailItem}>
297
+ <Text style={styles.detailLabel}>加密强度</Text>
298
+ <Text style={styles.detailValue}>AES-256</Text>
299
+ </View>
300
+ </View>
301
+ </View>
302
+ )}
303
+ </View>
304
+ </View>
305
+ </View>
306
+ <View style={styles.rightPanel}>
307
+ <View style={styles.panel}>
308
+ <Text style={styles.panelTitle}>系统日志</Text>
309
+ <View style={styles.logList}>
310
+ {this.state.logs.map((log, index) => (
311
+ <View key={log.id} style={styles.logItem}>
312
+ <Text style={styles.logTime}>{log.time}</Text>
313
+ <View
314
+ style={[
315
+ styles.logType,
316
+ {
317
+ backgroundColor:
318
+ this.getLogTypeColor(log.type) + '33',
319
+ },
320
+ ]}
321
+ >
322
+ <Text
323
+ style={[
324
+ styles.logTypeText,
325
+ { color: this.getLogTypeColor(log.type) },
326
+ ]}
327
+ >
328
+ {log.type.toUpperCase()}
329
+ </Text>
330
+ </View>
331
+ <Text style={styles.logMessage}>{log.message}</Text>
332
+ </View>
333
+ ))}
334
+ </View>
335
+ </View>
336
+ </View>
337
+ </View>
338
+ <View style={styles.footer}>
339
+ <Text style={styles.footerText}>NEURAL INTERFACE CONNECTED</Text>
340
+ <Text style={styles.footerText}>LATENCY: 12ms</Text>
341
+ <Text style={styles.footerText}>ENCRYPTION: ACTIVE</Text>
342
+ </View>
343
+ </Page>
344
+ );
345
+ }
346
+ }
347
+
348
+ export default Document;