@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,10 @@
1
+ interface Props {
2
+ secret?: string;
3
+ payload?: string;
4
+ algorithm?: string;
5
+ signature?: string;
6
+ class?: string;
7
+ }
8
+ declare const LiteHmacSignatureCalculator: import("svelte").Component<Props, {}, "">;
9
+ type LiteHmacSignatureCalculator = ReturnType<typeof LiteHmacSignatureCalculator>;
10
+ export default LiteHmacSignatureCalculator;
@@ -0,0 +1,136 @@
1
+ <script lang="ts">
2
+ interface ValidationError {
3
+ row: number;
4
+ col: string;
5
+ value: string;
6
+ message: string;
7
+ }
8
+
9
+ interface Props {
10
+ title?: string;
11
+ totalRows?: number;
12
+ validRows?: number;
13
+ errors?: ValidationError[];
14
+ class?: string;
15
+ }
16
+
17
+ let {
18
+ title = '导入数据预检与错误定位',
19
+ totalRows = 100,
20
+ validRows = 98,
21
+ errors = [
22
+ { row: 14, col: 'mobile_phone', value: '138000', message: '手机号格式非法,必须为11位国内有效号码' },
23
+ { row: 42, col: 'email', value: 'invalid-email', message: '电子邮箱格式不合规' }
24
+ ],
25
+ class: className = '',
26
+ }: Props = $props();
27
+
28
+ const errorCount = $derived(errors.length);
29
+ </script>
30
+
31
+ <div
32
+ class="lite-preview-validator {className}"
33
+ data-svadmin-component="LiteImportPreviewValidator"
34
+ role="region"
35
+ aria-label="Import Preview Validator"
36
+ >
37
+ <header class="lite-validator-header">
38
+ <h4 class="lite-validator-title">{title}</h4>
39
+ <div class="lite-stats-wrap">
40
+ <span class="lite-stat-total">总记录: {totalRows}</span>
41
+ <span class="lite-stat-valid">合格: {validRows}</span>
42
+ {#if errorCount > 0}
43
+ <span class="lite-stat-err">异常: {errorCount}</span>
44
+ {/if}
45
+ </div>
46
+ </header>
47
+
48
+ <div class="lite-validator-body">
49
+ {#if errorCount === 0}
50
+ <div class="lite-valid-notice">
51
+ ✓ 所有导入记录校验通过,未发现格式或必填项异常。
52
+ </div>
53
+ {:else}
54
+ <div class="lite-errors-list">
55
+ <div class="lite-err-notice">
56
+ 发现 {errorCount} 处数据格式异常,建议修正后重新上传或选择忽略错误行入库。
57
+ </div>
58
+ <table class="lite-errors-table">
59
+ <thead>
60
+ <tr>
61
+ <th>数据行号</th>
62
+ <th>异常列</th>
63
+ <th>当前取值</th>
64
+ <th>失败原因说明</th>
65
+ </tr>
66
+ </thead>
67
+ <tbody>
68
+ {#each errors as err (err.row + err.col)}
69
+ <tr>
70
+ <td class="font-mono">第 {err.row} 行</td>
71
+ <td><code>{err.col}</code></td>
72
+ <td class="lite-err-val">{err.value}</td>
73
+ <td class="lite-err-msg">{err.message}</td>
74
+ </tr>
75
+ {/each}
76
+ </tbody>
77
+ </table>
78
+ </div>
79
+ {/if}
80
+ </div>
81
+ </div>
82
+
83
+ <style>
84
+ .lite-preview-validator {
85
+ border: 1px solid #e5e6eb;
86
+ border-radius: 6px;
87
+ background: #ffffff;
88
+ font-size: 12px;
89
+ overflow: hidden;
90
+ }
91
+ .lite-validator-header {
92
+ display: flex;
93
+ justify-content: space-between;
94
+ align-items: center;
95
+ padding: 10px 14px;
96
+ background: #f7f8fa;
97
+ border-bottom: 1px solid #e5e6eb;
98
+ }
99
+ .lite-validator-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
100
+ .lite-stats-wrap { display: flex; font-size: 11px; font-weight: 500; }
101
+ .lite-stats-wrap > * + * { margin-left: 8px; }
102
+ .lite-stat-total { color: #4e5969; }
103
+ .lite-stat-valid { color: #00b42a; }
104
+ .lite-stat-err { color: #f53f3f; }
105
+ .lite-validator-body { padding: 12px 14px; }
106
+ .lite-valid-notice {
107
+ padding: 10px;
108
+ background: #e8ffea;
109
+ color: #00b42a;
110
+ border-radius: 4px;
111
+ font-weight: 500;
112
+ }
113
+ .lite-err-notice {
114
+ padding: 8px 10px;
115
+ background: #ffece8;
116
+ color: #f53f3f;
117
+ border-radius: 4px;
118
+ font-size: 11px;
119
+ margin-bottom: 10px;
120
+ }
121
+ .lite-errors-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; }
122
+ .lite-errors-table th {
123
+ padding: 6px 10px;
124
+ background: #f2f3f5;
125
+ border-bottom: 1px solid #e5e6eb;
126
+ color: #4e5969;
127
+ }
128
+ .lite-errors-table td {
129
+ padding: 6px 10px;
130
+ border-bottom: 1px solid #f2f3f5;
131
+ }
132
+ .font-mono { font-family: monospace; font-weight: 600; }
133
+ code { font-family: monospace; color: #165dff; }
134
+ .lite-err-val { color: #f53f3f; font-family: monospace; }
135
+ .lite-err-msg { color: #4e5969; }
136
+ </style>
@@ -0,0 +1,16 @@
1
+ interface ValidationError {
2
+ row: number;
3
+ col: string;
4
+ value: string;
5
+ message: string;
6
+ }
7
+ interface Props {
8
+ title?: string;
9
+ totalRows?: number;
10
+ validRows?: number;
11
+ errors?: ValidationError[];
12
+ class?: string;
13
+ }
14
+ declare const LiteImportPreviewValidator: import("svelte").Component<Props, {}, "">;
15
+ type LiteImportPreviewValidator = ReturnType<typeof LiteImportPreviewValidator>;
16
+ export default LiteImportPreviewValidator;
@@ -0,0 +1,84 @@
1
+ <script lang="ts">
2
+ interface LogItem {
3
+ id: string;
4
+ timestamp: string;
5
+ level: string;
6
+ message: string;
7
+ }
8
+
9
+ interface Props {
10
+ title?: string;
11
+ logs?: LogItem[];
12
+ class?: string;
13
+ }
14
+
15
+ let {
16
+ title = '实时日志控制台',
17
+ logs = [
18
+ { id: '1', timestamp: '08:45:10', level: 'INFO', message: '[Gateway] Inbound HTTP POST /api/v1/orders/create (200 OK)' },
19
+ { id: '2', timestamp: '08:45:11', level: 'WARN', message: '[Redis] Cache miss on key "session:usr_9901"' },
20
+ { id: '3', timestamp: '08:45:12', level: 'ERROR', message: '[NotificationService] Third-party SMS webhook timed out' }
21
+ ],
22
+ class: className = '',
23
+ }: Props = $props();
24
+
25
+ function getLevelColor(lvl: string): string {
26
+ if (lvl === 'ERROR') return '#f53f3f';
27
+ if (lvl === 'WARN') return '#ff7d00';
28
+ return '#165dff';
29
+ }
30
+ </script>
31
+
32
+ <div
33
+ class="lite-log-viewer {className}"
34
+ data-svadmin-component="LiteLiveStreamLogViewer"
35
+ role="region"
36
+ aria-label="Live Stream Log Viewer"
37
+ >
38
+ <header class="lite-log-header">
39
+ <h4 class="lite-log-title">{title}</h4>
40
+ <span class="lite-log-count">{logs.length} 条日志记录</span>
41
+ </header>
42
+
43
+ <div class="lite-log-console">
44
+ {#each logs as log (log.id)}
45
+ <div class="lite-log-line font-mono">
46
+ <span class="lite-log-time">{log.timestamp}</span>
47
+ <span class="lite-log-badge" style="color: {getLevelColor(log.level)};">[{log.level}]</span>
48
+ <span class="lite-log-msg">{log.message}</span>
49
+ </div>
50
+ {/each}
51
+ </div>
52
+ </div>
53
+
54
+ <style>
55
+ .lite-log-viewer {
56
+ border: 1px solid #e5e6eb;
57
+ border-radius: 6px;
58
+ background: #ffffff;
59
+ font-size: 12px;
60
+ overflow: hidden;
61
+ }
62
+ .lite-log-header {
63
+ display: flex;
64
+ justify-content: space-between;
65
+ align-items: center;
66
+ padding: 10px 14px;
67
+ background: #f7f8fa;
68
+ border-bottom: 1px solid #e5e6eb;
69
+ }
70
+ .lite-log-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
71
+ .lite-log-count { font-size: 11px; color: #86909c; }
72
+ .lite-log-console {
73
+ background: #1e293b;
74
+ color: #f8fafc;
75
+ padding: 12px 14px;
76
+ font-size: 11px;
77
+ overflow-x: auto;
78
+ }
79
+ .lite-log-line { line-height: 1.6; }
80
+ .font-mono { font-family: monospace; }
81
+ .lite-log-time { color: #94a3b8; margin-right: 6px; }
82
+ .lite-log-badge { font-weight: 700; margin-right: 6px; }
83
+ .lite-log-msg { color: #f8fafc; }
84
+ </style>
@@ -0,0 +1,14 @@
1
+ interface LogItem {
2
+ id: string;
3
+ timestamp: string;
4
+ level: string;
5
+ message: string;
6
+ }
7
+ interface Props {
8
+ title?: string;
9
+ logs?: LogItem[];
10
+ class?: string;
11
+ }
12
+ declare const LiteLiveStreamLogViewer: import("svelte").Component<Props, {}, "">;
13
+ type LiteLiveStreamLogViewer = ReturnType<typeof LiteLiveStreamLogViewer>;
14
+ export default LiteLiveStreamLogViewer;
@@ -0,0 +1,111 @@
1
+ <script lang="ts">
2
+ export interface CommandPaletteItem {
3
+ id: string;
4
+ title: string;
5
+ category?: string;
6
+ description?: string;
7
+ shortcut?: string;
8
+ }
9
+
10
+ interface Props {
11
+ placeholder?: string;
12
+ items?: CommandPaletteItem[];
13
+ class?: string;
14
+ }
15
+
16
+ let {
17
+ placeholder = '全局快捷命令面板 (SSR 静态列表)',
18
+ items = [
19
+ { id: 'nav-dashboard', title: '运营与财务仪表盘', category: '系统导航', shortcut: 'G D' },
20
+ { id: 'act-new-order', title: '新建采购审批流', category: '快捷操作', shortcut: '⌘ N' },
21
+ { id: 'res-order-88', title: '订单 #ORD-2026-9882', category: '业务实体' },
22
+ ],
23
+ class: className = '',
24
+ }: Props = $props();
25
+ </script>
26
+
27
+ <div
28
+ class="lite-omnibar-box {className}"
29
+ data-svadmin-component="LiteOmnibarCommandPalette"
30
+ role="region"
31
+ aria-label="Global Omnibar Command Palette"
32
+ >
33
+ <div class="lite-omnibar-input">
34
+ <span class="lite-search-icon">🔍</span>
35
+ <span class="lite-input-mock">{placeholder}</span>
36
+ <span class="lite-kbd-hint">⌘K</span>
37
+ </div>
38
+
39
+ <div class="lite-omnibar-list">
40
+ <div class="lite-items-header">默认常用指令与导航直达 (SSR 静态降级):</div>
41
+ {#each items as item (item.id)}
42
+ <div class="lite-cmd-row">
43
+ <div class="lite-cmd-main">
44
+ <span class="lite-cmd-title">{item.title}</span>
45
+ {#if item.category}
46
+ <span class="lite-cmd-cat">{item.category}</span>
47
+ {/if}
48
+ </div>
49
+ {#if item.shortcut}
50
+ <span class="lite-cmd-shortcut">{item.shortcut}</span>
51
+ {/if}
52
+ </div>
53
+ {/each}
54
+ </div>
55
+ </div>
56
+
57
+ <style>
58
+ .lite-omnibar-box {
59
+ border: 1px solid #e5e6eb;
60
+ border-radius: 6px;
61
+ background: #ffffff;
62
+ font-size: 12px;
63
+ overflow: hidden;
64
+ }
65
+ .lite-omnibar-input {
66
+ display: flex;
67
+ align-items: center;
68
+ padding: 10px 12px;
69
+ background: #f7f8fa;
70
+ border-bottom: 1px solid #e5e6eb;
71
+ }
72
+ .lite-search-icon { font-size: 12px; margin-right: 8px; }
73
+ .lite-input-mock { flex: 1; color: #86909c; font-size: 12px; margin-right: 8px; }
74
+ .lite-kbd-hint {
75
+ font-size: 10px;
76
+ font-family: monospace;
77
+ background: #ffffff;
78
+ border: 1px solid #e5e6eb;
79
+ padding: 2px 4px;
80
+ border-radius: 3px;
81
+ color: #4e5969;
82
+ }
83
+ .lite-omnibar-list { padding: 8px 12px; }
84
+ .lite-items-header { font-size: 11px; color: #86909c; margin-bottom: 6px; }
85
+ .lite-cmd-row {
86
+ display: flex;
87
+ justify-content: space-between;
88
+ align-items: center;
89
+ padding: 6px 0;
90
+ border-bottom: 1px dashed #f2f3f5;
91
+ }
92
+ .lite-cmd-row:last-child { border-bottom: none; }
93
+ .lite-cmd-main { display: flex; align-items: center; }
94
+ .lite-cmd-title { font-weight: 500; color: #1d2129; margin-right: 6px; }
95
+ .lite-cmd-cat {
96
+ font-size: 10px;
97
+ color: #86909c;
98
+ background: #f2f3f5;
99
+ padding: 1px 4px;
100
+ border-radius: 2px;
101
+ }
102
+ .lite-cmd-shortcut {
103
+ font-size: 10px;
104
+ font-family: monospace;
105
+ background: #f7f8fa;
106
+ border: 1px solid #e5e6eb;
107
+ padding: 1px 4px;
108
+ border-radius: 2px;
109
+ color: #4e5969;
110
+ }
111
+ </style>
@@ -0,0 +1,15 @@
1
+ export interface CommandPaletteItem {
2
+ id: string;
3
+ title: string;
4
+ category?: string;
5
+ description?: string;
6
+ shortcut?: string;
7
+ }
8
+ interface Props {
9
+ placeholder?: string;
10
+ items?: CommandPaletteItem[];
11
+ class?: string;
12
+ }
13
+ declare const LiteOmnibarCommandPalette: import("svelte").Component<Props, {}, "">;
14
+ type LiteOmnibarCommandPalette = ReturnType<typeof LiteOmnibarCommandPalette>;
15
+ export default LiteOmnibarCommandPalette;
@@ -0,0 +1,60 @@
1
+ <script lang="ts">
2
+ interface Props {
3
+ title?: string;
4
+ currentValue?: string | number;
5
+ priorValue?: string | number;
6
+ deltaPercentage?: number;
7
+ periodLabel?: string;
8
+ class?: string;
9
+ }
10
+
11
+ let {
12
+ title = '月度营收环比对比',
13
+ currentValue = '¥ 1,280,000',
14
+ priorValue = '¥ 1,120,000',
15
+ deltaPercentage = 14.28,
16
+ periodLabel = '较上月 (2026-10)',
17
+ class: className = '',
18
+ }: Props = $props();
19
+
20
+ const isUp = $derived(deltaPercentage >= 0);
21
+ </script>
22
+
23
+ <div
24
+ class="lite-period-card {className}"
25
+ data-svadmin-component="LitePeriodComparisonCard"
26
+ role="region"
27
+ aria-label="Period Comparison Card"
28
+ >
29
+ <div class="lite-period-header">
30
+ <span class="lite-period-title">{title}</span>
31
+ <span class="lite-period-badge" class:lite-badge-up={isUp} class:lite-badge-down={!isUp}>
32
+ {isUp ? '↑ +' : '↓ '}{deltaPercentage}%
33
+ </span>
34
+ </div>
35
+
36
+ <div class="lite-period-body">
37
+ <div class="lite-val-current">{currentValue}</div>
38
+ <div class="lite-val-prior">
39
+ 基期数值: <span class="font-mono">{priorValue}</span> ({periodLabel})
40
+ </div>
41
+ </div>
42
+ </div>
43
+
44
+ <style>
45
+ .lite-period-card {
46
+ border: 1px solid #e5e6eb;
47
+ border-radius: 6px;
48
+ background: #ffffff;
49
+ padding: 12px 14px;
50
+ font-size: 12px;
51
+ }
52
+ .lite-period-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
53
+ .lite-period-title { font-weight: 500; color: #4e5969; font-size: 11px; }
54
+ .lite-period-badge { font-size: 11px; font-weight: 700; font-family: monospace; padding: 2px 6px; border-radius: 3px; }
55
+ .lite-badge-up { color: #00b42a; background: #e8ffea; }
56
+ .lite-badge-down { color: #f53f3f; background: #ffece8; }
57
+ .lite-val-current { font-size: 20px; font-weight: 700; color: #1d2129; margin-bottom: 4px; }
58
+ .lite-val-prior { font-size: 11px; color: #86909c; }
59
+ .font-mono { font-family: monospace; color: #4e5969; }
60
+ </style>
@@ -0,0 +1,11 @@
1
+ interface Props {
2
+ title?: string;
3
+ currentValue?: string | number;
4
+ priorValue?: string | number;
5
+ deltaPercentage?: number;
6
+ periodLabel?: string;
7
+ class?: string;
8
+ }
9
+ declare const LitePeriodComparisonCard: import("svelte").Component<Props, {}, "">;
10
+ type LitePeriodComparisonCard = ReturnType<typeof LitePeriodComparisonCard>;
11
+ export default LitePeriodComparisonCard;
@@ -0,0 +1,90 @@
1
+ <script lang="ts">
2
+ export interface SimulationUser {
3
+ id: string;
4
+ name: string;
5
+ department: string;
6
+ securityClearance: string;
7
+ }
8
+
9
+ interface Props {
10
+ title?: string;
11
+ users?: SimulationUser[];
12
+ class?: string;
13
+ }
14
+
15
+ let {
16
+ title = '权限模拟沙箱 (SSR 静态列表)',
17
+ users = [
18
+ { id: 'u1', name: '李思远 (财务主管)', department: '财务结算中心', securityClearance: 'L3' },
19
+ { id: 'u2', name: '王小磊 (开发人员)', department: '技术工程部', securityClearance: 'L1' },
20
+ { id: 'u3', name: '赵宏 (合规安全总监)', department: '信息安全合规处', securityClearance: 'L4' },
21
+ ],
22
+ class: className = '',
23
+ }: Props = $props();
24
+ </script>
25
+
26
+ <div
27
+ class="lite-perm-simulator {className}"
28
+ data-svadmin-component="LitePermissionSimulator"
29
+ role="region"
30
+ aria-label="Permission Simulator"
31
+ >
32
+ <header class="lite-sim-header">
33
+ <div class="lite-sim-title-row">
34
+ <span class="lite-sim-icon">👤</span>
35
+ <h4 class="lite-sim-title">{title}</h4>
36
+ </div>
37
+ <span class="lite-sim-count">可模拟 {users.length} 个角色身份</span>
38
+ </header>
39
+
40
+ <div class="lite-sim-body">
41
+ <div class="lite-sim-users">
42
+ {#each users as u (u.id)}
43
+ <div class="lite-user-card">
44
+ <div class="lite-user-top">
45
+ <span class="lite-user-name">{u.name}</span>
46
+ <span class="lite-user-level font-mono">[{u.securityClearance}]</span>
47
+ </div>
48
+ <div class="lite-user-dept">{u.department}</div>
49
+ </div>
50
+ {/each}
51
+ </div>
52
+ </div>
53
+ </div>
54
+
55
+ <style>
56
+ .lite-perm-simulator {
57
+ border: 1px solid #e5e6eb;
58
+ border-radius: 6px;
59
+ background: #ffffff;
60
+ font-size: 12px;
61
+ overflow: hidden;
62
+ }
63
+ .lite-sim-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-sim-title-row { display: flex; align-items: center; }
72
+ .lite-sim-icon { font-size: 14px; margin-right: 6px; }
73
+ .lite-sim-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
74
+ .lite-sim-count { font-size: 11px; color: #86909c; }
75
+ .lite-sim-body { padding: 12px 14px; }
76
+ .lite-sim-users { display: flex; flex-direction: column; }
77
+ .lite-user-card {
78
+ border: 1px solid #f2f3f5;
79
+ background: #fafafa;
80
+ border-radius: 4px;
81
+ padding: 8px 10px;
82
+ margin-bottom: 6px;
83
+ }
84
+ .lite-user-card:last-child { margin-bottom: 0; }
85
+ .lite-user-top { display: flex; justify-content: space-between; align-items: center; }
86
+ .lite-user-name { font-weight: 600; color: #1d2129; }
87
+ .lite-user-level { font-size: 10px; color: #165dff; font-weight: 600; }
88
+ .font-mono { font-family: monospace; }
89
+ .lite-user-dept { font-size: 11px; color: #86909c; margin-top: 2px; }
90
+ </style>
@@ -0,0 +1,14 @@
1
+ export interface SimulationUser {
2
+ id: string;
3
+ name: string;
4
+ department: string;
5
+ securityClearance: string;
6
+ }
7
+ interface Props {
8
+ title?: string;
9
+ users?: SimulationUser[];
10
+ class?: string;
11
+ }
12
+ declare const LitePermissionSimulator: import("svelte").Component<Props, {}, "">;
13
+ type LitePermissionSimulator = ReturnType<typeof LitePermissionSimulator>;
14
+ export default LitePermissionSimulator;