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.
Files changed (79) hide show
  1. package/README.md +271 -271
  2. package/dist/gbflowengine.css +1 -1
  3. package/dist/gbflowengine.js +8232 -6913
  4. package/dist/gbflowengine.js.map +1 -1
  5. package/dist/gbflowengine.umd.cjs +2 -2
  6. package/dist/gbflowengine.umd.cjs.map +1 -1
  7. package/package.json +85 -84
  8. package/src/center/DefinitionInspect.vue +291 -291
  9. package/src/center/FlowCenter.vue +33 -33
  10. package/src/center/index.js +29 -29
  11. package/src/center/storage.js +748 -748
  12. package/src/core/flow/condition.js +160 -160
  13. package/src/core/flow/customNode.js +385 -385
  14. package/src/core/flow/defaults.js +124 -124
  15. package/src/core/flow/flowConstant.js +265 -265
  16. package/src/core/flow/flowNodeUtils.js +29 -29
  17. package/src/core/flow/index.js +47 -47
  18. package/src/core/flow/node.js +44 -44
  19. package/src/core/flow/nodeFactory.js +58 -58
  20. package/src/core/flow/prediction.js +325 -325
  21. package/src/core/flow/schema.js +864 -864
  22. package/src/definition/FlowDefinitionDesigner.vue +338 -338
  23. package/src/definition/index.js +9 -9
  24. package/src/index.js +39 -39
  25. package/src/storage.js +200 -200
  26. package/src/testing/FlowTestPanel.vue +2502 -2502
  27. package/src/testing/UserConfigDrawer.vue +376 -376
  28. package/src/testing/diagram/FlowProgressDiagram.vue +318 -318
  29. package/src/testing/diagramModel.js +517 -517
  30. package/src/testing/index.js +23 -23
  31. package/src/testing/mock.js +246 -246
  32. package/src/testing/oaExecutors.js +51 -51
  33. package/src/testing/oaSeed.js +467 -467
  34. package/src/testing/sample.js +412 -412
  35. package/src/testing/seed.js +122 -122
  36. package/src/utils/format.js +27 -27
  37. package/src/visual/FlowCanvas.vue +440 -440
  38. package/src/visual/NodeProgressDetail.vue +43 -43
  39. package/src/visual/NodeStatusBadge.vue +17 -17
  40. package/src/visual/NodeWrap.vue +46 -46
  41. package/src/visual/ScWorkflow.vue +49 -49
  42. package/src/visual/SelectDialog.vue +459 -459
  43. package/src/visual/conditionHelpers.js +116 -116
  44. package/src/visual/index.js +6 -6
  45. package/src/visual/nodes/AddNode.vue +222 -222
  46. package/src/visual/nodes/ApproverNode.vue +347 -347
  47. package/src/visual/nodes/BranchNode.vue +441 -441
  48. package/src/visual/nodes/CustomNode.vue +339 -339
  49. package/src/visual/nodes/EndNode.vue +21 -21
  50. package/src/visual/nodes/PassNode.vue +100 -100
  51. package/src/visual/nodes/PromoterNode.vue +134 -134
  52. package/src/visual/nodes/RejectNode.vue +100 -100
  53. package/src/visual/nodes/SendNode.vue +151 -151
  54. package/src/visual/styles.scss +879 -879
  55. package/src/visual/useScNodeStatus.js +18 -18
  56. package/src/workbench/OaWorkbench.vue +1341 -1341
  57. package/src/workbench/components/ApprovalWorkspace.vue +2090 -2090
  58. package/src/workbench/components/CategoryIcon.vue +74 -74
  59. package/src/workbench/components/NotificationIcon.vue +73 -73
  60. package/src/workbench/components/ProcessSteps.vue +557 -557
  61. package/src/workbench/components/ResubmitDialog.vue +227 -227
  62. package/src/workbench/components/SidebarNav.vue +138 -138
  63. package/src/workbench/components/StartFlowDialog.vue +1058 -1058
  64. package/src/workbench/components/UserAvatar.vue +68 -68
  65. package/src/workbench/model.js +1080 -1080
  66. package/src/workbench/pages/DesignPage.vue +798 -798
  67. package/src/workbench/pages/HomePage.vue +1050 -1050
  68. package/src/workbench/pages/MonitorPage.vue +1029 -1029
  69. package/src/workbench/pages/NotificationsPage.vue +554 -554
  70. package/src/workbench/pages/RequestsPage.vue +644 -644
  71. package/src/workbench/pages/TaskCenterPage.vue +1155 -1155
  72. package/src/workbench/pages/TemplatesPage.vue +680 -680
  73. package/src/workbench/styles.scss +555 -555
  74. package/types/center.d.ts +5 -5
  75. package/types/core.d.ts +479 -479
  76. package/types/definition.d.ts +4 -4
  77. package/types/index.d.ts +34 -34
  78. package/types/testing.d.ts +20 -20
  79. 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>