@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.
- package/dist/components/LiteAbacPolicyMatrix.svelte +128 -0
- package/dist/components/LiteAbacPolicyMatrix.svelte.d.ts +16 -0
- package/dist/components/LiteAnnouncementBanner.svelte +88 -0
- package/dist/components/LiteAnnouncementBanner.svelte.d.ts +12 -0
- package/dist/components/LiteApiPlayground.svelte +103 -0
- package/dist/components/LiteApiPlayground.svelte.d.ts +10 -0
- package/dist/components/LiteApprovalChainBuilder.svelte +120 -0
- package/dist/components/LiteApprovalChainBuilder.svelte.d.ts +15 -0
- package/dist/components/LiteAsyncExportModal.svelte +113 -0
- package/dist/components/LiteAsyncExportModal.svelte.d.ts +14 -0
- package/dist/components/LiteAuditTrailInspector.svelte +166 -0
- package/dist/components/LiteAuditTrailInspector.svelte.d.ts +23 -0
- package/dist/components/LiteBillingInvoiceDrawer.svelte +100 -0
- package/dist/components/LiteBillingInvoiceDrawer.svelte.d.ts +16 -0
- package/dist/components/LiteChartAnnotationOverlay.svelte +101 -0
- package/dist/components/LiteChartAnnotationOverlay.svelte.d.ts +16 -0
- package/dist/components/LiteColumnMappingTable.svelte +105 -0
- package/dist/components/LiteColumnMappingTable.svelte.d.ts +14 -0
- package/dist/components/LiteContextMenu.svelte +114 -0
- package/dist/components/LiteContextMenu.svelte.d.ts +18 -0
- package/dist/components/LiteDashboardGridLayout.svelte +108 -0
- package/dist/components/LiteDashboardGridLayout.svelte.d.ts +16 -0
- package/dist/components/LiteDashboardLayoutStorage.svelte +88 -0
- package/dist/components/LiteDashboardLayoutStorage.svelte.d.ts +16 -0
- package/dist/components/LiteDataImportDropzone.svelte +89 -0
- package/dist/components/LiteDataImportDropzone.svelte.d.ts +10 -0
- package/dist/components/LiteDataLineageGraph.svelte +100 -0
- package/dist/components/LiteDataLineageGraph.svelte.d.ts +15 -0
- package/dist/components/LiteDataMaskPolicyEngine.svelte +131 -0
- package/dist/components/LiteDataMaskPolicyEngine.svelte.d.ts +16 -0
- package/dist/components/LiteDataScreenContainer.svelte +34 -0
- package/dist/components/LiteDataScreenContainer.svelte.d.ts +9 -0
- package/dist/components/LiteDualApprovalGate.svelte +58 -0
- package/dist/components/LiteDualApprovalGate.svelte.d.ts +11 -0
- package/dist/components/LiteElectronicSealStamp.svelte +56 -0
- package/dist/components/LiteElectronicSealStamp.svelte.d.ts +9 -0
- package/dist/components/LiteEnvVariableEditor.svelte +114 -0
- package/dist/components/LiteEnvVariableEditor.svelte.d.ts +15 -0
- package/dist/components/LiteFormulaField.svelte +44 -0
- package/dist/components/LiteFormulaField.svelte.d.ts +11 -0
- package/dist/components/LiteGeoScatterMap.svelte +117 -0
- package/dist/components/LiteGeoScatterMap.svelte.d.ts +16 -0
- package/dist/components/LiteHmacSignatureCalculator.svelte +84 -0
- package/dist/components/LiteHmacSignatureCalculator.svelte.d.ts +10 -0
- package/dist/components/LiteImportPreviewValidator.svelte +136 -0
- package/dist/components/LiteImportPreviewValidator.svelte.d.ts +16 -0
- package/dist/components/LiteJsonViewer.svelte +88 -0
- package/dist/components/LiteJsonViewer.svelte.d.ts +9 -0
- package/dist/components/LiteKeyboardShortcutsModal.svelte +56 -0
- package/dist/components/LiteKeyboardShortcutsModal.svelte.d.ts +13 -0
- package/dist/components/LiteKpiCard.svelte +169 -0
- package/dist/components/LiteKpiCard.svelte.d.ts +25 -0
- package/dist/components/LiteLiveStreamLogViewer.svelte +84 -0
- package/dist/components/LiteLiveStreamLogViewer.svelte.d.ts +14 -0
- package/dist/components/LiteOmnibarCommandPalette.svelte +111 -0
- package/dist/components/LiteOmnibarCommandPalette.svelte.d.ts +15 -0
- package/dist/components/LitePeriodComparisonCard.svelte +60 -0
- package/dist/components/LitePeriodComparisonCard.svelte.d.ts +11 -0
- package/dist/components/LitePermissionSimulator.svelte +90 -0
- package/dist/components/LitePermissionSimulator.svelte.d.ts +14 -0
- package/dist/components/LitePivotMatrix.svelte +138 -0
- package/dist/components/LitePivotMatrix.svelte.d.ts +18 -0
- package/dist/components/LitePlanUsageQuotaBar.svelte +96 -0
- package/dist/components/LitePlanUsageQuotaBar.svelte.d.ts +15 -0
- package/dist/components/LiteQueryAiExplainer.svelte +85 -0
- package/dist/components/LiteQueryAiExplainer.svelte.d.ts +10 -0
- package/dist/components/LiteResultPage.svelte +135 -0
- package/dist/components/LiteResultPage.svelte.d.ts +17 -0
- package/dist/components/LiteScheduledJobManager.svelte +116 -0
- package/dist/components/LiteScheduledJobManager.svelte.d.ts +16 -0
- package/dist/components/LiteScreenAntiLeakGuard.svelte +56 -0
- package/dist/components/LiteScreenAntiLeakGuard.svelte.d.ts +8 -0
- package/dist/components/LiteSecureDataExporter.svelte +101 -0
- package/dist/components/LiteSecureDataExporter.svelte.d.ts +12 -0
- package/dist/components/LiteSensitiveDataMask.svelte +34 -2
- package/dist/components/LiteSensitiveDataMask.svelte.d.ts +1 -2
- package/dist/components/LiteSqlConsole.svelte +128 -0
- package/dist/components/LiteSqlConsole.svelte.d.ts +16 -0
- package/dist/components/LiteStepWizard.svelte +98 -0
- package/dist/components/LiteStepWizard.svelte.d.ts +16 -0
- package/dist/components/LiteSystemCapacityForecastCard.svelte +88 -0
- package/dist/components/LiteSystemCapacityForecastCard.svelte.d.ts +11 -0
- package/dist/components/LiteSystemHealthCheckDashboard.svelte +142 -0
- package/dist/components/LiteSystemHealthCheckDashboard.svelte.d.ts +18 -0
- package/dist/components/LiteTableAggregationFooter.svelte +76 -0
- package/dist/components/LiteTableAggregationFooter.svelte.d.ts +14 -0
- package/dist/components/LiteTenantContextSwitcher.svelte +173 -0
- package/dist/components/LiteTenantContextSwitcher.svelte.d.ts +27 -0
- package/dist/components/LiteTenantQuotasMatrix.svelte +117 -0
- package/dist/components/LiteTenantQuotasMatrix.svelte.d.ts +17 -0
- package/dist/components/LiteTextDiffViewer.svelte +111 -0
- package/dist/components/LiteTextDiffViewer.svelte.d.ts +10 -0
- package/dist/components/LiteThreadedCommentDrawer.svelte +60 -0
- package/dist/components/LiteThreadedCommentDrawer.svelte.d.ts +15 -0
- package/dist/components/LiteTierFeatureComparison.svelte +97 -0
- package/dist/components/LiteTierFeatureComparison.svelte.d.ts +18 -0
- package/dist/components/LiteUnsavedChangesGuard.svelte +53 -0
- package/dist/components/LiteUnsavedChangesGuard.svelte.d.ts +10 -0
- package/dist/components/LiteWatermarkContainer.svelte +58 -0
- package/dist/components/LiteWatermarkContainer.svelte.d.ts +9 -0
- package/dist/components/LiteWebhookSimulator.svelte +120 -0
- package/dist/components/LiteWebhookSimulator.svelte.d.ts +11 -0
- package/dist/components/LiteWorkflowNodeInspector.svelte +79 -0
- package/dist/components/LiteWorkflowNodeInspector.svelte.d.ts +11 -0
- package/dist/components/LiteWorkflowStepper.svelte +56 -0
- package/dist/components/LiteWorkflowStepper.svelte.d.ts +14 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.js +61 -0
- package/package.json +2 -2
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export interface AuditEventItem {
|
|
3
|
+
id: string;
|
|
4
|
+
timestamp: string;
|
|
5
|
+
actor: { name: string; ip?: string; role?: string };
|
|
6
|
+
action: string;
|
|
7
|
+
actionLabel: string;
|
|
8
|
+
resource: string;
|
|
9
|
+
severity?: 'info' | 'warning' | 'critical';
|
|
10
|
+
status: 'success' | 'failure' | 'blocked';
|
|
11
|
+
traceId?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface Props {
|
|
15
|
+
events?: AuditEventItem[];
|
|
16
|
+
title?: string;
|
|
17
|
+
class?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
let {
|
|
21
|
+
events = [
|
|
22
|
+
{
|
|
23
|
+
id: 'evt-aud-1091',
|
|
24
|
+
timestamp: '2026-11-12 10:24:18',
|
|
25
|
+
actor: { name: '李思远 (运营主管)', ip: '192.168.10.42', role: 'SecOps Auditor' },
|
|
26
|
+
action: 'tenant_switch',
|
|
27
|
+
actionLabel: '切换工作区租户',
|
|
28
|
+
resource: 'TenantContext',
|
|
29
|
+
severity: 'info',
|
|
30
|
+
status: 'success',
|
|
31
|
+
traceId: 'trc-9821-fa44-a1',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: 'evt-aud-1090',
|
|
35
|
+
timestamp: '2026-11-12 09:58:30',
|
|
36
|
+
actor: { name: '赵宏 (财务总监)', ip: '10.8.0.12', role: 'Finance Admin' },
|
|
37
|
+
action: 'permission_grant',
|
|
38
|
+
actionLabel: '跨组织提权审批',
|
|
39
|
+
resource: 'RolePermission',
|
|
40
|
+
severity: 'critical',
|
|
41
|
+
status: 'success',
|
|
42
|
+
traceId: 'trc-8820-cb91-e4',
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
title = '全局操作审计追踪中心 (SSR 降级表格)',
|
|
46
|
+
class: className = '',
|
|
47
|
+
}: Props = $props();
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<div
|
|
51
|
+
class="lite-audit-inspector {className}"
|
|
52
|
+
data-svadmin-component="LiteAuditTrailInspector"
|
|
53
|
+
role="region"
|
|
54
|
+
aria-label="Audit Trail Inspector"
|
|
55
|
+
>
|
|
56
|
+
<header class="lite-audit-header">
|
|
57
|
+
<div class="lite-audit-title-row">
|
|
58
|
+
<span class="lite-shield-icon">🛡️</span>
|
|
59
|
+
<h4 class="lite-audit-title">{title}</h4>
|
|
60
|
+
</div>
|
|
61
|
+
<span class="lite-audit-count">共 {events.length} 条审计日志</span>
|
|
62
|
+
</header>
|
|
63
|
+
|
|
64
|
+
<div class="lite-audit-table-wrap">
|
|
65
|
+
<table class="lite-audit-table">
|
|
66
|
+
<thead>
|
|
67
|
+
<tr>
|
|
68
|
+
<th>时间</th>
|
|
69
|
+
<th>操作人</th>
|
|
70
|
+
<th>动作与资源</th>
|
|
71
|
+
<th>级别</th>
|
|
72
|
+
<th>执行状态</th>
|
|
73
|
+
<th>追踪链路</th>
|
|
74
|
+
</tr>
|
|
75
|
+
</thead>
|
|
76
|
+
<tbody>
|
|
77
|
+
{#each events as evt (evt.id)}
|
|
78
|
+
<tr>
|
|
79
|
+
<td class="font-mono">{evt.timestamp}</td>
|
|
80
|
+
<td>
|
|
81
|
+
<span class="lite-actor-name">{evt.actor.name}</span>
|
|
82
|
+
{#if evt.actor.ip}<span class="lite-actor-ip font-mono">({evt.actor.ip})</span>{/if}
|
|
83
|
+
</td>
|
|
84
|
+
<td>
|
|
85
|
+
<span class="lite-action-label">{evt.actionLabel}</span>
|
|
86
|
+
<span class="lite-target-res">[{evt.resource}]</span>
|
|
87
|
+
</td>
|
|
88
|
+
<td>
|
|
89
|
+
<span
|
|
90
|
+
class="lite-sev-badge"
|
|
91
|
+
class:lite-sev-critical={evt.severity === 'critical'}
|
|
92
|
+
class:lite-sev-warning={evt.severity === 'warning'}
|
|
93
|
+
class:lite-sev-info={evt.severity === 'info'}
|
|
94
|
+
>
|
|
95
|
+
{evt.severity ?? 'info'}
|
|
96
|
+
</span>
|
|
97
|
+
</td>
|
|
98
|
+
<td>
|
|
99
|
+
<span
|
|
100
|
+
class="lite-status-badge"
|
|
101
|
+
class:lite-status-blocked={evt.status === 'blocked'}
|
|
102
|
+
class:lite-status-success={evt.status === 'success'}
|
|
103
|
+
>
|
|
104
|
+
{evt.status}
|
|
105
|
+
</span>
|
|
106
|
+
</td>
|
|
107
|
+
<td class="font-mono text-muted">{evt.traceId ?? '-'}</td>
|
|
108
|
+
</tr>
|
|
109
|
+
{/each}
|
|
110
|
+
</tbody>
|
|
111
|
+
</table>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<style>
|
|
116
|
+
.lite-audit-inspector {
|
|
117
|
+
border: 1px solid #e5e6eb;
|
|
118
|
+
border-radius: 6px;
|
|
119
|
+
background: #ffffff;
|
|
120
|
+
font-size: 12px;
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
}
|
|
123
|
+
.lite-audit-header {
|
|
124
|
+
display: flex;
|
|
125
|
+
justify-content: space-between;
|
|
126
|
+
align-items: center;
|
|
127
|
+
padding: 10px 14px;
|
|
128
|
+
background: #f7f8fa;
|
|
129
|
+
border-bottom: 1px solid #e5e6eb;
|
|
130
|
+
}
|
|
131
|
+
.lite-audit-title-row { display: flex; align-items: center; }
|
|
132
|
+
.lite-shield-icon { font-size: 14px; margin-right: 6px; }
|
|
133
|
+
.lite-audit-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
|
|
134
|
+
.lite-audit-count { font-size: 11px; color: #86909c; }
|
|
135
|
+
.lite-audit-table-wrap { overflow-x: auto; }
|
|
136
|
+
.lite-audit-table {
|
|
137
|
+
width: 100%;
|
|
138
|
+
border-collapse: collapse;
|
|
139
|
+
font-size: 12px;
|
|
140
|
+
text-align: left;
|
|
141
|
+
}
|
|
142
|
+
.lite-audit-table th, .lite-audit-table td {
|
|
143
|
+
padding: 8px 12px;
|
|
144
|
+
border-bottom: 1px solid #f2f3f5;
|
|
145
|
+
}
|
|
146
|
+
.lite-audit-table th { background: #fafafa; font-weight: 600; color: #4e5969; font-size: 11px; }
|
|
147
|
+
.font-mono { font-family: monospace; font-size: 11px; }
|
|
148
|
+
.text-muted { color: #86909c; }
|
|
149
|
+
.lite-actor-name { font-weight: 500; color: #1d2129; }
|
|
150
|
+
.lite-actor-ip { font-size: 10px; color: #86909c; margin-left: 4px; }
|
|
151
|
+
.lite-action-label { font-weight: 500; color: #165dff; }
|
|
152
|
+
.lite-target-res { font-size: 10px; color: #86909c; margin-left: 4px; }
|
|
153
|
+
.lite-sev-badge {
|
|
154
|
+
font-size: 10px;
|
|
155
|
+
padding: 1px 4px;
|
|
156
|
+
border-radius: 2px;
|
|
157
|
+
text-transform: uppercase;
|
|
158
|
+
font-weight: 600;
|
|
159
|
+
}
|
|
160
|
+
.lite-sev-critical { background: #ffece8; color: #f53f3f; }
|
|
161
|
+
.lite-sev-warning { background: #fff7e8; color: #ff7d00; }
|
|
162
|
+
.lite-sev-info { background: #e8f3ff; color: #165dff; }
|
|
163
|
+
.lite-status-badge { font-size: 11px; font-weight: 500; }
|
|
164
|
+
.lite-status-success { color: #00b42a; }
|
|
165
|
+
.lite-status-blocked { color: #f53f3f; font-weight: 600; }
|
|
166
|
+
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface AuditEventItem {
|
|
2
|
+
id: string;
|
|
3
|
+
timestamp: string;
|
|
4
|
+
actor: {
|
|
5
|
+
name: string;
|
|
6
|
+
ip?: string;
|
|
7
|
+
role?: string;
|
|
8
|
+
};
|
|
9
|
+
action: string;
|
|
10
|
+
actionLabel: string;
|
|
11
|
+
resource: string;
|
|
12
|
+
severity?: 'info' | 'warning' | 'critical';
|
|
13
|
+
status: 'success' | 'failure' | 'blocked';
|
|
14
|
+
traceId?: string;
|
|
15
|
+
}
|
|
16
|
+
interface Props {
|
|
17
|
+
events?: AuditEventItem[];
|
|
18
|
+
title?: string;
|
|
19
|
+
class?: string;
|
|
20
|
+
}
|
|
21
|
+
declare const LiteAuditTrailInspector: import("svelte").Component<Props, {}, "">;
|
|
22
|
+
type LiteAuditTrailInspector = ReturnType<typeof LiteAuditTrailInspector>;
|
|
23
|
+
export default LiteAuditTrailInspector;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface BillItem {
|
|
3
|
+
name: string;
|
|
4
|
+
amount: string | number;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
invoiceNo?: string;
|
|
9
|
+
period?: string;
|
|
10
|
+
totalAmount?: string | number;
|
|
11
|
+
status?: string;
|
|
12
|
+
items?: BillItem[];
|
|
13
|
+
downloadUrl?: string;
|
|
14
|
+
class?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let {
|
|
18
|
+
invoiceNo = 'INV-202611-001',
|
|
19
|
+
period = '2026-10',
|
|
20
|
+
totalAmount = '¥12,500',
|
|
21
|
+
status = 'paid',
|
|
22
|
+
items = [
|
|
23
|
+
{ name: 'SaaS Monthly License', amount: '¥10,000' },
|
|
24
|
+
{ name: 'Extra Storage Usage', amount: '¥2,500' },
|
|
25
|
+
],
|
|
26
|
+
downloadUrl,
|
|
27
|
+
class: className = '',
|
|
28
|
+
}: Props = $props();
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<div
|
|
32
|
+
class="lite-invoice-card {className}"
|
|
33
|
+
data-svadmin-component="LiteBillingInvoiceDrawer"
|
|
34
|
+
role="region"
|
|
35
|
+
aria-label="Billing Invoice Details"
|
|
36
|
+
>
|
|
37
|
+
<header class="lite-inv-header">
|
|
38
|
+
<div>
|
|
39
|
+
<span class="lite-inv-no">账单 #{invoiceNo}</span>
|
|
40
|
+
<span class="lite-inv-period">({period})</span>
|
|
41
|
+
</div>
|
|
42
|
+
<span class="lite-inv-status lite-status-{status.toLowerCase()}">{status.toUpperCase()}</span>
|
|
43
|
+
</header>
|
|
44
|
+
|
|
45
|
+
<div class="lite-inv-body">
|
|
46
|
+
<div class="lite-inv-total">
|
|
47
|
+
<span class="lite-total-label">结算总金额:</span>
|
|
48
|
+
<strong class="lite-total-val">{totalAmount}</strong>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
{#if items.length > 0}
|
|
52
|
+
<ul class="lite-inv-items">
|
|
53
|
+
{#each items as item (item.name)}
|
|
54
|
+
<li>
|
|
55
|
+
<span>{item.name}</span>
|
|
56
|
+
<span class="lite-item-amt">{item.amount}</span>
|
|
57
|
+
</li>
|
|
58
|
+
{/each}
|
|
59
|
+
</ul>
|
|
60
|
+
{/if}
|
|
61
|
+
|
|
62
|
+
{#if downloadUrl}
|
|
63
|
+
<div class="lite-inv-action">
|
|
64
|
+
<a href={downloadUrl} class="lite-inv-download">下载发票 (PDF)</a>
|
|
65
|
+
</div>
|
|
66
|
+
{/if}
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<style>
|
|
71
|
+
.lite-invoice-card {
|
|
72
|
+
border: 1px solid #e5e6eb;
|
|
73
|
+
border-radius: 6px;
|
|
74
|
+
background: #ffffff;
|
|
75
|
+
font-size: 12px;
|
|
76
|
+
overflow: hidden;
|
|
77
|
+
}
|
|
78
|
+
.lite-inv-header {
|
|
79
|
+
display: flex;
|
|
80
|
+
justify-content: space-between;
|
|
81
|
+
align-items: center;
|
|
82
|
+
padding: 10px 14px;
|
|
83
|
+
background: #f7f8fa;
|
|
84
|
+
border-bottom: 1px solid #e5e6eb;
|
|
85
|
+
}
|
|
86
|
+
.lite-inv-no { font-weight: 700; font-family: monospace; color: #1d2129; }
|
|
87
|
+
.lite-inv-period { color: #86909c; font-size: 11px; margin-left: 4px; }
|
|
88
|
+
.lite-inv-status { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 3px; font-family: monospace; }
|
|
89
|
+
.lite-status-paid { background: #e8ffea; color: #00b42a; }
|
|
90
|
+
.lite-status-pending { background: #fff7e8; color: #ff7d00; }
|
|
91
|
+
.lite-inv-body { padding: 12px 14px; }
|
|
92
|
+
.lite-inv-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px dashed #e5e6eb; }
|
|
93
|
+
.lite-total-label { color: #4e5969; }
|
|
94
|
+
.lite-total-val { font-size: 16px; color: #165dff; font-family: monospace; }
|
|
95
|
+
.lite-inv-items { list-style: none; margin: 0 0 10px; padding: 0; }
|
|
96
|
+
.lite-inv-items li { display: flex; justify-content: space-between; padding: 4px 0; color: #4e5969; font-size: 11px; }
|
|
97
|
+
.lite-item-amt { font-family: monospace; font-weight: 600; color: #1d2129; }
|
|
98
|
+
.lite-inv-action { text-align: right; margin-top: 8px; }
|
|
99
|
+
.lite-inv-download { display: inline-block; padding: 4px 10px; background: #165dff; color: #ffffff; text-decoration: none; border-radius: 4px; font-weight: 500; font-size: 11px; }
|
|
100
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface BillItem {
|
|
2
|
+
name: string;
|
|
3
|
+
amount: string | number;
|
|
4
|
+
}
|
|
5
|
+
interface Props {
|
|
6
|
+
invoiceNo?: string;
|
|
7
|
+
period?: string;
|
|
8
|
+
totalAmount?: string | number;
|
|
9
|
+
status?: string;
|
|
10
|
+
items?: BillItem[];
|
|
11
|
+
downloadUrl?: string;
|
|
12
|
+
class?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const LiteBillingInvoiceDrawer: import("svelte").Component<Props, {}, "">;
|
|
15
|
+
type LiteBillingInvoiceDrawer = ReturnType<typeof LiteBillingInvoiceDrawer>;
|
|
16
|
+
export default LiteBillingInvoiceDrawer;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export interface ChartAnnotationItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
timestamp?: string;
|
|
7
|
+
valueLabel?: string;
|
|
8
|
+
colorTone?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
title?: string;
|
|
13
|
+
annotations?: ChartAnnotationItem[];
|
|
14
|
+
class?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let {
|
|
18
|
+
title = '业务大事件与异常指标标记层 (SSR 静态列表)',
|
|
19
|
+
annotations = [
|
|
20
|
+
{ id: 'a1', label: 'v2.4.0 核心版本全量发布', type: 'release', timestamp: '2026-11-10 14:00', valueLabel: 'QPS +35%', colorTone: 'primary' },
|
|
21
|
+
{ id: 'a2', label: '华东大区机房瞬态抖动', type: 'incident', timestamp: '2026-11-11 03:15', valueLabel: '延迟 120ms', colorTone: 'destructive' },
|
|
22
|
+
{ id: 'a3', label: '双十一运营大促高峰开幕', type: 'event', timestamp: '2026-11-11 20:00', valueLabel: '成交 ¥18M', colorTone: 'warning' },
|
|
23
|
+
],
|
|
24
|
+
class: className = '',
|
|
25
|
+
}: Props = $props();
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<div
|
|
29
|
+
class="lite-chart-annotation {className}"
|
|
30
|
+
data-svadmin-component="LiteChartAnnotationOverlay"
|
|
31
|
+
role="region"
|
|
32
|
+
aria-label="Chart Annotation Overlay"
|
|
33
|
+
>
|
|
34
|
+
<header class="lite-ann-header">
|
|
35
|
+
<div class="lite-ann-title-row">
|
|
36
|
+
<span class="lite-ann-icon">🏷️</span>
|
|
37
|
+
<h4 class="lite-ann-title">{title}</h4>
|
|
38
|
+
</div>
|
|
39
|
+
<span class="lite-ann-count">共 {annotations.length} 个事件标记</span>
|
|
40
|
+
</header>
|
|
41
|
+
|
|
42
|
+
<div class="lite-ann-body">
|
|
43
|
+
<div class="lite-ann-timeline">
|
|
44
|
+
{#each annotations as ann (ann.id)}
|
|
45
|
+
<div class="lite-ann-item">
|
|
46
|
+
<div class="lite-ann-dot" class:lite-dot-warn={ann.colorTone === 'warning'} class:lite-dot-danger={ann.colorTone === 'destructive'}></div>
|
|
47
|
+
<div class="lite-ann-content">
|
|
48
|
+
<div class="lite-ann-main-row">
|
|
49
|
+
<span class="lite-ann-label">{ann.label}</span>
|
|
50
|
+
{#if ann.valueLabel}<span class="lite-ann-val font-mono">[{ann.valueLabel}]</span>{/if}
|
|
51
|
+
</div>
|
|
52
|
+
{#if ann.timestamp}<span class="lite-ann-time font-mono">{ann.timestamp}</span>{/if}
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
{/each}
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<style>
|
|
61
|
+
.lite-chart-annotation {
|
|
62
|
+
border: 1px solid #e5e6eb;
|
|
63
|
+
border-radius: 6px;
|
|
64
|
+
background: #ffffff;
|
|
65
|
+
font-size: 12px;
|
|
66
|
+
overflow: hidden;
|
|
67
|
+
}
|
|
68
|
+
.lite-ann-header {
|
|
69
|
+
display: flex;
|
|
70
|
+
justify-content: space-between;
|
|
71
|
+
align-items: center;
|
|
72
|
+
padding: 10px 14px;
|
|
73
|
+
background: #f7f8fa;
|
|
74
|
+
border-bottom: 1px solid #e5e6eb;
|
|
75
|
+
}
|
|
76
|
+
.lite-ann-title-row { display: flex; align-items: center; }
|
|
77
|
+
.lite-ann-icon { font-size: 14px; margin-right: 6px; }
|
|
78
|
+
.lite-ann-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
|
|
79
|
+
.lite-ann-count { font-size: 11px; color: #86909c; }
|
|
80
|
+
.lite-ann-body { padding: 12px 14px; }
|
|
81
|
+
.lite-ann-timeline { display: flex; flex-direction: column; }
|
|
82
|
+
.lite-ann-item { display: flex; align-items: flex-start; margin-bottom: 8px; }
|
|
83
|
+
.lite-ann-item:last-child { margin-bottom: 0; }
|
|
84
|
+
.lite-ann-dot {
|
|
85
|
+
width: 8px;
|
|
86
|
+
height: 8px;
|
|
87
|
+
border-radius: 50%;
|
|
88
|
+
background: #165dff;
|
|
89
|
+
margin-top: 4px;
|
|
90
|
+
margin-right: 8px;
|
|
91
|
+
shrink: 0;
|
|
92
|
+
}
|
|
93
|
+
.lite-dot-warn { background: #ff7d00; }
|
|
94
|
+
.lite-dot-danger { background: #f53f3f; }
|
|
95
|
+
.lite-ann-content { flex: 1; display: flex; flex-direction: column; }
|
|
96
|
+
.lite-ann-main-row { display: flex; align-items: center; }
|
|
97
|
+
.lite-ann-label { font-weight: 500; color: #1d2129; margin-right: 6px; }
|
|
98
|
+
.lite-ann-val { font-size: 10px; color: #165dff; font-weight: 600; }
|
|
99
|
+
.font-mono { font-family: monospace; }
|
|
100
|
+
.lite-ann-time { font-size: 10px; color: #86909c; }
|
|
101
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface ChartAnnotationItem {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
type?: string;
|
|
5
|
+
timestamp?: string;
|
|
6
|
+
valueLabel?: string;
|
|
7
|
+
colorTone?: string;
|
|
8
|
+
}
|
|
9
|
+
interface Props {
|
|
10
|
+
title?: string;
|
|
11
|
+
annotations?: ChartAnnotationItem[];
|
|
12
|
+
class?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const LiteChartAnnotationOverlay: import("svelte").Component<Props, {}, "">;
|
|
15
|
+
type LiteChartAnnotationOverlay = ReturnType<typeof LiteChartAnnotationOverlay>;
|
|
16
|
+
export default LiteChartAnnotationOverlay;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface MappingPair {
|
|
3
|
+
sourceCol: string;
|
|
4
|
+
targetField: string;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
sampleVal?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
title?: string;
|
|
11
|
+
mappings?: MappingPair[];
|
|
12
|
+
class?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
let {
|
|
16
|
+
title = '字段映射与模式转换',
|
|
17
|
+
mappings = [
|
|
18
|
+
{ sourceCol: '用户姓名', targetField: 'full_name', required: true, sampleVal: '张伟' },
|
|
19
|
+
{ sourceCol: '手机联系方式', targetField: 'mobile_phone', required: true, sampleVal: '13800138000' },
|
|
20
|
+
{ sourceCol: '所属部门', targetField: 'department_id', required: false, sampleVal: '技术研发部' },
|
|
21
|
+
{ sourceCol: '入职日期', targetField: 'joined_at', required: false, sampleVal: '2026-03-01' }
|
|
22
|
+
],
|
|
23
|
+
class: className = '',
|
|
24
|
+
}: Props = $props();
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<div
|
|
28
|
+
class="lite-col-mapping {className}"
|
|
29
|
+
data-svadmin-component="LiteColumnMappingTable"
|
|
30
|
+
role="region"
|
|
31
|
+
aria-label="Column Mapping Table"
|
|
32
|
+
>
|
|
33
|
+
<header class="lite-mapping-header">
|
|
34
|
+
<h4 class="lite-mapping-title">{title}</h4>
|
|
35
|
+
<span class="lite-mapping-count">{mappings.length} 个字段映射</span>
|
|
36
|
+
</header>
|
|
37
|
+
|
|
38
|
+
<div class="lite-mapping-table-wrap">
|
|
39
|
+
<table class="lite-mapping-table">
|
|
40
|
+
<thead>
|
|
41
|
+
<tr>
|
|
42
|
+
<th>文件原始列名</th>
|
|
43
|
+
<th>映射目标字段</th>
|
|
44
|
+
<th>必填约束</th>
|
|
45
|
+
<th>数据样本</th>
|
|
46
|
+
</tr>
|
|
47
|
+
</thead>
|
|
48
|
+
<tbody>
|
|
49
|
+
{#each mappings as m (m.sourceCol)}
|
|
50
|
+
<tr>
|
|
51
|
+
<td class="font-bold">{m.sourceCol}</td>
|
|
52
|
+
<td><code class="lite-field-code">{m.targetField}</code></td>
|
|
53
|
+
<td>
|
|
54
|
+
{#if m.required}
|
|
55
|
+
<span class="lite-tag-req">必填</span>
|
|
56
|
+
{:else}
|
|
57
|
+
<span class="lite-tag-opt">可选</span>
|
|
58
|
+
{/if}
|
|
59
|
+
</td>
|
|
60
|
+
<td class="lite-sample-text">{m.sampleVal ?? '—'}</td>
|
|
61
|
+
</tr>
|
|
62
|
+
{/each}
|
|
63
|
+
</tbody>
|
|
64
|
+
</table>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<style>
|
|
69
|
+
.lite-col-mapping {
|
|
70
|
+
border: 1px solid #e5e6eb;
|
|
71
|
+
border-radius: 6px;
|
|
72
|
+
background: #ffffff;
|
|
73
|
+
font-size: 12px;
|
|
74
|
+
overflow: hidden;
|
|
75
|
+
}
|
|
76
|
+
.lite-mapping-header {
|
|
77
|
+
display: flex;
|
|
78
|
+
justify-content: space-between;
|
|
79
|
+
align-items: center;
|
|
80
|
+
padding: 10px 14px;
|
|
81
|
+
background: #f7f8fa;
|
|
82
|
+
border-bottom: 1px solid #e5e6eb;
|
|
83
|
+
}
|
|
84
|
+
.lite-mapping-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
|
|
85
|
+
.lite-mapping-count { font-size: 11px; color: #86909c; }
|
|
86
|
+
.lite-mapping-table-wrap { overflow-x: auto; }
|
|
87
|
+
.lite-mapping-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; }
|
|
88
|
+
.lite-mapping-table th {
|
|
89
|
+
padding: 8px 12px;
|
|
90
|
+
background: #f2f3f5;
|
|
91
|
+
border-bottom: 1px solid #e5e6eb;
|
|
92
|
+
color: #4e5969;
|
|
93
|
+
font-weight: 600;
|
|
94
|
+
}
|
|
95
|
+
.lite-mapping-table td {
|
|
96
|
+
padding: 8px 12px;
|
|
97
|
+
border-bottom: 1px solid #f2f3f5;
|
|
98
|
+
color: #1d2129;
|
|
99
|
+
}
|
|
100
|
+
.font-bold { font-weight: 600; }
|
|
101
|
+
.lite-field-code { font-family: monospace; font-size: 11px; color: #165dff; background: #e8f3ff; padding: 2px 5px; border-radius: 3px; }
|
|
102
|
+
.lite-tag-req { font-size: 10px; color: #f53f3f; background: #ffece8; padding: 1px 4px; border-radius: 3px; font-weight: 500; }
|
|
103
|
+
.lite-tag-opt { font-size: 10px; color: #86909c; background: #f2f3f5; padding: 1px 4px; border-radius: 3px; }
|
|
104
|
+
.lite-sample-text { color: #86909c; font-family: monospace; }
|
|
105
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface MappingPair {
|
|
2
|
+
sourceCol: string;
|
|
3
|
+
targetField: string;
|
|
4
|
+
required?: boolean;
|
|
5
|
+
sampleVal?: string;
|
|
6
|
+
}
|
|
7
|
+
interface Props {
|
|
8
|
+
title?: string;
|
|
9
|
+
mappings?: MappingPair[];
|
|
10
|
+
class?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const LiteColumnMappingTable: import("svelte").Component<Props, {}, "">;
|
|
13
|
+
type LiteColumnMappingTable = ReturnType<typeof LiteColumnMappingTable>;
|
|
14
|
+
export default LiteColumnMappingTable;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
export interface LiteContextMenuItem {
|
|
5
|
+
key: string;
|
|
6
|
+
label: string;
|
|
7
|
+
shortcut?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
danger?: boolean;
|
|
10
|
+
divider?: boolean;
|
|
11
|
+
href?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface Props {
|
|
15
|
+
items: LiteContextMenuItem[];
|
|
16
|
+
class?: string;
|
|
17
|
+
children?: Snippet;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
let {
|
|
21
|
+
items = [],
|
|
22
|
+
class: className = '',
|
|
23
|
+
children,
|
|
24
|
+
}: Props = $props();
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<div
|
|
28
|
+
class="lite-context-menu-wrapper {className}"
|
|
29
|
+
data-svadmin-component="LiteContextMenu"
|
|
30
|
+
>
|
|
31
|
+
<div class="lite-context-target">
|
|
32
|
+
{#if children}{@render children()}{/if}
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
{#if items.length > 0}
|
|
36
|
+
<ul class="lite-context-menu-list" role="menu">
|
|
37
|
+
{#each items as item (item.key)}
|
|
38
|
+
{#if item.divider}
|
|
39
|
+
<li class="lite-context-divider" role="separator"></li>
|
|
40
|
+
{:else}
|
|
41
|
+
<li
|
|
42
|
+
class="lite-context-item"
|
|
43
|
+
class:lite-context-danger={item.danger}
|
|
44
|
+
class:lite-context-disabled={item.disabled}
|
|
45
|
+
role="menuitem"
|
|
46
|
+
>
|
|
47
|
+
{#if item.href && !item.disabled}
|
|
48
|
+
<a href={item.href} class="lite-context-link">
|
|
49
|
+
<span>{item.label}</span>
|
|
50
|
+
{#if item.shortcut}<kbd>{item.shortcut}</kbd>{/if}
|
|
51
|
+
</a>
|
|
52
|
+
{:else}
|
|
53
|
+
<span class="lite-context-label">{item.label}</span>
|
|
54
|
+
{#if item.shortcut}<kbd>{item.shortcut}</kbd>{/if}
|
|
55
|
+
{/if}
|
|
56
|
+
</li>
|
|
57
|
+
{/if}
|
|
58
|
+
{/each}
|
|
59
|
+
</ul>
|
|
60
|
+
{/if}
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<style>
|
|
64
|
+
.lite-context-menu-wrapper {
|
|
65
|
+
position: relative;
|
|
66
|
+
display: block;
|
|
67
|
+
}
|
|
68
|
+
.lite-context-menu-list {
|
|
69
|
+
margin: 8px 0 0;
|
|
70
|
+
padding: 4px;
|
|
71
|
+
list-style: none;
|
|
72
|
+
border: 1px solid #e5e6eb;
|
|
73
|
+
border-radius: 6px;
|
|
74
|
+
background: #ffffff;
|
|
75
|
+
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
|
|
76
|
+
display: inline-flex;
|
|
77
|
+
flex-wrap: wrap;
|
|
78
|
+
}
|
|
79
|
+
.lite-context-menu-list > * + * { margin-left: 4px; }
|
|
80
|
+
.lite-context-divider {
|
|
81
|
+
width: 1px;
|
|
82
|
+
height: 16px;
|
|
83
|
+
background: #e5e6eb;
|
|
84
|
+
align-self: center;
|
|
85
|
+
margin: 0 4px;
|
|
86
|
+
}
|
|
87
|
+
.lite-context-item {
|
|
88
|
+
font-size: 12px;
|
|
89
|
+
border-radius: 4px;
|
|
90
|
+
display: inline-flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
padding: 4px 8px;
|
|
93
|
+
color: #1d2129;
|
|
94
|
+
background: #f7f8fa;
|
|
95
|
+
}
|
|
96
|
+
.lite-context-item > * + * { margin-left: 6px; }
|
|
97
|
+
.lite-context-link {
|
|
98
|
+
color: inherit;
|
|
99
|
+
text-decoration: none;
|
|
100
|
+
display: inline-flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
}
|
|
103
|
+
.lite-context-link > * + * { margin-left: 6px; }
|
|
104
|
+
.lite-context-danger { color: #f53f3f; background: #ffece8; }
|
|
105
|
+
.lite-context-disabled { opacity: 0.5; pointer-events: none; }
|
|
106
|
+
kbd {
|
|
107
|
+
font-size: 10px;
|
|
108
|
+
font-family: monospace;
|
|
109
|
+
background: #e5e6eb;
|
|
110
|
+
padding: 1px 4px;
|
|
111
|
+
border-radius: 3px;
|
|
112
|
+
color: #4e5969;
|
|
113
|
+
}
|
|
114
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
export interface LiteContextMenuItem {
|
|
3
|
+
key: string;
|
|
4
|
+
label: string;
|
|
5
|
+
shortcut?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
danger?: boolean;
|
|
8
|
+
divider?: boolean;
|
|
9
|
+
href?: string;
|
|
10
|
+
}
|
|
11
|
+
interface Props {
|
|
12
|
+
items: LiteContextMenuItem[];
|
|
13
|
+
class?: string;
|
|
14
|
+
children?: Snippet;
|
|
15
|
+
}
|
|
16
|
+
declare const LiteContextMenu: import("svelte").Component<Props, {}, "">;
|
|
17
|
+
type LiteContextMenu = ReturnType<typeof LiteContextMenu>;
|
|
18
|
+
export default LiteContextMenu;
|