gbflowengine 0.0.0-stage → 0.1.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.
Files changed (93) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +271 -3
  3. package/dist/gbflowengine.css +1 -0
  4. package/dist/gbflowengine.js +18363 -0
  5. package/dist/gbflowengine.js.map +1 -0
  6. package/dist/gbflowengine.umd.cjs +5 -0
  7. package/dist/gbflowengine.umd.cjs.map +1 -0
  8. package/package.json +84 -6
  9. package/src/center/DefinitionInspect.vue +291 -0
  10. package/src/center/FlowCenter.vue +33 -0
  11. package/src/center/index.js +29 -0
  12. package/src/center/storage.js +748 -0
  13. package/src/core/flow/condition.js +160 -0
  14. package/src/core/flow/customNode.js +385 -0
  15. package/src/core/flow/defaults.js +124 -0
  16. package/src/core/flow/flowConstant.js +265 -0
  17. package/src/core/flow/flowNodeUtils.js +30 -0
  18. package/src/core/flow/index.js +47 -0
  19. package/src/core/flow/node.js +44 -0
  20. package/src/core/flow/nodeFactory.js +58 -0
  21. package/src/core/flow/prediction.js +325 -0
  22. package/src/core/flow/runtime/auto.js +83 -0
  23. package/src/core/flow/runtime/decide.js +329 -0
  24. package/src/core/flow/runtime/event.js +28 -0
  25. package/src/core/flow/runtime/execute.js +357 -0
  26. package/src/core/flow/runtime/helpers.js +52 -0
  27. package/src/core/flow/runtime/query.js +146 -0
  28. package/src/core/flow/runtime/reject.js +137 -0
  29. package/src/core/flow/runtime/token.js +269 -0
  30. package/src/core/flow/runtime.js +129 -0
  31. package/src/core/flow/schema.js +864 -0
  32. package/src/definition/FlowDefinitionDesigner.vue +338 -0
  33. package/src/definition/index.js +9 -0
  34. package/src/index.js +39 -0
  35. package/src/storage.js +200 -0
  36. package/src/testing/FlowTestPanel.vue +2502 -0
  37. package/src/testing/UserConfigDrawer.vue +376 -0
  38. package/src/testing/diagram/FlowProgressDiagram.vue +318 -0
  39. package/src/testing/diagramModel.js +517 -0
  40. package/src/testing/index.js +23 -0
  41. package/src/testing/mock.js +246 -0
  42. package/src/testing/oaExecutors.js +51 -0
  43. package/src/testing/oaSeed.js +467 -0
  44. package/src/testing/sample.js +412 -0
  45. package/src/testing/seed.js +122 -0
  46. package/src/utils/format.js +27 -0
  47. package/src/visual/FlowCanvas.vue +441 -0
  48. package/src/visual/NodeProgressDetail.vue +43 -0
  49. package/src/visual/NodeStatusBadge.vue +17 -0
  50. package/src/visual/NodeWrap.vue +47 -0
  51. package/src/visual/ScWorkflow.vue +50 -0
  52. package/src/visual/SelectDialog.vue +460 -0
  53. package/src/visual/conditionHelpers.js +117 -0
  54. package/src/visual/index.js +6 -0
  55. package/src/visual/nodes/AddNode.vue +223 -0
  56. package/src/visual/nodes/ApproverNode.vue +348 -0
  57. package/src/visual/nodes/BranchNode.vue +442 -0
  58. package/src/visual/nodes/CustomNode.vue +339 -0
  59. package/src/visual/nodes/EndNode.vue +22 -0
  60. package/src/visual/nodes/PassNode.vue +101 -0
  61. package/src/visual/nodes/PromoterNode.vue +135 -0
  62. package/src/visual/nodes/RejectNode.vue +101 -0
  63. package/src/visual/nodes/SendNode.vue +152 -0
  64. package/src/visual/styles.scss +879 -0
  65. package/src/visual/useScNodeStatus.js +18 -0
  66. package/src/workbench/OaWorkbench.vue +1341 -0
  67. package/src/workbench/components/ApprovalWorkspace.vue +2090 -0
  68. package/src/workbench/components/CategoryIcon.vue +74 -0
  69. package/src/workbench/components/NotificationIcon.vue +73 -0
  70. package/src/workbench/components/ProcessSteps.vue +557 -0
  71. package/src/workbench/components/ResubmitDialog.vue +227 -0
  72. package/src/workbench/components/SidebarNav.vue +138 -0
  73. package/src/workbench/components/StartFlowDialog.vue +1058 -0
  74. package/src/workbench/components/UserAvatar.vue +68 -0
  75. package/src/workbench/custom-tasks.js +130 -0
  76. package/src/workbench/model.js +1080 -0
  77. package/src/workbench/pages/DesignPage.vue +798 -0
  78. package/src/workbench/pages/HomePage.vue +1050 -0
  79. package/src/workbench/pages/MonitorPage.vue +1029 -0
  80. package/src/workbench/pages/NotificationsPage.vue +554 -0
  81. package/src/workbench/pages/RequestsPage.vue +644 -0
  82. package/src/workbench/pages/TaskCenterPage.vue +1155 -0
  83. package/src/workbench/pages/TemplatesPage.vue +680 -0
  84. package/src/workbench/persistence.js +89 -0
  85. package/src/workbench/shared.js +18 -0
  86. package/src/workbench/styles.scss +555 -0
  87. package/src/workbench/useWorkbench.js +955 -0
  88. package/types/center.d.ts +5 -0
  89. package/types/core.d.ts +479 -0
  90. package/types/definition.d.ts +4 -0
  91. package/types/index.d.ts +34 -0
  92. package/types/testing.d.ts +20 -0
  93. package/types/visual.d.ts +20 -0
