@formicoidea/labre-framework-bpmn 0.32.0 → 0.33.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.
- package/dist/actions.d.ts +202 -6
- package/dist/actions.js +421 -43
- package/dist/background.d.ts +2 -0
- package/dist/background.js +158 -0
- package/dist/commands.js +496 -5
- package/dist/consts.d.ts +157 -3
- package/dist/consts.js +192 -3
- package/dist/element-renderer.d.ts +10 -4
- package/dist/element-renderer.js +14 -55
- package/dist/element-view.d.ts +100 -8
- package/dist/element-view.js +249 -30
- package/dist/export.d.ts +277 -0
- package/dist/export.js +1802 -0
- package/dist/facts.d.ts +48 -0
- package/dist/facts.js +127 -0
- package/dist/import.d.ts +44 -0
- package/dist/import.js +1440 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +44 -0
- package/dist/interchange.d.ts +109 -0
- package/dist/interchange.js +191 -0
- package/dist/morph.d.ts +61 -0
- package/dist/morph.js +118 -0
- package/dist/node/node-renderer.d.ts +0 -9
- package/dist/node/node-renderer.js +294 -17
- package/dist/pool-hit.d.ts +98 -0
- package/dist/pool-hit.js +130 -0
- package/dist/presets.d.ts +114 -0
- package/dist/presets.js +232 -0
- package/dist/profiles.d.ts +2 -0
- package/dist/profiles.js +189 -0
- package/dist/roles.d.ts +96 -0
- package/dist/roles.js +410 -0
- package/dist/rules.d.ts +199 -0
- package/dist/rules.js +1539 -0
- package/dist/templates/index.js +116 -9
- package/dist/toolbar/bpmn-senior-button.js +8 -2
- package/dist/toolbar/config.d.ts +27 -2
- package/dist/toolbar/config.js +86 -2
- package/dist/toolbar/icons.d.ts +67 -0
- package/dist/toolbar/icons.js +141 -0
- package/dist/toolbar/senior-tool.js +1 -0
- package/dist/translations.d.ts +3 -1
- package/dist/translations.js +8 -3
- package/dist/view.d.ts +6 -2
- package/dist/view.js +68 -5
- package/package.json +2 -2
package/dist/translations.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type TranslationKeyManifestEntry } from '@formicoidea/labre-core/std';
|
|
2
2
|
/**
|
|
3
|
-
* THIS framework's contribution to the translation-key manifest
|
|
3
|
+
* THIS framework's contribution to the translation-key manifest — every
|
|
4
|
+
* `com.labre.*` key BPMN can hand to `TranslationProvider.t`, derived from the
|
|
5
|
+
* very declarations the editor registers (never restated).
|
|
4
6
|
*
|
|
5
7
|
* Its command labels and descriptions are built from a TEMPLATE, so the
|
|
6
8
|
* concrete keys exist nowhere but in the declarations themselves and the
|
package/dist/translations.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { commandTranslationEntries, } from '@formicoidea/labre-core/std';
|
|
1
|
+
import { collectTranslationKeys, commandTranslationEntries, mergeTranslationEntries, } from '@formicoidea/labre-core/std';
|
|
2
2
|
import { bpmnCommands } from './commands.js';
|
|
3
|
+
import { BPMN_PROFILES } from './profiles.js';
|
|
4
|
+
import { BPMN_ROLES } from './roles.js';
|
|
5
|
+
import { BPMN_RULES } from './rules.js';
|
|
3
6
|
/**
|
|
4
|
-
* THIS framework's contribution to the translation-key manifest
|
|
7
|
+
* THIS framework's contribution to the translation-key manifest — every
|
|
8
|
+
* `com.labre.*` key BPMN can hand to `TranslationProvider.t`, derived from the
|
|
9
|
+
* very declarations the editor registers (never restated).
|
|
5
10
|
*
|
|
6
11
|
* Its command labels and descriptions are built from a TEMPLATE, so the
|
|
7
12
|
* concrete keys exist nowhere but in the declarations themselves and the
|
|
@@ -12,4 +17,4 @@ import { bpmnCommands } from './commands.js';
|
|
|
12
17
|
* `bpmnCommands` into the command registry. See
|
|
13
18
|
* `packages/affine/all/src/translations.ts`.
|
|
14
19
|
*/
|
|
15
|
-
export const bpmnTranslationEntries = commandTranslationEntries(bpmnCommands);
|
|
20
|
+
export const bpmnTranslationEntries = mergeTranslationEntries(commandTranslationEntries(bpmnCommands), collectTranslationKeys('role', BPMN_ROLES), collectTranslationKeys('rule', BPMN_RULES), collectTranslationKeys('profile', BPMN_PROFILES));
|
package/dist/view.d.ts
CHANGED
|
@@ -10,8 +10,12 @@ export declare class BpmnRenderViewExtension extends ViewExtensionProvider {
|
|
|
10
10
|
setup(context: ViewExtensionContext): void;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* BPMN creation tooling — flag-gated (`bpmn`): the senior toolbar button
|
|
14
|
-
*
|
|
13
|
+
* BPMN creation tooling — flag-gated (`bpmn`): the senior toolbar button, its
|
|
14
|
+
* templates category, the validation rules and profiles, and the interchange
|
|
15
|
+
* capabilities. All of it is tooling: a process drawn while the flag was on
|
|
16
|
+
* keeps rendering when it goes off, it just stops being checked — the profile
|
|
17
|
+
* its pool was put on stays written, unread, until the flag comes back, and so
|
|
18
|
+
* does anything an import wrote (`docs/adr/0009`, `docs/adr/0012`).
|
|
15
19
|
*/
|
|
16
20
|
export declare class BpmnViewExtension extends ViewExtensionProvider {
|
|
17
21
|
name: string;
|
package/dist/view.js
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
|
+
import { FrameworkBackgroundInteractionExtension, InterchangeExtension, morphToolbarConfig, ValidationProfileExtension, ValidationRuleExtension, validationToolbarConfig, } from '@formicoidea/labre-core/blocks/surface';
|
|
1
2
|
import { ViewExtensionProvider, } from '@formicoidea/labre-core/ext-loader';
|
|
2
3
|
import { extendTemplateCategory } from '@formicoidea/labre-core/gfx/template';
|
|
3
|
-
import {
|
|
4
|
+
import { ToolbarModuleExtension } from '@formicoidea/labre-core/shared/services';
|
|
5
|
+
import { BlockFlavourIdentifier, CommandExtension } from '@formicoidea/labre-core/std';
|
|
6
|
+
import { RoleVocabularyExtension } from '@formicoidea/labre-core/std/gfx';
|
|
7
|
+
import { BPMN_POOL_BACKGROUND } from './background.js';
|
|
4
8
|
import { bpmnCommandIcons, bpmnCommands } from './commands.js';
|
|
5
9
|
import { effects } from './effects.js';
|
|
10
|
+
import { BPMN_INTERCHANGE } from './interchange.js';
|
|
11
|
+
import { BPMN_MORPH_SPEC } from './morph.js';
|
|
12
|
+
import { BPMN_PROFILES } from './profiles.js';
|
|
13
|
+
import { BPMN_ROLES } from './roles.js';
|
|
14
|
+
import { BPMN_RULES } from './rules.js';
|
|
6
15
|
import { bpmnTemplateCategory } from './templates/index.js';
|
|
7
16
|
import { BpmnPoolRendererExtension } from './element-renderer.js';
|
|
8
|
-
import {
|
|
17
|
+
import { BpmnPoolView } from './element-view.js';
|
|
9
18
|
import { BpmnNodeRendererExtension } from './node/node-renderer.js';
|
|
10
19
|
import { BpmnNodeView } from './node/node-view.js';
|
|
11
20
|
import { bpmnPoolToolbarExtension } from './toolbar/config.js';
|
|
@@ -27,15 +36,28 @@ export class BpmnRenderViewExtension extends ViewExtensionProvider {
|
|
|
27
36
|
context.register(BpmnPoolRendererExtension);
|
|
28
37
|
context.register(BpmnNodeView);
|
|
29
38
|
context.register(BpmnNodeRendererExtension);
|
|
39
|
+
// The role VOCABULARY, always on. A role is written in the document, not in
|
|
40
|
+
// the tooling: the direction reveal of the sequence flow, the inversion
|
|
41
|
+
// command and the toolbar entry that must not lie about a typed edge all
|
|
42
|
+
// read this, and they have to keep working on a process drawn while the flag
|
|
43
|
+
// was on and opened while it is off (`docs/adr/0009`, `docs/adr/0010`).
|
|
44
|
+
context.register(RoleVocabularyExtension(BPMN_ROLES));
|
|
30
45
|
if (this.isEdgeless(context.scope)) {
|
|
31
|
-
|
|
46
|
+
// Resize gating, driven by the declaration like every other framework
|
|
47
|
+
// background: the handles stay hidden until `resizeEnabled` says
|
|
48
|
+
// otherwise, and the toolbar toggle is what writes it.
|
|
49
|
+
context.register(FrameworkBackgroundInteractionExtension(BPMN_POOL_BACKGROUND));
|
|
32
50
|
context.register(bpmnPoolToolbarExtension);
|
|
33
51
|
}
|
|
34
52
|
}
|
|
35
53
|
}
|
|
36
54
|
/**
|
|
37
|
-
* BPMN creation tooling — flag-gated (`bpmn`): the senior toolbar button
|
|
38
|
-
*
|
|
55
|
+
* BPMN creation tooling — flag-gated (`bpmn`): the senior toolbar button, its
|
|
56
|
+
* templates category, the validation rules and profiles, and the interchange
|
|
57
|
+
* capabilities. All of it is tooling: a process drawn while the flag was on
|
|
58
|
+
* keeps rendering when it goes off, it just stops being checked — the profile
|
|
59
|
+
* its pool was put on stays written, unread, until the flag comes back, and so
|
|
60
|
+
* does anything an import wrote (`docs/adr/0009`, `docs/adr/0012`).
|
|
39
61
|
*/
|
|
40
62
|
export class BpmnViewExtension extends ViewExtensionProvider {
|
|
41
63
|
constructor() {
|
|
@@ -51,6 +73,47 @@ export class BpmnViewExtension extends ViewExtensionProvider {
|
|
|
51
73
|
setup(context) {
|
|
52
74
|
super.setup(context);
|
|
53
75
|
if (this.isEdgeless(context.scope)) {
|
|
76
|
+
context.register(ValidationRuleExtension(BPMN_RULES));
|
|
77
|
+
context.register(ValidationProfileExtension(BPMN_PROFILES));
|
|
78
|
+
// Reading and writing `.bpmn` files, declared rather than assumed
|
|
79
|
+
// (`docs/adr/0012`). Tooling like the rest of this class: with the flag
|
|
80
|
+
// off there is nothing to export WITH, while a board a past import wrote
|
|
81
|
+
// keeps every element and every byte it was given (`docs/adr/0009`).
|
|
82
|
+
context.register(InterchangeExtension(BPMN_INTERCHANGE));
|
|
83
|
+
// The Validation dropdown on a selected pool's contextual toolbar. A
|
|
84
|
+
// SECOND module on the same element, through the `custom:` flavour slot,
|
|
85
|
+
// exactly as wardley and the context map register it on theirs:
|
|
86
|
+
// `bpmnPoolToolbarExtension` is registered always-on because a stored pool
|
|
87
|
+
// must keep its lanes and its resize toggle, while choosing how hard to
|
|
88
|
+
// check the process is tooling and belongs here. The config names no
|
|
89
|
+
// framework — it reads roles and profiles — so it is the very same object
|
|
90
|
+
// the other two register.
|
|
91
|
+
context.register(ToolbarModuleExtension({
|
|
92
|
+
id: BlockFlavourIdentifier('custom:affine:surface:bpmnPool'),
|
|
93
|
+
config: validationToolbarConfig,
|
|
94
|
+
}));
|
|
95
|
+
// The "Change type" dropdown on a selected NODE's contextual toolbar —
|
|
96
|
+
// the generic module, parameterized by BPMN's own families table.
|
|
97
|
+
//
|
|
98
|
+
// `affine:surface:bpmnNode` is a FREE slot, and class inheritance has
|
|
99
|
+
// nothing to do with it: `renderToolbar` merges by flavour KEY — the
|
|
100
|
+
// element's own, its `custom:` twin and the `affine:surface:*` wildcards
|
|
101
|
+
// — so `shapeToolbarExtension`, which binds `affine:surface:shape`, never
|
|
102
|
+
// reaches a bpmn node however much of `ShapeElementModel` the class
|
|
103
|
+
// inherits. Nothing claimed this key before, so the registration is purely
|
|
104
|
+
// additive: it joins the wildcard entries (tags, validation) that a node
|
|
105
|
+
// already gets, and a second module claiming the same key would throw
|
|
106
|
+
// `DuplicateServiceDefinitionError` before the editor finished setting up.
|
|
107
|
+
//
|
|
108
|
+
// Registered HERE, in the flag-gated half, because a morph is TOOLING: a
|
|
109
|
+
// node drawn while the flag was on keeps its kind, its role, its glyph
|
|
110
|
+
// and its place in every rule when the flag goes off — it just stops
|
|
111
|
+
// being something the toolbar offers to say more precisely
|
|
112
|
+
// (`docs/adr/0009`).
|
|
113
|
+
context.register(ToolbarModuleExtension({
|
|
114
|
+
id: BlockFlavourIdentifier('affine:surface:bpmnNode'),
|
|
115
|
+
config: morphToolbarConfig(BPMN_MORPH_SPEC),
|
|
116
|
+
}));
|
|
54
117
|
context.register(bpmnSeniorTool);
|
|
55
118
|
context.register(CommandExtension(bpmnCommands, bpmnCommandIcons));
|
|
56
119
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formicoidea/labre-framework-bpmn",
|
|
3
3
|
"description": "Labre bpmn framework for @formicoidea/labre-core.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.33.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"author": "lajola",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@formicoidea/labre-core": "0.
|
|
30
|
+
"@formicoidea/labre-core": "0.33.0",
|
|
31
31
|
"lit": "^3.2.0"
|
|
32
32
|
}
|
|
33
33
|
}
|