@svadmin/lite 0.26.0 → 0.30.1

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 (109) hide show
  1. package/dist/components/LiteAbacPolicyMatrix.svelte +128 -0
  2. package/dist/components/LiteAbacPolicyMatrix.svelte.d.ts +16 -0
  3. package/dist/components/LiteAnnouncementBanner.svelte +88 -0
  4. package/dist/components/LiteAnnouncementBanner.svelte.d.ts +12 -0
  5. package/dist/components/LiteApiPlayground.svelte +103 -0
  6. package/dist/components/LiteApiPlayground.svelte.d.ts +10 -0
  7. package/dist/components/LiteApprovalChainBuilder.svelte +120 -0
  8. package/dist/components/LiteApprovalChainBuilder.svelte.d.ts +15 -0
  9. package/dist/components/LiteAsyncExportModal.svelte +113 -0
  10. package/dist/components/LiteAsyncExportModal.svelte.d.ts +14 -0
  11. package/dist/components/LiteAuditTrailInspector.svelte +166 -0
  12. package/dist/components/LiteAuditTrailInspector.svelte.d.ts +23 -0
  13. package/dist/components/LiteBillingInvoiceDrawer.svelte +100 -0
  14. package/dist/components/LiteBillingInvoiceDrawer.svelte.d.ts +16 -0
  15. package/dist/components/LiteChartAnnotationOverlay.svelte +101 -0
  16. package/dist/components/LiteChartAnnotationOverlay.svelte.d.ts +16 -0
  17. package/dist/components/LiteColumnMappingTable.svelte +105 -0
  18. package/dist/components/LiteColumnMappingTable.svelte.d.ts +14 -0
  19. package/dist/components/LiteContextMenu.svelte +114 -0
  20. package/dist/components/LiteContextMenu.svelte.d.ts +18 -0
  21. package/dist/components/LiteDashboardGridLayout.svelte +108 -0
  22. package/dist/components/LiteDashboardGridLayout.svelte.d.ts +16 -0
  23. package/dist/components/LiteDashboardLayoutStorage.svelte +88 -0
  24. package/dist/components/LiteDashboardLayoutStorage.svelte.d.ts +16 -0
  25. package/dist/components/LiteDataImportDropzone.svelte +89 -0
  26. package/dist/components/LiteDataImportDropzone.svelte.d.ts +10 -0
  27. package/dist/components/LiteDataLineageGraph.svelte +100 -0
  28. package/dist/components/LiteDataLineageGraph.svelte.d.ts +15 -0
  29. package/dist/components/LiteDataMaskPolicyEngine.svelte +131 -0
  30. package/dist/components/LiteDataMaskPolicyEngine.svelte.d.ts +16 -0
  31. package/dist/components/LiteDataScreenContainer.svelte +34 -0
  32. package/dist/components/LiteDataScreenContainer.svelte.d.ts +9 -0
  33. package/dist/components/LiteDualApprovalGate.svelte +58 -0
  34. package/dist/components/LiteDualApprovalGate.svelte.d.ts +11 -0
  35. package/dist/components/LiteElectronicSealStamp.svelte +56 -0
  36. package/dist/components/LiteElectronicSealStamp.svelte.d.ts +9 -0
  37. package/dist/components/LiteEnvVariableEditor.svelte +114 -0
  38. package/dist/components/LiteEnvVariableEditor.svelte.d.ts +15 -0
  39. package/dist/components/LiteFormulaField.svelte +44 -0
  40. package/dist/components/LiteFormulaField.svelte.d.ts +11 -0
  41. package/dist/components/LiteGeoScatterMap.svelte +117 -0
  42. package/dist/components/LiteGeoScatterMap.svelte.d.ts +16 -0
  43. package/dist/components/LiteHmacSignatureCalculator.svelte +84 -0
  44. package/dist/components/LiteHmacSignatureCalculator.svelte.d.ts +10 -0
  45. package/dist/components/LiteImportPreviewValidator.svelte +136 -0
  46. package/dist/components/LiteImportPreviewValidator.svelte.d.ts +16 -0
  47. package/dist/components/LiteJsonViewer.svelte +88 -0
  48. package/dist/components/LiteJsonViewer.svelte.d.ts +9 -0
  49. package/dist/components/LiteKeyboardShortcutsModal.svelte +56 -0
  50. package/dist/components/LiteKeyboardShortcutsModal.svelte.d.ts +13 -0
  51. package/dist/components/LiteKpiCard.svelte +169 -0
  52. package/dist/components/LiteKpiCard.svelte.d.ts +25 -0
  53. package/dist/components/LiteLiveStreamLogViewer.svelte +84 -0
  54. package/dist/components/LiteLiveStreamLogViewer.svelte.d.ts +14 -0
  55. package/dist/components/LiteOmnibarCommandPalette.svelte +111 -0
  56. package/dist/components/LiteOmnibarCommandPalette.svelte.d.ts +15 -0
  57. package/dist/components/LitePeriodComparisonCard.svelte +60 -0
  58. package/dist/components/LitePeriodComparisonCard.svelte.d.ts +11 -0
  59. package/dist/components/LitePermissionSimulator.svelte +90 -0
  60. package/dist/components/LitePermissionSimulator.svelte.d.ts +14 -0
  61. package/dist/components/LitePivotMatrix.svelte +138 -0
  62. package/dist/components/LitePivotMatrix.svelte.d.ts +18 -0
  63. package/dist/components/LitePlanUsageQuotaBar.svelte +96 -0
  64. package/dist/components/LitePlanUsageQuotaBar.svelte.d.ts +15 -0
  65. package/dist/components/LiteQueryAiExplainer.svelte +85 -0
  66. package/dist/components/LiteQueryAiExplainer.svelte.d.ts +10 -0
  67. package/dist/components/LiteResultPage.svelte +135 -0
  68. package/dist/components/LiteResultPage.svelte.d.ts +17 -0
  69. package/dist/components/LiteScheduledJobManager.svelte +116 -0
  70. package/dist/components/LiteScheduledJobManager.svelte.d.ts +16 -0
  71. package/dist/components/LiteScreenAntiLeakGuard.svelte +56 -0
  72. package/dist/components/LiteScreenAntiLeakGuard.svelte.d.ts +8 -0
  73. package/dist/components/LiteSecureDataExporter.svelte +101 -0
  74. package/dist/components/LiteSecureDataExporter.svelte.d.ts +12 -0
  75. package/dist/components/LiteSensitiveDataMask.svelte +34 -2
  76. package/dist/components/LiteSensitiveDataMask.svelte.d.ts +1 -2
  77. package/dist/components/LiteSqlConsole.svelte +128 -0
  78. package/dist/components/LiteSqlConsole.svelte.d.ts +16 -0
  79. package/dist/components/LiteStepWizard.svelte +98 -0
  80. package/dist/components/LiteStepWizard.svelte.d.ts +16 -0
  81. package/dist/components/LiteSystemCapacityForecastCard.svelte +88 -0
  82. package/dist/components/LiteSystemCapacityForecastCard.svelte.d.ts +11 -0
  83. package/dist/components/LiteSystemHealthCheckDashboard.svelte +142 -0
  84. package/dist/components/LiteSystemHealthCheckDashboard.svelte.d.ts +18 -0
  85. package/dist/components/LiteTableAggregationFooter.svelte +76 -0
  86. package/dist/components/LiteTableAggregationFooter.svelte.d.ts +14 -0
  87. package/dist/components/LiteTenantContextSwitcher.svelte +173 -0
  88. package/dist/components/LiteTenantContextSwitcher.svelte.d.ts +27 -0
  89. package/dist/components/LiteTenantQuotasMatrix.svelte +117 -0
  90. package/dist/components/LiteTenantQuotasMatrix.svelte.d.ts +17 -0
  91. package/dist/components/LiteTextDiffViewer.svelte +111 -0
  92. package/dist/components/LiteTextDiffViewer.svelte.d.ts +10 -0
  93. package/dist/components/LiteThreadedCommentDrawer.svelte +60 -0
  94. package/dist/components/LiteThreadedCommentDrawer.svelte.d.ts +15 -0
  95. package/dist/components/LiteTierFeatureComparison.svelte +97 -0
  96. package/dist/components/LiteTierFeatureComparison.svelte.d.ts +18 -0
  97. package/dist/components/LiteUnsavedChangesGuard.svelte +53 -0
  98. package/dist/components/LiteUnsavedChangesGuard.svelte.d.ts +10 -0
  99. package/dist/components/LiteWatermarkContainer.svelte +58 -0
  100. package/dist/components/LiteWatermarkContainer.svelte.d.ts +9 -0
  101. package/dist/components/LiteWebhookSimulator.svelte +120 -0
  102. package/dist/components/LiteWebhookSimulator.svelte.d.ts +11 -0
  103. package/dist/components/LiteWorkflowNodeInspector.svelte +79 -0
  104. package/dist/components/LiteWorkflowNodeInspector.svelte.d.ts +11 -0
  105. package/dist/components/LiteWorkflowStepper.svelte +56 -0
  106. package/dist/components/LiteWorkflowStepper.svelte.d.ts +14 -0
  107. package/dist/index.d.ts +57 -0
  108. package/dist/index.js +61 -0
  109. package/package.json +2 -2
