@svadmin/ui 0.122.0 → 0.126.0
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/app.css +581 -4
- package/dist/app.theme.css +581 -4
- package/dist/components/AbacPolicyMatrix.svelte +356 -0
- package/dist/components/AbacPolicyMatrix.svelte.d.ts +30 -0
- package/dist/components/AboutSettings.svelte +1 -1
- package/dist/components/ActionPalette.svelte +272 -0
- package/dist/components/ActionPalette.svelte.d.ts +23 -0
- package/dist/components/AdminCopilotWidget.svelte +316 -0
- package/dist/components/AdminCopilotWidget.svelte.d.ts +33 -0
- package/dist/components/AnnouncementBanner.svelte +12 -1
- package/dist/components/AnnouncementBanner.svelte.d.ts +4 -0
- package/dist/components/ApiPlayground.svelte +255 -0
- package/dist/components/ApiPlayground.svelte.d.ts +24 -0
- package/dist/components/ApiSettings.svelte +1 -1
- package/dist/components/AppearanceSettings.svelte +1 -1
- package/dist/components/ApprovalChainBuilder.svelte +262 -0
- package/dist/components/ApprovalChainBuilder.svelte.d.ts +20 -0
- package/dist/components/ApprovalTimeline.svelte +8 -1
- package/dist/components/AsyncExportModal.svelte +1 -1
- package/dist/components/AudioFeedbackProvider.svelte +1 -1
- package/dist/components/AuditLogDrawer.svelte +2 -2
- package/dist/components/AuditTrailInspector.svelte +448 -0
- package/dist/components/AuditTrailInspector.svelte.d.ts +44 -0
- package/dist/components/AutoTable.svelte +20 -1
- package/dist/components/AutoTable.svelte.d.ts +2 -0
- package/dist/components/BatchEditModal.svelte +266 -0
- package/dist/components/BatchEditModal.svelte.d.ts +27 -0
- package/dist/components/BillingInvoiceDrawer.svelte +206 -0
- package/dist/components/BillingInvoiceDrawer.svelte.d.ts +30 -0
- package/dist/components/ChartAnnotationOverlay.svelte +228 -0
- package/dist/components/ChartAnnotationOverlay.svelte.d.ts +21 -0
- package/dist/components/CheckCard.svelte +1 -1
- package/dist/components/ClusterTopologyGraph.svelte +317 -0
- package/dist/components/ClusterTopologyGraph.svelte.d.ts +31 -0
- package/dist/components/ColumnHeaderFilter.svelte +6 -6
- package/dist/components/ColumnMappingTable.svelte +174 -0
- package/dist/components/ColumnMappingTable.svelte.d.ts +23 -0
- package/dist/components/ConversionFunnel.svelte +1 -1
- package/dist/components/CursorListFooter.svelte +67 -0
- package/dist/components/CursorListFooter.svelte.d.ts +17 -0
- package/dist/components/DashboardGridLayout.svelte +309 -0
- package/dist/components/DashboardGridLayout.svelte.d.ts +30 -0
- package/dist/components/DashboardLayoutStorage.svelte +278 -0
- package/dist/components/DashboardLayoutStorage.svelte.d.ts +23 -0
- package/dist/components/DataFreshnessIndicator.svelte +149 -0
- package/dist/components/DataFreshnessIndicator.svelte.d.ts +20 -0
- package/dist/components/DataImportDropzone.svelte +215 -0
- package/dist/components/DataImportDropzone.svelte.d.ts +24 -0
- package/dist/components/DataLineageGraph.svelte +203 -0
- package/dist/components/DataLineageGraph.svelte.d.ts +26 -0
- package/dist/components/DataMaskPolicyEngine.svelte +291 -0
- package/dist/components/DataMaskPolicyEngine.svelte.d.ts +25 -0
- package/dist/components/DataScopeRuleEditor.svelte +142 -0
- package/dist/components/DataScopeRuleEditor.svelte.d.ts +19 -0
- package/dist/components/DataScreenContainer.svelte +160 -0
- package/dist/components/DataScreenContainer.svelte.d.ts +15 -0
- package/dist/components/DevTools.svelte +3 -3
- package/dist/components/DualApprovalGate.svelte +132 -65
- package/dist/components/DualApprovalGate.svelte.d.ts +20 -1
- package/dist/components/EditableTable.svelte +2 -2
- package/dist/components/ElectronicSealStamp.svelte +102 -0
- package/dist/components/ElectronicSealStamp.svelte.d.ts +14 -0
- package/dist/components/EnvVariableEditor.svelte +284 -0
- package/dist/components/EnvVariableEditor.svelte.d.ts +17 -0
- package/dist/components/ExcelImportWizard.svelte +2 -2
- package/dist/components/FeatureAnnouncementModal.svelte +173 -0
- package/dist/components/FeatureAnnouncementModal.svelte.d.ts +21 -0
- package/dist/components/FieldRenderer.svelte +1 -1
- package/dist/components/FilterTagBar.svelte +210 -0
- package/dist/components/FilterTagBar.svelte.d.ts +23 -0
- package/dist/components/FormulaField.svelte +149 -0
- package/dist/components/FormulaField.svelte.d.ts +18 -0
- package/dist/components/GeoScatterMap.svelte +225 -0
- package/dist/components/GeoScatterMap.svelte.d.ts +22 -0
- package/dist/components/HmacSignatureCalculator.svelte +199 -0
- package/dist/components/HmacSignatureCalculator.svelte.d.ts +10 -0
- package/dist/components/I18nLanguagePackEditor.svelte +208 -0
- package/dist/components/I18nLanguagePackEditor.svelte.d.ts +17 -0
- package/dist/components/ImportPreviewValidator.svelte +239 -0
- package/dist/components/ImportPreviewValidator.svelte.d.ts +26 -0
- package/dist/components/ImportWizard.svelte +2 -2
- package/dist/components/IncidentWarRoomDrawer.svelte +194 -0
- package/dist/components/IncidentWarRoomDrawer.svelte.d.ts +24 -0
- package/dist/components/InputGroup.svelte +133 -0
- package/dist/components/InputGroup.svelte.d.ts +16 -0
- package/dist/components/JsonSchemaForm.svelte +4 -4
- package/dist/components/LightFilter.svelte +2 -2
- package/dist/components/ListPagination.svelte +39 -3
- package/dist/components/LiveStreamLogViewer.svelte +185 -0
- package/dist/components/LiveStreamLogViewer.svelte.d.ts +21 -0
- package/dist/components/MasterSubTableDrawer.svelte +223 -0
- package/dist/components/MasterSubTableDrawer.svelte.d.ts +25 -0
- package/dist/components/MicroAppRouteSync.svelte +185 -0
- package/dist/components/MicroAppRouteSync.svelte.d.ts +12 -0
- package/dist/components/MicroAppSandbox.svelte +200 -0
- package/dist/components/MicroAppSandbox.svelte.d.ts +16 -0
- package/dist/components/MicroAppStateBusIndicator.svelte +159 -0
- package/dist/components/MicroAppStateBusIndicator.svelte.d.ts +12 -0
- package/dist/components/MockDataInterceptor.svelte +292 -0
- package/dist/components/MockDataInterceptor.svelte.d.ts +27 -0
- package/dist/components/OmnibarCommandPalette.svelte +320 -0
- package/dist/components/OmnibarCommandPalette.svelte.d.ts +27 -0
- package/dist/components/PageSkeleton.svelte +19 -5
- package/dist/components/PageSkeleton.svelte.d.ts +5 -3
- package/dist/components/PeriodComparisonCard.svelte +142 -0
- package/dist/components/PeriodComparisonCard.svelte.d.ts +16 -0
- package/dist/components/PermissionMatrix.svelte +1 -1
- package/dist/components/PermissionSimulator.svelte +319 -0
- package/dist/components/PermissionSimulator.svelte.d.ts +34 -0
- package/dist/components/PivotMatrix.svelte +271 -0
- package/dist/components/PivotMatrix.svelte.d.ts +32 -0
- package/dist/components/PlanUsageQuotaBar.svelte +154 -0
- package/dist/components/PlanUsageQuotaBar.svelte.d.ts +26 -0
- package/dist/components/Popconfirm.svelte +20 -8
- package/dist/components/Popconfirm.svelte.d.ts +3 -1
- package/dist/components/ProSkeleton.svelte +4 -0
- package/dist/components/ProSkeleton.svelte.d.ts +2 -0
- package/dist/components/QueryAiExplainer.svelte +148 -0
- package/dist/components/QueryAiExplainer.svelte.d.ts +16 -0
- package/dist/components/QueryBuilder.svelte +456 -0
- package/dist/components/QueryBuilder.svelte.d.ts +33 -0
- package/dist/components/Rate.svelte +19 -2
- package/dist/components/Result.svelte +36 -4
- package/dist/components/Result.svelte.d.ts +4 -2
- package/dist/components/RolePermissionComparator.svelte +273 -0
- package/dist/components/RolePermissionComparator.svelte.d.ts +28 -0
- package/dist/components/RuleExpressionBuilder.svelte +380 -0
- package/dist/components/RuleExpressionBuilder.svelte.d.ts +31 -0
- package/dist/components/ScheduledJobManager.svelte +225 -0
- package/dist/components/ScheduledJobManager.svelte.d.ts +23 -0
- package/dist/components/SchemaVisualModeler.svelte +2 -2
- package/dist/components/ScreenAntiLeakGuard.svelte +88 -0
- package/dist/components/ScreenAntiLeakGuard.svelte.d.ts +12 -0
- package/dist/components/SecureDataExporter.svelte +296 -0
- package/dist/components/SecureDataExporter.svelte.d.ts +29 -0
- package/dist/components/ServerStatusGrid.svelte +179 -0
- package/dist/components/ServerStatusGrid.svelte.d.ts +21 -0
- package/dist/components/SnapshotTimelineReplay.svelte +219 -0
- package/dist/components/SnapshotTimelineReplay.svelte.d.ts +19 -0
- package/dist/components/Spin.svelte +33 -11
- package/dist/components/Spin.svelte.d.ts +7 -4
- package/dist/components/SqlConsole.svelte +247 -0
- package/dist/components/SqlConsole.svelte.d.ts +20 -0
- package/dist/components/StepWizard.svelte +1 -1
- package/dist/components/Steps.svelte +44 -3
- package/dist/components/SystemCapacityForecastCard.svelte +132 -0
- package/dist/components/SystemCapacityForecastCard.svelte.d.ts +19 -0
- package/dist/components/SystemHealthCheckDashboard.svelte +306 -0
- package/dist/components/SystemHealthCheckDashboard.svelte.d.ts +24 -0
- package/dist/components/TableAggregationFooter.svelte +173 -0
- package/dist/components/TableAggregationFooter.svelte.d.ts +22 -0
- package/dist/components/TaskCenter.svelte +37 -29
- package/dist/components/TenantContextSwitcher.svelte +314 -0
- package/dist/components/TenantContextSwitcher.svelte.d.ts +35 -0
- package/dist/components/TenantQuotasMatrix.svelte +229 -0
- package/dist/components/TenantQuotasMatrix.svelte.d.ts +22 -0
- package/dist/components/ThemeSettingsDrawer.svelte +6 -14
- package/dist/components/ThreadedCommentDrawer.svelte +246 -0
- package/dist/components/ThreadedCommentDrawer.svelte.d.ts +26 -0
- package/dist/components/TierFeatureComparison.svelte +147 -0
- package/dist/components/TierFeatureComparison.svelte.d.ts +28 -0
- package/dist/components/Timeline.svelte +12 -3
- package/dist/components/Timeline.svelte.d.ts +2 -0
- package/dist/components/TreeTransferSelect.svelte +333 -0
- package/dist/components/TreeTransferSelect.svelte.d.ts +18 -0
- package/dist/components/VirtualCardGrid.svelte +180 -0
- package/dist/components/VirtualCardGrid.svelte.d.ts +65 -0
- package/dist/components/WebhookSimulator.svelte +263 -0
- package/dist/components/WebhookSimulator.svelte.d.ts +26 -0
- package/dist/components/WidgetContainer.svelte +204 -0
- package/dist/components/WidgetContainer.svelte.d.ts +31 -0
- package/dist/components/WorkflowExecutionTracker.svelte +131 -0
- package/dist/components/WorkflowExecutionTracker.svelte.d.ts +19 -0
- package/dist/components/WorkflowGraphDesigner.svelte +202 -0
- package/dist/components/WorkflowGraphDesigner.svelte.d.ts +24 -0
- package/dist/components/WorkflowNodeInspector.svelte +217 -0
- package/dist/components/WorkflowNodeInspector.svelte.d.ts +24 -0
- package/dist/components/WorkflowStepper.svelte +1 -1
- package/dist/components/list-i18n.d.ts +7 -0
- package/dist/components/list-i18n.js +14 -0
- package/dist/components/ui/badge/badge.svelte +3 -3
- package/dist/components/ui/button/button.svelte +3 -1
- package/dist/components/ui/button/button.svelte.d.ts +1 -0
- package/dist/components/ui/tooltip/tooltip-content.svelte +1 -1
- package/dist/components/useDynamicLocale.d.svelte.ts +1 -0
- package/dist/components/useDynamicLocale.svelte.d.ts +10 -0
- package/dist/components/useDynamicLocale.svelte.js +40 -0
- package/dist/components/useFormulaEngine.d.svelte.ts +1 -0
- package/dist/components/useFormulaEngine.svelte.d.ts +9 -0
- package/dist/components/useFormulaEngine.svelte.js +209 -0
- package/dist/components/useMicroAppState.d.svelte.ts +1 -0
- package/dist/components/useMicroAppState.svelte.d.ts +17 -0
- package/dist/components/useMicroAppState.svelte.js +38 -0
- package/dist/components/useStorageCache.d.svelte.ts +1 -0
- package/dist/components/useStorageCache.svelte.d.ts +49 -0
- package/dist/components/useStorageCache.svelte.js +229 -0
- package/dist/components.css +5 -1
- package/dist/index.d.ts +75 -3
- package/dist/index.js +118 -2
- package/package.json +4 -4
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { onMount, onDestroy, type Snippet } from 'svelte';
|
|
3
|
+
import { Maximize2, Minimize2, RotateCw, AlertCircle, RefreshCw } from '@lucide/svelte';
|
|
4
|
+
import { cn } from '../utils.js';
|
|
5
|
+
|
|
6
|
+
export interface WidgetContainerProps {
|
|
7
|
+
/** 小部件卡片主标题 */
|
|
8
|
+
title: string;
|
|
9
|
+
/** 辅助说明或指标口径描述 */
|
|
10
|
+
description?: string | undefined;
|
|
11
|
+
/** 数据最后同步时间(Date / 字符串 / 时间戳) */
|
|
12
|
+
lastUpdated?: Date | string | number | undefined;
|
|
13
|
+
/** 是否处于加载骨架屏态 */
|
|
14
|
+
loading?: boolean | undefined;
|
|
15
|
+
/** 查询异常错误信息或错误对象 */
|
|
16
|
+
error?: string | Error | null | undefined;
|
|
17
|
+
/** 刷新按钮是否处于正在加载动画态 */
|
|
18
|
+
refreshing?: boolean | undefined;
|
|
19
|
+
/** 是否允许全屏放大查看,默认 true */
|
|
20
|
+
allowFullscreen?: boolean | undefined;
|
|
21
|
+
/** 是否允许手动刷新,默认 true */
|
|
22
|
+
allowRefresh?: boolean | undefined;
|
|
23
|
+
/** 手动点击刷新按钮回调 */
|
|
24
|
+
onrefresh?: (() => Promise<void> | void) | undefined;
|
|
25
|
+
/** 错误重试点击回调 */
|
|
26
|
+
onretry?: (() => Promise<void> | void) | undefined;
|
|
27
|
+
class?: string | undefined;
|
|
28
|
+
/** 右上角操作区扩展插槽 */
|
|
29
|
+
actions?: Snippet | undefined;
|
|
30
|
+
/** 卡片正文主体插槽 */
|
|
31
|
+
children?: Snippet | undefined;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
let {
|
|
35
|
+
title,
|
|
36
|
+
description,
|
|
37
|
+
lastUpdated,
|
|
38
|
+
loading = false,
|
|
39
|
+
error,
|
|
40
|
+
refreshing = false,
|
|
41
|
+
allowFullscreen = true,
|
|
42
|
+
allowRefresh = true,
|
|
43
|
+
onrefresh,
|
|
44
|
+
onretry,
|
|
45
|
+
class: className = '',
|
|
46
|
+
actions,
|
|
47
|
+
children,
|
|
48
|
+
}: WidgetContainerProps = $props();
|
|
49
|
+
|
|
50
|
+
let isFullscreen = $state(false);
|
|
51
|
+
let localRefreshing = $state(false);
|
|
52
|
+
|
|
53
|
+
const errorMessage = $derived(
|
|
54
|
+
error instanceof Error ? error.message : typeof error === 'string' ? error : ''
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
const formattedTime = $derived.by(() => {
|
|
58
|
+
if (!lastUpdated) return '';
|
|
59
|
+
try {
|
|
60
|
+
const d = new Date(lastUpdated);
|
|
61
|
+
return d.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', second: '2-digit' });
|
|
62
|
+
} catch {
|
|
63
|
+
return String(lastUpdated);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
async function handleRefreshClick() {
|
|
68
|
+
if (localRefreshing || refreshing) return;
|
|
69
|
+
localRefreshing = true;
|
|
70
|
+
try {
|
|
71
|
+
if (onrefresh) {
|
|
72
|
+
await onrefresh();
|
|
73
|
+
}
|
|
74
|
+
} finally {
|
|
75
|
+
setTimeout(() => {
|
|
76
|
+
localRefreshing = false;
|
|
77
|
+
}, 500);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function toggleFullscreen() {
|
|
82
|
+
isFullscreen = !isFullscreen;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function handleKeydown(e: KeyboardEvent) {
|
|
86
|
+
if (e.key === 'Escape' && isFullscreen) {
|
|
87
|
+
isFullscreen = false;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
onMount(() => {
|
|
92
|
+
if (typeof window !== 'undefined') {
|
|
93
|
+
window.addEventListener('keydown', handleKeydown);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
onDestroy(() => {
|
|
98
|
+
if (typeof window !== 'undefined') {
|
|
99
|
+
window.removeEventListener('keydown', handleKeydown);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
</script>
|
|
103
|
+
|
|
104
|
+
<div
|
|
105
|
+
class={cn(
|
|
106
|
+
'rounded-md border border-border bg-card text-card-foreground shadow-xs transition-all flex flex-col',
|
|
107
|
+
isFullscreen
|
|
108
|
+
? 'fixed inset-0 z-50 rounded-none border-0 p-6 bg-background overflow-auto'
|
|
109
|
+
: 'p-4',
|
|
110
|
+
className
|
|
111
|
+
)}
|
|
112
|
+
data-svadmin-component="WidgetContainer"
|
|
113
|
+
data-fullscreen={isFullscreen ? 'true' : 'false'}
|
|
114
|
+
>
|
|
115
|
+
<!-- Widget Header -->
|
|
116
|
+
<header class="flex items-start justify-between gap-3 border-b border-border pb-3 mb-3 shrink-0">
|
|
117
|
+
<div class="min-w-0 flex-1">
|
|
118
|
+
<div class="flex items-center gap-2">
|
|
119
|
+
<h3 class={cn('font-bold text-foreground truncate', isFullscreen ? 'text-lg' : 'text-sm')}>
|
|
120
|
+
{title}
|
|
121
|
+
</h3>
|
|
122
|
+
{#if formattedTime}
|
|
123
|
+
<span class="font-mono text-xs text-muted-foreground select-none">
|
|
124
|
+
({formattedTime})
|
|
125
|
+
</span>
|
|
126
|
+
{/if}
|
|
127
|
+
</div>
|
|
128
|
+
{#if description}
|
|
129
|
+
<p class="text-xs text-muted-foreground mt-0.5 truncate">{description}</p>
|
|
130
|
+
{/if}
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
<!-- Header Action Toolbar -->
|
|
134
|
+
<div class="flex items-center gap-1 shrink-0 select-none text-xs">
|
|
135
|
+
{#if actions}
|
|
136
|
+
{@render actions()}
|
|
137
|
+
{/if}
|
|
138
|
+
|
|
139
|
+
{#if allowRefresh}
|
|
140
|
+
<button
|
|
141
|
+
type="button"
|
|
142
|
+
class="rounded-md p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer"
|
|
143
|
+
onclick={handleRefreshClick}
|
|
144
|
+
disabled={localRefreshing || refreshing}
|
|
145
|
+
title="刷新数据"
|
|
146
|
+
aria-label="Refresh widget"
|
|
147
|
+
>
|
|
148
|
+
<RotateCw class={cn('h-3.5 w-3.5', (localRefreshing || refreshing) && 'animate-spin text-primary')} />
|
|
149
|
+
</button>
|
|
150
|
+
{/if}
|
|
151
|
+
|
|
152
|
+
{#if allowFullscreen}
|
|
153
|
+
<button
|
|
154
|
+
type="button"
|
|
155
|
+
class="rounded-md p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer"
|
|
156
|
+
onclick={toggleFullscreen}
|
|
157
|
+
title={isFullscreen ? '退出全屏 (ESC)' : '全屏放大'}
|
|
158
|
+
aria-label={isFullscreen ? 'Exit fullscreen' : 'Enter fullscreen'}
|
|
159
|
+
>
|
|
160
|
+
{#if isFullscreen}
|
|
161
|
+
<Minimize2 class="h-3.5 w-3.5" />
|
|
162
|
+
{:else}
|
|
163
|
+
<Maximize2 class="h-3.5 w-3.5" />
|
|
164
|
+
{/if}
|
|
165
|
+
</button>
|
|
166
|
+
{/if}
|
|
167
|
+
</div>
|
|
168
|
+
</header>
|
|
169
|
+
|
|
170
|
+
<!-- Widget Body -->
|
|
171
|
+
<div class="flex-1 min-h-0 flex flex-col justify-center">
|
|
172
|
+
{#if loading}
|
|
173
|
+
<!-- Loading Skeleton Layout -->
|
|
174
|
+
<div class="space-y-3 py-4 animate-pulse">
|
|
175
|
+
<div class="h-4 bg-muted rounded w-2/5"></div>
|
|
176
|
+
<div class="h-28 bg-muted/60 rounded w-full"></div>
|
|
177
|
+
<div class="h-3 bg-muted rounded w-3/4"></div>
|
|
178
|
+
</div>
|
|
179
|
+
{:else if errorMessage}
|
|
180
|
+
<!-- Error & Retry State -->
|
|
181
|
+
<div class="py-8 flex flex-col items-center justify-center text-center space-y-2.5">
|
|
182
|
+
<div class="h-9 w-9 rounded-full bg-destructive/10 text-destructive flex items-center justify-center ring-4 ring-destructive/20">
|
|
183
|
+
<AlertCircle class="h-5 w-5" />
|
|
184
|
+
</div>
|
|
185
|
+
<div>
|
|
186
|
+
<h4 class="font-semibold text-xs text-foreground">小部件数据拉取失败</h4>
|
|
187
|
+
<p class="text-xs text-destructive max-w-xs mt-0.5">{errorMessage}</p>
|
|
188
|
+
</div>
|
|
189
|
+
{#if onretry || onrefresh}
|
|
190
|
+
<button
|
|
191
|
+
type="button"
|
|
192
|
+
class="inline-flex items-center gap-1 rounded-md border border-border bg-card px-2.5 py-1 text-xs font-medium text-foreground hover:bg-muted transition-colors cursor-pointer"
|
|
193
|
+
onclick={() => (onretry ? onretry() : onrefresh?.())}
|
|
194
|
+
>
|
|
195
|
+
<RefreshCw class="h-3 w-3" />
|
|
196
|
+
<span>重新加载</span>
|
|
197
|
+
</button>
|
|
198
|
+
{/if}
|
|
199
|
+
</div>
|
|
200
|
+
{:else if children}
|
|
201
|
+
{@render children()}
|
|
202
|
+
{/if}
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type Snippet } from 'svelte';
|
|
2
|
+
export interface WidgetContainerProps {
|
|
3
|
+
/** 小部件卡片主标题 */
|
|
4
|
+
title: string;
|
|
5
|
+
/** 辅助说明或指标口径描述 */
|
|
6
|
+
description?: string | undefined;
|
|
7
|
+
/** 数据最后同步时间(Date / 字符串 / 时间戳) */
|
|
8
|
+
lastUpdated?: Date | string | number | undefined;
|
|
9
|
+
/** 是否处于加载骨架屏态 */
|
|
10
|
+
loading?: boolean | undefined;
|
|
11
|
+
/** 查询异常错误信息或错误对象 */
|
|
12
|
+
error?: string | Error | null | undefined;
|
|
13
|
+
/** 刷新按钮是否处于正在加载动画态 */
|
|
14
|
+
refreshing?: boolean | undefined;
|
|
15
|
+
/** 是否允许全屏放大查看,默认 true */
|
|
16
|
+
allowFullscreen?: boolean | undefined;
|
|
17
|
+
/** 是否允许手动刷新,默认 true */
|
|
18
|
+
allowRefresh?: boolean | undefined;
|
|
19
|
+
/** 手动点击刷新按钮回调 */
|
|
20
|
+
onrefresh?: (() => Promise<void> | void) | undefined;
|
|
21
|
+
/** 错误重试点击回调 */
|
|
22
|
+
onretry?: (() => Promise<void> | void) | undefined;
|
|
23
|
+
class?: string | undefined;
|
|
24
|
+
/** 右上角操作区扩展插槽 */
|
|
25
|
+
actions?: Snippet | undefined;
|
|
26
|
+
/** 卡片正文主体插槽 */
|
|
27
|
+
children?: Snippet | undefined;
|
|
28
|
+
}
|
|
29
|
+
declare const WidgetContainer: import("svelte").Component<WidgetContainerProps, {}, "">;
|
|
30
|
+
type WidgetContainer = ReturnType<typeof WidgetContainer>;
|
|
31
|
+
export default WidgetContainer;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { CheckCircle2, Clock, XCircle, User, MessageSquareQuote } from '@lucide/svelte';
|
|
3
|
+
import { cn } from '../utils.js';
|
|
4
|
+
|
|
5
|
+
export type ExecutionStatus = 'completed' | 'current' | 'waiting' | 'rejected';
|
|
6
|
+
|
|
7
|
+
export interface ExecutionStep {
|
|
8
|
+
id: string;
|
|
9
|
+
nodeTitle: string;
|
|
10
|
+
status: ExecutionStatus;
|
|
11
|
+
handlerName?: string | undefined;
|
|
12
|
+
actionTime?: string | undefined;
|
|
13
|
+
durationText?: string | undefined;
|
|
14
|
+
comment?: string | undefined;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface WorkflowExecutionTrackerProps {
|
|
18
|
+
instanceId: string;
|
|
19
|
+
flowName?: string | undefined;
|
|
20
|
+
steps: ExecutionStep[];
|
|
21
|
+
class?: string | undefined;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
let {
|
|
25
|
+
instanceId,
|
|
26
|
+
flowName = '费用报销与采购付款审批流',
|
|
27
|
+
steps = [],
|
|
28
|
+
class: className = '',
|
|
29
|
+
}: WorkflowExecutionTrackerProps = $props();
|
|
30
|
+
|
|
31
|
+
function getStatusBadge(status: ExecutionStatus) {
|
|
32
|
+
switch (status) {
|
|
33
|
+
case 'completed':
|
|
34
|
+
return {
|
|
35
|
+
icon: CheckCircle2,
|
|
36
|
+
color: 'text-success',
|
|
37
|
+
bg: 'bg-success/10 border-success/30',
|
|
38
|
+
label: '已通过',
|
|
39
|
+
};
|
|
40
|
+
case 'current':
|
|
41
|
+
return {
|
|
42
|
+
icon: Clock,
|
|
43
|
+
color: 'text-primary',
|
|
44
|
+
bg: 'bg-primary/10 border-primary/30',
|
|
45
|
+
label: '审批流转中',
|
|
46
|
+
};
|
|
47
|
+
case 'rejected':
|
|
48
|
+
return {
|
|
49
|
+
icon: XCircle,
|
|
50
|
+
color: 'text-destructive',
|
|
51
|
+
bg: 'bg-destructive/10 border-destructive/30',
|
|
52
|
+
label: '已驳回',
|
|
53
|
+
};
|
|
54
|
+
case 'waiting':
|
|
55
|
+
default:
|
|
56
|
+
return {
|
|
57
|
+
icon: Clock,
|
|
58
|
+
color: 'text-muted-foreground',
|
|
59
|
+
bg: 'bg-muted border-border',
|
|
60
|
+
label: '待流转',
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
<div
|
|
67
|
+
class={cn('rounded-xl border border-border bg-card p-5 text-card-foreground shadow-xs space-y-4', className)}
|
|
68
|
+
data-svadmin-component="WorkflowExecutionTracker"
|
|
69
|
+
>
|
|
70
|
+
<!-- Header -->
|
|
71
|
+
<header class="flex flex-wrap items-center justify-between gap-3 border-b border-border pb-3">
|
|
72
|
+
<div>
|
|
73
|
+
<h3 class="font-bold text-sm text-foreground">{flowName}</h3>
|
|
74
|
+
<p class="text-xs text-muted-foreground font-mono mt-0.5">实例流水号: {instanceId}</p>
|
|
75
|
+
</div>
|
|
76
|
+
<span class="text-xs font-mono text-muted-foreground">共 {steps.length} 个流转环节</span>
|
|
77
|
+
</header>
|
|
78
|
+
|
|
79
|
+
<!-- Execution Timeline Steps -->
|
|
80
|
+
<div class="relative pl-6 space-y-6 before:absolute before:left-2.5 before:top-3 before:bottom-3 before:w-0.5 before:bg-border">
|
|
81
|
+
{#each steps as step (step.id)}
|
|
82
|
+
{@const badge = getStatusBadge(step.status)}
|
|
83
|
+
<div class="relative flex items-start gap-3 group text-xs font-mono" data-execution-step={step.id}>
|
|
84
|
+
<!-- Status Dot Pin on Timeline -->
|
|
85
|
+
<span
|
|
86
|
+
class={cn(
|
|
87
|
+
'absolute -left-6 top-1 h-5 w-5 rounded-full flex items-center justify-center border bg-background shrink-0 z-10',
|
|
88
|
+
badge.color,
|
|
89
|
+
step.status === 'current' && 'ring-4 ring-primary/20 animate-pulse'
|
|
90
|
+
)}
|
|
91
|
+
>
|
|
92
|
+
<badge.icon class="h-3 w-3" />
|
|
93
|
+
</span>
|
|
94
|
+
|
|
95
|
+
<!-- Step Detail Box -->
|
|
96
|
+
<div class="flex-1 rounded-lg border border-border bg-muted/10 p-3 space-y-2">
|
|
97
|
+
<div class="flex flex-wrap items-center justify-between gap-2">
|
|
98
|
+
<span class="font-bold text-foreground text-xs">{step.nodeTitle}</span>
|
|
99
|
+
<div class="flex items-center gap-2">
|
|
100
|
+
{#if step.durationText}
|
|
101
|
+
<span class="text-[10px] text-muted-foreground">耗时: {step.durationText}</span>
|
|
102
|
+
{/if}
|
|
103
|
+
<span class={cn('px-2 py-0.5 rounded-full border text-[10px] font-semibold', badge.bg, badge.color)}>
|
|
104
|
+
{badge.label}
|
|
105
|
+
</span>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
{#if step.handlerName}
|
|
110
|
+
<div class="flex items-center gap-3 text-muted-foreground text-[11px]">
|
|
111
|
+
<span class="flex items-center gap-1 font-sans">
|
|
112
|
+
<User class="h-3 w-3" />
|
|
113
|
+
{step.handlerName}
|
|
114
|
+
</span>
|
|
115
|
+
{#if step.actionTime}
|
|
116
|
+
<span class="text-[10px]">{step.actionTime}</span>
|
|
117
|
+
{/if}
|
|
118
|
+
</div>
|
|
119
|
+
{/if}
|
|
120
|
+
|
|
121
|
+
{#if step.comment}
|
|
122
|
+
<div class="rounded bg-background p-2 border border-border/80 text-[11px] text-foreground flex items-start gap-1.5 font-sans leading-relaxed">
|
|
123
|
+
<MessageSquareQuote class="h-3.5 w-3.5 text-muted-foreground shrink-0 mt-0.5" />
|
|
124
|
+
<span>{step.comment}</span>
|
|
125
|
+
</div>
|
|
126
|
+
{/if}
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
{/each}
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type ExecutionStatus = 'completed' | 'current' | 'waiting' | 'rejected';
|
|
2
|
+
export interface ExecutionStep {
|
|
3
|
+
id: string;
|
|
4
|
+
nodeTitle: string;
|
|
5
|
+
status: ExecutionStatus;
|
|
6
|
+
handlerName?: string | undefined;
|
|
7
|
+
actionTime?: string | undefined;
|
|
8
|
+
durationText?: string | undefined;
|
|
9
|
+
comment?: string | undefined;
|
|
10
|
+
}
|
|
11
|
+
export interface WorkflowExecutionTrackerProps {
|
|
12
|
+
instanceId: string;
|
|
13
|
+
flowName?: string | undefined;
|
|
14
|
+
steps: ExecutionStep[];
|
|
15
|
+
class?: string | undefined;
|
|
16
|
+
}
|
|
17
|
+
declare const WorkflowExecutionTracker: import("svelte").Component<WorkflowExecutionTrackerProps, {}, "">;
|
|
18
|
+
type WorkflowExecutionTracker = ReturnType<typeof WorkflowExecutionTracker>;
|
|
19
|
+
export default WorkflowExecutionTracker;
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { untrack } from 'svelte';
|
|
3
|
+
import { Play, CheckCircle2, GitBranch, UserCheck, Send, Plus, Trash2, ArrowDown } from '@lucide/svelte';
|
|
4
|
+
import { cn } from '../utils.js';
|
|
5
|
+
|
|
6
|
+
export type WorkflowNodeType = 'start' | 'approval' | 'condition' | 'cc' | 'end';
|
|
7
|
+
|
|
8
|
+
export interface WorkflowGraphNode {
|
|
9
|
+
id: string;
|
|
10
|
+
type: WorkflowNodeType;
|
|
11
|
+
title: string;
|
|
12
|
+
description?: string | undefined;
|
|
13
|
+
assigneeText?: string | undefined;
|
|
14
|
+
conditionText?: string | undefined;
|
|
15
|
+
nextNodes?: string[] | undefined;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface WorkflowGraphDesignerProps {
|
|
19
|
+
/** 初始节点流程列表 */
|
|
20
|
+
initialNodes?: WorkflowGraphNode[] | undefined;
|
|
21
|
+
/** 是否只读展示 */
|
|
22
|
+
readOnly?: boolean | undefined;
|
|
23
|
+
/** 节点变动回调 */
|
|
24
|
+
onnodeschange?: ((nodes: WorkflowGraphNode[]) => void) | undefined;
|
|
25
|
+
/** 点击选中节点回调 */
|
|
26
|
+
onselectnode?: ((node: WorkflowGraphNode) => void) | undefined;
|
|
27
|
+
class?: string | undefined;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const defaultStarterNodes: WorkflowGraphNode[] = [
|
|
31
|
+
{ id: 'node-start', type: 'start', title: '发起审批申请', description: '员工提交请假或报销申请' },
|
|
32
|
+
{ id: 'node-cond-1', type: 'condition', title: '金额阈值判断', conditionText: '报销金额 >= ¥10,000' },
|
|
33
|
+
{ id: 'node-appr-1', type: 'approval', title: '部门直属主管初审', assigneeText: '直属部门经理 (会签)' },
|
|
34
|
+
{ id: 'node-appr-2', type: 'approval', title: '财务总监终审', assigneeText: '财务总监 (一票否决制)' },
|
|
35
|
+
{ id: 'node-cc-1', type: 'cc', title: '抄送行政与出纳', assigneeText: '抄送: 出纳组、人力资源部' },
|
|
36
|
+
{ id: 'node-end', type: 'end', title: '流程结束', description: '自动归档并触发打款 Webhook' },
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
let {
|
|
40
|
+
initialNodes = defaultStarterNodes,
|
|
41
|
+
readOnly = false,
|
|
42
|
+
onnodeschange,
|
|
43
|
+
onselectnode,
|
|
44
|
+
class: className = '',
|
|
45
|
+
}: WorkflowGraphDesignerProps = $props();
|
|
46
|
+
|
|
47
|
+
let nodes = $state<WorkflowGraphNode[]>(untrack(() => initialNodes));
|
|
48
|
+
let selectedNodeId = $state<string | null>(null);
|
|
49
|
+
|
|
50
|
+
function makeId(): string {
|
|
51
|
+
return Math.random().toString(36).substring(2, 9);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function addNodeAfter(index: number, type: WorkflowNodeType) {
|
|
55
|
+
if (readOnly) return;
|
|
56
|
+
const newNode: WorkflowGraphNode = {
|
|
57
|
+
id: `node-${makeId()}`,
|
|
58
|
+
type,
|
|
59
|
+
title: type === 'approval' ? '新增审批节点' : type === 'condition' ? '新增条件网关' : '新增抄送节点',
|
|
60
|
+
assigneeText: type === 'approval' ? '指定主管' : undefined,
|
|
61
|
+
conditionText: type === 'condition' ? '满足自定义表达式' : undefined,
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const next = [...nodes];
|
|
65
|
+
next.splice(index + 1, 0, newNode);
|
|
66
|
+
nodes = next;
|
|
67
|
+
onnodeschange?.(nodes);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function removeNode(id: string) {
|
|
71
|
+
if (readOnly) return;
|
|
72
|
+
nodes = nodes.filter((n) => n.id !== id);
|
|
73
|
+
if (selectedNodeId === id) selectedNodeId = null;
|
|
74
|
+
onnodeschange?.(nodes);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function getNodeTone(type: WorkflowNodeType) {
|
|
78
|
+
switch (type) {
|
|
79
|
+
case 'start':
|
|
80
|
+
return { badge: 'bg-primary/10 text-primary border-primary/30', icon: Play };
|
|
81
|
+
case 'approval':
|
|
82
|
+
return { badge: 'bg-warning/10 text-warning border-warning/30', icon: UserCheck };
|
|
83
|
+
case 'condition':
|
|
84
|
+
return { badge: 'bg-accent/30 text-foreground border-border', icon: GitBranch };
|
|
85
|
+
case 'cc':
|
|
86
|
+
return { badge: 'bg-muted text-muted-foreground border-border', icon: Send };
|
|
87
|
+
case 'end':
|
|
88
|
+
default:
|
|
89
|
+
return { badge: 'bg-success/10 text-success border-success/30', icon: CheckCircle2 };
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
</script>
|
|
93
|
+
|
|
94
|
+
<div
|
|
95
|
+
class={cn('rounded-xl border border-border bg-card p-5 text-card-foreground shadow-xs flex flex-col space-y-4', className)}
|
|
96
|
+
data-svadmin-component="WorkflowGraphDesigner"
|
|
97
|
+
>
|
|
98
|
+
<header class="flex items-center justify-between border-b border-border pb-3">
|
|
99
|
+
<div>
|
|
100
|
+
<h3 class="font-bold text-sm text-foreground">复杂审批流可视化编排设计器</h3>
|
|
101
|
+
<p class="text-xs text-muted-foreground mt-0.5">支持条件分支网关、审批人策略、多级会签与抄送链路设计</p>
|
|
102
|
+
</div>
|
|
103
|
+
<span class="text-xs font-mono text-muted-foreground">共 {nodes.length} 个编排节点</span>
|
|
104
|
+
</header>
|
|
105
|
+
|
|
106
|
+
<!-- Flow Visual Column -->
|
|
107
|
+
<div class="flex flex-col items-center py-4 space-y-3 overflow-y-auto max-h-[520px]">
|
|
108
|
+
{#each nodes as node, idx (node.id)}
|
|
109
|
+
{@const tone = getNodeTone(node.type)}
|
|
110
|
+
<div class="flex flex-col items-center w-full max-w-md">
|
|
111
|
+
<!-- Node Card -->
|
|
112
|
+
<div
|
|
113
|
+
role="button"
|
|
114
|
+
tabindex="0"
|
|
115
|
+
onkeydown={(e) => { if (e.key === "Enter" || e.key === " ") { selectedNodeId = node.id; onselectnode?.(node); } }}
|
|
116
|
+
class={cn(
|
|
117
|
+
'w-full rounded-xl border p-4 text-left transition-all cursor-pointer relative shadow-2xs group flex items-start gap-3',
|
|
118
|
+
selectedNodeId === node.id
|
|
119
|
+
? 'border-primary ring-2 ring-primary/20 bg-primary/5'
|
|
120
|
+
: 'border-border bg-card hover:border-primary/50'
|
|
121
|
+
)}
|
|
122
|
+
onclick={() => {
|
|
123
|
+
selectedNodeId = node.id;
|
|
124
|
+
onselectnode?.(node);
|
|
125
|
+
}}
|
|
126
|
+
data-workflow-node={node.id}
|
|
127
|
+
>
|
|
128
|
+
<div class={cn('h-8 w-8 rounded-lg flex items-center justify-center shrink-0 border', tone.badge)}>
|
|
129
|
+
<tone.icon class="h-4 w-4" />
|
|
130
|
+
</div>
|
|
131
|
+
|
|
132
|
+
<div class="flex-1 min-w-0 text-xs">
|
|
133
|
+
<div class="flex items-center justify-between gap-2">
|
|
134
|
+
<span class="font-bold text-foreground text-xs truncate group-hover:text-primary transition-colors">
|
|
135
|
+
{node.title}
|
|
136
|
+
</span>
|
|
137
|
+
<span class="font-mono text-[10px] text-muted-foreground uppercase">{node.type}</span>
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
{#if node.assigneeText}
|
|
141
|
+
<p class="text-muted-foreground font-mono text-[11px] mt-1 flex items-center gap-1">
|
|
142
|
+
<span>👤</span>
|
|
143
|
+
<span>{node.assigneeText}</span>
|
|
144
|
+
</p>
|
|
145
|
+
{/if}
|
|
146
|
+
|
|
147
|
+
{#if node.conditionText}
|
|
148
|
+
<p class="text-warning font-mono text-[11px] mt-1 flex items-center gap-1 bg-warning/5 px-1.5 py-0.5 rounded border border-warning/20">
|
|
149
|
+
<span>⌥ 判定:</span>
|
|
150
|
+
<span>{node.conditionText}</span>
|
|
151
|
+
</p>
|
|
152
|
+
{/if}
|
|
153
|
+
|
|
154
|
+
{#if node.description}
|
|
155
|
+
<p class="text-muted-foreground text-[11px] mt-1">{node.description}</p>
|
|
156
|
+
{/if}
|
|
157
|
+
</div>
|
|
158
|
+
|
|
159
|
+
{#if !readOnly && node.type !== 'start' && node.type !== 'end'}
|
|
160
|
+
<button
|
|
161
|
+
type="button"
|
|
162
|
+
class="opacity-0 group-hover:opacity-100 p-1 text-muted-foreground hover:text-destructive hover:bg-destructive/10 rounded transition-all cursor-pointer"
|
|
163
|
+
onclick={(e) => { e.stopPropagation(); removeNode(node.id); }}
|
|
164
|
+
aria-label="Remove node"
|
|
165
|
+
>
|
|
166
|
+
<Trash2 class="h-3.5 w-3.5" />
|
|
167
|
+
</button>
|
|
168
|
+
{/if}
|
|
169
|
+
</div>
|
|
170
|
+
|
|
171
|
+
<!-- Downward Connector Arrow & Add Node Button -->
|
|
172
|
+
{#if idx < nodes.length - 1}
|
|
173
|
+
<div class="flex flex-col items-center my-1 select-none relative group/line">
|
|
174
|
+
<div class="h-5 w-0.5 bg-border group-hover/line:bg-primary transition-colors"></div>
|
|
175
|
+
{#if !readOnly}
|
|
176
|
+
<div class="flex items-center gap-1">
|
|
177
|
+
<button
|
|
178
|
+
type="button"
|
|
179
|
+
class="h-5 px-2 rounded-full border border-dashed border-border bg-background hover:border-primary text-muted-foreground hover:text-primary text-[10px] font-mono flex items-center gap-0.5 transition-all cursor-pointer"
|
|
180
|
+
onclick={() => addNodeAfter(idx, 'approval')}
|
|
181
|
+
>
|
|
182
|
+
<Plus class="h-2.5 w-2.5" />
|
|
183
|
+
<span>审批</span>
|
|
184
|
+
</button>
|
|
185
|
+
<button
|
|
186
|
+
type="button"
|
|
187
|
+
class="h-5 px-2 rounded-full border border-dashed border-border bg-background hover:border-primary text-muted-foreground hover:text-primary text-[10px] font-mono flex items-center gap-0.5 transition-all cursor-pointer"
|
|
188
|
+
onclick={() => addNodeAfter(idx, 'condition')}
|
|
189
|
+
>
|
|
190
|
+
<Plus class="h-2.5 w-2.5" />
|
|
191
|
+
<span>分支</span>
|
|
192
|
+
</button>
|
|
193
|
+
</div>
|
|
194
|
+
{/if}
|
|
195
|
+
<div class="h-5 w-0.5 bg-border group-hover/line:bg-primary transition-colors"></div>
|
|
196
|
+
<ArrowDown class="h-3.5 w-3.5 text-muted-foreground -mt-1" />
|
|
197
|
+
</div>
|
|
198
|
+
{/if}
|
|
199
|
+
</div>
|
|
200
|
+
{/each}
|
|
201
|
+
</div>
|
|
202
|
+
</div>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type WorkflowNodeType = 'start' | 'approval' | 'condition' | 'cc' | 'end';
|
|
2
|
+
export interface WorkflowGraphNode {
|
|
3
|
+
id: string;
|
|
4
|
+
type: WorkflowNodeType;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string | undefined;
|
|
7
|
+
assigneeText?: string | undefined;
|
|
8
|
+
conditionText?: string | undefined;
|
|
9
|
+
nextNodes?: string[] | undefined;
|
|
10
|
+
}
|
|
11
|
+
export interface WorkflowGraphDesignerProps {
|
|
12
|
+
/** 初始节点流程列表 */
|
|
13
|
+
initialNodes?: WorkflowGraphNode[] | undefined;
|
|
14
|
+
/** 是否只读展示 */
|
|
15
|
+
readOnly?: boolean | undefined;
|
|
16
|
+
/** 节点变动回调 */
|
|
17
|
+
onnodeschange?: ((nodes: WorkflowGraphNode[]) => void) | undefined;
|
|
18
|
+
/** 点击选中节点回调 */
|
|
19
|
+
onselectnode?: ((node: WorkflowGraphNode) => void) | undefined;
|
|
20
|
+
class?: string | undefined;
|
|
21
|
+
}
|
|
22
|
+
declare const WorkflowGraphDesigner: import("svelte").Component<WorkflowGraphDesignerProps, {}, "">;
|
|
23
|
+
type WorkflowGraphDesigner = ReturnType<typeof WorkflowGraphDesigner>;
|
|
24
|
+
export default WorkflowGraphDesigner;
|