bpmn-js 11.1.1 → 11.3.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 (44) hide show
  1. package/README.md +0 -8
  2. package/dist/assets/bpmn-font/css/bpmn-codes.css +6 -6
  3. package/dist/assets/bpmn-font/css/bpmn-embedded.css +18 -13
  4. package/dist/assets/bpmn-font/css/bpmn.css +14 -15
  5. package/dist/assets/bpmn-font/font/bpmn.eot +0 -0
  6. package/dist/assets/bpmn-font/font/bpmn.svg +12 -12
  7. package/dist/assets/bpmn-font/font/bpmn.ttf +0 -0
  8. package/dist/assets/bpmn-font/font/bpmn.woff +0 -0
  9. package/dist/assets/bpmn-font/font/bpmn.woff2 +0 -0
  10. package/dist/assets/diagram-js.css +6 -3
  11. package/dist/bpmn-modeler.development.js +2580 -1183
  12. package/dist/bpmn-modeler.production.min.js +51 -49
  13. package/dist/bpmn-navigated-viewer.development.js +317 -218
  14. package/dist/bpmn-navigated-viewer.production.min.js +6 -6
  15. package/dist/bpmn-viewer.development.js +317 -218
  16. package/dist/bpmn-viewer.production.min.js +6 -6
  17. package/lib/BaseModeler.js +6 -2
  18. package/lib/BaseViewer.js +16 -4
  19. package/lib/Modeler.js +8 -2
  20. package/lib/Viewer.js +6 -2
  21. package/lib/draw/BpmnRenderer.js +185 -196
  22. package/lib/features/context-pad/ContextPadProvider.js +0 -1
  23. package/lib/features/create-append-anything/AppendContextPadProvider.js +77 -0
  24. package/lib/features/create-append-anything/AppendMenuProvider.js +177 -0
  25. package/lib/features/create-append-anything/AppendRules.js +83 -0
  26. package/lib/features/create-append-anything/CreateAppendEditorActions.js +51 -0
  27. package/lib/features/create-append-anything/CreateAppendKeyboardBindings.js +97 -0
  28. package/lib/features/create-append-anything/CreateMenuProvider.js +114 -0
  29. package/lib/features/create-append-anything/CreatePaletteProvider.js +76 -0
  30. package/lib/features/create-append-anything/index.js +37 -0
  31. package/lib/features/create-append-anything/util/OptionsUtil.js +617 -0
  32. package/lib/features/editor-actions/BpmnEditorActions.js +0 -1
  33. package/lib/features/modeling/ElementFactory.js +11 -0
  34. package/lib/features/popup-menu/ReplaceMenuProvider.js +7 -2
  35. package/lib/features/popup-menu/index.js +6 -3
  36. package/lib/features/replace/ReplaceOptions.js +16 -16
  37. package/lib/icons/Icons.js +11 -0
  38. package/lib/icons/dist/append.svg +1 -0
  39. package/lib/icons/dist/connect-context-pad.svg +1 -0
  40. package/lib/icons/dist/connect-palette.svg +1 -0
  41. package/lib/icons/dist/create.svg +1 -0
  42. package/lib/icons/resources/append.svg +3 -0
  43. package/lib/icons/resources/create.svg +3 -0
  44. package/package.json +19 -6
@@ -5,6 +5,10 @@ import Ids from 'ids';
5
5
  import BaseViewer from './BaseViewer';
6
6
 
7
7
 
8
+ /**
9
+ * @typedef { import('didi').ModuleDeclaration } Module
10
+ */
11
+
8
12
  /**
9
13
  * A base modeler for BPMN 2.0 diagrams.
10
14
  *
@@ -15,8 +19,8 @@ import BaseViewer from './BaseViewer';
15
19
  * @param {string|number} [options.width] the width of the viewer
16
20
  * @param {string|number} [options.height] the height of the viewer
17
21
  * @param {Object} [options.moddleExtensions] extension packages to provide
18
- * @param {Array<didi.Module>} [options.modules] a list of modules to override the default modules
19
- * @param {Array<didi.Module>} [options.additionalModules] a list of modules to use with the default modules
22
+ * @param {Module[]} [options.modules] a list of modules to override the default modules
23
+ * @param {Module[]} [options.additionalModules] a list of modules to use with the default modules
20
24
  */
