@bpmn-nova/studio 0.3.0-preview → 0.3.2-preview
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 +245 -20
- package/dist/canvas.js +7 -4
- package/dist/context-menu.js +2 -2
- package/dist/controller.js +84 -6
- package/dist/index.d.ts +138 -38
- package/dist/index.js +12 -11
- package/dist/interactions.js +1 -1
- package/dist/modules/bpmn-model/index.d.ts +11 -0
- package/dist/modules/bpmn-model/index.js +703 -0
- package/dist/modules/core/containment.js +590 -0
- package/dist/modules/core/gateway.js +72 -0
- package/dist/modules/core/history.js +32 -0
- package/dist/modules/core/index.d.ts +268 -0
- package/dist/modules/core/index.js +7 -0
- package/dist/modules/core/layout.js +644 -0
- package/dist/modules/core/model.js +287 -0
- package/dist/modules/core/runtime-transition-route.js +360 -0
- package/dist/modules/core/scope.js +99 -0
- package/dist/modules/designer/index.d.ts +79 -0
- package/dist/modules/designer/index.js +607 -0
- package/dist/modules/engine-activiti/index.d.ts +19 -0
- package/dist/modules/engine-activiti/index.js +160 -0
- package/dist/modules/engine-flowable/index.d.ts +19 -0
- package/dist/modules/engine-flowable/index.js +160 -0
- package/dist/modules/export-svg/index.d.ts +112 -0
- package/dist/modules/export-svg/index.js +2 -0
- package/dist/modules/export-svg/preview.js +327 -0
- package/dist/modules/export-svg/render.js +718 -0
- package/dist/modules/icons/index.d.ts +24 -0
- package/dist/modules/icons/index.js +264 -0
- package/dist/modules/palette/index.d.ts +74 -0
- package/dist/modules/palette/index.js +99 -0
- package/dist/modules/palette/panel.js +99 -0
- package/dist/modules/properties/index.d.ts +20 -0
- package/dist/modules/properties/index.js +19 -0
- package/dist/modules/properties-activiti/index.d.ts +3 -0
- package/dist/modules/properties-activiti/index.js +97 -0
- package/dist/modules/properties-bpmn/index.d.ts +3 -0
- package/dist/modules/properties-bpmn/index.js +518 -0
- package/dist/modules/properties-core/index.d.ts +124 -0
- package/dist/modules/properties-core/index.js +312 -0
- package/dist/modules/properties-flowable/index.d.ts +3 -0
- package/dist/modules/properties-flowable/index.js +114 -0
- package/dist/modules/properties-renderer/index.d.ts +25 -0
- package/dist/modules/properties-renderer/index.js +491 -0
- package/dist/modules/renderer-svg/index.d.ts +118 -0
- package/dist/modules/renderer-svg/index.js +1460 -0
- package/dist/modules/runtime/index.d.ts +169 -0
- package/dist/modules/runtime/index.js +535 -0
- package/dist/modules/theme/index.d.ts +95 -0
- package/dist/modules/theme/index.js +368 -0
- package/dist/modules/viewer/index.d.ts +265 -0
- package/dist/modules/viewer/index.js +1011 -0
- package/dist/modules/viewer/runtime-content.js +123 -0
- package/dist/modules/viewer/runtime-details-motion.js +228 -0
- package/dist/modules/viewer/runtime-trace.js +574 -0
- package/dist/modules/viewer/timeline.js +276 -0
- package/dist/selection-layout.js +1 -1
- package/dist/shell.js +210 -26
- package/dist/styles.css +116 -7
- package/llms-full.txt +3082 -0
- package/llms.txt +225 -0
- package/package.json +39 -16
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { propertyEntry, propertyGroup } from '../properties-core/index.js';
|
|
2
|
+
|
|
3
|
+
const activityTypes = new Set(['task', 'userTask', 'manualTask', 'serviceTask', 'scriptTask', 'businessRuleTask', 'sendTask', 'receiveTask', 'callActivity', 'subProcess', 'eventSubProcess', 'transaction', 'adHocSubProcess']);
|
|
4
|
+
const implementationTypes = [['class', 'Java Class'], ['delegateExpression', 'Delegate Expression'], ['expression', 'Expression']];
|
|
5
|
+
const executionColumns = [
|
|
6
|
+
{ key: 'event', label: 'Event', type: 'select', options: [['start', 'start'], ['end', 'end'], ['take', 'take']] },
|
|
7
|
+
{ key: 'implementationType', label: '类型', type: 'select', options: implementationTypes },
|
|
8
|
+
{ key: 'implementation', label: '实现' },
|
|
9
|
+
];
|
|
10
|
+
const taskListenerColumns = [
|
|
11
|
+
{ key: 'event', label: 'Event', type: 'select', options: [['create', 'create'], ['assignment', 'assignment'], ['complete', 'complete'], ['delete', 'delete'], ['all', 'all']] },
|
|
12
|
+
{ key: 'implementationType', label: '类型', type: 'select', options: implementationTypes },
|
|
13
|
+
{ key: 'implementation', label: '实现' },
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
const processProvider = {
|
|
17
|
+
id: 'activiti-process', priority: 640, appliesTo: { kind: 'process', engine: 'activiti' },
|
|
18
|
+
getGroups() { return [propertyGroup({ id: 'activiti-process-execution', label: 'Activiti 执行监听器', collapsed: true, position: { after: 'global-resources' }, entries: [
|
|
19
|
+
propertyEntry({ id: 'process-listeners', type: 'table', label: 'Execution Listeners', path: 'properties.executionListeners', rowLabel: '监听器', defaultRow: () => ({ event: 'start', implementationType: 'class', implementation: '' }), columns: executionColumns }),
|
|
20
|
+
] })]; },
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const userTaskProvider = {
|
|
24
|
+
id: 'activiti-user-task', priority: 660, appliesTo: { kind: 'node', nodeType: 'userTask', engine: 'activiti' },
|
|
25
|
+
getGroups() { return [
|
|
26
|
+
propertyGroup({ id: 'assignment', label: '人员分配 · Activiti', position: { after: 'basic' }, entries: [
|
|
27
|
+
propertyEntry({ id: 'assignee', type: 'user-select', label: '负责人 Assignee', path: 'properties.assignee', dataProvider: 'identity', allowExpression: true, placeholder: '${manager}' }),
|
|
28
|
+
propertyEntry({ id: 'owner', type: 'user-select', label: 'Owner', path: 'properties.owner', dataProvider: 'identity', allowExpression: true }),
|
|
29
|
+
propertyEntry({ id: 'candidate-users', type: 'tags', label: '候选用户', path: 'properties.candidateUsers', dataProvider: 'identity' }),
|
|
30
|
+
propertyEntry({ id: 'candidate-groups', type: 'tags', label: '候选组', path: 'properties.candidateGroups', dataProvider: 'identity' }),
|
|
31
|
+
] }),
|
|
32
|
+
propertyGroup({ id: 'task-config', label: '任务属性', position: { after: 'assignment' }, entries: [
|
|
33
|
+
propertyEntry({ id: 'form-key', type: 'form-select', label: 'Form Key', path: 'properties.formKey', dataProvider: 'forms', allowCustom: true }),
|
|
34
|
+
propertyEntry({ id: 'due-date', type: 'expression', label: 'Due Date', path: 'properties.dueDate' }),
|
|
35
|
+
propertyEntry({ id: 'priority', type: 'number', label: 'Priority', path: 'properties.priority', min: 0, max: 100 }),
|
|
36
|
+
propertyEntry({ id: 'category', label: 'Category', path: 'properties.category' }),
|
|
37
|
+
propertyEntry({ id: 'skip-expression', type: 'expression', label: 'Skip Expression', path: 'properties.skipExpression' }),
|
|
38
|
+
] }),
|
|
39
|
+
propertyGroup({ id: 'task-listeners', label: 'Task Listeners', collapsed: true, position: { after: 'multi-instance' }, entries: [
|
|
40
|
+
propertyEntry({ id: 'task-listener-table', type: 'table', label: '任务监听器', path: 'properties.taskListeners', rowLabel: 'Task Listener', defaultRow: () => ({ event: 'create', implementationType: 'class', implementation: '' }), columns: taskListenerColumns }),
|
|
41
|
+
] }),
|
|
42
|
+
]; },
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const implementationProvider = {
|
|
46
|
+
id: 'activiti-implementation', priority: 660,
|
|
47
|
+
appliesTo: (ctx) => ctx.kind === 'node' && ctx.model.engine === 'activiti' && ['serviceTask', 'sendTask', 'businessRuleTask'].includes(ctx.element.type),
|
|
48
|
+
getGroups() { return [
|
|
49
|
+
propertyGroup({ id: 'engine-implementation', label: '执行实现 · Activiti', position: { after: 'basic' }, entries: [
|
|
50
|
+
propertyEntry({ id: 'implementation-type', type: 'select', label: '实现方式', path: 'properties.implementationType', options: implementationTypes }),
|
|
51
|
+
propertyEntry({ id: 'implementation', type: 'expression', label: '实现值', path: 'properties.implementation', placeholder: 'com.example.MyDelegate / ${delegateBean}' }),
|
|
52
|
+
propertyEntry({ id: 'result-variable', label: 'Result Variable', path: 'properties.resultVariable' }),
|
|
53
|
+
] }),
|
|
54
|
+
propertyGroup({ id: 'field-injection', label: 'Field Injection', collapsed: true, position: { after: 'engine-implementation' }, entries: [
|
|
55
|
+
propertyEntry({ id: 'fields', type: 'table', label: '字段注入', path: 'properties.fields', rowLabel: 'Field', defaultRow: () => ({ name: '', type: 'string', value: '' }), columns: [{ key: 'name', label: 'Name' }, { key: 'type', label: '类型', type: 'select', options: [['string', 'String'], ['expression', 'Expression']] }, { key: 'value', label: 'Value' }] }),
|
|
56
|
+
] }),
|
|
57
|
+
]; },
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const activityProvider = {
|
|
61
|
+
id: 'activiti-activity-execution', priority: 610,
|
|
62
|
+
appliesTo: (ctx) => ctx.kind === 'node' && ctx.model.engine === 'activiti' && activityTypes.has(ctx.element.type),
|
|
63
|
+
getGroups() { return [
|
|
64
|
+
propertyGroup({ id: 'engine-execution', label: '执行配置 · Activiti', collapsed: true, position: { after: 'multi-instance' }, entries: [
|
|
65
|
+
propertyEntry({ id: 'async', type: 'switch', label: 'Async', path: 'properties.async' }),
|
|
66
|
+
propertyEntry({ id: 'exclusive', type: 'switch', label: 'Exclusive Job', path: 'properties.exclusive' }),
|
|
67
|
+
propertyEntry({ id: 'async-leave', type: 'switch', label: 'Async Leave', path: 'properties.asyncLeave' }),
|
|
68
|
+
propertyEntry({ id: 'failed-retry', type: 'expression', label: 'Failed Job Retry Cycle', path: 'properties.failedJobRetryTimeCycle', placeholder: 'R3/PT5M' }),
|
|
69
|
+
] }),
|
|
70
|
+
propertyGroup({ id: 'execution-listeners', label: 'Execution Listeners', collapsed: true, position: { after: 'engine-execution' }, entries: [
|
|
71
|
+
propertyEntry({ id: 'execution-listener-table', type: 'table', label: '执行监听器', path: 'properties.executionListeners', rowLabel: 'Execution Listener', defaultRow: () => ({ event: 'start', implementationType: 'class', implementation: '' }), columns: executionColumns.map((column) => column.key === 'event' ? { ...column, options: [['start', 'start'], ['end', 'end']] } : column) }),
|
|
72
|
+
] }),
|
|
73
|
+
]; },
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const callProvider = {
|
|
77
|
+
id: 'activiti-call-activity', priority: 650, appliesTo: { kind: 'node', nodeType: 'callActivity', engine: 'activiti' },
|
|
78
|
+
getGroups() { return [propertyGroup({ id: 'activiti-call', label: 'Activiti 调用选项', collapsed: true, position: { after: 'call-activity' }, entries: [
|
|
79
|
+
propertyEntry({ id: 'inherit-business-key', type: 'switch', label: 'Inherit Business Key', path: 'properties.inheritBusinessKey' }),
|
|
80
|
+
propertyEntry({ id: 'inherit-variables', type: 'switch', label: 'Inherit Variables', path: 'properties.inheritVariables' }),
|
|
81
|
+
] })]; },
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const edgeProvider = {
|
|
85
|
+
id: 'activiti-edge-listeners', priority: 620,
|
|
86
|
+
appliesTo: (ctx) => ctx.kind === 'edge' && ctx.model.engine === 'activiti' && (ctx.element.type || 'sequenceFlow') === 'sequenceFlow',
|
|
87
|
+
getGroups() { return [propertyGroup({ id: 'edge-listeners', label: 'Take Listener · Activiti', collapsed: true, position: { after: 'condition' }, entries: [
|
|
88
|
+
propertyEntry({ id: 'edge-execution-listeners', type: 'table', label: 'Execution Listeners', path: 'properties.executionListeners', rowLabel: 'Take Listener', defaultRow: () => ({ event: 'take', implementationType: 'class', implementation: '' }), columns: executionColumns.map((column) => column.key === 'event' ? { ...column, options: [['take', 'take']] } : column) }),
|
|
89
|
+
] })]; },
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export const activitiPropertiesProviders = [processProvider, userTaskProvider, implementationProvider, activityProvider, callProvider, edgeProvider];
|
|
93
|
+
|
|
94
|
+
export function registerActivitiProperties(registry) {
|
|
95
|
+
const disposers = activitiPropertiesProviders.map((provider) => registry.registerProvider(provider.priority ?? 500, provider));
|
|
96
|
+
return () => disposers.forEach((dispose) => dispose());
|
|
97
|
+
}
|