@@ -0,0 +1,98 @@
1
+ <script lang="ts">
2
+ import type { Snippet } from 'svelte';
3
+
4
+ export interface LiteStepItem {
5
+ id: string;
6
+ title: string;
7
+ description?: string;
8
+ }
9
+
10
+ interface Props {
11
+ steps: LiteStepItem[];
12
+ currentStep?: number;
13
+ action?: string;
14
+ class?: string;
15
+ children?: Snippet;
16
+ }
17
+
18
+ let {
19
+ steps = [],
20
+ currentStep = 0,
21
+ action,
22
+ class: className = '',
23
+ children,
24
+ }: Props = $props();
25
+ </script>
26
+
27
+ <div
28
+ class="lite-step-wizard {className}"
29
+ data-svadmin-component="LiteStepWizard"
30
+ data-current-step={currentStep}
31
+ >
32
+ <nav class="lite-steps-nav" aria-label="Wizard Steps">
33
+ <ol class="lite-steps-list">
34
+ {#each steps as step, idx (step.id)}
35
+ {@const isDone = idx < currentStep}
36
+ {@const isCurrent = idx === currentStep}
37
+ <li
38
+ class="lite-step-item"
39
+ class:lite-step-done={isDone}
40
+ class:lite-step-active={isCurrent}
41
+ >
42
+ <span class="lite-step-badge">
43
+ {#if isDone}✓{:else}{idx + 1}{/if}
44
+ </span>
45
+ <span class="lite-step-info">
46
+ <span class="lite-step-title">{step.title}</span>
47
+ {#if step.description}
48
+ <span class="lite-step-desc">{step.description}</span>
49
+ {/if}
50
+ </span>
51
+ {#if idx < steps.length - 1}
52
+ <span class="lite-step-divider" aria-hidden="true"></span>
53
+ {/if}
54
+ </li>
55
+ {/each}
56
+ </ol>
57
+ </nav>
58
+
59
+ <div class="lite-step-body">
60
+ {#if children}{@render children()}{/if}
61
+ </div>
62
+
63
+ {#if action}
64
+ <form {action} method="POST" class="lite-step-actions">
65
+ <input type="hidden" name="currentStep" value={currentStep} />
66
+ {#if currentStep > 0}
67
+ <button type="submit" name="direction" value="prev" class="lite-btn-secondary">上一步</button>
68
+ {/if}
69
+ <button type="submit" name="direction" value="next" class="lite-btn-primary">
70
+ {currentStep >= steps.length - 1 ? '提交完成' : '下一步'}
71
+ </button>
72
+ </form>
73
+ {/if}
74
+ </div>
75
+
76
+ <style>
77
+ .lite-step-wizard { border: 1px solid #e5e6eb; border-radius: 8px; background: #ffffff; padding: 20px; }
78
+ .lite-steps-nav { margin-bottom: 24px; border-bottom: 1px solid #f2f3f5; padding-bottom: 16px; }
79
+ .lite-steps-list { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
80
+ .lite-step-item { display: flex; align-items: center; flex: 1; }
81
+ .lite-step-item > * + * { margin-left: 8px; }
82
+ .lite-step-badge {
83
+ width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center;
84
+ justify-content: center; font-size: 12px; font-weight: 700; background: #f2f3f5; color: #4e5969;
85
+ }
86
+ .lite-step-done .lite-step-badge { background: #00b42a; color: #fff; }
87
+ .lite-step-active .lite-step-badge { background: #165dff; color: #fff; }
88
+ .lite-step-info { display: flex; flex-direction: column; }
89
+ .lite-step-title { font-size: 13px; font-weight: 600; color: #1d2129; }
90
+ .lite-step-desc { font-size: 11px; color: #86909c; }
91
+ .lite-step-divider { flex: 1; height: 1px; background: #e5e6eb; margin: 0 12px; }
92
+ .lite-step-done .lite-step-divider { background: #00b42a; }
93
+ .lite-step-body { min-height: 120px; }
94
+ .lite-step-actions { display: flex; justify-content: flex-end; margin-top: 20px; border-top: 1px solid #f2f3f5; padding-top: 16px; }
95
+ .lite-step-actions > * + * { margin-left: 12px; }
96
+ .lite-btn-primary { padding: 6px 16px; background: #165dff; color: #fff; border: none; border-radius: 4px; font-size: 12px; cursor: pointer; }
97
+ .lite-btn-secondary { padding: 6px 16px; background: #f2f3f5; color: #4e5969; border: 1px solid #e5e6eb; border-radius: 4px; font-size: 12px; cursor: pointer; }
98
+ </style>
@@ -0,0 +1,16 @@
1
+ import type { Snippet } from 'svelte';
2
+ export interface LiteStepItem {
3
+ id: string;
4
+ title: string;
5
+ description?: string;
6
+ }
7
+ interface Props {
8
+ steps: LiteStepItem[];
9
+ currentStep?: number;
10
+ action?: string;
11
+ class?: string;
12
+ children?: Snippet;
13
+ }
14
+ declare const LiteStepWizard: import("svelte").Component<Props, {}, "">;
15
+ type LiteStepWizard = ReturnType<typeof LiteStepWizard>;
16
+ export default LiteStepWizard;
@@ -0,0 +1,88 @@
1
+ <script lang="ts">
2
+ interface Props {
3
+ resourceName?: string;
4
+ currentUsage?: number;
5
+ hardLimit?: number;
6
+ unit?: string;
7
+ estimatedDaysRemaining?: number;
8
+ class?: string;
9
+ }
10
+
11
+ let {
12
+ resourceName = 'PostgreSQL 云数据库存储空间',
13
+ currentUsage = 920,
14
+ hardLimit = 1000,
15
+ unit = 'GB',
16
+ estimatedDaysRemaining = 14,
17
+ class: className = '',
18
+ }: Props = $props();
19
+
20
+ const pct = $derived(hardLimit > 0 ? Math.min(100, Math.round((currentUsage / hardLimit) * 100)) : 0);
21
+ </script>
22
+
23
+ <div
24
+ class="lite-capacity-card {className}"
25
+ data-svadmin-component="LiteSystemCapacityForecastCard"
26
+ role="region"
27
+ aria-label="System Capacity Forecast"
28
+ >
29
+ <header class="lite-cap-header">
30
+ <div>
31
+ <span class="lite-cap-label">容量趋势预测</span>
32
+ <h4 class="lite-cap-name">{resourceName}</h4>
33
+ </div>
34
+ <span class="lite-cap-countdown">预计 {estimatedDaysRemaining} 天后达上限</span>
35
+ </header>
36
+
37
+ <div class="lite-cap-body">
38
+ <div class="lite-cap-metrics">
39
+ <span class="lite-cap-val font-mono">{currentUsage}</span>
40
+ <span class="lite-cap-max">/ {hardLimit} {unit} ({pct}%)</span>
41
+ </div>
42
+ <div class="lite-cap-track">
43
+ <div
44
+ class="lite-cap-bar"
45
+ class:lite-bar-warn={pct >= 75 && pct < 90}
46
+ class:lite-bar-danger={pct >= 90}
47
+ style="width: {pct}%;"
48
+ ></div>
49
+ </div>
50
+ </div>
51
+ </div>
52
+
53
+ <style>
54
+ .lite-capacity-card {
55
+ border: 1px solid #e5e6eb;
56
+ border-radius: 6px;
57
+ background: #ffffff;
58
+ font-size: 12px;
59
+ overflow: hidden;
60
+ }
61
+ .lite-cap-header {
62
+ display: flex;
63
+ justify-content: space-between;
64
+ align-items: flex-start;
65
+ padding: 10px 14px;
66
+ background: #f7f8fa;
67
+ border-bottom: 1px solid #e5e6eb;
68
+ }
69
+ .lite-cap-label { font-size: 10px; color: #86909c; }
70
+ .lite-cap-name { margin: 2px 0 0; font-size: 13px; font-weight: 600; color: #1d2129; }
71
+ .lite-cap-countdown {
72
+ font-size: 10px;
73
+ font-weight: 600;
74
+ color: #f53f3f;
75
+ background: #ffece8;
76
+ padding: 2px 6px;
77
+ border-radius: 3px;
78
+ }
79
+ .lite-cap-body { padding: 12px 14px; }
80
+ .lite-cap-metrics { margin-bottom: 6px; font-size: 12px; }
81
+ .lite-cap-val { font-size: 18px; font-weight: 700; color: #1d2129; }
82
+ .font-mono { font-family: monospace; }
83
+ .lite-cap-max { color: #86909c; margin-left: 4px; }
84
+ .lite-cap-track { height: 6px; background: #f2f3f5; border-radius: 3px; overflow: hidden; }
85
+ .lite-cap-bar { height: 100%; background: #165dff; border-radius: 3px; }
86
+ .lite-bar-warn { background: #ff7d00; }
87
+ .lite-bar-danger { background: #f53f3f; }
88
+ </style>
@@ -0,0 +1,11 @@
1
+ interface Props {
2
+ resourceName?: string;
3
+ currentUsage?: number;
4
+ hardLimit?: number;
5
+ unit?: string;
6
+ estimatedDaysRemaining?: number;
7
+ class?: string;
8
+ }
9
+ declare const LiteSystemCapacityForecastCard: import("svelte").Component<Props, {}, "">;
10
+ type LiteSystemCapacityForecastCard = ReturnType<typeof LiteSystemCapacityForecastCard>;
11
+ export default LiteSystemCapacityForecastCard;
@@ -0,0 +1,142 @@
1
+ <script lang="ts">
2
+ interface ServiceItem {
3
+ id: string;
4
+ name: string;
5
+ endpoint: string;
6
+ status: 'healthy' | 'degraded' | 'unhealthy';
7
+ latencyMs: number;
8
+ details?: string;
9
+ }
10
+
11
+ interface Props {
12
+ title?: string;
13
+ environment?: string;
14
+ version?: string;
15
+ services?: ServiceItem[];
16
+ class?: string;
17
+ }
18
+
19
+ let {
20
+ title = '系统链路健康自检大盘',
21
+ environment = 'production-east-01',
22
+ version = 'v2.8.4-enterprise',
23
+ services = [
24
+ { id: 's1', name: 'PostgreSQL 主数据库集群', endpoint: 'db.internal.svc:5432', status: 'healthy', latencyMs: 3, details: '连接池活跃度 18/100' },
25
+ { id: 's2', name: 'Redis 分布式缓存与锁', endpoint: 'redis-master.internal:6379', status: 'healthy', latencyMs: 1, details: '命中率 99.4%' },
26
+ { id: 's3', name: 'MinIO / S3 企业对象存储', endpoint: 's3.oss-cn-shanghai.internal', status: 'healthy', latencyMs: 18, details: '读写探测成功' },
27
+ { id: 's4', name: 'SupaAuth / SSO 统一鉴权', endpoint: 'auth.svadmin.internal/v1', status: 'healthy', latencyMs: 12, details: 'JWT 验签通畅' },
28
+ { id: 's5', name: 'RabbitMQ 异步事件消息队列', endpoint: 'mq-node1.cluster.internal:5672', status: 'degraded', latencyMs: 145, details: '死信队列堆积 42 条' }
29
+ ],
30
+ class: className = '',
31
+ }: Props = $props();
32
+
33
+ const healthyCount = $derived(services.filter(s => s.status === 'healthy').length);
34
+ const avgLatency = $derived(
35
+ services.length > 0 ? Math.round(services.reduce((a, b) => a + b.latencyMs, 0) / services.length) : 0
36
+ );
37
+ </script>
38
+
39
+ <div
40
+ class="lite-health-dash {className}"
41
+ data-svadmin-component="LiteSystemHealthCheckDashboard"
42
+ role="region"
43
+ aria-label="System Health Dashboard"
44
+ >
45
+ <header class="lite-health-header">
46
+ <div>
47
+ <h4 class="lite-health-title">{title}</h4>
48
+ <span class="lite-health-meta">环境: {environment} · 版本: {version}</span>
49
+ </div>
50
+ <div class="lite-health-kpi">
51
+ <span class="lite-kpi-pill">健康组件: <strong>{healthyCount}/{services.length}</strong></span>
52
+ <span class="lite-kpi-pill">平均延时: <strong class="font-mono">{avgLatency}ms</strong></span>
53
+ </div>
54
+ </header>
55
+
56
+ <div class="lite-health-table-wrap">
57
+ <table class="lite-health-table">
58
+ <thead>
59
+ <tr>
60
+ <th>服务组件名称</th>
61
+ <th>连接端点</th>
62
+ <th>链路状态</th>
63
+ <th>往返延时</th>
64
+ <th>检测指标详情</th>
65
+ </tr>
66
+ </thead>
67
+ <tbody>
68
+ {#each services as s (s.id)}
69
+ <tr>
70
+ <td class="lite-td-srvname">{s.name}</td>
71
+ <td class="lite-td-endpoint font-mono">{s.endpoint}</td>
72
+ <td>
73
+ <span
74
+ class="lite-status-pill"
75
+ class:lite-pill-healthy={s.status === 'healthy'}
76
+ class:lite-pill-warn={s.status === 'degraded'}
77
+ class:lite-pill-err={s.status === 'unhealthy'}
78
+ >
79
+ {s.status === 'healthy' ? '运行健康' : s.status === 'degraded' ? '性能亚健康' : '链路故障'}
80
+ </span>
81
+ </td>
82
+ <td class="lite-td-latency font-mono">{s.latencyMs} ms</td>
83
+ <td class="lite-td-detail">{s.details ?? '—'}</td>
84
+ </tr>
85
+ {/each}
86
+ </tbody>
87
+ </table>
88
+ </div>
89
+ </div>
90
+
91
+ <style>
92
+ .lite-health-dash {
93
+ border: 1px solid #e5e6eb;
94
+ border-radius: 6px;
95
+ background: #ffffff;
96
+ font-size: 12px;
97
+ overflow: hidden;
98
+ }
99
+ .lite-health-header {
100
+ display: flex;
101
+ justify-content: space-between;
102
+ align-items: center;
103
+ padding: 10px 14px;
104
+ background: #f7f8fa;
105
+ border-bottom: 1px solid #e5e6eb;
106
+ }
107
+ .lite-health-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
108
+ .lite-health-meta { font-size: 11px; color: #86909c; display: block; margin-top: 2px; }
109
+ .lite-health-kpi { display: flex; }
110
+ .lite-health-kpi > * + * { margin-left: 8px; }
111
+ .lite-kpi-pill { font-size: 11px; background: #ffffff; border: 1px solid #e5e6eb; padding: 2px 8px; border-radius: 4px; color: #4e5969; }
112
+ .lite-kpi-pill strong { color: #165dff; }
113
+ .lite-health-table-wrap { overflow-x: auto; }
114
+ .lite-health-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; }
115
+ .lite-health-table th {
116
+ padding: 8px 12px;
117
+ background: #f2f3f5;
118
+ border-bottom: 1px solid #e5e6eb;
119
+ color: #4e5969;
120
+ font-weight: 600;
121
+ }
122
+ .lite-health-table td {
123
+ padding: 8px 12px;
124
+ border-bottom: 1px solid #f2f3f5;
125
+ color: #1d2129;
126
+ }
127
+ .lite-td-srvname { font-weight: 600; }
128
+ .font-mono { font-family: monospace; }
129
+ .lite-td-endpoint { color: #4e5969; }
130
+ .lite-status-pill {
131
+ display: inline-block;
132
+ padding: 1px 6px;
133
+ border-radius: 3px;
134
+ font-size: 10px;
135
+ font-weight: 600;
136
+ }
137
+ .lite-pill-healthy { background: #e8ffea; color: #00b42a; }
138
+ .lite-pill-warn { background: #fff7e8; color: #ff7d00; }
139
+ .lite-pill-err { background: #ffece8; color: #f53f3f; }
140
+ .lite-td-latency { font-weight: 600; }
141
+ .lite-td-detail { color: #86909c; }
142
+ </style>
@@ -0,0 +1,18 @@
1
+ interface ServiceItem {
2
+ id: string;
3
+ name: string;
4
+ endpoint: string;
5
+ status: 'healthy' | 'degraded' | 'unhealthy';
6
+ latencyMs: number;
7
+ details?: string;
8
+ }
9
+ interface Props {
10
+ title?: string;
11
+ environment?: string;
12
+ version?: string;
13
+ services?: ServiceItem[];
14
+ class?: string;
15
+ }
16
+ declare const LiteSystemHealthCheckDashboard: import("svelte").Component<Props, {}, "">;
17
+ type LiteSystemHealthCheckDashboard = ReturnType<typeof LiteSystemHealthCheckDashboard>;
18
+ export default LiteSystemHealthCheckDashboard;
@@ -0,0 +1,76 @@
1
+ <script lang="ts">
2
+ interface AggItem {
3
+ label: string;
4
+ subtotal: string | number;
5
+ grandTotal: string | number;
6
+ }
7
+
8
+ interface Props {
9
+
10
+ aggregations?: AggItem[];
11
+ selectedCount?: number;
12
+ totalCount?: number;
13
+ class?: string;
14
+ }
15
+
16
+ let {
17
+
18
+ aggregations = [
19
+ { label: '订单总金额 (¥)', subtotal: '¥ 128,450.00', grandTotal: '¥ 1,489,200.00' },
20
+ { label: '已结算税额 (¥)', subtotal: '¥ 11,560.50', grandTotal: '¥ 134,028.00' },
21
+ { label: '商品总件数', subtotal: '450 件', grandTotal: '5,200 件' }
22
+ ],
23
+ selectedCount = 12,
24
+ totalCount = 140,
25
+ class: className = '',
26
+ }: Props = $props();
27
+ </script>
28
+
29
+ <div
30
+ class="lite-agg-footer {className}"
31
+ data-svadmin-component="LiteTableAggregationFooter"
32
+ role="region"
33
+ aria-label="Table Aggregation Footer"
34
+ >
35
+ <div class="lite-agg-left">
36
+ <span class="lite-agg-selection">已选 <strong class="lite-count">{selectedCount}</strong> 项 / 共 {totalCount} 条记录</span>
37
+ </div>
38
+
39
+ <div class="lite-agg-right">
40
+ {#each aggregations as agg (agg.label)}
41
+ <div class="lite-agg-cell">
42
+ <span class="lite-agg-label">{agg.label}</span>
43
+ <div class="lite-agg-vals">
44
+ <span class="lite-val-sub">选中小计: <strong>{agg.subtotal}</strong></span>
45
+ <span class="lite-val-total">全表合计: <strong>{agg.grandTotal}</strong></span>
46
+ </div>
47
+ </div>
48
+ {/each}
49
+ </div>
50
+ </div>
51
+
52
+ <style>
53
+ .lite-agg-footer {
54
+ border: 1px solid #e5e6eb;
55
+ border-radius: 6px;
56
+ background: #f7f8fa;
57
+ padding: 10px 14px;
58
+ font-size: 11px;
59
+ display: flex;
60
+ justify-content: space-between;
61
+ align-items: center;
62
+ flex-wrap: wrap;
63
+ }
64
+ .lite-agg-footer > * + * { margin-left: 12px; }
65
+ .lite-agg-left { color: #4e5969; }
66
+ .lite-count { color: #165dff; }
67
+ .lite-agg-right { display: flex; align-items: center; flex-wrap: wrap; }
68
+ .lite-agg-right > * + * { margin-left: 16px; }
69
+ .lite-agg-cell { display: flex; flex-direction: column; text-align: right; }
70
+ .lite-agg-cell > * + * { margin-top: 2px; }
71
+ .lite-agg-label { font-size: 10px; color: #86909c; font-weight: 500; }
72
+ .lite-agg-vals { display: flex; font-family: monospace; font-size: 11px; }
73
+ .lite-agg-vals > * + * { margin-left: 10px; }
74
+ .lite-val-sub strong { color: #165dff; }
75
+ .lite-val-total strong { color: #1d2129; }
76
+ </style>
@@ -0,0 +1,14 @@
1
+ interface AggItem {
2
+ label: string;
3
+ subtotal: string | number;
4
+ grandTotal: string | number;
5
+ }
6
+ interface Props {
7
+ aggregations?: AggItem[];
8
+ selectedCount?: number;
9
+ totalCount?: number;
10
+ class?: string;
11
+ }
12
+ declare const LiteTableAggregationFooter: import("svelte").Component<Props, {}, "">;
13
+ type LiteTableAggregationFooter = ReturnType<typeof LiteTableAggregationFooter>;
14
+ export default LiteTableAggregationFooter;
@@ -0,0 +1,173 @@
1
+ <script lang="ts">
2
+ export interface TenantRole {
3
+ id: string;
4
+ name: string;
5
+ isPrimary?: boolean;
6
+ }
7
+
8
+ export interface TenantItem {
9
+ id: string;
10
+ name: string;
11
+ code?: string;
12
+ type?: 'group' | 'subsidiary' | 'division' | 'store' | 'workspace';
13
+ logo?: string;
14
+ tier?: 'free' | 'pro' | 'enterprise';
15
+ roles?: (TenantRole | string)[];
16
+ status?: 'active' | 'suspended' | 'trial';
17
+ memberCount?: number;
18
+ description?: string;
19
+ parentId?: string;
20
+ }
21
+
22
+ interface Props {
23
+ currentTenantId?: string;
24
+ tenants?: TenantItem[];
25
+ userRole?: string;
26
+ class?: string;
27
+ }
28
+
29
+ let {
30
+ currentTenantId = 'tenant-corp-01',
31
+ tenants = [
32
+ { id: 'tenant-corp-01', name: '星谷数智总集团', code: 'HQ-GLOBAL', type: 'group', tier: 'enterprise' },
33
+ { id: 'tenant-east-02', name: '华东大区创新科技中心', code: 'DIV-EAST', type: 'subsidiary', tier: 'enterprise' },
34
+ ],
35
+ userRole = '全局系统主管',
36
+ class: className = '',
37
+ }: Props = $props();
38
+
39
+ const currentTenant = $derived(
40
+ tenants.find((t) => t.id === currentTenantId) ?? tenants[0]
41
+ );
42
+ </script>
43
+
44
+ <div
45
+ class="lite-tenant-switcher {className}"
46
+ data-svadmin-component="LiteTenantContextSwitcher"
47
+ role="region"
48
+ aria-label="Tenant Context Switcher"
49
+ >
50
+ <div class="lite-tenant-trigger">
51
+ <div class="lite-tenant-badge">
52
+ <span class="lite-tenant-icon">🏢</span>
53
+ </div>
54
+ <div class="lite-tenant-info">
55
+ <div class="lite-tenant-name-row">
56
+ <span class="lite-tenant-name">{currentTenant?.name ?? '当前租户'}</span>
57
+ {#if currentTenant?.tier}
58
+ <span class="lite-tier-tag">{currentTenant.tier}</span>
59
+ {/if}
60
+ </div>
61
+ <span class="lite-tenant-code">{currentTenant?.code ?? userRole}</span>
62
+ </div>
63
+ <span class="lite-caret">▼</span>
64
+ </div>
65
+
66
+ <div class="lite-tenant-noscript-list">
67
+ <span class="lite-list-title">可用组织与工作区 (SSR 降级静态展示):</span>
68
+ <ul class="lite-tenants-ul">
69
+ {#each tenants as t (t.id)}
70
+ <li class="lite-tenant-li" class:lite-tenant-active={t.id === currentTenantId}>
71
+ <span class="lite-tenant-bullet">•</span>
72
+ <span class="lite-tenant-li-name">{t.name}</span>
73
+ {#if t.code}<span class="lite-tenant-li-code">({t.code})</span>{/if}
74
+ {#if t.id === currentTenantId}<span class="lite-active-mark">[当前]</span>{/if}
75
+ </li>
76
+ {/each}
77
+ </ul>
78
+ </div>
79
+ </div>
80
+
81
+ <style>
82
+ .lite-tenant-switcher {
83
+ border: 1px solid #e5e6eb;
84
+ border-radius: 6px;
85
+ background: #ffffff;
86
+ font-size: 12px;
87
+ overflow: hidden;
88
+ padding: 8px 12px;
89
+ }
90
+ .lite-tenant-trigger {
91
+ display: flex;
92
+ align-items: center;
93
+ padding-bottom: 8px;
94
+ border-bottom: 1px dashed #e5e6eb;
95
+ }
96
+ .lite-tenant-badge {
97
+ width: 28px;
98
+ height: 28px;
99
+ border-radius: 4px;
100
+ background: #f2f3f5;
101
+ display: flex;
102
+ align-items: center;
103
+ justify-content: center;
104
+ font-size: 14px;
105
+ margin-right: 8px;
106
+ }
107
+ .lite-tenant-info {
108
+ flex: 1;
109
+ display: flex;
110
+ flex-direction: column;
111
+ }
112
+ .lite-tenant-name-row {
113
+ display: flex;
114
+ align-items: center;
115
+ }
116
+ .lite-tenant-name-row > * + * { margin-left: 6px; }
117
+ .lite-tenant-name {
118
+ font-weight: 600;
119
+ color: #1d2129;
120
+ margin-right: 6px;
121
+ }
122
+ .lite-tier-tag {
123
+ font-size: 9px;
124
+ background: #e8f3ff;
125
+ color: #165dff;
126
+ padding: 1px 4px;
127
+ border-radius: 2px;
128
+ text-transform: uppercase;
129
+ }
130
+ .lite-tenant-code {
131
+ font-size: 10px;
132
+ color: #86909c;
133
+ }
134
+ .lite-caret {
135
+ font-size: 10px;
136
+ color: #86909c;
137
+ margin-left: 8px;
138
+ }
139
+ .lite-tenant-noscript-list {
140
+ margin-top: 6px;
141
+ font-size: 11px;
142
+ color: #4e5969;
143
+ }
144
+ .lite-list-title {
145
+ font-size: 10px;
146
+ color: #86909c;
147
+ }
148
+ .lite-tenants-ul {
149
+ list-style: none;
150
+ padding: 0;
151
+ margin: 4px 0 0;
152
+ }
153
+ .lite-tenant-li {
154
+ display: flex;
155
+ align-items: center;
156
+ padding: 2px 0;
157
+ }
158
+ .lite-tenant-bullet {
159
+ margin-right: 4px;
160
+ }
161
+ .lite-tenant-li-code {
162
+ margin-left: 4px;
163
+ }
164
+ .lite-active-mark {
165
+ margin-left: 4px;
166
+ font-size: 10px;
167
+ color: #165dff;
168
+ }
169
+ .lite-tenant-active {
170
+ color: #165dff;
171
+ font-weight: 600;
172
+ }
173
+ </style>
@@ -0,0 +1,27 @@
1
+ export interface TenantRole {
2
+ id: string;
3
+ name: string;
4
+ isPrimary?: boolean;
5
+ }
6
+ export interface TenantItem {
7
+ id: string;
8
+ name: string;
9
+ code?: string;
10
+ type?: 'group' | 'subsidiary' | 'division' | 'store' | 'workspace';
11
+ logo?: string;
12
+ tier?: 'free' | 'pro' | 'enterprise';
13
+ roles?: (TenantRole | string)[];
14
+ status?: 'active' | 'suspended' | 'trial';
15
+ memberCount?: number;
16
+ description?: string;
17
+ parentId?: string;
18
+ }
19
+ interface Props {
20
+ currentTenantId?: string;
21
+ tenants?: TenantItem[];
22
+ userRole?: string;
23
+ class?: string;
24
+ }
25
+ declare const LiteTenantContextSwitcher: import("svelte").Component<Props, {}, "">;
26
+ type LiteTenantContextSwitcher = ReturnType<typeof LiteTenantContextSwitcher>;
27
+ export default LiteTenantContextSwitcher;