gbflowengine 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +271 -271
- package/dist/gbflowengine.css +1 -1
- package/dist/gbflowengine.js +8232 -6913
- package/dist/gbflowengine.js.map +1 -1
- package/dist/gbflowengine.umd.cjs +2 -2
- package/dist/gbflowengine.umd.cjs.map +1 -1
- package/package.json +85 -84
- package/src/center/DefinitionInspect.vue +291 -291
- package/src/center/FlowCenter.vue +33 -33
- package/src/center/index.js +29 -29
- package/src/center/storage.js +748 -748
- package/src/core/flow/condition.js +160 -160
- package/src/core/flow/customNode.js +385 -385
- package/src/core/flow/defaults.js +124 -124
- package/src/core/flow/flowConstant.js +265 -265
- package/src/core/flow/flowNodeUtils.js +29 -29
- package/src/core/flow/index.js +47 -47
- package/src/core/flow/node.js +44 -44
- package/src/core/flow/nodeFactory.js +58 -58
- package/src/core/flow/prediction.js +325 -325
- package/src/core/flow/schema.js +864 -864
- package/src/definition/FlowDefinitionDesigner.vue +338 -338
- package/src/definition/index.js +9 -9
- package/src/index.js +39 -39
- package/src/storage.js +200 -200
- package/src/testing/FlowTestPanel.vue +2502 -2502
- package/src/testing/UserConfigDrawer.vue +376 -376
- package/src/testing/diagram/FlowProgressDiagram.vue +318 -318
- package/src/testing/diagramModel.js +517 -517
- package/src/testing/index.js +23 -23
- package/src/testing/mock.js +246 -246
- package/src/testing/oaExecutors.js +51 -51
- package/src/testing/oaSeed.js +467 -467
- package/src/testing/sample.js +412 -412
- package/src/testing/seed.js +122 -122
- package/src/utils/format.js +27 -27
- package/src/visual/FlowCanvas.vue +440 -440
- package/src/visual/NodeProgressDetail.vue +43 -43
- package/src/visual/NodeStatusBadge.vue +17 -17
- package/src/visual/NodeWrap.vue +46 -46
- package/src/visual/ScWorkflow.vue +49 -49
- package/src/visual/SelectDialog.vue +459 -459
- package/src/visual/conditionHelpers.js +116 -116
- package/src/visual/index.js +6 -6
- package/src/visual/nodes/AddNode.vue +222 -222
- package/src/visual/nodes/ApproverNode.vue +347 -347
- package/src/visual/nodes/BranchNode.vue +441 -441
- package/src/visual/nodes/CustomNode.vue +339 -339
- package/src/visual/nodes/EndNode.vue +21 -21
- package/src/visual/nodes/PassNode.vue +100 -100
- package/src/visual/nodes/PromoterNode.vue +134 -134
- package/src/visual/nodes/RejectNode.vue +100 -100
- package/src/visual/nodes/SendNode.vue +151 -151
- package/src/visual/styles.scss +879 -879
- package/src/visual/useScNodeStatus.js +18 -18
- package/src/workbench/OaWorkbench.vue +1341 -1341
- package/src/workbench/components/ApprovalWorkspace.vue +2090 -2090
- package/src/workbench/components/CategoryIcon.vue +74 -74
- package/src/workbench/components/NotificationIcon.vue +73 -73
- package/src/workbench/components/ProcessSteps.vue +557 -557
- package/src/workbench/components/ResubmitDialog.vue +227 -227
- package/src/workbench/components/SidebarNav.vue +138 -138
- package/src/workbench/components/StartFlowDialog.vue +1058 -1058
- package/src/workbench/components/UserAvatar.vue +68 -68
- package/src/workbench/model.js +1080 -1080
- package/src/workbench/pages/DesignPage.vue +798 -798
- package/src/workbench/pages/HomePage.vue +1050 -1050
- package/src/workbench/pages/MonitorPage.vue +1029 -1029
- package/src/workbench/pages/NotificationsPage.vue +554 -554
- package/src/workbench/pages/RequestsPage.vue +644 -644
- package/src/workbench/pages/TaskCenterPage.vue +1155 -1155
- package/src/workbench/pages/TemplatesPage.vue +680 -680
- package/src/workbench/styles.scss +555 -555
- package/types/center.d.ts +5 -5
- package/types/core.d.ts +479 -479
- package/types/definition.d.ts +4 -4
- package/types/index.d.ts +34 -34
- package/types/testing.d.ts +20 -20
- package/types/visual.d.ts +20 -20
|
@@ -1,138 +1,138 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<nav class="oa-nav">
|
|
3
|
-
<div v-for="group in groups" :key="group.label" class="oa-nav__group">
|
|
4
|
-
<p class="oa-nav__label">{{ group.label }}</p>
|
|
5
|
-
<button
|
|
6
|
-
v-for="item in group.items"
|
|
7
|
-
:key="item.key"
|
|
8
|
-
type="button"
|
|
9
|
-
class="oa-nav__item"
|
|
10
|
-
:class="{ 'is-active': activeKey === item.key }"
|
|
11
|
-
@click="emit('select', item)"
|
|
12
|
-
>
|
|
13
|
-
<el-icon><component :is="item.icon" /></el-icon>
|
|
14
|
-
<span>{{ item.label }}</span>
|
|
15
|
-
<em v-if="item.badge" class="oa-nav__badge">{{ item.badge > 99 ? '99+' : item.badge }}</em>
|
|
16
|
-
</button>
|
|
17
|
-
</div>
|
|
18
|
-
</nav>
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<script setup>
|
|
22
|
-
defineOptions({ name: 'OaSidebarNav' })
|
|
23
|
-
|
|
24
|
-
defineProps({
|
|
25
|
-
groups: { type: Array, default: () => [] },
|
|
26
|
-
activeKey: { type: String, default: '' }
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
const emit = defineEmits(['select'])
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<style scoped lang="scss">
|
|
33
|
-
.oa-nav {
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
gap: 14px;
|
|
37
|
-
padding: 14px 10px 20px;
|
|
38
|
-
overflow-y: auto;
|
|
39
|
-
|
|
40
|
-
&__group {
|
|
41
|
-
display: flex;
|
|
42
|
-
flex-direction: column;
|
|
43
|
-
gap: 2px;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&__label {
|
|
47
|
-
margin: 0 0 4px;
|
|
48
|
-
padding: 0 10px;
|
|
49
|
-
color: #63768d;
|
|
50
|
-
font-size: 9.5px;
|
|
51
|
-
font-weight: 600;
|
|
52
|
-
letter-spacing: 0.1em;
|
|
53
|
-
text-transform: uppercase;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&__item {
|
|
57
|
-
position: relative;
|
|
58
|
-
display: flex;
|
|
59
|
-
align-items: center;
|
|
60
|
-
gap: 9px;
|
|
61
|
-
width: 100%;
|
|
62
|
-
min-height: 36px;
|
|
63
|
-
padding: 7px 10px;
|
|
64
|
-
border: none;
|
|
65
|
-
border-radius: 6px;
|
|
66
|
-
background: transparent;
|
|
67
|
-
color: var(--oa-sidebar-text);
|
|
68
|
-
font-size: 12px;
|
|
69
|
-
text-align: left;
|
|
70
|
-
cursor: pointer;
|
|
71
|
-
transition: background 0.15s ease, color 0.15s ease;
|
|
72
|
-
|
|
73
|
-
> .el-icon {
|
|
74
|
-
flex-shrink: 0;
|
|
75
|
-
color: #7f91a8;
|
|
76
|
-
font-size: 15px;
|
|
77
|
-
transition: color 0.15s ease;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
span {
|
|
81
|
-
flex: 1;
|
|
82
|
-
min-width: 0;
|
|
83
|
-
overflow: hidden;
|
|
84
|
-
text-overflow: ellipsis;
|
|
85
|
-
white-space: nowrap;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
&:hover {
|
|
89
|
-
background: rgba(255, 255, 255, 0.055);
|
|
90
|
-
color: #fff;
|
|
91
|
-
|
|
92
|
-
> .el-icon {
|
|
93
|
-
color: #c3d3e7;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
&.is-active {
|
|
98
|
-
background: rgba(80, 130, 235, 0.18);
|
|
99
|
-
color: #fff;
|
|
100
|
-
font-weight: 550;
|
|
101
|
-
|
|
102
|
-
> .el-icon {
|
|
103
|
-
color: #8fb3ff;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
&::before {
|
|
107
|
-
content: '';
|
|
108
|
-
position: absolute;
|
|
109
|
-
top: 9px;
|
|
110
|
-
bottom: 9px;
|
|
111
|
-
left: 0;
|
|
112
|
-
width: 2px;
|
|
113
|
-
border-radius: 0 2px 2px 0;
|
|
114
|
-
background: #6f9bff;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
&__badge {
|
|
120
|
-
display: inline-grid;
|
|
121
|
-
place-items: center;
|
|
122
|
-
min-width: 17px;
|
|
123
|
-
height: 17px;
|
|
124
|
-
padding: 0 5px;
|
|
125
|
-
border-radius: 9px;
|
|
126
|
-
background: rgba(255, 255, 255, 0.14);
|
|
127
|
-
color: #dce8fa;
|
|
128
|
-
font-size: 9px;
|
|
129
|
-
font-style: normal;
|
|
130
|
-
font-weight: 600;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
&__item.is-active &__badge {
|
|
134
|
-
background: #3567dc;
|
|
135
|
-
color: #fff;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<nav class="oa-nav">
|
|
3
|
+
<div v-for="group in groups" :key="group.label" class="oa-nav__group">
|
|
4
|
+
<p class="oa-nav__label">{{ group.label }}</p>
|
|
5
|
+
<button
|
|
6
|
+
v-for="item in group.items"
|
|
7
|
+
:key="item.key"
|
|
8
|
+
type="button"
|
|
9
|
+
class="oa-nav__item"
|
|
10
|
+
:class="{ 'is-active': activeKey === item.key }"
|
|
11
|
+
@click="emit('select', item)"
|
|
12
|
+
>
|
|
13
|
+
<el-icon><component :is="item.icon" /></el-icon>
|
|
14
|
+
<span>{{ item.label }}</span>
|
|
15
|
+
<em v-if="item.badge" class="oa-nav__badge">{{ item.badge > 99 ? '99+' : item.badge }}</em>
|
|
16
|
+
</button>
|
|
17
|
+
</div>
|
|
18
|
+
</nav>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script setup>
|
|
22
|
+
defineOptions({ name: 'OaSidebarNav' })
|
|
23
|
+
|
|
24
|
+
defineProps({
|
|
25
|
+
groups: { type: Array, default: () => [] },
|
|
26
|
+
activeKey: { type: String, default: '' }
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
const emit = defineEmits(['select'])
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<style scoped lang="scss">
|
|
33
|
+
.oa-nav {
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
gap: 14px;
|
|
37
|
+
padding: 14px 10px 20px;
|
|
38
|
+
overflow-y: auto;
|
|
39
|
+
|
|
40
|
+
&__group {
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
gap: 2px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&__label {
|
|
47
|
+
margin: 0 0 4px;
|
|
48
|
+
padding: 0 10px;
|
|
49
|
+
color: #63768d;
|
|
50
|
+
font-size: 9.5px;
|
|
51
|
+
font-weight: 600;
|
|
52
|
+
letter-spacing: 0.1em;
|
|
53
|
+
text-transform: uppercase;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&__item {
|
|
57
|
+
position: relative;
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
gap: 9px;
|
|
61
|
+
width: 100%;
|
|
62
|
+
min-height: 36px;
|
|
63
|
+
padding: 7px 10px;
|
|
64
|
+
border: none;
|
|
65
|
+
border-radius: 6px;
|
|
66
|
+
background: transparent;
|
|
67
|
+
color: var(--oa-sidebar-text);
|
|
68
|
+
font-size: 12px;
|
|
69
|
+
text-align: left;
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
transition: background 0.15s ease, color 0.15s ease;
|
|
72
|
+
|
|
73
|
+
> .el-icon {
|
|
74
|
+
flex-shrink: 0;
|
|
75
|
+
color: #7f91a8;
|
|
76
|
+
font-size: 15px;
|
|
77
|
+
transition: color 0.15s ease;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
span {
|
|
81
|
+
flex: 1;
|
|
82
|
+
min-width: 0;
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
text-overflow: ellipsis;
|
|
85
|
+
white-space: nowrap;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&:hover {
|
|
89
|
+
background: rgba(255, 255, 255, 0.055);
|
|
90
|
+
color: #fff;
|
|
91
|
+
|
|
92
|
+
> .el-icon {
|
|
93
|
+
color: #c3d3e7;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&.is-active {
|
|
98
|
+
background: rgba(80, 130, 235, 0.18);
|
|
99
|
+
color: #fff;
|
|
100
|
+
font-weight: 550;
|
|
101
|
+
|
|
102
|
+
> .el-icon {
|
|
103
|
+
color: #8fb3ff;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&::before {
|
|
107
|
+
content: '';
|
|
108
|
+
position: absolute;
|
|
109
|
+
top: 9px;
|
|
110
|
+
bottom: 9px;
|
|
111
|
+
left: 0;
|
|
112
|
+
width: 2px;
|
|
113
|
+
border-radius: 0 2px 2px 0;
|
|
114
|
+
background: #6f9bff;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&__badge {
|
|
120
|
+
display: inline-grid;
|
|
121
|
+
place-items: center;
|
|
122
|
+
min-width: 17px;
|
|
123
|
+
height: 17px;
|
|
124
|
+
padding: 0 5px;
|
|
125
|
+
border-radius: 9px;
|
|
126
|
+
background: rgba(255, 255, 255, 0.14);
|
|
127
|
+
color: #dce8fa;
|
|
128
|
+
font-size: 9px;
|
|
129
|
+
font-style: normal;
|
|
130
|
+
font-weight: 600;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&__item.is-active &__badge {
|
|
134
|
+
background: #3567dc;
|
|
135
|
+
color: #fff;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
</style>
|