@bpmn-nova/studio 0.3.9-preview → 0.4.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 (55) hide show
  1. package/README.md +2 -2
  2. package/dist/canvas.js +97 -25
  3. package/dist/config.js +13 -0
  4. package/dist/context-menu.js +41 -32
  5. package/dist/controller.js +45 -19
  6. package/dist/index.d.ts +47 -2
  7. package/dist/index.js +1 -0
  8. package/dist/interactions.js +6 -1
  9. package/dist/modules/bpmn-model/index.d.ts +2 -1
  10. package/dist/modules/bpmn-model/index.js +12 -10
  11. package/dist/modules/core/gateway.js +16 -13
  12. package/dist/modules/core/index.d.ts +6 -4
  13. package/dist/modules/core/model.js +12 -7
  14. package/dist/modules/designer/index.d.ts +5 -1
  15. package/dist/modules/designer/index.js +36 -15
  16. package/dist/modules/export-svg/index.d.ts +12 -5
  17. package/dist/modules/export-svg/preview.js +34 -24
  18. package/dist/modules/export-svg/render.js +102 -50
  19. package/dist/modules/i18n/index.d.ts +647 -0
  20. package/dist/modules/i18n/index.js +247 -0
  21. package/dist/modules/i18n/locales/en-US.js +823 -0
  22. package/dist/modules/i18n/locales/zh-CN.js +805 -0
  23. package/dist/modules/node-presentation/index.d.ts +3 -2
  24. package/dist/modules/node-presentation/index.js +14 -11
  25. package/dist/modules/palette/index.d.ts +6 -1
  26. package/dist/modules/palette/index.js +26 -8
  27. package/dist/modules/palette/panel.js +44 -6
  28. package/dist/modules/properties/index.d.ts +2 -1
  29. package/dist/modules/properties/index.js +2 -2
  30. package/dist/modules/properties-activiti/index.js +84 -59
  31. package/dist/modules/properties-bpmn/index.js +151 -128
  32. package/dist/modules/properties-core/index.d.ts +9 -3
  33. package/dist/modules/properties-core/index.js +16 -4
  34. package/dist/modules/properties-flowable/index.js +55 -34
  35. package/dist/modules/properties-renderer/index.d.ts +5 -1
  36. package/dist/modules/properties-renderer/index.js +110 -42
  37. package/dist/modules/renderer-svg/index.d.ts +6 -2
  38. package/dist/modules/renderer-svg/index.js +113 -38
  39. package/dist/modules/runtime/index.d.ts +33 -5
  40. package/dist/modules/runtime/index.js +97 -73
  41. package/dist/modules/runtime/time.js +89 -4
  42. package/dist/modules/runtime/visits.js +6 -4
  43. package/dist/modules/theme/index.d.ts +5 -2
  44. package/dist/modules/theme/index.js +8 -4
  45. package/dist/modules/viewer/index.d.ts +28 -7
  46. package/dist/modules/viewer/index.js +213 -56
  47. package/dist/modules/viewer/runtime-content.js +26 -20
  48. package/dist/modules/viewer/runtime-trace.js +43 -25
  49. package/dist/modules/viewer/timeline.js +103 -36
  50. package/dist/shell.js +258 -75
  51. package/dist/sidebars.js +3 -1
  52. package/dist/styles.css +3 -2
  53. package/llms-full.txt +241 -46
  54. package/llms.txt +4 -4
  55. package/package.json +2 -3
@@ -1,4 +1,5 @@
1
1
  import type { BpmnEdge, BpmnNode, ElementSelection, EngineId, ProcessModel } from '../core/index.js'
2
+ import type { I18nController, NovaI18nOptions } from '../i18n/index.js'
2
3
 
3
4
  export type PropertyEntryType =
4
5
  | 'text' | 'textarea' | 'code' | 'expression' | 'number' | 'select' | 'switch' | 'range' | 'readonly' | 'action' | 'tags'
