@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,135 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
type ResultStatus = 'success' | 'processing' | 'warning' | 'error' | '403' | '404' | '500';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
status?: ResultStatus;
|
|
8
|
+
title: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
primaryActionHref?: string;
|
|
11
|
+
primaryActionLabel?: string;
|
|
12
|
+
secondaryActionHref?: string;
|
|
13
|
+
secondaryActionLabel?: string;
|
|
14
|
+
class?: string;
|
|
15
|
+
actions?: Snippet;
|
|
16
|
+
children?: Snippet;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
let {
|
|
20
|
+
status = 'success',
|
|
21
|
+
title,
|
|
22
|
+
description,
|
|
23
|
+
primaryActionHref,
|
|
24
|
+
primaryActionLabel = 'Back to Home',
|
|
25
|
+
secondaryActionHref,
|
|
26
|
+
secondaryActionLabel,
|
|
27
|
+
class: className = '',
|
|
28
|
+
actions,
|
|
29
|
+
children,
|
|
30
|
+
}: Props = $props();
|
|
31
|
+
|
|
32
|
+
const iconSymbol = $derived.by(() => {
|
|
33
|
+
switch (status) {
|
|
34
|
+
case 'success':
|
|
35
|
+
return '✓';
|
|
36
|
+
case 'processing':
|
|
37
|
+
return '⏳';
|
|
38
|
+
case 'warning':
|
|
39
|
+
case '403':
|
|
40
|
+
return '!';
|
|
41
|
+
case 'error':
|
|
42
|
+
case '500':
|
|
43
|
+
return '✕';
|
|
44
|
+
case '404':
|
|
45
|
+
default:
|
|
46
|
+
return '?';
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<div
|
|
52
|
+
class="lite-result-page lite-result-{status} {className}"
|
|
53
|
+
data-svadmin-component="LiteResultPage"
|
|
54
|
+
role="status"
|
|
55
|
+
>
|
|
56
|
+
<div class="lite-result-icon-wrapper" aria-hidden="true">
|
|
57
|
+
<span class="lite-result-icon">{iconSymbol}</span>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<h2 class="lite-result-title">{title}</h2>
|
|
61
|
+
|
|
62
|
+
{#if description}
|
|
63
|
+
<p class="lite-result-description">{description}</p>
|
|
64
|
+
{/if}
|
|
65
|
+
|
|
66
|
+
{#if actions}
|
|
67
|
+
<div class="lite-result-actions">{@render actions()}</div>
|
|
68
|
+
{:else if primaryActionHref || secondaryActionHref}
|
|
69
|
+
<div class="lite-result-actions">
|
|
70
|
+
{#if primaryActionHref}
|
|
71
|
+
<a href={primaryActionHref} class="lite-result-btn-primary">{primaryActionLabel}</a>
|
|
72
|
+
{/if}
|
|
73
|
+
{#if secondaryActionHref && secondaryActionLabel}
|
|
74
|
+
<a href={secondaryActionHref} class="lite-result-btn-secondary">{secondaryActionLabel}</a>
|
|
75
|
+
{/if}
|
|
76
|
+
</div>
|
|
77
|
+
{/if}
|
|
78
|
+
|
|
79
|
+
{#if children}
|
|
80
|
+
<div class="lite-result-extra">{@render children()}</div>
|
|
81
|
+
{/if}
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<style>
|
|
85
|
+
.lite-result-page {
|
|
86
|
+
text-align: center;
|
|
87
|
+
padding: 48px 24px;
|
|
88
|
+
background: #ffffff;
|
|
89
|
+
border-radius: 8px;
|
|
90
|
+
border: 1px solid #e5e6eb;
|
|
91
|
+
box-sizing: border-box;
|
|
92
|
+
}
|
|
93
|
+
.lite-result-icon-wrapper {
|
|
94
|
+
display: inline-flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
justify-content: center;
|
|
97
|
+
width: 64px;
|
|
98
|
+
height: 64px;
|
|
99
|
+
border-radius: 50%;
|
|
100
|
+
margin-bottom: 16px;
|
|
101
|
+
font-size: 28px;
|
|
102
|
+
font-weight: 700;
|
|
103
|
+
}
|
|
104
|
+
.lite-result-success .lite-result-icon-wrapper { background: #e8ffea; color: #00b42a; }
|
|
105
|
+
.lite-result-processing .lite-result-icon-wrapper { background: #e8f3ff; color: #165dff; }
|
|
106
|
+
.lite-result-warning .lite-result-icon-wrapper { background: #fff7e8; color: #ff7d00; }
|
|
107
|
+
.lite-result-error .lite-result-icon-wrapper { background: #ffece8; color: #f53f3f; }
|
|
108
|
+
.lite-result-403 .lite-result-icon-wrapper { background: #fff7e8; color: #ff7d00; }
|
|
109
|
+
.lite-result-404 .lite-result-icon-wrapper { background: #f2f3f5; color: #86909c; }
|
|
110
|
+
.lite-result-500 .lite-result-icon-wrapper { background: #ffece8; color: #f53f3f; }
|
|
111
|
+
.lite-result-title { margin: 0 0 8px; font-size: 20px; font-weight: 600; color: #1d2129; }
|
|
112
|
+
.lite-result-description { margin: 0 0 24px; font-size: 14px; color: #4e5969; max-width: 480px; margin-left: auto; margin-right: auto; }
|
|
113
|
+
.lite-result-actions { display: flex; justify-content: center; }
|
|
114
|
+
.lite-result-actions > * + * { margin-left: 12px; }
|
|
115
|
+
.lite-result-btn-primary {
|
|
116
|
+
display: inline-block;
|
|
117
|
+
padding: 8px 18px;
|
|
118
|
+
background: #165dff;
|
|
119
|
+
color: #ffffff;
|
|
120
|
+
border-radius: 4px;
|
|
121
|
+
text-decoration: none;
|
|
122
|
+
font-size: 13px;
|
|
123
|
+
font-weight: 500;
|
|
124
|
+
}
|
|
125
|
+
.lite-result-btn-secondary {
|
|
126
|
+
display: inline-block;
|
|
127
|
+
padding: 8px 18px;
|
|
128
|
+
background: #f2f3f5;
|
|
129
|
+
color: #4e5969;
|
|
130
|
+
border-radius: 4px;
|
|
131
|
+
text-decoration: none;
|
|
132
|
+
font-size: 13px;
|
|
133
|
+
}
|
|
134
|
+
.lite-result-extra { margin-top: 24px; padding-top: 16px; border-top: 1px solid #f2f3f5; }
|
|
135
|
+
</style>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
type ResultStatus = 'success' | 'processing' | 'warning' | 'error' | '403' | '404' | '500';
|
|
3
|
+
interface Props {
|
|
4
|
+
status?: ResultStatus;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
primaryActionHref?: string;
|
|
8
|
+
primaryActionLabel?: string;
|
|
9
|
+
secondaryActionHref?: string;
|
|
10
|
+
secondaryActionLabel?: string;
|
|
11
|
+
class?: string;
|
|
12
|
+
actions?: Snippet;
|
|
13
|
+
children?: Snippet;
|
|
14
|
+
}
|
|
15
|
+
declare const LiteResultPage: import("svelte").Component<Props, {}, "">;
|
|
16
|
+
type LiteResultPage = ReturnType<typeof LiteResultPage>;
|
|
17
|
+
export default LiteResultPage;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Job {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
cronExpression: string;
|
|
6
|
+
status: 'running' | 'idle' | 'disabled' | 'failed';
|
|
7
|
+
lastRunAt?: string;
|
|
8
|
+
nextRunAt?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
title?: string;
|
|
13
|
+
jobs?: Job[];
|
|
14
|
+
class?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let {
|
|
18
|
+
title = '定时任务与计划调度管理',
|
|
19
|
+
jobs = [
|
|
20
|
+
{ id: 'job_01', name: '每日数据汇总快照', cronExpression: '0 2 * * *', status: 'idle', lastRunAt: '2026-11-11 02:00:00', nextRunAt: '2026-11-12 02:00:00' },
|
|
21
|
+
{ id: 'job_02', name: '离线账单自动结算', cronExpression: '0 0 1 * *', status: 'idle', lastRunAt: '2026-11-01 00:00:00', nextRunAt: '2026-12-01 00:00:00' },
|
|
22
|
+
{ id: 'job_03', name: '审计日志冷备归档', cronExpression: '0 */6 * * *', status: 'running', lastRunAt: '2026-11-11 18:00:00', nextRunAt: '2026-11-12 00:00:00' },
|
|
23
|
+
{ id: 'job_04', name: '临时测试数据清理', cronExpression: '0 4 * * 0', status: 'disabled', lastRunAt: '2026-11-08 04:00:00', nextRunAt: '—' }
|
|
24
|
+
],
|
|
25
|
+
class: className = '',
|
|
26
|
+
}: Props = $props();
|
|
27
|
+
|
|
28
|
+
function getStatusStyle(st: string): { label: string; color: string; bg: string } {
|
|
29
|
+
switch (st) {
|
|
30
|
+
case 'running': return { label: '运行中', color: '#165dff', bg: '#e8f3ff' };
|
|
31
|
+
case 'failed': return { label: '执行失败', color: '#f53f3f', bg: '#ffece8' };
|
|
32
|
+
case 'disabled': return { label: '已停用', color: '#86909c', bg: '#f2f3f5' };
|
|
33
|
+
default: return { label: '就绪等待', color: '#00b42a', bg: '#e8ffea' };
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<div
|
|
39
|
+
class="lite-scheduler-matrix {className}"
|
|
40
|
+
data-svadmin-component="LiteScheduledJobManager"
|
|
41
|
+
role="region"
|
|
42
|
+
aria-label="Scheduled Job Manager"
|
|
43
|
+
>
|
|
44
|
+
<header class="lite-scheduler-header">
|
|
45
|
+
<h4 class="lite-scheduler-title">{title}</h4>
|
|
46
|
+
<span class="lite-scheduler-count">{jobs.length} 项定时作业</span>
|
|
47
|
+
</header>
|
|
48
|
+
|
|
49
|
+
<div class="lite-scheduler-table-wrap">
|
|
50
|
+
<table class="lite-scheduler-table">
|
|
51
|
+
<thead>
|
|
52
|
+
<tr>
|
|
53
|
+
<th>任务名称</th>
|
|
54
|
+
<th>Cron 调度表达式</th>
|
|
55
|
+
<th>状态</th>
|
|
56
|
+
<th>上次执行</th>
|
|
57
|
+
<th>下次预定</th>
|
|
58
|
+
</tr>
|
|
59
|
+
</thead>
|
|
60
|
+
<tbody>
|
|
61
|
+
{#each jobs as j (j.id)}
|
|
62
|
+
{@const st = getStatusStyle(j.status)}
|
|
63
|
+
<tr>
|
|
64
|
+
<td class="lite-job-name">{j.name}</td>
|
|
65
|
+
<td><code class="lite-cron-exp">{j.cronExpression}</code></td>
|
|
66
|
+
<td>
|
|
67
|
+
<span class="lite-job-status" style="color: {st.color}; background: {st.bg};">
|
|
68
|
+
{st.label}
|
|
69
|
+
</span>
|
|
70
|
+
</td>
|
|
71
|
+
<td class="lite-time-text">{j.lastRunAt ?? '—'}</td>
|
|
72
|
+
<td class="lite-time-text">{j.nextRunAt ?? '—'}</td>
|
|
73
|
+
</tr>
|
|
74
|
+
{/each}
|
|
75
|
+
</tbody>
|
|
76
|
+
</table>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<style>
|
|
81
|
+
.lite-scheduler-matrix {
|
|
82
|
+
border: 1px solid #e5e6eb;
|
|
83
|
+
border-radius: 6px;
|
|
84
|
+
background: #ffffff;
|
|
85
|
+
font-size: 12px;
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
}
|
|
88
|
+
.lite-scheduler-header {
|
|
89
|
+
display: flex;
|
|
90
|
+
justify-content: space-between;
|
|
91
|
+
align-items: center;
|
|
92
|
+
padding: 10px 14px;
|
|
93
|
+
background: #f7f8fa;
|
|
94
|
+
border-bottom: 1px solid #e5e6eb;
|
|
95
|
+
}
|
|
96
|
+
.lite-scheduler-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
|
|
97
|
+
.lite-scheduler-count { font-size: 11px; color: #86909c; }
|
|
98
|
+
.lite-scheduler-table-wrap { overflow-x: auto; }
|
|
99
|
+
.lite-scheduler-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; }
|
|
100
|
+
.lite-scheduler-table th {
|
|
101
|
+
padding: 8px 12px;
|
|
102
|
+
background: #f2f3f5;
|
|
103
|
+
border-bottom: 1px solid #e5e6eb;
|
|
104
|
+
color: #4e5969;
|
|
105
|
+
font-weight: 600;
|
|
106
|
+
}
|
|
107
|
+
.lite-scheduler-table td {
|
|
108
|
+
padding: 8px 12px;
|
|
109
|
+
border-bottom: 1px solid #f2f3f5;
|
|
110
|
+
color: #1d2129;
|
|
111
|
+
}
|
|
112
|
+
.lite-job-name { font-weight: 600; }
|
|
113
|
+
.lite-cron-exp { font-family: monospace; font-size: 11px; background: #f2f3f5; padding: 2px 4px; border-radius: 3px; color: #165dff; }
|
|
114
|
+
.lite-job-status { font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 3px; display: inline-block; }
|
|
115
|
+
.lite-time-text { font-family: monospace; color: #4e5969; font-size: 10px; }
|
|
116
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface Job {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
cronExpression: string;
|
|
5
|
+
status: 'running' | 'idle' | 'disabled' | 'failed';
|
|
6
|
+
lastRunAt?: string;
|
|
7
|
+
nextRunAt?: string;
|
|
8
|
+
}
|
|
9
|
+
interface Props {
|
|
10
|
+
title?: string;
|
|
11
|
+
jobs?: Job[];
|
|
12
|
+
class?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const LiteScheduledJobManager: import("svelte").Component<Props, {}, "">;
|
|
15
|
+
type LiteScheduledJobManager = ReturnType<typeof LiteScheduledJobManager>;
|
|
16
|
+
export default LiteScheduledJobManager;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
text?: string;
|
|
4
|
+
subtext?: string;
|
|
5
|
+
class?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
let {
|
|
9
|
+
text = '机密数据 · 严禁拍照',
|
|
10
|
+
subtext = '保密审计中 · 泄漏追责',
|
|
11
|
+
class: className = '',
|
|
12
|
+
}: Props = $props();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<div
|
|
16
|
+
class="lite-watermark-overlay {className}"
|
|
17
|
+
data-svadmin-component="LiteScreenAntiLeakGuard"
|
|
18
|
+
role="region"
|
|
19
|
+
aria-label="Security Watermark"
|
|
20
|
+
>
|
|
21
|
+
<div class="lite-watermark-grid">
|
|
22
|
+
{#each Array(12) as _, idx (idx)}
|
|
23
|
+
<div class="lite-watermark-item">
|
|
24
|
+
<span class="lite-wm-text">{text}</span>
|
|
25
|
+
{#if subtext}
|
|
26
|
+
<span class="lite-wm-sub">{subtext}</span>
|
|
27
|
+
{/if}
|
|
28
|
+
</div>
|
|
29
|
+
{/each}
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<style>
|
|
34
|
+
.lite-watermark-overlay {
|
|
35
|
+
position: relative;
|
|
36
|
+
padding: 16px;
|
|
37
|
+
background: #f7f8fa;
|
|
38
|
+
border: 1px dashed #c9cdd4;
|
|
39
|
+
border-radius: 6px;
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
}
|
|
42
|
+
.lite-watermark-grid {
|
|
43
|
+
display: block;
|
|
44
|
+
text-align: center;
|
|
45
|
+
}
|
|
46
|
+
.lite-watermark-item {
|
|
47
|
+
display: inline-block;
|
|
48
|
+
margin: 12px 18px;
|
|
49
|
+
transform: rotate(-15deg);
|
|
50
|
+
color: #86909c;
|
|
51
|
+
font-family: monospace;
|
|
52
|
+
opacity: 0.6;
|
|
53
|
+
}
|
|
54
|
+
.lite-wm-text { display: block; font-size: 11px; font-weight: bold; }
|
|
55
|
+
.lite-wm-sub { display: block; font-size: 9px; margin-top: 2px; }
|
|
56
|
+
</style>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
text?: string;
|
|
3
|
+
subtext?: string;
|
|
4
|
+
class?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const LiteScreenAntiLeakGuard: import("svelte").Component<Props, {}, "">;
|
|
7
|
+
type LiteScreenAntiLeakGuard = ReturnType<typeof LiteScreenAntiLeakGuard>;
|
|
8
|
+
export default LiteScreenAntiLeakGuard;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
title?: string;
|
|
4
|
+
fingerprint?: string;
|
|
5
|
+
operator?: string;
|
|
6
|
+
rowCount?: number;
|
|
7
|
+
format?: string;
|
|
8
|
+
generatedAt?: string;
|
|
9
|
+
class?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
let {
|
|
13
|
+
title = '安全数据导出与审计水印溯源',
|
|
14
|
+
fingerprint = 'FP-202611-9842A',
|
|
15
|
+
operator = 'admin@example.com',
|
|
16
|
+
rowCount = 1250,
|
|
17
|
+
format = 'CSV (UTF-8 with BOM)',
|
|
18
|
+
generatedAt = '2026-11-12 06:00:00',
|
|
19
|
+
class: className = '',
|
|
20
|
+
}: Props = $props();
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<div
|
|
24
|
+
class="lite-secure-exporter {className}"
|
|
25
|
+
data-svadmin-component="LiteSecureDataExporter"
|
|
26
|
+
role="region"
|
|
27
|
+
aria-label="Secure Data Exporter"
|
|
28
|
+
>
|
|
29
|
+
<header class="lite-exporter-header">
|
|
30
|
+
<div class="lite-exporter-title-wrap">
|
|
31
|
+
<span class="lite-exporter-shield">🛡️ 安全审计</span>
|
|
32
|
+
<h4 class="lite-exporter-title">{title}</h4>
|
|
33
|
+
</div>
|
|
34
|
+
<span class="lite-fp-tag">指纹: {fingerprint}</span>
|
|
35
|
+
</header>
|
|
36
|
+
|
|
37
|
+
<div class="lite-exporter-body">
|
|
38
|
+
<div class="lite-meta-grid">
|
|
39
|
+
<div class="lite-meta-item">
|
|
40
|
+
<span class="lite-meta-label">导出操作员</span>
|
|
41
|
+
<span class="lite-meta-val">{operator}</span>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="lite-meta-item">
|
|
44
|
+
<span class="lite-meta-label">记录行数</span>
|
|
45
|
+
<span class="lite-meta-val">{rowCount} 条</span>
|
|
46
|
+
</div>
|
|
47
|
+
<div class="lite-meta-item">
|
|
48
|
+
<span class="lite-meta-label">文件格式</span>
|
|
49
|
+
<span class="lite-meta-val">{format}</span>
|
|
50
|
+
</div>
|
|
51
|
+
<div class="lite-meta-item">
|
|
52
|
+
<span class="lite-meta-label">生成时间</span>
|
|
53
|
+
<span class="lite-meta-val font-mono">{generatedAt}</span>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<div class="lite-exporter-watermark-note">
|
|
58
|
+
导出的文件头部已内嵌数字隐形防伪指纹,严禁向外部未经授权机构分发传输。
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<style>
|
|
64
|
+
.lite-secure-exporter {
|
|
65
|
+
border: 1px solid #e5e6eb;
|
|
66
|
+
border-radius: 6px;
|
|
67
|
+
background: #ffffff;
|
|
68
|
+
font-size: 12px;
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
}
|
|
71
|
+
.lite-exporter-header {
|
|
72
|
+
display: flex;
|
|
73
|
+
justify-content: space-between;
|
|
74
|
+
align-items: center;
|
|
75
|
+
padding: 10px 14px;
|
|
76
|
+
background: #f7f8fa;
|
|
77
|
+
border-bottom: 1px solid #e5e6eb;
|
|
78
|
+
}
|
|
79
|
+
.lite-exporter-title-wrap { display: flex; align-items: center; }
|
|
80
|
+
.lite-exporter-title-wrap > * + * { margin-left: 8px; }
|
|
81
|
+
.lite-exporter-shield { font-size: 11px; font-weight: 600; color: #00b42a; }
|
|
82
|
+
.lite-exporter-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
|
|
83
|
+
.lite-fp-tag { font-size: 10px; font-family: monospace; color: #165dff; background: #e8f3ff; padding: 2px 6px; border-radius: 3px; }
|
|
84
|
+
.lite-exporter-body { padding: 12px 14px; }
|
|
85
|
+
.lite-meta-grid { margin-bottom: 10px; overflow: hidden; }
|
|
86
|
+
.lite-meta-grid .lite-meta-item { float: left; width: 50%; box-sizing: border-box; margin-bottom: 10px; padding-right: 5px; }
|
|
87
|
+
.lite-meta-grid .lite-meta-item:nth-child(2n) { padding-right: 0; padding-left: 5px; }
|
|
88
|
+
.lite-meta-item { display: flex; flex-direction: column; }
|
|
89
|
+
.lite-meta-item > * + * { margin-top: 2px; }
|
|
90
|
+
.lite-meta-label { font-size: 10px; color: #86909c; }
|
|
91
|
+
.lite-meta-val { font-size: 11px; font-weight: 500; color: #1d2129; }
|
|
92
|
+
.font-mono { font-family: monospace; }
|
|
93
|
+
.lite-exporter-watermark-note {
|
|
94
|
+
background: #f2f3f5;
|
|
95
|
+
padding: 8px 10px;
|
|
96
|
+
border-radius: 4px;
|
|
97
|
+
font-size: 10px;
|
|
98
|
+
color: #4e5969;
|
|
99
|
+
border-left: 3px solid #165dff;
|
|
100
|
+
}
|
|
101
|
+
</style>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
title?: string;
|
|
3
|
+
fingerprint?: string;
|
|
4
|
+
operator?: string;
|
|
5
|
+
rowCount?: number;
|
|
6
|
+
format?: string;
|
|
7
|
+
generatedAt?: string;
|
|
8
|
+
class?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const LiteSecureDataExporter: import("svelte").Component<Props, {}, "">;
|
|
11
|
+
type LiteSecureDataExporter = ReturnType<typeof LiteSecureDataExporter>;
|
|
12
|
+
export default LiteSecureDataExporter;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
interface Props {
|
|
3
3
|
value?: string | number | null;
|
|
4
|
-
type?:
|
|
5
|
-
|
|
4
|
+
type?:
|
|
5
|
+
| 'phone'
|
|
6
|
+
| 'mobile'
|
|
7
|
+
| 'id-card'
|
|
8
|
+
| 'idCard'
|
|
9
|
+
| 'email'
|
|
10
|
+
| 'bank-card'
|
|
11
|
+
| 'bankCard'
|
|
12
|
+
| 'name'
|
|
13
|
+
| 'secret'
|
|
14
|
+
| 'custom';
|
|
6
15
|
class?: string;
|
|
7
16
|
}
|
|
8
17
|
|
|
@@ -14,13 +23,36 @@
|
|
|
14
23
|
|
|
15
24
|
const rawString = $derived(String(value ?? ''));
|
|
16
25
|
|
|
26
|
+
function maskName(val: string): string {
|
|
27
|
+
const trimmed = val.trim();
|
|
28
|
+
if (!trimmed) return '—';
|
|
29
|
+
if (trimmed.includes(' ')) {
|
|
30
|
+
return trimmed
|
|
31
|
+
.split(/\s+/)
|
|
32
|
+
.map((part) => (part.length <= 1 ? '*' : `${part[0]}${'*'.repeat(Math.max(1, part.length - 2))}${part.length > 2 ? part.slice(-1) : '*'}`))
|
|
33
|
+
.join(' ');
|
|
34
|
+
}
|
|
35
|
+
const len = trimmed.length;
|
|
36
|
+
if (len <= 1) return '*';
|
|
37
|
+
if (len === 2) return `${trimmed[0]}*`;
|
|
38
|
+
if (len === 3) return `${trimmed[0]}*${trimmed[2]}`;
|
|
39
|
+
return `${trimmed[0]}${'*'.repeat(len - 2)}${trimmed.slice(-1)}`;
|
|
40
|
+
}
|
|
41
|
+
|
|
17
42
|
function mask(val: string, maskType: string): string {
|
|
18
43
|
if (!val) return '—';
|
|
19
44
|
switch (maskType) {
|
|
20
45
|
case 'phone':
|
|
46
|
+
case 'mobile':
|
|
21
47
|
return val.length >= 7 ? `${val.slice(0, 3)}****${val.slice(-4)}` : '****';
|
|
22
48
|
case 'id-card':
|
|
49
|
+
case 'idCard':
|
|
23
50
|
return val.length >= 10 ? `${val.slice(0, 6)}********${val.slice(-4)}` : '********';
|
|
51
|
+
case 'bank-card':
|
|
52
|
+
case 'bankCard':
|
|
53
|
+
return val.length >= 8 ? `${val.slice(0, 4)} **** **** ${val.slice(-4)}` : '**** ****';
|
|
54
|
+
case 'name':
|
|
55
|
+
return maskName(val);
|
|
24
56
|
case 'email': {
|
|
25
57
|
const parts = val.split('@');
|
|
26
58
|
const [name, domain] = parts;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
interface Props {
|
|
2
2
|
value?: string | number | null;
|
|
3
|
-
type?: 'phone' | 'id-card' | 'email' | 'bank-card' | 'secret' | 'custom';
|
|
4
|
-
/** Caller class merged with the built-in class list. */
|
|
3
|
+
type?: 'phone' | 'mobile' | 'id-card' | 'idCard' | 'email' | 'bank-card' | 'bankCard' | 'name' | 'secret' | 'custom';
|
|
5
4
|
class?: string;
|
|
6
5
|
}
|
|
7
6
|
declare const LiteSensitiveDataMask: import("svelte").Component<Props, {}, "">;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Column {
|
|
3
|
+
name: string;
|
|
4
|
+
type?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
title?: string;
|
|
9
|
+
query?: string;
|
|
10
|
+
columns?: Column[];
|
|
11
|
+
rows?: Record<string, string | number | null>[];
|
|
12
|
+
rowCount?: number;
|
|
13
|
+
executionTimeMs?: number;
|
|
14
|
+
class?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let {
|
|
18
|
+
title = 'SQL 只读查询控制台',
|
|
19
|
+
query = 'SELECT id, tenant_id, name, created_at FROM sys_tenants LIMIT 10;',
|
|
20
|
+
columns = [
|
|
21
|
+
{ name: 'id', type: 'uuid' },
|
|
22
|
+
{ name: 'tenant_id', type: 'varchar' },
|
|
23
|
+
{ name: 'name', type: 'varchar' },
|
|
24
|
+
{ name: 'created_at', type: 'timestamp' }
|
|
25
|
+
],
|
|
26
|
+
rows = [
|
|
27
|
+
{ id: '1a2b-3c4d', tenant_id: 't_enterprise', name: '上海华东研发中心', created_at: '2026-11-10 10:00:00' },
|
|
28
|
+
{ id: '5e6f-7g8h', tenant_id: 't_standard', name: '北京华北创新科技', created_at: '2026-11-11 14:30:00' }
|
|
29
|
+
],
|
|
30
|
+
rowCount = 2,
|
|
31
|
+
executionTimeMs = 12,
|
|
32
|
+
class: className = '',
|
|
33
|
+
}: Props = $props();
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<div
|
|
37
|
+
class="lite-sql-console {className}"
|
|
38
|
+
data-svadmin-component="LiteSqlConsole"
|
|
39
|
+
role="region"
|
|
40
|
+
aria-label="SQL Console"
|
|
41
|
+
>
|
|
42
|
+
<header class="lite-sql-header">
|
|
43
|
+
<div class="lite-sql-title-wrap">
|
|
44
|
+
<span class="lite-sql-tag">READONLY</span>
|
|
45
|
+
<h4 class="lite-sql-title">{title}</h4>
|
|
46
|
+
</div>
|
|
47
|
+
<span class="lite-sql-stats">{rowCount} 行记录 · 耗时 {executionTimeMs}ms</span>
|
|
48
|
+
</header>
|
|
49
|
+
|
|
50
|
+
<div class="lite-sql-query-box">
|
|
51
|
+
<code>{query}</code>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<div class="lite-sql-table-wrap">
|
|
55
|
+
<table class="lite-sql-table">
|
|
56
|
+
<thead>
|
|
57
|
+
<tr>
|
|
58
|
+
{#each columns as col (col)}
|
|
59
|
+
<th>{col.name} <span class="lite-sql-col-type">({col.type ?? 'text'})</span></th>
|
|
60
|
+
{/each}
|
|
61
|
+
</tr>
|
|
62
|
+
</thead>
|
|
63
|
+
<tbody>
|
|
64
|
+
{#each rows as row, rIdx (rIdx)}
|
|
65
|
+
<tr>
|
|
66
|
+
{#each columns as col (col)}
|
|
67
|
+
<td>{row[col.name] ?? 'NULL'}</td>
|
|
68
|
+
{/each}
|
|
69
|
+
</tr>
|
|
70
|
+
{/each}
|
|
71
|
+
</tbody>
|
|
72
|
+
</table>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<style>
|
|
77
|
+
.lite-sql-console {
|
|
78
|
+
border: 1px solid #e5e6eb;
|
|
79
|
+
border-radius: 6px;
|
|
80
|
+
background: #ffffff;
|
|
81
|
+
font-size: 12px;
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
}
|
|
84
|
+
.lite-sql-header {
|
|
85
|
+
display: flex;
|
|
86
|
+
justify-content: space-between;
|
|
87
|
+
align-items: center;
|
|
88
|
+
padding: 10px 14px;
|
|
89
|
+
background: #f7f8fa;
|
|
90
|
+
border-bottom: 1px solid #e5e6eb;
|
|
91
|
+
}
|
|
92
|
+
.lite-sql-title-wrap { display: flex; align-items: center; }
|
|
93
|
+
.lite-sql-title-wrap > * + * { margin-left: 8px; }
|
|
94
|
+
.lite-sql-tag {
|
|
95
|
+
font-size: 10px;
|
|
96
|
+
font-weight: 700;
|
|
97
|
+
color: #165dff;
|
|
98
|
+
background: #e8f3ff;
|
|
99
|
+
padding: 2px 6px;
|
|
100
|
+
border-radius: 4px;
|
|
101
|
+
}
|
|
102
|
+
.lite-sql-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
|
|
103
|
+
.lite-sql-stats { font-size: 11px; color: #86909c; font-family: monospace; }
|
|
104
|
+
.lite-sql-query-box {
|
|
105
|
+
padding: 10px 14px;
|
|
106
|
+
background: #272e3b;
|
|
107
|
+
color: #f2f3f5;
|
|
108
|
+
font-family: monospace;
|
|
109
|
+
font-size: 11px;
|
|
110
|
+
overflow-x: auto;
|
|
111
|
+
}
|
|
112
|
+
.lite-sql-table-wrap { overflow-x: auto; }
|
|
113
|
+
.lite-sql-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; }
|
|
114
|
+
.lite-sql-table th {
|
|
115
|
+
padding: 8px 12px;
|
|
116
|
+
background: #f2f3f5;
|
|
117
|
+
border-bottom: 1px solid #e5e6eb;
|
|
118
|
+
color: #4e5969;
|
|
119
|
+
font-weight: 600;
|
|
120
|
+
}
|
|
121
|
+
.lite-sql-col-type { font-size: 10px; color: #86909c; font-weight: normal; }
|
|
122
|
+
.lite-sql-table td {
|
|
123
|
+
padding: 8px 12px;
|
|
124
|
+
border-bottom: 1px solid #f2f3f5;
|
|
125
|
+
color: #1d2129;
|
|
126
|
+
font-family: monospace;
|
|
127
|
+
}
|
|
128
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface Column {
|
|
2
|
+
name: string;
|
|
3
|
+
type?: string;
|
|
4
|
+
}
|
|
5
|
+
interface Props {
|
|
6
|
+
title?: string;
|
|
7
|
+
query?: string;
|
|
8
|
+
columns?: Column[];
|
|
9
|
+
rows?: Record<string, string | number | null>[];
|
|
10
|
+
rowCount?: number;
|
|
11
|
+
executionTimeMs?: number;
|
|
12
|
+
class?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const LiteSqlConsole: import("svelte").Component<Props, {}, "">;
|
|
15
|
+
type LiteSqlConsole = ReturnType<typeof LiteSqlConsole>;
|
|
16
|
+
export default LiteSqlConsole;
|