@@ -0,0 +1,74 @@
1
+ <template>
2
+ <span class="oa-cat" :class="`oa-cat--${tone}`" :style="sizeStyle">
3
+ <el-icon><component :is="icon" /></el-icon>
4
+ </span>
5
+ </template>
6
+
7
+ <script setup>
8
+ import { computed } from 'vue'
9
+ import {
10
+ Document,
11
+ ShoppingCart,
12
+ Stamp,
13
+ User,
14
+ Wallet
15
+ } from '@element-plus/icons-vue'
16
+
17
+ defineOptions({ name: 'OaCategoryIcon' })
18
+
19
+ const props = defineProps({
20
+ category: { type: String, default: '通用' },
21
+ size: { type: Number, default: 34 }
22
+ })
23
+
24
+ const config = {
25
+ 采购: { icon: ShoppingCart, tone: 'blue' },
26
+ 财务: { icon: Wallet, tone: 'green' },
27
+ 法务: { icon: Stamp, tone: 'violet' },
28
+ 人事: { icon: User, tone: 'amber' },
29
+ 通用: { icon: Document, tone: 'slate' }
30
+ }
31
+
32
+ const icon = computed(() => (config[props.category] || config.通用).icon)
33
+ const tone = computed(() => (config[props.category] || config.通用).tone)
34
+ const sizeStyle = computed(() => ({
35
+ width: `${props.size}px`,
36
+ height: `${props.size}px`,
37
+ fontSize: `${Math.round(props.size * 0.46)}px`
38
+ }))
39
+ </script>
40
+
41
+ <style scoped lang="scss">
42
+ .oa-cat {
43
+ display: inline-flex;
44
+ align-items: center;
45
+ justify-content: center;
46
+ flex-shrink: 0;
47
+ border-radius: 9px;
48
+
49
+ &--blue {
50
+ background: #edf2ff;
51
+ color: #2456d6;
52
+ }
53
+
54
+ &--green {
55
+ background: #e9f7f0;
56
+ color: #0d8057;
57
+ }
58
+
59
+ &--violet {
60
+ background: #f0edfb;
61
+ color: #5c4bb0;
62
+ }
63
+
64
+ &--amber {
65
+ background: #fff4e2;
66
+ color: #a86a16;
67
+ }
68
+
69
+ &--slate {
70
+ background: #eef2f7;
71
+ color: #56657b;
72
+ }
73
+ }
74
+ </style>
@@ -0,0 +1,73 @@
1
+ <template>
2
+ <span
3
+ class="oa-notification-icon"
4
+ :class="`is-${meta.tone}`"
5
+ :style="{ width: `${size}px`, height: `${size}px`, fontSize: `${Math.round(size * 0.48)}px` }"
6
+ >
7
+ <el-icon><component :is="icon" /></el-icon>
8
+ </span>
9
+ </template>
10
+
11
+ <script setup>
12
+ import { computed } from 'vue'
13
+ import {
14
+ Bell,
15
+ ChatDotRound,
16
+ CircleCheck,
17
+ Tickets,
18
+ WarningFilled
19
+ } from '@element-plus/icons-vue'
20
+ import { NOTIFICATION_META } from '../model.js'
21
+
22
+ defineOptions({ name: 'OaNotificationIcon' })
23
+
24
+ const props = defineProps({
25
+ type: { type: String, default: 'todo' },
26
+ size: { type: Number, default: 24 }
27
+ })
28
+
29
+ const icons = {
30
+ todo: Tickets,
31
+ overdue: WarningFilled,
32
+ urge: Bell,
33
+ cc: ChatDotRound,
34
+ result: CircleCheck
35
+ }
36
+
37
+ const meta = computed(() => NOTIFICATION_META[props.type] || NOTIFICATION_META.todo)
38
+ const icon = computed(() => icons[props.type] || Tickets)
39
+ </script>
40
+
41
+ <style scoped lang="scss">
42
+ .oa-notification-icon {
43
+ display: inline-grid;
44
+ place-items: center;
45
+ flex-shrink: 0;
46
+ border-radius: 50%;
47
+
48
+ &.is-info {
49
+ background: var(--oa-primary-soft);
50
+ color: var(--oa-primary);
51
+ }
52
+
53
+ &.is-danger {
54
+ background: var(--oa-danger-soft);
55
+ color: var(--oa-danger);
56
+ }
57
+
58
+ &.is-warning {
59
+ background: var(--oa-warning-soft);
60
+ color: var(--oa-warning);
61
+ }
62
+
63
+ &.is-success {
64
+ background: var(--oa-success-soft);
65
+ color: var(--oa-success);
66
+ }
67
+
68
+ &.is-neutral {
69
+ background: #f1f4f9;
70
+ color: #64748b;
71
+ }
72
+ }
73
+ </style>
@@ -0,0 +1,557 @@
1
+ <template>
2
+ <div class="oa-steps" :class="{ 'oa-steps--compact': compact }">
3
+ <article
4
+ v-for="(step, index) in steps"
5
+ :key="step.key || index"
6
+ class="oa-step"
7
+ :class="[`is-${step.status}`, `is-kind-${step.kind}`]"
8
+ >
9
+ <div class="oa-step__rail">
10
+ <span class="oa-step__dot">
11
+ <el-icon>
12
+ <component :is="iconOf(step)" />
13
+ </el-icon>
14
+ </span>
15
+ <span v-if="index < steps.length - 1" class="oa-step__line"></span>
16
+ </div>
17
+
18
+ <div class="oa-step__body">
19
+ <header class="oa-step__head">
20
+ <div class="oa-step__title-wrap">
21
+ <h4>{{ step.title }}</h4>
22
+ <p v-if="step.subtitle">{{ step.subtitle }}</p>
23
+ </div>
24
+ <div class="oa-step__head-right">
25
+ <span v-if="step.status === 'current'" class="oa-step__now">当前</span>
26
+ <span v-else-if="step.status === 'upcoming'" class="oa-step__upcoming">待执行</span>
27
+ <time v-if="step.at && !compact" class="oa-step__time oa-num">
28
+ {{ formatDateTime(step.at) }}
29
+ </time>
30
+ </div>
31
+ </header>
32
+
33
+ <div
34
+ v-if="!compact && step.records && step.records.length"
35
+ class="oa-step__records"
36
+ >
37
+ <div
38
+ v-for="(record, recordIndex) in step.records"
39
+ :key="`${step.key}_record_${recordIndex}`"
40
+ class="oa-step__record"
41
+ :class="{ 'is-system': record.system }"
42
+ >
43
+ <span class="oa-step__record-actor">{{ record.actorName }}</span>
44
+ <span class="oa-step__record-action" :class="actionTone(record.action)">
45
+ {{ record.actionLabel }}
46
+ <template v-if="record.targetName">给 {{ record.targetName }}</template>
47
+ </span>
48
+ <time class="oa-step__record-time oa-num">{{ formatDateTime(record.at, { short: true }) }}</time>
49
+ <p v-if="record.comment" class="oa-step__comment">{{ record.comment }}</p>
50
+ </div>
51
+ </div>
52
+
53
+ <div
54
+ v-else-if="!compact && step.actors && step.actors.length"
55
+ class="oa-step__actors"
56
+ >
57
+ <span
58
+ v-for="actor in step.actors"
59
+ :key="`${step.key}_${actor.name}`"
60
+ class="oa-step__actor"
61
+ :class="{ 'is-done': actor.done }"
62
+ >
63
+ <i></i>{{ actor.name }}
64
+ <em v-if="actor.addedBy">加签 · {{ actor.addedBy }}</em>
65
+ </span>
66
+ <span v-if="step.progress && step.progress.total > 1" class="oa-step__progress oa-num">
67
+ {{ step.task?.signMode === 'or'
68
+ ? (step.progress.approved ? `已同意 ${step.progress.approved}/${step.progress.total}` : '或签 · 任意一人')
69
+ : `${step.progress.approved}/${step.progress.total} 已同意` }}
70
+ </span>
71
+ </div>
72
+
73
+ <div v-if="!compact" class="oa-step__flags">
74
+ <span v-if="step.overdue" class="oa-chip oa-chip--danger">
75
+ <el-icon><WarningFilled /></el-icon>
76
+ 已等待 {{ formatElapsed(step.createdAt, now) }}
77
+ </span>
78
+ <span v-else-if="step.status === 'current' && step.waitHours" class="oa-chip oa-chip--warning">
79
+ 已等待 {{ formatElapsed(step.createdAt, now) }}
80
+ </span>
81
+ <span v-if="step.kind === 'cc' && step.status === 'done'" class="oa-chip">已送达</span>
82
+ <button
83
+ v-if="step.kind === 'custom' && step.task?.result !== undefined"
84
+ type="button"
85
+ class="oa-link oa-step__result-toggle"
86
+ @click="toggleResult(step.key)"
87
+ >
88
+ {{ isResultOpen(step.key) ? '收起执行结果' : '查看执行结果' }}
89
+ </button>
90
+ </div>
91
+ <pre
92
+ v-if="!compact && step.kind === 'custom' && step.task?.result !== undefined && isResultOpen(step.key)"
93
+ class="oa-step__result"
94
+ >{{ formatResult(step.task.result) }}</pre>
95
+ </div>
96
+ </article>
97
+ </div>
98
+ </template>
99
+
100
+ <script setup>
101
+ import {
102
+ ChatDotRound,
103
+ CircleCheckFilled,
104
+ CircleCloseFilled,
105
+ Clock,
106
+ SetUp,
107
+ Finished,
108
+ UserFilled,
109
+ VideoPlay,
110
+ WarningFilled
111
+ } from '@element-plus/icons-vue'
112
+ import { ref } from 'vue'
113
+ import { formatDateTime } from '../../utils/format.js'
114
+ import { formatElapsed } from '../model.js'
115
+
116
+ defineOptions({ name: 'OaProcessSteps' })
117
+
118
+ defineProps({
119
+ steps: { type: Array, default: () => [] },
120
+ compact: { type: Boolean, default: false },
121
+ now: { type: Number, default: Date.now }
122
+ })
123
+
124
+ const expandedResults = ref([])
125
+
126
+ function isResultOpen(key) {
127
+ return expandedResults.value.includes(key)
128
+ }
129
+
130
+ function toggleResult(key) {
131
+ expandedResults.value = isResultOpen(key)
132
+ ? expandedResults.value.filter((item) => item !== key)
133
+ : [...expandedResults.value, key]
134
+ }
135
+
136
+ function formatResult(result) {
137
+ if (typeof result === 'string') return result.slice(0, 4000)
138
+ try {
139
+ return JSON.stringify(result, null, 2).slice(0, 4000)
140
+ } catch {
141
+ return String(result)
142
+ }
143
+ }
144
+
145
+ const iconOf = (step) => {
146
+ if (step.status === 'failed') return CircleCloseFilled
147
+ if (step.status === 'rejected') return CircleCloseFilled
148
+ if (step.status === 'cancelled') return CircleCloseFilled
149
+ if (step.kind === 'start') return VideoPlay
150
+ if (step.kind === 'cc') return ChatDotRound
151
+ if (step.kind === 'custom') return SetUp
152
+ if (step.kind === 'end') return step.status === 'done' ? Finished : CircleCheckFilled
153
+ if (step.status === 'upcoming') return Clock
154
+ if (step.status === 'current') return Clock
155
+ return UserFilled
156
+ }
157
+
158
+ const actionTone = (action) => {
159
+ if (action === 'approve' || action === 'execute') return 'is-success'
160
+ if (action === 'reject' || action === 'executeFailed') return 'is-danger'
161
+ if (action === 'transfer' || action === 'addSign') return 'is-info'
162
+ return ''
163
+ }
164
+ </script>
165
+
166
+ <style scoped lang="scss">
167
+ .oa-steps {
168
+ display: flex;
169
+ flex-direction: column;
170
+ min-width: 0;
171
+ }
172
+
173
+ .oa-step {
174
+ display: grid;
175
+ grid-template-columns: 26px minmax(0, 1fr);
176
+ gap: 10px;
177
+ min-width: 0;
178
+
179
+ &__rail {
180
+ display: flex;
181
+ flex-direction: column;
182
+ align-items: center;
183
+ padding-top: 1px;
184
+ }
185
+
186
+ &__dot {
187
+ position: relative;
188
+ z-index: 1;
189
+ display: grid;
190
+ place-items: center;
191
+ width: 24px;
192
+ height: 24px;
193
+ border: 1px solid var(--oa-line-strong);
194
+ border-radius: 50%;
195
+ background: #fff;
196
+ color: var(--oa-faint);
197
+ font-size: 11px;
198
+ }
199
+
200
+ &__line {
201
+ flex: 1;
202
+ width: 1px;
203
+ margin: 3px 0;
204
+ background: var(--oa-line);
205
+ }
206
+
207
+ &__body {
208
+ min-width: 0;
209
+ padding-bottom: 22px;
210
+ }
211
+
212
+ &__head {
213
+ display: flex;
214
+ align-items: flex-start;
215
+ justify-content: space-between;
216
+ gap: 10px;
217
+ min-height: 24px;
218
+
219
+ h4 {
220
+ margin: 2px 0 0;
221
+ color: var(--oa-ink);
222
+ font-size: 13px;
223
+ font-weight: 600;
224
+ line-height: 1.5;
225
+ }
226
+
227
+ p {
228
+ margin: 3px 0 0;
229
+ color: var(--oa-faint);
230
+ font-size: 11.5px;
231
+ line-height: 1.5;
232
+ }
233
+ }
234
+
235
+ &__title-wrap {
236
+ min-width: 0;
237
+ }
238
+
239
+ &__head-right {
240
+ display: flex;
241
+ align-items: center;
242
+ gap: 6px;
243
+ flex-shrink: 0;
244
+ padding-top: 1px;
245
+ }
246
+
247
+ &__time {
248
+ color: var(--oa-faint);
249
+ font-size: 11px;
250
+ }
251
+
252
+ &__now {
253
+ padding: 0 7px;
254
+ border-radius: 4px;
255
+ background: var(--oa-primary);
256
+ color: #fff;
257
+ font-size: 10px;
258
+ font-weight: 600;
259
+ line-height: 18px;
260
+ }
261
+
262
+ &__upcoming {
263
+ color: var(--oa-faint);
264
+ font-size: 10px;
265
+ }
266
+
267
+ &__records {
268
+ display: flex;
269
+ flex-direction: column;
270
+ gap: 6px;
271
+ margin-top: 8px;
272
+ }
273
+
274
+ &__record {
275
+ display: flex;
276
+ flex-wrap: wrap;
277
+ align-items: center;
278
+ gap: 6px;
279
+ padding: 7px 9px;
280
+ border-radius: 6px;
281
+ background: var(--oa-surface-soft);
282
+ font-size: 11.5px;
283
+
284
+ &.is-system {
285
+ color: var(--oa-muted);
286
+ background: #f0f4fa;
287
+ }
288
+ }
289
+
290
+ &__record-actor {
291
+ color: var(--oa-ink);
292
+ font-weight: 600;
293
+ }
294
+
295
+ &__record-action {
296
+ padding: 0 5px;
297
+ border-radius: 3px;
298
+ background: #edf1f7;
299
+ color: var(--oa-muted);
300
+ font-size: 10.5px;
301
+
302
+ &.is-success {
303
+ background: var(--oa-success-soft);
304
+ color: var(--oa-success);
305
+ }
306
+
307
+ &.is-danger {
308
+ background: var(--oa-danger-soft);
309
+ color: var(--oa-danger);
310
+ }
311
+
312
+ &.is-info {
313
+ background: var(--oa-primary-soft);
314
+ color: var(--oa-primary);
315
+ }
316
+ }
317
+
318
+ &__record-time {
319
+ margin-left: auto;
320
+ color: var(--oa-faint);
321
+ font-size: 10.5px;
322
+ }
323
+
324
+ &__comment {
325
+ flex: 0 0 100%;
326
+ margin: 1px 0 0;
327
+ color: var(--oa-muted);
328
+ font-size: 11.5px;
329
+ line-height: 1.6;
330
+ word-break: break-word;
331
+ }
332
+
333
+ &__actors {
334
+ display: flex;
335
+ flex-wrap: wrap;
336
+ align-items: center;
337
+ gap: 6px;
338
+ margin-top: 8px;
339
+ }
340
+
341
+ &__actor {
342
+ display: inline-flex;
343
+ align-items: center;
344
+ gap: 5px;
345
+ padding: 2px 7px;
346
+ border-radius: 4px;
347
+ background: #f1f4f9;
348
+ color: var(--oa-muted);
349
+ font-size: 11px;
350
+
351
+ i {
352
+ width: 5px;
353
+ height: 5px;
354
+ border-radius: 50%;
355
+ background: #b6c0cf;
356
+ }
357
+
358
+ &.is-done {
359
+ background: var(--oa-success-soft);
360
+ color: var(--oa-success);
361
+
362
+ i {
363
+ background: var(--oa-success);
364
+ }
365
+ }
366
+
367
+ em {
368
+ color: var(--oa-faint);
369
+ font-size: 10px;
370
+ font-style: normal;
371
+ }
372
+ }
373
+
374
+ &__progress {
375
+ margin-left: auto;
376
+ color: var(--oa-faint);
377
+ font-size: 10.5px;
378
+ }
379
+
380
+ &__flags {
381
+ display: flex;
382
+ flex-wrap: wrap;
383
+ gap: 5px;
384
+ margin-top: 7px;
385
+
386
+ &:empty {
387
+ display: none;
388
+ }
389
+ }
390
+
391
+ &.is-current {
392
+ .oa-step__dot {
393
+ border-color: var(--oa-primary);
394
+ background: var(--oa-primary);
395
+ color: #fff;
396
+ box-shadow: 0 0 0 4px rgba(36, 86, 214, 0.11);
397
+ }
398
+
399
+ h4 {
400
+ color: var(--oa-primary-dark);
401
+ }
402
+
403
+ .oa-step__body {
404
+ position: relative;
405
+
406
+ &::before {
407
+ content: '';
408
+ position: absolute;
409
+ inset: 30px 0 10px -12px;
410
+ border-radius: 8px;
411
+ background: linear-gradient(90deg, rgba(36, 86, 214, 0.04), transparent 70%);
412
+ pointer-events: none;
413
+ }
414
+ }
415
+ }
416
+
417
+ &.is-done {
418
+ .oa-step__dot {
419
+ border-color: #bfe1d0;
420
+ background: var(--oa-success-soft);
421
+ color: var(--oa-success);
422
+ }
423
+
424
+ .oa-step__line {
425
+ background: #cfe5da;
426
+ }
427
+ }
428
+
429
+ &.is-rejected,
430
+ &.is-failed {
431
+ .oa-step__dot {
432
+ border-color: #f0cbc7;
433
+ background: var(--oa-danger-soft);
434
+ color: var(--oa-danger);
435
+ }
436
+
437
+ h4 {
438
+ color: var(--oa-danger);
439
+ }
440
+ }
441
+
442
+ &.is-cancelled {
443
+ .oa-step__dot {
444
+ border-color: var(--oa-line);
445
+ background: #f2f4f8;
446
+ color: var(--oa-faint);
447
+ }
448
+
449
+ h4,
450
+ .oa-step__title-wrap p {
451
+ color: var(--oa-faint);
452
+ }
453
+ }
454
+
455
+ &.is-upcoming {
456
+ .oa-step__dot {
457
+ border-style: dashed;
458
+ color: #a3aec0;
459
+ background: #fbfcfe;
460
+ }
461
+
462
+ h4 {
463
+ color: #8b97a9;
464
+ font-weight: 500;
465
+ }
466
+
467
+ .oa-step__body {
468
+ padding-bottom: 16px;
469
+ }
470
+ }
471
+
472
+ &.is-kind-cc.is-done {
473
+ .oa-step__dot {
474
+ border-color: #d8e2f8;
475
+ background: var(--oa-primary-soft);
476
+ color: var(--oa-primary);
477
+ }
478
+ }
479
+
480
+ &.is-kind-custom.is-done {
481
+ .oa-step__dot {
482
+ border-color: #ddd6fe;
483
+ background: #f4f1ff;
484
+ color: #6f5cf1;
485
+ }
486
+ }
487
+
488
+ &.is-kind-custom.is-current {
489
+ .oa-step__dot {
490
+ border-color: #6f5cf1;
491
+ background: #6f5cf1;
492
+ color: #fff;
493
+ box-shadow: 0 0 0 4px rgba(111, 92, 241, 0.12);
494
+ }
495
+ }
496
+
497
+ &.is-kind-end {
498
+ .oa-step__body {
499
+ padding-bottom: 0;
500
+ }
501
+ }
502
+
503
+ &:last-child &__line {
504
+ display: none;
505
+ }
506
+ }
507
+
508
+ .oa-steps--compact {
509
+ .oa-step {
510
+ grid-template-columns: 20px minmax(0, 1fr);
511
+ gap: 8px;
512
+ }
513
+
514
+ .oa-step__dot {
515
+ width: 18px;
516
+ height: 18px;
517
+ font-size: 9px;
518
+ }
519
+
520
+ .oa-step__body {
521
+ padding-bottom: 12px;
522
+ }
523
+
524
+ .oa-step__head {
525
+ min-height: 18px;
526
+
527
+ h4 {
528
+ margin-top: 0;
529
+ font-size: 12px;
530
+ }
531
+
532
+ p {
533
+ font-size: 11px;
534
+ }
535
+ }
536
+ }
537
+
538
+ .oa-step__result-toggle {
539
+ margin-left: auto;
540
+ font-size: 10.5px;
541
+ }
542
+
543
+ .oa-step__result {
544
+ max-height: 180px;
545
+ overflow: auto;
546
+ margin: 7px 0 0;
547
+ padding: 9px 10px;
548
+ border-radius: 6px;
549
+ background: #f7f9fc;
550
+ color: #475569;
551
+ font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
552
+ font-size: 10.5px;
553
+ line-height: 1.6;
554
+ white-space: pre-wrap;
555
+ word-break: break-all;
556
+ }
557
+ </style>