@@ -7,6 +8,7 @@ export type PropertyEntryType =
7
8
  export interface PropertiesStudio {
8
9
  model: ProcessModel
9
10
  selection: ElementSelection | null
11
+ i18n?: I18nController
10
12
  propertiesProfile?: 'business' | 'developer'
11
13
  getSelectedElement(): ProcessModel | BpmnNode | BpmnEdge | Array<BpmnNode | BpmnEdge> | null
12
14
  updateProcess?(patch: Partial<ProcessModel>): unknown
@@ -25,6 +27,8 @@ export interface PropertiesContext {
25
27
  profile: 'business' | 'developer'
26
28
  definition?: { bpmnType: string; label: string; kind: string; [key: string]: unknown } | null
27
29
  engine: EngineId
30
+ i18n: I18nController
31
+ t(key: string, params?: Record<string, unknown>): string
28
32
  is(value: string | ((context: PropertiesContext) => boolean)): boolean
29
33
  get(path: string, fallback?: unknown): unknown
30
34
  set(path: string, value: unknown): void
@@ -92,7 +96,7 @@ export type PropertyComponentRenderer = (context: {
92
96
  value: unknown
93
97
  commit(value: unknown): void
94
98
  }) => void | (() => void)
95
- export interface PropertiesRegistryOptions {
99
+ export interface PropertiesRegistryOptions extends NovaI18nOptions {
96
100
  studio?: PropertiesStudio | null
97
101
  designer?: PropertiesStudio | null
98
102
  components?: Record<string, PropertyComponentRenderer>
@@ -109,15 +113,17 @@ export class PropertiesRegistry {
109
113
  constructor(options?: PropertiesRegistryOptions)
110
114
  studio: PropertiesStudio | null
111
115
  designer: PropertiesStudio | null
116
+ i18n: I18nController | null
112
117
  setStudio(studio: PropertiesStudio): this
113
118
  setDesigner(designer: PropertiesStudio): this
119
+ setI18n(i18n: I18nController | null): this
114
120
  registerProvider(priority: number, provider: PropertiesProvider): () => void
115
121
  registerProvider(provider: PropertiesProvider): () => void
116
122
  registerComponent(name: string, renderer: PropertyComponentRenderer): () => void
117
123
  registerDataProvider(name: string, provider: unknown): () => void
118
124
  getDataProvider(name: string): unknown
119
- createContext(selection?: ElementSelection | null, element?: BpmnNode | BpmnEdge | null): PropertiesContext
120
- getGroups(selection?: ElementSelection | null, element?: BpmnNode | BpmnEdge | null): { groups: PropertyGroup[]; context: PropertiesContext }
125
+ createContext(selection?: ElementSelection | null, element?: BpmnNode | BpmnEdge | null, options?: NovaI18nOptions | null): PropertiesContext
126
+ getGroups(selection?: ElementSelection | null, element?: BpmnNode | BpmnEdge | null, options?: NovaI18nOptions | null): { groups: PropertyGroup[]; context: PropertiesContext }
121
127
  getValue(entry: PropertyEntry, context: PropertiesContext): unknown
122
128
  setValue(entry: PropertyEntry, value: unknown, context: PropertiesContext): unknown
123
129
  }
@@ -1,4 +1,5 @@
1
1
  import { NODE_DEFINITIONS } from '../core/index.js';
2
+ import { createI18n, resolveI18n } from '../i18n/index.js';
2
3
 
3
4
  function isBlank(value) {
4
5
  if (value === undefined || value === null || value === '') return true;
@@ -124,14 +125,22 @@ function profileAllows(item, profile) {
124
125
  }
125
126
 
126
127
  export class PropertiesRegistry {
127
- constructor({ studio = null, designer = null, components = {}, dataProviders = {} } = {}) {
128
+ constructor({ studio = null, designer = null, components = {}, dataProviders = {}, i18n = null, locale, messages } = {}) {
128
129
  this.studio = studio || designer;
129
130
  this.designer = this.studio;
131
+ this.i18n = i18n
132
+ ? resolveI18n(i18n)
133
+ : (locale !== undefined || messages !== undefined ? createI18n({ locale, messages }) : null);
130
134
  this._providers = [];
131
135
  this.components = new Map(Object.entries(components));
132
136
  this.dataProviders = new Map(Object.entries(dataProviders));
133
137
  }
134
138
 
139
+ setI18n(i18n) {
140
+ this.i18n = i18n ? resolveI18n(i18n) : null;
141
+ return this;
142
+ }
143
+
135
144
  setDesigner(designer) {
136
145
  this.studio = designer;
137
146
  this.designer = designer;
@@ -169,12 +178,13 @@ export class PropertiesRegistry {
169
178
  return this.dataProviders.get(name) || null;
170
179
  }
171
180
 
172
- createContext(selection, element) {
181
+ createContext(selection, element, options = null) {
173
182
  const studio = this.studio;
174
183
  if (selection === undefined) selection = studio?.selection ?? null;
175
184
  if (element === undefined) element = selection ? studio?.getSelectedElement?.() : null;
176
185
  const designer = studio;
177
186
  const model = studio?.model || null;
187
+ const translator = resolveI18n(options?.i18n || this.i18n || studio?.i18n || options);
178
188
  let kind = selection?.kind || 'none';
179
189
  if (kind !== 'process' && !element) kind = 'none';
180
190
  const definition = kind === 'node' ? (NODE_DEFINITIONS[element.type] || NODE_DEFINITIONS.generic) : null;
@@ -189,6 +199,8 @@ export class PropertiesRegistry {
189
199
  definition,
190
200
  engine: model?.engine,
191
201
  profile: studio?.propertiesProfile || 'business',
202
+ i18n: translator,
203
+ t: (key, params) => translator.t(key, params),
192
204
  is(value) {
193
205
  if (typeof value === 'function') return !!value(context);
194
206
  if (value === kind) return true;
@@ -249,8 +261,8 @@ export class PropertiesRegistry {
249
261
  return context;
250
262
  }
251
263
 
252
- getGroups(selection, element) {
253
- const context = this.createContext(selection, element);
264
+ getGroups(selection, element, options = null) {
265
+ const context = this.createContext(selection, element, options);
254
266
  if (context.kind === 'none' || context.kind === 'multi') return { groups: [], context };
255
267
  let groups = [];
256
268
  for (const { provider } of this._providers) {
@@ -1,43 +1,52 @@
1
+ import { resolveI18n } from '../i18n/index.js';
1
2
  import { propertyEntry, propertyGroup } from '../properties-core/index.js';
2
3
 
3
4
  const activityTypes = new Set(['task', 'userTask', 'manualTask', 'serviceTask', 'scriptTask', 'businessRuleTask', 'sendTask', 'receiveTask', 'callActivity', 'subProcess', 'eventSubProcess', 'transaction', 'adHocSubProcess']);
4
5
  const implementationTypes = [['class', 'Java Class'], ['delegateExpression', 'Delegate Expression'], ['expression', 'Expression']];
5
- const implementationColumns = [
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
- ];
6
+
7
+ function executionColumns(t, eventOptions = [['start', 'start'], ['end', 'end'], ['take', 'take']]) {
8
+ return [
9
+ { key: 'event', label: 'Event', type: 'select', options: eventOptions },
10
+ { key: 'implementationType', label: t('properties.engine.columnType'), type: 'select', options: implementationTypes },
11
+ { key: 'implementation', label: t('properties.engine.columnImplementation') },
12
+ ];
13
+ }
14
+
15
+ function taskListenerColumns(t) {
16
+ return [
17
+ { key: 'event', label: 'Event', type: 'select', options: [['create', 'create'], ['assignment', 'assignment'], ['complete', 'complete'], ['delete', 'delete'], ['all', 'all']] },
18
+ { key: 'implementationType', label: t('properties.engine.columnType'), type: 'select', options: implementationTypes },
19
+ { key: 'implementation', label: t('properties.engine.columnImplementation') },
20
+ ];
21
+ }
15
22
 
16
23
  const flowableProcessProvider = {
17
24
  id: 'flowable-process', priority: 640, appliesTo: { kind: 'process', engine: 'flowable' },
18
- getGroups() {
25
+ getGroups(context) {
26
+ const t = (key, params) => resolveI18n(context).t(key, params);
19
27
  return [propertyGroup({
20
- id: 'flowable-process-execution', label: 'Flowable 执行监听器', collapsed: true, position: { after: 'global-resources' },
21
- entries: [propertyEntry({ id: 'process-listeners', type: 'table', label: 'Execution Listeners', path: 'properties.executionListeners', rowLabel: '监听器', defaultRow: () => ({ event: 'start', implementationType: 'class', implementation: '' }), columns: implementationColumns.filter((c) => c.key !== 'event' || true) })],
28
+ id: 'flowable-process-execution', label: t('properties.engine.flowableProcessExecutionGroup'), collapsed: true, position: { after: 'global-resources' },
29
+ entries: [propertyEntry({ id: 'process-listeners', type: 'table', label: 'Execution Listeners', path: 'properties.executionListeners', rowLabel: t('properties.engine.listenerRow'), defaultRow: () => ({ event: 'start', implementationType: 'class', implementation: '' }), columns: executionColumns(t) })],
22
30
  })];
23
31
  },
24
32
  };
25
33
 
26
34
  const flowableUserTaskProvider = {
27
35
  id: 'flowable-user-task', priority: 660, appliesTo: { kind: 'node', nodeType: 'userTask', engine: 'flowable' },
28
- getGroups() {
36
+ getGroups(context) {
37
+ const t = (key, params) => resolveI18n(context).t(key, params);
29
38
  return [
30
39
  propertyGroup({
31
- id: 'assignment', label: '人员分配 · Flowable', position: { after: 'basic' },
40
+ id: 'assignment', label: t('properties.engine.flowableAssignmentGroup'), position: { after: 'basic' },
32
41
  entries: [
33
- propertyEntry({ id: 'assignee', type: 'user-select', label: '负责人 Assignee', path: 'properties.assignee', dataProvider: 'identity', allowExpression: true, placeholder: '${manager}' }),
42
+ propertyEntry({ id: 'assignee', type: 'user-select', label: t('properties.engine.assignee'), path: 'properties.assignee', dataProvider: 'identity', allowExpression: true, placeholder: '${manager}' }),
34
43
  propertyEntry({ id: 'owner', type: 'user-select', label: 'Owner', path: 'properties.owner', dataProvider: 'identity', allowExpression: true }),
35
- propertyEntry({ id: 'candidate-users', type: 'tags', label: '候选用户', path: 'properties.candidateUsers', dataProvider: 'identity', placeholder: 'user1,user2' }),
36
- propertyEntry({ id: 'candidate-groups', type: 'tags', label: '候选组', path: 'properties.candidateGroups', dataProvider: 'identity', placeholder: 'manager,finance' }),
44
+ propertyEntry({ id: 'candidate-users', type: 'tags', label: t('properties.engine.candidateUsers'), path: 'properties.candidateUsers', dataProvider: 'identity', placeholder: 'user1,user2' }),
45
+ propertyEntry({ id: 'candidate-groups', type: 'tags', label: t('properties.engine.candidateGroups'), path: 'properties.candidateGroups', dataProvider: 'identity', placeholder: 'manager,finance' }),
37
46
  ],
38
47
  }),
39
48
  propertyGroup({
40
- id: 'task-config', label: '任务属性', position: { after: 'assignment' },
49
+ id: 'task-config', label: t('properties.engine.taskConfigGroup'), position: { after: 'assignment' },
41
50
  entries: [
42
51
  propertyEntry({ id: 'form-key', type: 'form-select', label: 'Form Key', path: 'properties.formKey', dataProvider: 'forms', allowCustom: true }),
43
52
  propertyEntry({ id: 'due-date', type: 'expression', label: 'Due Date', path: 'properties.dueDate', placeholder: '${now().plusDays(1)}' }),
@@ -48,7 +57,7 @@ const flowableUserTaskProvider = {
48
57
  }),
49
58
  propertyGroup({
50
59
  id: 'task-listeners', label: 'Task Listeners', collapsed: true, position: { after: 'multi-instance' },
51
- entries: [propertyEntry({ id: 'task-listener-table', type: 'table', label: '任务监听器', path: 'properties.taskListeners', rowLabel: 'Task Listener', defaultRow: () => ({ event: 'create', implementationType: 'class', implementation: '' }), columns: taskListenerColumns })],
60
+ entries: [propertyEntry({ id: 'task-listener-table', type: 'table', label: t('properties.engine.taskListenersLabel'), path: 'properties.taskListeners', rowLabel: 'Task Listener', defaultRow: () => ({ event: 'create', implementationType: 'class', implementation: '' }), columns: taskListenerColumns(t) })],
52
61
  }),
53
62
  ];
54
63
  },
@@ -58,15 +67,20 @@ const flowableImplementationProvider = {
58
67
  id: 'flowable-implementation', priority: 660,
59
68
  appliesTo: (ctx) => ctx.kind === 'node' && ctx.model.engine === 'flowable' && ['serviceTask', 'sendTask', 'businessRuleTask'].includes(ctx.element.type),
60
69
  getGroups(context) {
61
- const label = context.element.type === 'businessRuleTask' ? '业务规则实现 · Flowable' : context.element.type === 'sendTask' ? '发送实现 · Flowable' : '服务实现 · Flowable';
70
+ const t = (key, params) => resolveI18n(context).t(key, params);
71
+ const label = context.element.type === 'businessRuleTask'
72
+ ? t('properties.engine.flowableRuleImplGroup')
73
+ : context.element.type === 'sendTask'
74
+ ? t('properties.engine.flowableSendImplGroup')
75
+ : t('properties.engine.flowableServiceImplGroup');
62
76
  return [
63
77
  propertyGroup({ id: 'engine-implementation', label, position: { after: 'basic' }, entries: [
64
- propertyEntry({ id: 'implementation-type', type: 'select', label: '实现方式', path: 'properties.implementationType', options: implementationTypes }),
65
- propertyEntry({ id: 'implementation', type: 'expression', label: '实现值', path: 'properties.implementation', placeholder: 'com.example.MyDelegate / ${delegateBean}' }),
78
+ propertyEntry({ id: 'implementation-type', type: 'select', label: t('properties.engine.implementationType'), path: 'properties.implementationType', options: implementationTypes }),
79
+ propertyEntry({ id: 'implementation', type: 'expression', label: t('properties.engine.implementationValue'), path: 'properties.implementation', placeholder: 'com.example.MyDelegate / ${delegateBean}' }),
66
80
  propertyEntry({ id: 'result-variable', label: 'Result Variable', path: 'properties.resultVariable', placeholder: 'result' }),
67
81
  ] }),
68
82
  propertyGroup({ id: 'field-injection', label: 'Field Injection', collapsed: true, position: { after: 'engine-implementation' }, entries: [
69
- 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' }] }),
83
+ propertyEntry({ id: 'fields', type: 'table', label: t('properties.engine.fieldInjectionLabel'), path: 'properties.fields', rowLabel: 'Field', defaultRow: () => ({ name: '', type: 'string', value: '' }), columns: [{ key: 'name', label: 'Name' }, { key: 'type', label: t('properties.engine.columnType'), type: 'select', options: [['string', 'String'], ['expression', 'Expression']] }, { key: 'value', label: 'Value' }] }),
70
84
  ] }),
71
85
  ];
72
86
  },
@@ -75,16 +89,17 @@ const flowableImplementationProvider = {
75
89
  const flowableActivityExecutionProvider = {
76
90
  id: 'flowable-activity-execution', priority: 610,
77
91
  appliesTo: (ctx) => ctx.kind === 'node' && ctx.model.engine === 'flowable' && activityTypes.has(ctx.element.type),
78
- getGroups() {
92
+ getGroups(context) {
93
+ const t = (key, params) => resolveI18n(context).t(key, params);
79
94
  return [
80
- propertyGroup({ id: 'engine-execution', label: '执行配置 · Flowable', collapsed: true, position: { after: 'multi-instance' }, entries: [
95
+ propertyGroup({ id: 'engine-execution', label: t('properties.engine.flowableExecutionGroup'), collapsed: true, position: { after: 'multi-instance' }, entries: [
81
96
  propertyEntry({ id: 'async', type: 'switch', label: 'Async', path: 'properties.async' }),
82
97
  propertyEntry({ id: 'exclusive', type: 'switch', label: 'Exclusive Job', path: 'properties.exclusive' }),
83
98
  propertyEntry({ id: 'async-leave', type: 'switch', label: 'Async Leave', path: 'properties.asyncLeave' }),
84
99
  propertyEntry({ id: 'failed-retry', type: 'expression', label: 'Failed Job Retry Cycle', path: 'properties.failedJobRetryTimeCycle', placeholder: 'R3/PT5M' }),
85
100
  ] }),
86
101
  propertyGroup({ id: 'execution-listeners', label: 'Execution Listeners', collapsed: true, position: { after: 'engine-execution' }, entries: [
87
- propertyEntry({ id: 'execution-listener-table', type: 'table', label: '执行监听器', path: 'properties.executionListeners', rowLabel: 'Execution Listener', defaultRow: () => ({ event: 'start', implementationType: 'class', implementation: '' }), columns: implementationColumns.filter((column) => column.key !== 'event' || true).map((column) => column.key === 'event' ? { ...column, options: [['start', 'start'], ['end', 'end']] } : column) }),
102
+ propertyEntry({ id: 'execution-listener-table', type: 'table', label: t('properties.engine.executionListenersLabel'), path: 'properties.executionListeners', rowLabel: 'Execution Listener', defaultRow: () => ({ event: 'start', implementationType: 'class', implementation: '' }), columns: executionColumns(t, [['start', 'start'], ['end', 'end']]) }),
88
103
  ] }),
89
104
  ];
90
105
  },
@@ -92,18 +107,24 @@ const flowableActivityExecutionProvider = {
92
107
 
93
108
  const flowableCallActivityProvider = {
94
109
  id: 'flowable-call-activity', priority: 650, appliesTo: { kind: 'node', nodeType: 'callActivity', engine: 'flowable' },
95
- getGroups() { return [propertyGroup({ id: 'flowable-call', label: 'Flowable 调用选项', collapsed: true, position: { after: 'call-activity' }, entries: [
96
- propertyEntry({ id: 'same-deployment', type: 'switch', label: 'Same Deployment', path: 'properties.sameDeployment' }),
97
- propertyEntry({ id: 'process-instance-name', type: 'expression', label: 'Process Instance Name', path: 'properties.processInstanceName' }),
98
- ] })]; },
110
+ getGroups(context) {
111
+ const t = (key, params) => resolveI18n(context).t(key, params);
112
+ return [propertyGroup({ id: 'flowable-call', label: t('properties.engine.flowableCallGroup'), collapsed: true, position: { after: 'call-activity' }, entries: [
113
+ propertyEntry({ id: 'same-deployment', type: 'switch', label: 'Same Deployment', path: 'properties.sameDeployment' }),
114
+ propertyEntry({ id: 'process-instance-name', type: 'expression', label: 'Process Instance Name', path: 'properties.processInstanceName' }),
115
+ ] })];
116
+ },
99
117
  };
100
118
 
101
119
  const flowableEdgeProvider = {
102
120
  id: 'flowable-edge-listeners', priority: 620,
103
121
  appliesTo: (ctx) => ctx.kind === 'edge' && ctx.model.engine === 'flowable' && (ctx.element.type || 'sequenceFlow') === 'sequenceFlow',
104
- getGroups() { return [propertyGroup({ id: 'edge-listeners', label: 'Take Listener · Flowable', collapsed: true, position: { after: 'condition' }, entries: [
105
- propertyEntry({ id: 'edge-execution-listeners', type: 'table', label: 'Execution Listeners', path: 'properties.executionListeners', rowLabel: 'Take Listener', defaultRow: () => ({ event: 'take', implementationType: 'class', implementation: '' }), columns: implementationColumns.map((column) => column.key === 'event' ? { ...column, options: [['take', 'take']] } : column) }),
106
- ] })]; },
122
+ getGroups(context) {
123
+ const t = (key, params) => resolveI18n(context).t(key, params);
124
+ return [propertyGroup({ id: 'edge-listeners', label: 'Take Listener · Flowable', collapsed: true, position: { after: 'condition' }, entries: [
125
+ propertyEntry({ id: 'edge-execution-listeners', type: 'table', label: 'Execution Listeners', path: 'properties.executionListeners', rowLabel: 'Take Listener', defaultRow: () => ({ event: 'take', implementationType: 'class', implementation: '' }), columns: executionColumns(t, [['take', 'take']]) }),
126
+ ] })];
127
+ },
107
128
  };
108
129
 
109
130
  export const flowablePropertiesProviders = [flowableProcessProvider, flowableUserTaskProvider, flowableImplementationProvider, flowableActivityExecutionProvider, flowableCallActivityProvider, flowableEdgeProvider];
@@ -1,9 +1,10 @@
1
1
  import type { BpmnEdge, BpmnNode, ElementSelection } from '../core/index.js'
2
+ import type { I18nController, NovaI18nOptions, NovaLocale, NovaLocaleState, NovaMessagesOverride } from '../i18n/index.js'
2
3
  import type { IconRegistry } from '../icons/index.js'
3
4
  import type { PropertiesContext, PropertiesRegistry, PropertiesStudio, PropertyGroup } from '../properties-core/index.js'
4
5
  import type { NovaThemeInput, NovaThemeMode, NovaThemeState, ThemeController } from '../theme/index.js'
5
6
 
6
- export interface PropertiesPanelOptions {
7
+ export interface PropertiesPanelOptions extends NovaI18nOptions {
7
8
  container: HTMLElement
8
9
  registry: PropertiesRegistry
9
10
  studio?: PropertiesStudio | null
@@ -16,8 +17,11 @@ export interface PropertiesPanelOptions {
16
17
  onThemeChange?: ((state: NovaThemeState) => void) | null
17
18
  }
18
19
  export class PropertiesPanel {
20
+ readonly i18n: I18nController
19
21
  constructor(options: PropertiesPanelOptions)
20
22
  render(selection?: ElementSelection | null, element?: BpmnNode | BpmnEdge | null): { groups: PropertyGroup[]; context: PropertiesContext }
23
+ setLocale(locale?: NovaLocale | null, messages?: NovaMessagesOverride | null): NovaLocaleState
24
+ getLocale(): string
21
25
  setTheme(theme: NovaThemeInput): NovaThemeState
22
26
  setThemeMode(mode: NovaThemeMode): NovaThemeState
23
27
  getThemeState(): NovaThemeState