@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,108 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export interface DashboardGridItem {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
w: number;
|
|
6
|
+
h: number;
|
|
7
|
+
widgetType?: string;
|
|
8
|
+
metricValue?: string | number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
title?: string;
|
|
13
|
+
items?: DashboardGridItem[];
|
|
14
|
+
class?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let {
|
|
18
|
+
title = '智能动态业务大屏 (SSR 静态栅格)',
|
|
19
|
+
items = [
|
|
20
|
+
{ id: 'w1', title: '核心营收 (GMV)', w: 4, h: 2, widgetType: 'kpi', metricValue: '¥48.2M' },
|
|
21
|
+
{ id: 'w2', title: '活跃企业租户', w: 4, h: 2, widgetType: 'kpi', metricValue: '1,420 家' },
|
|
22
|
+
{ id: 'w3', title: '网关 SLA', w: 4, h: 2, widgetType: 'kpi', metricValue: '99.98%' },
|
|
23
|
+
],
|
|
24
|
+
class: className = '',
|
|
25
|
+
}: Props = $props();
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<div
|
|
29
|
+
class="lite-dashboard-grid {className}"
|
|
30
|
+
data-svadmin-component="LiteDashboardGridLayout"
|
|
31
|
+
role="region"
|
|
32
|
+
aria-label="Dashboard Grid Layout"
|
|
33
|
+
>
|
|
34
|
+
<header class="lite-dash-header">
|
|
35
|
+
<div class="lite-dash-title-row">
|
|
36
|
+
<span class="lite-dash-icon">📊</span>
|
|
37
|
+
<h4 class="lite-dash-title">{title}</h4>
|
|
38
|
+
</div>
|
|
39
|
+
<span class="lite-dash-count">共 {items.length} 个小部件 (静态排版)</span>
|
|
40
|
+
</header>
|
|
41
|
+
|
|
42
|
+
<div class="lite-dash-grid-body">
|
|
43
|
+
{#each items as item (item.id)}
|
|
44
|
+
<div class="lite-dash-widget" style="width: calc({(item.w / 12) * 100}% - 10px);">
|
|
45
|
+
<div class="lite-widget-header">
|
|
46
|
+
<span class="lite-widget-title">{item.title}</span>
|
|
47
|
+
<span class="lite-widget-span">{item.w}x{item.h} 栅格</span>
|
|
48
|
+
</div>
|
|
49
|
+
{#if item.metricValue}
|
|
50
|
+
<div class="lite-widget-val font-mono">{item.metricValue}</div>
|
|
51
|
+
{:else}
|
|
52
|
+
<div class="lite-widget-placeholder">小部件数据预览 (SSR 静态占位)</div>
|
|
53
|
+
{/if}
|
|
54
|
+
</div>
|
|
55
|
+
{/each}
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<style>
|
|
60
|
+
.lite-dashboard-grid {
|
|
61
|
+
border: 1px solid #e5e6eb;
|
|
62
|
+
border-radius: 6px;
|
|
63
|
+
background: #ffffff;
|
|
64
|
+
font-size: 12px;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
}
|
|
67
|
+
.lite-dash-header {
|
|
68
|
+
display: flex;
|
|
69
|
+
justify-content: space-between;
|
|
70
|
+
align-items: center;
|
|
71
|
+
padding: 10px 14px;
|
|
72
|
+
background: #f7f8fa;
|
|
73
|
+
border-bottom: 1px solid #e5e6eb;
|
|
74
|
+
}
|
|
75
|
+
.lite-dash-title-row { display: flex; align-items: center; }
|
|
76
|
+
.lite-dash-icon { font-size: 14px; margin-right: 6px; }
|
|
77
|
+
.lite-dash-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
|
|
78
|
+
.lite-dash-count { font-size: 11px; color: #86909c; }
|
|
79
|
+
.lite-dash-grid-body {
|
|
80
|
+
display: flex;
|
|
81
|
+
flex-wrap: wrap;
|
|
82
|
+
margin: -5px;
|
|
83
|
+
padding: 10px;
|
|
84
|
+
box-sizing: border-box;
|
|
85
|
+
}
|
|
86
|
+
.lite-dash-widget {
|
|
87
|
+
box-sizing: border-box;
|
|
88
|
+
margin: 5px;
|
|
89
|
+
border: 1px solid #f2f3f5;
|
|
90
|
+
border-radius: 4px;
|
|
91
|
+
background: #fafafa;
|
|
92
|
+
padding: 10px;
|
|
93
|
+
display: flex;
|
|
94
|
+
flex-direction: column;
|
|
95
|
+
justify-content: space-between;
|
|
96
|
+
}
|
|
97
|
+
.lite-widget-header {
|
|
98
|
+
display: flex;
|
|
99
|
+
justify-content: space-between;
|
|
100
|
+
align-items: center;
|
|
101
|
+
margin-bottom: 6px;
|
|
102
|
+
}
|
|
103
|
+
.lite-widget-title { font-weight: 600; color: #1d2129; font-size: 11px; }
|
|
104
|
+
.lite-widget-span { font-size: 9px; color: #86909c; background: #ffffff; padding: 1px 4px; border: 1px solid #e5e6eb; border-radius: 2px; }
|
|
105
|
+
.lite-widget-val { font-size: 18px; font-weight: 700; color: #165dff; }
|
|
106
|
+
.font-mono { font-family: monospace; }
|
|
107
|
+
.lite-widget-placeholder { font-size: 11px; color: #86909c; }
|
|
108
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface DashboardGridItem {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
w: number;
|
|
5
|
+
h: number;
|
|
6
|
+
widgetType?: string;
|
|
7
|
+
metricValue?: string | number;
|
|
8
|
+
}
|
|
9
|
+
interface Props {
|
|
10
|
+
title?: string;
|
|
11
|
+
items?: DashboardGridItem[];
|
|
12
|
+
class?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const LiteDashboardGridLayout: import("svelte").Component<Props, {}, "">;
|
|
15
|
+
type LiteDashboardGridLayout = ReturnType<typeof LiteDashboardGridLayout>;
|
|
16
|
+
export default LiteDashboardGridLayout;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export interface DashboardPreset {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
isDefault?: boolean;
|
|
7
|
+
role?: string;
|
|
8
|
+
itemsCount?: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
presets?: DashboardPreset[];
|
|
13
|
+
currentPresetId?: string;
|
|
14
|
+
class?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let {
|
|
18
|
+
presets = [
|
|
19
|
+
{ id: 'p1', name: '高管经营全景大屏', description: '重点监控季度 GMV 与 SLA', isDefault: true, role: 'CEO', itemsCount: 4 },
|
|
20
|
+
{ id: 'p2', name: '财务月结与对账大屏', description: '聚焦大额采购单与资金划转', isDefault: false, role: 'CFO', itemsCount: 3 },
|
|
21
|
+
],
|
|
22
|
+
currentPresetId = 'p1',
|
|
23
|
+
class: className = '',
|
|
24
|
+
}: Props = $props();
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<div
|
|
28
|
+
class="lite-layout-storage {className}"
|
|
29
|
+
data-svadmin-component="LiteDashboardLayoutStorage"
|
|
30
|
+
role="region"
|
|
31
|
+
aria-label="Dashboard Layout Storage"
|
|
32
|
+
>
|
|
33
|
+
<div class="lite-storage-header">
|
|
34
|
+
<span class="lite-storage-icon">📁</span>
|
|
35
|
+
<span class="lite-storage-title">大屏排版预设方案库 (SSR 静态列表)</span>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<div class="lite-presets-list">
|
|
39
|
+
{#each presets as p (p.id)}
|
|
40
|
+
<div class="lite-preset-card" class:lite-preset-active={p.id === currentPresetId}>
|
|
41
|
+
<div class="lite-preset-title-row">
|
|
42
|
+
<span class="lite-preset-name">{p.name}</span>
|
|
43
|
+
{#if p.isDefault}<span class="lite-preset-badge">默认</span>{/if}
|
|
44
|
+
{#if p.id === currentPresetId}<span class="lite-preset-active-tag">[当前激活]</span>{/if}
|
|
45
|
+
</div>
|
|
46
|
+
{#if p.description}<p class="lite-preset-desc">{p.description}</p>{/if}
|
|
47
|
+
<div class="lite-preset-footer">
|
|
48
|
+
<span>角色: {p.role ?? '通用'}</span>
|
|
49
|
+
<span>{p.itemsCount ?? 4} 个小部件</span>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
{/each}
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<style>
|
|
57
|
+
.lite-layout-storage {
|
|
58
|
+
border: 1px solid #e5e6eb;
|
|
59
|
+
border-radius: 6px;
|
|
60
|
+
background: #ffffff;
|
|
61
|
+
font-size: 12px;
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
padding: 10px 14px;
|
|
64
|
+
}
|
|
65
|
+
.lite-storage-header { display: flex; align-items: center; font-weight: 600; color: #1d2129; margin-bottom: 8px; }
|
|
66
|
+
.lite-storage-icon { font-size: 14px; margin-right: 6px; }
|
|
67
|
+
.lite-presets-list { display: flex; flex-direction: column; }
|
|
68
|
+
.lite-preset-card {
|
|
69
|
+
border: 1px solid #f2f3f5;
|
|
70
|
+
background: #fafafa;
|
|
71
|
+
border-radius: 4px;
|
|
72
|
+
padding: 8px 10px;
|
|
73
|
+
margin-bottom: 6px;
|
|
74
|
+
}
|
|
75
|
+
.lite-preset-card:last-child {
|
|
76
|
+
margin-bottom: 0;
|
|
77
|
+
}
|
|
78
|
+
.lite-preset-active {
|
|
79
|
+
border-color: #165dff;
|
|
80
|
+
background: #e8f3ff;
|
|
81
|
+
}
|
|
82
|
+
.lite-preset-title-row { display: flex; align-items: center; }
|
|
83
|
+
.lite-preset-name { font-weight: 600; color: #1d2129; margin-right: 6px; }
|
|
84
|
+
.lite-preset-badge { font-size: 9px; background: #ffffff; color: #165dff; padding: 1px 4px; border: 1px solid #165dff; border-radius: 2px; margin-right: 6px; }
|
|
85
|
+
.lite-preset-active-tag { font-size: 10px; color: #165dff; font-weight: 600; }
|
|
86
|
+
.lite-preset-desc { font-size: 11px; color: #86909c; margin: 4px 0; }
|
|
87
|
+
.lite-preset-footer { display: flex; justify-content: space-between; font-size: 10px; color: #86909c; }
|
|
88
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface DashboardPreset {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
isDefault?: boolean;
|
|
6
|
+
role?: string;
|
|
7
|
+
itemsCount?: number;
|
|
8
|
+
}
|
|
9
|
+
interface Props {
|
|
10
|
+
presets?: DashboardPreset[];
|
|
11
|
+
currentPresetId?: string;
|
|
12
|
+
class?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const LiteDashboardLayoutStorage: import("svelte").Component<Props, {}, "">;
|
|
15
|
+
type LiteDashboardLayoutStorage = ReturnType<typeof LiteDashboardLayoutStorage>;
|
|
16
|
+
export default LiteDashboardLayoutStorage;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
title?: string;
|
|
4
|
+
acceptedFormats?: string[];
|
|
5
|
+
maxFileSizeMb?: number;
|
|
6
|
+
sampleTemplateUrl?: string;
|
|
7
|
+
class?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
let {
|
|
11
|
+
title = '批量数据上传与导入',
|
|
12
|
+
acceptedFormats = ['.csv', '.xlsx', '.json'],
|
|
13
|
+
maxFileSizeMb = 50,
|
|
14
|
+
sampleTemplateUrl = '#',
|
|
15
|
+
class: className = '',
|
|
16
|
+
}: Props = $props();
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<div
|
|
20
|
+
class="lite-import-dropzone {className}"
|
|
21
|
+
data-svadmin-component="LiteDataImportDropzone"
|
|
22
|
+
role="region"
|
|
23
|
+
aria-label="Data Import Dropzone"
|
|
24
|
+
>
|
|
25
|
+
<header class="lite-dropzone-header">
|
|
26
|
+
<h4 class="lite-dropzone-title">{title}</h4>
|
|
27
|
+
<a href={sampleTemplateUrl} class="lite-template-link">下载标准模板文件</a>
|
|
28
|
+
</header>
|
|
29
|
+
|
|
30
|
+
<div class="lite-dropzone-body">
|
|
31
|
+
<form class="lite-upload-form" method="POST" enctype="multipart/form-data">
|
|
32
|
+
<div class="lite-drop-area">
|
|
33
|
+
<div class="lite-drop-icon">📁</div>
|
|
34
|
+
<div class="lite-drop-text">选择或拖拽导入数据文件至此</div>
|
|
35
|
+
<div class="lite-drop-hint">支持格式: {acceptedFormats.join('、')},单个文件上限 {maxFileSizeMb}MB</div>
|
|
36
|
+
<div class="lite-native-file-input">
|
|
37
|
+
<input type="file" name="import_file" accept={acceptedFormats.join(',')} />
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="lite-form-actions">
|
|
41
|
+
<button type="submit" class="lite-submit-btn">开始解析导入</button>
|
|
42
|
+
</div>
|
|
43
|
+
</form>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<style>
|
|
48
|
+
.lite-import-dropzone {
|
|
49
|
+
border: 1px solid #e5e6eb;
|
|
50
|
+
border-radius: 6px;
|
|
51
|
+
background: #ffffff;
|
|
52
|
+
font-size: 12px;
|
|
53
|
+
overflow: hidden;
|
|
54
|
+
}
|
|
55
|
+
.lite-dropzone-header {
|
|
56
|
+
display: flex;
|
|
57
|
+
justify-content: space-between;
|
|
58
|
+
align-items: center;
|
|
59
|
+
padding: 10px 14px;
|
|
60
|
+
background: #f7f8fa;
|
|
61
|
+
border-bottom: 1px solid #e5e6eb;
|
|
62
|
+
}
|
|
63
|
+
.lite-dropzone-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
|
|
64
|
+
.lite-template-link { font-size: 11px; color: #165dff; text-decoration: none; font-weight: 500; }
|
|
65
|
+
.lite-template-link:hover { text-decoration: underline; }
|
|
66
|
+
.lite-dropzone-body { padding: 14px; }
|
|
67
|
+
.lite-drop-area {
|
|
68
|
+
border: 2px dashed #c9cdd4;
|
|
69
|
+
border-radius: 6px;
|
|
70
|
+
padding: 24px;
|
|
71
|
+
text-align: center;
|
|
72
|
+
background: #fafbfc;
|
|
73
|
+
}
|
|
74
|
+
.lite-drop-icon { font-size: 24px; margin-bottom: 8px; }
|
|
75
|
+
.lite-drop-text { font-size: 13px; font-weight: 600; color: #1d2129; margin-bottom: 4px; }
|
|
76
|
+
.lite-drop-hint { font-size: 11px; color: #86909c; margin-bottom: 12px; }
|
|
77
|
+
.lite-native-file-input input { font-size: 11px; }
|
|
78
|
+
.lite-form-actions { margin-top: 12px; display: flex; justify-content: flex-end; }
|
|
79
|
+
.lite-submit-btn {
|
|
80
|
+
background: #165dff;
|
|
81
|
+
color: #ffffff;
|
|
82
|
+
border: none;
|
|
83
|
+
border-radius: 4px;
|
|
84
|
+
padding: 6px 14px;
|
|
85
|
+
font-size: 11px;
|
|
86
|
+
font-weight: 500;
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
}
|
|
89
|
+
</style>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
title?: string;
|
|
3
|
+
acceptedFormats?: string[];
|
|
4
|
+
maxFileSizeMb?: number;
|
|
5
|
+
sampleTemplateUrl?: string;
|
|
6
|
+
class?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const LiteDataImportDropzone: import("svelte").Component<Props, {}, "">;
|
|
9
|
+
type LiteDataImportDropzone = ReturnType<typeof LiteDataImportDropzone>;
|
|
10
|
+
export default LiteDataImportDropzone;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface LineageItem {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
type: string;
|
|
6
|
+
owner: string;
|
|
7
|
+
rows?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
title?: string;
|
|
12
|
+
nodes?: LineageItem[];
|
|
13
|
+
class?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let {
|
|
17
|
+
title = '数据全链路血缘溯源',
|
|
18
|
+
nodes = [
|
|
19
|
+
{ id: '1', name: 'src_erp_orders', type: '源数据表', owner: 'ERP 业务库', rows: '1.2M 行' },
|
|
20
|
+
{ id: '2', name: 'dwd_orders_cleaned', type: 'ETL 清洗', owner: 'Flink 流清洗' },
|
|
21
|
+
{ id: '3', name: 'dws_finance_monthly', type: '财务数仓宽表', owner: '财务数仓宽表', rows: '120K 行' },
|
|
22
|
+
{ id: '4', name: '上市公司经营报表', type: '消费报表', owner: '经营分析大屏' }
|
|
23
|
+
],
|
|
24
|
+
class: className = '',
|
|
25
|
+
}: Props = $props();
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<div
|
|
29
|
+
class="lite-lineage-graph {className}"
|
|
30
|
+
data-svadmin-component="LiteDataLineageGraph"
|
|
31
|
+
role="region"
|
|
32
|
+
aria-label="Data Lineage Graph"
|
|
33
|
+
>
|
|
34
|
+
<header class="lite-lineage-header">
|
|
35
|
+
<h4 class="lite-lineage-title">{title}</h4>
|
|
36
|
+
<span class="lite-lineage-count">{nodes.length} 个血缘节点</span>
|
|
37
|
+
</header>
|
|
38
|
+
|
|
39
|
+
<div class="lite-lineage-body">
|
|
40
|
+
{#each nodes as node, idx (node.id)}
|
|
41
|
+
<div class="lite-lineage-step">
|
|
42
|
+
<div class="lite-step-num">{idx + 1}</div>
|
|
43
|
+
<div class="lite-step-info">
|
|
44
|
+
<div class="lite-step-top">
|
|
45
|
+
<span class="lite-step-name font-mono">{node.name}</span>
|
|
46
|
+
<span class="lite-step-type">{node.type}</span>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="lite-step-owner">归属: {node.owner} {#if node.rows}· {node.rows}{/if}</div>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
{/each}
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<style>
|
|
56
|
+
.lite-lineage-graph {
|
|
57
|
+
border: 1px solid #e5e6eb;
|
|
58
|
+
border-radius: 6px;
|
|
59
|
+
background: #ffffff;
|
|
60
|
+
font-size: 12px;
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
}
|
|
63
|
+
.lite-lineage-header {
|
|
64
|
+
display: flex;
|
|
65
|
+
justify-content: space-between;
|
|
66
|
+
align-items: center;
|
|
67
|
+
padding: 10px 14px;
|
|
68
|
+
background: #f7f8fa;
|
|
69
|
+
border-bottom: 1px solid #e5e6eb;
|
|
70
|
+
}
|
|
71
|
+
.lite-lineage-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
|
|
72
|
+
.lite-lineage-count { font-size: 11px; color: #86909c; }
|
|
73
|
+
.lite-lineage-body { padding: 12px 14px; }
|
|
74
|
+
.lite-lineage-step {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: flex-start;
|
|
77
|
+
padding-bottom: 10px;
|
|
78
|
+
margin-bottom: 10px;
|
|
79
|
+
border-bottom: 1px dashed #e5e6eb;
|
|
80
|
+
}
|
|
81
|
+
.lite-lineage-step:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
|
|
82
|
+
.lite-step-num {
|
|
83
|
+
width: 20px;
|
|
84
|
+
height: 20px;
|
|
85
|
+
line-height: 20px;
|
|
86
|
+
text-align: center;
|
|
87
|
+
border-radius: 50%;
|
|
88
|
+
background: #165dff;
|
|
89
|
+
color: #ffffff;
|
|
90
|
+
font-size: 10px;
|
|
91
|
+
font-weight: 700;
|
|
92
|
+
margin-right: 10px;
|
|
93
|
+
}
|
|
94
|
+
.lite-step-info { flex: 1; }
|
|
95
|
+
.lite-step-top { display: flex; justify-content: space-between; align-items: center; }
|
|
96
|
+
.lite-step-name { font-weight: 600; color: #1d2129; }
|
|
97
|
+
.font-mono { font-family: monospace; }
|
|
98
|
+
.lite-step-type { font-size: 10px; background: #e8f3ff; color: #165dff; padding: 1px 6px; border-radius: 3px; }
|
|
99
|
+
.lite-step-owner { font-size: 11px; color: #86909c; margin-top: 2px; }
|
|
100
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface LineageItem {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
type: string;
|
|
5
|
+
owner: string;
|
|
6
|
+
rows?: string;
|
|
7
|
+
}
|
|
8
|
+
interface Props {
|
|
9
|
+
title?: string;
|
|
10
|
+
nodes?: LineageItem[];
|
|
11
|
+
class?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const LiteDataLineageGraph: import("svelte").Component<Props, {}, "">;
|
|
14
|
+
type LiteDataLineageGraph = ReturnType<typeof LiteDataLineageGraph>;
|
|
15
|
+
export default LiteDataLineageGraph;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface PolicyItem {
|
|
3
|
+
id: string;
|
|
4
|
+
fieldName: string;
|
|
5
|
+
ruleType: string;
|
|
6
|
+
level: string;
|
|
7
|
+
exemptRole: string;
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
title?: string;
|
|
13
|
+
policies?: PolicyItem[];
|
|
14
|
+
class?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let {
|
|
18
|
+
title = '动态数据脱敏策略中心',
|
|
19
|
+
policies = [
|
|
20
|
+
{ id: 'p1', fieldName: 'mobile_phone', ruleType: '手机号脱敏', level: 'L3 机密', exemptRole: '超级管理员', enabled: true },
|
|
21
|
+
{ id: 'p2', fieldName: 'resident_id_card', ruleType: '居民身份证', level: 'L4 极高', exemptRole: '合规风控员', enabled: true },
|
|
22
|
+
{ id: 'p3', fieldName: 'bank_card_number', ruleType: '银行借记卡', level: 'L4 极高', exemptRole: '财务主管', enabled: true },
|
|
23
|
+
{ id: 'p4', fieldName: 'corporate_email', ruleType: '电子邮箱前缀', level: 'L2 内部', exemptRole: '全员', enabled: false }
|
|
24
|
+
],
|
|
25
|
+
class: className = '',
|
|
26
|
+
}: Props = $props();
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<div
|
|
30
|
+
class="lite-mask-policy {className}"
|
|
31
|
+
data-svadmin-component="LiteDataMaskPolicyEngine"
|
|
32
|
+
role="region"
|
|
33
|
+
aria-label="Data Mask Policy Engine"
|
|
34
|
+
>
|
|
35
|
+
<header class="lite-mask-header">
|
|
36
|
+
<div>
|
|
37
|
+
<h4 class="lite-mask-title">{title}</h4>
|
|
38
|
+
<span class="lite-mask-meta">基于密级与角色动态下发,纯前端算法沙箱</span>
|
|
39
|
+
</div>
|
|
40
|
+
<span class="lite-policy-count">{policies.length} 项脱敏策略</span>
|
|
41
|
+
</header>
|
|
42
|
+
|
|
43
|
+
<div class="lite-mask-table-wrap">
|
|
44
|
+
<table class="lite-mask-table">
|
|
45
|
+
<thead>
|
|
46
|
+
<tr>
|
|
47
|
+
<th>字段标识</th>
|
|
48
|
+
<th>算法类型</th>
|
|
49
|
+
<th>安全密级</th>
|
|
50
|
+
<th>豁免角色</th>
|
|
51
|
+
<th>状态</th>
|
|
52
|
+
</tr>
|
|
53
|
+
</thead>
|
|
54
|
+
<tbody>
|
|
55
|
+
{#each policies as p (p.id)}
|
|
56
|
+
<tr class:lite-tr-disabled={!p.enabled}>
|
|
57
|
+
<td class="lite-td-field font-mono">{p.fieldName}</td>
|
|
58
|
+
<td>{p.ruleType}</td>
|
|
59
|
+
<td>
|
|
60
|
+
<span
|
|
61
|
+
class="lite-level-badge"
|
|
62
|
+
class:lite-lvl-high={p.level.includes('L4')}
|
|
63
|
+
class:lite-lvl-warn={p.level.includes('L3')}
|
|
64
|
+
>
|
|
65
|
+
{p.level}
|
|
66
|
+
</span>
|
|
67
|
+
</td>
|
|
68
|
+
<td><span class="lite-role-badge">{p.exemptRole}</span></td>
|
|
69
|
+
<td>
|
|
70
|
+
<span class="lite-status-badge" class:lite-st-on={p.enabled}>
|
|
71
|
+
{p.enabled ? '已启用' : '已停用'}
|
|
72
|
+
</span>
|
|
73
|
+
</td>
|
|
74
|
+
</tr>
|
|
75
|
+
{/each}
|
|
76
|
+
</tbody>
|
|
77
|
+
</table>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<style>
|
|
82
|
+
.lite-mask-policy {
|
|
83
|
+
border: 1px solid #e5e6eb;
|
|
84
|
+
border-radius: 6px;
|
|
85
|
+
background: #ffffff;
|
|
86
|
+
font-size: 12px;
|
|
87
|
+
overflow: hidden;
|
|
88
|
+
}
|
|
89
|
+
.lite-mask-header {
|
|
90
|
+
display: flex;
|
|
91
|
+
justify-content: space-between;
|
|
92
|
+
align-items: center;
|
|
93
|
+
padding: 10px 14px;
|
|
94
|
+
background: #f7f8fa;
|
|
95
|
+
border-bottom: 1px solid #e5e6eb;
|
|
96
|
+
}
|
|
97
|
+
.lite-mask-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
|
|
98
|
+
.lite-mask-meta { font-size: 11px; color: #86909c; display: block; margin-top: 2px; }
|
|
99
|
+
.lite-policy-count { font-size: 11px; color: #165dff; font-weight: 600; }
|
|
100
|
+
.lite-mask-table-wrap { overflow-x: auto; }
|
|
101
|
+
.lite-mask-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; }
|
|
102
|
+
.lite-mask-table th {
|
|
103
|
+
padding: 8px 12px;
|
|
104
|
+
background: #f2f3f5;
|
|
105
|
+
border-bottom: 1px solid #e5e6eb;
|
|
106
|
+
color: #4e5969;
|
|
107
|
+
font-weight: 600;
|
|
108
|
+
}
|
|
109
|
+
.lite-mask-table td {
|
|
110
|
+
padding: 8px 12px;
|
|
111
|
+
border-bottom: 1px solid #f2f3f5;
|
|
112
|
+
color: #1d2129;
|
|
113
|
+
}
|
|
114
|
+
.lite-tr-disabled { opacity: 0.6; }
|
|
115
|
+
.lite-td-field { font-weight: 600; }
|
|
116
|
+
.font-mono { font-family: monospace; }
|
|
117
|
+
.lite-level-badge {
|
|
118
|
+
display: inline-block;
|
|
119
|
+
padding: 1px 6px;
|
|
120
|
+
border-radius: 3px;
|
|
121
|
+
font-size: 10px;
|
|
122
|
+
font-weight: 600;
|
|
123
|
+
background: #f2f3f5;
|
|
124
|
+
color: #4e5969;
|
|
125
|
+
}
|
|
126
|
+
.lite-lvl-high { background: #ffece8; color: #f53f3f; }
|
|
127
|
+
.lite-lvl-warn { background: #fff7e8; color: #ff7d00; }
|
|
128
|
+
.lite-role-badge { background: #e8f3ff; color: #165dff; padding: 1px 6px; border-radius: 3px; font-size: 10px; }
|
|
129
|
+
.lite-status-badge { font-size: 10px; color: #86909c; }
|
|
130
|
+
.lite-st-on { color: #00b42a; font-weight: 600; }
|
|
131
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface PolicyItem {
|
|
2
|
+
id: string;
|
|
3
|
+
fieldName: string;
|
|
4
|
+
ruleType: string;
|
|
5
|
+
level: string;
|
|
6
|
+
exemptRole: string;
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface Props {
|
|
10
|
+
title?: string;
|
|
11
|
+
policies?: PolicyItem[];
|
|
12
|
+
class?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const LiteDataMaskPolicyEngine: import("svelte").Component<Props, {}, "">;
|
|
15
|
+
type LiteDataMaskPolicyEngine = ReturnType<typeof LiteDataMaskPolicyEngine>;
|
|
16
|
+
export default LiteDataMaskPolicyEngine;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
title?: string;
|
|
6
|
+
class?: string;
|
|
7
|
+
children?: Snippet;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
let {
|
|
11
|
+
title = 'Data Dashboard',
|
|
12
|
+
class: className = '',
|
|
13
|
+
children,
|
|
14
|
+
}: Props = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<div
|
|
18
|
+
class="lite-datascreen-container {className}"
|
|
19
|
+
data-svadmin-component="LiteDataScreenContainer"
|
|
20
|
+
>
|
|
21
|
+
<header class="lite-datascreen-header">
|
|
22
|
+
<h2 class="lite-datascreen-title">{title}</h2>
|
|
23
|
+
</header>
|
|
24
|
+
<main class="lite-datascreen-body">
|
|
25
|
+
{#if children}{@render children()}{/if}
|
|
26
|
+
</main>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<style>
|
|
30
|
+
.lite-datascreen-container { background: #0f172a; color: #f8fafc; border-radius: 8px; padding: 24px; min-height: 480px; }
|
|
31
|
+
.lite-datascreen-header { border-bottom: 1px solid #334155; padding-bottom: 14px; margin-bottom: 20px; }
|
|
32
|
+
.lite-datascreen-title { font-size: 18px; font-weight: 700; color: #f8fafc; margin: 0; }
|
|
33
|
+
.lite-datascreen-body { width: 100%; }
|
|
34
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
interface Props {
|
|
3
|
+
title?: string;
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: Snippet;
|
|
6
|
+
}
|
|
7
|
+
declare const LiteDataScreenContainer: import("svelte").Component<Props, {}, "">;
|
|
8
|
+
type LiteDataScreenContainer = ReturnType<typeof LiteDataScreenContainer>;
|
|
9
|
+
export default LiteDataScreenContainer;
|