@svadmin/lite 0.27.0 → 0.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/components/LiteAbacPolicyMatrix.svelte +128 -0
  2. package/dist/components/LiteAbacPolicyMatrix.svelte.d.ts +16 -0
  3. package/dist/components/LiteApiPlayground.svelte +103 -0
  4. package/dist/components/LiteApiPlayground.svelte.d.ts +10 -0
  5. package/dist/components/LiteApprovalChainBuilder.svelte +120 -0
  6. package/dist/components/LiteApprovalChainBuilder.svelte.d.ts +15 -0
  7. package/dist/components/LiteAuditTrailInspector.svelte +166 -0
  8. package/dist/components/LiteAuditTrailInspector.svelte.d.ts +23 -0
  9. package/dist/components/LiteBillingInvoiceDrawer.svelte +100 -0
  10. package/dist/components/LiteBillingInvoiceDrawer.svelte.d.ts +16 -0
  11. package/dist/components/LiteChartAnnotationOverlay.svelte +101 -0
  12. package/dist/components/LiteChartAnnotationOverlay.svelte.d.ts +16 -0
  13. package/dist/components/LiteColumnMappingTable.svelte +105 -0
  14. package/dist/components/LiteColumnMappingTable.svelte.d.ts +14 -0
  15. package/dist/components/LiteDashboardGridLayout.svelte +108 -0
  16. package/dist/components/LiteDashboardGridLayout.svelte.d.ts +16 -0
  17. package/dist/components/LiteDashboardLayoutStorage.svelte +88 -0
  18. package/dist/components/LiteDashboardLayoutStorage.svelte.d.ts +16 -0
  19. package/dist/components/LiteDataImportDropzone.svelte +89 -0
  20. package/dist/components/LiteDataImportDropzone.svelte.d.ts +10 -0
  21. package/dist/components/LiteDataLineageGraph.svelte +100 -0
  22. package/dist/components/LiteDataLineageGraph.svelte.d.ts +15 -0
  23. package/dist/components/LiteDataMaskPolicyEngine.svelte +131 -0
  24. package/dist/components/LiteDataMaskPolicyEngine.svelte.d.ts +16 -0
  25. package/dist/components/LiteDataScreenContainer.svelte +34 -0
  26. package/dist/components/LiteDataScreenContainer.svelte.d.ts +9 -0
  27. package/dist/components/LiteElectronicSealStamp.svelte +56 -0
  28. package/dist/components/LiteElectronicSealStamp.svelte.d.ts +9 -0
  29. package/dist/components/LiteEnvVariableEditor.svelte +114 -0
  30. package/dist/components/LiteEnvVariableEditor.svelte.d.ts +15 -0
  31. package/dist/components/LiteFormulaField.svelte +44 -0
  32. package/dist/components/LiteFormulaField.svelte.d.ts +11 -0
  33. package/dist/components/LiteGeoScatterMap.svelte +117 -0
  34. package/dist/components/LiteGeoScatterMap.svelte.d.ts +16 -0
  35. package/dist/components/LiteHmacSignatureCalculator.svelte +84 -0
  36. package/dist/components/LiteHmacSignatureCalculator.svelte.d.ts +10 -0
  37. package/dist/components/LiteImportPreviewValidator.svelte +136 -0
  38. package/dist/components/LiteImportPreviewValidator.svelte.d.ts +16 -0
  39. package/dist/components/LiteLiveStreamLogViewer.svelte +84 -0
  40. package/dist/components/LiteLiveStreamLogViewer.svelte.d.ts +14 -0
  41. package/dist/components/LiteOmnibarCommandPalette.svelte +111 -0
  42. package/dist/components/LiteOmnibarCommandPalette.svelte.d.ts +15 -0
  43. package/dist/components/LitePeriodComparisonCard.svelte +60 -0
  44. package/dist/components/LitePeriodComparisonCard.svelte.d.ts +11 -0
  45. package/dist/components/LitePermissionSimulator.svelte +90 -0
  46. package/dist/components/LitePermissionSimulator.svelte.d.ts +14 -0
  47. package/dist/components/LitePivotMatrix.svelte +138 -0
  48. package/dist/components/LitePivotMatrix.svelte.d.ts +18 -0
  49. package/dist/components/LitePlanUsageQuotaBar.svelte +96 -0
  50. package/dist/components/LitePlanUsageQuotaBar.svelte.d.ts +15 -0
  51. package/dist/components/LiteQueryAiExplainer.svelte +85 -0
  52. package/dist/components/LiteQueryAiExplainer.svelte.d.ts +10 -0
  53. package/dist/components/LiteScheduledJobManager.svelte +116 -0
  54. package/dist/components/LiteScheduledJobManager.svelte.d.ts +16 -0
  55. package/dist/components/LiteScreenAntiLeakGuard.svelte +56 -0
  56. package/dist/components/LiteScreenAntiLeakGuard.svelte.d.ts +8 -0
  57. package/dist/components/LiteSecureDataExporter.svelte +101 -0
  58. package/dist/components/LiteSecureDataExporter.svelte.d.ts +12 -0
  59. package/dist/components/LiteSqlConsole.svelte +128 -0
  60. package/dist/components/LiteSqlConsole.svelte.d.ts +16 -0
  61. package/dist/components/LiteSystemCapacityForecastCard.svelte +88 -0
  62. package/dist/components/LiteSystemCapacityForecastCard.svelte.d.ts +11 -0
  63. package/dist/components/LiteSystemHealthCheckDashboard.svelte +142 -0
  64. package/dist/components/LiteSystemHealthCheckDashboard.svelte.d.ts +18 -0
  65. package/dist/components/LiteTableAggregationFooter.svelte +76 -0
  66. package/dist/components/LiteTableAggregationFooter.svelte.d.ts +14 -0
  67. package/dist/components/LiteTenantContextSwitcher.svelte +173 -0
  68. package/dist/components/LiteTenantContextSwitcher.svelte.d.ts +27 -0
  69. package/dist/components/LiteTenantQuotasMatrix.svelte +117 -0
  70. package/dist/components/LiteTenantQuotasMatrix.svelte.d.ts +17 -0
  71. package/dist/components/LiteThreadedCommentDrawer.svelte +60 -0
  72. package/dist/components/LiteThreadedCommentDrawer.svelte.d.ts +15 -0
  73. package/dist/components/LiteTierFeatureComparison.svelte +97 -0
  74. package/dist/components/LiteTierFeatureComparison.svelte.d.ts +18 -0
  75. package/dist/components/LiteWebhookSimulator.svelte +120 -0
  76. package/dist/components/LiteWebhookSimulator.svelte.d.ts +11 -0
  77. package/dist/components/LiteWorkflowNodeInspector.svelte +79 -0
  78. package/dist/components/LiteWorkflowNodeInspector.svelte.d.ts +11 -0
  79. package/dist/index.d.ts +40 -0
  80. package/dist/index.js +47 -0
  81. package/package.json +2 -2
@@ -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,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>