21
25
  export default function BaseModeler(options) {
22
26
  BaseViewer.call(this, options);
package/lib/BaseViewer.js CHANGED
@@ -35,6 +35,11 @@ import {
35
35
  wrapForCompatibility
36
36
  } from './util/CompatibilityUtil';
37
37
 
38
+
39
+ /**
40
+ * @typedef { import('didi').ModuleDeclaration } Module
41
+ */
42
+
38
43
  /**
39
44
  * A base viewer for BPMN 2.0 diagrams.
40
45
  *
@@ -46,8 +51,8 @@ import {
46
51
  * @param {string|number} [options.width] the width of the viewer
47
52
  * @param {string|number} [options.height] the height of the viewer
48
53
  * @param {Object} [options.moddleExtensions] extension packages to provide
49
- * @param {Array<didi.Module>} [options.modules] a list of modules to override the default modules
50
- * @param {Array<didi.Module>} [options.additionalModules] a list of modules to use with the default modules
54
+ * @param {Module[]} [options.modules] a list of modules to override the default modules
55
+ * @param {Module[]} [options.additionalModules] a list of modules to use with the default modules
51
56
  */
52
57
  export default function BaseViewer(options) {
53
58
 
@@ -476,7 +481,14 @@ BaseViewer.prototype._setDefinitions = function(definitions) {
476
481
  this._definitions = definitions;
477
482
  };
478
483
 
479
- BaseViewer.prototype.getModules = function() {
484
+ /**
485
+ * Return modules to instantiate with.
486
+ *
487
+ * @param {any} options the instance got created with
488
+ *
489
+ * @return {Module[]}
490
+ */
491
+ BaseViewer.prototype.getModules = function(options) {
480
492
  return this._modules;
481
493
  };
482
494
 
@@ -582,7 +594,7 @@ BaseViewer.prototype.detach = function() {
582
594
 
583
595
  BaseViewer.prototype._init = function(container, moddle, options) {
584
596
 
585
- const baseModules = options.modules || this.getModules(),
597
+ const baseModules = options.modules || this.getModules(options),
586
598
  additionalModules = options.additionalModules || [],
587
599
  staticModules = [
588
600
  {
package/lib/Modeler.js CHANGED
@@ -20,6 +20,7 @@ import ConnectionPreviewModule from 'diagram-js/lib/features/connection-preview'
20
20
  import ContextPadModule from './features/context-pad';
21
21
  import CopyPasteModule from './features/copy-paste';
22
22
  import CreateModule from 'diagram-js/lib/features/create';
23
+ import CreateAppendAnythingModule from './features/create-append-anything';
23
24
  import DistributeElementsModule from './features/distribute-elements';
24
25
  import EditorActionsModule from './features/editor-actions';
25
26
  import GridSnappingModule from './features/grid-snapping';
@@ -60,6 +61,10 @@ var initialDiagram =
60
61
  '</bpmn:definitions>';
61
62
 
62
63
 
64
+ /**
65
+ * @typedef { import('didi').ModuleDeclaration } Module
66
+ */
67
+
63
68
  /**
64
69
  * A modeler for BPMN 2.0 diagrams.
65
70
  *
@@ -129,8 +134,8 @@ var initialDiagram =
129
134
  * @param {string|number} [options.width] the width of the viewer
130
135
  * @param {string|number} [options.height] the height of the viewer
131
136
  * @param {Object} [options.moddleExtensions] extension packages to provide
132
- * @param {Array<didi.Module>} [options.modules] a list of modules to override the default modules
133
- * @param {Array<didi.Module>} [options.additionalModules] a list of modules to use with the default modules
137
+ * @param {Module[]} [options.modules] a list of modules to override the default modules
138
+ * @param {Module[]} [options.additionalModules] a list of modules to use with the default modules
134
139
  */
135
140
  export default function Modeler(options) {
136
141
  BaseModeler.call(this, options);
@@ -190,6 +195,7 @@ Modeler.prototype._modelingModules = [
190
195
  ContextPadModule,
191
196
  CopyPasteModule,
192
197
  CreateModule,
198
+ CreateAppendAnythingModule,
193
199
  DistributeElementsModule,
194
200
  EditorActionsModule,
195
201
  GridSnappingModule,
package/lib/Viewer.js CHANGED
@@ -9,6 +9,10 @@ import DrilldownModdule from './features/drilldown';
9
9
  import BaseViewer from './BaseViewer';
10
10
 
11
11
 
12
+ /**
13
+ * @typedef { import('didi').ModuleDeclaration } Module
14
+ */
15
+
12
16
  /**
13
17
  * A viewer for BPMN 2.0 diagrams.
14
18
  *
@@ -53,8 +57,8 @@ import BaseViewer from './BaseViewer';
53
57
  * @param {string|number} [options.width] the width of the viewer
54
58
  * @param {string|number} [options.height] the height of the viewer
55
59
  * @param {Object} [options.moddleExtensions] extension packages to provide
56
- * @param {Array<didi.Module>} [options.modules] a list of modules to override the default modules
57
- * @param {Array<didi.Module>} [options.additionalModules] a list of modules to use with the default modules
60
+ * @param {Module[]} [options.modules] a list of modules to override the default modules
61
+ * @param {Module[]} [options.additionalModules] a list of modules to use with the default modules
58
62
  */
59
63
  export default function Viewer(options) {
60
64
  BaseViewer.call(this, options);